@3t-transform/threeteeui 0.1.42 → 0.1.44

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 (163) hide show
  1. package/dist/cjs/{domsanitiser.options-277161b9.js → domsanitiser.options-975e3317.js} +12 -12
  2. package/dist/cjs/{index-76f14107.js → index-2ea393bb.js} +146 -3
  3. package/dist/cjs/loader.cjs.js +4 -19
  4. package/dist/cjs/tttx-button.cjs.entry.js +24 -24
  5. package/dist/cjs/tttx-dialog-box.cjs.entry.js +80 -0
  6. package/dist/cjs/tttx-filter.cjs.entry.js +177 -159
  7. package/dist/cjs/tttx-form.cjs.entry.js +458 -458
  8. package/dist/cjs/tttx-icon.cjs.entry.js +11 -11
  9. package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +59 -59
  10. package/dist/cjs/tttx-list.cjs.entry.js +32 -32
  11. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +16 -16
  12. package/dist/cjs/tttx-sorter.cjs.entry.js +102 -102
  13. package/dist/cjs/tttx-standalone-input.cjs.entry.js +79 -79
  14. package/dist/cjs/tttx-toolbar.cjs.entry.js +10 -10
  15. package/dist/cjs/tttx.cjs.js +9 -117
  16. package/dist/collection/collection-manifest.json +3 -2
  17. package/dist/collection/components/atoms/tttx-button/tttx-button.js +110 -110
  18. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +14 -14
  19. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +62 -62
  20. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +22 -22
  21. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +109 -109
  22. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +38 -38
  23. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +67 -67
  24. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -17
  25. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.css +146 -0
  26. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.js +172 -0
  27. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.js +380 -0
  28. package/dist/collection/components/molecules/tttx-filter/tttx-filter.js +369 -334
  29. package/dist/collection/components/molecules/tttx-filter/tttx-filter.stories.js +73 -62
  30. package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +37 -37
  31. package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +61 -61
  32. package/dist/collection/components/molecules/tttx-form/tttx-form.js +479 -479
  33. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +272 -272
  34. package/dist/collection/components/molecules/tttx-list/tttx-list.js +105 -105
  35. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +43 -43
  36. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.js +224 -224
  37. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.stories.js +42 -42
  38. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +759 -759
  39. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +172 -172
  40. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.js +44 -44
  41. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.stories.js +14 -14
  42. package/dist/collection/components/palette.stories.js +7 -7
  43. package/dist/collection/docs/gettingstarted-developer.stories.js +5 -5
  44. package/dist/collection/icons.js +2838 -2838
  45. package/dist/collection/index.js +1 -1
  46. package/dist/collection/shared/domsanitiser.options.js +14 -14
  47. package/dist/components/domsanitiser.options.js +15 -45
  48. package/dist/components/index.d.ts +10 -0
  49. package/dist/components/index.js +2 -5
  50. package/dist/components/tttx-button.js +1 -54
  51. package/dist/{tttx/tttx-button.entry.js → components/tttx-button2.js} +52 -26
  52. package/dist/components/tttx-dialog-box.d.ts +11 -0
  53. package/dist/components/tttx-dialog-box.js +110 -0
  54. package/dist/components/tttx-filter.js +210 -191
  55. package/dist/components/tttx-form.js +475 -475
  56. package/dist/components/tttx-icon2.js +28 -28
  57. package/dist/components/tttx-keyvalue-block.js +76 -76
  58. package/dist/components/tttx-list.js +53 -53
  59. package/dist/components/tttx-loading-spinner.js +33 -33
  60. package/dist/components/tttx-sorter.js +130 -130
  61. package/dist/components/tttx-standalone-input.js +130 -130
  62. package/dist/components/tttx-toolbar.js +26 -26
  63. package/dist/esm/{domsanitiser.options-cc420431.js → domsanitiser.options-3c7ded83.js} +12 -12
  64. package/dist/esm/{index-9cde46a5.js → index-018a3e54.js} +146 -4
  65. package/dist/esm/loader.js +4 -19
  66. package/dist/esm/polyfills/core-js.js +0 -0
  67. package/dist/esm/polyfills/css-shim.js +1 -1
  68. package/dist/esm/polyfills/dom.js +0 -0
  69. package/dist/esm/polyfills/es5-html-element.js +0 -0
  70. package/dist/esm/polyfills/index.js +0 -0
  71. package/dist/esm/polyfills/system.js +0 -0
  72. package/dist/esm/tttx-button.entry.js +24 -24
  73. package/dist/esm/tttx-dialog-box.entry.js +76 -0
  74. package/dist/esm/tttx-filter.entry.js +177 -159
  75. package/dist/esm/tttx-form.entry.js +458 -458
  76. package/dist/esm/tttx-icon.entry.js +11 -11
  77. package/dist/esm/tttx-keyvalue-block.entry.js +59 -59
  78. package/dist/esm/tttx-list.entry.js +32 -32
  79. package/dist/esm/tttx-loading-spinner.entry.js +16 -16
  80. package/dist/esm/tttx-sorter.entry.js +102 -102
  81. package/dist/esm/tttx-standalone-input.entry.js +79 -79
  82. package/dist/esm/tttx-toolbar.entry.js +10 -10
  83. package/dist/esm/tttx.js +6 -117
  84. package/dist/tttx/index.esm.js +0 -1
  85. package/dist/tttx/{p-e53c7f9d.entry.js → p-01863bf1.entry.js} +1 -1
  86. package/dist/tttx/{p-4e637d50.entry.js → p-0ed6f369.entry.js} +1 -1
  87. package/dist/tttx/p-2dd43e97.entry.js +1 -0
  88. package/dist/tttx/{p-aef96333.entry.js → p-2e135be9.entry.js} +1 -1
  89. package/dist/tttx/p-350ddb03.js +3 -0
  90. package/dist/tttx/{p-d2f1aa8e.entry.js → p-48b15a3d.entry.js} +1 -1
  91. package/dist/tttx/{p-561224f5.entry.js → p-5e91cf1c.entry.js} +1 -1
  92. package/dist/tttx/p-71c244bd.js +2 -0
  93. package/dist/tttx/{p-dc2a37b0.entry.js → p-7bba2014.entry.js} +1 -1
  94. package/dist/tttx/p-d075a2c0.entry.js +1 -0
  95. package/dist/tttx/{p-bd1edaed.entry.js → p-deec335c.entry.js} +1 -1
  96. package/dist/tttx/{p-9f1e9cc1.entry.js → p-e061910d.entry.js} +1 -1
  97. package/dist/tttx/{p-f885f17a.entry.js → p-f247a7bc.entry.js} +1 -1
  98. package/dist/tttx/tttx.esm.js +1 -129
  99. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +10 -10
  100. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +10 -10
  101. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +5 -5
  102. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +20 -20
  103. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +7 -7
  104. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +9 -9
  105. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -6
  106. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -17
  107. package/dist/types/components/molecules/tttx-dialog-box/interfaces.d.ts +25 -0
  108. package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.d.ts +18 -0
  109. package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.d.ts +23 -0
  110. package/dist/types/components/molecules/tttx-filter/tttx-filter.d.ts +41 -39
  111. package/dist/types/components/molecules/tttx-filter/tttx-filter.stories.d.ts +70 -68
  112. package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +13 -13
  113. package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +17 -17
  114. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +133 -133
  115. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +278 -278
  116. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +11 -11
  117. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +14 -14
  118. package/dist/types/components/molecules/tttx-sorter/tttx-sorter.d.ts +19 -19
  119. package/dist/types/components/molecules/tttx-sorter/tttx-sorter.stories.d.ts +30 -30
  120. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +69 -69
  121. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +143 -143
  122. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.d.ts +4 -4
  123. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.stories.d.ts +13 -13
  124. package/dist/types/components/palette.stories.d.ts +6 -6
  125. package/dist/types/components.d.ts +26 -0
  126. package/dist/types/docs/gettingstarted-developer.stories.d.ts +5 -5
  127. package/dist/types/icons.d.ts +2 -2
  128. package/dist/types/index.d.ts +1 -1
  129. package/dist/types/shared/domsanitiser.options.d.ts +10 -10
  130. package/dist/types/stencil-public-runtime.d.ts +59 -3
  131. package/loader/index.d.ts +9 -0
  132. package/package.json +2 -2
  133. package/dist/cjs/app-globals-3a1e7e63.js +0 -5
  134. package/dist/cjs/css-shim-211819bc.js +0 -6
  135. package/dist/cjs/dom-9deb26c8.js +0 -75
  136. package/dist/cjs/domsanitiser.options-3f1501b5.js +0 -1697
  137. package/dist/cjs/index-39a867c5.js +0 -3298
  138. package/dist/cjs/shadow-css-bf3843d2.js +0 -389
  139. package/dist/esm/app-globals-0f993ce5.js +0 -3
  140. package/dist/esm/css-shim-9d54a2f2.js +0 -4
  141. package/dist/esm/dom-6be6f662.js +0 -73
  142. package/dist/esm/domsanitiser.options-6f2878c8.js +0 -1694
  143. package/dist/esm/index-e3e64631.js +0 -3262
  144. package/dist/esm/shadow-css-ed4599f8.js +0 -387
  145. package/dist/tttx/app-globals-0f993ce5.js +0 -3
  146. package/dist/tttx/css-shim-9d54a2f2.js +0 -4
  147. package/dist/tttx/dom-6be6f662.js +0 -73
  148. package/dist/tttx/domsanitiser.options-6f2878c8.js +0 -1694
  149. package/dist/tttx/index-e3e64631.js +0 -3262
  150. package/dist/tttx/p-3b1be372.entry.js +0 -1
  151. package/dist/tttx/p-b4290a5b.js +0 -3
  152. package/dist/tttx/p-d0ff9ad0.entry.js +0 -1
  153. package/dist/tttx/p-db059a69.js +0 -2
  154. package/dist/tttx/shadow-css-ed4599f8.js +0 -387
  155. package/dist/tttx/tttx-filter.entry.js +0 -165
  156. package/dist/tttx/tttx-form.entry.js +0 -468
  157. package/dist/tttx/tttx-icon.entry.js +0 -17
  158. package/dist/tttx/tttx-keyvalue-block.entry.js +0 -65
  159. package/dist/tttx/tttx-list.entry.js +0 -38
  160. package/dist/tttx/tttx-loading-spinner.entry.js +0 -22
  161. package/dist/tttx/tttx-sorter.entry.js +0 -108
  162. package/dist/tttx/tttx-standalone-input.entry.js +0 -85
  163. package/dist/tttx/tttx-toolbar.entry.js +0 -16
@@ -1649,18 +1649,18 @@ var purify = createCommonjsModule(function (module, exports) {
1649
1649
  //# sourceMappingURL=purify.js.map
1650
1650
  });
1651
1651
 
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
- }
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
+ }
1664
1664
  };
1665
1665
 
1666
1666
  exports.domSanitiserOptions = domSanitiserOptions;
@@ -63,6 +63,18 @@ const isComplexType = (o) => {
63
63
  o = typeof o;
64
64
  return o === 'object' || o === 'function';
65
65
  };
66
+ /**
67
+ * Helper method for querying a `meta` tag that contains a nonce value
68
+ * out of a DOM's head.
69
+ *
70
+ * @param doc The DOM containing the `head` to query against
71
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
72
+ * exists or the tag has no content.
73
+ */
74
+ function queryNonceMetaTagContent(doc) {
75
+ var _a, _b, _c;
76
+ return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
77
+ }
66
78
  /**
67
79
  * Production h() function based on Preact by
68
80
  * Jason Miller (@developit)
@@ -71,7 +83,6 @@ const isComplexType = (o) => {
71
83
  *
72
84
  * Modified for Stencil's compiler and vdom
73
85
  */
74
- // const stack: any[] = [];
75
86
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
76
87
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
77
88
  const h = (nodeName, vnodeData, ...children) => {
@@ -130,6 +141,14 @@ const h = (nodeName, vnodeData, ...children) => {
130
141
  }
131
142
  return vnode;
132
143
  };
144
+ /**
145
+ * A utility function for creating a virtual DOM node from a tag and some
146
+ * possible text content.
147
+ *
148
+ * @param tag the tag for this element
149
+ * @param text possible text content for the node
150
+ * @returns a newly-minted virtual DOM node
151
+ */
133
152
  const newVNode = (tag, text) => {
134
153
  const vnode = {
135
154
  $flags$: 0,
@@ -147,6 +166,12 @@ const newVNode = (tag, text) => {
147
166
  return vnode;
148
167
  };
149
168
  const Host = {};
169
+ /**
170
+ * Check whether a given node is a Host node or not
171
+ *
172
+ * @param node the virtual DOM node to check
173
+ * @returns whether it's a Host node or not
174
+ */
150
175
  const isHost = (node) => node && node.$tag$ === Host;
151
176
  /**
152
177
  * Parse a new property value for a given property type.
@@ -235,6 +260,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
235
260
  styles.set(scopeId, style);
236
261
  };
237
262
  const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
263
+ var _a;
238
264
  let scopeId = getScopeId(cmpMeta);
239
265
  const style = styles.get(scopeId);
240
266
  // if an element is NOT connected then getRootNode() will return the wrong root node
@@ -254,6 +280,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
254
280
  styleElm = doc.createElement('style');
255
281
  styleElm.innerHTML = style;
256
282
  }
283
+ // Apply CSP nonce to the style tag if it exists
284
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
285
+ if (nonce != null) {
286
+ styleElm.setAttribute('nonce', nonce);
287
+ }
257
288
  styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
258
289
  }
259
290
  if (appliedStyles) {
@@ -488,6 +519,21 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
488
519
  }
489
520
  return elm;
490
521
  };
522
+ /**
523
+ * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
524
+ * add them to the DOM in the appropriate place.
525
+ *
526
+ * @param parentElm the DOM node which should be used as a parent for the new
527
+ * DOM nodes
528
+ * @param before a child of the `parentElm` which the new children should be
529
+ * inserted before (optional)
530
+ * @param parentVNode the parent virtual DOM node
531
+ * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
532
+ * @param startIdx the index in the child virtual DOM nodes at which to start
533
+ * creating DOM nodes (inclusive)
534
+ * @param endIdx the index in the child virtual DOM nodes at which to stop
535
+ * creating DOM nodes (inclusive)
536
+ */
491
537
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
492
538
  let containerElm = (parentElm);
493
539
  let childNode;
@@ -504,6 +550,19 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
504
550
  }
505
551
  }
506
552
  };
553
+ /**
554
+ * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
555
+ * This can be used to, for instance, clean up after a list of children which
556
+ * should no longer be shown.
557
+ *
558
+ * This function also handles some of Stencil's slot relocation logic.
559
+ *
560
+ * @param vnodes a list of virtual DOM nodes to remove
561
+ * @param startIdx the index at which to start removing nodes (inclusive)
562
+ * @param endIdx the index at which to stop removing nodes (inclusive)
563
+ * @param vnode a VNode
564
+ * @param elm an element
565
+ */
507
566
  const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
508
567
  for (; startIdx <= endIdx; ++startIdx) {
509
568
  if ((vnode = vnodes[startIdx])) {
@@ -733,7 +792,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
733
792
  *
734
793
  * So, in other words, if `key` attrs are not set on VNodes which may be
735
794
  * changing order within a `children` array or something along those lines then
736
- * we could obtain a false positive and then have to do needless re-rendering.
795
+ * we could obtain a false negative and then have to do needless re-rendering
796
+ * (i.e. we'd say two VNodes aren't equal when in fact they should be).
737
797
  *
738
798
  * @param leftVNode the first VNode to check
739
799
  * @param rightVNode the second VNode to check
@@ -806,6 +866,18 @@ const callNodeRefs = (vNode) => {
806
866
  vNode.$children$ && vNode.$children$.map(callNodeRefs);
807
867
  }
808
868
  };
869
+ /**
870
+ * The main entry point for Stencil's virtual DOM-based rendering engine
871
+ *
872
+ * Given a {@link d.HostRef} container and some virtual DOM nodes, this
873
+ * function will handle creating a virtual DOM tree with a single root, patching
874
+ * the current virtual DOM tree onto an old one (if any), dealing with slot
875
+ * relocation, and reflecting attributes.
876
+ *
877
+ * @param hostRef data needed to root and render the virtual DOM tree, such as
878
+ * the DOM node into which it should be rendered.
879
+ * @param renderFnResults the virtual DOM nodes to be rendered
880
+ */
809
881
  const renderVdom = (hostRef, renderFnResults) => {
810
882
  const hostElm = hostRef.$hostElement$;
811
883
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
@@ -846,6 +918,13 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
846
918
  const instance = hostRef.$lazyInstance$ ;
847
919
  let promise;
848
920
  if (isInitialLoad) {
921
+ {
922
+ hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
923
+ if (hostRef.$queuedListeners$) {
924
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
925
+ hostRef.$queuedListeners$ = null;
926
+ }
927
+ }
849
928
  {
850
929
  promise = safeCall(instance, 'componentWillLoad');
851
930
  }
@@ -1256,15 +1335,28 @@ const connectedCallback = (elm) => {
1256
1335
  initializeComponent(elm, hostRef, cmpMeta);
1257
1336
  }
1258
1337
  }
1338
+ else {
1339
+ // not the first time this has connected
1340
+ // reattach any event listeners to the host
1341
+ // since they would have been removed when disconnected
1342
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1343
+ }
1259
1344
  endConnected();
1260
1345
  }
1261
1346
  };
1262
1347
  const disconnectedCallback = (elm) => {
1263
1348
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1264
- getHostRef(elm);
1349
+ const hostRef = getHostRef(elm);
1350
+ {
1351
+ if (hostRef.$rmListeners$) {
1352
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1353
+ hostRef.$rmListeners$ = undefined;
1354
+ }
1355
+ }
1265
1356
  }
1266
1357
  };
1267
1358
  const bootstrapLazy = (lazyBundles, options = {}) => {
1359
+ var _a;
1268
1360
  const endBootstrap = createTime();
1269
1361
  const cmpTags = [];
1270
1362
  const exclude = options.exclude || [];
@@ -1288,6 +1380,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1288
1380
  {
1289
1381
  cmpMeta.$members$ = compactMeta[2];
1290
1382
  }
1383
+ {
1384
+ cmpMeta.$listeners$ = compactMeta[3];
1385
+ }
1291
1386
  {
1292
1387
  cmpMeta.$watchers$ = {};
1293
1388
  }
@@ -1343,6 +1438,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1343
1438
  {
1344
1439
  visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1345
1440
  visibilityStyle.setAttribute('data-styles', '');
1441
+ // Apply CSP nonce to the style tag if it exists
1442
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1443
+ if (nonce != null) {
1444
+ visibilityStyle.setAttribute('nonce', nonce);
1445
+ }
1346
1446
  head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1347
1447
  }
1348
1448
  // Process deferred connectedCallbacks now all components have been registered
@@ -1358,6 +1458,47 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1358
1458
  // Fallback appLoad event
1359
1459
  endBootstrap();
1360
1460
  };
1461
+ const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1462
+ if (listeners) {
1463
+ listeners.map(([flags, name, method]) => {
1464
+ const target = getHostListenerTarget(elm, flags) ;
1465
+ const handler = hostListenerProxy(hostRef, method);
1466
+ const opts = hostListenerOpts(flags);
1467
+ plt.ael(target, name, handler, opts);
1468
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1469
+ });
1470
+ }
1471
+ };
1472
+ const hostListenerProxy = (hostRef, methodName) => (ev) => {
1473
+ try {
1474
+ {
1475
+ if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
1476
+ // instance is ready, let's call it's member method for this event
1477
+ hostRef.$lazyInstance$[methodName](ev);
1478
+ }
1479
+ else {
1480
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1481
+ }
1482
+ }
1483
+ }
1484
+ catch (e) {
1485
+ consoleError(e);
1486
+ }
1487
+ };
1488
+ const getHostListenerTarget = (elm, flags) => {
1489
+ if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
1490
+ return win;
1491
+ return elm;
1492
+ };
1493
+ // prettier-ignore
1494
+ const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
1495
+ /**
1496
+ * Assigns the given value to the nonce property on the runtime platform object.
1497
+ * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1498
+ * @param nonce The value to be assigned to the platform nonce property.
1499
+ * @returns void
1500
+ */
1501
+ const setNonce = (nonce) => (plt.$nonce$ = nonce);
1361
1502
  const hostRefs = /*@__PURE__*/ new WeakMap();
1362
1503
  const getHostRef = (ref) => hostRefs.get(ref);
1363
1504
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
@@ -1376,6 +1517,7 @@ const registerHost = (elm, cmpMeta) => {
1376
1517
  elm['s-p'] = [];
1377
1518
  elm['s-rc'] = [];
1378
1519
  }
1520
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1379
1521
  return hostRefs.set(elm, hostRef);
1380
1522
  };
1381
1523
  const isMemberInElement = (elm, memberName) => memberName in elm;
@@ -1474,3 +1616,4 @@ exports.getElement = getElement;
1474
1616
  exports.h = h;
1475
1617
  exports.promiseResolve = promiseResolve;
1476
1618
  exports.registerInstance = registerInstance;
1619
+ exports.setNonce = setNonce;
@@ -2,36 +2,21 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-39a867c5.js');
6
- const appGlobals = require('./app-globals-3a1e7e63.js');
5
+ const index = require('./index-2ea393bb.js');
7
6
 
8
7
  /*
9
- Stencil Client Patch Esm v2.20.0 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
10
9
  */
11
10
  const patchEsm = () => {
12
- // NOTE!! This fn cannot use async/await!
13
- // @ts-ignore
14
- if (index.BUILD.cssVarShim && !(index.CSS && index.CSS.supports && index.CSS.supports('color', 'var(--c)'))) {
15
- // @ts-ignore
16
- return Promise.resolve().then(function () { return require(/* webpackChunkName: "polyfills-css-shim" */ './css-shim-211819bc.js'); }).then(() => {
17
- if ((index.plt.$cssShim$ = index.win.__cssshim)) {
18
- return index.plt.$cssShim$.i();
19
- }
20
- else {
21
- // for better minification
22
- return 0;
23
- }
24
- });
25
- }
26
11
  return index.promiseResolve();
27
12
  };
28
13
 
29
14
  const defineCustomElements = (win, options) => {
30
15
  if (typeof window === 'undefined') return Promise.resolve();
31
16
  return patchEsm().then(() => {
32
- appGlobals.globalScripts();
33
- return index.bootstrapLazy([["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-button.cjs",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"design":[1]}]]],["tttx-filter.cjs",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]}]]],["tttx-list.cjs",[[1,"tttx-list",{"data":[1025],"name":[1]}]]],["tttx-sorter.cjs",[[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]}]]],["tttx-standalone-input.cjs",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"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.cjs",[[1,"tttx-form",{"formschema":[1032],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block.cjs",[[1,"tttx-keyvalue-block",{"keyvalues":[8],"horizontal":[4]}]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-toolbar.cjs",[[1,"tttx-toolbar",{"border":[4]}]]]], options);
17
+ return index.bootstrapLazy([["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-filter.cjs",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"defaultFilterOptions":[1,"default-filter-options"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]}]]],["tttx-list.cjs",[[1,"tttx-list",{"data":[1025],"name":[1]}]]],["tttx-sorter.cjs",[[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]}]]],["tttx-standalone-input.cjs",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"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.cjs",[[1,"tttx-form",{"formschema":[1032],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block.cjs",[[1,"tttx-keyvalue-block",{"keyvalues":[8],"horizontal":[4]}]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-toolbar.cjs",[[1,"tttx-toolbar",{"border":[4]}]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-button.cjs",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"design":[1]}]]]], options);
34
18
  });
35
19
  };
36
20
 
21
+ exports.setNonce = index.setNonce;
37
22
  exports.defineCustomElements = defineCustomElements;
@@ -2,33 +2,33 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-39a867c5.js');
5
+ const index = require('./index-2ea393bb.js');
6
6
 
7
7
  const tttxButtonCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #D5D5D5}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #D5D5D5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:hover{background:#146EB3;border:1px solid #146EB3}.primary:active{background:#1464A2;border:1px solid #1464A2}.borderless{background:transparent;border:none;color:#212121}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.danger{background:#DC0000;border:1px solid #DC0000;color:white}.danger:hover{background:#C60000;border:1px solid #C60000}.danger:active{background:#B00000;border:1px solid #B00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}:host{display:inline-block}tttx-icon{cursor:inherit}.spacingleft{margin-left:8px}";
8
8
 
9
- const TttxButton = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this._iconcolor = 'black';
13
- this.notext = undefined;
14
- this.icon = undefined;
15
- this.iconposition = 'left';
16
- this.design = 'default';
17
- }
18
- componentWillLoad() {
19
- this._design = this.design;
20
- const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
21
- if (!designs.includes(this.design)) {
22
- this._design = 'default';
23
- }
24
- if (this._design === 'primary' || this._design === 'danger') {
25
- this._iconcolor = 'white';
26
- }
27
- }
28
- render() {
29
- return (index.h(index.Host, null, index.h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (index.h("div", { class: "icon-left" }, index.h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && index.h("div", { class: "button-content" }, index.h("slot", null)), this.icon && this.iconposition === 'right' && (index.h("div", { class: "icon-right" }, index.h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
30
- }
31
- };
9
+ const TttxButton = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this._iconcolor = 'black';
13
+ this.notext = undefined;
14
+ this.icon = undefined;
15
+ this.iconposition = 'left';
16
+ this.design = 'default';
17
+ }
18
+ componentWillLoad() {
19
+ this._design = this.design;
20
+ const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
21
+ if (!designs.includes(this.design)) {
22
+ this._design = 'default';
23
+ }
24
+ if (this._design === 'primary' || this._design === 'danger') {
25
+ this._iconcolor = 'white';
26
+ }
27
+ }
28
+ render() {
29
+ return (index.h(index.Host, null, index.h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (index.h("div", { class: "icon-left" }, index.h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && index.h("div", { class: "button-content" }, index.h("slot", null)), this.icon && this.iconposition === 'right' && (index.h("div", { class: "icon-right" }, index.h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
30
+ }
31
+ };
32
32
  TttxButton.style = tttxButtonCss;
33
33
 
34
34
  exports.tttx_button = TttxButton;
@@ -0,0 +1,80 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-2ea393bb.js');
6
+ const domsanitiser_options = require('./domsanitiser.options-975e3317.js');
7
+
8
+ const tttxDialogBoxCss = ".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}h3{margin-block-start:0em;margin-block-end:0em}.dialog-box{background-color:#ffffff;display:flex;flex-direction:column;border:1px solid #d5d5d5;border-radius:4px;box-shadow:0px 1px 5px #1111114d}.dialog-box.small{width:400px;min-height:200px;max-height:500px}.dialog-box.regular{width:600px;min-height:200px;max-height:500px}.dialog-box.large{width:900px;min-height:200px;max-height:500px}.dialog-box.mobile{max-width:424px;max-height:510px}.dialog-box-clickable{cursor:pointer}.dialog-box-padding{padding:8px 16px}.dialog-box-align-right{margin-left:auto;display:flex}.dialog-box-header-box{border-bottom:1px solid #d5d5d5;display:flex;flex-direction:row;height:36px}.dialog-box-header{display:flex;align-items:center;width:100%}.dialog-box-title{font-size:18;font-weight:600;font-family:\"Roboto\", serif}.dialog-box-icon{padding-right:8px;width:24px;height:24px}.dialog-box-icon-close{margin-left:auto;padding-top:3px;width:24px;height:24px}.dialog-box-content{font-size:16;font-weight:400;font-family:\"Roboto\", serif}.dialog-box-body-box{padding:16px}.dialog-box-footer-box{display:flex;flex-direction:row;margin-top:auto;border-top:1px solid #d5d5d5;height:36px}.dialog-box-footer{display:flex;align-items:center;width:100%}.dialog-box-spacing-button{margin-right:8px}.dialog-box-header-box.info{border-bottom:1px solid #1479c6}.dialog-box-header-box.success{border-bottom:1px solid #a2bb31}.dialog-box-header-box.warning{border-bottom:1px solid #f59500}.dialog-box-header-box.critical{border-bottom:1px solid #dc0000}";
9
+
10
+ const TttxDialogBox = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.closeButtonClick = index.createEvent(this, "closeButtonClick", 6);
14
+ this.buttonClick = index.createEvent(this, "buttonClick", 7);
15
+ this.data = undefined;
16
+ this.size = 'regular';
17
+ this.elementSize = undefined;
18
+ }
19
+ handleResize() {
20
+ if (window.innerWidth < 698) {
21
+ this.elementSize = 'mobile';
22
+ }
23
+ else {
24
+ this.elementSize = this.size;
25
+ }
26
+ }
27
+ onCloseClickHandler() {
28
+ this.closeButtonClick.emit({ close: true });
29
+ }
30
+ onButtonClickHandler(index) {
31
+ this.buttonClick.emit({ buttonNumber: index, buttonClicked: true });
32
+ }
33
+ renderHeader(header) {
34
+ const title = header.title;
35
+ const iconName = header.iconName;
36
+ const iconColor = header.iconColor;
37
+ const iconEnabled = header.hasIcon ? true : false;
38
+ const closeEnabled = header.hasClose ? true : false;
39
+ return (index.h("div", { class: "dialog-box-header" }, iconEnabled && index.h("tttx-icon", { class: "dialog-box-icon", icon: iconName, color: iconColor }), index.h("h3", { class: "dialog-box-title" }, title), closeEnabled && (index.h("div", { class: "dialog-box-align-right close-button", onClick: () => this.onCloseClickHandler() }, index.h("tttx-icon", { class: "dialog-box-icon-close dialog-box-clickable", icon: "close", color: "black" })))));
40
+ }
41
+ renderContent(content) {
42
+ if (content.isCustomHtml) {
43
+ const cleanHTML = domsanitiser_options.purify.sanitize(content.customHtml, domsanitiser_options.domSanitiserOptions);
44
+ return (index.h("div", { class: "dialog-box-body" }, index.h("div", { innerHTML: cleanHTML })));
45
+ }
46
+ else {
47
+ return (index.h("div", { class: "dialog-box-body" }, index.h("span", { class: "dialog-box-content" }, content.contentText)));
48
+ }
49
+ }
50
+ renderFooter(footer) {
51
+ const button = footer.buttons;
52
+ const button1Enabled = button.length > 0;
53
+ const button2Enabled = button.length > 1;
54
+ const button3Enabled = button.length == 3;
55
+ const isMobile = this.elementSize === 'mobile';
56
+ return (index.h("div", { class: "dialog-box-footer" }, index.h("div", { class: "dialog-box-align-right" }, button3Enabled && (index.h("tttx-button", { class: "dialog-box-spacing-button", onClick: () => this.onButtonClickHandler(3), design: button[2].type, notext: isMobile, icon: button[2].icon }, !isMobile && button[2].name)), button2Enabled && (index.h("tttx-button", { class: "dialog-box-spacing-button", onClick: () => this.onButtonClickHandler(2), design: button[1].type, icon: button[1].icon }, button[1].name)), button1Enabled && (index.h("tttx-button", { onClick: () => this.onButtonClickHandler(1), design: button[0].type, icon: button[0].icon }, button[0].name)))));
57
+ }
58
+ componentWillLoad() {
59
+ if (window.innerWidth < 698) {
60
+ this.elementSize = 'mobile';
61
+ }
62
+ else {
63
+ this.elementSize = this.size;
64
+ }
65
+ }
66
+ render() {
67
+ if (!this.data)
68
+ return;
69
+ if (typeof this.data === 'string') {
70
+ this._data = JSON.parse(this.data);
71
+ }
72
+ else {
73
+ this._data = this.data;
74
+ }
75
+ return (index.h("div", { class: `dialog-box ${this.elementSize}` }, index.h("div", { class: `dialog-box-padding dialog-box-header-box ${this._data.type || ''}` }, this.renderHeader(this._data.header)), index.h("div", { class: "dialog-box-padding dialog-box-body-box" }, this.renderContent(this._data.body)), index.h("div", { class: "dialog-box-padding dialog-box-footer-box" }, this.renderFooter(this._data.footer))));
76
+ }
77
+ };
78
+ TttxDialogBox.style = tttxDialogBoxCss;
79
+
80
+ exports.tttx_dialog_box = TttxDialogBox;