@3t-transform/threeteeui 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/css-shim-211819bc.js +6 -0
  3. package/dist/cjs/dom-9deb26c8.js +75 -0
  4. package/dist/cjs/index-11cfdabe.js +3297 -0
  5. package/dist/cjs/{index-906c2757.js → index-451f61dd.js} +3 -102
  6. package/dist/cjs/loader.cjs.js +19 -4
  7. package/dist/cjs/shadow-css-bf3843d2.js +389 -0
  8. package/dist/cjs/{tttx-button_2.cjs.entry.js → tttx-button.cjs.entry.js} +24 -50
  9. package/dist/cjs/tttx-form.cjs.entry.js +364 -364
  10. package/dist/cjs/tttx-icon.cjs.entry.js +21 -0
  11. package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +57 -57
  12. package/dist/cjs/tttx-list.cjs.entry.js +76 -46
  13. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +16 -16
  14. package/dist/cjs/tttx-standalone-input.cjs.entry.js +61 -58
  15. package/dist/cjs/tttx-toolbar.cjs.entry.js +20 -0
  16. package/dist/cjs/tttx.cjs.js +117 -9
  17. package/dist/collection/collection-manifest.json +4 -3
  18. package/dist/collection/components/atoms/tttx-button/test/tttx-button.e2e.js +9 -0
  19. package/dist/collection/components/atoms/tttx-button/test/tttx-button.spec.js +83 -0
  20. package/dist/collection/components/atoms/tttx-button/tttx-button.js +110 -116
  21. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +14 -14
  22. package/dist/collection/components/atoms/tttx-icon/test/tttx-icon.e2e.js +9 -0
  23. package/dist/collection/components/atoms/tttx-icon/test/tttx-icon.spec.js +16 -0
  24. package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +4 -0
  25. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +62 -62
  26. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +22 -22
  27. package/dist/collection/components/atoms/tttx-keyvalue-block/test/tttx-keyvalue-block.spec.js +216 -0
  28. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +107 -107
  29. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +38 -38
  30. package/dist/collection/components/atoms/tttx-loading-spinner/Test/tttx-loading-spinner.spec.js +64 -0
  31. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +67 -67
  32. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -17
  33. package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +35 -35
  34. package/dist/collection/components/molecules/tttx-form/lib/setErrorState.spec.js +38 -0
  35. package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +58 -58
  36. package/dist/collection/components/molecules/tttx-form/lib/validityCheck.spec.js +214 -0
  37. package/dist/collection/components/molecules/tttx-form/test/tttx-form.e2e.js +9 -0
  38. package/dist/collection/components/molecules/tttx-form/test/tttx-form.spec.js +232 -0
  39. package/dist/collection/components/molecules/tttx-form/tttx-form.css +32 -3
  40. package/dist/collection/components/molecules/tttx-form/tttx-form.js +364 -364
  41. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +127 -127
  42. package/dist/collection/components/molecules/tttx-list/test/ttttx-list.spec.e2e.js +26 -0
  43. package/dist/collection/components/molecules/tttx-list/test/tttx-list.spec.js +183 -0
  44. package/dist/collection/components/molecules/tttx-list/tttx-list.js +105 -105
  45. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +43 -43
  46. package/dist/collection/components/molecules/tttx-standalone-input/test/tttx-standalone-input.e2e.js +9 -0
  47. package/dist/collection/components/molecules/tttx-standalone-input/test/tttx-standalone-input.spec.js +219 -0
  48. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.css +32 -3
  49. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +627 -572
  50. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +148 -135
  51. package/dist/collection/components/molecules/tttx-toolbar/test/tttx-toolbar.test.js +0 -0
  52. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.css +30 -0
  53. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.js +44 -0
  54. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.stories.js +20 -0
  55. package/dist/collection/components/palette.stories.js +7 -7
  56. package/dist/collection/docs/gettingstarted-developer.stories.js +5 -5
  57. package/dist/collection/icons.js +2838 -2838
  58. package/dist/collection/index.js +1 -1
  59. package/dist/collection/shared/domsanitiser.options.js +14 -14
  60. package/dist/collection/shared/test/domsanitiser.options.spec.js +23 -0
  61. package/dist/components/index.d.ts +1 -9
  62. package/dist/components/index.js +6 -1
  63. package/dist/components/tttx-button.js +48 -59
  64. package/dist/components/tttx-form.js +381 -381
  65. package/dist/components/tttx-icon2.js +29 -29
  66. package/dist/components/tttx-keyvalue-block.js +74 -74
  67. package/dist/components/tttx-list.js +98 -68
  68. package/dist/components/tttx-loading-spinner.js +33 -33
  69. package/dist/components/tttx-standalone-input.js +108 -102
  70. package/dist/components/tttx-toolbar.d.ts +11 -0
  71. package/dist/components/tttx-toolbar.js +36 -0
  72. package/dist/esm/app-globals-0f993ce5.js +3 -0
  73. package/dist/esm/css-shim-9d54a2f2.js +4 -0
  74. package/dist/esm/dom-6be6f662.js +73 -0
  75. package/dist/esm/{index-4010ad69.js → index-0350f122.js} +4 -101
  76. package/dist/esm/index-dbe25028.js +3262 -0
  77. package/dist/esm/loader.js +19 -4
  78. package/dist/esm/polyfills/core-js.js +0 -0
  79. package/dist/esm/polyfills/css-shim.js +1 -1
  80. package/dist/esm/polyfills/dom.js +0 -0
  81. package/dist/esm/polyfills/es5-html-element.js +0 -0
  82. package/dist/esm/polyfills/index.js +0 -0
  83. package/dist/esm/polyfills/system.js +0 -0
  84. package/dist/esm/shadow-css-ed4599f8.js +387 -0
  85. package/dist/esm/{tttx-button_2.entry.js → tttx-button.entry.js} +25 -50
  86. package/dist/esm/tttx-form.entry.js +364 -364
  87. package/dist/esm/tttx-icon.entry.js +17 -0
  88. package/dist/esm/tttx-keyvalue-block.entry.js +57 -57
  89. package/dist/esm/tttx-list.entry.js +76 -46
  90. package/dist/esm/tttx-loading-spinner.entry.js +16 -16
  91. package/dist/esm/tttx-standalone-input.entry.js +61 -58
  92. package/dist/esm/tttx-toolbar.entry.js +16 -0
  93. package/dist/esm/tttx.js +117 -6
  94. package/dist/tttx/app-globals-0f993ce5.js +3 -0
  95. package/dist/tttx/css-shim-9d54a2f2.js +4 -0
  96. package/dist/tttx/dom-6be6f662.js +73 -0
  97. package/dist/tttx/index-dbe25028.js +3262 -0
  98. package/dist/tttx/index.esm.js +1 -0
  99. package/dist/tttx/p-0a85dda4.entry.js +1 -0
  100. package/dist/tttx/{p-3281444a.entry.js → p-1b015a9d.entry.js} +1 -1
  101. package/dist/tttx/p-4f3958fa.entry.js +1 -0
  102. package/dist/tttx/p-5cae1beb.entry.js +1 -0
  103. package/dist/tttx/p-62869344.js +2 -0
  104. package/dist/tttx/p-92465671.entry.js +1 -0
  105. package/dist/tttx/{p-dab7ee1b.entry.js → p-a0179cb1.entry.js} +1 -1
  106. package/dist/tttx/p-cc6644c9.entry.js +1 -0
  107. package/dist/tttx/p-cd1565e0.entry.js +3 -0
  108. package/dist/tttx/shadow-css-ed4599f8.js +387 -0
  109. package/dist/tttx/tttx-button.entry.js +30 -0
  110. package/dist/tttx/tttx-form.entry.js +373 -0
  111. package/dist/tttx/tttx-icon.entry.js +17 -0
  112. package/dist/tttx/tttx-keyvalue-block.entry.js +63 -0
  113. package/dist/tttx/tttx-list.entry.js +1730 -0
  114. package/dist/tttx/tttx-loading-spinner.entry.js +22 -0
  115. package/dist/tttx/tttx-standalone-input.entry.js +66 -0
  116. package/dist/tttx/tttx-toolbar.entry.js +16 -0
  117. package/dist/tttx/tttx.esm.js +129 -1
  118. package/dist/types/components/atoms/tttx-button/test/tttx-button.e2e.d.ts +1 -0
  119. package/dist/types/components/atoms/tttx-button/test/tttx-button.spec.d.ts +1 -0
  120. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +10 -13
  121. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +10 -10
  122. package/dist/types/components/atoms/tttx-icon/test/tttx-icon.e2e.d.ts +1 -0
  123. package/dist/types/components/atoms/tttx-icon/test/tttx-icon.spec.d.ts +1 -0
  124. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +5 -5
  125. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +20 -20
  126. package/dist/types/components/atoms/tttx-keyvalue-block/test/tttx-keyvalue-block.spec.d.ts +1 -0
  127. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +7 -7
  128. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +9 -9
  129. package/dist/types/components/atoms/tttx-loading-spinner/Test/tttx-loading-spinner.spec.d.ts +1 -0
  130. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -6
  131. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -17
  132. package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +13 -13
  133. package/dist/types/components/molecules/tttx-form/lib/setErrorState.spec.d.ts +1 -0
  134. package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +17 -17
  135. package/dist/types/components/molecules/tttx-form/lib/validityCheck.spec.d.ts +1 -0
  136. package/dist/types/components/molecules/tttx-form/test/tttx-form.e2e.d.ts +1 -0
  137. package/dist/types/components/molecules/tttx-form/test/tttx-form.spec.d.ts +1 -0
  138. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +114 -114
  139. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +13 -13
  140. package/dist/types/components/molecules/tttx-list/test/ttttx-list.spec.e2e.d.ts +1 -0
  141. package/dist/types/components/molecules/tttx-list/test/tttx-list.spec.d.ts +1 -0
  142. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +11 -11
  143. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +14 -14
  144. package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.e2e.d.ts +1 -0
  145. package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.spec.d.ts +1 -0
  146. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +56 -53
  147. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +122 -106
  148. package/dist/types/components/molecules/tttx-toolbar/test/tttx-toolbar.test.d.ts +0 -0
  149. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.d.ts +4 -0
  150. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.stories.d.ts +13 -0
  151. package/dist/types/components/palette.stories.d.ts +6 -6
  152. package/dist/types/components.d.ts +21 -0
  153. package/dist/types/docs/gettingstarted-developer.stories.d.ts +5 -5
  154. package/dist/types/icons.d.ts +2 -2
  155. package/dist/types/index.d.ts +1 -1
  156. package/dist/types/shared/domsanitiser.options.d.ts +10 -10
  157. package/dist/types/shared/test/domsanitiser.options.spec.d.ts +1 -0
  158. package/dist/types/stencil-public-runtime.d.ts +3 -59
  159. package/loader/index.d.ts +0 -9
  160. package/package.json +1 -1
  161. package/dist/collection/transform-tag-name.js +0 -5
  162. package/dist/tttx/p-083eeedc.entry.js +0 -1
  163. package/dist/tttx/p-5687f4ad.js +0 -2
  164. package/dist/tttx/p-5c9a1626.entry.js +0 -3
  165. package/dist/tttx/p-931e42c9.entry.js +0 -1
  166. package/dist/tttx/p-b5c1dd86.entry.js +0 -1
  167. package/dist/types/transform-tag-name.d.ts +0 -1
@@ -0,0 +1,17 @@
1
+ import { r as registerInstance, h, e as Host } from './index-dbe25028.js';
2
+
3
+ const tttxIconCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}:host{display:inline-block;cursor:default;user-select:none}.icon-size{width:24px;height:24px}.tooltip{background:#ffffff;color:#343434;font-weight:bold;padding:8px 16px;font-size:13px;border-radius:4px;box-shadow:0 0 5px 1px rgba(0, 0, 0, 0.3);display:none}.tooltip[data-show]{display:block}.arrow,.arrow::before{position:absolute;width:8px;height:8px;background:inherit}.arrow{visibility:hidden}.arrow::before{visibility:visible;content:\"\";transform:rotate(45deg)}.tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}.tooltip[data-popper-placement^=left]>.arrow{right:-4px}.tooltip[data-popper-placement^=right]>.arrow{left:-4px}.red{color:#dc0000}.darkred{color:#A20000}.orange{color:#f59500}.blue{color:#1479c6}.green{color:#a2bb31}.gray{color:#757575}.black{color:#212121}.white{color:white}";
4
+
5
+ const TttxIcon = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.icon = undefined;
9
+ this.color = 'grey';
10
+ }
11
+ render() {
12
+ return (h(Host, null, h("span", { class: `material-symbols-rounded ${this.color ? this.color : ''}` }, this.icon)));
13
+ }
14
+ };
15
+ TttxIcon.style = tttxIconCss;
16
+
17
+ export { TttxIcon as tttx_icon };
@@ -1,63 +1,63 @@
1
- import { r as registerInstance, h, H as Host } from './index-4010ad69.js';
1
+ import { r as registerInstance, h, e as Host } from './index-dbe25028.js';
2
2
 
3
3
  const tttxKeyvalueBlockCss = ":host{display:block}dl{margin:0;padding:0;font-family:\"Roboto\", sans-serif;cursor:default}dt{font-weight:400;line-height:21px;font-size:16px}dt,dt.subTitle{color:#757575}dt.mainTitle{color:#212121}dd{margin:0;font-weight:400;font-size:16px;color:#212121;line-height:21px;margin-bottom:18px}dl.horizontal{display:flex;flex-direction:row;width:100%}dl.horizontal div{flex-grow:1}@media (max-width: 769px){dl.horizontal{flex-wrap:wrap}dl.horizontal div{width:50%}}@media (max-width: 600px){dl.horizontal div{width:100%}}";
4
4
 
5
- const TttxKeyvalueBlock = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.keyvalues = undefined;
9
- this.horizontal = undefined;
10
- }
11
- renderSingleElements(values) {
12
- const keys = Object.keys(values);
13
- const elements = [];
14
- for (let i = 0; i < keys.length; i++) {
15
- if (this.horizontal) {
16
- elements.push(h("div", null, h("dt", null, keys[i]), h("dd", null, values[keys[i]])));
17
- }
18
- else {
19
- elements.push(h("dt", null, keys[i]));
20
- elements.push(h("dd", null, values[keys[i]]));
21
- }
22
- }
23
- return elements;
24
- }
25
- renderArrayElements(values) {
26
- const elements = [];
27
- for (let i = 0; i < values.length; i++) {
28
- const value = values[i];
29
- if (this.horizontal) {
30
- elements.push(h("div", null, h("dt", { class: 'mainTitle' }, value.title), h("dt", { class: 'subTitle' }, value.subTitle), h("dd", null, value.data)));
31
- }
32
- else {
33
- elements.push(h("dt", { class: 'mainTitle' }, value.title));
34
- elements.push(h("dt", { class: 'subTitle' }, value.subTitle));
35
- elements.push(h("dd", null, value.data));
36
- }
37
- }
38
- return elements;
39
- }
40
- render() {
41
- if (!this.keyvalues) {
42
- return;
43
- }
44
- let values;
45
- if (typeof this.keyvalues === 'string') {
46
- values = JSON.parse(this.keyvalues);
47
- }
48
- else {
49
- values = this.keyvalues;
50
- }
51
- let elements;
52
- if (Array.isArray(values)) {
53
- elements = this.renderArrayElements(values);
54
- }
55
- else {
56
- elements = this.renderSingleElements(values);
57
- }
58
- return (h(Host, null, h("dl", { class: this.horizontal ? 'horizontal' : null }, elements)));
59
- }
60
- };
5
+ const TttxKeyvalueBlock = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.keyvalues = undefined;
9
+ this.horizontal = undefined;
10
+ }
11
+ renderSingleElements(values) {
12
+ const keys = Object.keys(values);
13
+ const elements = [];
14
+ for (let i = 0; i < keys.length; i++) {
15
+ if (this.horizontal) {
16
+ elements.push(h("div", null, h("dt", null, keys[i]), h("dd", null, values[keys[i]])));
17
+ }
18
+ else {
19
+ elements.push(h("dt", null, keys[i]));
20
+ elements.push(h("dd", null, values[keys[i]]));
21
+ }
22
+ }
23
+ return elements;
24
+ }
25
+ renderArrayElements(values) {
26
+ const elements = [];
27
+ for (let i = 0; i < values.length; i++) {
28
+ const value = values[i];
29
+ if (this.horizontal) {
30
+ elements.push(h("div", null, h("dt", { class: 'mainTitle' }, value.title), h("dt", { class: 'subTitle' }, value.subTitle), h("dd", null, value.data)));
31
+ }
32
+ else {
33
+ elements.push(h("dt", { class: 'mainTitle' }, value.title));
34
+ elements.push(h("dt", { class: 'subTitle' }, value.subTitle));
35
+ elements.push(h("dd", null, value.data));
36
+ }
37
+ }
38
+ return elements;
39
+ }
40
+ render() {
41
+ if (!this.keyvalues) {
42
+ return;
43
+ }
44
+ let values;
45
+ if (typeof this.keyvalues === 'string') {
46
+ values = JSON.parse(this.keyvalues);
47
+ }
48
+ else {
49
+ values = this.keyvalues;
50
+ }
51
+ let elements;
52
+ if (Array.isArray(values)) {
53
+ elements = this.renderArrayElements(values);
54
+ }
55
+ else {
56
+ elements = this.renderSingleElements(values);
57
+ }
58
+ return (h(Host, null, h("dl", { class: this.horizontal ? 'horizontal' : null }, elements)));
59
+ }
60
+ };
61
61
  TttxKeyvalueBlock.style = tttxKeyvalueBlockCss;
62
62
 
63
63
  export { TttxKeyvalueBlock as tttx_keyvalue_block };
@@ -1,17 +1,44 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-4010ad69.js';
1
+ import { r as registerInstance, f as createEvent, h } from './index-dbe25028.js';
2
2
 
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
 
5
+ function getDefaultExportFromCjs (x) {
6
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
7
+ }
8
+
5
9
  function createCommonjsModule(fn, basedir, module) {
6
10
  return module = {
7
11
  path: basedir,
8
12
  exports: {},
9
13
  require: function (path, base) {
10
- return commonjsRequire();
14
+ return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
11
15
  }
12
16
  }, fn(module, module.exports), module.exports;
13
17
  }
14
18
 
19
+ function getDefaultExportFromNamespaceIfPresent (n) {
20
+ return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
21
+ }
22
+
23
+ function getDefaultExportFromNamespaceIfNotNamed (n) {
24
+ return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
25
+ }
26
+
27
+ function getAugmentedNamespace(n) {
28
+ if (n.__esModule) return n;
29
+ var a = Object.defineProperty({}, '__esModule', {value: true});
30
+ Object.keys(n).forEach(function (k) {
31
+ var d = Object.getOwnPropertyDescriptor(n, k);
32
+ Object.defineProperty(a, k, d.get ? d : {
33
+ enumerable: true,
34
+ get: function () {
35
+ return n[k];
36
+ }
37
+ });
38
+ });
39
+ return a;
40
+ }
41
+
15
42
  function commonjsRequire () {
16
43
  throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
17
44
  }
@@ -20,8 +47,11 @@ var purify = createCommonjsModule(function (module, exports) {
20
47
  /*! @license DOMPurify 3.0.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.3/LICENSE */
21
48
 
22
49
  (function (global, factory) {
23
- module.exports = factory() ;
24
- })(commonjsGlobal, (function () {
50
+ 'object' === 'object' && 'object' !== 'undefined' ? module.exports = factory() :
51
+ typeof undefined === 'function' && undefined.amd ? undefined(factory) :
52
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.DOMPurify = factory());
53
+ })(commonjsGlobal, (function () { 'use strict';
54
+
25
55
  const {
26
56
  entries,
27
57
  setPrototypeOf,
@@ -1649,52 +1679,52 @@ var purify = createCommonjsModule(function (module, exports) {
1649
1679
  //# sourceMappingURL=purify.js.map
1650
1680
  });
1651
1681
 
1652
- function tagRegXp(tagName) {
1653
- return RegExp(/^tttx-/).exec(tagName);
1654
- }
1655
- function attributeNameCheck() {
1656
- return true;
1657
- }
1658
- const domSanitiserOptions = {
1659
- CUSTOM_ELEMENT_HANDLING: {
1660
- tagNameCheck: tagRegXp,
1661
- attributeNameCheck: attributeNameCheck,
1662
- allowCustomizedBuiltInElements: false, // customized built-ins are not allowed
1663
- }
1682
+ function tagRegXp(tagName) {
1683
+ return RegExp(/^tttx-/).exec(tagName);
1684
+ }
1685
+ function attributeNameCheck() {
1686
+ return true;
1687
+ }
1688
+ const domSanitiserOptions = {
1689
+ CUSTOM_ELEMENT_HANDLING: {
1690
+ tagNameCheck: tagRegXp,
1691
+ attributeNameCheck: attributeNameCheck,
1692
+ allowCustomizedBuiltInElements: false, // customized built-ins are not allowed
1693
+ }
1664
1694
  };
1665
1695
 
1666
1696
  const tttxListCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}:host{display:flex;flex-direction:column}.list{margin:0;padding:0}.item{list-style:none;margin:0;padding:8px;border-bottom:1px solid #d5d5d5;min-height:36px;display:flex;align-items:center}.item:first-of-type{border-top:1px solid #d5d5d5}.item.clickable:hover{cursor:pointer}.item.clickable:active{background-color:#e6e6e6}.align-right{margin-left:auto}.item-content{display:flex;align-items:center}";
1667
1697
 
1668
- const TttxList = class {
1669
- constructor(hostRef) {
1670
- registerInstance(this, hostRef);
1671
- this.rowClick = createEvent(this, "listRowClick", 7);
1672
- this.data = undefined;
1673
- this.name = undefined;
1674
- }
1675
- onRowClickHandler(item) {
1676
- if (!item.clickable || !item.rowData)
1677
- return;
1678
- this.rowClick.emit({ name: this.name, data: item.rowData });
1679
- }
1680
- renderListItem(item) {
1681
- const cleanHTML = purify.sanitize(item.element, domSanitiserOptions);
1682
- return (h("li", { class: `item ${item.clickable ? 'clickable' : ''}`, onClick: () => {
1683
- this.onRowClickHandler(item);
1684
- } }, item.element && h("span", { class: "item-content", innerHTML: cleanHTML }), item.icon && h("tttx-icon", { class: "align-right ", icon: item.icon })));
1685
- }
1686
- render() {
1687
- if (!this.data)
1688
- return;
1689
- if (typeof this.data === 'string') {
1690
- this._data = JSON.parse(this.data);
1691
- }
1692
- else {
1693
- this._data = this.data;
1694
- }
1695
- return h("ul", { class: "list" }, this._data.map((item) => this.renderListItem(item)));
1696
- }
1697
- };
1698
+ const TttxList = class {
1699
+ constructor(hostRef) {
1700
+ registerInstance(this, hostRef);
1701
+ this.rowClick = createEvent(this, "listRowClick", 7);
1702
+ this.data = undefined;
1703
+ this.name = undefined;
1704
+ }
1705
+ onRowClickHandler(item) {
1706
+ if (!item.clickable || !item.rowData)
1707
+ return;
1708
+ this.rowClick.emit({ name: this.name, data: item.rowData });
1709
+ }
1710
+ renderListItem(item) {
1711
+ const cleanHTML = purify.sanitize(item.element, domSanitiserOptions);
1712
+ return (h("li", { class: `item ${item.clickable ? 'clickable' : ''}`, onClick: () => {
1713
+ this.onRowClickHandler(item);
1714
+ } }, item.element && h("span", { class: "item-content", innerHTML: cleanHTML }), item.icon && h("tttx-icon", { class: "align-right ", icon: item.icon })));
1715
+ }
1716
+ render() {
1717
+ if (!this.data)
1718
+ return;
1719
+ if (typeof this.data === 'string') {
1720
+ this._data = JSON.parse(this.data);
1721
+ }
1722
+ else {
1723
+ this._data = this.data;
1724
+ }
1725
+ return h("ul", { class: "list" }, this._data.map((item) => this.renderListItem(item)));
1726
+ }
1727
+ };
1698
1728
  TttxList.style = tttxListCss;
1699
1729
 
1700
1730
  export { TttxList as tttx_list };
@@ -1,22 +1,22 @@
1
- import { r as registerInstance, h } from './index-4010ad69.js';
1
+ import { r as registerInstance, h } from './index-dbe25028.js';
2
2
 
3
3
  const tttxLoadingSpinnerCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.spinner-container{position:absolute}.loading-box{display:flex;align-items:center;justify-content:center}.loading-text{font-size:16px;font-weight:400;padding-top:10px;text-align:center}.spinner{border:solid #1479c6;border-bottom-color:#d5d5d5;border-radius:50%;position:relative;box-sizing:border-box;animation:rotation 1s linear infinite}.spinner.small{height:20px;width:20px;border-width:4px}.spinner.large{height:60px;width:60px;border-width:8px}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
4
4
 
5
- const TttxLoadingSpinner = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.loadingMessage = undefined;
9
- this.size = 'large';
10
- }
11
- renderLoadingMessage() {
12
- if (!this.loadingMessage)
13
- return '';
14
- return h("div", { class: "loading-text" }, "Loading, please wait...");
15
- }
16
- render() {
17
- return (h("div", { class: "spinner-container" }, h("div", { class: "loading-box" }, h("span", { class: `spinner ${this.size}` })), this.renderLoadingMessage()));
18
- }
19
- };
5
+ const TttxLoadingSpinner = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.loadingMessage = undefined;
9
+ this.size = 'large';
10
+ }
11
+ renderLoadingMessage() {
12
+ if (!this.loadingMessage)
13
+ return '';
14
+ return h("div", { class: "loading-text" }, "Loading, please wait...");
15
+ }
16
+ render() {
17
+ return (h("div", { class: "spinner-container" }, h("div", { class: "loading-box" }, h("span", { class: `spinner ${this.size}` })), this.renderLoadingMessage()));
18
+ }
19
+ };
20
20
  TttxLoadingSpinner.style = tttxLoadingSpinnerCss;
21
21
 
22
22
  export { TttxLoadingSpinner as tttx_loading_spinner };
@@ -1,63 +1,66 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-4010ad69.js';
1
+ import { r as registerInstance, f as createEvent, h, e as Host } from './index-dbe25028.js';
2
2
 
3
- const tttxStandaloneInputCss = ".material-symbols-rounded.sc-tttx-standalone-input{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded.sc-tttx-standalone-input{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.icon-left.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input{flex-basis:24px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-left:4px}.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-right:4px}.icon-right.sc-tttx-standalone-input{margin-top:5px;margin-right:4px}.icon-left.sc-tttx-standalone-input{margin-top:5px;margin-left:4px}.iconleft.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-left:4px}.iconright.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-right:4px}.focused.sc-tttx-standalone-input{border-color:#1479c6}.errormsg.sc-tttx-standalone-input{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#dc0000}.errormsg.sc-tttx-standalone-input .validationicon.sc-tttx-standalone-input{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger.sc-tttx-standalone-input{color:#dc0000}.optional.sc-tttx-standalone-input{color:#757575;font-weight:normal}label.inputBlock.sc-tttx-standalone-input{display:block;position:relative;line-height:21px}label.sc-tttx-standalone-input{font-weight:500;font-size:16px}input.sc-tttx-standalone-input:not([type=submit]){font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date].sc-tttx-standalone-input{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid.sc-tttx-standalone-input:invalid,input.standalone.invalid.sc-tttx-standalone-input{border:1px solid #dc0000}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input{min-height:27px;position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input:not(.visible){visibility:hidden}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input span.sc-tttx-standalone-input{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid.sc-tttx-standalone-input:invalid~.errorBubble.sc-tttx-standalone-input{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;visibility:visible}input.sc-tttx-standalone-input:focus{border-color:#1479c6}.sc-tttx-standalone-input-h{display:block}";
3
+ const tttxStandaloneInputCss = ".material-symbols-rounded.sc-tttx-standalone-input{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded.sc-tttx-standalone-input{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.icon-left.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input{flex-basis:24px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-left:4px}.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-right:4px}.icon-right.sc-tttx-standalone-input{margin-top:5px}.icon-left.sc-tttx-standalone-input{margin-top:5px;margin-left:4px}.iconleft.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-left:4px}.iconright.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-right:4px}.input-icon.sc-tttx-standalone-input{position:absolute;margin-top:9px;margin-left:4px}.errormsg.sc-tttx-standalone-input{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#dc0000}.errormsg.sc-tttx-standalone-input .validationicon.sc-tttx-standalone-input{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger.sc-tttx-standalone-input{color:#dc0000}.optional.sc-tttx-standalone-input{color:#757575;font-weight:normal}label.inputBlock.sc-tttx-standalone-input{display:block;position:relative;line-height:21px}label.inputInline.sc-tttx-standalone-input{display:flex;white-space:nowrap;align-items:center}label.inputInline.sc-tttx-standalone-input .input-container.sc-tttx-standalone-input{margin:0 4px;width:100%;display:flex;align-items:center;gap:4px;position:relative}label.sc-tttx-standalone-input{font-weight:500;font-size:16px}input.sc-tttx-standalone-input:not([type=submit]){font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date].sc-tttx-standalone-input{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}@media (max-width: 600px){input[type=date].sc-tttx-standalone-input{padding-top:6px}}input.invalid.sc-tttx-standalone-input:invalid,input.standalone.invalid.sc-tttx-standalone-input{border:1px solid #dc0000}.input-icon.sc-tttx-standalone-input~input.sc-tttx-standalone-input{padding:0 32px}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input{min-height:27px;position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input:not(.visible){visibility:hidden}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input span.sc-tttx-standalone-input{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid.sc-tttx-standalone-input:invalid~.errorBubble.sc-tttx-standalone-input{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;visibility:visible}input.sc-tttx-standalone-input:focus{border-color:#1479c6}input.sc-tttx-standalone-input:focus-visible{outline:none}.sc-tttx-standalone-input-h{display:block}";
4
4
 
5
- const TttxInput = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.valueChanged = createEvent(this, "valueChanged", 7);
9
- this.focusChanged = createEvent(this, "focusChanged", 7);
10
- this.blurChanged = createEvent(this, "blurChanged", 7);
11
- this.invalidChanged = createEvent(this, "invalidChanged", 7);
12
- this.label = undefined;
13
- this.showerrormsg = undefined;
14
- this.errormsg = undefined;
15
- this.iconleft = undefined;
16
- this.iconright = undefined;
17
- this.inputAutocapitalize = undefined;
18
- this.inputAutofocus = undefined;
19
- this.inputKeyhint = undefined;
20
- this.inputIndex = undefined;
21
- this.inputTitle = undefined;
22
- this.autocomplete = undefined;
23
- this.checked = undefined;
24
- this.disabled = undefined;
25
- this.max = undefined;
26
- this.maxlength = undefined;
27
- this.min = undefined;
28
- this.minlength = undefined;
29
- this.name = undefined;
30
- this.pattern = undefined;
31
- this.placeholder = undefined;
32
- this.readonly = undefined;
33
- this.required = undefined;
34
- this.step = undefined;
35
- this.type = 'text';
36
- this.value = undefined;
37
- }
38
- handleChange(event) {
39
- const target = event.target;
40
- this.value = target.value;
41
- this.valueChanged.emit(target.value);
42
- }
43
- handleFocus(event) {
44
- const target = event.target;
45
- this.focusChanged.emit(target.value);
46
- }
47
- handleBlur(event) {
48
- const target = event.target;
49
- this.blurChanged.emit(target.value);
50
- }
51
- handleInvalid(event) {
52
- event.preventDefault();
53
- const target = event.target;
54
- this.invalidChanged.emit(target.value);
55
- }
56
- render() {
57
- const classNames = ['standalone', this.showerrormsg ? 'invalid' : ''].join(' ');
58
- return (h(Host, null, h("label", { class: 'inputBlock' }, this.label, !this.required ? h("span", { class: "optional" }, "\u00A0(optional)") : '', this.iconleft && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.iconleft, color: "grey" }))), h("input", { class: classNames, autocapitalize: this.inputAutocapitalize, autofocus: this.inputAutofocus, enterkeyhint: this.inputKeyhint, tabindex: this.inputIndex, title: this.inputTitle, autocomplete: this.autocomplete, checked: this.checked, disabled: this.disabled, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readonly: this.readonly, required: this.required, step: this.step, type: this.type, value: this.value, onBlur: this.handleBlur.bind(this), onFocus: this.handleFocus.bind(this), onInput: this.handleChange.bind(this), onInvalid: this.handleInvalid.bind(this) }), this.iconright && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.iconright, color: "grey" }))), h("span", { class: ['errorBubble', this.showerrormsg && this.errormsg ? 'visible' : ''].join(' ') }, h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))));
59
- }
60
- };
5
+ const TttxInput = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.valueChanged = createEvent(this, "valueChanged", 7);
9
+ this.focusChanged = createEvent(this, "focusChanged", 7);
10
+ this.blurChanged = createEvent(this, "blurChanged", 7);
11
+ this.invalidChanged = createEvent(this, "invalidChanged", 7);
12
+ this.label = undefined;
13
+ this.showerrormsg = undefined;
14
+ this.showerrorbubble = true;
15
+ this.errormsg = undefined;
16
+ this.iconleft = undefined;
17
+ this.iconright = undefined;
18
+ this.inputicon = undefined;
19
+ this.inline = undefined;
20
+ this.inputAutocapitalize = undefined;
21
+ this.inputAutofocus = undefined;
22
+ this.inputKeyhint = undefined;
23
+ this.inputIndex = undefined;
24
+ this.inputTitle = undefined;
25
+ this.autocomplete = undefined;
26
+ this.checked = undefined;
27
+ this.disabled = undefined;
28
+ this.max = undefined;
29
+ this.maxlength = undefined;
30
+ this.min = undefined;
31
+ this.minlength = undefined;
32
+ this.name = undefined;
33
+ this.pattern = undefined;
34
+ this.placeholder = undefined;
35
+ this.readonly = undefined;
36
+ this.required = undefined;
37
+ this.step = undefined;
38
+ this.type = 'text';
39
+ this.value = undefined;
40
+ }
41
+ handleChange(event) {
42
+ const target = event.target;
43
+ this.value = target.value;
44
+ this.valueChanged.emit(target.value);
45
+ }
46
+ handleFocus(event) {
47
+ const target = event.target;
48
+ this.focusChanged.emit(target.value);
49
+ }
50
+ handleBlur(event) {
51
+ const target = event.target;
52
+ this.blurChanged.emit(target.value);
53
+ }
54
+ handleInvalid(event) {
55
+ event.preventDefault();
56
+ const target = event.target;
57
+ this.invalidChanged.emit(target.value);
58
+ }
59
+ render() {
60
+ const classNames = ['standalone', this.showerrormsg ? 'invalid' : ''].join(' ');
61
+ return (h(Host, null, h("label", { class: this.inline ? 'inputInline' : 'inputBlock' }, this.label, !this.required ? h("span", { class: "optional" }, "\u00A0(optional)") : '', this.iconleft && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.iconleft, color: "grey" }))), h("div", { class: "input-container" }, this.inputicon && (h("tttx-icon", { class: "input-icon", icon: this.inputicon, color: "grey" })), h("input", { class: classNames, autocapitalize: this.inputAutocapitalize, autofocus: this.inputAutofocus, enterkeyhint: this.inputKeyhint, tabindex: this.inputIndex, title: this.inputTitle, autocomplete: this.autocomplete, checked: this.checked, disabled: this.disabled, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readonly: this.readonly, required: this.required, step: this.step, type: this.type, value: this.value, onBlur: this.handleBlur.bind(this), onFocus: this.handleFocus.bind(this), onInput: this.handleChange.bind(this), onInvalid: this.handleInvalid.bind(this) }), this.iconright && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.iconright, color: "grey" }))), this.showerrorbubble && (h("span", { class: ['errorBubble', this.showerrormsg && this.errormsg ? 'visible' : ''].join(' ') }, h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))))));
62
+ }
63
+ };
61
64
  TttxInput.style = tttxStandaloneInputCss;
62
65
 
63
66
  export { TttxInput as tttx_standalone_input };
@@ -0,0 +1,16 @@
1
+ import { r as registerInstance, h, e as Host } from './index-dbe25028.js';
2
+
3
+ const tttxToolbarCss = ":host{height:36px;display:flex;padding:8px 0;gap:8px}:host(.bordered){border-bottom:1px solid #d5d5d5}slot[name=before]{display:flex;flex:1 1 0px;gap:8px}slot[name=center]{display:flex;justify-content:center;flex:1 1 0px;gap:8px}slot[name=after]{display:flex;justify-content:end;flex:1 1 0px;gap:8px}";
4
+
5
+ const TttxToolbar = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.border = true;
9
+ }
10
+ render() {
11
+ return (h(Host, { class: this.border ? 'bordered' : '' }, h("slot", { name: 'before' }), h("slot", { name: 'center' }), h("slot", { name: 'after' })));
12
+ }
13
+ };
14
+ TttxToolbar.style = tttxToolbarCss;
15
+
16
+ export { TttxToolbar as tttx_toolbar };
package/dist/esm/tttx.js CHANGED
@@ -1,18 +1,129 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-4010ad69.js';
2
- export { s as setNonce } from './index-4010ad69.js';
1
+ import { B as BUILD, c as consoleDevInfo, p as plt, w as win, H, d as doc, N as NAMESPACE, a as promiseResolve, b as bootstrapLazy } from './index-dbe25028.js';
2
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
3
3
 
4
4
  /*
5
- Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Browser v2.20.0 | MIT Licensed | https://stenciljs.com
6
6
  */
7
+ const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
7
8
  const patchBrowser = () => {
9
+ // NOTE!! This fn cannot use async/await!
10
+ if (BUILD.isDev && !BUILD.isTesting) {
11
+ consoleDevInfo('Running in development mode.');
12
+ }
13
+ if (BUILD.cssVarShim) {
14
+ // shim css vars
15
+ plt.$cssShim$ = win.__cssshim;
16
+ }
17
+ if (BUILD.cloneNodeFix) {
18
+ // opted-in to polyfill cloneNode() for slot polyfilled components
19
+ patchCloneNodeFix(H.prototype);
20
+ }
21
+ if (BUILD.profile && !performance.mark) {
22
+ // not all browsers support performance.mark/measure (Safari 10)
23
+ // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,
24
+ // simply stub the implementations out.
25
+ // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)
26
+ // @ts-ignore
27
+ performance.mark = performance.measure = () => {
28
+ /*noop*/
29
+ };
30
+ performance.getEntriesByName = () => [];
31
+ }
32
+ // @ts-ignore
33
+ const scriptElm = BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim
34
+ ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) ||
35
+ s.getAttribute('data-stencil-namespace') === NAMESPACE)
36
+ : null;
8
37
  const importMeta = import.meta.url;
9
- const opts = {};
10
- if (importMeta !== '') {
38
+ const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {};
39
+ if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {
40
+ // Safari < v11 support: This IF is true if it's Safari below v11.
41
+ // This fn cannot use async/await since Safari didn't support it until v11,
42
+ // however, Safari 10 did support modules. Safari 10 also didn't support "nomodule",
43
+ // so both the ESM file and nomodule file would get downloaded. Only Safari
44
+ // has 'onbeforeload' in the script, and "history.scrollRestoration" was added
45
+ // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.
46
+ // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.
47
+ return {
48
+ then() {
49
+ /* promise noop */
50
+ },
51
+ };
52
+ }
53
+ if (!BUILD.safari10 && importMeta !== '') {
11
54
  opts.resourcesUrl = new URL('.', importMeta).href;
12
55
  }
56
+ else if (BUILD.dynamicImportShim || BUILD.safari10) {
57
+ opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;
58
+ if (BUILD.dynamicImportShim) {
59
+ patchDynamicImport(opts.resourcesUrl, scriptElm);
60
+ }
61
+ if (BUILD.dynamicImportShim && !win.customElements) {
62
+ // module support, but no custom elements support (Old Edge)
63
+ // @ts-ignore
64
+ return import(/* webpackChunkName: "polyfills-dom" */ './dom-6be6f662.js').then(() => opts);
65
+ }
66
+ }
13
67
  return promiseResolve(opts);
14
68
  };
69
+ const patchDynamicImport = (base, orgScriptElm) => {
70
+ const importFunctionName = getDynamicImportFunction(NAMESPACE);
71
+ try {
72
+ // test if this browser supports dynamic imports
73
+ // There is a caching issue in V8, that breaks using import() in Function
74
+ // By generating a random string, we can workaround it
75
+ // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info
76
+ win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);
77
+ }
78
+ catch (e) {
79
+ // this shim is specifically for browsers that do support "esm" imports
80
+ // however, they do NOT support "dynamic" imports
81
+ // basically this code is for old Edge, v18 and below
82
+ const moduleMap = new Map();
83
+ win[importFunctionName] = (src) => {
84
+ const url = new URL(src, base).href;
85
+ let mod = moduleMap.get(url);
86
+ if (!mod) {
87
+ const script = doc.createElement('script');
88
+ script.type = 'module';
89
+ script.crossOrigin = orgScriptElm.crossOrigin;
90
+ script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {
91
+ type: 'application/javascript',
92
+ }));
93
+ mod = new Promise((resolve) => {
94
+ script.onload = () => {
95
+ resolve(win[importFunctionName].m);
96
+ script.remove();
97
+ };
98
+ });
99
+ moduleMap.set(url, mod);
100
+ doc.head.appendChild(script);
101
+ }
102
+ return mod;
103
+ };
104
+ }
105
+ };
106
+ const patchCloneNodeFix = (HTMLElementPrototype) => {
107
+ const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
108
+ HTMLElementPrototype.cloneNode = function (deep) {
109
+ if (this.nodeName === 'TEMPLATE') {
110
+ return nativeCloneNodeFn.call(this, deep);
111
+ }
112
+ const clonedNode = nativeCloneNodeFn.call(this, false);
113
+ const srcChildNodes = this.childNodes;
114
+ if (deep) {
115
+ for (let i = 0; i < srcChildNodes.length; i++) {
116
+ // Node.ATTRIBUTE_NODE === 2, and checking because IE11
117
+ if (srcChildNodes[i].nodeType !== 2) {
118
+ clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
119
+ }
120
+ }
121
+ }
122
+ return clonedNode;
123
+ };
124
+ };
15
125
 
16
126
  patchBrowser().then(options => {
17
- return bootstrapLazy([["tttx-list",[[1,"tttx-list",{"data":[1025],"name":[1]}]]],["tttx-standalone-input",[[2,"tttx-standalone-input",{"label":[1],"showerrormsg":[4],"errormsg":[1],"iconleft":[1],"iconright":[1],"inputAutocapitalize":[1,"input-autocapitalize"],"inputAutofocus":[4,"input-autofocus"],"inputKeyhint":[1,"input-keyhint"],"inputIndex":[8,"input-index"],"inputTitle":[1,"input-title"],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-form",[[1,"tttx-form",{"formschema":[1032],"submitValue":[1032,"submit-value"]}]]],["tttx-keyvalue-block",[[1,"tttx-keyvalue-block",{"keyvalues":[8],"horizontal":[4]}]]],["tttx-loading-spinner",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-button_2",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"design":[1]}],[1,"tttx-icon",{"icon":[1],"color":[1]}]]]], options);
127
+ globalScripts();
128
+ return bootstrapLazy([["tttx-button",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"design":[1]}]]],["tttx-list",[[1,"tttx-list",{"data":[1025],"name":[1]}]]],["tttx-standalone-input",[[2,"tttx-standalone-input",{"label":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconright":[1],"inputicon":[1],"inline":[4],"inputAutocapitalize":[1,"input-autocapitalize"],"inputAutofocus":[4,"input-autofocus"],"inputKeyhint":[1,"input-keyhint"],"inputIndex":[8,"input-index"],"inputTitle":[1,"input-title"],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-form",[[1,"tttx-form",{"formschema":[1032],"submitValue":[1032,"submit-value"]}]]],["tttx-keyvalue-block",[[1,"tttx-keyvalue-block",{"keyvalues":[8],"horizontal":[4]}]]],["tttx-loading-spinner",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-toolbar",[[1,"tttx-toolbar",{"border":[4]}]]],["tttx-icon",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]]], options);
18
129
  });
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };