@3t-transform/threeteeui 1.9.101 → 1.9.103

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 (418) hide show
  1. package/dist/cjs/{auto-be8ad100.js → auto-356ad09b.js} +177 -177
  2. package/dist/cjs/{domsanitiser.options-55ce2d65.js → domsanitiser.options-065dbed8.js} +12 -12
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{tttx-action-dropdown_1_9_101.cjs.entry.js → tttx-action-dropdown_1_9_103.cjs.entry.js} +51 -51
  5. package/dist/cjs/{tttx-button-v2_1_9_101.cjs.entry.js → tttx-button-v2_1_9_103.cjs.entry.js} +147 -147
  6. package/dist/cjs/{tttx-button_1_9_101.cjs.entry.js → tttx-button_1_9_103.cjs.entry.js} +26 -26
  7. package/dist/cjs/{tttx-chart_1_9_101.cjs.entry.js → tttx-chart_1_9_103.cjs.entry.js} +524 -524
  8. package/dist/cjs/{tttx-checkbox-group-caption_1_9_101.cjs.entry.js → tttx-checkbox-group-caption_1_9_103.cjs.entry.js} +9 -9
  9. package/dist/cjs/{tttx-checkbox-group-heading_1_9_101.cjs.entry.js → tttx-checkbox-group-heading_1_9_103.cjs.entry.js} +9 -9
  10. package/dist/cjs/{tttx-checkbox-group_1_9_101.cjs.entry.js → tttx-checkbox-group_1_9_103.cjs.entry.js} +9 -9
  11. package/dist/cjs/{tttx-checkbox_1_9_101.cjs.entry.js → tttx-checkbox_1_9_103.cjs.entry.js} +33 -33
  12. package/dist/cjs/{tttx-comments_1_9_101.cjs.entry.js → tttx-comments_1_9_103.cjs.entry.js} +204 -204
  13. package/dist/cjs/{tttx-data-pattern_1_9_101.cjs.entry.js → tttx-data-pattern_1_9_103.cjs.entry.js} +20 -20
  14. package/dist/cjs/{tttx-datacard_1_9_101.cjs.entry.js → tttx-datacard_1_9_103.cjs.entry.js} +43 -43
  15. package/dist/cjs/tttx-date-range-picker.cjs.entry.js +212 -212
  16. package/dist/cjs/{tttx-dialog-box_1_9_101.cjs.entry.js → tttx-dialog-box_1_9_103.cjs.entry.js} +94 -94
  17. package/dist/cjs/{tttx-dialog_1_9_101.cjs.entry.js → tttx-dialog_1_9_103.cjs.entry.js} +69 -69
  18. package/dist/cjs/{tttx-expander_1_9_101.cjs.entry.js → tttx-expander_1_9_103.cjs.entry.js} +28 -28
  19. package/dist/cjs/{tttx-filter_1_9_101_4.cjs.entry.js → tttx-filter_1_9_103_4.cjs.entry.js} +386 -386
  20. package/dist/cjs/{tttx-form_1_9_101.cjs.entry.js → tttx-form_1_9_103.cjs.entry.js} +985 -985
  21. package/dist/cjs/{tttx-graph_1_9_101.cjs.entry.js → tttx-graph_1_9_103.cjs.entry.js} +124 -124
  22. package/dist/cjs/{tttx-icon_1_9_101.cjs.entry.js → tttx-icon_1_9_103.cjs.entry.js} +24 -24
  23. package/dist/cjs/{tttx-keyvalue-block_1_9_101.cjs.entry.js → tttx-keyvalue-block_1_9_103.cjs.entry.js} +62 -62
  24. package/dist/cjs/{tttx-loading-spinner_1_9_101_3.cjs.entry.js → tttx-loading-spinner_1_9_103_3.cjs.entry.js} +172 -172
  25. package/dist/cjs/{tttx-multiselect-box_1_9_101.cjs.entry.js → tttx-multiselect-box_1_9_103.cjs.entry.js} +175 -175
  26. package/dist/cjs/{tttx-percentage-bar_1_9_101.cjs.entry.js → tttx-percentage-bar_1_9_103.cjs.entry.js} +56 -56
  27. package/dist/cjs/{tttx-qrcode_1_9_101.cjs.entry.js → tttx-qrcode_1_9_103.cjs.entry.js} +28 -28
  28. package/dist/cjs/{tttx-range-slider_1_9_101.cjs.entry.js → tttx-range-slider_1_9_103.cjs.entry.js} +185 -185
  29. package/dist/cjs/{tttx-select-box_1_9_101.cjs.entry.js → tttx-select-box_1_9_103.cjs.entry.js} +239 -239
  30. package/dist/cjs/{tttx-skeleton_loader_1_9_101.cjs.entry.js → tttx-skeleton_loader_1_9_103.cjs.entry.js} +30 -30
  31. package/dist/cjs/{tttx-table_1_9_101.cjs.entry.js → tttx-table_1_9_103.cjs.entry.js} +72 -72
  32. package/dist/cjs/{tttx-tabs_1_9_101.cjs.entry.js → tttx-tabs_1_9_103.cjs.entry.js} +103 -103
  33. package/dist/cjs/{tttx-tag-v2_1_9_101.cjs.entry.js → tttx-tag-v2_1_9_103.cjs.entry.js} +72 -72
  34. package/dist/cjs/{tttx-textarea_1_9_101.cjs.entry.js → tttx-textarea_1_9_103.cjs.entry.js} +50 -50
  35. package/dist/cjs/{tttx-toggle_1_9_101.cjs.entry.js → tttx-toggle_1_9_103.cjs.entry.js} +30 -30
  36. package/dist/cjs/{tttx-tooltip_1_9_101.cjs.entry.js → tttx-tooltip_1_9_103.cjs.entry.js} +87 -87
  37. package/dist/cjs/{tttx-tree-view_1_9_101.cjs.entry.js → tttx-tree-view_1_9_103.cjs.entry.js} +342 -342
  38. package/dist/cjs/tttx.cjs.js +1 -1
  39. package/dist/collection/components/atoms/tttx-button/tttx-button.js +129 -129
  40. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +40 -40
  41. package/dist/collection/components/atoms/tttx-button-v2/tttx-button-v2.css +1 -1
  42. package/dist/collection/components/atoms/tttx-button-v2/tttx-button-v2.js +436 -436
  43. package/dist/collection/components/atoms/tttx-button-v2/tttx-button-v2.stories.js +143 -143
  44. package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.js +154 -154
  45. package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.stories.js +58 -58
  46. package/dist/collection/components/atoms/tttx-datacard/tttx-datacard.js +186 -186
  47. package/dist/collection/components/atoms/tttx-datacard/tttx-datacard.stories.js +92 -92
  48. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +92 -92
  49. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +26 -26
  50. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +137 -137
  51. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +94 -94
  52. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +194 -194
  53. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +53 -53
  54. package/dist/collection/components/atoms/tttx-percentage-bar/tttx-percentage-bar.js +168 -168
  55. package/dist/collection/components/atoms/tttx-percentage-bar/tttx-percentage-bar.stories.js +52 -52
  56. package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.js +81 -81
  57. package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.stories.js +22 -22
  58. package/dist/collection/components/atoms/tttx-skeleton-loader/tttx-skeleton-loader.js +225 -225
  59. package/dist/collection/components/atoms/tttx-skeleton-loader/tttx-skeleton-loader.stories.js +44 -44
  60. package/dist/collection/components/atoms/tttx-tag/tttx-tag.js +157 -157
  61. package/dist/collection/components/atoms/tttx-tag/tttx-tag.stories.js +53 -53
  62. package/dist/collection/components/atoms/tttx-tag-v2/tttx-tag-v2.js +281 -281
  63. package/dist/collection/components/atoms/tttx-tag-v2/tttx-tag-v2.stories.js +84 -84
  64. package/dist/collection/components/atoms/tttx-toggle/tttx-toggle.js +84 -84
  65. package/dist/collection/components/atoms/tttx-toggle/tttx-toggle.stories.js +8 -8
  66. package/dist/collection/components/domsanitiser.options.js +14 -14
  67. package/dist/collection/components/molecules/tttx-action-dropdown/tttx-action-dropdown.js +213 -213
  68. package/dist/collection/components/molecules/tttx-action-dropdown/tttx-action-dropdown.stories.js +55 -55
  69. package/dist/collection/components/molecules/tttx-chart/tttx-chart.js +793 -793
  70. package/dist/collection/components/molecules/tttx-chart/tttx-chart.stories.js +209 -209
  71. package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-caption.js +17 -17
  72. package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-heading.js +17 -17
  73. package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.js +18 -18
  74. package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.stories.js +62 -62
  75. package/dist/collection/components/molecules/tttx-comments/tttx-comments.js +536 -536
  76. package/dist/collection/components/molecules/tttx-comments/tttx-comments.stories.js +151 -151
  77. package/dist/collection/components/molecules/tttx-date-range-picker/tttx-date-range-picker.js +292 -292
  78. package/dist/collection/components/molecules/tttx-date-range-picker/tttx-date-range-picker.stories.js +48 -48
  79. package/dist/collection/components/molecules/tttx-dialog/icon-types.js +6 -6
  80. package/dist/collection/components/molecules/tttx-dialog/tttx-dialog.js +218 -218
  81. package/dist/collection/components/molecules/tttx-dialog/tttx-dialog.stories.js +50 -50
  82. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.js +246 -246
  83. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.js +314 -314
  84. package/dist/collection/components/molecules/tttx-expander/tttx-expander.js +134 -134
  85. package/dist/collection/components/molecules/tttx-expander/tttx-expander.stories.js +46 -46
  86. package/dist/collection/components/molecules/tttx-filter/tttx-filter.js +416 -416
  87. package/dist/collection/components/molecules/tttx-filter/tttx-filter.stories.js +81 -81
  88. package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +49 -49
  89. package/dist/collection/components/molecules/tttx-form/lib/timecomparatorChecks.js +64 -64
  90. package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +76 -76
  91. package/dist/collection/components/molecules/tttx-form/tttx-form.js +1267 -1267
  92. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +595 -595
  93. package/dist/collection/components/molecules/tttx-graph/gauge-label-plugin.js +14 -14
  94. package/dist/collection/components/molecules/tttx-graph/tttx-graph.js +184 -184
  95. package/dist/collection/components/molecules/tttx-graph/tttx-graph.stories.js +32 -32
  96. package/dist/collection/components/molecules/tttx-list/tttx-list.js +165 -165
  97. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +134 -134
  98. package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.js +499 -499
  99. package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.stories.js +151 -151
  100. package/dist/collection/components/molecules/tttx-range-slider/tttx-range-slider.js +304 -304
  101. package/dist/collection/components/molecules/tttx-range-slider/tttx-range-slider.stories.js +22 -22
  102. package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.js +671 -671
  103. package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.stories.js +140 -140
  104. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.js +253 -253
  105. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.stories.js +43 -43
  106. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +764 -764
  107. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +191 -191
  108. package/dist/collection/components/molecules/tttx-table/tttx-table.css +1 -1
  109. package/dist/collection/components/molecules/tttx-table/tttx-table.js +318 -318
  110. package/dist/collection/components/molecules/tttx-table/tttx-table.stories.js +191 -191
  111. package/dist/collection/components/molecules/tttx-table/tttx-table.types.js +1 -1
  112. package/dist/collection/components/molecules/tttx-tabs/tttx-tabs.js +253 -253
  113. package/dist/collection/components/molecules/tttx-tabs/tttx-tabs.stories.js +82 -82
  114. package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.js +420 -420
  115. package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.stories.js +81 -81
  116. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.js +73 -73
  117. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.stories.js +97 -97
  118. package/dist/collection/components/molecules/tttx-tooltip/tttx-tooltip.js +253 -253
  119. package/dist/collection/components/molecules/tttx-tooltip/tttx-tootip.stories.js +117 -117
  120. package/dist/collection/components/molecules/tttx-tree-view/helper/helper.js +1 -1
  121. package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.css +1 -1
  122. package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.js +463 -463
  123. package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.stories.js +402 -402
  124. package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.js +176 -176
  125. package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.js +28 -28
  126. package/dist/collection/components/palette.stories.js +7 -7
  127. package/dist/collection/icons.js +2838 -2838
  128. package/dist/collection/index.js +1 -1
  129. package/dist/collection/shared/domsanitiser.options.js +14 -14
  130. package/dist/components/auto.js +177 -177
  131. package/dist/components/domsanitiser.options.js +12 -12
  132. package/dist/components/index.d.ts +38 -38
  133. package/dist/components/index.js +38 -38
  134. package/dist/components/tttx-action-dropdown_1_9_103.d.ts +11 -0
  135. package/dist/components/{tttx-action-dropdown_1_9_101.js → tttx-action-dropdown_1_9_103.js} +81 -81
  136. package/dist/components/tttx-button-v2.js +182 -182
  137. package/dist/components/tttx-button-v2_1_9_103.d.ts +11 -0
  138. package/dist/components/{tttx-button-v2_1_9_101.js → tttx-button-v2_1_9_103.js} +2 -2
  139. package/dist/components/tttx-button.js +51 -51
  140. package/dist/components/{tttx-dialog_1_9_101.d.ts → tttx-button_1_9_103.d.ts} +4 -4
  141. package/dist/components/{tttx-button_1_9_101.js → tttx-button_1_9_103.js} +2 -2
  142. package/dist/components/{tttx-table_1_9_101.d.ts → tttx-chart_1_9_103.d.ts} +4 -4
  143. package/dist/components/{tttx-chart_1_9_101.js → tttx-chart_1_9_103.js} +574 -574
  144. package/dist/components/tttx-checkbox-group-caption_1_9_103.d.ts +11 -0
  145. package/dist/components/{tttx-checkbox-group-caption_1_9_101.js → tttx-checkbox-group-caption_1_9_103.js} +24 -24
  146. package/dist/components/tttx-checkbox-group-heading_1_9_103.d.ts +11 -0
  147. package/dist/components/{tttx-checkbox-group-heading_1_9_101.js → tttx-checkbox-group-heading_1_9_103.js} +24 -24
  148. package/dist/components/tttx-checkbox-group_1_9_103.d.ts +11 -0
  149. package/dist/components/{tttx-checkbox-group_1_9_101.js → tttx-checkbox-group_1_9_103.js} +25 -25
  150. package/dist/components/tttx-checkbox_1_9_103.d.ts +11 -0
  151. package/dist/components/{tttx-checkbox_1_9_101.js → tttx-checkbox_1_9_103.js} +59 -59
  152. package/dist/components/tttx-comments_1_9_103.d.ts +11 -0
  153. package/dist/components/{tttx-comments_1_9_101.js → tttx-comments_1_9_103.js} +241 -241
  154. package/dist/components/tttx-data-pattern_1_9_103.d.ts +11 -0
  155. package/dist/components/{tttx-data-pattern_1_9_101.js → tttx-data-pattern_1_9_103.js} +80 -80
  156. package/dist/components/tttx-datacard_1_9_103.d.ts +11 -0
  157. package/dist/components/{tttx-datacard_1_9_101.js → tttx-datacard_1_9_103.js} +79 -79
  158. package/dist/components/tttx-date-range-picker.js +242 -242
  159. package/dist/components/tttx-dialog-box_1_9_103.d.ts +11 -0
  160. package/dist/components/{tttx-dialog-box_1_9_101.js → tttx-dialog-box_1_9_103.js} +125 -125
  161. package/dist/components/{tttx-filter_1_9_101.d.ts → tttx-dialog_1_9_103.d.ts} +4 -4
  162. package/dist/components/{tttx-dialog_1_9_101.js → tttx-dialog_1_9_103.js} +103 -103
  163. package/dist/components/tttx-expander_1_9_103.d.ts +11 -0
  164. package/dist/components/{tttx-expander_1_9_101.js → tttx-expander_1_9_103.js} +55 -55
  165. package/dist/components/tttx-filter.js +217 -217
  166. package/dist/components/{tttx-button_1_9_101.d.ts → tttx-filter_1_9_103.d.ts} +4 -4
  167. package/dist/components/{tttx-filter_1_9_101.js → tttx-filter_1_9_103.js} +2 -2
  168. package/dist/components/{tttx-form_1_9_101.d.ts → tttx-form_1_9_103.d.ts} +4 -4
  169. package/dist/components/{tttx-form_1_9_101.js → tttx-form_1_9_103.js} +1039 -1039
  170. package/dist/components/tttx-graph.js +143 -143
  171. package/dist/components/{tttx-graph_1_9_101.d.ts → tttx-graph_1_9_103.d.ts} +4 -4
  172. package/dist/components/{tttx-graph_1_9_101.js → tttx-graph_1_9_103.js} +2 -2
  173. package/dist/components/tttx-icon.js +42 -42
  174. package/dist/components/{tttx-list_1_9_101.d.ts → tttx-icon_1_9_103.d.ts} +4 -4
  175. package/dist/components/{tttx-icon_1_9_101.js → tttx-icon_1_9_103.js} +2 -2
  176. package/dist/components/tttx-keyvalue-block_1_9_103.d.ts +11 -0
  177. package/dist/components/{tttx-keyvalue-block_1_9_101.js → tttx-keyvalue-block_1_9_103.js} +83 -83
  178. package/dist/components/tttx-list.js +92 -92
  179. package/dist/components/{tttx-tabs_1_9_101.d.ts → tttx-list_1_9_103.d.ts} +4 -4
  180. package/dist/components/{tttx-list_1_9_101.js → tttx-list_1_9_103.js} +2 -2
  181. package/dist/components/tttx-loading-spinner.js +92 -92
  182. package/dist/components/tttx-loading-spinner_1_9_103.d.ts +11 -0
  183. package/dist/components/{tttx-loading-spinner_1_9_101.js → tttx-loading-spinner_1_9_103.js} +2 -2
  184. package/dist/components/tttx-multiselect-box_1_9_103.d.ts +11 -0
  185. package/dist/components/{tttx-multiselect-box_1_9_101.js → tttx-multiselect-box_1_9_103.js} +231 -231
  186. package/dist/components/tttx-percentage-bar_1_9_103.d.ts +11 -0
  187. package/dist/components/{tttx-percentage-bar_1_9_101.js → tttx-percentage-bar_1_9_103.js} +80 -80
  188. package/dist/components/tttx-qrcode_1_9_103.d.ts +11 -0
  189. package/dist/components/{tttx-qrcode_1_9_101.js → tttx-qrcode_1_9_103.js} +47 -47
  190. package/dist/components/tttx-range-slider_1_9_103.d.ts +11 -0
  191. package/dist/components/{tttx-range-slider_1_9_101.js → tttx-range-slider_1_9_103.js} +208 -208
  192. package/dist/components/tttx-select-box.js +295 -295
  193. package/dist/components/tttx-select-box_1_9_103.d.ts +11 -0
  194. package/dist/components/{tttx-select-box_1_9_101.js → tttx-select-box_1_9_103.js} +2 -2
  195. package/dist/components/tttx-skeleton_loader_1_9_103.d.ts +11 -0
  196. package/dist/components/{tttx-skeleton_loader_1_9_101.js → tttx-skeleton_loader_1_9_103.js} +57 -57
  197. package/dist/components/tttx-sorter.js +136 -136
  198. package/dist/components/tttx-sorter_1_9_103.d.ts +11 -0
  199. package/dist/components/{tttx-sorter_1_9_101.js → tttx-sorter_1_9_103.js} +2 -2
  200. package/dist/components/tttx-standalone-input.js +136 -136
  201. package/dist/components/tttx-standalone-input_1_9_103.d.ts +11 -0
  202. package/dist/components/{tttx-standalone-input_1_9_101.js → tttx-standalone-input_1_9_103.js} +2 -2
  203. package/dist/components/{tttx-chart_1_9_101.d.ts → tttx-table_1_9_103.d.ts} +4 -4
  204. package/dist/components/{tttx-table_1_9_101.js → tttx-table_1_9_103.js} +109 -109
  205. package/dist/components/{tttx-icon_1_9_101.d.ts → tttx-tabs_1_9_103.d.ts} +4 -4
  206. package/dist/components/{tttx-tabs_1_9_101.js → tttx-tabs_1_9_103.js} +128 -128
  207. package/dist/components/{tttx-tag-v2_1_9_101.d.ts → tttx-tag-v2_1_9_103.d.ts} +4 -4
  208. package/dist/components/{tttx-tag-v2_1_9_101.js → tttx-tag-v2_1_9_103.js} +105 -105
  209. package/dist/components/tttx-tag.js +44 -44
  210. package/dist/components/{tttx-tag_1_9_101.d.ts → tttx-tag_1_9_103.d.ts} +4 -4
  211. package/dist/components/{tttx-tag_1_9_101.js → tttx-tag_1_9_103.js} +2 -2
  212. package/dist/components/tttx-textarea_1_9_103.d.ts +11 -0
  213. package/dist/components/{tttx-textarea_1_9_101.js → tttx-textarea_1_9_103.js} +83 -83
  214. package/dist/components/tttx-toggle_1_9_103.d.ts +11 -0
  215. package/dist/components/{tttx-toggle_1_9_101.js → tttx-toggle_1_9_103.js} +49 -49
  216. package/dist/components/tttx-toolbar.js +42 -42
  217. package/dist/components/tttx-toolbar_1_9_103.d.ts +11 -0
  218. package/dist/components/{tttx-toolbar_1_9_101.js → tttx-toolbar_1_9_103.js} +2 -2
  219. package/dist/components/tttx-tooltip_1_9_103.d.ts +11 -0
  220. package/dist/components/{tttx-tooltip_1_9_101.js → tttx-tooltip_1_9_103.js} +114 -114
  221. package/dist/components/tttx-tree-view_1_9_103.d.ts +11 -0
  222. package/dist/components/{tttx-tree-view_1_9_101.js → tttx-tree-view_1_9_103.js} +371 -371
  223. package/dist/esm/{auto-421f2656.js → auto-a07ee1b1.js} +177 -177
  224. package/dist/esm/{domsanitiser.options-38a67458.js → domsanitiser.options-2c1ef894.js} +12 -12
  225. package/dist/esm/loader.js +1 -1
  226. package/dist/esm/polyfills/core-js.js +0 -0
  227. package/dist/esm/polyfills/dom.js +0 -0
  228. package/dist/esm/polyfills/es5-html-element.js +0 -0
  229. package/dist/esm/polyfills/index.js +0 -0
  230. package/dist/esm/polyfills/system.js +0 -0
  231. package/dist/esm/{tttx-action-dropdown_1_9_101.entry.js → tttx-action-dropdown_1_9_103.entry.js} +51 -51
  232. package/dist/esm/{tttx-button-v2_1_9_101.entry.js → tttx-button-v2_1_9_103.entry.js} +147 -147
  233. package/dist/esm/{tttx-button_1_9_101.entry.js → tttx-button_1_9_103.entry.js} +26 -26
  234. package/dist/esm/{tttx-chart_1_9_101.entry.js → tttx-chart_1_9_103.entry.js} +524 -524
  235. package/dist/esm/{tttx-checkbox-group-caption_1_9_101.entry.js → tttx-checkbox-group-caption_1_9_103.entry.js} +9 -9
  236. package/dist/esm/{tttx-checkbox-group-heading_1_9_101.entry.js → tttx-checkbox-group-heading_1_9_103.entry.js} +9 -9
  237. package/dist/esm/{tttx-checkbox-group_1_9_101.entry.js → tttx-checkbox-group_1_9_103.entry.js} +9 -9
  238. package/dist/esm/{tttx-checkbox_1_9_101.entry.js → tttx-checkbox_1_9_103.entry.js} +33 -33
  239. package/dist/esm/{tttx-comments_1_9_101.entry.js → tttx-comments_1_9_103.entry.js} +204 -204
  240. package/dist/esm/{tttx-data-pattern_1_9_101.entry.js → tttx-data-pattern_1_9_103.entry.js} +20 -20
  241. package/dist/esm/{tttx-datacard_1_9_101.entry.js → tttx-datacard_1_9_103.entry.js} +43 -43
  242. package/dist/esm/tttx-date-range-picker.entry.js +212 -212
  243. package/dist/esm/{tttx-dialog-box_1_9_101.entry.js → tttx-dialog-box_1_9_103.entry.js} +94 -94
  244. package/dist/esm/{tttx-dialog_1_9_101.entry.js → tttx-dialog_1_9_103.entry.js} +69 -69
  245. package/dist/esm/{tttx-expander_1_9_101.entry.js → tttx-expander_1_9_103.entry.js} +28 -28
  246. package/dist/esm/{tttx-filter_1_9_101_4.entry.js → tttx-filter_1_9_103_4.entry.js} +383 -383
  247. package/dist/esm/{tttx-form_1_9_101.entry.js → tttx-form_1_9_103.entry.js} +985 -985
  248. package/dist/esm/{tttx-graph_1_9_101.entry.js → tttx-graph_1_9_103.entry.js} +124 -124
  249. package/dist/esm/{tttx-icon_1_9_101.entry.js → tttx-icon_1_9_103.entry.js} +24 -24
  250. package/dist/esm/{tttx-keyvalue-block_1_9_101.entry.js → tttx-keyvalue-block_1_9_103.entry.js} +62 -62
  251. package/dist/esm/{tttx-loading-spinner_1_9_101_3.entry.js → tttx-loading-spinner_1_9_103_3.entry.js} +170 -170
  252. package/dist/esm/{tttx-multiselect-box_1_9_101.entry.js → tttx-multiselect-box_1_9_103.entry.js} +175 -175
  253. package/dist/esm/{tttx-percentage-bar_1_9_101.entry.js → tttx-percentage-bar_1_9_103.entry.js} +56 -56
  254. package/dist/esm/{tttx-qrcode_1_9_101.entry.js → tttx-qrcode_1_9_103.entry.js} +28 -28
  255. package/dist/esm/{tttx-range-slider_1_9_101.entry.js → tttx-range-slider_1_9_103.entry.js} +185 -185
  256. package/dist/esm/{tttx-select-box_1_9_101.entry.js → tttx-select-box_1_9_103.entry.js} +239 -239
  257. package/dist/esm/{tttx-skeleton_loader_1_9_101.entry.js → tttx-skeleton_loader_1_9_103.entry.js} +30 -30
  258. package/dist/esm/{tttx-table_1_9_101.entry.js → tttx-table_1_9_103.entry.js} +72 -72
  259. package/dist/esm/{tttx-tabs_1_9_101.entry.js → tttx-tabs_1_9_103.entry.js} +103 -103
  260. package/dist/esm/{tttx-tag-v2_1_9_101.entry.js → tttx-tag-v2_1_9_103.entry.js} +72 -72
  261. package/dist/esm/{tttx-textarea_1_9_101.entry.js → tttx-textarea_1_9_103.entry.js} +50 -50
  262. package/dist/esm/{tttx-toggle_1_9_101.entry.js → tttx-toggle_1_9_103.entry.js} +30 -30
  263. package/dist/esm/{tttx-tooltip_1_9_101.entry.js → tttx-tooltip_1_9_103.entry.js} +87 -87
  264. package/dist/esm/{tttx-tree-view_1_9_101.entry.js → tttx-tree-view_1_9_103.entry.js} +342 -342
  265. package/dist/esm/tttx.js +1 -1
  266. package/dist/tttx/{p-b3f49d83.entry.js → p-0c5bc253.entry.js} +1 -1
  267. package/dist/tttx/{p-82b4e575.entry.js → p-10d2d044.entry.js} +1 -1
  268. package/dist/tttx/p-1623f3cf.entry.js +1 -1
  269. package/dist/tttx/{p-b161205b.entry.js → p-16aa3f67.entry.js} +1 -1
  270. package/dist/tttx/p-21707b8d.entry.js +1 -1
  271. package/dist/tttx/p-2251ab85.entry.js +1 -1
  272. package/dist/tttx/p-2d19c46c.entry.js +1 -1
  273. package/dist/tttx/p-358eaa44.entry.js +1 -1
  274. package/dist/tttx/p-362999b3.entry.js +1 -1
  275. package/dist/tttx/p-3ec67d75.entry.js +1 -1
  276. package/dist/tttx/p-44f0af69.entry.js +1 -1
  277. package/dist/tttx/p-4664d065.entry.js +1 -1
  278. package/dist/tttx/{p-00a849cf.entry.js → p-486ca932.entry.js} +1 -1
  279. package/dist/tttx/{p-e21e3a9c.entry.js → p-59115c8f.entry.js} +1 -1
  280. package/dist/tttx/p-5d289334.entry.js +1 -1
  281. package/dist/tttx/p-6ec18b4a.entry.js +1 -1
  282. package/dist/tttx/{p-a59ad197.entry.js → p-700c2816.entry.js} +1 -1
  283. package/dist/tttx/p-7b5b0670.entry.js +1 -1
  284. package/dist/tttx/p-7d1712fe.entry.js +1 -1
  285. package/dist/tttx/{p-41b69e01.entry.js → p-8f85ab3e.entry.js} +1 -1
  286. package/dist/tttx/p-a1b8ecda.entry.js +1 -1
  287. package/dist/tttx/p-a43e2c5e.entry.js +1 -1
  288. package/dist/tttx/p-b8cc0cb2.entry.js +1 -1
  289. package/dist/tttx/p-b9003a76.entry.js +1 -1
  290. package/dist/tttx/p-bb59054f.entry.js +1 -1
  291. package/dist/tttx/p-c66bc14c.entry.js +1 -1
  292. package/dist/tttx/p-c8051143.entry.js +1 -1
  293. package/dist/tttx/p-ca93f786.entry.js +1 -1
  294. package/dist/tttx/p-d21b0507.entry.js +1 -1
  295. package/dist/tttx/p-d945d492.entry.js +1 -1
  296. package/dist/tttx/{p-34e0e487.entry.js → p-df708b75.entry.js} +2 -2
  297. package/dist/tttx/p-f0c1380f.entry.js +1 -1
  298. package/dist/tttx/{p-0bb158ce.js → p-f411d1e5.js} +2 -2
  299. package/dist/tttx/{p-d4c4edbd.entry.js → p-fa25ee03.entry.js} +1 -1
  300. package/dist/tttx/{p-41f0bf7f.entry.js → p-fbdd1046.entry.js} +1 -1
  301. package/dist/tttx/tttx.esm.js +1 -1
  302. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +11 -11
  303. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +11 -11
  304. package/dist/types/components/atoms/tttx-button-v2/tttx-button-v2.d.ts +36 -36
  305. package/dist/types/components/atoms/tttx-button-v2/tttx-button-v2.stories.d.ts +68 -68
  306. package/dist/types/components/atoms/tttx-checkbox/tttx-checkbox.d.ts +17 -17
  307. package/dist/types/components/atoms/tttx-datacard/tttx-datacard.d.ts +21 -21
  308. package/dist/types/components/atoms/tttx-datacard/tttx-datacard.stories.d.ts +44 -44
  309. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +9 -9
  310. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +25 -25
  311. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +13 -13
  312. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +11 -11
  313. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +23 -23
  314. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +47 -47
  315. package/dist/types/components/atoms/tttx-percentage-bar/tttx-percentage-bar.d.ts +22 -22
  316. package/dist/types/components/atoms/tttx-percentage-bar/tttx-percentage-bar.stories.d.ts +10 -10
  317. package/dist/types/components/atoms/tttx-qrcode/tttx-qrcode.d.ts +8 -8
  318. package/dist/types/components/atoms/tttx-qrcode/tttx-qrcode.stories.d.ts +23 -23
  319. package/dist/types/components/atoms/tttx-skeleton-loader/tttx-skeleton-loader.d.ts +14 -14
  320. package/dist/types/components/atoms/tttx-tag/tttx-tag.d.ts +10 -10
  321. package/dist/types/components/atoms/tttx-tag/tttx-tag.stories.d.ts +51 -51
  322. package/dist/types/components/atoms/tttx-tag-v2/tttx-tag-v2.d.ts +15 -15
  323. package/dist/types/components/atoms/tttx-tag-v2/tttx-tag-v2.stories.d.ts +48 -48
  324. package/dist/types/components/atoms/tttx-toggle/tttx-toggle.d.ts +11 -11
  325. package/dist/types/components/atoms/tttx-toggle/tttx-toggle.stories.d.ts +6 -6
  326. package/dist/types/components/domsanitiser.options.d.ts +10 -10
  327. package/dist/types/components/molecules/tttx-action-dropdown/tttx-action-dropdown.d.ts +21 -21
  328. package/dist/types/components/molecules/tttx-chart/tttx-chart.d.ts +60 -60
  329. package/dist/types/components/molecules/tttx-chart/tttx-chart.stories.d.ts +38 -38
  330. package/dist/types/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-caption.d.ts +3 -3
  331. package/dist/types/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-heading.d.ts +3 -3
  332. package/dist/types/components/molecules/tttx-checkbox-group/tttx-checkbox-group.d.ts +3 -3
  333. package/dist/types/components/molecules/tttx-checkbox-group/tttx-checkbox-group.stories.d.ts +15 -15
  334. package/dist/types/components/molecules/tttx-comments/tttx-comments.d.ts +68 -68
  335. package/dist/types/components/molecules/tttx-date-range-picker/tttx-date-range-picker.d.ts +42 -42
  336. package/dist/types/components/molecules/tttx-dialog/icon-types.d.ts +18 -18
  337. package/dist/types/components/molecules/tttx-dialog/tttx-dialog.d.ts +27 -27
  338. package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.d.ts +26 -26
  339. package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.d.ts +24 -24
  340. package/dist/types/components/molecules/tttx-expander/tttx-expander.d.ts +16 -16
  341. package/dist/types/components/molecules/tttx-filter/tttx-filter.d.ts +44 -44
  342. package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +14 -14
  343. package/dist/types/components/molecules/tttx-form/lib/timecomparatorChecks.d.ts +4 -4
  344. package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +15 -15
  345. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +297 -297
  346. package/dist/types/components/molecules/tttx-graph/gauge-label-plugin.d.ts +4 -4
  347. package/dist/types/components/molecules/tttx-graph/tttx-graph.d.ts +13 -13
  348. package/dist/types/components/molecules/tttx-graph/tttx-graph.stories.d.ts +26 -26
  349. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +23 -23
  350. package/dist/types/components/molecules/tttx-multiselect-box/tttx-multiselect-box.d.ts +50 -50
  351. package/dist/types/components/molecules/tttx-range-slider/tttx-range-slider.d.ts +45 -45
  352. package/dist/types/components/molecules/tttx-range-slider/tttx-range-slider.stories.d.ts +7 -7
  353. package/dist/types/components/molecules/tttx-select-box/tttx-select-box.d.ts +55 -55
  354. package/dist/types/components/molecules/tttx-select-box/tttx-select-box.stories.d.ts +28 -28
  355. package/dist/types/components/molecules/tttx-sorter/tttx-sorter.d.ts +21 -21
  356. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +69 -69
  357. package/dist/types/components/molecules/tttx-table/tttx-table.d.ts +32 -32
  358. package/dist/types/components/molecules/tttx-table/tttx-table.types.d.ts +6 -6
  359. package/dist/types/components/molecules/tttx-tabs/tttx-tabs.d.ts +25 -25
  360. package/dist/types/components/molecules/tttx-textarea/tttx-textarea.d.ts +42 -42
  361. package/dist/types/components/molecules/tttx-textarea/tttx-textarea.stories.d.ts +89 -89
  362. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.d.ts +8 -8
  363. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.stories.d.ts +19 -19
  364. package/dist/types/components/molecules/tttx-tooltip/tttx-tooltip.d.ts +37 -37
  365. package/dist/types/components/molecules/tttx-tooltip/tttx-tootip.stories.d.ts +12 -12
  366. package/dist/types/components/molecules/tttx-tree-view/helper/helper.d.ts +24 -24
  367. package/dist/types/components/molecules/tttx-tree-view/tttx-tree-view.d.ts +57 -57
  368. package/dist/types/components/organisms/tttx-data-pattern/tttx-data-pattern.d.ts +11 -11
  369. package/dist/types/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.d.ts +13 -13
  370. package/dist/types/components/palette.stories.d.ts +6 -6
  371. package/dist/types/components.d.ts +451 -451
  372. package/dist/types/icons.d.ts +2 -2
  373. package/dist/types/index.d.ts +1 -1
  374. package/dist/types/shared/domsanitiser.options.d.ts +10 -10
  375. package/package.json +1 -1
  376. package/dist/components/tttx-action-dropdown_1_9_101.d.ts +0 -11
  377. package/dist/components/tttx-button-v2_1_9_101.d.ts +0 -11
  378. package/dist/components/tttx-checkbox-group-caption_1_9_101.d.ts +0 -11
  379. package/dist/components/tttx-checkbox-group-heading_1_9_101.d.ts +0 -11
  380. package/dist/components/tttx-checkbox-group_1_9_101.d.ts +0 -11
  381. package/dist/components/tttx-checkbox_1_9_101.d.ts +0 -11
  382. package/dist/components/tttx-comments_1_9_101.d.ts +0 -11
  383. package/dist/components/tttx-data-pattern_1_9_101.d.ts +0 -11
  384. package/dist/components/tttx-datacard_1_9_101.d.ts +0 -11
  385. package/dist/components/tttx-dialog-box_1_9_101.d.ts +0 -11
  386. package/dist/components/tttx-expander_1_9_101.d.ts +0 -11
  387. package/dist/components/tttx-keyvalue-block_1_9_101.d.ts +0 -11
  388. package/dist/components/tttx-loading-spinner_1_9_101.d.ts +0 -11
  389. package/dist/components/tttx-multiselect-box_1_9_101.d.ts +0 -11
  390. package/dist/components/tttx-percentage-bar_1_9_101.d.ts +0 -11
  391. package/dist/components/tttx-qrcode_1_9_101.d.ts +0 -11
  392. package/dist/components/tttx-range-slider_1_9_101.d.ts +0 -11
  393. package/dist/components/tttx-select-box_1_9_101.d.ts +0 -11
  394. package/dist/components/tttx-skeleton_loader_1_9_101.d.ts +0 -11
  395. package/dist/components/tttx-sorter_1_9_101.d.ts +0 -11
  396. package/dist/components/tttx-standalone-input_1_9_101.d.ts +0 -11
  397. package/dist/components/tttx-textarea_1_9_101.d.ts +0 -11
  398. package/dist/components/tttx-toggle_1_9_101.d.ts +0 -11
  399. package/dist/components/tttx-toolbar_1_9_101.d.ts +0 -11
  400. package/dist/components/tttx-tooltip_1_9_101.d.ts +0 -11
  401. package/dist/components/tttx-tree-view_1_9_101.d.ts +0 -11
  402. package/dist/types/components/atoms/tttx-checkbox/tttx-checkbox.stories.d.ts +0 -47
  403. package/dist/types/components/atoms/tttx-skeleton-loader/tttx-skeleton-loader.stories.d.ts +0 -58
  404. package/dist/types/components/molecules/tttx-action-dropdown/tttx-action-dropdown.stories.d.ts +0 -36
  405. package/dist/types/components/molecules/tttx-comments/tttx-comments.stories.d.ts +0 -8
  406. package/dist/types/components/molecules/tttx-date-range-picker/tttx-date-range-picker.stories.d.ts +0 -28
  407. package/dist/types/components/molecules/tttx-dialog/tttx-dialog.stories.d.ts +0 -42
  408. package/dist/types/components/molecules/tttx-expander/tttx-expander.stories.d.ts +0 -27
  409. package/dist/types/components/molecules/tttx-filter/tttx-filter.stories.d.ts +0 -76
  410. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +0 -718
  411. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +0 -15
  412. package/dist/types/components/molecules/tttx-multiselect-box/tttx-multiselect-box.stories.d.ts +0 -17
  413. package/dist/types/components/molecules/tttx-sorter/tttx-sorter.stories.d.ts +0 -30
  414. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +0 -150
  415. package/dist/types/components/molecules/tttx-table/tttx-table.stories.d.ts +0 -79
  416. package/dist/types/components/molecules/tttx-tabs/tttx-tabs.stories.d.ts +0 -13
  417. package/dist/types/components/molecules/tttx-tree-view/tttx-tree-view.stories.d.ts +0 -15
  418. /package/dist/tttx/{p-55799798.js → p-62d92a44.js} +0 -0
@@ -1,671 +1,671 @@
1
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
- import { h, Host, Fragment } from '@stencil/core';
3
- import * as DOMPurify from 'dompurify';
4
- import domSanitiserOptions from '../../../shared/domsanitiser.options';
5
- export class TttxSelectBox {
6
- constructor() {
7
- this.bodyOffset = {};
8
- this.closeSelectBoxHandler = () => {
9
- if (this.open) {
10
- this.open = false;
11
- }
12
- };
13
- this.optionsData = null;
14
- this.label = undefined;
15
- this.inline = undefined;
16
- this.placeholder = '';
17
- this.searchEnabled = undefined;
18
- this.selectedValue = undefined;
19
- this.useExternalFiltering = undefined;
20
- this.useExternalPaginatedFiltering = undefined;
21
- this.isAllExternalDataLoaded = undefined;
22
- this.isLoading = undefined;
23
- this.readOnly = undefined;
24
- this.priorityLabel = 'Priority Group';
25
- this.nonPriorityLabel = 'Non Priority Group';
26
- this.clearable = false;
27
- this.showErrorMsg = undefined;
28
- this.showErrorBubble = false;
29
- this.errorMsg = undefined;
30
- this.open = false;
31
- this.selectedItem = undefined;
32
- this.searchTerm = '';
33
- this.loadingNextExternalPage = false;
34
- }
35
- async componentWillLoad() {
36
- if (this.optionsData) {
37
- this.setOptionsData();
38
- const matchingItems = this._optionsData.filter((item) => {
39
- return item.value == this.selectedValue;
40
- });
41
- this.selectedItem = matchingItems.length > 0 ? matchingItems[0] : undefined;
42
- }
43
- this._isAllExternalDataLoaded = this.isAllExternalDataLoaded;
44
- }
45
- async setOptionsData() {
46
- this._optionsData = typeof this.optionsData === 'string' ? JSON.parse(this.optionsData) : this.optionsData;
47
- if (this.open) {
48
- this.calculateDropdownMenuOffset();
49
- }
50
- this.loadingNextExternalPage = false;
51
- }
52
- updateAllLoadedBool() {
53
- this._isAllExternalDataLoaded = this.isAllExternalDataLoaded;
54
- }
55
- async setSelectedItem(value) {
56
- if (!value)
57
- return this.cleanSelectedItem();
58
- const item = this._optionsData.find(x => x.value.toLowerCase() === value.toLowerCase());
59
- if (!item)
60
- return this.cleanSelectedItem();
61
- this.selectedValue = item.value;
62
- this.selectedItem = item;
63
- }
64
- cleanSelectedItem() {
65
- this.selectedValue = undefined;
66
- this.selectedItem = undefined;
67
- this.selectItemEvent.emit(this.selectedItem);
68
- }
69
- componentDidLoad() {
70
- document.addEventListener('closeSelectBoxOnScroll', this.closeSelectBoxHandler);
71
- }
72
- componentWillUnload() {
73
- document.removeEventListener('closeSelectBoxOnScroll', this.closeSelectBoxHandler);
74
- }
75
- handleCloseSelectBox() {
76
- this.open = false;
77
- }
78
- handleBlur() {
79
- this.open = false;
80
- this.toggleOpen.emit(false);
81
- }
82
- onDropdownClicked() {
83
- if (this.readOnly)
84
- return;
85
- this.open = !this.open;
86
- this.searchTerm = '';
87
- this.loadingNextExternalPage = false;
88
- this.calculateDropdownMenuOffset();
89
- this.toggleOpen.emit(this.open);
90
- }
91
- onItemSelected(option) {
92
- this.selectedItem = option;
93
- this.selectItemEvent.emit(this.selectedItem);
94
- this.handleBlur();
95
- }
96
- dropdownSelectorContent() {
97
- let title;
98
- let subtitle;
99
- const chevronIcon = this.open ? 'expand_less' : 'expand_more';
100
- const icon = h("tttx-icon_1_9_101", { icon: chevronIcon, color: "black" });
101
- let chevron = h("div", { class: "dropdown-selector-chevron" }, icon);
102
- if (!this.selectedItem) {
103
- title = h("div", { class: "placeholder" }, this.placeholder);
104
- return (h(Fragment, null, title, chevron));
105
- }
106
- else if (this.selectedItem.html) {
107
- title = h("div", { title: this.selectedItem.label, class: "truncated-text", innerHTML: this.selectedItem.html });
108
- return (h(Fragment, null, title, chevron));
109
- }
110
- else {
111
- title = (h("div", { title: this.selectedItem.label, class: "truncated-text" }, this.selectedItem.label));
112
- if (this.selectedItem.description) {
113
- subtitle = (h("div", { class: "description" }, h("p", null, this.selectedItem.description)));
114
- chevron = h("div", { class: "dropdown-selector-chevron-offset" }, icon);
115
- }
116
- return (h(Fragment, null, h("div", { class: "left-wrapper" }, title, subtitle), this.clearable && !this.readOnly &&
117
- h("tttx-icon_1_9_101", { class: "input-icon", style: { paddingTop: '5px', cursor: 'pointer' }, icon: 'close_small', onClick: this.cleanSelectedItem.bind(this) }), chevron));
118
- }
119
- }
120
- renderDropdownOptions(options) {
121
- let usingPriority = false;
122
- const priorityOptions = [];
123
- const nonPriorityOptions = [];
124
- for (const option of options) {
125
- // using priority groups if any item has the option set, so set true for first found
126
- usingPriority = usingPriority || option.prioritise === true;
127
- // don't include if it doesn't match the search term when searching
128
- if (this.searchEnabled &&
129
- (!this.useExternalFiltering && !this.useExternalPaginatedFiltering) &&
130
- option.label.toLowerCase().indexOf(this.searchTerm.toLowerCase()) === -1)
131
- continue;
132
- if (option.prioritise === true) {
133
- priorityOptions.push(option);
134
- continue;
135
- }
136
- nonPriorityOptions.push(option);
137
- }
138
- // render priority options at the top of the dropdown list
139
- return (h(Fragment, null, usingPriority && priorityOptions.length > 0 &&
140
- h(Fragment, null, h("tttx-tag_1_9_101", { class: 'priority-pill', text: this.priorityLabel, color: "#F0F0F0" }), priorityOptions.map((option) => this.dropdownOption(option))), nonPriorityOptions.length > 0 &&
141
- h(Fragment, null, usingPriority &&
142
- h("tttx-tag_1_9_101", { class: 'priority-pill', text: this.nonPriorityLabel, color: "#F0F0F0" }), nonPriorityOptions.map((option) => this.dropdownOption(option)))));
143
- }
144
- dropdownOption(option) {
145
- const selected = this.selectedItem && option.value === this.selectedItem.value;
146
- if (option.html) {
147
- const sanitisedHTML = DOMPurify.sanitize(option.html, domSanitiserOptions);
148
- return (h("div", { class: `dropdown-option ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label, innerHTML: sanitisedHTML }));
149
- }
150
- else if (option.description) {
151
- return (h("div", { class: `dropdown-option ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, option.label, h("div", { class: "description-dd" }, h("p", null, option.description))));
152
- }
153
- return (h("div", { class: `dropdown-option ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, option.label));
154
- }
155
- handleSearchInput(event) {
156
- const searchInput = event.target.value;
157
- if (this.useExternalFiltering || this.useExternalPaginatedFiltering) {
158
- // emit event with the latest search value
159
- clearTimeout(this.searchFilterTimeout);
160
- this.searchFilterTimeout = setTimeout((filterValue) => {
161
- this.searchUpdated.emit(filterValue);
162
- }, 500, searchInput);
163
- }
164
- this.searchTerm = searchInput;
165
- }
166
- calculateDropdownMenuOffset() {
167
- const dropdownSelector = this.el.shadowRoot.querySelector('.dropdown-selector');
168
- const clientRectangle = dropdownSelector.getBoundingClientRect();
169
- const viewportHeight = window.innerHeight;
170
- const viewportWidth = window.innerWidth;
171
- // Calculate the maximum dropdown menu height
172
- let dropdownMenuMaxHeight = Math.min(368, 36 * this._optionsData.length) + 8;
173
- if (this.searchEnabled)
174
- dropdownMenuMaxHeight += 52;
175
- // Determine if the dropdown would overflow the bottom of the viewport
176
- const availableSpaceBelow = viewportHeight - clientRectangle.bottom;
177
- const availableSpaceAbove = clientRectangle.top;
178
- // If there is no option data, add some default height to ensure the loading screen is fully visible.
179
- if (!this._optionsData.length) {
180
- dropdownMenuMaxHeight = 200;
181
- }
182
- let top, bottom, maxHeight;
183
- if (availableSpaceBelow >= dropdownMenuMaxHeight) {
184
- // Enough space below, show dropdown below
185
- top = clientRectangle.bottom + 'px';
186
- bottom = '';
187
- maxHeight = dropdownMenuMaxHeight + 'px';
188
- }
189
- else if (availableSpaceAbove >= dropdownMenuMaxHeight) {
190
- // Enough space above, show dropdown above
191
- top = '';
192
- bottom = (viewportHeight - clientRectangle.top) + 'px';
193
- maxHeight = dropdownMenuMaxHeight + 'px';
194
- }
195
- else {
196
- // No space above, no space below then calculating space base on dropdown height
197
- top = dropdownMenuMaxHeight - availableSpaceAbove + 'px';
198
- bottom = (dropdownMenuMaxHeight - availableSpaceBelow) + 'px';
199
- maxHeight = dropdownMenuMaxHeight + 'px';
200
- }
201
- this.bodyOffset = {
202
- position: 'fixed',
203
- left: Math.max(clientRectangle.left, 0) + 'px',
204
- width: Math.min(clientRectangle.width, viewportWidth - clientRectangle.left - 16) + 'px',
205
- top,
206
- bottom,
207
- maxHeight,
208
- zIndex: '10',
209
- overflowY: 'auto', // Allow scrolling if needed
210
- };
211
- }
212
- onSelectScroll(scrollEvent) {
213
- const selectDiv = scrollEvent.target;
214
- const scrollOffset = selectDiv.scrollHeight - selectDiv.scrollTop - selectDiv.offsetHeight;
215
- const isScrolledEnd = scrollOffset <= 5;
216
- if (this.useExternalPaginatedFiltering && isScrolledEnd && !this.loadingNextExternalPage && !this._isAllExternalDataLoaded) {
217
- this.loadingNextExternalPage = true;
218
- clearTimeout(this.selectEndReached);
219
- this.selectEndReached = setTimeout((filterValue) => {
220
- this.selectEndReachedEvent.emit(filterValue);
221
- }, 500, this.searchTerm);
222
- }
223
- }
224
- render() {
225
- if (!this.optionsData)
226
- return;
227
- const invalidClass = this.showErrorMsg ? 'invalid' : '';
228
- const readOnlyClass = this.readOnly ? 'dropdown-read-only' : '';
229
- return (h(Host, { class: this.inline ? 'inline' : 'block' }, this.label && h("div", { class: "label" }, this.label), h("div", { tabindex: "0", class: "dropdown-container" }, h("div", { class: ['dropdown-selector', invalidClass, readOnlyClass].join(' '), ref: el => (this.dropdownSelector = el), onClick: this.onDropdownClicked.bind(this) }, this.dropdownSelectorContent()), this.open && (h("div", { class: "dropdown-body-container" }, h("div", { class: "dropdown-body", style: Object.assign({ width: `${this.dropdownSelector.offsetWidth}px` }, this.bodyOffset) }, this.searchEnabled && (h("div", { class: "searchbox" }, h("tttx-standalone-input_1_9_101", { type: "text", label: "", required: true, showerrorbubble: false, iconleft: "search", onInput: this.handleSearchInput.bind(this) }))), h("div", { class: "dropdown-options-list", onScroll: this.onSelectScroll.bind(this) }, !this.isLoading && (this.renderDropdownOptions(this._optionsData)), (this.isLoading || this.loadingNextExternalPage) && (h("tttx-loading-spinner_1_9_101", { class: 'loading-style' })))))), this.showErrorBubble && (h("span", { class: ['errorBubble', this.showErrorMsg && this.errorMsg ? 'visible' : ''].join(' ') }, h("tttx-icon_1_9_101", { icon: "warning", color: "#dc0000", size: 16 }), " ", this.errorMsg)))));
230
- }
231
- static get is() { return "tttx-select-box_1_9_101"; }
232
- static get encapsulation() { return "shadow"; }
233
- static get originalStyleUrls() {
234
- return {
235
- "$": ["tttx-select-box.scss"]
236
- };
237
- }
238
- static get styleUrls() {
239
- return {
240
- "$": ["tttx-select-box.css"]
241
- };
242
- }
243
- static get properties() {
244
- return {
245
- "optionsData": {
246
- "type": "string",
247
- "mutable": false,
248
- "complexType": {
249
- "original": "string | SelectItem[]",
250
- "resolved": "SelectItem[] | string",
251
- "references": {
252
- "SelectItem": {
253
- "location": "import",
254
- "path": "./interfaces"
255
- }
256
- }
257
- },
258
- "required": false,
259
- "optional": false,
260
- "docs": {
261
- "tags": [],
262
- "text": ""
263
- },
264
- "attribute": "options-data",
265
- "reflect": false,
266
- "defaultValue": "null"
267
- },
268
- "label": {
269
- "type": "string",
270
- "mutable": false,
271
- "complexType": {
272
- "original": "string",
273
- "resolved": "string",
274
- "references": {}
275
- },
276
- "required": false,
277
- "optional": false,
278
- "docs": {
279
- "tags": [],
280
- "text": ""
281
- },
282
- "attribute": "label",
283
- "reflect": false
284
- },
285
- "inline": {
286
- "type": "boolean",
287
- "mutable": false,
288
- "complexType": {
289
- "original": "boolean",
290
- "resolved": "boolean",
291
- "references": {}
292
- },
293
- "required": false,
294
- "optional": false,
295
- "docs": {
296
- "tags": [],
297
- "text": ""
298
- },
299
- "attribute": "inline",
300
- "reflect": false
301
- },
302
- "placeholder": {
303
- "type": "string",
304
- "mutable": false,
305
- "complexType": {
306
- "original": "string",
307
- "resolved": "string",
308
- "references": {}
309
- },
310
- "required": false,
311
- "optional": false,
312
- "docs": {
313
- "tags": [],
314
- "text": ""
315
- },
316
- "attribute": "placeholder",
317
- "reflect": false,
318
- "defaultValue": "''"
319
- },
320
- "searchEnabled": {
321
- "type": "boolean",
322
- "mutable": false,
323
- "complexType": {
324
- "original": "boolean",
325
- "resolved": "boolean",
326
- "references": {}
327
- },
328
- "required": false,
329
- "optional": false,
330
- "docs": {
331
- "tags": [],
332
- "text": ""
333
- },
334
- "attribute": "search-enabled",
335
- "reflect": false
336
- },
337
- "selectedValue": {
338
- "type": "string",
339
- "mutable": false,
340
- "complexType": {
341
- "original": "string",
342
- "resolved": "string",
343
- "references": {}
344
- },
345
- "required": false,
346
- "optional": false,
347
- "docs": {
348
- "tags": [],
349
- "text": ""
350
- },
351
- "attribute": "selected-value",
352
- "reflect": false
353
- },
354
- "useExternalFiltering": {
355
- "type": "boolean",
356
- "mutable": false,
357
- "complexType": {
358
- "original": "boolean",
359
- "resolved": "boolean",
360
- "references": {}
361
- },
362
- "required": false,
363
- "optional": false,
364
- "docs": {
365
- "tags": [],
366
- "text": ""
367
- },
368
- "attribute": "use-external-filtering",
369
- "reflect": false
370
- },
371
- "useExternalPaginatedFiltering": {
372
- "type": "boolean",
373
- "mutable": false,
374
- "complexType": {
375
- "original": "boolean",
376
- "resolved": "boolean",
377
- "references": {}
378
- },
379
- "required": false,
380
- "optional": false,
381
- "docs": {
382
- "tags": [],
383
- "text": ""
384
- },
385
- "attribute": "use-external-paginated-filtering",
386
- "reflect": false
387
- },
388
- "isAllExternalDataLoaded": {
389
- "type": "boolean",
390
- "mutable": false,
391
- "complexType": {
392
- "original": "boolean",
393
- "resolved": "boolean",
394
- "references": {}
395
- },
396
- "required": false,
397
- "optional": false,
398
- "docs": {
399
- "tags": [],
400
- "text": ""
401
- },
402
- "attribute": "is-all-external-data-loaded",
403
- "reflect": false
404
- },
405
- "isLoading": {
406
- "type": "boolean",
407
- "mutable": false,
408
- "complexType": {
409
- "original": "boolean",
410
- "resolved": "boolean",
411
- "references": {}
412
- },
413
- "required": false,
414
- "optional": false,
415
- "docs": {
416
- "tags": [],
417
- "text": ""
418
- },
419
- "attribute": "is-loading",
420
- "reflect": false
421
- },
422
- "readOnly": {
423
- "type": "boolean",
424
- "mutable": false,
425
- "complexType": {
426
- "original": "boolean",
427
- "resolved": "boolean",
428
- "references": {}
429
- },
430
- "required": false,
431
- "optional": false,
432
- "docs": {
433
- "tags": [],
434
- "text": ""
435
- },
436
- "attribute": "read-only",
437
- "reflect": false
438
- },
439
- "priorityLabel": {
440
- "type": "string",
441
- "mutable": false,
442
- "complexType": {
443
- "original": "string",
444
- "resolved": "string",
445
- "references": {}
446
- },
447
- "required": false,
448
- "optional": false,
449
- "docs": {
450
- "tags": [],
451
- "text": ""
452
- },
453
- "attribute": "priority-label",
454
- "reflect": false,
455
- "defaultValue": "'Priority Group'"
456
- },
457
- "nonPriorityLabel": {
458
- "type": "string",
459
- "mutable": false,
460
- "complexType": {
461
- "original": "string",
462
- "resolved": "string",
463
- "references": {}
464
- },
465
- "required": false,
466
- "optional": false,
467
- "docs": {
468
- "tags": [],
469
- "text": ""
470
- },
471
- "attribute": "non-priority-label",
472
- "reflect": false,
473
- "defaultValue": "'Non Priority Group'"
474
- },
475
- "clearable": {
476
- "type": "boolean",
477
- "mutable": false,
478
- "complexType": {
479
- "original": "boolean",
480
- "resolved": "boolean",
481
- "references": {}
482
- },
483
- "required": false,
484
- "optional": false,
485
- "docs": {
486
- "tags": [],
487
- "text": ""
488
- },
489
- "attribute": "clearable",
490
- "reflect": false,
491
- "defaultValue": "false"
492
- },
493
- "showErrorMsg": {
494
- "type": "boolean",
495
- "mutable": false,
496
- "complexType": {
497
- "original": "boolean",
498
- "resolved": "boolean",
499
- "references": {}
500
- },
501
- "required": false,
502
- "optional": false,
503
- "docs": {
504
- "tags": [],
505
- "text": ""
506
- },
507
- "attribute": "show-error-msg",
508
- "reflect": false
509
- },
510
- "showErrorBubble": {
511
- "type": "boolean",
512
- "mutable": false,
513
- "complexType": {
514
- "original": "boolean",
515
- "resolved": "boolean",
516
- "references": {}
517
- },
518
- "required": false,
519
- "optional": false,
520
- "docs": {
521
- "tags": [],
522
- "text": ""
523
- },
524
- "attribute": "show-error-bubble",
525
- "reflect": false,
526
- "defaultValue": "false"
527
- },
528
- "errorMsg": {
529
- "type": "string",
530
- "mutable": false,
531
- "complexType": {
532
- "original": "string",
533
- "resolved": "string",
534
- "references": {}
535
- },
536
- "required": false,
537
- "optional": false,
538
- "docs": {
539
- "tags": [],
540
- "text": ""
541
- },
542
- "attribute": "error-msg",
543
- "reflect": false
544
- }
545
- };
546
- }
547
- static get states() {
548
- return {
549
- "open": {},
550
- "selectedItem": {},
551
- "searchTerm": {},
552
- "loadingNextExternalPage": {}
553
- };
554
- }
555
- static get events() {
556
- return [{
557
- "method": "selectItemEvent",
558
- "name": "selectItemEvent",
559
- "bubbles": false,
560
- "cancelable": true,
561
- "composed": true,
562
- "docs": {
563
- "tags": [],
564
- "text": ""
565
- },
566
- "complexType": {
567
- "original": "SelectItem",
568
- "resolved": "SelectItem",
569
- "references": {
570
- "SelectItem": {
571
- "location": "import",
572
- "path": "./interfaces"
573
- }
574
- }
575
- }
576
- }, {
577
- "method": "toggleOpen",
578
- "name": "toggleOpen",
579
- "bubbles": false,
580
- "cancelable": true,
581
- "composed": true,
582
- "docs": {
583
- "tags": [],
584
- "text": ""
585
- },
586
- "complexType": {
587
- "original": "boolean",
588
- "resolved": "boolean",
589
- "references": {}
590
- }
591
- }, {
592
- "method": "searchUpdated",
593
- "name": "multiselectSearchUpdated",
594
- "bubbles": true,
595
- "cancelable": true,
596
- "composed": true,
597
- "docs": {
598
- "tags": [],
599
- "text": ""
600
- },
601
- "complexType": {
602
- "original": "string",
603
- "resolved": "string",
604
- "references": {}
605
- }
606
- }, {
607
- "method": "selectEndReachedEvent",
608
- "name": "selectEndReached",
609
- "bubbles": true,
610
- "cancelable": true,
611
- "composed": true,
612
- "docs": {
613
- "tags": [],
614
- "text": ""
615
- },
616
- "complexType": {
617
- "original": "string",
618
- "resolved": "string",
619
- "references": {}
620
- }
621
- }];
622
- }
623
- static get methods() {
624
- return {
625
- "setSelectedItem": {
626
- "complexType": {
627
- "signature": "(value: string | undefined) => Promise<void>",
628
- "parameters": [{
629
- "tags": [],
630
- "text": ""
631
- }],
632
- "references": {
633
- "Promise": {
634
- "location": "global"
635
- }
636
- },
637
- "return": "Promise<void>"
638
- },
639
- "docs": {
640
- "text": "",
641
- "tags": []
642
- }
643
- }
644
- };
645
- }
646
- static get elementRef() { return "el"; }
647
- static get watchers() {
648
- return [{
649
- "propName": "optionsData",
650
- "methodName": "setOptionsData"
651
- }, {
652
- "propName": "isAllExternalDataLoaded",
653
- "methodName": "updateAllLoadedBool"
654
- }];
655
- }
656
- static get listeners() {
657
- return [{
658
- "name": "closeSelectBox",
659
- "method": "handleCloseSelectBox",
660
- "target": undefined,
661
- "capture": false,
662
- "passive": false
663
- }, {
664
- "name": "blur",
665
- "method": "handleBlur",
666
- "target": undefined,
667
- "capture": false,
668
- "passive": false
669
- }];
670
- }
671
- }
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { h, Host, Fragment } from '@stencil/core';
3
+ import * as DOMPurify from 'dompurify';
4
+ import domSanitiserOptions from '../../../shared/domsanitiser.options';
5
+ export class TttxSelectBox {
6
+ constructor() {
7
+ this.bodyOffset = {};
8
+ this.closeSelectBoxHandler = () => {
9
+ if (this.open) {
10
+ this.open = false;
11
+ }
12
+ };
13
+ this.optionsData = null;
14
+ this.label = undefined;
15
+ this.inline = undefined;
16
+ this.placeholder = '';
17
+ this.searchEnabled = undefined;
18
+ this.selectedValue = undefined;
19
+ this.useExternalFiltering = undefined;
20
+ this.useExternalPaginatedFiltering = undefined;
21
+ this.isAllExternalDataLoaded = undefined;
22
+ this.isLoading = undefined;
23
+ this.readOnly = undefined;
24
+ this.priorityLabel = 'Priority Group';
25
+ this.nonPriorityLabel = 'Non Priority Group';
26
+ this.clearable = false;
27
+ this.showErrorMsg = undefined;
28
+ this.showErrorBubble = false;
29
+ this.errorMsg = undefined;
30
+ this.open = false;
31
+ this.selectedItem = undefined;
32
+ this.searchTerm = '';
33
+ this.loadingNextExternalPage = false;
34
+ }
35
+ async componentWillLoad() {
36
+ if (this.optionsData) {
37
+ this.setOptionsData();
38
+ const matchingItems = this._optionsData.filter((item) => {
39
+ return item.value == this.selectedValue;
40
+ });
41
+ this.selectedItem = matchingItems.length > 0 ? matchingItems[0] : undefined;
42
+ }
43
+ this._isAllExternalDataLoaded = this.isAllExternalDataLoaded;
44
+ }
45
+ async setOptionsData() {
46
+ this._optionsData = typeof this.optionsData === 'string' ? JSON.parse(this.optionsData) : this.optionsData;
47
+ if (this.open) {
48
+ this.calculateDropdownMenuOffset();
49
+ }
50
+ this.loadingNextExternalPage = false;
51
+ }
52
+ updateAllLoadedBool() {
53
+ this._isAllExternalDataLoaded = this.isAllExternalDataLoaded;
54
+ }
55
+ async setSelectedItem(value) {
56
+ if (!value)
57
+ return this.cleanSelectedItem();
58
+ const item = this._optionsData.find(x => x.value.toLowerCase() === value.toLowerCase());
59
+ if (!item)
60
+ return this.cleanSelectedItem();
61
+ this.selectedValue = item.value;
62
+ this.selectedItem = item;
63
+ }
64
+ cleanSelectedItem() {
65
+ this.selectedValue = undefined;
66
+ this.selectedItem = undefined;
67
+ this.selectItemEvent.emit(this.selectedItem);
68
+ }
69
+ componentDidLoad() {
70
+ document.addEventListener('closeSelectBoxOnScroll', this.closeSelectBoxHandler);
71
+ }
72
+ componentWillUnload() {
73
+ document.removeEventListener('closeSelectBoxOnScroll', this.closeSelectBoxHandler);
74
+ }
75
+ handleCloseSelectBox() {
76
+ this.open = false;
77
+ }
78
+ handleBlur() {
79
+ this.open = false;
80
+ this.toggleOpen.emit(false);
81
+ }
82
+ onDropdownClicked() {
83
+ if (this.readOnly)
84
+ return;
85
+ this.open = !this.open;
86
+ this.searchTerm = '';
87
+ this.loadingNextExternalPage = false;
88
+ this.calculateDropdownMenuOffset();
89
+ this.toggleOpen.emit(this.open);
90
+ }
91
+ onItemSelected(option) {
92
+ this.selectedItem = option;
93
+ this.selectItemEvent.emit(this.selectedItem);
94
+ this.handleBlur();
95
+ }
96
+ dropdownSelectorContent() {
97
+ let title;
98
+ let subtitle;
99
+ const chevronIcon = this.open ? 'expand_less' : 'expand_more';
100
+ const icon = h("tttx-icon_1_9_103", { icon: chevronIcon, color: "black" });
101
+ let chevron = h("div", { class: "dropdown-selector-chevron" }, icon);
102
+ if (!this.selectedItem) {
103
+ title = h("div", { class: "placeholder" }, this.placeholder);
104
+ return (h(Fragment, null, title, chevron));
105
+ }
106
+ else if (this.selectedItem.html) {
107
+ title = h("div", { title: this.selectedItem.label, class: "truncated-text", innerHTML: this.selectedItem.html });
108
+ return (h(Fragment, null, title, chevron));
109
+ }
110
+ else {
111
+ title = (h("div", { title: this.selectedItem.label, class: "truncated-text" }, this.selectedItem.label));
112
+ if (this.selectedItem.description) {
113
+ subtitle = (h("div", { class: "description" }, h("p", null, this.selectedItem.description)));
114
+ chevron = h("div", { class: "dropdown-selector-chevron-offset" }, icon);
115
+ }
116
+ return (h(Fragment, null, h("div", { class: "left-wrapper" }, title, subtitle), this.clearable && !this.readOnly &&
117
+ h("tttx-icon_1_9_103", { class: "input-icon", style: { paddingTop: '5px', cursor: 'pointer' }, icon: 'close_small', onClick: this.cleanSelectedItem.bind(this) }), chevron));
118
+ }
119
+ }
120
+ renderDropdownOptions(options) {
121
+ let usingPriority = false;
122
+ const priorityOptions = [];
123
+ const nonPriorityOptions = [];
124
+ for (const option of options) {
125
+ // using priority groups if any item has the option set, so set true for first found
126
+ usingPriority = usingPriority || option.prioritise === true;
127
+ // don't include if it doesn't match the search term when searching
128
+ if (this.searchEnabled &&
129
+ (!this.useExternalFiltering && !this.useExternalPaginatedFiltering) &&
130
+ option.label.toLowerCase().indexOf(this.searchTerm.toLowerCase()) === -1)
131
+ continue;
132
+ if (option.prioritise === true) {
133
+ priorityOptions.push(option);
134
+ continue;
135
+ }
136
+ nonPriorityOptions.push(option);
137
+ }
138
+ // render priority options at the top of the dropdown list
139
+ return (h(Fragment, null, usingPriority && priorityOptions.length > 0 &&
140
+ h(Fragment, null, h("tttx-tag_1_9_103", { class: 'priority-pill', text: this.priorityLabel, color: "#F0F0F0" }), priorityOptions.map((option) => this.dropdownOption(option))), nonPriorityOptions.length > 0 &&
141
+ h(Fragment, null, usingPriority &&
142
+ h("tttx-tag_1_9_103", { class: 'priority-pill', text: this.nonPriorityLabel, color: "#F0F0F0" }), nonPriorityOptions.map((option) => this.dropdownOption(option)))));
143
+ }
144
+ dropdownOption(option) {
145
+ const selected = this.selectedItem && option.value === this.selectedItem.value;
146
+ if (option.html) {
147
+ const sanitisedHTML = DOMPurify.sanitize(option.html, domSanitiserOptions);
148
+ return (h("div", { class: `dropdown-option ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label, innerHTML: sanitisedHTML }));
149
+ }
150
+ else if (option.description) {
151
+ return (h("div", { class: `dropdown-option ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, option.label, h("div", { class: "description-dd" }, h("p", null, option.description))));
152
+ }
153
+ return (h("div", { class: `dropdown-option ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, option.label));
154
+ }
155
+ handleSearchInput(event) {
156
+ const searchInput = event.target.value;
157
+ if (this.useExternalFiltering || this.useExternalPaginatedFiltering) {
158
+ // emit event with the latest search value
159
+ clearTimeout(this.searchFilterTimeout);
160
+ this.searchFilterTimeout = setTimeout((filterValue) => {
161
+ this.searchUpdated.emit(filterValue);
162
+ }, 500, searchInput);
163
+ }
164
+ this.searchTerm = searchInput;
165
+ }
166
+ calculateDropdownMenuOffset() {
167
+ const dropdownSelector = this.el.shadowRoot.querySelector('.dropdown-selector');
168
+ const clientRectangle = dropdownSelector.getBoundingClientRect();
169
+ const viewportHeight = window.innerHeight;
170
+ const viewportWidth = window.innerWidth;
171
+ // Calculate the maximum dropdown menu height
172
+ let dropdownMenuMaxHeight = Math.min(368, 36 * this._optionsData.length) + 8;
173
+ if (this.searchEnabled)
174
+ dropdownMenuMaxHeight += 52;
175
+ // Determine if the dropdown would overflow the bottom of the viewport
176
+ const availableSpaceBelow = viewportHeight - clientRectangle.bottom;
177
+ const availableSpaceAbove = clientRectangle.top;
178
+ // If there is no option data, add some default height to ensure the loading screen is fully visible.
179
+ if (!this._optionsData.length) {
180
+ dropdownMenuMaxHeight = 200;
181
+ }
182
+ let top, bottom, maxHeight;
183
+ if (availableSpaceBelow >= dropdownMenuMaxHeight) {
184
+ // Enough space below, show dropdown below
185
+ top = clientRectangle.bottom + 'px';
186
+ bottom = '';
187
+ maxHeight = dropdownMenuMaxHeight + 'px';
188
+ }
189
+ else if (availableSpaceAbove >= dropdownMenuMaxHeight) {
190
+ // Enough space above, show dropdown above
191
+ top = '';
192
+ bottom = (viewportHeight - clientRectangle.top) + 'px';
193
+ maxHeight = dropdownMenuMaxHeight + 'px';
194
+ }
195
+ else {
196
+ // No space above, no space below then calculating space base on dropdown height
197
+ top = dropdownMenuMaxHeight - availableSpaceAbove + 'px';
198
+ bottom = (dropdownMenuMaxHeight - availableSpaceBelow) + 'px';
199
+ maxHeight = dropdownMenuMaxHeight + 'px';
200
+ }
201
+ this.bodyOffset = {
202
+ position: 'fixed',
203
+ left: Math.max(clientRectangle.left, 0) + 'px',
204
+ width: Math.min(clientRectangle.width, viewportWidth - clientRectangle.left - 16) + 'px',
205
+ top,
206
+ bottom,
207
+ maxHeight,
208
+ zIndex: '10',
209
+ overflowY: 'auto', // Allow scrolling if needed
210
+ };
211
+ }
212
+ onSelectScroll(scrollEvent) {
213
+ const selectDiv = scrollEvent.target;
214
+ const scrollOffset = selectDiv.scrollHeight - selectDiv.scrollTop - selectDiv.offsetHeight;
215
+ const isScrolledEnd = scrollOffset <= 5;
216
+ if (this.useExternalPaginatedFiltering && isScrolledEnd && !this.loadingNextExternalPage && !this._isAllExternalDataLoaded) {
217
+ this.loadingNextExternalPage = true;
218
+ clearTimeout(this.selectEndReached);
219
+ this.selectEndReached = setTimeout((filterValue) => {
220
+ this.selectEndReachedEvent.emit(filterValue);
221
+ }, 500, this.searchTerm);
222
+ }
223
+ }
224
+ render() {
225
+ if (!this.optionsData)
226
+ return;
227
+ const invalidClass = this.showErrorMsg ? 'invalid' : '';
228
+ const readOnlyClass = this.readOnly ? 'dropdown-read-only' : '';
229
+ return (h(Host, { class: this.inline ? 'inline' : 'block' }, this.label && h("div", { class: "label" }, this.label), h("div", { tabindex: "0", class: "dropdown-container" }, h("div", { class: ['dropdown-selector', invalidClass, readOnlyClass].join(' '), ref: el => (this.dropdownSelector = el), onClick: this.onDropdownClicked.bind(this) }, this.dropdownSelectorContent()), this.open && (h("div", { class: "dropdown-body-container" }, h("div", { class: "dropdown-body", style: Object.assign({ width: `${this.dropdownSelector.offsetWidth}px` }, this.bodyOffset) }, this.searchEnabled && (h("div", { class: "searchbox" }, h("tttx-standalone-input_1_9_103", { type: "text", label: "", required: true, showerrorbubble: false, iconleft: "search", onInput: this.handleSearchInput.bind(this) }))), h("div", { class: "dropdown-options-list", onScroll: this.onSelectScroll.bind(this) }, !this.isLoading && (this.renderDropdownOptions(this._optionsData)), (this.isLoading || this.loadingNextExternalPage) && (h("tttx-loading-spinner_1_9_103", { class: 'loading-style' })))))), this.showErrorBubble && (h("span", { class: ['errorBubble', this.showErrorMsg && this.errorMsg ? 'visible' : ''].join(' ') }, h("tttx-icon_1_9_103", { icon: "warning", color: "#dc0000", size: 16 }), " ", this.errorMsg)))));
230
+ }
231
+ static get is() { return "tttx-select-box_1_9_103"; }
232
+ static get encapsulation() { return "shadow"; }
233
+ static get originalStyleUrls() {
234
+ return {
235
+ "$": ["tttx-select-box.scss"]
236
+ };
237
+ }
238
+ static get styleUrls() {
239
+ return {
240
+ "$": ["tttx-select-box.css"]
241
+ };
242
+ }
243
+ static get properties() {
244
+ return {
245
+ "optionsData": {
246
+ "type": "string",
247
+ "mutable": false,
248
+ "complexType": {
249
+ "original": "string | SelectItem[]",
250
+ "resolved": "SelectItem[] | string",
251
+ "references": {
252
+ "SelectItem": {
253
+ "location": "import",
254
+ "path": "./interfaces"
255
+ }
256
+ }
257
+ },
258
+ "required": false,
259
+ "optional": false,
260
+ "docs": {
261
+ "tags": [],
262
+ "text": ""
263
+ },
264
+ "attribute": "options-data",
265
+ "reflect": false,
266
+ "defaultValue": "null"
267
+ },
268
+ "label": {
269
+ "type": "string",
270
+ "mutable": false,
271
+ "complexType": {
272
+ "original": "string",
273
+ "resolved": "string",
274
+ "references": {}
275
+ },
276
+ "required": false,
277
+ "optional": false,
278
+ "docs": {
279
+ "tags": [],
280
+ "text": ""
281
+ },
282
+ "attribute": "label",
283
+ "reflect": false
284
+ },
285
+ "inline": {
286
+ "type": "boolean",
287
+ "mutable": false,
288
+ "complexType": {
289
+ "original": "boolean",
290
+ "resolved": "boolean",
291
+ "references": {}
292
+ },
293
+ "required": false,
294
+ "optional": false,
295
+ "docs": {
296
+ "tags": [],
297
+ "text": ""
298
+ },
299
+ "attribute": "inline",
300
+ "reflect": false
301
+ },
302
+ "placeholder": {
303
+ "type": "string",
304
+ "mutable": false,
305
+ "complexType": {
306
+ "original": "string",
307
+ "resolved": "string",
308
+ "references": {}
309
+ },
310
+ "required": false,
311
+ "optional": false,
312
+ "docs": {
313
+ "tags": [],
314
+ "text": ""
315
+ },
316
+ "attribute": "placeholder",
317
+ "reflect": false,
318
+ "defaultValue": "''"
319
+ },
320
+ "searchEnabled": {
321
+ "type": "boolean",
322
+ "mutable": false,
323
+ "complexType": {
324
+ "original": "boolean",
325
+ "resolved": "boolean",
326
+ "references": {}
327
+ },
328
+ "required": false,
329
+ "optional": false,
330
+ "docs": {
331
+ "tags": [],
332
+ "text": ""
333
+ },
334
+ "attribute": "search-enabled",
335
+ "reflect": false
336
+ },
337
+ "selectedValue": {
338
+ "type": "string",
339
+ "mutable": false,
340
+ "complexType": {
341
+ "original": "string",
342
+ "resolved": "string",
343
+ "references": {}
344
+ },
345
+ "required": false,
346
+ "optional": false,
347
+ "docs": {
348
+ "tags": [],
349
+ "text": ""
350
+ },
351
+ "attribute": "selected-value",
352
+ "reflect": false
353
+ },
354
+ "useExternalFiltering": {
355
+ "type": "boolean",
356
+ "mutable": false,
357
+ "complexType": {
358
+ "original": "boolean",
359
+ "resolved": "boolean",
360
+ "references": {}
361
+ },
362
+ "required": false,
363
+ "optional": false,
364
+ "docs": {
365
+ "tags": [],
366
+ "text": ""
367
+ },
368
+ "attribute": "use-external-filtering",
369
+ "reflect": false
370
+ },
371
+ "useExternalPaginatedFiltering": {
372
+ "type": "boolean",
373
+ "mutable": false,
374
+ "complexType": {
375
+ "original": "boolean",
376
+ "resolved": "boolean",
377
+ "references": {}
378
+ },
379
+ "required": false,
380
+ "optional": false,
381
+ "docs": {
382
+ "tags": [],
383
+ "text": ""
384
+ },
385
+ "attribute": "use-external-paginated-filtering",
386
+ "reflect": false
387
+ },
388
+ "isAllExternalDataLoaded": {
389
+ "type": "boolean",
390
+ "mutable": false,
391
+ "complexType": {
392
+ "original": "boolean",
393
+ "resolved": "boolean",
394
+ "references": {}
395
+ },
396
+ "required": false,
397
+ "optional": false,
398
+ "docs": {
399
+ "tags": [],
400
+ "text": ""
401
+ },
402
+ "attribute": "is-all-external-data-loaded",
403
+ "reflect": false
404
+ },
405
+ "isLoading": {
406
+ "type": "boolean",
407
+ "mutable": false,
408
+ "complexType": {
409
+ "original": "boolean",
410
+ "resolved": "boolean",
411
+ "references": {}
412
+ },
413
+ "required": false,
414
+ "optional": false,
415
+ "docs": {
416
+ "tags": [],
417
+ "text": ""
418
+ },
419
+ "attribute": "is-loading",
420
+ "reflect": false
421
+ },
422
+ "readOnly": {
423
+ "type": "boolean",
424
+ "mutable": false,
425
+ "complexType": {
426
+ "original": "boolean",
427
+ "resolved": "boolean",
428
+ "references": {}
429
+ },
430
+ "required": false,
431
+ "optional": false,
432
+ "docs": {
433
+ "tags": [],
434
+ "text": ""
435
+ },
436
+ "attribute": "read-only",
437
+ "reflect": false
438
+ },
439
+ "priorityLabel": {
440
+ "type": "string",
441
+ "mutable": false,
442
+ "complexType": {
443
+ "original": "string",
444
+ "resolved": "string",
445
+ "references": {}
446
+ },
447
+ "required": false,
448
+ "optional": false,
449
+ "docs": {
450
+ "tags": [],
451
+ "text": ""
452
+ },
453
+ "attribute": "priority-label",
454
+ "reflect": false,
455
+ "defaultValue": "'Priority Group'"
456
+ },
457
+ "nonPriorityLabel": {
458
+ "type": "string",
459
+ "mutable": false,
460
+ "complexType": {
461
+ "original": "string",
462
+ "resolved": "string",
463
+ "references": {}
464
+ },
465
+ "required": false,
466
+ "optional": false,
467
+ "docs": {
468
+ "tags": [],
469
+ "text": ""
470
+ },
471
+ "attribute": "non-priority-label",
472
+ "reflect": false,
473
+ "defaultValue": "'Non Priority Group'"
474
+ },
475
+ "clearable": {
476
+ "type": "boolean",
477
+ "mutable": false,
478
+ "complexType": {
479
+ "original": "boolean",
480
+ "resolved": "boolean",
481
+ "references": {}
482
+ },
483
+ "required": false,
484
+ "optional": false,
485
+ "docs": {
486
+ "tags": [],
487
+ "text": ""
488
+ },
489
+ "attribute": "clearable",
490
+ "reflect": false,
491
+ "defaultValue": "false"
492
+ },
493
+ "showErrorMsg": {
494
+ "type": "boolean",
495
+ "mutable": false,
496
+ "complexType": {
497
+ "original": "boolean",
498
+ "resolved": "boolean",
499
+ "references": {}
500
+ },
501
+ "required": false,
502
+ "optional": false,
503
+ "docs": {
504
+ "tags": [],
505
+ "text": ""
506
+ },
507
+ "attribute": "show-error-msg",
508
+ "reflect": false
509
+ },
510
+ "showErrorBubble": {
511
+ "type": "boolean",
512
+ "mutable": false,
513
+ "complexType": {
514
+ "original": "boolean",
515
+ "resolved": "boolean",
516
+ "references": {}
517
+ },
518
+ "required": false,
519
+ "optional": false,
520
+ "docs": {
521
+ "tags": [],
522
+ "text": ""
523
+ },
524
+ "attribute": "show-error-bubble",
525
+ "reflect": false,
526
+ "defaultValue": "false"
527
+ },
528
+ "errorMsg": {
529
+ "type": "string",
530
+ "mutable": false,
531
+ "complexType": {
532
+ "original": "string",
533
+ "resolved": "string",
534
+ "references": {}
535
+ },
536
+ "required": false,
537
+ "optional": false,
538
+ "docs": {
539
+ "tags": [],
540
+ "text": ""
541
+ },
542
+ "attribute": "error-msg",
543
+ "reflect": false
544
+ }
545
+ };
546
+ }
547
+ static get states() {
548
+ return {
549
+ "open": {},
550
+ "selectedItem": {},
551
+ "searchTerm": {},
552
+ "loadingNextExternalPage": {}
553
+ };
554
+ }
555
+ static get events() {
556
+ return [{
557
+ "method": "selectItemEvent",
558
+ "name": "selectItemEvent",
559
+ "bubbles": false,
560
+ "cancelable": true,
561
+ "composed": true,
562
+ "docs": {
563
+ "tags": [],
564
+ "text": ""
565
+ },
566
+ "complexType": {
567
+ "original": "SelectItem",
568
+ "resolved": "SelectItem",
569
+ "references": {
570
+ "SelectItem": {
571
+ "location": "import",
572
+ "path": "./interfaces"
573
+ }
574
+ }
575
+ }
576
+ }, {
577
+ "method": "toggleOpen",
578
+ "name": "toggleOpen",
579
+ "bubbles": false,
580
+ "cancelable": true,
581
+ "composed": true,
582
+ "docs": {
583
+ "tags": [],
584
+ "text": ""
585
+ },
586
+ "complexType": {
587
+ "original": "boolean",
588
+ "resolved": "boolean",
589
+ "references": {}
590
+ }
591
+ }, {
592
+ "method": "searchUpdated",
593
+ "name": "multiselectSearchUpdated",
594
+ "bubbles": true,
595
+ "cancelable": true,
596
+ "composed": true,
597
+ "docs": {
598
+ "tags": [],
599
+ "text": ""
600
+ },
601
+ "complexType": {
602
+ "original": "string",
603
+ "resolved": "string",
604
+ "references": {}
605
+ }
606
+ }, {
607
+ "method": "selectEndReachedEvent",
608
+ "name": "selectEndReached",
609
+ "bubbles": true,
610
+ "cancelable": true,
611
+ "composed": true,
612
+ "docs": {
613
+ "tags": [],
614
+ "text": ""
615
+ },
616
+ "complexType": {
617
+ "original": "string",
618
+ "resolved": "string",
619
+ "references": {}
620
+ }
621
+ }];
622
+ }
623
+ static get methods() {
624
+ return {
625
+ "setSelectedItem": {
626
+ "complexType": {
627
+ "signature": "(value: string | undefined) => Promise<void>",
628
+ "parameters": [{
629
+ "tags": [],
630
+ "text": ""
631
+ }],
632
+ "references": {
633
+ "Promise": {
634
+ "location": "global"
635
+ }
636
+ },
637
+ "return": "Promise<void>"
638
+ },
639
+ "docs": {
640
+ "text": "",
641
+ "tags": []
642
+ }
643
+ }
644
+ };
645
+ }
646
+ static get elementRef() { return "el"; }
647
+ static get watchers() {
648
+ return [{
649
+ "propName": "optionsData",
650
+ "methodName": "setOptionsData"
651
+ }, {
652
+ "propName": "isAllExternalDataLoaded",
653
+ "methodName": "updateAllLoadedBool"
654
+ }];
655
+ }
656
+ static get listeners() {
657
+ return [{
658
+ "name": "closeSelectBox",
659
+ "method": "handleCloseSelectBox",
660
+ "target": undefined,
661
+ "capture": false,
662
+ "passive": false
663
+ }, {
664
+ "name": "blur",
665
+ "method": "handleBlur",
666
+ "target": undefined,
667
+ "capture": false,
668
+ "passive": false
669
+ }];
670
+ }
671
+ }