@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
@@ -7167,579 +7167,579 @@ adapters._date.override({
7167
7167
 
7168
7168
  const tttxChartCss = ".chart-wrapper{position:relative;width:100%;height:100%;display:flex;flex-direction:column}.chart-canvas-container{flex:1;min-height:0;position:relative;width:100%}canvas{display:block;width:100% !important;height:100% !important}.export-buttons{display:flex;gap:0.5rem;justify-content:flex-end;padding-top:0.5rem;padding-bottom:0.5rem}.chart-loading{width:100%;height:100%;align-items:center;justify-content:center;display:flex}.error-content{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;align-self:stretch;background-color:#FAFAFA}.error-content .error-heading{color:var(--Text-Default-Default, #111);text-align:center;font-family:Roboto;font-size:14px;font-style:normal;font-weight:600;line-height:20px}.error-content .error-message{color:var(--Text-Neutral-Default, #737373);text-align:center;font-family:Roboto;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.error-content .error-actions{display:flex;align-items:flex-start;gap:12px;margin-top:16px}";
7169
7169
 
7170
- const TttxChart = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7171
- constructor() {
7172
- super();
7173
- this.__registerHost();
7174
- this.__attachShadow();
7175
- this.exportCSV = createEvent(this, "exportCSV", 7);
7176
- this.chartType = undefined;
7177
- this.chartData = undefined;
7178
- this.chartOptions = undefined;
7179
- this.loading = false;
7180
- this.error = undefined;
7181
- this.fallbackText = 'No data available';
7182
- this.width = '100%';
7183
- this.height = 'auto';
7184
- this.isYAxisPercentageValues = false;
7185
- this.showActiveSegmentLabel = false;
7186
- this.initialActiveIndex = 0;
7187
- this.activeSegmentChangeCallback = undefined;
7188
- this.exportable = false;
7189
- this.chartInstance = undefined;
7190
- this.showPngSvgExport = false;
7191
- this.selectedSegmentIndex = null;
7192
- this.hoverSegmentIndex = null;
7193
- }
7194
- handleUpdate(newData) {
7195
- if (!newData || !newData.datasets || newData.datasets.length === 0) {
7196
- this.destroyChart();
7197
- return;
7198
- }
7199
- if (this.chartType === 'line') {
7200
- setTimeout(() => {
7201
- this.renderChart();
7202
- }, 0);
7203
- return;
7204
- }
7205
- if (this.chartType === 'doughnut-v2') {
7206
- if (this.hasChartDataChanged()) {
7207
- this.renderChart();
7208
- this.previousChartData = this.deepClone(this.chartData);
7209
- }
7210
- return;
7211
- }
7212
- this.renderChart();
7213
- }
7214
- componentDidLoad() {
7215
- if (this.chartType === 'doughnut-v2') {
7216
- this.previousChartData = this.deepClone(this.chartData);
7217
- }
7218
- this.renderChart();
7219
- this.notifyActiveSegment();
7220
- }
7221
- hasChartDataChanged() {
7222
- if (!this.previousChartData)
7223
- return true;
7224
- try {
7225
- return JSON.stringify(this.previousChartData) !== JSON.stringify(this.chartData);
7226
- }
7227
- catch (_a) {
7228
- return true;
7229
- }
7230
- }
7231
- deepClone(obj) {
7232
- try {
7233
- return JSON.parse(JSON.stringify(obj));
7234
- }
7235
- catch (_a) {
7236
- return obj;
7237
- }
7238
- }
7239
- disconnectedCallback() {
7240
- this.destroyChart();
7241
- }
7242
- renderChart() {
7243
- var _a, _b, _c;
7244
- if (!this.canvasEl || !this.chartData || !this.chartType)
7245
- return;
7246
- this.destroyChart();
7247
- const chartData = Object.assign(Object.assign({}, this.chartData), { datasets: ((_a = this.chartData.datasets) === null || _a === void 0 ? void 0 : _a.map(d => (Object.assign({}, d)))) || [] });
7248
- const config = {
7249
- type: this.getChartJsType(),
7250
- data: chartData,
7251
- options: this.getChartOptions(),
7252
- plugins: []
7253
- };
7254
- if (this.chartType === 'doughnut' || this.chartType === 'semi-gauge' || this.chartType === 'doughnut-v2') {
7255
- const total = ((_c = (_b = chartData.datasets[0]) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.map((d) => Number(d) || 0).reduce((a, b) => a + b, 0)) || 0;
7256
- config.plugins.push(this.getCenterTextPlugin(total.toLocaleString()));
7257
- }
7258
- if (this.chartType === 'doughnut-v2') {
7259
- config.plugins.push(this.getLegendHoverPlugin());
7260
- }
7261
- // create chart
7262
- this.chartInstance = new Chart(this.canvasEl, config);
7263
- // Initialize colors for doughnut-v2
7264
- if (this.chartType === 'doughnut-v2') {
7265
- this.chartInstance.setDatasetVisibility(0, true);
7266
- this.updateChartColors();
7267
- }
7268
- }
7269
- destroyChart() {
7270
- if (this.chartInstance) {
7271
- this.chartInstance.destroy();
7272
- this.chartInstance = undefined;
7273
- }
7274
- }
7275
- getChartJsType() {
7276
- if (this.chartType === 'semi-gauge' || this.chartType === 'doughnut-v2')
7277
- return 'doughnut';
7278
- return this.chartType;
7279
- }
7280
- getBaseOptions() {
7281
- return {
7282
- responsive: true,
7283
- maintainAspectRatio: false,
7284
- plugins: {
7285
- legend: {
7286
- display: true,
7287
- position: 'bottom',
7288
- labels: {
7289
- usePointStyle: true,
7290
- pointStyle: 'circle',
7291
- font: {
7292
- size: 14
7293
- }
7294
- },
7295
- },
7296
- tooltip: {
7297
- callbacks: {
7298
- label: (ctx) => {
7299
- const label = ctx.label || ctx.dataset.label || '';
7300
- // Convert value to number and fix to 2 decimal places
7301
- const value = Number(ctx.raw);
7302
- const formattedValue = isNaN(value) ? ctx.formattedValue : value.toFixed(2);
7303
- return `${label}: ${formattedValue}`;
7304
- },
7305
- },
7306
- backgroundColor: '#17272B'
7307
- },
7308
- },
7309
- };
7310
- }
7311
- getLineChartConfig() {
7312
- const startOfCurrentMonth = new Date();
7313
- startOfCurrentMonth.setDate(1);
7314
- startOfCurrentMonth.setHours(0, 0, 0, 0);
7315
- return {
7316
- responsive: true,
7317
- maintainAspectRatio: false,
7318
- animation: { duration: 0 },
7319
- elements: {
7320
- point: { radius: 0, hoverRadius: 4 },
7321
- },
7322
- plugins: {
7323
- legend: {
7324
- labels: {
7325
- padding: 20,
7326
- generateLabels: (chart) => {
7327
- return chart.data.datasets.map((dataset, i) => ({
7328
- text: dataset.label || '',
7329
- strokeStyle: dataset.borderColor,
7330
- fillStyle: dataset.backgroundColor || 'transparent',
7331
- lineDash: dataset.borderDash || [],
7332
- lineWidth: dataset.borderWidth || 2,
7333
- hidden: !chart.isDatasetVisible(i),
7334
- datasetIndex: i,
7335
- pointStyle: 'line',
7336
- }));
7337
- },
7338
- },
7339
- },
7340
- tooltip: {
7341
- mode: 'index',
7342
- intersect: false,
7343
- backgroundColor: '#17272B',
7344
- titleFont: { size: 14, weight: 'bold' },
7345
- bodyFont: { size: 12 },
7346
- callbacks: {
7347
- title: (context) => {
7348
- var _a, _b;
7349
- if (!context || !context.length)
7350
- return '';
7351
- const date = new Date((_b = (_a = context[0].parsed) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : context[0].label);
7352
- return date.toLocaleDateString(undefined, {
7353
- day: '2-digit',
7354
- month: 'short',
7355
- year: 'numeric',
7356
- });
7357
- },
7358
- label: (ctx) => {
7359
- const rawValue = ctx.parsed && ctx.parsed.y !== undefined ? ctx.parsed.y : ctx.raw;
7360
- // Format to max 2 decimal places
7361
- const value = Number(rawValue);
7362
- const formattedValue = isNaN(value) ? rawValue : value.toFixed(2);
7363
- return `${ctx.dataset.label}: ${formattedValue}${this.isYAxisPercentageValues ? '%' : ''}`;
7364
- },
7365
- labelColor: (ctx) => {
7366
- if (ctx.dataset.label !== 'Overall') {
7367
- return {
7368
- borderWidth: 2
7369
- };
7370
- }
7371
- return {
7372
- borderWidth: 2,
7373
- borderColor: ctx.dataset.borderColor,
7374
- backgroundColor: ctx.dataset.borderColor,
7375
- };
7376
- }
7377
- },
7378
- },
7379
- },
7380
- interaction: {
7381
- mode: 'index',
7382
- intersect: false,
7383
- },
7384
- scales: {
7385
- x: {
7386
- type: 'time',
7387
- time: {
7388
- unit: 'month',
7389
- displayFormats: {
7390
- month: 'MMM yyyy',
7391
- },
7392
- tooltipFormat: 'dd MMM yyyy',
7393
- },
7394
- grid: { color: '#E5E5E5' },
7395
- border: { dash: [4, 4] },
7396
- ticks: {
7397
- autoSkip: true,
7398
- maxRotation: 0,
7399
- },
7400
- },
7401
- y: {
7402
- min: 0,
7403
- max: 100,
7404
- beginAtZero: true,
7405
- ticks: {
7406
- stepSize: 20,
7407
- callback: (value) => {
7408
- const numValue = Number(value);
7409
- const formatted = isNaN(numValue) ? value : (Number.isInteger(numValue) ? numValue : numValue.toFixed(2));
7410
- return this.isYAxisPercentageValues ? `${formatted}%` : formatted;
7411
- },
7412
- },
7413
- grid: { color: '#E5E5E5' },
7414
- border: { dash: [4, 4] },
7415
- },
7416
- },
7417
- };
7418
- }
7419
- getDoughnutChartConfig() {
7420
- return {
7421
- plugins: {
7422
- legend: { labels: { pointStyle: 'circle', padding: 16, } },
7423
- },
7424
- cutout: '60%'
7425
- };
7426
- }
7427
- getDoughnutV2ChartConfig() {
7428
- return {
7429
- plugins: {
7430
- legend: {
7431
- labels: {
7432
- pointStyle: 'circle',
7433
- padding: 16
7434
- },
7435
- onClick: (e, legendItem) => {
7436
- e.stopPropagation();
7437
- const index = legendItem.index;
7438
- if (this.selectedSegmentIndex !== index) {
7439
- this.selectedSegmentIndex = index;
7440
- this.updateChartColors();
7441
- this.notifyActiveSegment();
7442
- }
7443
- }
7444
- },
7445
- tooltip: {
7446
- enabled: false
7447
- }
7448
- },
7449
- cutout: '60%',
7450
- onHover: (_event, activeElements) => {
7451
- if (activeElements && activeElements.length > 0) {
7452
- this.hoverSegmentIndex = activeElements[0].index;
7453
- this.updateChartColors();
7454
- }
7455
- else {
7456
- this.hoverSegmentIndex = null;
7457
- this.updateChartColors();
7458
- }
7459
- },
7460
- onClick: (_event, activeElements) => {
7461
- if (activeElements && activeElements.length > 0) {
7462
- const clickedIndex = activeElements[0].index;
7463
- if (this.selectedSegmentIndex !== clickedIndex) {
7464
- this.selectedSegmentIndex = clickedIndex;
7465
- this.updateChartColors();
7466
- this.notifyActiveSegment();
7467
- }
7468
- }
7469
- },
7470
- };
7471
- }
7472
- updateChartColors() {
7473
- var _a, _b, _c, _d;
7474
- if (!this.chartInstance || this.chartType !== 'doughnut-v2')
7475
- return;
7476
- const dataset = this.chartInstance.data.datasets[0];
7477
- const chartDataDataset = (_b = (_a = this.chartData) === null || _a === void 0 ? void 0 : _a.datasets) === null || _b === void 0 ? void 0 : _b[0];
7478
- if (this.chartType === 'doughnut-v2' && this.chartInstance.isDatasetVisible(0) === false) {
7479
- this.chartInstance.setDatasetVisibility(0, true);
7480
- }
7481
- // Default color for doughnut-v2
7482
- const defaultSelectedColor = '#45C9B0';
7483
- const defaultHoverColor = '#A3A3A3';
7484
- const defaultInactiveColor = '#E5E5E5';
7485
- const selectedColors = chartDataDataset === null || chartDataDataset === void 0 ? void 0 : chartDataDataset.selectedColors;
7486
- const hoverColors = chartDataDataset === null || chartDataDataset === void 0 ? void 0 : chartDataDataset.hoverColors;
7487
- const inactiveColors = chartDataDataset === null || chartDataDataset === void 0 ? void 0 : chartDataDataset.inactiveColors;
7488
- let newColors = [];
7489
- if (this.selectedSegmentIndex !== null) {
7490
- newColors = dataset.data.map((_, index) => {
7491
- if (index === this.hoverSegmentIndex) {
7492
- return (hoverColors === null || hoverColors === void 0 ? void 0 : hoverColors[index]) || defaultHoverColor;
7493
- }
7494
- else if (index === this.selectedSegmentIndex) {
7495
- return (selectedColors === null || selectedColors === void 0 ? void 0 : selectedColors[index]) || defaultSelectedColor;
7496
- }
7497
- else {
7498
- return (inactiveColors === null || inactiveColors === void 0 ? void 0 : inactiveColors[index]) || defaultInactiveColor;
7499
- }
7500
- });
7501
- }
7502
- else if (this.hoverSegmentIndex !== null) {
7503
- const activeIndex = (_c = this.initialActiveIndex) !== null && _c !== void 0 ? _c : 0;
7504
- newColors = dataset.data.map((_, index) => {
7505
- if (index === this.hoverSegmentIndex) {
7506
- return (hoverColors === null || hoverColors === void 0 ? void 0 : hoverColors[index]) || defaultHoverColor;
7507
- }
7508
- else if (index === activeIndex) {
7509
- return (selectedColors === null || selectedColors === void 0 ? void 0 : selectedColors[index]) || defaultSelectedColor;
7510
- }
7511
- else {
7512
- return (inactiveColors === null || inactiveColors === void 0 ? void 0 : inactiveColors[index]) || defaultInactiveColor;
7513
- }
7514
- });
7515
- }
7516
- else {
7517
- // No hover or selection: show initial active state
7518
- const activeIndex = (_d = this.initialActiveIndex) !== null && _d !== void 0 ? _d : 0;
7519
- newColors = dataset.data.map((_, index) => {
7520
- if (index === activeIndex) {
7521
- return (selectedColors === null || selectedColors === void 0 ? void 0 : selectedColors[index]) || defaultSelectedColor;
7522
- }
7523
- return (inactiveColors === null || inactiveColors === void 0 ? void 0 : inactiveColors[index]) || defaultInactiveColor;
7524
- });
7525
- }
7526
- dataset.backgroundColor = newColors;
7527
- this.chartInstance.update('active');
7528
- }
7529
- lightenColor(color, percent) {
7530
- if (!color || !color.startsWith('#'))
7531
- return color;
7532
- const num = parseInt(color.replace('#', ''), 16);
7533
- const r = Math.min(255, ((num >> 16) & 0xFF) + percent);
7534
- const g = Math.min(255, ((num >> 8) & 0xFF) + percent);
7535
- const b = Math.min(255, (num & 0xFF) + percent);
7536
- return `#${((r << 16) | (g << 8) | b).toString(16).padStart(6, '0')}`;
7537
- }
7538
- getCenterTextPlugin(value) {
7539
- return {
7540
- id: 'centerText',
7541
- afterDatasetsDraw: (chart) => {
7542
- var _a, _b;
7543
- const { ctx } = chart;
7544
- ctx.save();
7545
- const x = chart.getDatasetMeta(0).data[0].x;
7546
- let y = chart.getDatasetMeta(0).data[0].y;
7547
- if (this.chartType === 'semi-gauge') {
7548
- y -= 20;
7549
- }
7550
- let displayValue = value;
7551
- if (this.chartType === 'doughnut-v2') {
7552
- const activeIndex = this.selectedSegmentIndex !== null
7553
- ? this.selectedSegmentIndex
7554
- : ((_a = this.initialActiveIndex) !== null && _a !== void 0 ? _a : 0);
7555
- const segmentValue = (_b = this.chartData.datasets[0]) === null || _b === void 0 ? void 0 : _b.data[activeIndex];
7556
- displayValue = Number(segmentValue || 0).toLocaleString();
7557
- }
7558
- ctx.font = 'bold 20px Roboto';
7559
- ctx.fillStyle = '#111';
7560
- ctx.textAlign = 'center';
7561
- ctx.textBaseline = 'middle';
7562
- ctx.fillText(displayValue, x, y);
7563
- },
7564
- };
7565
- }
7566
- getLegendHoverPlugin() {
7567
- return {
7568
- id: 'legendHover',
7569
- afterDraw: (chart) => {
7570
- if (this.hoverSegmentIndex === null)
7571
- return;
7572
- const legend = chart.legend;
7573
- if (!legend || !legend.legendItems)
7574
- return;
7575
- const ctx = chart.ctx;
7576
- const legendItem = legend.legendItems[this.hoverSegmentIndex];
7577
- if (!legendItem)
7578
- return;
7579
- const boxes = legend.legendHitBoxes;
7580
- if (!boxes || !boxes[this.hoverSegmentIndex])
7581
- return;
7582
- const box = boxes[this.hoverSegmentIndex];
7583
- const padding = 8;
7584
- const borderRadius = 4;
7585
- ctx.save();
7586
- ctx.fillStyle = '#f5f5f5';
7587
- ctx.beginPath();
7588
- ctx.roundRect(box.left - padding, box.top - padding, box.width + padding * 2, box.height + padding * 2, borderRadius);
7589
- ctx.fill();
7590
- const pointRadius = 8;
7591
- const pointX = box.left + pointRadius;
7592
- const pointY = box.top + box.height / 2;
7593
- ctx.fillStyle = '#D1D5DB';
7594
- ctx.beginPath();
7595
- ctx.arc(pointX, pointY, pointRadius, 0, 2 * Math.PI);
7596
- ctx.fill();
7597
- ctx.fillStyle = '#9CA3AF';
7598
- ctx.font = '14px Roboto, sans-serif';
7599
- ctx.textBaseline = 'middle';
7600
- ctx.textAlign = 'left';
7601
- ctx.fillText(legendItem.text, box.left + pointRadius * 2 + 4, pointY);
7602
- ctx.restore();
7603
- },
7604
- };
7605
- }
7606
- getSemiGaugeChartConfig() {
7607
- return {
7608
- plugins: {
7609
- legend: { labels: { pointStyle: 'circle', padding: 16, } },
7610
- },
7611
- rotation: -90,
7612
- circumference: 180,
7613
- cutout: '70%',
7614
- };
7615
- }
7616
- merge(target, source) {
7617
- if (typeof target !== 'object' || typeof source !== 'object')
7618
- return source;
7619
- for (const key of Object.keys(source)) {
7620
- if (source[key] instanceof Object && key in target) {
7621
- target[key] = this.merge(Object.assign({}, target[key]), source[key]);
7622
- }
7623
- else {
7624
- target[key] = source[key];
7625
- }
7626
- }
7627
- return target;
7628
- }
7629
- getChartOptions() {
7630
- const base = this.getBaseOptions();
7631
- let specific = {};
7632
- if (this.chartType === 'line')
7633
- specific = this.getLineChartConfig();
7634
- else if (this.chartType === 'doughnut')
7635
- specific = this.getDoughnutChartConfig();
7636
- else if (this.chartType === 'semi-gauge')
7637
- specific = this.getSemiGaugeChartConfig();
7638
- else if (this.chartType === 'doughnut-v2')
7639
- specific = this.getDoughnutV2ChartConfig();
7640
- return this.merge(this.merge(base, specific), this.chartOptions || {});
7641
- }
7642
- exportChart(format) {
7643
- if (!this.chartInstance)
7644
- return;
7645
- const link = document.createElement('a');
7646
- link.download = `chart-export.${format}`;
7647
- if (format === 'png') {
7648
- link.href = this.chartInstance.toBase64Image('image/png');
7649
- }
7650
- else {
7651
- const svgData = new XMLSerializer().serializeToString(this.canvasEl);
7652
- const blob = new Blob([svgData], { type: 'image/svg+xml' });
7653
- link.href = URL.createObjectURL(blob);
7654
- }
7655
- link.click();
7656
- }
7657
- getErrorContent() {
7658
- return this.commonContent('warning', 'Something went wrong', 'We ran into an issue while trying to load this widget.', '#DC0000', true);
7659
- }
7660
- getNoDataContent() {
7661
- return this.commonContent('ssid_chart', 'No data available', 'There is currently no data available to show performance trends.', '#111');
7662
- }
7663
- commonContent(iconName, heading, message, iconColor, showActions = false) {
7664
- return (h("div", { class: "error-content" }, h("tttx-icon_1_9_101", { icon: iconName, color: iconColor, size: 48 }), h("span", { class: 'error-heading' }, heading), h("span", { class: 'error-message' }, message), showActions && h("div", { class: "error-actions" }, h("tttx-button_1_9_101", { class: 'support-btn', icon: "help", design: "primary", onClick: () => this.renderChart() }, "Contact support"))));
7665
- }
7666
- notifyActiveSegment() {
7667
- var _a, _b;
7668
- if (this.chartType !== 'doughnut-v2' || !this.chartData)
7669
- return;
7670
- const activeIndex = this.selectedSegmentIndex !== null
7671
- ? this.selectedSegmentIndex
7672
- : ((_a = this.initialActiveIndex) !== null && _a !== void 0 ? _a : 0);
7673
- const label = ((_b = this.chartData.labels) === null || _b === void 0 ? void 0 : _b[activeIndex]) || '';
7674
- if (this.activeSegmentChangeCallback) {
7675
- this.activeSegmentChangeCallback(label);
7676
- }
7677
- }
7678
- render() {
7679
- var _a, _b, _c;
7680
- return (h("div", { class: "chart-wrapper", style: { width: this.width, height: this.height } }, this.loading && h("div", { class: "chart-loading" }, h("tttx-loading-spinner_1_9_101", { size: 'large', color: '#2b9ab7' })), this.error && this.getErrorContent(), !this.loading && !this.error && (!this.chartData || !((_a = this.chartData.datasets) === null || _a === void 0 ? void 0 : _a.length)) && (this.getNoDataContent()), !this.loading && !this.error && ((_c = (_b = this.chartData) === null || _b === void 0 ? void 0 : _b.datasets) === null || _c === void 0 ? void 0 : _c.length) > 0 && (h("div", { class: "chart-canvas-container", style: { width: '100%', height: '100%' } }, h("canvas", { ref: el => (this.canvasEl = el), "aria-label": "Chart canvas", role: "img", style: {
7681
- width: '100%',
7682
- height: '100%',
7683
- cursor: this.chartType === 'doughnut-v2' ? 'pointer' : 'default'
7684
- } }))), this.exportable && !this.loading && !this.error && (h("div", { class: "export-buttons" }, this.showPngSvgExport && h("tttx-button_1_9_101", { class: 'export-png', design: "primary", onClick: () => this.exportChart('png') }, "Export PNG"), this.showPngSvgExport && h("tttx-button_1_9_101", { class: 'export-svg', design: "primary", onClick: () => this.exportChart('svg') }, "Export SVG"), h("tttx-button_1_9_101", { class: 'export-csv', design: "primary", onClick: () => this.exportCSV.emit({ name: this.chartType }) }, "Export CSV")))));
7685
- }
7686
- get el() { return this; }
7687
- static get watchers() { return {
7688
- "chartData": ["handleUpdate", "notifyActiveSegment"],
7689
- "chartOptions": ["handleUpdate"],
7690
- "selectedSegmentIndex": ["notifyActiveSegment"],
7691
- "initialActiveIndex": ["notifyActiveSegment"]
7692
- }; }
7693
- static get style() { return tttxChartCss; }
7694
- }, [1, "tttx-chart_1_9_101", {
7695
- "chartType": [1, "chart-type"],
7696
- "chartData": [16],
7697
- "chartOptions": [16],
7698
- "loading": [4],
7699
- "error": [4],
7700
- "fallbackText": [1, "fallback-text"],
7701
- "width": [1],
7702
- "height": [1],
7703
- "isYAxisPercentageValues": [4, "is-y-axis-percentage-values"],
7704
- "showActiveSegmentLabel": [4, "show-active-segment-label"],
7705
- "initialActiveIndex": [2, "initial-active-index"],
7706
- "activeSegmentChangeCallback": [16],
7707
- "exportable": [32],
7708
- "chartInstance": [32],
7709
- "showPngSvgExport": [32],
7710
- "selectedSegmentIndex": [32],
7711
- "hoverSegmentIndex": [32]
7712
- }]);
7713
- function defineCustomElement$1() {
7714
- if (typeof customElements === "undefined") {
7715
- return;
7716
- }
7717
- const components = ["tttx-chart_1_9_101", "tttx-button_1_9_101", "tttx-icon_1_9_101", "tttx-loading-spinner_1_9_101"];
7718
- components.forEach(tagName => { switch (tagName) {
7719
- case "tttx-chart_1_9_101":
7720
- if (!customElements.get(tagName)) {
7721
- customElements.define(tagName, TttxChart);
7722
- }
7723
- break;
7724
- case "tttx-button_1_9_101":
7725
- if (!customElements.get(tagName)) {
7726
- defineCustomElement$4();
7727
- }
7728
- break;
7729
- case "tttx-icon_1_9_101":
7730
- if (!customElements.get(tagName)) {
7731
- defineCustomElement$3();
7732
- }
7733
- break;
7734
- case "tttx-loading-spinner_1_9_101":
7735
- if (!customElements.get(tagName)) {
7736
- defineCustomElement$2();
7737
- }
7738
- break;
7739
- } });
7740
- }
7741
-
7742
- const TttxChart_1_9_101 = TttxChart;
7170
+ const TttxChart = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7171
+ constructor() {
7172
+ super();
7173
+ this.__registerHost();
7174
+ this.__attachShadow();
7175
+ this.exportCSV = createEvent(this, "exportCSV", 7);
7176
+ this.chartType = undefined;
7177
+ this.chartData = undefined;
7178
+ this.chartOptions = undefined;
7179
+ this.loading = false;
7180
+ this.error = undefined;
7181
+ this.fallbackText = 'No data available';
7182
+ this.width = '100%';
7183
+ this.height = 'auto';
7184
+ this.isYAxisPercentageValues = false;
7185
+ this.showActiveSegmentLabel = false;
7186
+ this.initialActiveIndex = 0;
7187
+ this.activeSegmentChangeCallback = undefined;
7188
+ this.exportable = false;
7189
+ this.chartInstance = undefined;
7190
+ this.showPngSvgExport = false;
7191
+ this.selectedSegmentIndex = null;
7192
+ this.hoverSegmentIndex = null;
7193
+ }
7194
+ handleUpdate(newData) {
7195
+ if (!newData || !newData.datasets || newData.datasets.length === 0) {
7196
+ this.destroyChart();
7197
+ return;
7198
+ }
7199
+ if (this.chartType === 'line') {
7200
+ setTimeout(() => {
7201
+ this.renderChart();
7202
+ }, 0);
7203
+ return;
7204
+ }
7205
+ if (this.chartType === 'doughnut-v2') {
7206
+ if (this.hasChartDataChanged()) {
7207
+ this.renderChart();
7208
+ this.previousChartData = this.deepClone(this.chartData);
7209
+ }
7210
+ return;
7211
+ }
7212
+ this.renderChart();
7213
+ }
7214
+ componentDidLoad() {
7215
+ if (this.chartType === 'doughnut-v2') {
7216
+ this.previousChartData = this.deepClone(this.chartData);
7217
+ }
7218
+ this.renderChart();
7219
+ this.notifyActiveSegment();
7220
+ }
7221
+ hasChartDataChanged() {
7222
+ if (!this.previousChartData)
7223
+ return true;
7224
+ try {
7225
+ return JSON.stringify(this.previousChartData) !== JSON.stringify(this.chartData);
7226
+ }
7227
+ catch (_a) {
7228
+ return true;
7229
+ }
7230
+ }
7231
+ deepClone(obj) {
7232
+ try {
7233
+ return JSON.parse(JSON.stringify(obj));
7234
+ }
7235
+ catch (_a) {
7236
+ return obj;
7237
+ }
7238
+ }
7239
+ disconnectedCallback() {
7240
+ this.destroyChart();
7241
+ }
7242
+ renderChart() {
7243
+ var _a, _b, _c;
7244
+ if (!this.canvasEl || !this.chartData || !this.chartType)
7245
+ return;
7246
+ this.destroyChart();
7247
+ const chartData = Object.assign(Object.assign({}, this.chartData), { datasets: ((_a = this.chartData.datasets) === null || _a === void 0 ? void 0 : _a.map(d => (Object.assign({}, d)))) || [] });
7248
+ const config = {
7249
+ type: this.getChartJsType(),
7250
+ data: chartData,
7251
+ options: this.getChartOptions(),
7252
+ plugins: []
7253
+ };
7254
+ if (this.chartType === 'doughnut' || this.chartType === 'semi-gauge' || this.chartType === 'doughnut-v2') {
7255
+ const total = ((_c = (_b = chartData.datasets[0]) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.map((d) => Number(d) || 0).reduce((a, b) => a + b, 0)) || 0;
7256
+ config.plugins.push(this.getCenterTextPlugin(total.toLocaleString()));
7257
+ }
7258
+ if (this.chartType === 'doughnut-v2') {
7259
+ config.plugins.push(this.getLegendHoverPlugin());
7260
+ }
7261
+ // create chart
7262
+ this.chartInstance = new Chart(this.canvasEl, config);
7263
+ // Initialize colors for doughnut-v2
7264
+ if (this.chartType === 'doughnut-v2') {
7265
+ this.chartInstance.setDatasetVisibility(0, true);
7266
+ this.updateChartColors();
7267
+ }
7268
+ }
7269
+ destroyChart() {
7270
+ if (this.chartInstance) {
7271
+ this.chartInstance.destroy();
7272
+ this.chartInstance = undefined;
7273
+ }
7274
+ }
7275
+ getChartJsType() {
7276
+ if (this.chartType === 'semi-gauge' || this.chartType === 'doughnut-v2')
7277
+ return 'doughnut';
7278
+ return this.chartType;
7279
+ }
7280
+ getBaseOptions() {
7281
+ return {
7282
+ responsive: true,
7283
+ maintainAspectRatio: false,
7284
+ plugins: {
7285
+ legend: {
7286
+ display: true,
7287
+ position: 'bottom',
7288
+ labels: {
7289
+ usePointStyle: true,
7290
+ pointStyle: 'circle',
7291
+ font: {
7292
+ size: 14
7293
+ }
7294
+ },
7295
+ },
7296
+ tooltip: {
7297
+ callbacks: {
7298
+ label: (ctx) => {
7299
+ const label = ctx.label || ctx.dataset.label || '';
7300
+ // Convert value to number and fix to 2 decimal places
7301
+ const value = Number(ctx.raw);
7302
+ const formattedValue = isNaN(value) ? ctx.formattedValue : value.toFixed(2);
7303
+ return `${label}: ${formattedValue}`;
7304
+ },
7305
+ },
7306
+ backgroundColor: '#17272B'
7307
+ },
7308
+ },
7309
+ };
7310
+ }
7311
+ getLineChartConfig() {
7312
+ const startOfCurrentMonth = new Date();
7313
+ startOfCurrentMonth.setDate(1);
7314
+ startOfCurrentMonth.setHours(0, 0, 0, 0);
7315
+ return {
7316
+ responsive: true,
7317
+ maintainAspectRatio: false,
7318
+ animation: { duration: 0 },
7319
+ elements: {
7320
+ point: { radius: 0, hoverRadius: 4 },
7321
+ },
7322
+ plugins: {
7323
+ legend: {
7324
+ labels: {
7325
+ padding: 20,
7326
+ generateLabels: (chart) => {
7327
+ return chart.data.datasets.map((dataset, i) => ({
7328
+ text: dataset.label || '',
7329
+ strokeStyle: dataset.borderColor,
7330
+ fillStyle: dataset.backgroundColor || 'transparent',
7331
+ lineDash: dataset.borderDash || [],
7332
+ lineWidth: dataset.borderWidth || 2,
7333
+ hidden: !chart.isDatasetVisible(i),
7334
+ datasetIndex: i,
7335
+ pointStyle: 'line',
7336
+ }));
7337
+ },
7338
+ },
7339
+ },
7340
+ tooltip: {
7341
+ mode: 'index',
7342
+ intersect: false,
7343
+ backgroundColor: '#17272B',
7344
+ titleFont: { size: 14, weight: 'bold' },
7345
+ bodyFont: { size: 12 },
7346
+ callbacks: {
7347
+ title: (context) => {
7348
+ var _a, _b;
7349
+ if (!context || !context.length)
7350
+ return '';
7351
+ const date = new Date((_b = (_a = context[0].parsed) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : context[0].label);
7352
+ return date.toLocaleDateString(undefined, {
7353
+ day: '2-digit',
7354
+ month: 'short',
7355
+ year: 'numeric',
7356
+ });
7357
+ },
7358
+ label: (ctx) => {
7359
+ const rawValue = ctx.parsed && ctx.parsed.y !== undefined ? ctx.parsed.y : ctx.raw;
7360
+ // Format to max 2 decimal places
7361
+ const value = Number(rawValue);
7362
+ const formattedValue = isNaN(value) ? rawValue : value.toFixed(2);
7363
+ return `${ctx.dataset.label}: ${formattedValue}${this.isYAxisPercentageValues ? '%' : ''}`;
7364
+ },
7365
+ labelColor: (ctx) => {
7366
+ if (ctx.dataset.label !== 'Overall') {
7367
+ return {
7368
+ borderWidth: 2
7369
+ };
7370
+ }
7371
+ return {
7372
+ borderWidth: 2,
7373
+ borderColor: ctx.dataset.borderColor,
7374
+ backgroundColor: ctx.dataset.borderColor,
7375
+ };
7376
+ }
7377
+ },
7378
+ },
7379
+ },
7380
+ interaction: {
7381
+ mode: 'index',
7382
+ intersect: false,
7383
+ },
7384
+ scales: {
7385
+ x: {
7386
+ type: 'time',
7387
+ time: {
7388
+ unit: 'month',
7389
+ displayFormats: {
7390
+ month: 'MMM yyyy',
7391
+ },
7392
+ tooltipFormat: 'dd MMM yyyy',
7393
+ },
7394
+ grid: { color: '#E5E5E5' },
7395
+ border: { dash: [4, 4] },
7396
+ ticks: {
7397
+ autoSkip: true,
7398
+ maxRotation: 0,
7399
+ },
7400
+ },
7401
+ y: {
7402
+ min: 0,
7403
+ max: 100,
7404
+ beginAtZero: true,
7405
+ ticks: {
7406
+ stepSize: 20,
7407
+ callback: (value) => {
7408
+ const numValue = Number(value);
7409
+ const formatted = isNaN(numValue) ? value : (Number.isInteger(numValue) ? numValue : numValue.toFixed(2));
7410
+ return this.isYAxisPercentageValues ? `${formatted}%` : formatted;
7411
+ },
7412
+ },
7413
+ grid: { color: '#E5E5E5' },
7414
+ border: { dash: [4, 4] },
7415
+ },
7416
+ },
7417
+ };
7418
+ }
7419
+ getDoughnutChartConfig() {
7420
+ return {
7421
+ plugins: {
7422
+ legend: { labels: { pointStyle: 'circle', padding: 16, } },
7423
+ },
7424
+ cutout: '60%'
7425
+ };
7426
+ }
7427
+ getDoughnutV2ChartConfig() {
7428
+ return {
7429
+ plugins: {
7430
+ legend: {
7431
+ labels: {
7432
+ pointStyle: 'circle',
7433
+ padding: 16
7434
+ },
7435
+ onClick: (e, legendItem) => {
7436
+ e.stopPropagation();
7437
+ const index = legendItem.index;
7438
+ if (this.selectedSegmentIndex !== index) {
7439
+ this.selectedSegmentIndex = index;
7440
+ this.updateChartColors();
7441
+ this.notifyActiveSegment();
7442
+ }
7443
+ }
7444
+ },
7445
+ tooltip: {
7446
+ enabled: false
7447
+ }
7448
+ },
7449
+ cutout: '60%',
7450
+ onHover: (_event, activeElements) => {
7451
+ if (activeElements && activeElements.length > 0) {
7452
+ this.hoverSegmentIndex = activeElements[0].index;
7453
+ this.updateChartColors();
7454
+ }
7455
+ else {
7456
+ this.hoverSegmentIndex = null;
7457
+ this.updateChartColors();
7458
+ }
7459
+ },
7460
+ onClick: (_event, activeElements) => {
7461
+ if (activeElements && activeElements.length > 0) {
7462
+ const clickedIndex = activeElements[0].index;
7463
+ if (this.selectedSegmentIndex !== clickedIndex) {
7464
+ this.selectedSegmentIndex = clickedIndex;
7465
+ this.updateChartColors();
7466
+ this.notifyActiveSegment();
7467
+ }
7468
+ }
7469
+ },
7470
+ };
7471
+ }
7472
+ updateChartColors() {
7473
+ var _a, _b, _c, _d;
7474
+ if (!this.chartInstance || this.chartType !== 'doughnut-v2')
7475
+ return;
7476
+ const dataset = this.chartInstance.data.datasets[0];
7477
+ const chartDataDataset = (_b = (_a = this.chartData) === null || _a === void 0 ? void 0 : _a.datasets) === null || _b === void 0 ? void 0 : _b[0];
7478
+ if (this.chartType === 'doughnut-v2' && this.chartInstance.isDatasetVisible(0) === false) {
7479
+ this.chartInstance.setDatasetVisibility(0, true);
7480
+ }
7481
+ // Default color for doughnut-v2
7482
+ const defaultSelectedColor = '#45C9B0';
7483
+ const defaultHoverColor = '#A3A3A3';
7484
+ const defaultInactiveColor = '#E5E5E5';
7485
+ const selectedColors = chartDataDataset === null || chartDataDataset === void 0 ? void 0 : chartDataDataset.selectedColors;
7486
+ const hoverColors = chartDataDataset === null || chartDataDataset === void 0 ? void 0 : chartDataDataset.hoverColors;
7487
+ const inactiveColors = chartDataDataset === null || chartDataDataset === void 0 ? void 0 : chartDataDataset.inactiveColors;
7488
+ let newColors = [];
7489
+ if (this.selectedSegmentIndex !== null) {
7490
+ newColors = dataset.data.map((_, index) => {
7491
+ if (index === this.hoverSegmentIndex) {
7492
+ return (hoverColors === null || hoverColors === void 0 ? void 0 : hoverColors[index]) || defaultHoverColor;
7493
+ }
7494
+ else if (index === this.selectedSegmentIndex) {
7495
+ return (selectedColors === null || selectedColors === void 0 ? void 0 : selectedColors[index]) || defaultSelectedColor;
7496
+ }
7497
+ else {
7498
+ return (inactiveColors === null || inactiveColors === void 0 ? void 0 : inactiveColors[index]) || defaultInactiveColor;
7499
+ }
7500
+ });
7501
+ }
7502
+ else if (this.hoverSegmentIndex !== null) {
7503
+ const activeIndex = (_c = this.initialActiveIndex) !== null && _c !== void 0 ? _c : 0;
7504
+ newColors = dataset.data.map((_, index) => {
7505
+ if (index === this.hoverSegmentIndex) {
7506
+ return (hoverColors === null || hoverColors === void 0 ? void 0 : hoverColors[index]) || defaultHoverColor;
7507
+ }
7508
+ else if (index === activeIndex) {
7509
+ return (selectedColors === null || selectedColors === void 0 ? void 0 : selectedColors[index]) || defaultSelectedColor;
7510
+ }
7511
+ else {
7512
+ return (inactiveColors === null || inactiveColors === void 0 ? void 0 : inactiveColors[index]) || defaultInactiveColor;
7513
+ }
7514
+ });
7515
+ }
7516
+ else {
7517
+ // No hover or selection: show initial active state
7518
+ const activeIndex = (_d = this.initialActiveIndex) !== null && _d !== void 0 ? _d : 0;
7519
+ newColors = dataset.data.map((_, index) => {
7520
+ if (index === activeIndex) {
7521
+ return (selectedColors === null || selectedColors === void 0 ? void 0 : selectedColors[index]) || defaultSelectedColor;
7522
+ }
7523
+ return (inactiveColors === null || inactiveColors === void 0 ? void 0 : inactiveColors[index]) || defaultInactiveColor;
7524
+ });
7525
+ }
7526
+ dataset.backgroundColor = newColors;
7527
+ this.chartInstance.update('active');
7528
+ }
7529
+ lightenColor(color, percent) {
7530
+ if (!color || !color.startsWith('#'))
7531
+ return color;
7532
+ const num = parseInt(color.replace('#', ''), 16);
7533
+ const r = Math.min(255, ((num >> 16) & 0xFF) + percent);
7534
+ const g = Math.min(255, ((num >> 8) & 0xFF) + percent);
7535
+ const b = Math.min(255, (num & 0xFF) + percent);
7536
+ return `#${((r << 16) | (g << 8) | b).toString(16).padStart(6, '0')}`;
7537
+ }
7538
+ getCenterTextPlugin(value) {
7539
+ return {
7540
+ id: 'centerText',
7541
+ afterDatasetsDraw: (chart) => {
7542
+ var _a, _b;
7543
+ const { ctx } = chart;
7544
+ ctx.save();
7545
+ const x = chart.getDatasetMeta(0).data[0].x;
7546
+ let y = chart.getDatasetMeta(0).data[0].y;
7547
+ if (this.chartType === 'semi-gauge') {
7548
+ y -= 20;
7549
+ }
7550
+ let displayValue = value;
7551
+ if (this.chartType === 'doughnut-v2') {
7552
+ const activeIndex = this.selectedSegmentIndex !== null
7553
+ ? this.selectedSegmentIndex
7554
+ : ((_a = this.initialActiveIndex) !== null && _a !== void 0 ? _a : 0);
7555
+ const segmentValue = (_b = this.chartData.datasets[0]) === null || _b === void 0 ? void 0 : _b.data[activeIndex];
7556
+ displayValue = Number(segmentValue || 0).toLocaleString();
7557
+ }
7558
+ ctx.font = 'bold 20px Roboto';
7559
+ ctx.fillStyle = '#111';
7560
+ ctx.textAlign = 'center';
7561
+ ctx.textBaseline = 'middle';
7562
+ ctx.fillText(displayValue, x, y);
7563
+ },
7564
+ };
7565
+ }
7566
+ getLegendHoverPlugin() {
7567
+ return {
7568
+ id: 'legendHover',
7569
+ afterDraw: (chart) => {
7570
+ if (this.hoverSegmentIndex === null)
7571
+ return;
7572
+ const legend = chart.legend;
7573
+ if (!legend || !legend.legendItems)
7574
+ return;
7575
+ const ctx = chart.ctx;
7576
+ const legendItem = legend.legendItems[this.hoverSegmentIndex];
7577
+ if (!legendItem)
7578
+ return;
7579
+ const boxes = legend.legendHitBoxes;
7580
+ if (!boxes || !boxes[this.hoverSegmentIndex])
7581
+ return;
7582
+ const box = boxes[this.hoverSegmentIndex];
7583
+ const padding = 8;
7584
+ const borderRadius = 4;
7585
+ ctx.save();
7586
+ ctx.fillStyle = '#f5f5f5';
7587
+ ctx.beginPath();
7588
+ ctx.roundRect(box.left - padding, box.top - padding, box.width + padding * 2, box.height + padding * 2, borderRadius);
7589
+ ctx.fill();
7590
+ const pointRadius = 8;
7591
+ const pointX = box.left + pointRadius;
7592
+ const pointY = box.top + box.height / 2;
7593
+ ctx.fillStyle = '#D1D5DB';
7594
+ ctx.beginPath();
7595
+ ctx.arc(pointX, pointY, pointRadius, 0, 2 * Math.PI);
7596
+ ctx.fill();
7597
+ ctx.fillStyle = '#9CA3AF';
7598
+ ctx.font = '14px Roboto, sans-serif';
7599
+ ctx.textBaseline = 'middle';
7600
+ ctx.textAlign = 'left';
7601
+ ctx.fillText(legendItem.text, box.left + pointRadius * 2 + 4, pointY);
7602
+ ctx.restore();
7603
+ },
7604
+ };
7605
+ }
7606
+ getSemiGaugeChartConfig() {
7607
+ return {
7608
+ plugins: {
7609
+ legend: { labels: { pointStyle: 'circle', padding: 16, } },
7610
+ },
7611
+ rotation: -90,
7612
+ circumference: 180,
7613
+ cutout: '70%',
7614
+ };
7615
+ }
7616
+ merge(target, source) {
7617
+ if (typeof target !== 'object' || typeof source !== 'object')
7618
+ return source;
7619
+ for (const key of Object.keys(source)) {
7620
+ if (source[key] instanceof Object && key in target) {
7621
+ target[key] = this.merge(Object.assign({}, target[key]), source[key]);
7622
+ }
7623
+ else {
7624
+ target[key] = source[key];
7625
+ }
7626
+ }
7627
+ return target;
7628
+ }
7629
+ getChartOptions() {
7630
+ const base = this.getBaseOptions();
7631
+ let specific = {};
7632
+ if (this.chartType === 'line')
7633
+ specific = this.getLineChartConfig();
7634
+ else if (this.chartType === 'doughnut')
7635
+ specific = this.getDoughnutChartConfig();
7636
+ else if (this.chartType === 'semi-gauge')
7637
+ specific = this.getSemiGaugeChartConfig();
7638
+ else if (this.chartType === 'doughnut-v2')
7639
+ specific = this.getDoughnutV2ChartConfig();
7640
+ return this.merge(this.merge(base, specific), this.chartOptions || {});
7641
+ }
7642
+ exportChart(format) {
7643
+ if (!this.chartInstance)
7644
+ return;
7645
+ const link = document.createElement('a');
7646
+ link.download = `chart-export.${format}`;
7647
+ if (format === 'png') {
7648
+ link.href = this.chartInstance.toBase64Image('image/png');
7649
+ }
7650
+ else {
7651
+ const svgData = new XMLSerializer().serializeToString(this.canvasEl);
7652
+ const blob = new Blob([svgData], { type: 'image/svg+xml' });
7653
+ link.href = URL.createObjectURL(blob);
7654
+ }
7655
+ link.click();
7656
+ }
7657
+ getErrorContent() {
7658
+ return this.commonContent('warning', 'Something went wrong', 'We ran into an issue while trying to load this widget.', '#DC0000', true);
7659
+ }
7660
+ getNoDataContent() {
7661
+ return this.commonContent('ssid_chart', 'No data available', 'There is currently no data available to show performance trends.', '#111');
7662
+ }
7663
+ commonContent(iconName, heading, message, iconColor, showActions = false) {
7664
+ return (h("div", { class: "error-content" }, h("tttx-icon_1_9_103", { icon: iconName, color: iconColor, size: 48 }), h("span", { class: 'error-heading' }, heading), h("span", { class: 'error-message' }, message), showActions && h("div", { class: "error-actions" }, h("tttx-button_1_9_103", { class: 'support-btn', icon: "help", design: "primary", onClick: () => this.renderChart() }, "Contact support"))));
7665
+ }
7666
+ notifyActiveSegment() {
7667
+ var _a, _b;
7668
+ if (this.chartType !== 'doughnut-v2' || !this.chartData)
7669
+ return;
7670
+ const activeIndex = this.selectedSegmentIndex !== null
7671
+ ? this.selectedSegmentIndex
7672
+ : ((_a = this.initialActiveIndex) !== null && _a !== void 0 ? _a : 0);
7673
+ const label = ((_b = this.chartData.labels) === null || _b === void 0 ? void 0 : _b[activeIndex]) || '';
7674
+ if (this.activeSegmentChangeCallback) {
7675
+ this.activeSegmentChangeCallback(label);
7676
+ }
7677
+ }
7678
+ render() {
7679
+ var _a, _b, _c;
7680
+ return (h("div", { class: "chart-wrapper", style: { width: this.width, height: this.height } }, this.loading && h("div", { class: "chart-loading" }, h("tttx-loading-spinner_1_9_103", { size: 'large', color: '#2b9ab7' })), this.error && this.getErrorContent(), !this.loading && !this.error && (!this.chartData || !((_a = this.chartData.datasets) === null || _a === void 0 ? void 0 : _a.length)) && (this.getNoDataContent()), !this.loading && !this.error && ((_c = (_b = this.chartData) === null || _b === void 0 ? void 0 : _b.datasets) === null || _c === void 0 ? void 0 : _c.length) > 0 && (h("div", { class: "chart-canvas-container", style: { width: '100%', height: '100%' } }, h("canvas", { ref: el => (this.canvasEl = el), "aria-label": "Chart canvas", role: "img", style: {
7681
+ width: '100%',
7682
+ height: '100%',
7683
+ cursor: this.chartType === 'doughnut-v2' ? 'pointer' : 'default'
7684
+ } }))), this.exportable && !this.loading && !this.error && (h("div", { class: "export-buttons" }, this.showPngSvgExport && h("tttx-button_1_9_103", { class: 'export-png', design: "primary", onClick: () => this.exportChart('png') }, "Export PNG"), this.showPngSvgExport && h("tttx-button_1_9_103", { class: 'export-svg', design: "primary", onClick: () => this.exportChart('svg') }, "Export SVG"), h("tttx-button_1_9_103", { class: 'export-csv', design: "primary", onClick: () => this.exportCSV.emit({ name: this.chartType }) }, "Export CSV")))));
7685
+ }
7686
+ get el() { return this; }
7687
+ static get watchers() { return {
7688
+ "chartData": ["handleUpdate", "notifyActiveSegment"],
7689
+ "chartOptions": ["handleUpdate"],
7690
+ "selectedSegmentIndex": ["notifyActiveSegment"],
7691
+ "initialActiveIndex": ["notifyActiveSegment"]
7692
+ }; }
7693
+ static get style() { return tttxChartCss; }
7694
+ }, [1, "tttx-chart_1_9_103", {
7695
+ "chartType": [1, "chart-type"],
7696
+ "chartData": [16],
7697
+ "chartOptions": [16],
7698
+ "loading": [4],
7699
+ "error": [4],
7700
+ "fallbackText": [1, "fallback-text"],
7701
+ "width": [1],
7702
+ "height": [1],
7703
+ "isYAxisPercentageValues": [4, "is-y-axis-percentage-values"],
7704
+ "showActiveSegmentLabel": [4, "show-active-segment-label"],
7705
+ "initialActiveIndex": [2, "initial-active-index"],
7706
+ "activeSegmentChangeCallback": [16],
7707
+ "exportable": [32],
7708
+ "chartInstance": [32],
7709
+ "showPngSvgExport": [32],
7710
+ "selectedSegmentIndex": [32],
7711
+ "hoverSegmentIndex": [32]
7712
+ }]);
7713
+ function defineCustomElement$1() {
7714
+ if (typeof customElements === "undefined") {
7715
+ return;
7716
+ }
7717
+ const components = ["tttx-chart_1_9_103", "tttx-button_1_9_103", "tttx-icon_1_9_103", "tttx-loading-spinner_1_9_103"];
7718
+ components.forEach(tagName => { switch (tagName) {
7719
+ case "tttx-chart_1_9_103":
7720
+ if (!customElements.get(tagName)) {
7721
+ customElements.define(tagName, TttxChart);
7722
+ }
7723
+ break;
7724
+ case "tttx-button_1_9_103":
7725
+ if (!customElements.get(tagName)) {
7726
+ defineCustomElement$4();
7727
+ }
7728
+ break;
7729
+ case "tttx-icon_1_9_103":
7730
+ if (!customElements.get(tagName)) {
7731
+ defineCustomElement$3();
7732
+ }
7733
+ break;
7734
+ case "tttx-loading-spinner_1_9_103":
7735
+ if (!customElements.get(tagName)) {
7736
+ defineCustomElement$2();
7737
+ }
7738
+ break;
7739
+ } });
7740
+ }
7741
+
7742
+ const TttxChart_1_9_103 = TttxChart;
7743
7743
  const defineCustomElement = defineCustomElement$1;
7744
7744
 
7745
- export { TttxChart_1_9_101, defineCustomElement };
7745
+ export { TttxChart_1_9_103, defineCustomElement };