@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
@@ -41,6 +41,18 @@ const isComplexType = (o) => {
41
41
  o = typeof o;
42
42
  return o === 'object' || o === 'function';
43
43
  };
44
+ /**
45
+ * Helper method for querying a `meta` tag that contains a nonce value
46
+ * out of a DOM's head.
47
+ *
48
+ * @param doc The DOM containing the `head` to query against
49
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
50
+ * exists or the tag has no content.
51
+ */
52
+ function queryNonceMetaTagContent(doc) {
53
+ var _a, _b, _c;
54
+ 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;
55
+ }
44
56
  /**
45
57
  * Production h() function based on Preact by
46
58
  * Jason Miller (@developit)
@@ -49,7 +61,6 @@ const isComplexType = (o) => {
49
61
  *
50
62
  * Modified for Stencil's compiler and vdom
51
63
  */
52
- // const stack: any[] = [];
53
64
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
54
65
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
55
66
  const h = (nodeName, vnodeData, ...children) => {
@@ -108,6 +119,14 @@ const h = (nodeName, vnodeData, ...children) => {
108
119
  }
109
120
  return vnode;
110
121
  };
122
+ /**
123
+ * A utility function for creating a virtual DOM node from a tag and some
124
+ * possible text content.
125
+ *
126
+ * @param tag the tag for this element
127
+ * @param text possible text content for the node
128
+ * @returns a newly-minted virtual DOM node
129
+ */
111
130
  const newVNode = (tag, text) => {
112
131
  const vnode = {
113
132
  $flags$: 0,
@@ -125,6 +144,12 @@ const newVNode = (tag, text) => {
125
144
  return vnode;
126
145
  };
127
146
  const Host = {};
147
+ /**
148
+ * Check whether a given node is a Host node or not
149
+ *
150
+ * @param node the virtual DOM node to check
151
+ * @returns whether it's a Host node or not
152
+ */
128
153
  const isHost = (node) => node && node.$tag$ === Host;
129
154
  /**
130
155
  * Parse a new property value for a given property type.
@@ -213,6 +238,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
213
238
  styles.set(scopeId, style);
214
239
  };
215
240
  const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
241
+ var _a;
216
242
  let scopeId = getScopeId(cmpMeta);
217
243
  const style = styles.get(scopeId);
218
244
  // if an element is NOT connected then getRootNode() will return the wrong root node
@@ -232,6 +258,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
232
258
  styleElm = doc.createElement('style');
233
259
  styleElm.innerHTML = style;
234
260
  }
261
+ // Apply CSP nonce to the style tag if it exists
262
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
263
+ if (nonce != null) {
264
+ styleElm.setAttribute('nonce', nonce);
265
+ }
235
266
  styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
236
267
  }
237
268
  if (appliedStyles) {
@@ -466,6 +497,21 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
466
497
  }
467
498
  return elm;
468
499
  };
500
+ /**
501
+ * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
502
+ * add them to the DOM in the appropriate place.
503
+ *
504
+ * @param parentElm the DOM node which should be used as a parent for the new
505
+ * DOM nodes
506
+ * @param before a child of the `parentElm` which the new children should be
507
+ * inserted before (optional)
508
+ * @param parentVNode the parent virtual DOM node
509
+ * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
510
+ * @param startIdx the index in the child virtual DOM nodes at which to start
511
+ * creating DOM nodes (inclusive)
512
+ * @param endIdx the index in the child virtual DOM nodes at which to stop
513
+ * creating DOM nodes (inclusive)
514
+ */
469
515
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
470
516
  let containerElm = (parentElm);
471
517
  let childNode;
@@ -482,6 +528,19 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
482
528
  }
483
529
  }
484
530
  };
531
+ /**
532
+ * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
533
+ * This can be used to, for instance, clean up after a list of children which
534
+ * should no longer be shown.
535
+ *
536
+ * This function also handles some of Stencil's slot relocation logic.
537
+ *
538
+ * @param vnodes a list of virtual DOM nodes to remove
539
+ * @param startIdx the index at which to start removing nodes (inclusive)
540
+ * @param endIdx the index at which to stop removing nodes (inclusive)
541
+ * @param vnode a VNode
542
+ * @param elm an element
543
+ */
485
544
  const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
486
545
  for (; startIdx <= endIdx; ++startIdx) {
487
546
  if ((vnode = vnodes[startIdx])) {
@@ -711,7 +770,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
711
770
  *
712
771
  * So, in other words, if `key` attrs are not set on VNodes which may be
713
772
  * changing order within a `children` array or something along those lines then
714
- * we could obtain a false positive and then have to do needless re-rendering.
773
+ * we could obtain a false negative and then have to do needless re-rendering
774
+ * (i.e. we'd say two VNodes aren't equal when in fact they should be).
715
775
  *
716
776
  * @param leftVNode the first VNode to check
717
777
  * @param rightVNode the second VNode to check
@@ -784,6 +844,18 @@ const callNodeRefs = (vNode) => {
784
844
  vNode.$children$ && vNode.$children$.map(callNodeRefs);
785
845
  }
786
846
  };
847
+ /**
848
+ * The main entry point for Stencil's virtual DOM-based rendering engine
849
+ *
850
+ * Given a {@link d.HostRef} container and some virtual DOM nodes, this
851
+ * function will handle creating a virtual DOM tree with a single root, patching
852
+ * the current virtual DOM tree onto an old one (if any), dealing with slot
853
+ * relocation, and reflecting attributes.
854
+ *
855
+ * @param hostRef data needed to root and render the virtual DOM tree, such as
856
+ * the DOM node into which it should be rendered.
857
+ * @param renderFnResults the virtual DOM nodes to be rendered
858
+ */
787
859
  const renderVdom = (hostRef, renderFnResults) => {
788
860
  const hostElm = hostRef.$hostElement$;
789
861
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
@@ -824,6 +896,13 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
824
896
  const instance = hostRef.$lazyInstance$ ;
825
897
  let promise;
826
898
  if (isInitialLoad) {
899
+ {
900
+ hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
901
+ if (hostRef.$queuedListeners$) {
902
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
903
+ hostRef.$queuedListeners$ = null;
904
+ }
905
+ }
827
906
  {
828
907
  promise = safeCall(instance, 'componentWillLoad');
829
908
  }
@@ -1234,15 +1313,28 @@ const connectedCallback = (elm) => {
1234
1313
  initializeComponent(elm, hostRef, cmpMeta);
1235
1314
  }
1236
1315
  }
1316
+ else {
1317
+ // not the first time this has connected
1318
+ // reattach any event listeners to the host
1319
+ // since they would have been removed when disconnected
1320
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1321
+ }
1237
1322
  endConnected();
1238
1323
  }
1239
1324
  };
1240
1325
  const disconnectedCallback = (elm) => {
1241
1326
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1242
- getHostRef(elm);
1327
+ const hostRef = getHostRef(elm);
1328
+ {
1329
+ if (hostRef.$rmListeners$) {
1330
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1331
+ hostRef.$rmListeners$ = undefined;
1332
+ }
1333
+ }
1243
1334
  }
1244
1335
  };
1245
1336
  const bootstrapLazy = (lazyBundles, options = {}) => {
1337
+ var _a;
1246
1338
  const endBootstrap = createTime();
1247
1339
  const cmpTags = [];
1248
1340
  const exclude = options.exclude || [];
@@ -1266,6 +1358,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1266
1358
  {
1267
1359
  cmpMeta.$members$ = compactMeta[2];
1268
1360
  }
1361
+ {
1362
+ cmpMeta.$listeners$ = compactMeta[3];
1363
+ }
1269
1364
  {
1270
1365
  cmpMeta.$watchers$ = {};
1271
1366
  }
@@ -1321,6 +1416,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1321
1416
  {
1322
1417
  visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1323
1418
  visibilityStyle.setAttribute('data-styles', '');
1419
+ // Apply CSP nonce to the style tag if it exists
1420
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1421
+ if (nonce != null) {
1422
+ visibilityStyle.setAttribute('nonce', nonce);
1423
+ }
1324
1424
  head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1325
1425
  }
1326
1426
  // Process deferred connectedCallbacks now all components have been registered
@@ -1336,6 +1436,47 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1336
1436
  // Fallback appLoad event
1337
1437
  endBootstrap();
1338
1438
  };
1439
+ const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1440
+ if (listeners) {
1441
+ listeners.map(([flags, name, method]) => {
1442
+ const target = getHostListenerTarget(elm, flags) ;
1443
+ const handler = hostListenerProxy(hostRef, method);
1444
+ const opts = hostListenerOpts(flags);
1445
+ plt.ael(target, name, handler, opts);
1446
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1447
+ });
1448
+ }
1449
+ };
1450
+ const hostListenerProxy = (hostRef, methodName) => (ev) => {
1451
+ try {
1452
+ {
1453
+ if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
1454
+ // instance is ready, let's call it's member method for this event
1455
+ hostRef.$lazyInstance$[methodName](ev);
1456
+ }
1457
+ else {
1458
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1459
+ }
1460
+ }
1461
+ }
1462
+ catch (e) {
1463
+ consoleError(e);
1464
+ }
1465
+ };
1466
+ const getHostListenerTarget = (elm, flags) => {
1467
+ if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
1468
+ return win;
1469
+ return elm;
1470
+ };
1471
+ // prettier-ignore
1472
+ const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
1473
+ /**
1474
+ * Assigns the given value to the nonce property on the runtime platform object.
1475
+ * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1476
+ * @param nonce The value to be assigned to the platform nonce property.
1477
+ * @returns void
1478
+ */
1479
+ const setNonce = (nonce) => (plt.$nonce$ = nonce);
1339
1480
  const hostRefs = /*@__PURE__*/ new WeakMap();
1340
1481
  const getHostRef = (ref) => hostRefs.get(ref);
1341
1482
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
@@ -1354,6 +1495,7 @@ const registerHost = (elm, cmpMeta) => {
1354
1495
  elm['s-p'] = [];
1355
1496
  elm['s-rc'] = [];
1356
1497
  }
1498
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1357
1499
  return hostRefs.set(elm, hostRef);
1358
1500
  };
1359
1501
  const isMemberInElement = (elm, memberName) => memberName in elm;
@@ -1445,4 +1587,4 @@ const flush = () => {
1445
1587
  const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1446
1588
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1447
1589
 
1448
- export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r };
1590
+ export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
@@ -1,32 +1,17 @@
1
- import { B as BUILD, C as CSS, p as plt, w as win, a as promiseResolve, b as bootstrapLazy } from './index-e3e64631.js';
2
- import { g as globalScripts } from './app-globals-0f993ce5.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-018a3e54.js';
2
+ export { s as setNonce } from './index-018a3e54.js';
3
3
 
4
4
  /*
5
- Stencil Client Patch Esm v2.20.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  const patchEsm = () => {
8
- // NOTE!! This fn cannot use async/await!
9
- // @ts-ignore
10
- if (BUILD.cssVarShim && !(CSS && CSS.supports && CSS.supports('color', 'var(--c)'))) {
11
- // @ts-ignore
12
- return import(/* webpackChunkName: "polyfills-css-shim" */ './css-shim-9d54a2f2.js').then(() => {
13
- if ((plt.$cssShim$ = win.__cssshim)) {
14
- return plt.$cssShim$.i();
15
- }
16
- else {
17
- // for better minification
18
- return 0;
19
- }
20
- });
21
- }
22
8
  return promiseResolve();
23
9
  };
24
10
 
25
11
  const defineCustomElements = (win, options) => {
26
12
  if (typeof window === 'undefined') return Promise.resolve();
27
13
  return patchEsm().then(() => {
28
- globalScripts();
29
- return bootstrapLazy([["tttx-icon",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-button",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"design":[1]}]]],["tttx-filter",[[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",[[1,"tttx-list",{"data":[1025],"name":[1]}]]],["tttx-sorter",[[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",[[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",[[1,"tttx-form",{"formschema":[1032],"data":[1032],"submit":[64]}]]],["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]}]]]], options);
14
+ return bootstrapLazy([["tttx-dialog-box",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-filter",[[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",[[1,"tttx-list",{"data":[1025],"name":[1]}]]],["tttx-sorter",[[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",[[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",[[1,"tttx-form",{"formschema":[1032],"data":[1032],"submit":[64]}]]],["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]}]]],["tttx-button",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"design":[1]}]]]], options);
30
15
  });
31
16
  };
32
17
 
File without changes
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
1
+ var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
File without changes
File without changes
File without changes
File without changes
@@ -1,30 +1,30 @@
1
- import { r as registerInstance, h, e as Host } from './index-e3e64631.js';
1
+ import { r as registerInstance, h, H as Host } from './index-018a3e54.js';
2
2
 
3
3
  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}";
4
4
 
5
- const TttxButton = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this._iconcolor = 'black';
9
- this.notext = undefined;
10
- this.icon = undefined;
11
- this.iconposition = 'left';
12
- this.design = 'default';
13
- }
14
- componentWillLoad() {
15
- this._design = this.design;
16
- const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
17
- if (!designs.includes(this.design)) {
18
- this._design = 'default';
19
- }
20
- if (this._design === 'primary' || this._design === 'danger') {
21
- this._iconcolor = 'white';
22
- }
23
- }
24
- render() {
25
- return (h(Host, null, h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && h("div", { class: "button-content" }, h("slot", null)), this.icon && this.iconposition === 'right' && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
26
- }
27
- };
5
+ const TttxButton = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this._iconcolor = 'black';
9
+ this.notext = undefined;
10
+ this.icon = undefined;
11
+ this.iconposition = 'left';
12
+ this.design = 'default';
13
+ }
14
+ componentWillLoad() {
15
+ this._design = this.design;
16
+ const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
17
+ if (!designs.includes(this.design)) {
18
+ this._design = 'default';
19
+ }
20
+ if (this._design === 'primary' || this._design === 'danger') {
21
+ this._iconcolor = 'white';
22
+ }
23
+ }
24
+ render() {
25
+ return (h(Host, null, h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && h("div", { class: "button-content" }, h("slot", null)), this.icon && this.iconposition === 'right' && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
26
+ }
27
+ };
28
28
  TttxButton.style = tttxButtonCss;
29
29
 
30
30
  export { TttxButton as tttx_button };
@@ -0,0 +1,76 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index-018a3e54.js';
2
+ import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-3c7ded83.js';
3
+
4
+ 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}";
5
+
6
+ const TttxDialogBox = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.closeButtonClick = createEvent(this, "closeButtonClick", 6);
10
+ this.buttonClick = createEvent(this, "buttonClick", 7);
11
+ this.data = undefined;
12
+ this.size = 'regular';
13
+ this.elementSize = undefined;
14
+ }
15
+ handleResize() {
16
+ if (window.innerWidth < 698) {
17
+ this.elementSize = 'mobile';
18
+ }
19
+ else {
20
+ this.elementSize = this.size;
21
+ }
22
+ }
23
+ onCloseClickHandler() {
24
+ this.closeButtonClick.emit({ close: true });
25
+ }
26
+ onButtonClickHandler(index) {
27
+ this.buttonClick.emit({ buttonNumber: index, buttonClicked: true });
28
+ }
29
+ renderHeader(header) {
30
+ const title = header.title;
31
+ const iconName = header.iconName;
32
+ const iconColor = header.iconColor;
33
+ const iconEnabled = header.hasIcon ? true : false;
34
+ const closeEnabled = header.hasClose ? true : false;
35
+ return (h("div", { class: "dialog-box-header" }, iconEnabled && h("tttx-icon", { class: "dialog-box-icon", icon: iconName, color: iconColor }), h("h3", { class: "dialog-box-title" }, title), closeEnabled && (h("div", { class: "dialog-box-align-right close-button", onClick: () => this.onCloseClickHandler() }, h("tttx-icon", { class: "dialog-box-icon-close dialog-box-clickable", icon: "close", color: "black" })))));
36
+ }
37
+ renderContent(content) {
38
+ if (content.isCustomHtml) {
39
+ const cleanHTML = purify.sanitize(content.customHtml, domSanitiserOptions);
40
+ return (h("div", { class: "dialog-box-body" }, h("div", { innerHTML: cleanHTML })));
41
+ }
42
+ else {
43
+ return (h("div", { class: "dialog-box-body" }, h("span", { class: "dialog-box-content" }, content.contentText)));
44
+ }
45
+ }
46
+ renderFooter(footer) {
47
+ const button = footer.buttons;
48
+ const button1Enabled = button.length > 0;
49
+ const button2Enabled = button.length > 1;
50
+ const button3Enabled = button.length == 3;
51
+ const isMobile = this.elementSize === 'mobile';
52
+ return (h("div", { class: "dialog-box-footer" }, h("div", { class: "dialog-box-align-right" }, button3Enabled && (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 && (h("tttx-button", { class: "dialog-box-spacing-button", onClick: () => this.onButtonClickHandler(2), design: button[1].type, icon: button[1].icon }, button[1].name)), button1Enabled && (h("tttx-button", { onClick: () => this.onButtonClickHandler(1), design: button[0].type, icon: button[0].icon }, button[0].name)))));
53
+ }
54
+ componentWillLoad() {
55
+ if (window.innerWidth < 698) {
56
+ this.elementSize = 'mobile';
57
+ }
58
+ else {
59
+ this.elementSize = this.size;
60
+ }
61
+ }
62
+ render() {
63
+ if (!this.data)
64
+ return;
65
+ if (typeof this.data === 'string') {
66
+ this._data = JSON.parse(this.data);
67
+ }
68
+ else {
69
+ this._data = this.data;
70
+ }
71
+ return (h("div", { class: `dialog-box ${this.elementSize}` }, h("div", { class: `dialog-box-padding dialog-box-header-box ${this._data.type || ''}` }, this.renderHeader(this._data.header)), h("div", { class: "dialog-box-padding dialog-box-body-box" }, this.renderContent(this._data.body)), h("div", { class: "dialog-box-padding dialog-box-footer-box" }, this.renderFooter(this._data.footer))));
72
+ }
73
+ };
74
+ TttxDialogBox.style = tttxDialogBoxCss;
75
+
76
+ export { TttxDialogBox as tttx_dialog_box };