You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2020/11/12 11:08:16 UTC
[myfaces-tobago] branch master updated (462f2a0 -> 863f51d)
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git.
from 462f2a0 TOBAGO-1633: Use TypeScript instead of JavaScript.
new f9e0623 TOBAGO-1633: Use TypeScript instead of JavaScript.
new 863f51d docs
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../tobago-example-demo/npm/ts/demo-all.ts | 1 +
.../docker.ts => npm/ts/demo-copy-to-clipboard.ts} | 4 +-
.../webapp/content/10-intro/20-docker/Docker.xhtml | 3 -
.../webapp/content/10-intro/20-docker/README.md | 11 -
.../webapp/content/10-intro/20-docker/docker.js | 53 ---
.../content/10-intro/20-docker/docker.js.map | 1 -
.../content/10-intro/20-docker/tsconfig.json | 15 -
.../webapp/content/10-intro/20-docker/tslint.json | 10 -
.../30-whats-new/60-new-in-5-0/Tobago_5.0.xhtml | 1 +
.../src/main/webapp/js/demo-all.js | 1 +
.../src/main/webapp/js/demo-all.js.map | 2 +-
.../tobago-example-demo/src/main/webapp/js/demo.js | 55 +++
.../src/main/webapp/js/demo.js.map | 2 +-
.../npm/dist/js/tobago-all.js | 9 +-
.../npm/dist/js/tobago-all.js.map | 2 +-
.../npm/dist/js/tobago-bar.js | 6 +-
.../npm/dist/js/tobago-bar.js.map | 2 +-
.../npm/dist/js/tobago-command.js | 6 +-
.../npm/dist/js/tobago-command.js.map | 2 +-
.../npm/dist/js/tobago-date.js | 6 +-
.../npm/dist/js/tobago-date.js.map | 2 +-
.../npm/dist/js/tobago-dropdown.js | 6 +-
.../npm/dist/js/tobago-dropdown.js.map | 2 +-
.../npm/dist/js/tobago-file.js | 6 +-
.../npm/dist/js/tobago-file.js.map | 2 +-
.../npm/dist/js/tobago-focus.js | 6 +-
.../npm/dist/js/tobago-focus.js.map | 2 +-
.../npm/dist/js/tobago-footer.js | 6 +-
.../npm/dist/js/tobago-footer.js.map | 2 +-
.../tobago-theme-standard/npm/dist/js/tobago-in.js | 6 +-
.../npm/dist/js/tobago-in.js.map | 2 +-
.../npm/dist/js/tobago-jsf.js | 98 -----
.../npm/dist/js/tobago-jsf.js.map | 1 -
.../npm/dist/js/tobago-messages.js | 6 +-
.../npm/dist/js/tobago-messages.js.map | 2 +-
.../npm/dist/js/tobago-page.js | 92 +++-
.../npm/dist/js/tobago-page.js.map | 2 +-
.../npm/dist/js/tobago-panel.js | 6 +-
.../npm/dist/js/tobago-panel.js.map | 2 +-
.../npm/dist/js/tobago-popover.js | 6 +-
.../npm/dist/js/tobago-popover.js.map | 2 +-
.../npm/dist/js/tobago-popup.js | 6 +-
.../npm/dist/js/tobago-popup.js.map | 2 +-
.../npm/dist/js/tobago-range.js | 6 +-
.../npm/dist/js/tobago-range.js.map | 2 +-
.../npm/dist/js/tobago-select-boolean-checkbox.js | 6 +-
.../dist/js/tobago-select-boolean-checkbox.js.map | 2 +-
.../npm/dist/js/tobago-select-boolean-toggle.js | 6 +-
.../dist/js/tobago-select-boolean-toggle.js.map | 2 +-
.../npm/dist/js/tobago-select-many-checkbox.js | 6 +-
.../npm/dist/js/tobago-select-many-checkbox.js.map | 2 +-
.../npm/dist/js/tobago-select-many-listbox.js | 6 +-
.../npm/dist/js/tobago-select-many-listbox.js.map | 2 +-
.../npm/dist/js/tobago-select-many-shuttle.js | 6 +-
.../npm/dist/js/tobago-select-many-shuttle.js.map | 2 +-
.../npm/dist/js/tobago-select-one-choice.js | 6 +-
.../npm/dist/js/tobago-select-one-choice.js.map | 2 +-
.../npm/dist/js/tobago-select-one-listbox.js | 6 +-
.../npm/dist/js/tobago-select-one-listbox.js.map | 2 +-
.../npm/dist/js/tobago-select-one-radio.js | 6 +-
.../npm/dist/js/tobago-select-one-radio.js.map | 2 +-
.../npm/dist/js/tobago-sheet.js | 6 +-
.../npm/dist/js/tobago-sheet.js.map | 2 +-
.../npm/dist/js/tobago-split-layout.js | 6 +-
.../npm/dist/js/tobago-split-layout.js.map | 2 +-
.../npm/dist/js/tobago-suggest.js | 6 +-
.../npm/dist/js/tobago-suggest.js.map | 2 +-
.../npm/dist/js/tobago-textarea.js | 6 +-
.../npm/dist/js/tobago-textarea.js.map | 2 +-
.../npm/dist/js/tobago-tree-listbox.js | 6 +-
.../npm/dist/js/tobago-tree-listbox.js.map | 2 +-
.../npm/dist/js/tobago-tree-node.js | 6 +-
.../npm/dist/js/tobago-tree-node.js.map | 2 +-
.../npm/dist/js/tobago-tree-select.js | 6 +-
.../npm/dist/js/tobago-tree-select.js.map | 2 +-
.../npm/dist/js/tobago-tree.js | 6 +-
.../npm/dist/js/tobago-tree.js.map | 2 +-
.../tobago-theme-standard/npm/dist/js/tobago.js | 488 ++++++++++++---------
.../npm/dist/js/tobago.js.map | 2 +-
.../tobago-theme-standard/npm/ts/tobago-all.ts | 10 +-
.../tobago-theme-standard/npm/ts/tobago-bar.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-command.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-date.ts | 6 +-
.../npm/ts/tobago-dropdown.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-file.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-focus.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-footer.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-in.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-jsf.ts | 98 -----
.../npm/ts/tobago-messages.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-page.ts | 96 +++-
.../tobago-theme-standard/npm/ts/tobago-panel.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-popover.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-popup.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-range.ts | 6 +-
.../npm/ts/tobago-select-boolean-checkbox.ts | 6 +-
.../npm/ts/tobago-select-boolean-toggle.ts | 6 +-
.../npm/ts/tobago-select-many-checkbox.ts | 6 +-
.../npm/ts/tobago-select-many-listbox.ts | 6 +-
.../npm/ts/tobago-select-many-shuttle.ts | 6 +-
.../npm/ts/tobago-select-one-choice.ts | 6 +-
.../npm/ts/tobago-select-one-listbox.ts | 6 +-
.../npm/ts/tobago-select-one-radio.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-sheet.ts | 6 +-
.../npm/ts/tobago-split-layout.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-suggest.ts | 6 +-
.../npm/ts/tobago-textarea.ts | 6 +-
.../npm/ts/tobago-tree-listbox.ts | 6 +-
.../npm/ts/tobago-tree-node.ts | 6 +-
.../npm/ts/tobago-tree-select.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-tree.ts | 6 +-
111 files changed, 801 insertions(+), 662 deletions(-)
rename tobago-example/tobago-example-demo/{src/main/webapp/content/10-intro/20-docker/docker.ts => npm/ts/demo-copy-to-clipboard.ts} (92%)
delete mode 100644 tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/README.md
delete mode 100644 tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/docker.js
delete mode 100644 tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/docker.js.map
delete mode 100644 tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/tsconfig.json
delete mode 100644 tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/tslint.json
delete mode 100644 tobago-theme/tobago-theme-standard/npm/dist/js/tobago-jsf.js
delete mode 100644 tobago-theme/tobago-theme-standard/npm/dist/js/tobago-jsf.js.map
delete mode 100644 tobago-theme/tobago-theme-standard/npm/ts/tobago-jsf.ts
[myfaces-tobago] 01/02: TOBAGO-1633: Use TypeScript instead of
JavaScript.
Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
commit f9e0623a7a2579bb56923d4bda0922ab5c1665e3
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Thu Nov 12 11:19:50 2020 +0100
TOBAGO-1633: Use TypeScript instead of JavaScript.
* Initialization
---
.../tobago-example-demo/npm/ts/demo-all.ts | 1 +
.../docker.ts => npm/ts/demo-copy-to-clipboard.ts} | 4 +-
.../webapp/content/10-intro/20-docker/Docker.xhtml | 3 -
.../webapp/content/10-intro/20-docker/README.md | 11 -
.../webapp/content/10-intro/20-docker/docker.js | 53 ---
.../content/10-intro/20-docker/docker.js.map | 1 -
.../content/10-intro/20-docker/tsconfig.json | 15 -
.../webapp/content/10-intro/20-docker/tslint.json | 10 -
.../src/main/webapp/js/demo-all.js | 1 +
.../src/main/webapp/js/demo-all.js.map | 2 +-
.../tobago-example-demo/src/main/webapp/js/demo.js | 55 +++
.../src/main/webapp/js/demo.js.map | 2 +-
.../npm/dist/js/tobago-all.js | 9 +-
.../npm/dist/js/tobago-all.js.map | 2 +-
.../npm/dist/js/tobago-bar.js | 6 +-
.../npm/dist/js/tobago-bar.js.map | 2 +-
.../npm/dist/js/tobago-command.js | 6 +-
.../npm/dist/js/tobago-command.js.map | 2 +-
.../npm/dist/js/tobago-date.js | 6 +-
.../npm/dist/js/tobago-date.js.map | 2 +-
.../npm/dist/js/tobago-dropdown.js | 6 +-
.../npm/dist/js/tobago-dropdown.js.map | 2 +-
.../npm/dist/js/tobago-file.js | 6 +-
.../npm/dist/js/tobago-file.js.map | 2 +-
.../npm/dist/js/tobago-focus.js | 6 +-
.../npm/dist/js/tobago-focus.js.map | 2 +-
.../npm/dist/js/tobago-footer.js | 6 +-
.../npm/dist/js/tobago-footer.js.map | 2 +-
.../tobago-theme-standard/npm/dist/js/tobago-in.js | 6 +-
.../npm/dist/js/tobago-in.js.map | 2 +-
.../npm/dist/js/tobago-jsf.js | 98 -----
.../npm/dist/js/tobago-jsf.js.map | 1 -
.../npm/dist/js/tobago-messages.js | 6 +-
.../npm/dist/js/tobago-messages.js.map | 2 +-
.../npm/dist/js/tobago-page.js | 92 +++-
.../npm/dist/js/tobago-page.js.map | 2 +-
.../npm/dist/js/tobago-panel.js | 6 +-
.../npm/dist/js/tobago-panel.js.map | 2 +-
.../npm/dist/js/tobago-popover.js | 6 +-
.../npm/dist/js/tobago-popover.js.map | 2 +-
.../npm/dist/js/tobago-popup.js | 6 +-
.../npm/dist/js/tobago-popup.js.map | 2 +-
.../npm/dist/js/tobago-range.js | 6 +-
.../npm/dist/js/tobago-range.js.map | 2 +-
.../npm/dist/js/tobago-select-boolean-checkbox.js | 6 +-
.../dist/js/tobago-select-boolean-checkbox.js.map | 2 +-
.../npm/dist/js/tobago-select-boolean-toggle.js | 6 +-
.../dist/js/tobago-select-boolean-toggle.js.map | 2 +-
.../npm/dist/js/tobago-select-many-checkbox.js | 6 +-
.../npm/dist/js/tobago-select-many-checkbox.js.map | 2 +-
.../npm/dist/js/tobago-select-many-listbox.js | 6 +-
.../npm/dist/js/tobago-select-many-listbox.js.map | 2 +-
.../npm/dist/js/tobago-select-many-shuttle.js | 6 +-
.../npm/dist/js/tobago-select-many-shuttle.js.map | 2 +-
.../npm/dist/js/tobago-select-one-choice.js | 6 +-
.../npm/dist/js/tobago-select-one-choice.js.map | 2 +-
.../npm/dist/js/tobago-select-one-listbox.js | 6 +-
.../npm/dist/js/tobago-select-one-listbox.js.map | 2 +-
.../npm/dist/js/tobago-select-one-radio.js | 6 +-
.../npm/dist/js/tobago-select-one-radio.js.map | 2 +-
.../npm/dist/js/tobago-sheet.js | 6 +-
.../npm/dist/js/tobago-sheet.js.map | 2 +-
.../npm/dist/js/tobago-split-layout.js | 6 +-
.../npm/dist/js/tobago-split-layout.js.map | 2 +-
.../npm/dist/js/tobago-suggest.js | 6 +-
.../npm/dist/js/tobago-suggest.js.map | 2 +-
.../npm/dist/js/tobago-textarea.js | 6 +-
.../npm/dist/js/tobago-textarea.js.map | 2 +-
.../npm/dist/js/tobago-tree-listbox.js | 6 +-
.../npm/dist/js/tobago-tree-listbox.js.map | 2 +-
.../npm/dist/js/tobago-tree-node.js | 6 +-
.../npm/dist/js/tobago-tree-node.js.map | 2 +-
.../npm/dist/js/tobago-tree-select.js | 6 +-
.../npm/dist/js/tobago-tree-select.js.map | 2 +-
.../npm/dist/js/tobago-tree.js | 6 +-
.../npm/dist/js/tobago-tree.js.map | 2 +-
.../tobago-theme-standard/npm/dist/js/tobago.js | 488 ++++++++++++---------
.../npm/dist/js/tobago.js.map | 2 +-
.../tobago-theme-standard/npm/ts/tobago-all.ts | 10 +-
.../tobago-theme-standard/npm/ts/tobago-bar.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-command.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-date.ts | 6 +-
.../npm/ts/tobago-dropdown.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-file.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-focus.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-footer.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-in.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-jsf.ts | 98 -----
.../npm/ts/tobago-messages.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-page.ts | 96 +++-
.../tobago-theme-standard/npm/ts/tobago-panel.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-popover.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-popup.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-range.ts | 6 +-
.../npm/ts/tobago-select-boolean-checkbox.ts | 6 +-
.../npm/ts/tobago-select-boolean-toggle.ts | 6 +-
.../npm/ts/tobago-select-many-checkbox.ts | 6 +-
.../npm/ts/tobago-select-many-listbox.ts | 6 +-
.../npm/ts/tobago-select-many-shuttle.ts | 6 +-
.../npm/ts/tobago-select-one-choice.ts | 6 +-
.../npm/ts/tobago-select-one-listbox.ts | 6 +-
.../npm/ts/tobago-select-one-radio.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-sheet.ts | 6 +-
.../npm/ts/tobago-split-layout.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-suggest.ts | 6 +-
.../npm/ts/tobago-textarea.ts | 6 +-
.../npm/ts/tobago-tree-listbox.ts | 6 +-
.../npm/ts/tobago-tree-node.ts | 6 +-
.../npm/ts/tobago-tree-select.ts | 6 +-
.../tobago-theme-standard/npm/ts/tobago-tree.ts | 6 +-
110 files changed, 800 insertions(+), 662 deletions(-)
diff --git a/tobago-example/tobago-example-demo/npm/ts/demo-all.ts b/tobago-example/tobago-example-demo/npm/ts/demo-all.ts
index d358b6a..d7cdd91 100644
--- a/tobago-example/tobago-example-demo/npm/ts/demo-all.ts
+++ b/tobago-example/tobago-example-demo/npm/ts/demo-all.ts
@@ -18,6 +18,7 @@
import "../../../../npm/node_modules/prismjs/prism";
import "./demo-alert";
+import "./demo-copy-to-clipboard";
import "./demo-highlight";
import "./demo-inspect";
import "./demo-login";
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/docker.ts b/tobago-example/tobago-example-demo/npm/ts/demo-copy-to-clipboard.ts
similarity index 92%
rename from tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/docker.ts
rename to tobago-example/tobago-example-demo/npm/ts/demo-copy-to-clipboard.ts
index 23c9de5..a6a240e 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/docker.ts
+++ b/tobago-example/tobago-example-demo/npm/ts/demo-copy-to-clipboard.ts
@@ -54,5 +54,7 @@ class DemoCopyToClipboard extends HTMLElement {
}
document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("demo-copy-to-clipboard", DemoCopyToClipboard);
+ if (window.customElements.get("demo-copy-to-clipboard") == null) {
+ window.customElements.define("demo-copy-to-clipboard", DemoCopyToClipboard);
+ }
});
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/Docker.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/Docker.xhtml
index 24ba907..4959fe0 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/Docker.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/Docker.xhtml
@@ -28,9 +28,6 @@
just run it in Docker.
</p>
-<!-- XXX TODO: <tc:script file="docker.js" type="module"/>-->
- <tc:script file="docker.js"/>
-
<tc:section id="cli" label="Command Line Configurator">
<tc:segmentLayout medium="6seg;6seg">
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/README.md b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/README.md
deleted file mode 100644
index 07c184e..0000000
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-Build instructions:
-
-Compiling
-```
-tsc
-```
-
-Lint
-```
-tslint *.ts
-```
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/docker.js b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/docker.js
deleted file mode 100644
index c92cd9f..0000000
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/docker.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-class DemoCopyToClipboard extends HTMLElement {
- constructor() {
- super();
- }
- connectedCallback() {
- this.addEventListener("click", (event) => {
- const sourceElement = document.getElementById(this.source);
- if (window.getSelection) {
- const selection = window.getSelection();
- const range = document.createRange();
- range.selectNodeContents(sourceElement);
- selection.removeAllRanges();
- selection.addRange(range);
- }
- else {
- console.warn("Text select not possible: Unsupported browser.");
- }
- try {
- const result = document.execCommand("copy");
- console.debug("result: " + result);
- }
- catch (error) {
- console.error("Copying text not possible");
- }
- });
- }
- get source() {
- return this.getAttribute("source");
- }
- set source(name) {
- this.setAttribute("source", name);
- }
-}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("demo-copy-to-clipboard", DemoCopyToClipboard);
-});
-//# sourceMappingURL=docker.js.map
\ No newline at end of file
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/docker.js.map b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/docker.js.map
deleted file mode 100644
index e2b5206..0000000
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/docker.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"docker.js","sourceRoot":"","sources":["docker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,mBAAoB,SAAQ,WAAW;IAE3C;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,KAAiB,EAAE,EAAE;YACnD,MAAM,aAAa,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAE3D,IAAI,MAAM,CAAC,YAAY,EAAE;gBACvB,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;gBACxC,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACrC,KAAK,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC;gBACx [...]
\ No newline at end of file
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/tsconfig.json b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/tsconfig.json
deleted file mode 100644
index af44995..0000000
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/tsconfig.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "compilerOptions": {
- "module": "commonjs",
- "target": "ES2015",
- "noImplicitAny": false,
- "rootDir": ".",
- "outDir": ".",
- "sourceMap": true,
- "removeComments": false
- },
- "include": [
- "**/*.ts"
- ],
- "exclude": []
-}
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/tslint.json b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/tslint.json
deleted file mode 100644
index 7137248..0000000
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/tslint.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "rules": {
- "semicolon": [true, "always"],
- "member-ordering": [
- true,
- "static-before-instance",
- "variables-before-functions"
- ]
- }
-}
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/js/demo-all.js b/tobago-example/tobago-example-demo/src/main/webapp/js/demo-all.js
index 977f95c..4556376 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/js/demo-all.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/js/demo-all.js
@@ -16,6 +16,7 @@
*/
import "../../../../npm/node_modules/prismjs/prism";
import "./demo-alert";
+import "./demo-copy-to-clipboard";
import "./demo-highlight";
import "./demo-inspect";
import "./demo-login";
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/js/demo-all.js.map b/tobago-example/tobago-example-demo/src/main/webapp/js/demo-all.js.map
index 7ce80e4..aed5dbf 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/js/demo-all.js.map
+++ b/tobago-example/tobago-example-demo/src/main/webapp/js/demo-all.js.map
@@ -1 +1 @@
-{"version":3,"file":"demo-all.js","sourceRoot":"","sources":["../../../../npm/ts/demo-all.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,4CAA4C,CAAC;AAEpD,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,aAAa,CAAC"}
\ No newline at end of file
+{"version":3,"file":"demo-all.js","sourceRoot":"","sources":["../../../../npm/ts/demo-all.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,4CAA4C,CAAC;AAEpD,OAAO,cAAc,CAAC;AACtB,OAAO,0BAA0B,CAAC;AAClC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,aAAa,CAAC"}
\ No newline at end of file
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/js/demo.js b/tobago-example/tobago-example-demo/src/main/webapp/js/demo.js
index 190602f..29e5740 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/js/demo.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/js/demo.js
@@ -1749,6 +1749,61 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+ class DemoCopyToClipboard extends HTMLElement {
+ constructor() {
+ super();
+ }
+ connectedCallback() {
+ this.addEventListener("click", (event) => {
+ const sourceElement = document.getElementById(this.source);
+ if (window.getSelection) {
+ const selection = window.getSelection();
+ const range = document.createRange();
+ range.selectNodeContents(sourceElement);
+ selection.removeAllRanges();
+ selection.addRange(range);
+ }
+ else {
+ console.warn("Text select not possible: Unsupported browser.");
+ }
+ try {
+ const result = document.execCommand("copy");
+ console.debug("result: " + result);
+ }
+ catch (error) {
+ console.error("Copying text not possible");
+ }
+ });
+ }
+ get source() {
+ return this.getAttribute("source");
+ }
+ set source(name) {
+ this.setAttribute("source", name);
+ }
+ }
+ document.addEventListener("DOMContentLoaded", function (event) {
+ if (window.customElements.get("demo-copy-to-clipboard") == null) {
+ window.customElements.define("demo-copy-to-clipboard", DemoCopyToClipboard);
+ }
+ });
+
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
// import {Prism} from "prismjs/prism.js";
class DemoHighlight extends HTMLElement {
constructor() {
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/js/demo.js.map b/tobago-example/tobago-example-demo/src/main/webapp/js/demo.js.map
index 3e447b1..e058fbd 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/js/demo.js.map
+++ b/tobago-example/tobago-example-demo/src/main/webapp/js/demo.js.map
@@ -1 +1 @@
-{"version":3,"file":"demo.js","sources":["../../../../npm/node_modules/prismjs/prism.js","demo-alert.js","demo-highlight.js","demo-inspect.js","demo-login.js","demo-search.js","demo-test.js"],"sourcesContent":["\n/* **********************************************\n Begin prism-core.js\n********************************************** */\n\n/// <reference lib=\"WebWorker\"/>\n\nvar _self = (typeof window !== 'undefined')\n\t? window // if in browser\n\t: (\n\t\t(typeof WorkerGlobalScop [...]
\ No newline at end of file
+{"version":3,"file":"demo.js","sources":["../../../../npm/node_modules/prismjs/prism.js","demo-alert.js","demo-copy-to-clipboard.js","demo-highlight.js","demo-inspect.js","demo-login.js","demo-search.js","demo-test.js"],"sourcesContent":["\n/* **********************************************\n Begin prism-core.js\n********************************************** */\n\n/// <reference lib=\"WebWorker\"/>\n\nvar _self = (typeof window !== 'undefined')\n\t? window // if in browser\n\t: (\n [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-all.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-all.js
index cc13c2b..04dc042 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-all.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-all.js
@@ -24,7 +24,6 @@ import "./tobago-file";
import "./tobago-focus";
import "./tobago-footer";
import "./tobago-in";
-import "./tobago-jsf";
import "./tobago-messages";
import "./tobago-overlay";
import "./tobago-panel";
@@ -53,4 +52,12 @@ import "./tobago-tree-listbox";
import "./tobago-tree-node";
import "./tobago-tree-select";
import "./tobago-utils";
+if (document.readyState === "loading") {
+ document.addEventListener("DOMContentLoaded", (event) => {
+ document.dispatchEvent(new CustomEvent("tobago.init"));
+ });
+}
+else {
+ document.dispatchEvent(new CustomEvent("tobago.init"));
+}
//# sourceMappingURL=tobago-all.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-all.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-all.js.map
index fab3632..f78c75e 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-all.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-all.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-all.js","sourceRoot":"","sources":["../../ts/tobago-all.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AACvB,OAAO,gBAAgB,CAAC;AACxB,OAAO,iBAAiB,CAAC;AACzB,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AACxB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,kBAAkB,CAAC [...]
\ No newline at end of file
+{"version":3,"file":"tobago-all.js","sourceRoot":"","sources":["../../ts/tobago-all.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AACvB,OAAO,gBAAgB,CAAC;AACxB,OAAO,iBAAiB,CAAC;AACzB,OAAO,aAAa,CAAC;AACrB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AACxB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CA [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-bar.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-bar.js
index 0c12d24..b1907ca 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-bar.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-bar.js
@@ -66,7 +66,9 @@ class Bar extends HTMLElement {
return this.querySelector(".navbar-collapse");
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-bar", Bar);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-bar") == null) {
+ window.customElements.define("tobago-bar", Bar);
+ }
});
//# sourceMappingURL=tobago-bar.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-bar.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-bar.js.map
index 2ec8ec9..f79831c 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-bar.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-bar.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-bar.js","sourceRoot":"","sources":["../../ts/tobago-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAExC,MAAM,GAAI,SAAQ,WAAW;IAW3B;QACE,KAAK,EAAE,CAAC;QAVO,aAAQ,GAAG;YAC1B,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,UAAU;YACpB,UAAU,EAAE,YAAY;SACzB,CAAC;QACe,iBAAY,GAAW,eAAe,CAAC;QAMtD,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,QAAQ,GAAG,IA [...]
\ No newline at end of file
+{"version":3,"file":"tobago-bar.js","sourceRoot":"","sources":["../../ts/tobago-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAExC,MAAM,GAAI,SAAQ,WAAW;IAW3B;QACE,KAAK,EAAE,CAAC;QAVO,aAAQ,GAAG;YAC1B,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,UAAU;YACpB,UAAU,EAAE,YAAY;SACzB,CAAC;QACe,iBAAY,GAAW,eAAe,CAAC;QAMtD,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,QAAQ,GAAG,IA [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-command.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-command.js
index 33b400d..cc678e0 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-command.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-command.js
@@ -161,8 +161,10 @@ class Behavior extends HTMLElement {
}
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-behavior", Behavior);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-behavior") == null) {
+ window.customElements.define("tobago-behavior", Behavior);
+ }
});
export class CommandHelper {
}
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-command.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-command.js.map
index faed7e6..9c48fc2 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-command.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-command.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-command.js","sourceRoot":"","sources":["../../ts/tobago-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AAEnC,MAAM,QAAS,SAAQ,WAAW;IAEhC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,QAAQ,IAAI,CAAC,KAAK,EAAE;YAClB,KAAK,MAAM,EAAE,8DAA8D;gBACzE,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAChB,MAAM;YAC [...]
\ No newline at end of file
+{"version":3,"file":"tobago-command.js","sourceRoot":"","sources":["../../ts/tobago-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AAEnC,MAAM,QAAS,SAAQ,WAAW;IAEhC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,QAAQ,IAAI,CAAC,KAAK,EAAE;YAClB,KAAK,MAAM,EAAE,8DAA8D;gBACzE,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAChB,MAAM;YAC [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-date.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-date.js
index 2b9d254..82ce4bc 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-date.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-date.js
@@ -81,7 +81,9 @@ class DatePicker extends HTMLElement {
return this.querySelector(".input");
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-date", DatePicker);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-date") == null) {
+ window.customElements.define("tobago-date", DatePicker);
+ }
});
//# sourceMappingURL=tobago-date.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-date.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-date.js.map
index 805401a..7c9b901 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-date.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-date.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-date.js","sourceRoot":"","sources":["../../ts/tobago-date.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,UAAU,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AAEnC,MAAM,UAAW,SAAQ,WAAW;IAElC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;;QACf,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;QAEhC,6DAA6D;QAC7D,qDAAqD;QACrD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO [...]
\ No newline at end of file
+{"version":3,"file":"tobago-date.js","sourceRoot":"","sources":["../../ts/tobago-date.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,UAAU,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AAEnC,MAAM,UAAW,SAAQ,WAAW;IAElC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;;QACf,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;QAEhC,6DAA6D;QAC7D,qDAAqD;QACrD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-dropdown.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-dropdown.js
index 392f8e1..a1a7168 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-dropdown.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-dropdown.js
@@ -283,7 +283,9 @@ class DropdownEntry {
this.active = false;
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-dropdown", Dropdown);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-dropdown") == null) {
+ window.customElements.define("tobago-dropdown", Dropdown);
+ }
});
//# sourceMappingURL=tobago-dropdown.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-dropdown.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-dropdown.js.map
index 3914e30..d149d21 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-dropdown.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-dropdown.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-dropdown.js","sourceRoot":"","sources":["../../ts/tobago-dropdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,KAAK,GAAG;IACZ,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,wBAAwB;IAChC,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,uBAAuB;CAC/B,CAAC;AAEF,MAAM,QAAS,SAAQ,WAAW;IAIhC;QACE,KAAK,EAAE,CAAC;QAHF,oBAAe,GAAoB,EAAE,CAAC;QAI5C,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,EAAE,kBAAkB;YAC3E,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAA2 [...]
\ No newline at end of file
+{"version":3,"file":"tobago-dropdown.js","sourceRoot":"","sources":["../../ts/tobago-dropdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,KAAK,GAAG;IACZ,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,wBAAwB;IAChC,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,uBAAuB;CAC/B,CAAC;AAEF,MAAM,QAAS,SAAQ,WAAW;IAIhC;QACE,KAAK,EAAE,CAAC;QAHF,oBAAe,GAAoB,EAAE,CAAC;QAI5C,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,EAAE,kBAAkB;YAC3E,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAA2 [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-file.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-file.js
index 64de610..8dbe1a7 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-file.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-file.js
@@ -56,7 +56,9 @@ export class File extends HTMLElement {
}
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-file", File);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-file") == null) {
+ window.customElements.define("tobago-file", File);
+ }
});
//# sourceMappingURL=tobago-file.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-file.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-file.js.map
index aa58614..6f79d38 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-file.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-file.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-file.js","sourceRoot":"","sources":["../../ts/tobago-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,OAAO,IAAK,SAAQ,WAAW;IAEnC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,qBAAqB,CAAC;QAChD,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IAC3C,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC [...]
\ No newline at end of file
+{"version":3,"file":"tobago-file.js","sourceRoot":"","sources":["../../ts/tobago-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,OAAO,IAAK,SAAQ,WAAW;IAEnC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,qBAAqB,CAAC;QAChD,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IAC3C,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-focus.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-focus.js
index b273cdd..860d06d 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-focus.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-focus.js
@@ -119,7 +119,9 @@ export class Focus extends HTMLElement {
}
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-focus", Focus);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-focus") == null) {
+ window.customElements.define("tobago-focus", Focus);
+ }
});
//# sourceMappingURL=tobago-focus.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-focus.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-focus.js.map
index ccb263f..d436183 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-focus.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-focus.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-focus.js","sourceRoot":"","sources":["../../ts/tobago-focus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AACnC,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAExC,MAAM,OAAO,KAAM,SAAQ,WAAW;IAEpC;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,KAAiB;QACrC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;QAC3C,IAAI,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAE7C,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,QAAQ;eACrC,MAAM,CAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC, [...]
\ No newline at end of file
+{"version":3,"file":"tobago-focus.js","sourceRoot":"","sources":["../../ts/tobago-focus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AACnC,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAExC,MAAM,OAAO,KAAM,SAAQ,WAAW;IAEpC;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,KAAiB;QACrC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;QAC3C,IAAI,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAE7C,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,QAAQ;eACrC,MAAM,CAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC, [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-footer.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-footer.js
index 25f77c9..d0eb16e 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-footer.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-footer.js
@@ -51,7 +51,9 @@ class Footer extends HTMLElement {
return this.classList.contains("fixed-bottom");
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-footer", Footer);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-footer") == null) {
+ window.customElements.define("tobago-footer", Footer);
+ }
});
//# sourceMappingURL=tobago-footer.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-footer.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-footer.js.map
index fa0b071..7928bd7 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-footer.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-footer.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-footer.js","sourceRoot":"","sources":["../../ts/tobago-footer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAExC,MAAM,MAAO,SAAQ,WAAW;IAI9B;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;QAE7B,IAAG,IAAI,CAAC,OAAO,EAAE;YACf,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAE1D,IAAI,IAAI,CAAC,IAAI,EAAE;gBACb,IAAI,CAAC,UAAU,EAAE,CAAC;aACnB;SACF;IACH,C [...]
\ No newline at end of file
+{"version":3,"file":"tobago-footer.js","sourceRoot":"","sources":["../../ts/tobago-footer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAExC,MAAM,MAAO,SAAQ,WAAW;IAI9B;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;QAE7B,IAAG,IAAI,CAAC,OAAO,EAAE;YACf,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAE1D,IAAI,IAAI,CAAC,IAAI,EAAE;gBACb,IAAI,CAAC,UAAU,EAAE,CAAC;aACnB;SACF;IACH,C [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-in.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-in.js
index 1584769..a02e76a 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-in.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-in.js
@@ -28,8 +28,10 @@ export class In extends HTMLElement {
return this.querySelector(DomUtils.escapeClientId(this.id + DomUtils.SUB_COMPONENT_SEP + "field"));
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-in", In);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-in") == null) {
+ window.customElements.define("tobago-in", In);
+ }
});
// XXX regexp example only - blueprint
class RegExpTest {
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-in.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-in.js.map
index 1ed1e38..d620161 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-in.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-in.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-in.js","sourceRoot":"","sources":["../../ts/tobago-in.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,OAAO,EAAG,SAAQ,WAAW;IACjC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,cAA [...]
\ No newline at end of file
+{"version":3,"file":"tobago-in.js","sourceRoot":"","sources":["../../ts/tobago-in.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,OAAO,EAAG,SAAQ,WAAW;IACjC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,cAA [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-jsf.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-jsf.js
deleted file mode 100644
index 9bbb377..0000000
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-jsf.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-import { Listener } from "./tobago-listener";
-import { ReloadManager } from "./tobago-reload";
-import { Overlay } from "./tobago-overlay";
-var JsfParameter;
-(function (JsfParameter) {
- JsfParameter["VIEW_STATE"] = "javax.faces.ViewState";
- JsfParameter["CLIENT_WINDOW"] = "javax.faces.ClientWindow";
- JsfParameter["VIEW_ROOT"] = "javax.faces.ViewRoot";
- JsfParameter["VIEW_HEAD"] = "javax.faces.ViewHead";
- JsfParameter["VIEW_BODY"] = "javax.faces.ViewBody";
- JsfParameter["RESOURCE"] = "javax.faces.Resource";
-})(JsfParameter || (JsfParameter = {}));
-export class Jsf {
-}
-Jsf.isId = function (id) {
- switch (id) {
- case JsfParameter.VIEW_STATE:
- case JsfParameter.CLIENT_WINDOW:
- case JsfParameter.VIEW_ROOT:
- case JsfParameter.VIEW_HEAD:
- case JsfParameter.VIEW_BODY:
- case JsfParameter.RESOURCE:
- return false;
- default:
- return true;
- }
-};
-Jsf.isBody = function (id) {
- switch (id) {
- case JsfParameter.VIEW_ROOT:
- case JsfParameter.VIEW_BODY:
- return true;
- default:
- return false;
- }
-};
-Jsf.registerAjaxListener = function () {
- jsf.ajax.addOnEvent(function (event) {
- console.timeEnd("[tobago-jsf] jsf-ajax");
- console.time("[tobago-jsf] jsf-ajax");
- console.debug("[tobago-jsf] JSF event status: '%s'", event.status);
- if (event.status === "success") {
- event.responseXML.querySelectorAll("update").forEach(function (update) {
- const result = /<!\[CDATA\[(.*)]]>/gm.exec(update.innerHTML);
- const id = update.id;
- if (result !== null && result.length === 2 && result[1].startsWith("{\"reload\"")) {
- // not modified on server, needs be reloaded after some time
- console.debug("[tobago-jsf] Found reload-JSON in response!");
- ReloadManager.instance.schedule(id, JSON.parse(result[1]).reload.frequency);
- }
- else {
- console.info("[tobago-jsf] Update after jsf.ajax success: %s", id);
- if (Jsf.isId(id)) {
- console.debug("[tobago-jsf] updating #%s", id);
- let element = document.getElementById(id);
- if (element) {
- Listener.executeAfterUpdate(element);
- }
- else {
- console.warn("[tobago-jsf] element not found for #%s", id);
- }
- }
- else if (Jsf.isBody(id)) {
- console.debug("[tobago-jsf] updating body");
- // there should be only one element with this tag name
- Listener.executeAfterUpdate(document.querySelector("tobago-page"));
- }
- }
- });
- }
- else if (event.status === "complete") {
- event.responseXML.querySelectorAll("update").forEach(function (update) {
- const id = update.id;
- if (Jsf.isId(id)) {
- console.debug("[tobago-jsf] Update after jsf.ajax complete: #" + id);
- Overlay.destroy(id);
- }
- });
- }
- });
-};
-//# sourceMappingURL=tobago-jsf.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-jsf.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-jsf.js.map
deleted file mode 100644
index d5a7f06..0000000
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-jsf.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"tobago-jsf.js","sourceRoot":"","sources":["../../ts/tobago-jsf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;EAeE;AAEF,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAC;AAEzC,IAAK,YAOJ;AAPD,WAAK,YAAY;IACf,oDAAoC,CAAA;IACpC,0DAA0C,CAAA;IAC1C,kDAAkC,CAAA;IAClC,kDAAkC,CAAA;IAClC,kDAAkC,CAAA;IAClC,iDAAiC,CAAA;AACnC,CAAC,EAPI,YAAY,KAAZ,YAAY,QAOhB;AAED,MAAM,OAAO,GAAG;;AAEC,QAAI,GAAG,UAAU,EAAU;IACxC,Q [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-messages.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-messages.js
index 96b95a8..503a45c 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-messages.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-messages.js
@@ -30,7 +30,9 @@ class Messages extends HTMLElement {
return this.querySelectorAll(".alert button.btn-close");
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-messages", Messages);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-messages") == null) {
+ window.customElements.define("tobago-messages", Messages);
+ }
});
//# sourceMappingURL=tobago-messages.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-messages.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-messages.js.map
index cf5f10d..0bf4c62 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-messages.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-messages.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-messages.js","sourceRoot":"","sources":["../../ts/tobago-messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,QAAS,SAAQ,WAAW;IAEhC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,KAAK,IAAI,WAAW,IAAI,IAAI,CAAC,YAAY,EAAE;YACzC,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;SACxD;IACH,CAAC;IAEO,UAAU,CAAC,KAAiB;QAClC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CA [...]
\ No newline at end of file
+{"version":3,"file":"tobago-messages.js","sourceRoot":"","sources":["../../ts/tobago-messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,QAAS,SAAQ,WAAW;IAEhC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,KAAK,IAAI,WAAW,IAAI,IAAI,CAAC,YAAY,EAAE;YACzC,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;SACxD;IACH,CAAC;IAEO,UAAU,CAAC,KAAiB;QAClC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CA [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-page.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-page.js
index 439f84a..145656f 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-page.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-page.js
@@ -15,10 +15,10 @@
* limitations under the License.
*/
import { DomUtils } from "./tobago-utils";
-import { Jsf } from "./tobago-jsf";
import { CommandHelper } from "./tobago-command";
import { Overlay } from "./tobago-overlay";
import { Listener } from "./tobago-listener";
+import { ReloadManager } from "./tobago-reload";
export class Page extends HTMLElement {
constructor() {
super();
@@ -39,10 +39,10 @@ export class Page extends HTMLElement {
return null;
}
connectedCallback() {
- Jsf.registerAjaxListener();
+ this.registerAjaxListener();
this.querySelector("form").addEventListener("submit", CommandHelper.onSubmit);
window.addEventListener("unload", this.onUnload.bind(this));
- this.addEventListener("keypress", function (event) {
+ this.addEventListener("keypress", (event) => {
let code = event.which; // XXX deprecated
if (code === 0) {
code = event.keyCode;
@@ -94,6 +94,56 @@ export class Page extends HTMLElement {
Listener.executeBeforeExit();
}
}
+ registerAjaxListener() {
+ jsf.ajax.addOnEvent(this.jsfResponse.bind(this));
+ }
+ jsfResponse(event) {
+ console.timeEnd("[tobago-jsf] jsf-ajax");
+ console.time("[tobago-jsf] jsf-ajax");
+ console.debug("[tobago-jsf] JSF event status: '%s'", event.status);
+ if (event.status === "success") {
+ event.responseXML.querySelectorAll("update").forEach(this.jsfResponseSuccess.bind(this));
+ }
+ else if (event.status === "complete") {
+ event.responseXML.querySelectorAll("update").forEach(this.jsfResponseComplete.bind(this));
+ }
+ }
+ jsfResponseSuccess(update) {
+ const result = /<!\[CDATA\[(.*)]]>/gm.exec(update.innerHTML);
+ const id = update.id;
+ if (result !== null && result.length === 2 && result[1].startsWith("{\"reload\"")) {
+ // not modified on server, needs be reloaded after some time
+ console.debug("[tobago-jsf] Found reload-JSON in response!");
+ ReloadManager.instance.schedule(id, JSON.parse(result[1]).reload.frequency);
+ }
+ else {
+ console.info("[tobago-jsf] Update after jsf.ajax success: %s", id);
+ if (JsfParameter.isJsfId(id)) {
+ console.debug("[tobago-jsf] updating #%s", id);
+ const rootNode = this.getRootNode();
+ let element = rootNode.getElementById(id);
+ if (element) {
+ Listener.executeAfterUpdate(element);
+ }
+ else {
+ console.warn("[tobago-jsf] element not found for #%s", id);
+ }
+ }
+ else if (JsfParameter.isJsfBody(id)) {
+ console.debug("[tobago-jsf] updating body");
+ // there should be only one element with this tag name
+ const rootNode = this.getRootNode();
+ Listener.executeAfterUpdate(rootNode.querySelector("tobago-page"));
+ }
+ }
+ }
+ jsfResponseComplete(update) {
+ const id = update.id;
+ if (JsfParameter.isJsfId(id)) {
+ console.debug("[tobago-jsf] Update after jsf.ajax complete: #" + id);
+ Overlay.destroy(id);
+ }
+ }
get locale() {
let locale = this.getAttribute("locale");
if (!locale) {
@@ -102,9 +152,41 @@ export class Page extends HTMLElement {
return locale;
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-page", Page);
+document.addEventListener("tobago.init", (event) => {
+ if (window.customElements.get("tobago-page") == null) {
+ window.customElements.define("tobago-page", Page);
+ }
});
// todo remove this
window.addEventListener("load", Listener.executeWindowLoad);
+class JsfParameter {
+ static isJsfId(id) {
+ switch (id) {
+ case JsfParameter.VIEW_STATE:
+ case JsfParameter.CLIENT_WINDOW:
+ case JsfParameter.VIEW_ROOT:
+ case JsfParameter.VIEW_HEAD:
+ case JsfParameter.VIEW_BODY:
+ case JsfParameter.RESOURCE:
+ return false;
+ default:
+ return true;
+ }
+ }
+ static isJsfBody(id) {
+ switch (id) {
+ case JsfParameter.VIEW_ROOT:
+ case JsfParameter.VIEW_BODY:
+ return true;
+ default:
+ return false;
+ }
+ }
+}
+JsfParameter.VIEW_STATE = "javax.faces.ViewState";
+JsfParameter.CLIENT_WINDOW = "javax.faces.ClientWindow";
+JsfParameter.VIEW_ROOT = "javax.faces.ViewRoot";
+JsfParameter.VIEW_HEAD = "javax.faces.ViewHead";
+JsfParameter.VIEW_BODY = "javax.faces.ViewBody";
+JsfParameter.RESOURCE = "javax.faces.Resource";
//# sourceMappingURL=tobago-page.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-page.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-page.js.map
index abaff38..da08fd7 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-page.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-page.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-page.js","sourceRoot":"","sources":["../../ts/tobago-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,GAAG,EAAC,MAAM,cAAc,CAAC;AACjC,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAE3C,MAAM,OAAO,IAAK,SAAQ,WAAW;IAqBnC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAlBD;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,OAAoB;QAC9B,MAAM,QAAQ,GAAG,OAAO,CAAC, [...]
\ No newline at end of file
+{"version":3,"file":"tobago-page.js","sourceRoot":"","sources":["../../ts/tobago-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,MAAM,OAAO,IAAK,SAAQ,WAAW;IAqBnC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAlBD;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,OAAoB;QAC9B,MAAM,QAAQ,GAAG,OAAO,CAA [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-panel.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-panel.js
index adc5b81..29f1be5 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-panel.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-panel.js
@@ -16,7 +16,9 @@
*/
class Panel extends HTMLElement {
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-panel", Panel);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-panel") == null) {
+ window.customElements.define("tobago-panel", Panel);
+ }
});
//# sourceMappingURL=tobago-panel.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-panel.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-panel.js.map
index df10085..62b0e77 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-panel.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-panel.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-panel.js","sourceRoot":"","sources":["../../ts/tobago-panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,KAAM,SAAQ,WAAW;CAC9B;AAED,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,UAAU,KAAY;IAClE,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC"}
\ No newline at end of file
+{"version":3,"file":"tobago-panel.js","sourceRoot":"","sources":["../../ts/tobago-panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,KAAM,SAAQ,WAAW;CAC9B;AAED,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,UAAU,KAAY;IAC7D,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,IAAI,EAAE;QACrD,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;KACrD;AACH,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popover.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popover.js
index 156d741..180bc53 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popover.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popover.js
@@ -75,7 +75,9 @@ class Popover extends HTMLElement {
return root.querySelector(".tobago-page-menuStore");
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-popover", Popover);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-popover") == null) {
+ window.customElements.define("tobago-popover", Popover);
+ }
});
//# sourceMappingURL=tobago-popover.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popover.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popover.js.map
index e68fb97..8d68c8c 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popover.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popover.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-popover.js","sourceRoot":"","sources":["../../ts/tobago-popover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,OAAQ,SAAQ,WAAW;IAI/B;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACnE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,WAAW;QACT,IAAI,CAAC,SAAS,CAAC,WAA [...]
\ No newline at end of file
+{"version":3,"file":"tobago-popover.js","sourceRoot":"","sources":["../../ts/tobago-popover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,OAAQ,SAAQ,WAAW;IAI/B;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACnE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,WAAW;QACT,IAAI,CAAC,SAAS,CAAC,WAA [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popup.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popup.js
index 4ec127c..9adce26 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popup.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popup.js
@@ -497,8 +497,10 @@ export class Popup extends HTMLElement {
element.addEventListener(event, listenerWrapper);
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-popup", Popup);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-popup") == null) {
+ window.customElements.define("tobago-popup", Popup);
+ }
});
export class Collapse {
static findHidden(element) {
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popup.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popup.js.map
index 1ea49de..143cfc2 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popup.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-popup.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-popup.js","sourceRoot":"","sources":["../../ts/tobago-popup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAExC,MAAM,cAAc,GAAG,EAAE,CAAC,CAAC,iDAAiD;AAE5E,MAAM,OAAO,GAAG;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,MAAM,WAAW,GAAG;IAClB,QAAQ,EAAE,kBAAkB;IAC5B,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,MAAM,KAAK,GAAG;IACZ,IAAI,EAAE,eAAe [...]
\ No newline at end of file
+{"version":3,"file":"tobago-popup.js","sourceRoot":"","sources":["../../ts/tobago-popup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAExC,MAAM,cAAc,GAAG,EAAE,CAAC,CAAC,iDAAiD;AAE5E,MAAM,OAAO,GAAG;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,MAAM,WAAW,GAAG;IAClB,QAAQ,EAAE,kBAAkB;IAC5B,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,MAAM,KAAK,GAAG;IACZ,IAAI,EAAE,eAAe [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-range.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-range.js
index 4ae272f..883438c 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-range.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-range.js
@@ -57,7 +57,9 @@ class Range extends HTMLElement {
}, 5000);
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-range", Range);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-range") == null) {
+ window.customElements.define("tobago-range", Range);
+ }
});
//# sourceMappingURL=tobago-range.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-range.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-range.js.map
index c9f1090..c3f4db7 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-range.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-range.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-range.js","sourceRoot":"","sources":["../../ts/tobago-range.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,KAAM,SAAQ,WAAW;IAK7B;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACvB,IAAI,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1C,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC1C,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,KAAK;QACP,OAAO, [...]
\ No newline at end of file
+{"version":3,"file":"tobago-range.js","sourceRoot":"","sources":["../../ts/tobago-range.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,KAAM,SAAQ,WAAW;IAK7B;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACvB,IAAI,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1C,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC1C,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,KAAK;QACP,OAAO, [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-checkbox.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-checkbox.js
index 401d02c..9170e17 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-checkbox.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-checkbox.js
@@ -35,7 +35,9 @@ export class SelectBooleanCheckbox extends HTMLElement {
return rootNode.getElementById(this.id + DomUtils.SUB_COMPONENT_SEP + "field");
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-boolean-checkbox", SelectBooleanCheckbox);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-boolean-checkbox") == null) {
+ window.customElements.define("tobago-select-boolean-checkbox", SelectBooleanCheckbox);
+ }
});
//# sourceMappingURL=tobago-select-boolean-checkbox.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-checkbox.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-checkbox.js.map
index 3d264af..50f4fcc 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-checkbox.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-checkbox.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-select-boolean-checkbox.js","sourceRoot":"","sources":["../../ts/tobago-select-boolean-checkbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,OAAO,qBAAsB,SAAQ,WAAW;IAEpD;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;QAE3D,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACvB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC [...]
\ No newline at end of file
+{"version":3,"file":"tobago-select-boolean-checkbox.js","sourceRoot":"","sources":["../../ts/tobago-select-boolean-checkbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,OAAO,qBAAsB,SAAQ,WAAW;IAEpD;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;QAE3D,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACvB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-toggle.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-toggle.js
index e6b1f08..e978344 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-toggle.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-toggle.js
@@ -17,7 +17,9 @@
import { SelectBooleanCheckbox } from "./tobago-select-boolean-checkbox";
class SelectBooleanToggle extends SelectBooleanCheckbox {
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-boolean-toggle", SelectBooleanToggle);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-boolean-toggle") == null) {
+ window.customElements.define("tobago-select-boolean-toggle", SelectBooleanToggle);
+ }
});
//# sourceMappingURL=tobago-select-boolean-toggle.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-toggle.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-toggle.js.map
index d306306..65b8f17 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-toggle.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-boolean-toggle.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-select-boolean-toggle.js","sourceRoot":"","sources":["../../ts/tobago-select-boolean-toggle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AAEvE,MAAM,mBAAoB,SAAQ,qBAAqB;CACtD;AAED,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,UAAU,KAAY;IAClE,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,8BAA8B,EAAE,mBAAmB,CAAC,CAAC;AACpF,CAAC,CAAC,CAAC"}
\ No newline at end of file
+{"version":3,"file":"tobago-select-boolean-toggle.js","sourceRoot":"","sources":["../../ts/tobago-select-boolean-toggle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AAEvE,MAAM,mBAAoB,SAAQ,qBAAqB;CACtD;AAED,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,UAAU,KAAY;IAC7D,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,8BAA8B,CAAC,IAAI,IAAI,EAAE;QACrE,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,8BAA8B,EAAE,mBAAmB,CAAC,CAAC;KACnF;AACH,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-checkbox.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-checkbox.js
index 01b0ff0..1f21951 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-checkbox.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-checkbox.js
@@ -35,7 +35,9 @@ class SelectManyCheckbox extends HTMLElement {
return this.querySelectorAll("input[name='" + this.id + "']");
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-many-checkbox", SelectManyCheckbox);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-many-checkbox") == null) {
+ window.customElements.define("tobago-select-many-checkbox", SelectManyCheckbox);
+ }
});
//# sourceMappingURL=tobago-select-many-checkbox.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-checkbox.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-checkbox.js.map
index 98b81b7..a7b7c4d 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-checkbox.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-checkbox.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-select-many-checkbox.js","sourceRoot":"","sources":["../../ts/tobago-select-many-checkbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,kBAAmB,SAAQ,WAAW;IAE1C;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE;YAC/B,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;YAEtD,IAAI,KAAK,CAAC,QAAQ,EAAE;gBAClB,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;aAC/C;YAED, [...]
\ No newline at end of file
+{"version":3,"file":"tobago-select-many-checkbox.js","sourceRoot":"","sources":["../../ts/tobago-select-many-checkbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,kBAAmB,SAAQ,WAAW;IAE1C;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE;YAC/B,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;YAEtD,IAAI,KAAK,CAAC,QAAQ,EAAE;gBAClB,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;aAC/C;YAED, [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-listbox.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-listbox.js
index 5c32d87..5d0b682 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-listbox.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-listbox.js
@@ -17,7 +17,9 @@
import { SelectOneListbox } from "./tobago-select-one-listbox";
class SelectManyListbox extends SelectOneListbox {
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-many-listbox", SelectManyListbox);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-many-listbox") == null) {
+ window.customElements.define("tobago-select-many-listbox", SelectManyListbox);
+ }
});
//# sourceMappingURL=tobago-select-many-listbox.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-listbox.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-listbox.js.map
index 0afb8a3..367436d 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-listbox.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-listbox.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-select-many-listbox.js","sourceRoot":"","sources":["../../ts/tobago-select-many-listbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,6BAA6B,CAAC;AAE7D,MAAM,iBAAkB,SAAQ,gBAAgB;CAC/C;AAED,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,UAAU,KAAY;IAClE,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,4BAA4B,EAAE,iBAAiB,CAAC,CAAC;AAChF,CAAC,CAAC,CAAC"}
\ No newline at end of file
+{"version":3,"file":"tobago-select-many-listbox.js","sourceRoot":"","sources":["../../ts/tobago-select-many-listbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,6BAA6B,CAAC;AAE7D,MAAM,iBAAkB,SAAQ,gBAAgB;CAC/C;AAED,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,UAAU,KAAY;IAC7D,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,4BAA4B,CAAC,IAAI,IAAI,EAAE;QACnE,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,4BAA4B,EAAE,iBAAiB,CAAC,CAAC;KAC/E;AACH,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-shuttle.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-shuttle.js
index ddfd48b..c0dcce0 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-shuttle.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-shuttle.js
@@ -92,7 +92,9 @@ class SelectManyShuttle extends HTMLElement {
return this.querySelector(".tobago-selectManyShuttle-removeAll");
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-many-shuttle", SelectManyShuttle);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-many-shuttle") == null) {
+ window.customElements.define("tobago-select-many-shuttle", SelectManyShuttle);
+ }
});
//# sourceMappingURL=tobago-select-many-shuttle.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-shuttle.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-shuttle.js.map
index c382156..a968ad6 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-shuttle.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-many-shuttle.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-select-many-shuttle.js","sourceRoot":"","sources":["../../ts/tobago-select-many-shuttle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,iBAAkB,SAAQ,WAAW;IAEzC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;QACtE,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;QAEpE,IAAI,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,U [...]
\ No newline at end of file
+{"version":3,"file":"tobago-select-many-shuttle.js","sourceRoot":"","sources":["../../ts/tobago-select-many-shuttle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,iBAAkB,SAAQ,WAAW;IAEzC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;QACtE,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;QAEpE,IAAI,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,U [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-choice.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-choice.js
index ed08341..0f8ab25 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-choice.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-choice.js
@@ -28,7 +28,9 @@ class SelectOneChoice extends HTMLElement {
return rootNode.getElementById(this.id + DomUtils.SUB_COMPONENT_SEP + "field");
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-one-choice", SelectOneChoice);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-one-choice") == null) {
+ window.customElements.define("tobago-select-one-choice", SelectOneChoice);
+ }
});
//# sourceMappingURL=tobago-select-one-choice.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-choice.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-choice.js.map
index bd67afb..8d496f1 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-choice.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-choice.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-select-one-choice.js","sourceRoot":"","sources":["../../ts/tobago-select-one-choice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,eAAgB,SAAQ,WAAW;IACvC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,KAAK;QACP,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAA2B,CAAC;QAC7D,OAAO,QAAQ,CAAC,cAA [...]
\ No newline at end of file
+{"version":3,"file":"tobago-select-one-choice.js","sourceRoot":"","sources":["../../ts/tobago-select-one-choice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,eAAgB,SAAQ,WAAW;IACvC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,KAAK;QACP,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAA2B,CAAC;QAC7D,OAAO,QAAQ,CAAC,cAA [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-listbox.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-listbox.js
index 26229e4..fdabf89 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-listbox.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-listbox.js
@@ -28,7 +28,9 @@ export class SelectOneListbox extends HTMLElement {
return rootNode.getElementById(this.id + DomUtils.SUB_COMPONENT_SEP + "field");
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-one-listbox", SelectOneListbox);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-one-listbox") == null) {
+ window.customElements.define("tobago-select-one-listbox", SelectOneListbox);
+ }
});
//# sourceMappingURL=tobago-select-one-listbox.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-listbox.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-listbox.js.map
index fa9ec8b..572af18 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-listbox.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-listbox.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-select-one-listbox.js","sourceRoot":"","sources":["../../ts/tobago-select-one-listbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,KAAK;QACP,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAA2B,CAAC;QAC7D,OAAO,QAAQ, [...]
\ No newline at end of file
+{"version":3,"file":"tobago-select-one-listbox.js","sourceRoot":"","sources":["../../ts/tobago-select-one-listbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,KAAK;QACP,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAA2B,CAAC;QAC7D,OAAO,QAAQ, [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-radio.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-radio.js
index 50977e4..a0f2d66 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-radio.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-radio.js
@@ -54,7 +54,9 @@ class SelectOneRadio extends HTMLElement {
return this.querySelectorAll("input[type='radio'][name='" + this.id + "']");
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-one-radio", SelectOneRadio);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-one-radio") == null) {
+ window.customElements.define("tobago-select-one-radio", SelectOneRadio);
+ }
});
//# sourceMappingURL=tobago-select-one-radio.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-radio.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-radio.js.map
index dc553d6..66d7736 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-radio.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-select-one-radio.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-select-one-radio.js","sourceRoot":"","sources":["../../ts/tobago-select-one-radio.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,cAAe,SAAQ,WAAW;IAItC;QACE,KAAK,EAAE,CAAC;QAHF,iBAAY,GAAW,EAAE,CAAC;IAIlC,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,UAAU,EAAE;YACnC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;YACtD,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC, [...]
\ No newline at end of file
+{"version":3,"file":"tobago-select-one-radio.js","sourceRoot":"","sources":["../../ts/tobago-select-one-radio.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,cAAe,SAAQ,WAAW;IAItC;QACE,KAAK,EAAE,CAAC;QAHF,iBAAY,GAAW,EAAE,CAAC;IAIlC,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,UAAU,EAAE;YACnC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;YACtD,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC, [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-sheet.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-sheet.js
index 74315ea..022a369 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-sheet.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-sheet.js
@@ -708,7 +708,9 @@ export class Sheet extends HTMLElement {
}
}
Sheet.SCROLL_BAR_SIZE = Sheet.getScrollBarSize();
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-sheet", Sheet);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-sheet") == null) {
+ window.customElements.define("tobago-sheet", Sheet);
+ }
});
//# sourceMappingURL=tobago-sheet.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-sheet.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-sheet.js.map
index f75398b..38aaf0c 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-sheet.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-sheet.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-sheet.js","sourceRoot":"","sources":["../../ts/tobago-sheet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AAEnC,MAAM,OAAO,KAAM,SAAQ,WAAW;IAsCpC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IA/BO,MAAM,CAAC,gBAAgB;QAC7B,MAAM,IAAI,GAAG,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE3D,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC5C,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG,QAA [...]
\ No newline at end of file
+{"version":3,"file":"tobago-sheet.js","sourceRoot":"","sources":["../../ts/tobago-sheet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AAEnC,MAAM,OAAO,KAAM,SAAQ,WAAW;IAsCpC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IA/BO,MAAM,CAAC,gBAAgB;QAC7B,MAAM,IAAI,GAAG,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE3D,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC5C,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG,QAA [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-split-layout.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-split-layout.js
index 38f729f..8fb882a 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-split-layout.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-split-layout.js
@@ -127,7 +127,9 @@ class SplitLayoutMousedown {
return this.splitter ? DomUtils.previousElementSibling(this.splitter) : null;
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-split-layout", SplitLayout);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-split-layout") == null) {
+ window.customElements.define("tobago-split-layout", SplitLayout);
+ }
});
//# sourceMappingURL=tobago-split-layout.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-split-layout.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-split-layout.js.map
index 5c2b894..477ebdc 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-split-layout.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-split-layout.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-split-layout.js","sourceRoot":"","sources":["../../ts/tobago-split-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AAEnC,MAAM,WAAY,SAAQ,WAAW;IAInC;QACE,KAAK,EAAE,CAAC;QAER,IAAI,KAAK,GAAG,IAAI,CAAC;QACjB,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,KAAK,IAAI,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC/B,IAAI,SAAS,EAAE,EAAE,iEAAiE;gBAChF,SAAS,GAAG,KAAK,CAAC;gBAClB,SAAS;aACV;YACD,IAAI,gBAAgB,CA [...]
\ No newline at end of file
+{"version":3,"file":"tobago-split-layout.js","sourceRoot":"","sources":["../../ts/tobago-split-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AAEnC,MAAM,WAAY,SAAQ,WAAW;IAInC;QACE,KAAK,EAAE,CAAC;QAER,IAAI,KAAK,GAAG,IAAI,CAAC;QACjB,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,KAAK,IAAI,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC/B,IAAI,SAAS,EAAE,EAAE,iEAAiE;gBAChF,SAAS,GAAG,KAAK,CAAC;gBAClB,SAAS;aACV;YACD,IAAI,gBAAgB,CA [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-suggest.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-suggest.js
index ea6c662..49ef02d 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-suggest.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-suggest.js
@@ -61,7 +61,9 @@ export class Suggest extends HTMLElement {
console.log(this.autocomplete);
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-suggest", Suggest);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-suggest") == null) {
+ window.customElements.define("tobago-suggest", Suggest);
+ }
});
//# sourceMappingURL=tobago-suggest.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-suggest.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-suggest.js.map
index 31c31a5..d1a645f 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-suggest.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-suggest.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-suggest.js","sourceRoot":"","sources":["../../ts/tobago-suggest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,YAAY,MAAM,6CAA6C,CAAC;AAEvE,MAAM,OAAO,OAAQ,SAAQ,WAAW;IA6BtC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IA3BD,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,aAAa,CAAC,6BAA6B,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,YAAY;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAA2B,CAAC;QACzD,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAqB,CAAC;IAC3D,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,YAAY,CAAC, [...]
\ No newline at end of file
+{"version":3,"file":"tobago-suggest.js","sourceRoot":"","sources":["../../ts/tobago-suggest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,YAAY,MAAM,6CAA6C,CAAC;AAEvE,MAAM,OAAO,OAAQ,SAAQ,WAAW;IA6BtC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IA3BD,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,aAAa,CAAC,6BAA6B,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,YAAY;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAA2B,CAAC;QACzD,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAqB,CAAC;IAC3D,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,YAAY,CAAC, [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-textarea.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-textarea.js
index 889f0b6..9e709cf 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-textarea.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-textarea.js
@@ -27,7 +27,9 @@ class Textarea extends HTMLElement {
return this.querySelector(DomUtils.escapeClientId(this.id + DomUtils.SUB_COMPONENT_SEP + "field"));
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-textarea", Textarea);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-textarea") == null) {
+ window.customElements.define("tobago-textarea", Textarea);
+ }
});
//# sourceMappingURL=tobago-textarea.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-textarea.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-textarea.js.map
index f1b8187..9007c33 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-textarea.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-textarea.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-textarea.js","sourceRoot":"","sources":["../../ts/tobago-textarea.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,QAAS,SAAQ,WAAW;IAChC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,iBAAiB,GA [...]
\ No newline at end of file
+{"version":3,"file":"tobago-textarea.js","sourceRoot":"","sources":["../../ts/tobago-textarea.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,MAAM,QAAS,SAAQ,WAAW;IAChC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,iBAAiB,GA [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-listbox.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-listbox.js
index f8d644b..593a963 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-listbox.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-listbox.js
@@ -116,7 +116,9 @@ class TreeListbox extends HTMLElement {
return this.querySelector(DomUtils.escapeClientId(this.id + DomUtils.SUB_COMPONENT_SEP + "selected"));
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-tree-listbox", TreeListbox);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-tree-listbox") == null) {
+ window.customElements.define("tobago-tree-listbox", TreeListbox);
+ }
});
//# sourceMappingURL=tobago-tree-listbox.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-listbox.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-listbox.js.map
index 7538528..cba6816 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-listbox.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-listbox.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-tree-listbox.js","sourceRoot":"","sources":["../../ts/tobago-tree-listbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAExC,MAAM,WAAY,SAAQ,WAAW;IAEnC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,aAAa,EAAE,CAAC;QAErB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE;YACpC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;gBACrB,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;aAC5D;SACF;IACH,CAAC; [...]
\ No newline at end of file
+{"version":3,"file":"tobago-tree-listbox.js","sourceRoot":"","sources":["../../ts/tobago-tree-listbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAExC,MAAM,WAAY,SAAQ,WAAW;IAEnC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,aAAa,EAAE,CAAC;QAErB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE;YACpC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;gBACrB,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;aAC5D;SACF;IACH,CAAC; [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-node.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-node.js
index ddcd067..af594f1 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-node.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-node.js
@@ -161,7 +161,9 @@ export class TreeNode extends HTMLElement {
return Number(this.getAttribute("index"));
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-tree-node", TreeNode);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-tree-node") == null) {
+ window.customElements.define("tobago-tree-node", TreeNode);
+ }
});
//# sourceMappingURL=tobago-tree-node.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-node.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-node.js.map
index 61054ab..90451cb 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-node.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-node.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-tree-node.js","sourceRoot":"","sources":["../../ts/tobago-tree-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,MAAM,OAAO,QAAS,SAAQ,WAAW;IAEvC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE;YAC5C,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAChG;IACH,CAAC;IAEO,UAAU,CAAC,KAAiB;QAClC,IAAI,IAAI,CAAC,QAAQ, [...]
\ No newline at end of file
+{"version":3,"file":"tobago-tree-node.js","sourceRoot":"","sources":["../../ts/tobago-tree-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,MAAM,OAAO,QAAS,SAAQ,WAAW;IAEvC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE;YAC5C,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAChG;IACH,CAAC;IAEO,UAAU,CAAC,KAAiB;QAClC,IAAI,IAAI,CAAC,QAAQ, [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-select.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-select.js
index 18e6aaf..ab5dd57 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-select.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-select.js
@@ -78,7 +78,9 @@ export class TreeSelect extends HTMLElement {
return this.querySelector("input");
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-tree-select", TreeSelect);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-tree-select") == null) {
+ window.customElements.define("tobago-tree-select", TreeSelect);
+ }
});
//# sourceMappingURL=tobago-tree-select.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-select.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-select.js.map
index 2052d2e..561f0da 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-select.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree-select.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-tree-select.js","sourceRoot":"","sources":["../../ts/tobago-tree-select.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAI/C,MAAM,OAAO,UAAW,SAAQ,WAAW;IAEzC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,MAAM,CAAC,KAAY;QACjB,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;YACvB,KAAK,OAAO;gBACV,IAAI,CAAC,IAAI,CAAC,kBAAkB,E [...]
\ No newline at end of file
+{"version":3,"file":"tobago-tree-select.js","sourceRoot":"","sources":["../../ts/tobago-tree-select.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAI/C,MAAM,OAAO,UAAW,SAAQ,WAAW;IAEzC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,MAAM,CAAC,KAAY;QACjB,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;YACvB,KAAK,OAAO;gBACV,IAAI,CAAC,IAAI,CAAC,kBAAkB,E [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree.js
index ad768ae..d05959e 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree.js
@@ -72,7 +72,9 @@ export class Tree extends HTMLElement {
return Selectable[this.getAttribute("selectable")];
}
}
-document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-tree", Tree);
+document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-tree") == null) {
+ window.customElements.define("tobago-tree", Tree);
+ }
});
//# sourceMappingURL=tobago-tree.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree.js.map
index 635b177..dee2c68 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago-tree.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago-tree.js","sourceRoot":"","sources":["../../ts/tobago-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAG/C,MAAM,OAAO,IAAK,SAAQ,WAAW;IAEnC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;IACjB,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,mBAAmB,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,WAAW;IACpD,CAAC;IAED,eAAe,CAAC,YAAoB;QAClC,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC1E,aAAa,CAAC,GAAG,C [...]
\ No newline at end of file
+{"version":3,"file":"tobago-tree.js","sourceRoot":"","sources":["../../ts/tobago-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAG/C,MAAM,OAAO,IAAK,SAAQ,WAAW;IAEnC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;IACjB,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,mBAAmB,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,WAAW;IACpD,CAAC;IAED,eAAe,CAAC,YAAoB;QAClC,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC1E,aAAa,CAAC,GAAG,C [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js
index bf263ea..9f12f8a 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js
@@ -357,8 +357,10 @@
return this.querySelector(".navbar-collapse");
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-bar", Bar);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-bar") == null) {
+ window.customElements.define("tobago-bar", Bar);
+ }
});
/**!
@@ -3259,8 +3261,10 @@
this.active = false;
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-dropdown", Dropdown);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-dropdown") == null) {
+ window.customElements.define("tobago-dropdown", Dropdown);
+ }
});
function hasProperty(obj, prop) {
@@ -5733,58 +5737,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
- class ReloadManager {
- constructor() {
- this.timeouts = new Map();
- }
- schedule(id, reloadMillis) {
- if (reloadMillis > 0) {
- // may remove old schedule
- let oldTimeout = this.timeouts.get(id);
- if (oldTimeout) {
- console.debug("clear reload timeout '" + oldTimeout + "' for #'" + id + "'");
- window.clearTimeout(oldTimeout);
- this.timeouts.delete(id);
- }
- // add new schedule
- let timeout = window.setTimeout(function () {
- console.debug("reloading #'" + id + "'");
- jsf.ajax.request(id, null, {
- "javax.faces.behavior.event": "reload",
- execute: id,
- render: id
- });
- }, reloadMillis);
- console.debug("adding reload timeout '" + timeout + "' for #'" + id + "'");
- this.timeouts.set(id, timeout);
- }
- }
- }
- ReloadManager.instance = new ReloadManager();
- ReloadManager.init = function (element) {
- for (const reload of DomUtils.selfOrQuerySelectorAll(element, "[data-tobago-reload]")) {
- ReloadManager.instance.schedule(reload.id, Number(reload.dataset.tobagoReload));
- }
- };
- Listener.register(ReloadManager.init, Phase.DOCUMENT_READY);
- Listener.register(ReloadManager.init, Phase.AFTER_UPDATE);
-
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
class Config {
static set(key, value) {
this.map.set(key, value);
@@ -5904,101 +5856,6 @@
Config.set("Ajax.waitOverlayDelay", 1000);
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- var JsfParameter;
- (function (JsfParameter) {
- JsfParameter["VIEW_STATE"] = "javax.faces.ViewState";
- JsfParameter["CLIENT_WINDOW"] = "javax.faces.ClientWindow";
- JsfParameter["VIEW_ROOT"] = "javax.faces.ViewRoot";
- JsfParameter["VIEW_HEAD"] = "javax.faces.ViewHead";
- JsfParameter["VIEW_BODY"] = "javax.faces.ViewBody";
- JsfParameter["RESOURCE"] = "javax.faces.Resource";
- })(JsfParameter || (JsfParameter = {}));
- class Jsf {
- }
- Jsf.isId = function (id) {
- switch (id) {
- case JsfParameter.VIEW_STATE:
- case JsfParameter.CLIENT_WINDOW:
- case JsfParameter.VIEW_ROOT:
- case JsfParameter.VIEW_HEAD:
- case JsfParameter.VIEW_BODY:
- case JsfParameter.RESOURCE:
- return false;
- default:
- return true;
- }
- };
- Jsf.isBody = function (id) {
- switch (id) {
- case JsfParameter.VIEW_ROOT:
- case JsfParameter.VIEW_BODY:
- return true;
- default:
- return false;
- }
- };
- Jsf.registerAjaxListener = function () {
- jsf.ajax.addOnEvent(function (event) {
- console.timeEnd("[tobago-jsf] jsf-ajax");
- console.time("[tobago-jsf] jsf-ajax");
- console.debug("[tobago-jsf] JSF event status: '%s'", event.status);
- if (event.status === "success") {
- event.responseXML.querySelectorAll("update").forEach(function (update) {
- const result = /<!\[CDATA\[(.*)]]>/gm.exec(update.innerHTML);
- const id = update.id;
- if (result !== null && result.length === 2 && result[1].startsWith("{\"reload\"")) {
- // not modified on server, needs be reloaded after some time
- console.debug("[tobago-jsf] Found reload-JSON in response!");
- ReloadManager.instance.schedule(id, JSON.parse(result[1]).reload.frequency);
- }
- else {
- console.info("[tobago-jsf] Update after jsf.ajax success: %s", id);
- if (Jsf.isId(id)) {
- console.debug("[tobago-jsf] updating #%s", id);
- let element = document.getElementById(id);
- if (element) {
- Listener.executeAfterUpdate(element);
- }
- else {
- console.warn("[tobago-jsf] element not found for #%s", id);
- }
- }
- else if (Jsf.isBody(id)) {
- console.debug("[tobago-jsf] updating body");
- // there should be only one element with this tag name
- Listener.executeAfterUpdate(document.querySelector("tobago-page"));
- }
- }
- });
- }
- else if (event.status === "complete") {
- event.responseXML.querySelectorAll("update").forEach(function (update) {
- const id = update.id;
- if (Jsf.isId(id)) {
- console.debug("[tobago-jsf] Update after jsf.ajax complete: #" + id);
- Overlay.destroy(id);
- }
- });
- }
- });
- };
-
- /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -6483,8 +6340,10 @@
element.addEventListener(event, listenerWrapper);
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-popup", Popup);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-popup") == null) {
+ window.customElements.define("tobago-popup", Popup);
+ }
});
class Collapse {
static findHidden(element) {
@@ -6682,8 +6541,10 @@
}
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-behavior", Behavior);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-behavior") == null) {
+ window.customElements.define("tobago-behavior", Behavior);
+ }
});
class CommandHelper {
}
@@ -6841,6 +6702,58 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+ class ReloadManager {
+ constructor() {
+ this.timeouts = new Map();
+ }
+ schedule(id, reloadMillis) {
+ if (reloadMillis > 0) {
+ // may remove old schedule
+ let oldTimeout = this.timeouts.get(id);
+ if (oldTimeout) {
+ console.debug("clear reload timeout '" + oldTimeout + "' for #'" + id + "'");
+ window.clearTimeout(oldTimeout);
+ this.timeouts.delete(id);
+ }
+ // add new schedule
+ let timeout = window.setTimeout(function () {
+ console.debug("reloading #'" + id + "'");
+ jsf.ajax.request(id, null, {
+ "javax.faces.behavior.event": "reload",
+ execute: id,
+ render: id
+ });
+ }, reloadMillis);
+ console.debug("adding reload timeout '" + timeout + "' for #'" + id + "'");
+ this.timeouts.set(id, timeout);
+ }
+ }
+ }
+ ReloadManager.instance = new ReloadManager();
+ ReloadManager.init = function (element) {
+ for (const reload of DomUtils.selfOrQuerySelectorAll(element, "[data-tobago-reload]")) {
+ ReloadManager.instance.schedule(reload.id, Number(reload.dataset.tobagoReload));
+ }
+ };
+ Listener.register(ReloadManager.init, Phase.DOCUMENT_READY);
+ Listener.register(ReloadManager.init, Phase.AFTER_UPDATE);
+
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
class Page extends HTMLElement {
constructor() {
super();
@@ -6861,10 +6774,10 @@
return null;
}
connectedCallback() {
- Jsf.registerAjaxListener();
+ this.registerAjaxListener();
this.querySelector("form").addEventListener("submit", CommandHelper.onSubmit);
window.addEventListener("unload", this.onUnload.bind(this));
- this.addEventListener("keypress", function (event) {
+ this.addEventListener("keypress", (event) => {
let code = event.which; // XXX deprecated
if (code === 0) {
code = event.keyCode;
@@ -6916,6 +6829,56 @@
Listener.executeBeforeExit();
}
}
+ registerAjaxListener() {
+ jsf.ajax.addOnEvent(this.jsfResponse.bind(this));
+ }
+ jsfResponse(event) {
+ console.timeEnd("[tobago-jsf] jsf-ajax");
+ console.time("[tobago-jsf] jsf-ajax");
+ console.debug("[tobago-jsf] JSF event status: '%s'", event.status);
+ if (event.status === "success") {
+ event.responseXML.querySelectorAll("update").forEach(this.jsfResponseSuccess.bind(this));
+ }
+ else if (event.status === "complete") {
+ event.responseXML.querySelectorAll("update").forEach(this.jsfResponseComplete.bind(this));
+ }
+ }
+ jsfResponseSuccess(update) {
+ const result = /<!\[CDATA\[(.*)]]>/gm.exec(update.innerHTML);
+ const id = update.id;
+ if (result !== null && result.length === 2 && result[1].startsWith("{\"reload\"")) {
+ // not modified on server, needs be reloaded after some time
+ console.debug("[tobago-jsf] Found reload-JSON in response!");
+ ReloadManager.instance.schedule(id, JSON.parse(result[1]).reload.frequency);
+ }
+ else {
+ console.info("[tobago-jsf] Update after jsf.ajax success: %s", id);
+ if (JsfParameter.isJsfId(id)) {
+ console.debug("[tobago-jsf] updating #%s", id);
+ const rootNode = this.getRootNode();
+ let element = rootNode.getElementById(id);
+ if (element) {
+ Listener.executeAfterUpdate(element);
+ }
+ else {
+ console.warn("[tobago-jsf] element not found for #%s", id);
+ }
+ }
+ else if (JsfParameter.isJsfBody(id)) {
+ console.debug("[tobago-jsf] updating body");
+ // there should be only one element with this tag name
+ const rootNode = this.getRootNode();
+ Listener.executeAfterUpdate(rootNode.querySelector("tobago-page"));
+ }
+ }
+ }
+ jsfResponseComplete(update) {
+ const id = update.id;
+ if (JsfParameter.isJsfId(id)) {
+ console.debug("[tobago-jsf] Update after jsf.ajax complete: #" + id);
+ Overlay.destroy(id);
+ }
+ }
get locale() {
let locale = this.getAttribute("locale");
if (!locale) {
@@ -6924,11 +6887,43 @@
return locale;
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-page", Page);
+ document.addEventListener("tobago.init", (event) => {
+ if (window.customElements.get("tobago-page") == null) {
+ window.customElements.define("tobago-page", Page);
+ }
});
// todo remove this
window.addEventListener("load", Listener.executeWindowLoad);
+ class JsfParameter {
+ static isJsfId(id) {
+ switch (id) {
+ case JsfParameter.VIEW_STATE:
+ case JsfParameter.CLIENT_WINDOW:
+ case JsfParameter.VIEW_ROOT:
+ case JsfParameter.VIEW_HEAD:
+ case JsfParameter.VIEW_BODY:
+ case JsfParameter.RESOURCE:
+ return false;
+ default:
+ return true;
+ }
+ }
+ static isJsfBody(id) {
+ switch (id) {
+ case JsfParameter.VIEW_ROOT:
+ case JsfParameter.VIEW_BODY:
+ return true;
+ default:
+ return false;
+ }
+ }
+ }
+ JsfParameter.VIEW_STATE = "javax.faces.ViewState";
+ JsfParameter.CLIENT_WINDOW = "javax.faces.ClientWindow";
+ JsfParameter.VIEW_ROOT = "javax.faces.ViewRoot";
+ JsfParameter.VIEW_HEAD = "javax.faces.ViewHead";
+ JsfParameter.VIEW_BODY = "javax.faces.ViewBody";
+ JsfParameter.RESOURCE = "javax.faces.Resource";
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -7010,8 +7005,10 @@
return this.querySelector(".input");
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-date", DatePicker);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-date") == null) {
+ window.customElements.define("tobago-date", DatePicker);
+ }
});
/*
@@ -7072,8 +7069,10 @@
}
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-file", File);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-file") == null) {
+ window.customElements.define("tobago-file", File);
+ }
});
/*
@@ -7195,8 +7194,10 @@
}
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-focus", Focus);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-focus") == null) {
+ window.customElements.define("tobago-focus", Focus);
+ }
});
/*
@@ -7251,8 +7252,10 @@
return this.classList.contains("fixed-bottom");
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-footer", Footer);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-footer") == null) {
+ window.customElements.define("tobago-footer", Footer);
+ }
});
/*
@@ -7282,8 +7285,10 @@
return this.querySelector(DomUtils.escapeClientId(this.id + DomUtils.SUB_COMPONENT_SEP + "field"));
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-in", In);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-in") == null) {
+ window.customElements.define("tobago-in", In);
+ }
});
// XXX regexp example only - blueprint
class RegExpTest {
@@ -7343,8 +7348,10 @@
return this.querySelectorAll(".alert button.btn-close");
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-messages", Messages);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-messages") == null) {
+ window.customElements.define("tobago-messages", Messages);
+ }
});
/*
@@ -7365,8 +7372,10 @@
*/
class Panel extends HTMLElement {
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-panel", Panel);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-panel") == null) {
+ window.customElements.define("tobago-panel", Panel);
+ }
});
/* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -7505,8 +7514,10 @@
return root.querySelector(".tobago-page-menuStore");
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-popover", Popover);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-popover") == null) {
+ window.customElements.define("tobago-popover", Popover);
+ }
});
/*
@@ -7567,8 +7578,10 @@
}, 5000);
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-range", Range);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-range") == null) {
+ window.customElements.define("tobago-range", Range);
+ }
});
/*
@@ -7648,8 +7661,10 @@
return rootNode.getElementById(this.id + DomUtils.SUB_COMPONENT_SEP + "field");
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-boolean-checkbox", SelectBooleanCheckbox);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-boolean-checkbox") == null) {
+ window.customElements.define("tobago-select-boolean-checkbox", SelectBooleanCheckbox);
+ }
});
/*
@@ -7670,8 +7685,10 @@
*/
class SelectBooleanToggle extends SelectBooleanCheckbox {
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-boolean-toggle", SelectBooleanToggle);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-boolean-toggle") == null) {
+ window.customElements.define("tobago-select-boolean-toggle", SelectBooleanToggle);
+ }
});
/*
@@ -7710,8 +7727,10 @@
return this.querySelectorAll("input[name='" + this.id + "']");
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-many-checkbox", SelectManyCheckbox);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-many-checkbox") == null) {
+ window.customElements.define("tobago-select-many-checkbox", SelectManyCheckbox);
+ }
});
/*
@@ -7742,8 +7761,10 @@
return rootNode.getElementById(this.id + DomUtils.SUB_COMPONENT_SEP + "field");
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-one-listbox", SelectOneListbox);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-one-listbox") == null) {
+ window.customElements.define("tobago-select-one-listbox", SelectOneListbox);
+ }
});
/*
@@ -7764,8 +7785,10 @@
*/
class SelectManyListbox extends SelectOneListbox {
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-many-listbox", SelectManyListbox);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-many-listbox") == null) {
+ window.customElements.define("tobago-select-many-listbox", SelectManyListbox);
+ }
});
/*
@@ -7861,8 +7884,10 @@
return this.querySelector(".tobago-selectManyShuttle-removeAll");
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-many-shuttle", SelectManyShuttle);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-many-shuttle") == null) {
+ window.customElements.define("tobago-select-many-shuttle", SelectManyShuttle);
+ }
});
/*
@@ -7893,8 +7918,10 @@
return rootNode.getElementById(this.id + DomUtils.SUB_COMPONENT_SEP + "field");
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-one-choice", SelectOneChoice);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-one-choice") == null) {
+ window.customElements.define("tobago-select-one-choice", SelectOneChoice);
+ }
});
/*
@@ -7952,8 +7979,10 @@
return this.querySelectorAll("input[type='radio'][name='" + this.id + "']");
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-select-one-radio", SelectOneRadio);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-select-one-radio") == null) {
+ window.customElements.define("tobago-select-one-radio", SelectOneRadio);
+ }
});
/*
@@ -8662,8 +8691,10 @@
}
}
Sheet.SCROLL_BAR_SIZE = Sheet.getScrollBarSize();
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-sheet", Sheet);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-sheet") == null) {
+ window.customElements.define("tobago-sheet", Sheet);
+ }
});
/*
@@ -8793,8 +8824,10 @@
return this.splitter ? DomUtils.previousElementSibling(this.splitter) : null;
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-split-layout", SplitLayout);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-split-layout") == null) {
+ window.customElements.define("tobago-split-layout", SplitLayout);
+ }
});
/*
@@ -9464,8 +9497,10 @@
console.log(this.autocomplete);
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-suggest", Suggest);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-suggest") == null) {
+ window.customElements.define("tobago-suggest", Suggest);
+ }
});
/*
@@ -9599,8 +9634,10 @@
return this.querySelector(DomUtils.escapeClientId(this.id + DomUtils.SUB_COMPONENT_SEP + "field"));
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-textarea", Textarea);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-textarea") == null) {
+ window.customElements.define("tobago-textarea", Textarea);
+ }
});
/*
@@ -9705,8 +9742,10 @@
return Selectable[this.getAttribute("selectable")];
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-tree", Tree);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-tree") == null) {
+ window.customElements.define("tobago-tree", Tree);
+ }
});
/*
@@ -9826,8 +9865,10 @@
return this.querySelector(DomUtils.escapeClientId(this.id + DomUtils.SUB_COMPONENT_SEP + "selected"));
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-tree-listbox", TreeListbox);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-tree-listbox") == null) {
+ window.customElements.define("tobago-tree-listbox", TreeListbox);
+ }
});
/*
@@ -9993,8 +10034,10 @@
return Number(this.getAttribute("index"));
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-tree-node", TreeNode);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-tree-node") == null) {
+ window.customElements.define("tobago-tree-node", TreeNode);
+ }
});
/*
@@ -10076,9 +10119,36 @@
return this.querySelector("input");
}
}
- document.addEventListener("DOMContentLoaded", function (event) {
- window.customElements.define("tobago-tree-select", TreeSelect);
+ document.addEventListener("tobago.init", function (event) {
+ if (window.customElements.get("tobago-tree-select") == null) {
+ window.customElements.define("tobago-tree-select", TreeSelect);
+ }
});
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ if (document.readyState === "loading") {
+ document.addEventListener("DOMContentLoaded", (event) => {
+ document.dispatchEvent(new CustomEvent("tobago.init"));
+ });
+ }
+ else {
+ document.dispatchEvent(new CustomEvent("tobago.init"));
+ }
+
})));
//# sourceMappingURL=tobago.js.map
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js.map
index ed34b90..b6691a6 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago.js","sources":["tobago-listener.js","tobago-utils.js","tobago-bar.js","../../node_modules/popper.js/dist/esm/popper.js","tobago-dropdown.js","../../node_modules/vanillajs-datepicker/js/lib/utils.js","../../node_modules/vanillajs-datepicker/js/lib/date.js","../../node_modules/vanillajs-datepicker/js/lib/date-format.js","../../node_modules/vanillajs-datepicker/js/lib/event.js","../../node_modules/vanillajs-datepicker/js/i18n/base-locales.js","../../node_modules/ [...]
\ No newline at end of file
+{"version":3,"file":"tobago.js","sources":["tobago-listener.js","tobago-utils.js","tobago-bar.js","../../node_modules/popper.js/dist/esm/popper.js","tobago-dropdown.js","../../node_modules/vanillajs-datepicker/js/lib/utils.js","../../node_modules/vanillajs-datepicker/js/lib/date.js","../../node_modules/vanillajs-datepicker/js/lib/date-format.js","../../node_modules/vanillajs-datepicker/js/lib/event.js","../../node_modules/vanillajs-datepicker/js/i18n/base-locales.js","../../node_modules/ [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-all.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-all.ts
index 4d2db9a..00bd808 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-all.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-all.ts
@@ -25,7 +25,6 @@ import "./tobago-file";
import "./tobago-focus";
import "./tobago-footer";
import "./tobago-in";
-import "./tobago-jsf";
import "./tobago-messages";
import "./tobago-overlay";
import "./tobago-panel";
@@ -54,3 +53,12 @@ import "./tobago-tree-listbox";
import "./tobago-tree-node";
import "./tobago-tree-select";
import "./tobago-utils";
+
+if (document.readyState === "loading") {
+ document.addEventListener("DOMContentLoaded",
+ (event) => {
+ document.dispatchEvent(new CustomEvent("tobago.init"));
+ });
+} else {
+ document.dispatchEvent(new CustomEvent("tobago.init"));
+}
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-bar.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-bar.ts
index e2518a3..8f49d43 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-bar.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-bar.ts
@@ -79,6 +79,8 @@ class Bar extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-bar", Bar);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-bar") == null) {
+ window.customElements.define("tobago-bar", Bar);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-command.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-command.ts
index 3f9b8cb..9758933 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-command.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-command.ts
@@ -208,8 +208,10 @@ class Behavior extends HTMLElement {
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-behavior", Behavior);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-behavior") == null) {
+ window.customElements.define("tobago-behavior", Behavior);
+ }
});
export class CommandHelper {
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-date.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-date.ts
index 5e23c81..7ff7d27 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-date.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-date.ts
@@ -92,6 +92,8 @@ class DatePicker extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-date", DatePicker);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-date") == null) {
+ window.customElements.define("tobago-date", DatePicker);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-dropdown.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-dropdown.ts
index 27e188b..66fe019 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-dropdown.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-dropdown.ts
@@ -326,6 +326,8 @@ class DropdownEntry {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-dropdown", Dropdown);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-dropdown") == null) {
+ window.customElements.define("tobago-dropdown", Dropdown);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-file.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-file.ts
index 25dbc79..3e59295 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-file.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-file.ts
@@ -63,6 +63,8 @@ export class File extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-file", File);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-file") == null) {
+ window.customElements.define("tobago-file", File);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-focus.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-focus.ts
index bb841dc..91d812e 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-focus.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-focus.ts
@@ -136,6 +136,8 @@ export class Focus extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-focus", Focus);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-focus") == null) {
+ window.customElements.define("tobago-focus", Focus);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-footer.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-footer.ts
index b974dc0..87841eb 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-footer.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-footer.ts
@@ -66,6 +66,8 @@ class Footer extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-footer", Footer);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-footer") == null) {
+ window.customElements.define("tobago-footer", Footer);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-in.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-in.ts
index 02c421d..b04654a 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-in.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-in.ts
@@ -33,8 +33,10 @@ export class In extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-in", In);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-in") == null) {
+ window.customElements.define("tobago-in", In);
+ }
});
// XXX regexp example only - blueprint
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-jsf.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-jsf.ts
deleted file mode 100644
index 12a55c6..0000000
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-jsf.ts
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-import {Listener} from "./tobago-listener";
-import {ReloadManager} from "./tobago-reload";
-import {Overlay} from "./tobago-overlay";
-
-enum JsfParameter {
- VIEW_STATE = "javax.faces.ViewState",
- CLIENT_WINDOW = "javax.faces.ClientWindow",
- VIEW_ROOT = "javax.faces.ViewRoot",
- VIEW_HEAD = "javax.faces.ViewHead",
- VIEW_BODY = "javax.faces.ViewBody",
- RESOURCE = "javax.faces.Resource"
-}
-
-export class Jsf {
-
- private static isId = function (id: string): boolean {
- switch (id) {
- case JsfParameter.VIEW_STATE:
- case JsfParameter.CLIENT_WINDOW:
- case JsfParameter.VIEW_ROOT:
- case JsfParameter.VIEW_HEAD:
- case JsfParameter.VIEW_BODY:
- case JsfParameter.RESOURCE:
- return false;
- default:
- return true;
- }
- };
-
- private static isBody = function (id): boolean {
- switch (id) {
- case JsfParameter.VIEW_ROOT:
- case JsfParameter.VIEW_BODY:
- return true;
- default:
- return false;
- }
- };
-
- static registerAjaxListener = function (): void {
- jsf.ajax.addOnEvent(function (event): void {
- console.timeEnd("[tobago-jsf] jsf-ajax");
- console.time("[tobago-jsf] jsf-ajax");
- console.debug("[tobago-jsf] JSF event status: '%s'", event.status);
- if (event.status === "success") {
- event.responseXML.querySelectorAll("update").forEach(function (update: Element): void {
- const result = /<!\[CDATA\[(.*)]]>/gm.exec(update.innerHTML);
- const id = update.id;
- if (result !== null && result.length === 2 && result[1].startsWith("{\"reload\"")) {
- // not modified on server, needs be reloaded after some time
- console.debug("[tobago-jsf] Found reload-JSON in response!");
- ReloadManager.instance.schedule(id, JSON.parse(result[1]).reload.frequency);
- } else {
- console.info("[tobago-jsf] Update after jsf.ajax success: %s", id);
- if (Jsf.isId(id)) {
- console.debug("[tobago-jsf] updating #%s", id);
- const element = document.getElementById(id);
- if (element) {
- Listener.executeAfterUpdate(element);
- } else {
- console.warn("[tobago-jsf] element not found for #%s", id);
- }
- } else if (Jsf.isBody(id)) {
- console.debug("[tobago-jsf] updating body");
- // there should be only one element with this tag name
- Listener.executeAfterUpdate(document.querySelector("tobago-page") as HTMLElement);
- }
- }
- });
- } else if (event.status === "complete") {
- event.responseXML.querySelectorAll("update").forEach(function (update: Element): void {
- const id = update.id;
- if (Jsf.isId(id)) {
- console.debug("[tobago-jsf] Update after jsf.ajax complete: #" + id);
- Overlay.destroy(id);
- }
- });
- }
- });
- };
-}
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-messages.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-messages.ts
index 1efa02e..d444ad1 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-messages.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-messages.ts
@@ -36,6 +36,8 @@ class Messages extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-messages", Messages);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-messages") == null) {
+ window.customElements.define("tobago-messages", Messages);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-page.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-page.ts
index 2b1f37b..74b41cf 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-page.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-page.ts
@@ -16,10 +16,10 @@
*/
import {DomUtils} from "./tobago-utils";
-import {Jsf} from "./tobago-jsf";
import {CommandHelper} from "./tobago-command";
import {Overlay} from "./tobago-overlay";
import {Listener} from "./tobago-listener";
+import {ReloadManager} from "./tobago-reload";
export class Page extends HTMLElement {
@@ -48,13 +48,13 @@ export class Page extends HTMLElement {
connectedCallback(): void {
- Jsf.registerAjaxListener();
+ this.registerAjaxListener();
this.querySelector("form").addEventListener("submit", CommandHelper.onSubmit);
window.addEventListener("unload", this.onUnload.bind(this));
- this.addEventListener("keypress", function (event: KeyboardEvent): boolean {
+ this.addEventListener("keypress", (event: KeyboardEvent): boolean => {
let code = event.which; // XXX deprecated
if (code === 0) {
code = event.keyCode;
@@ -109,6 +109,56 @@ export class Page extends HTMLElement {
}
}
+ registerAjaxListener(): void {
+ jsf.ajax.addOnEvent(this.jsfResponse.bind(this));
+ }
+
+ jsfResponse(event: EventData): void {
+ console.timeEnd("[tobago-jsf] jsf-ajax");
+ console.time("[tobago-jsf] jsf-ajax");
+ console.debug("[tobago-jsf] JSF event status: '%s'", event.status);
+ if (event.status === "success") {
+ event.responseXML.querySelectorAll("update").forEach(this.jsfResponseSuccess.bind(this));
+ } else if (event.status === "complete") {
+ event.responseXML.querySelectorAll("update").forEach(this.jsfResponseComplete.bind(this));
+ }
+ }
+
+ jsfResponseSuccess(update: Element): void {
+ const result = /<!\[CDATA\[(.*)]]>/gm.exec(update.innerHTML);
+ const id = update.id;
+ if (result !== null && result.length === 2 && result[1].startsWith("{\"reload\"")) {
+ // not modified on server, needs be reloaded after some time
+ console.debug("[tobago-jsf] Found reload-JSON in response!");
+ ReloadManager.instance.schedule(id, JSON.parse(result[1]).reload.frequency);
+ } else {
+ console.info("[tobago-jsf] Update after jsf.ajax success: %s", id);
+ if (JsfParameter.isJsfId(id)) {
+ console.debug("[tobago-jsf] updating #%s", id);
+ const rootNode = this.getRootNode() as ShadowRoot | Document;
+ let element = rootNode.getElementById(id);
+ if (element) {
+ Listener.executeAfterUpdate(element);
+ } else {
+ console.warn("[tobago-jsf] element not found for #%s", id);
+ }
+ } else if (JsfParameter.isJsfBody(id)) {
+ console.debug("[tobago-jsf] updating body");
+ // there should be only one element with this tag name
+ const rootNode = this.getRootNode() as ShadowRoot | Document;
+ Listener.executeAfterUpdate(rootNode.querySelector("tobago-page") as HTMLElement);
+ }
+ }
+ }
+
+ jsfResponseComplete(update: Element): void {
+ const id = update.id;
+ if (JsfParameter.isJsfId(id)) {
+ console.debug("[tobago-jsf] Update after jsf.ajax complete: #" + id);
+ Overlay.destroy(id);
+ }
+ }
+
get locale(): string {
let locale = this.getAttribute("locale");
if (!locale) {
@@ -118,9 +168,45 @@ export class Page extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-page", Page);
+document.addEventListener("tobago.init", (event: Event): void => {
+ if (window.customElements.get("tobago-page") == null) {
+ window.customElements.define("tobago-page", Page);
+ }
});
// todo remove this
window.addEventListener("load", Listener.executeWindowLoad);
+
+class JsfParameter {
+
+ static VIEW_STATE = "javax.faces.ViewState";
+ static CLIENT_WINDOW = "javax.faces.ClientWindow";
+ static VIEW_ROOT = "javax.faces.ViewRoot";
+ static VIEW_HEAD = "javax.faces.ViewHead";
+ static VIEW_BODY = "javax.faces.ViewBody";
+ static RESOURCE = "javax.faces.Resource";
+
+ static isJsfId(id: string): boolean {
+ switch (id) {
+ case JsfParameter.VIEW_STATE:
+ case JsfParameter.CLIENT_WINDOW:
+ case JsfParameter.VIEW_ROOT:
+ case JsfParameter.VIEW_HEAD:
+ case JsfParameter.VIEW_BODY:
+ case JsfParameter.RESOURCE:
+ return false;
+ default:
+ return true;
+ }
+ }
+
+ static isJsfBody(id): boolean {
+ switch (id) {
+ case JsfParameter.VIEW_ROOT:
+ case JsfParameter.VIEW_BODY:
+ return true;
+ default:
+ return false;
+ }
+ }
+}
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-panel.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-panel.ts
index 5ea5b14..c57af5d 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-panel.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-panel.ts
@@ -18,6 +18,8 @@
class Panel extends HTMLElement {
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-panel", Panel);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-panel") == null) {
+ window.customElements.define("tobago-panel", Panel);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-popover.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-popover.ts
index 7e073c5f..c24318c 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-popover.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-popover.ts
@@ -89,6 +89,8 @@ class Popover extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-popover", Popover);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-popover") == null) {
+ window.customElements.define("tobago-popover", Popover);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-popup.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-popup.ts
index 0a86c80..3558be1 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-popup.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-popup.ts
@@ -588,8 +588,10 @@ export class Popup extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-popup", Popup);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-popup") == null) {
+ window.customElements.define("tobago-popup", Popup);
+ }
});
export class Collapse {
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-range.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-range.ts
index ef9a97a..0fcb7b8 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-range.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-range.ts
@@ -73,6 +73,8 @@ class Range extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-range", Range);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-range") == null) {
+ window.customElements.define("tobago-range", Range);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-boolean-checkbox.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-boolean-checkbox.ts
index 88712d6..d2b0f02 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-boolean-checkbox.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-boolean-checkbox.ts
@@ -43,6 +43,8 @@ export class SelectBooleanCheckbox extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-select-boolean-checkbox", SelectBooleanCheckbox);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-select-boolean-checkbox") == null) {
+ window.customElements.define("tobago-select-boolean-checkbox", SelectBooleanCheckbox);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-boolean-toggle.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-boolean-toggle.ts
index 8606053..9fce9f0 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-boolean-toggle.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-boolean-toggle.ts
@@ -20,6 +20,8 @@ import {SelectBooleanCheckbox} from "./tobago-select-boolean-checkbox";
class SelectBooleanToggle extends SelectBooleanCheckbox {
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-select-boolean-toggle", SelectBooleanToggle);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-select-boolean-toggle") == null) {
+ window.customElements.define("tobago-select-boolean-toggle", SelectBooleanToggle);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-many-checkbox.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-many-checkbox.ts
index 05fbc64..ba35457 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-many-checkbox.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-many-checkbox.ts
@@ -43,6 +43,8 @@ class SelectManyCheckbox extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-select-many-checkbox", SelectManyCheckbox);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-select-many-checkbox") == null) {
+ window.customElements.define("tobago-select-many-checkbox", SelectManyCheckbox);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-many-listbox.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-many-listbox.ts
index 28cea87..0adb262 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-many-listbox.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-many-listbox.ts
@@ -20,6 +20,8 @@ import {SelectOneListbox} from "./tobago-select-one-listbox";
class SelectManyListbox extends SelectOneListbox {
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-select-many-listbox", SelectManyListbox);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-select-many-listbox") == null) {
+ window.customElements.define("tobago-select-many-listbox", SelectManyListbox);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-many-shuttle.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-many-shuttle.ts
index 2e8bd48..03cb5ec 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-many-shuttle.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-many-shuttle.ts
@@ -117,6 +117,8 @@ class SelectManyShuttle extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-select-many-shuttle", SelectManyShuttle);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-select-many-shuttle") == null) {
+ window.customElements.define("tobago-select-many-shuttle", SelectManyShuttle);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-one-choice.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-one-choice.ts
index 9591482..1edf8ca 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-one-choice.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-one-choice.ts
@@ -33,6 +33,8 @@ class SelectOneChoice extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-select-one-choice", SelectOneChoice);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-select-one-choice") == null) {
+ window.customElements.define("tobago-select-one-choice", SelectOneChoice);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-one-listbox.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-one-listbox.ts
index 35dd414..ec7fef9 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-one-listbox.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-one-listbox.ts
@@ -33,6 +33,8 @@ export class SelectOneListbox extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-select-one-listbox", SelectOneListbox);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-select-one-listbox") == null) {
+ window.customElements.define("tobago-select-one-listbox", SelectOneListbox);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-one-radio.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-one-radio.ts
index b3a46e4..bc75fff 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-one-radio.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-select-one-radio.ts
@@ -65,6 +65,8 @@ class SelectOneRadio extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-select-one-radio", SelectOneRadio);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-select-one-radio") == null) {
+ window.customElements.define("tobago-select-one-radio", SelectOneRadio);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-sheet.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-sheet.ts
index 6696244..8dfc416 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-sheet.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-sheet.ts
@@ -831,6 +831,8 @@ export class Sheet extends HTMLElement {
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-sheet", Sheet);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-sheet") == null) {
+ window.customElements.define("tobago-sheet", Sheet);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-split-layout.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-split-layout.ts
index 5d7193d..0ee0c8c 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-split-layout.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-split-layout.ts
@@ -161,6 +161,8 @@ class SplitLayoutMousedown {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-split-layout", SplitLayout);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-split-layout") == null) {
+ window.customElements.define("tobago-split-layout", SplitLayout);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-suggest.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-suggest.ts
index 3f1f97f..7b3b00b 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-suggest.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-suggest.ts
@@ -79,6 +79,8 @@ export class Suggest extends HTMLElement {
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-suggest", Suggest);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-suggest") == null) {
+ window.customElements.define("tobago-suggest", Suggest);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-textarea.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-textarea.ts
index fc522b5..0fb0b90 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-textarea.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-textarea.ts
@@ -32,6 +32,8 @@ class Textarea extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-textarea", Textarea);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-textarea") == null) {
+ window.customElements.define("tobago-textarea", Textarea);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree-listbox.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree-listbox.ts
index b55f275..574f8ea 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree-listbox.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree-listbox.ts
@@ -132,6 +132,8 @@ class TreeListbox extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-tree-listbox", TreeListbox);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-tree-listbox") == null) {
+ window.customElements.define("tobago-tree-listbox", TreeListbox);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree-node.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree-node.ts
index 6b632ef..5d74205 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree-node.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree-node.ts
@@ -187,6 +187,8 @@ export class TreeNode extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-tree-node", TreeNode);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-tree-node") == null) {
+ window.customElements.define("tobago-tree-node", TreeNode);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree-select.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree-select.ts
index 539aa39..88273f7 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree-select.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree-select.ts
@@ -92,6 +92,8 @@ export class TreeSelect extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-tree-select", TreeSelect);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-tree-select") == null) {
+ window.customElements.define("tobago-tree-select", TreeSelect);
+ }
});
diff --git a/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree.ts b/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree.ts
index 22b14c1..218929c 100644
--- a/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree.ts
+++ b/tobago-theme/tobago-theme-standard/npm/ts/tobago-tree.ts
@@ -88,6 +88,8 @@ export class Tree extends HTMLElement {
}
}
-document.addEventListener("DOMContentLoaded", function (event: Event): void {
- window.customElements.define("tobago-tree", Tree);
+document.addEventListener("tobago.init", function (event: Event): void {
+ if (window.customElements.get("tobago-tree") == null) {
+ window.customElements.define("tobago-tree", Tree);
+ }
});
[myfaces-tobago] 02/02: docs
Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
commit 863f51d3db36b63f093261d08eab00d8d76c25ca
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Thu Nov 12 11:47:43 2020 +0100
docs
---
.../webapp/content/10-intro/30-whats-new/60-new-in-5-0/Tobago_5.0.xhtml | 1 +
1 file changed, 1 insertion(+)
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/30-whats-new/60-new-in-5-0/Tobago_5.0.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/30-whats-new/60-new-in-5-0/Tobago_5.0.xhtml
index bd2c1b0..f1b4626 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/30-whats-new/60-new-in-5-0/Tobago_5.0.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/30-whats-new/60-new-in-5-0/Tobago_5.0.xhtml
@@ -32,6 +32,7 @@
<tc:section label="New Features and Enhancements">
<ul>
+ <li>Introducing: Web Components</li>
<li>Refactoring: JavaScript -> TypeScript</li>
<li>Refactoring: ResourceBunde and MessageBundle</li>
<li>Update to Bootstrap 5</li>