@3t-transform/threeteeui 1.9.102 → 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 (440) 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_localcomponent.cjs.entry.js → tttx-action-dropdown_1_9_103.cjs.entry.js} +51 -51
  5. package/dist/cjs/{tttx-button-v2_localcomponent.cjs.entry.js → tttx-button-v2_1_9_103.cjs.entry.js} +147 -147
  6. package/dist/cjs/{tttx-button_localcomponent.cjs.entry.js → tttx-button_1_9_103.cjs.entry.js} +26 -26
  7. package/dist/cjs/{tttx-chart_localcomponent.cjs.entry.js → tttx-chart_1_9_103.cjs.entry.js} +524 -524
  8. package/dist/cjs/{tttx-checkbox-group-caption_localcomponent.cjs.entry.js → tttx-checkbox-group-caption_1_9_103.cjs.entry.js} +9 -9
  9. package/dist/cjs/{tttx-checkbox-group-heading_localcomponent.cjs.entry.js → tttx-checkbox-group-heading_1_9_103.cjs.entry.js} +9 -9
  10. package/dist/cjs/{tttx-checkbox-group_localcomponent.cjs.entry.js → tttx-checkbox-group_1_9_103.cjs.entry.js} +9 -9
  11. package/dist/cjs/{tttx-checkbox_localcomponent.cjs.entry.js → tttx-checkbox_1_9_103.cjs.entry.js} +33 -33
  12. package/dist/cjs/{tttx-comments_localcomponent.cjs.entry.js → tttx-comments_1_9_103.cjs.entry.js} +204 -204
  13. package/dist/cjs/tttx-data-pattern_1_9_103.cjs.entry.js +30 -0
  14. package/dist/cjs/{tttx-datacard_localcomponent.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_localcomponent.cjs.entry.js → tttx-dialog-box_1_9_103.cjs.entry.js} +94 -94
  17. package/dist/cjs/{tttx-dialog_localcomponent.cjs.entry.js → tttx-dialog_1_9_103.cjs.entry.js} +69 -69
  18. package/dist/cjs/{tttx-expander_localcomponent.cjs.entry.js → tttx-expander_1_9_103.cjs.entry.js} +28 -28
  19. package/dist/cjs/{tttx-filter_localcomponent_4.cjs.entry.js → tttx-filter_1_9_103_4.cjs.entry.js} +386 -386
  20. package/dist/cjs/{tttx-form_localcomponent.cjs.entry.js → tttx-form_1_9_103.cjs.entry.js} +985 -985
  21. package/dist/cjs/{tttx-graph_localcomponent.cjs.entry.js → tttx-graph_1_9_103.cjs.entry.js} +124 -124
  22. package/dist/cjs/{tttx-icon_localcomponent.cjs.entry.js → tttx-icon_1_9_103.cjs.entry.js} +24 -24
  23. package/dist/cjs/{tttx-keyvalue-block_localcomponent.cjs.entry.js → tttx-keyvalue-block_1_9_103.cjs.entry.js} +62 -62
  24. package/dist/cjs/{tttx-loading-spinner_localcomponent_3.cjs.entry.js → tttx-loading-spinner_1_9_103_3.cjs.entry.js} +172 -172
  25. package/dist/cjs/{tttx-multiselect-box_localcomponent.cjs.entry.js → tttx-multiselect-box_1_9_103.cjs.entry.js} +175 -175
  26. package/dist/cjs/{tttx-percentage-bar_localcomponent.cjs.entry.js → tttx-percentage-bar_1_9_103.cjs.entry.js} +56 -56
  27. package/dist/cjs/{tttx-qrcode_localcomponent.cjs.entry.js → tttx-qrcode_1_9_103.cjs.entry.js} +28 -28
  28. package/dist/cjs/{tttx-range-slider_localcomponent.cjs.entry.js → tttx-range-slider_1_9_103.cjs.entry.js} +185 -185
  29. package/dist/cjs/{tttx-select-box_localcomponent.cjs.entry.js → tttx-select-box_1_9_103.cjs.entry.js} +239 -239
  30. package/dist/cjs/{tttx-skeleton_loader_localcomponent.cjs.entry.js → tttx-skeleton_loader_1_9_103.cjs.entry.js} +30 -30
  31. package/dist/cjs/{tttx-table_localcomponent.cjs.entry.js → tttx-table_1_9_103.cjs.entry.js} +72 -72
  32. package/dist/cjs/{tttx-tabs_localcomponent.cjs.entry.js → tttx-tabs_1_9_103.cjs.entry.js} +103 -103
  33. package/dist/cjs/{tttx-tag-v2_localcomponent.cjs.entry.js → tttx-tag-v2_1_9_103.cjs.entry.js} +72 -72
  34. package/dist/cjs/{tttx-textarea_localcomponent.cjs.entry.js → tttx-textarea_1_9_103.cjs.entry.js} +50 -50
  35. package/dist/cjs/{tttx-toggle_localcomponent.cjs.entry.js → tttx-toggle_1_9_103.cjs.entry.js} +30 -30
  36. package/dist/cjs/{tttx-tooltip_localcomponent.cjs.entry.js → tttx-tooltip_1_9_103.cjs.entry.js} +87 -87
  37. package/dist/cjs/{tttx-tree-view_localcomponent.cjs.entry.js → tttx-tree-view_1_9_103.cjs.entry.js} +341 -341
  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.js +463 -463
  122. package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.stories.js +402 -402
  123. package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.js +176 -176
  124. package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.js +28 -28
  125. package/dist/collection/components/palette.stories.js +7 -7
  126. package/dist/collection/icons.js +2838 -2838
  127. package/dist/collection/index.js +1 -1
  128. package/dist/collection/shared/domsanitiser.options.js +14 -14
  129. package/dist/components/auto.js +177 -177
  130. package/dist/components/domsanitiser.options.js +12 -12
  131. package/dist/components/index.d.ts +38 -38
  132. package/dist/components/index.js +38 -38
  133. package/dist/components/tttx-action-dropdown_1_9_103.d.ts +11 -0
  134. package/dist/components/{tttx-action-dropdown_localcomponent.js → tttx-action-dropdown_1_9_103.js} +81 -81
  135. package/dist/components/tttx-button-v2.js +182 -182
  136. package/dist/components/tttx-button-v2_1_9_103.d.ts +11 -0
  137. package/dist/components/{tttx-button-v2_localcomponent.js → tttx-button-v2_1_9_103.js} +2 -2
  138. package/dist/components/tttx-button.js +51 -51
  139. package/dist/components/tttx-button_1_9_103.d.ts +11 -0
  140. package/dist/components/{tttx-button_localcomponent.js → tttx-button_1_9_103.js} +2 -2
  141. package/dist/components/tttx-chart_1_9_103.d.ts +11 -0
  142. package/dist/components/{tttx-chart_localcomponent.js → tttx-chart_1_9_103.js} +574 -574
  143. package/dist/components/tttx-checkbox-group-caption_1_9_103.d.ts +11 -0
  144. package/dist/components/{tttx-checkbox-group-caption_localcomponent.js → tttx-checkbox-group-caption_1_9_103.js} +24 -24
  145. package/dist/components/tttx-checkbox-group-heading_1_9_103.d.ts +11 -0
  146. package/dist/components/{tttx-checkbox-group-heading_localcomponent.js → tttx-checkbox-group-heading_1_9_103.js} +24 -24
  147. package/dist/components/tttx-checkbox-group_1_9_103.d.ts +11 -0
  148. package/dist/components/{tttx-checkbox-group_localcomponent.js → tttx-checkbox-group_1_9_103.js} +25 -25
  149. package/dist/components/tttx-checkbox_1_9_103.d.ts +11 -0
  150. package/dist/components/{tttx-checkbox_localcomponent.js → tttx-checkbox_1_9_103.js} +59 -59
  151. package/dist/components/tttx-comments_1_9_103.d.ts +11 -0
  152. package/dist/components/{tttx-comments_localcomponent.js → tttx-comments_1_9_103.js} +241 -241
  153. package/dist/components/tttx-data-pattern_1_9_103.d.ts +11 -0
  154. package/dist/components/{tttx-data-pattern_localcomponent.js → tttx-data-pattern_1_9_103.js} +80 -80
  155. package/dist/components/tttx-datacard_1_9_103.d.ts +11 -0
  156. package/dist/components/{tttx-datacard_localcomponent.js → tttx-datacard_1_9_103.js} +79 -79
  157. package/dist/components/tttx-date-range-picker.js +242 -242
  158. package/dist/components/tttx-dialog-box_1_9_103.d.ts +11 -0
  159. package/dist/components/{tttx-dialog-box_localcomponent.js → tttx-dialog-box_1_9_103.js} +125 -125
  160. package/dist/components/tttx-dialog_1_9_103.d.ts +11 -0
  161. package/dist/components/{tttx-dialog_localcomponent.js → tttx-dialog_1_9_103.js} +103 -103
  162. package/dist/components/tttx-expander_1_9_103.d.ts +11 -0
  163. package/dist/components/{tttx-expander_localcomponent.js → tttx-expander_1_9_103.js} +55 -55
  164. package/dist/components/tttx-filter.js +217 -217
  165. package/dist/components/tttx-filter_1_9_103.d.ts +11 -0
  166. package/dist/components/{tttx-filter_localcomponent.js → tttx-filter_1_9_103.js} +2 -2
  167. package/dist/components/tttx-form_1_9_103.d.ts +11 -0
  168. package/dist/components/{tttx-form_localcomponent.js → tttx-form_1_9_103.js} +1039 -1039
  169. package/dist/components/tttx-graph.js +143 -143
  170. package/dist/components/tttx-graph_1_9_103.d.ts +11 -0
  171. package/dist/components/{tttx-graph_localcomponent.js → tttx-graph_1_9_103.js} +2 -2
  172. package/dist/components/tttx-icon.js +42 -42
  173. package/dist/components/tttx-icon_1_9_103.d.ts +11 -0
  174. package/dist/components/{tttx-icon_localcomponent.js → tttx-icon_1_9_103.js} +2 -2
  175. package/dist/components/tttx-keyvalue-block_1_9_103.d.ts +11 -0
  176. package/dist/components/{tttx-keyvalue-block_localcomponent.js → tttx-keyvalue-block_1_9_103.js} +83 -83
  177. package/dist/components/tttx-list.js +92 -92
  178. package/dist/components/tttx-list_1_9_103.d.ts +11 -0
  179. package/dist/components/{tttx-list_localcomponent.js → tttx-list_1_9_103.js} +2 -2
  180. package/dist/components/tttx-loading-spinner.js +92 -92
  181. package/dist/components/tttx-loading-spinner_1_9_103.d.ts +11 -0
  182. package/dist/components/{tttx-loading-spinner_localcomponent.js → tttx-loading-spinner_1_9_103.js} +2 -2
  183. package/dist/components/tttx-multiselect-box_1_9_103.d.ts +11 -0
  184. package/dist/components/{tttx-multiselect-box_localcomponent.js → tttx-multiselect-box_1_9_103.js} +231 -231
  185. package/dist/components/tttx-percentage-bar_1_9_103.d.ts +11 -0
  186. package/dist/components/{tttx-percentage-bar_localcomponent.js → tttx-percentage-bar_1_9_103.js} +80 -80
  187. package/dist/components/tttx-qrcode_1_9_103.d.ts +11 -0
  188. package/dist/components/{tttx-qrcode_localcomponent.js → tttx-qrcode_1_9_103.js} +47 -47
  189. package/dist/components/tttx-range-slider_1_9_103.d.ts +11 -0
  190. package/dist/components/{tttx-range-slider_localcomponent.js → tttx-range-slider_1_9_103.js} +208 -208
  191. package/dist/components/tttx-select-box.js +295 -295
  192. package/dist/components/tttx-select-box_1_9_103.d.ts +11 -0
  193. package/dist/components/{tttx-select-box_localcomponent.js → tttx-select-box_1_9_103.js} +2 -2
  194. package/dist/components/tttx-skeleton_loader_1_9_103.d.ts +11 -0
  195. package/dist/components/{tttx-skeleton_loader_localcomponent.js → tttx-skeleton_loader_1_9_103.js} +57 -57
  196. package/dist/components/tttx-sorter.js +136 -136
  197. package/dist/components/tttx-sorter_1_9_103.d.ts +11 -0
  198. package/dist/components/{tttx-sorter_localcomponent.js → tttx-sorter_1_9_103.js} +2 -2
  199. package/dist/components/tttx-standalone-input.js +136 -136
  200. package/dist/components/tttx-standalone-input_1_9_103.d.ts +11 -0
  201. package/dist/components/{tttx-standalone-input_localcomponent.js → tttx-standalone-input_1_9_103.js} +2 -2
  202. package/dist/components/tttx-table_1_9_103.d.ts +11 -0
  203. package/dist/components/{tttx-table_localcomponent.js → tttx-table_1_9_103.js} +109 -109
  204. package/dist/components/tttx-tabs_1_9_103.d.ts +11 -0
  205. package/dist/components/{tttx-tabs_localcomponent.js → tttx-tabs_1_9_103.js} +128 -128
  206. package/dist/components/tttx-tag-v2_1_9_103.d.ts +11 -0
  207. package/dist/components/{tttx-tag-v2_localcomponent.js → tttx-tag-v2_1_9_103.js} +105 -105
  208. package/dist/components/tttx-tag.js +44 -44
  209. package/dist/components/tttx-tag_1_9_103.d.ts +11 -0
  210. package/dist/components/{tttx-tag_localcomponent.js → tttx-tag_1_9_103.js} +2 -2
  211. package/dist/components/tttx-textarea_1_9_103.d.ts +11 -0
  212. package/dist/components/{tttx-textarea_localcomponent.js → tttx-textarea_1_9_103.js} +83 -83
  213. package/dist/components/tttx-toggle_1_9_103.d.ts +11 -0
  214. package/dist/components/{tttx-toggle_localcomponent.js → tttx-toggle_1_9_103.js} +49 -49
  215. package/dist/components/tttx-toolbar.js +42 -42
  216. package/dist/components/tttx-toolbar_1_9_103.d.ts +11 -0
  217. package/dist/components/{tttx-toolbar_localcomponent.js → tttx-toolbar_1_9_103.js} +2 -2
  218. package/dist/components/tttx-tooltip_1_9_103.d.ts +11 -0
  219. package/dist/components/{tttx-tooltip_localcomponent.js → tttx-tooltip_1_9_103.js} +114 -114
  220. package/dist/components/tttx-tree-view_1_9_103.d.ts +11 -0
  221. package/dist/components/{tttx-tree-view_localcomponent.js → tttx-tree-view_1_9_103.js} +370 -370
  222. package/dist/esm/{auto-421f2656.js → auto-a07ee1b1.js} +177 -177
  223. package/dist/esm/{domsanitiser.options-38a67458.js → domsanitiser.options-2c1ef894.js} +12 -12
  224. package/dist/esm/loader.js +1 -1
  225. package/dist/esm/polyfills/core-js.js +0 -0
  226. package/dist/esm/polyfills/dom.js +0 -0
  227. package/dist/esm/polyfills/es5-html-element.js +0 -0
  228. package/dist/esm/polyfills/index.js +0 -0
  229. package/dist/esm/polyfills/system.js +0 -0
  230. package/dist/esm/{tttx-action-dropdown_localcomponent.entry.js → tttx-action-dropdown_1_9_103.entry.js} +51 -51
  231. package/dist/esm/{tttx-button-v2_localcomponent.entry.js → tttx-button-v2_1_9_103.entry.js} +147 -147
  232. package/dist/esm/{tttx-button_localcomponent.entry.js → tttx-button_1_9_103.entry.js} +26 -26
  233. package/dist/esm/{tttx-chart_localcomponent.entry.js → tttx-chart_1_9_103.entry.js} +524 -524
  234. package/dist/esm/{tttx-checkbox-group-caption_localcomponent.entry.js → tttx-checkbox-group-caption_1_9_103.entry.js} +9 -9
  235. package/dist/esm/{tttx-checkbox-group-heading_localcomponent.entry.js → tttx-checkbox-group-heading_1_9_103.entry.js} +9 -9
  236. package/dist/esm/{tttx-checkbox-group_localcomponent.entry.js → tttx-checkbox-group_1_9_103.entry.js} +9 -9
  237. package/dist/esm/{tttx-checkbox_localcomponent.entry.js → tttx-checkbox_1_9_103.entry.js} +33 -33
  238. package/dist/esm/{tttx-comments_localcomponent.entry.js → tttx-comments_1_9_103.entry.js} +204 -204
  239. package/dist/esm/tttx-data-pattern_1_9_103.entry.js +26 -0
  240. package/dist/esm/{tttx-datacard_localcomponent.entry.js → tttx-datacard_1_9_103.entry.js} +43 -43
  241. package/dist/esm/tttx-date-range-picker.entry.js +212 -212
  242. package/dist/esm/{tttx-dialog-box_localcomponent.entry.js → tttx-dialog-box_1_9_103.entry.js} +94 -94
  243. package/dist/esm/{tttx-dialog_localcomponent.entry.js → tttx-dialog_1_9_103.entry.js} +69 -69
  244. package/dist/esm/{tttx-expander_localcomponent.entry.js → tttx-expander_1_9_103.entry.js} +28 -28
  245. package/dist/esm/{tttx-filter_localcomponent_4.entry.js → tttx-filter_1_9_103_4.entry.js} +383 -383
  246. package/dist/esm/{tttx-form_localcomponent.entry.js → tttx-form_1_9_103.entry.js} +985 -985
  247. package/dist/esm/{tttx-graph_localcomponent.entry.js → tttx-graph_1_9_103.entry.js} +124 -124
  248. package/dist/esm/{tttx-icon_localcomponent.entry.js → tttx-icon_1_9_103.entry.js} +24 -24
  249. package/dist/esm/{tttx-keyvalue-block_localcomponent.entry.js → tttx-keyvalue-block_1_9_103.entry.js} +62 -62
  250. package/dist/esm/tttx-loading-spinner_1_9_103_3.entry.js +183 -0
  251. package/dist/esm/{tttx-multiselect-box_localcomponent.entry.js → tttx-multiselect-box_1_9_103.entry.js} +175 -175
  252. package/dist/esm/{tttx-percentage-bar_localcomponent.entry.js → tttx-percentage-bar_1_9_103.entry.js} +56 -56
  253. package/dist/esm/{tttx-qrcode_localcomponent.entry.js → tttx-qrcode_1_9_103.entry.js} +28 -28
  254. package/dist/esm/{tttx-range-slider_localcomponent.entry.js → tttx-range-slider_1_9_103.entry.js} +185 -185
  255. package/dist/esm/{tttx-select-box_localcomponent.entry.js → tttx-select-box_1_9_103.entry.js} +239 -239
  256. package/dist/esm/{tttx-skeleton_loader_localcomponent.entry.js → tttx-skeleton_loader_1_9_103.entry.js} +30 -30
  257. package/dist/esm/{tttx-table_localcomponent.entry.js → tttx-table_1_9_103.entry.js} +72 -72
  258. package/dist/esm/{tttx-tabs_localcomponent.entry.js → tttx-tabs_1_9_103.entry.js} +103 -103
  259. package/dist/esm/{tttx-tag-v2_localcomponent.entry.js → tttx-tag-v2_1_9_103.entry.js} +72 -72
  260. package/dist/esm/{tttx-textarea_localcomponent.entry.js → tttx-textarea_1_9_103.entry.js} +50 -50
  261. package/dist/esm/{tttx-toggle_localcomponent.entry.js → tttx-toggle_1_9_103.entry.js} +30 -30
  262. package/dist/esm/{tttx-tooltip_localcomponent.entry.js → tttx-tooltip_1_9_103.entry.js} +87 -87
  263. package/dist/esm/{tttx-tree-view_localcomponent.entry.js → tttx-tree-view_1_9_103.entry.js} +341 -341
  264. package/dist/esm/tttx.js +1 -1
  265. package/dist/tttx/p-0c5bc253.entry.js +1 -0
  266. package/dist/tttx/p-10d2d044.entry.js +1 -0
  267. package/dist/tttx/p-1623f3cf.entry.js +1 -1
  268. package/dist/tttx/p-16aa3f67.entry.js +1 -0
  269. package/dist/tttx/p-21707b8d.entry.js +1 -1
  270. package/dist/tttx/p-2251ab85.entry.js +1 -1
  271. package/dist/tttx/p-2d19c46c.entry.js +1 -1
  272. package/dist/tttx/p-358eaa44.entry.js +1 -1
  273. package/dist/tttx/p-362999b3.entry.js +1 -1
  274. package/dist/tttx/p-3ec67d75.entry.js +1 -1
  275. package/dist/tttx/p-44f0af69.entry.js +1 -1
  276. package/dist/tttx/p-4664d065.entry.js +1 -1
  277. package/dist/tttx/p-486ca932.entry.js +1 -0
  278. package/dist/tttx/p-59115c8f.entry.js +1 -0
  279. package/dist/tttx/p-5d289334.entry.js +1 -1
  280. package/dist/tttx/p-6ec18b4a.entry.js +1 -1
  281. package/dist/tttx/p-700c2816.entry.js +1 -0
  282. package/dist/tttx/p-7b5b0670.entry.js +1 -1
  283. package/dist/tttx/p-7d1712fe.entry.js +1 -1
  284. package/dist/tttx/{p-41b69e01.entry.js → p-8f85ab3e.entry.js} +1 -1
  285. package/dist/tttx/p-a1b8ecda.entry.js +1 -1
  286. package/dist/tttx/p-a43e2c5e.entry.js +1 -1
  287. package/dist/tttx/p-b8cc0cb2.entry.js +1 -1
  288. package/dist/tttx/p-b9003a76.entry.js +1 -1
  289. package/dist/tttx/p-bb59054f.entry.js +1 -1
  290. package/dist/tttx/p-c66bc14c.entry.js +1 -1
  291. package/dist/tttx/p-c8051143.entry.js +1 -1
  292. package/dist/tttx/p-ca93f786.entry.js +1 -1
  293. package/dist/tttx/p-d21b0507.entry.js +1 -1
  294. package/dist/tttx/p-d945d492.entry.js +1 -1
  295. package/dist/tttx/{p-34e0e487.entry.js → p-df708b75.entry.js} +2 -2
  296. package/dist/tttx/p-f0c1380f.entry.js +1 -1
  297. package/dist/tttx/{p-0bb158ce.js → p-f411d1e5.js} +2 -2
  298. package/dist/tttx/p-fa25ee03.entry.js +1 -0
  299. package/dist/tttx/p-fbdd1046.entry.js +1 -0
  300. package/dist/tttx/tttx.esm.js +1 -1
  301. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +11 -11
  302. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +11 -11
  303. package/dist/types/components/atoms/tttx-button-v2/tttx-button-v2.d.ts +36 -36
  304. package/dist/types/components/atoms/tttx-button-v2/tttx-button-v2.stories.d.ts +68 -68
  305. package/dist/types/components/atoms/tttx-checkbox/tttx-checkbox.d.ts +17 -17
  306. package/dist/types/components/atoms/tttx-datacard/tttx-datacard.d.ts +21 -21
  307. package/dist/types/components/atoms/tttx-datacard/tttx-datacard.stories.d.ts +44 -44
  308. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +9 -9
  309. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +25 -25
  310. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +13 -13
  311. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +11 -11
  312. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +23 -23
  313. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +47 -47
  314. package/dist/types/components/atoms/tttx-percentage-bar/tttx-percentage-bar.d.ts +22 -22
  315. package/dist/types/components/atoms/tttx-percentage-bar/tttx-percentage-bar.stories.d.ts +10 -10
  316. package/dist/types/components/atoms/tttx-qrcode/tttx-qrcode.d.ts +8 -8
  317. package/dist/types/components/atoms/tttx-qrcode/tttx-qrcode.stories.d.ts +23 -23
  318. package/dist/types/components/atoms/tttx-skeleton-loader/tttx-skeleton-loader.d.ts +14 -14
  319. package/dist/types/components/atoms/tttx-tag/tttx-tag.d.ts +10 -10
  320. package/dist/types/components/atoms/tttx-tag/tttx-tag.stories.d.ts +51 -51
  321. package/dist/types/components/atoms/tttx-tag-v2/tttx-tag-v2.d.ts +15 -15
  322. package/dist/types/components/atoms/tttx-tag-v2/tttx-tag-v2.stories.d.ts +48 -48
  323. package/dist/types/components/atoms/tttx-toggle/tttx-toggle.d.ts +11 -11
  324. package/dist/types/components/atoms/tttx-toggle/tttx-toggle.stories.d.ts +6 -6
  325. package/dist/types/components/domsanitiser.options.d.ts +10 -10
  326. package/dist/types/components/molecules/tttx-action-dropdown/tttx-action-dropdown.d.ts +21 -21
  327. package/dist/types/components/molecules/tttx-chart/tttx-chart.d.ts +60 -60
  328. package/dist/types/components/molecules/tttx-chart/tttx-chart.stories.d.ts +38 -38
  329. package/dist/types/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-caption.d.ts +3 -3
  330. package/dist/types/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-heading.d.ts +3 -3
  331. package/dist/types/components/molecules/tttx-checkbox-group/tttx-checkbox-group.d.ts +3 -3
  332. package/dist/types/components/molecules/tttx-checkbox-group/tttx-checkbox-group.stories.d.ts +15 -15
  333. package/dist/types/components/molecules/tttx-comments/tttx-comments.d.ts +68 -68
  334. package/dist/types/components/molecules/tttx-date-range-picker/tttx-date-range-picker.d.ts +42 -42
  335. package/dist/types/components/molecules/tttx-dialog/icon-types.d.ts +18 -18
  336. package/dist/types/components/molecules/tttx-dialog/tttx-dialog.d.ts +27 -27
  337. package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.d.ts +26 -26
  338. package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.d.ts +24 -24
  339. package/dist/types/components/molecules/tttx-expander/tttx-expander.d.ts +16 -16
  340. package/dist/types/components/molecules/tttx-filter/tttx-filter.d.ts +44 -44
  341. package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +14 -14
  342. package/dist/types/components/molecules/tttx-form/lib/timecomparatorChecks.d.ts +4 -4
  343. package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +15 -15
  344. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +297 -297
  345. package/dist/types/components/molecules/tttx-graph/gauge-label-plugin.d.ts +4 -4
  346. package/dist/types/components/molecules/tttx-graph/tttx-graph.d.ts +13 -13
  347. package/dist/types/components/molecules/tttx-graph/tttx-graph.stories.d.ts +26 -26
  348. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +23 -23
  349. package/dist/types/components/molecules/tttx-multiselect-box/tttx-multiselect-box.d.ts +50 -50
  350. package/dist/types/components/molecules/tttx-range-slider/tttx-range-slider.d.ts +45 -45
  351. package/dist/types/components/molecules/tttx-range-slider/tttx-range-slider.stories.d.ts +7 -7
  352. package/dist/types/components/molecules/tttx-select-box/tttx-select-box.d.ts +55 -55
  353. package/dist/types/components/molecules/tttx-select-box/tttx-select-box.stories.d.ts +28 -28
  354. package/dist/types/components/molecules/tttx-sorter/tttx-sorter.d.ts +21 -21
  355. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +69 -69
  356. package/dist/types/components/molecules/tttx-table/tttx-table.d.ts +32 -32
  357. package/dist/types/components/molecules/tttx-table/tttx-table.types.d.ts +6 -6
  358. package/dist/types/components/molecules/tttx-tabs/tttx-tabs.d.ts +25 -25
  359. package/dist/types/components/molecules/tttx-textarea/tttx-textarea.d.ts +42 -42
  360. package/dist/types/components/molecules/tttx-textarea/tttx-textarea.stories.d.ts +89 -89
  361. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.d.ts +8 -8
  362. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.stories.d.ts +19 -19
  363. package/dist/types/components/molecules/tttx-tooltip/tttx-tooltip.d.ts +37 -37
  364. package/dist/types/components/molecules/tttx-tooltip/tttx-tootip.stories.d.ts +12 -12
  365. package/dist/types/components/molecules/tttx-tree-view/helper/helper.d.ts +24 -24
  366. package/dist/types/components/molecules/tttx-tree-view/tttx-tree-view.d.ts +57 -57
  367. package/dist/types/components/organisms/tttx-data-pattern/tttx-data-pattern.d.ts +11 -11
  368. package/dist/types/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.d.ts +13 -13
  369. package/dist/types/components/palette.stories.d.ts +6 -6
  370. package/dist/types/components.d.ts +451 -451
  371. package/dist/types/icons.d.ts +2 -2
  372. package/dist/types/index.d.ts +1 -1
  373. package/dist/types/shared/domsanitiser.options.d.ts +10 -10
  374. package/package.json +1 -1
  375. package/dist/cjs/tttx-data-pattern_localcomponent.cjs.entry.js +0 -30
  376. package/dist/components/tttx-action-dropdown_localcomponent.d.ts +0 -11
  377. package/dist/components/tttx-button-v2_localcomponent.d.ts +0 -11
  378. package/dist/components/tttx-button_localcomponent.d.ts +0 -11
  379. package/dist/components/tttx-chart_localcomponent.d.ts +0 -11
  380. package/dist/components/tttx-checkbox-group-caption_localcomponent.d.ts +0 -11
  381. package/dist/components/tttx-checkbox-group-heading_localcomponent.d.ts +0 -11
  382. package/dist/components/tttx-checkbox-group_localcomponent.d.ts +0 -11
  383. package/dist/components/tttx-checkbox_localcomponent.d.ts +0 -11
  384. package/dist/components/tttx-comments_localcomponent.d.ts +0 -11
  385. package/dist/components/tttx-data-pattern_localcomponent.d.ts +0 -11
  386. package/dist/components/tttx-datacard_localcomponent.d.ts +0 -11
  387. package/dist/components/tttx-dialog-box_localcomponent.d.ts +0 -11
  388. package/dist/components/tttx-dialog_localcomponent.d.ts +0 -11
  389. package/dist/components/tttx-expander_localcomponent.d.ts +0 -11
  390. package/dist/components/tttx-filter_localcomponent.d.ts +0 -11
  391. package/dist/components/tttx-form_localcomponent.d.ts +0 -11
  392. package/dist/components/tttx-graph_localcomponent.d.ts +0 -11
  393. package/dist/components/tttx-icon_localcomponent.d.ts +0 -11
  394. package/dist/components/tttx-keyvalue-block_localcomponent.d.ts +0 -11
  395. package/dist/components/tttx-list_localcomponent.d.ts +0 -11
  396. package/dist/components/tttx-loading-spinner_localcomponent.d.ts +0 -11
  397. package/dist/components/tttx-multiselect-box_localcomponent.d.ts +0 -11
  398. package/dist/components/tttx-percentage-bar_localcomponent.d.ts +0 -11
  399. package/dist/components/tttx-qrcode_localcomponent.d.ts +0 -11
  400. package/dist/components/tttx-range-slider_localcomponent.d.ts +0 -11
  401. package/dist/components/tttx-select-box_localcomponent.d.ts +0 -11
  402. package/dist/components/tttx-skeleton_loader_localcomponent.d.ts +0 -11
  403. package/dist/components/tttx-sorter_localcomponent.d.ts +0 -11
  404. package/dist/components/tttx-standalone-input_localcomponent.d.ts +0 -11
  405. package/dist/components/tttx-table_localcomponent.d.ts +0 -11
  406. package/dist/components/tttx-tabs_localcomponent.d.ts +0 -11
  407. package/dist/components/tttx-tag-v2_localcomponent.d.ts +0 -11
  408. package/dist/components/tttx-tag_localcomponent.d.ts +0 -11
  409. package/dist/components/tttx-textarea_localcomponent.d.ts +0 -11
  410. package/dist/components/tttx-toggle_localcomponent.d.ts +0 -11
  411. package/dist/components/tttx-toolbar_localcomponent.d.ts +0 -11
  412. package/dist/components/tttx-tooltip_localcomponent.d.ts +0 -11
  413. package/dist/components/tttx-tree-view_localcomponent.d.ts +0 -11
  414. package/dist/esm/tttx-data-pattern_localcomponent.entry.js +0 -26
  415. package/dist/esm/tttx-loading-spinner_localcomponent_3.entry.js +0 -183
  416. package/dist/tttx/p-00a849cf.entry.js +0 -1
  417. package/dist/tttx/p-41f0bf7f.entry.js +0 -1
  418. package/dist/tttx/p-82b4e575.entry.js +0 -1
  419. package/dist/tttx/p-86e4c8cc.entry.js +0 -1
  420. package/dist/tttx/p-b161205b.entry.js +0 -1
  421. package/dist/tttx/p-b3f49d83.entry.js +0 -1
  422. package/dist/tttx/p-d4c4edbd.entry.js +0 -1
  423. package/dist/tttx/p-e21e3a9c.entry.js +0 -1
  424. package/dist/types/components/atoms/tttx-checkbox/tttx-checkbox.stories.d.ts +0 -47
  425. package/dist/types/components/atoms/tttx-skeleton-loader/tttx-skeleton-loader.stories.d.ts +0 -58
  426. package/dist/types/components/molecules/tttx-action-dropdown/tttx-action-dropdown.stories.d.ts +0 -36
  427. package/dist/types/components/molecules/tttx-comments/tttx-comments.stories.d.ts +0 -8
  428. package/dist/types/components/molecules/tttx-date-range-picker/tttx-date-range-picker.stories.d.ts +0 -28
  429. package/dist/types/components/molecules/tttx-dialog/tttx-dialog.stories.d.ts +0 -42
  430. package/dist/types/components/molecules/tttx-expander/tttx-expander.stories.d.ts +0 -27
  431. package/dist/types/components/molecules/tttx-filter/tttx-filter.stories.d.ts +0 -76
  432. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +0 -718
  433. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +0 -15
  434. package/dist/types/components/molecules/tttx-multiselect-box/tttx-multiselect-box.stories.d.ts +0 -17
  435. package/dist/types/components/molecules/tttx-sorter/tttx-sorter.stories.d.ts +0 -30
  436. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +0 -150
  437. package/dist/types/components/molecules/tttx-table/tttx-table.stories.d.ts +0 -79
  438. package/dist/types/components/molecules/tttx-tabs/tttx-tabs.stories.d.ts +0 -13
  439. package/dist/types/components/molecules/tttx-tree-view/tttx-tree-view.stories.d.ts +0 -15
  440. /package/dist/tttx/{p-55799798.js → p-62d92a44.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-b614efb4.js';
2
- import { a as adapters, C as Chart } from './auto-421f2656.js';
2
+ import { a as adapters, C as Chart } from './auto-a07ee1b1.js';
3
3
 
4
4
  /**
5
5
  * @module constants
@@ -7164,528 +7164,528 @@ adapters._date.override({
7164
7164
 
7165
7165
  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}";
7166
7166
 
7167
- const TttxChart = class {
7168
- constructor(hostRef) {
7169
- registerInstance(this, hostRef);
7170
- this.exportCSV = createEvent(this, "exportCSV", 7);
7171
- this.chartType = undefined;
7172
- this.chartData = undefined;
7173
- this.chartOptions = undefined;
7174
- this.loading = false;
7175
- this.error = undefined;
7176
- this.fallbackText = 'No data available';
7177
- this.width = '100%';
7178
- this.height = 'auto';
7179
- this.isYAxisPercentageValues = false;
7180
- this.showActiveSegmentLabel = false;
7181
- this.initialActiveIndex = 0;
7182
- this.activeSegmentChangeCallback = undefined;
7183
- this.exportable = false;
7184
- this.chartInstance = undefined;
7185
- this.showPngSvgExport = false;
7186
- this.selectedSegmentIndex = null;
7187
- this.hoverSegmentIndex = null;
7188
- }
7189
- handleUpdate(newData) {
7190
- if (!newData || !newData.datasets || newData.datasets.length === 0) {
7191
- this.destroyChart();
7192
- return;
7193
- }
7194
- if (this.chartType === 'line') {
7195
- setTimeout(() => {
7196
- this.renderChart();
7197
- }, 0);
7198
- return;
7199
- }
7200
- if (this.chartType === 'doughnut-v2') {
7201
- if (this.hasChartDataChanged()) {
7202
- this.renderChart();
7203
- this.previousChartData = this.deepClone(this.chartData);
7204
- }
7205
- return;
7206
- }
7207
- this.renderChart();
7208
- }
7209
- componentDidLoad() {
7210
- if (this.chartType === 'doughnut-v2') {
7211
- this.previousChartData = this.deepClone(this.chartData);
7212
- }
7213
- this.renderChart();
7214
- this.notifyActiveSegment();
7215
- }
7216
- hasChartDataChanged() {
7217
- if (!this.previousChartData)
7218
- return true;
7219
- try {
7220
- return JSON.stringify(this.previousChartData) !== JSON.stringify(this.chartData);
7221
- }
7222
- catch (_a) {
7223
- return true;
7224
- }
7225
- }
7226
- deepClone(obj) {
7227
- try {
7228
- return JSON.parse(JSON.stringify(obj));
7229
- }
7230
- catch (_a) {
7231
- return obj;
7232
- }
7233
- }
7234
- disconnectedCallback() {
7235
- this.destroyChart();
7236
- }
7237
- renderChart() {
7238
- var _a, _b, _c;
7239
- if (!this.canvasEl || !this.chartData || !this.chartType)
7240
- return;
7241
- this.destroyChart();
7242
- 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)))) || [] });
7243
- const config = {
7244
- type: this.getChartJsType(),
7245
- data: chartData,
7246
- options: this.getChartOptions(),
7247
- plugins: []
7248
- };
7249
- if (this.chartType === 'doughnut' || this.chartType === 'semi-gauge' || this.chartType === 'doughnut-v2') {
7250
- 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;
7251
- config.plugins.push(this.getCenterTextPlugin(total.toLocaleString()));
7252
- }
7253
- if (this.chartType === 'doughnut-v2') {
7254
- config.plugins.push(this.getLegendHoverPlugin());
7255
- }
7256
- // create chart
7257
- this.chartInstance = new Chart(this.canvasEl, config);
7258
- // Initialize colors for doughnut-v2
7259
- if (this.chartType === 'doughnut-v2') {
7260
- this.chartInstance.setDatasetVisibility(0, true);
7261
- this.updateChartColors();
7262
- }
7263
- }
7264
- destroyChart() {
7265
- if (this.chartInstance) {
7266
- this.chartInstance.destroy();
7267
- this.chartInstance = undefined;
7268
- }
7269
- }
7270
- getChartJsType() {
7271
- if (this.chartType === 'semi-gauge' || this.chartType === 'doughnut-v2')
7272
- return 'doughnut';
7273
- return this.chartType;
7274
- }
7275
- getBaseOptions() {
7276
- return {
7277
- responsive: true,
7278
- maintainAspectRatio: false,
7279
- plugins: {
7280
- legend: {
7281
- display: true,
7282
- position: 'bottom',
7283
- labels: {
7284
- usePointStyle: true,
7285
- pointStyle: 'circle',
7286
- font: {
7287
- size: 14
7288
- }
7289
- },
7290
- },
7291
- tooltip: {
7292
- callbacks: {
7293
- label: (ctx) => {
7294
- const label = ctx.label || ctx.dataset.label || '';
7295
- // Convert value to number and fix to 2 decimal places
7296
- const value = Number(ctx.raw);
7297
- const formattedValue = isNaN(value) ? ctx.formattedValue : value.toFixed(2);
7298
- return `${label}: ${formattedValue}`;
7299
- },
7300
- },
7301
- backgroundColor: '#17272B'
7302
- },
7303
- },
7304
- };
7305
- }
7306
- getLineChartConfig() {
7307
- const startOfCurrentMonth = new Date();
7308
- startOfCurrentMonth.setDate(1);
7309
- startOfCurrentMonth.setHours(0, 0, 0, 0);
7310
- return {
7311
- responsive: true,
7312
- maintainAspectRatio: false,
7313
- animation: { duration: 0 },
7314
- elements: {
7315
- point: { radius: 0, hoverRadius: 4 },
7316
- },
7317
- plugins: {
7318
- legend: {
7319
- labels: {
7320
- padding: 20,
7321
- generateLabels: (chart) => {
7322
- return chart.data.datasets.map((dataset, i) => ({
7323
- text: dataset.label || '',
7324
- strokeStyle: dataset.borderColor,
7325
- fillStyle: dataset.backgroundColor || 'transparent',
7326
- lineDash: dataset.borderDash || [],
7327
- lineWidth: dataset.borderWidth || 2,
7328
- hidden: !chart.isDatasetVisible(i),
7329
- datasetIndex: i,
7330
- pointStyle: 'line',
7331
- }));
7332
- },
7333
- },
7334
- },
7335
- tooltip: {
7336
- mode: 'index',
7337
- intersect: false,
7338
- backgroundColor: '#17272B',
7339
- titleFont: { size: 14, weight: 'bold' },
7340
- bodyFont: { size: 12 },
7341
- callbacks: {
7342
- title: (context) => {
7343
- var _a, _b;
7344
- if (!context || !context.length)
7345
- return '';
7346
- 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);
7347
- return date.toLocaleDateString(undefined, {
7348
- day: '2-digit',
7349
- month: 'short',
7350
- year: 'numeric',
7351
- });
7352
- },
7353
- label: (ctx) => {
7354
- const rawValue = ctx.parsed && ctx.parsed.y !== undefined ? ctx.parsed.y : ctx.raw;
7355
- // Format to max 2 decimal places
7356
- const value = Number(rawValue);
7357
- const formattedValue = isNaN(value) ? rawValue : value.toFixed(2);
7358
- return `${ctx.dataset.label}: ${formattedValue}${this.isYAxisPercentageValues ? '%' : ''}`;
7359
- },
7360
- labelColor: (ctx) => {
7361
- if (ctx.dataset.label !== 'Overall') {
7362
- return {
7363
- borderWidth: 2
7364
- };
7365
- }
7366
- return {
7367
- borderWidth: 2,
7368
- borderColor: ctx.dataset.borderColor,
7369
- backgroundColor: ctx.dataset.borderColor,
7370
- };
7371
- }
7372
- },
7373
- },
7374
- },
7375
- interaction: {
7376
- mode: 'index',
7377
- intersect: false,
7378
- },
7379
- scales: {
7380
- x: {
7381
- type: 'time',
7382
- time: {
7383
- unit: 'month',
7384
- displayFormats: {
7385
- month: 'MMM yyyy',
7386
- },
7387
- tooltipFormat: 'dd MMM yyyy',
7388
- },
7389
- grid: { color: '#E5E5E5' },
7390
- border: { dash: [4, 4] },
7391
- ticks: {
7392
- autoSkip: true,
7393
- maxRotation: 0,
7394
- },
7395
- },
7396
- y: {
7397
- min: 0,
7398
- max: 100,
7399
- beginAtZero: true,
7400
- ticks: {
7401
- stepSize: 20,
7402
- callback: (value) => {
7403
- const numValue = Number(value);
7404
- const formatted = isNaN(numValue) ? value : (Number.isInteger(numValue) ? numValue : numValue.toFixed(2));
7405
- return this.isYAxisPercentageValues ? `${formatted}%` : formatted;
7406
- },
7407
- },
7408
- grid: { color: '#E5E5E5' },
7409
- border: { dash: [4, 4] },
7410
- },
7411
- },
7412
- };
7413
- }
7414
- getDoughnutChartConfig() {
7415
- return {
7416
- plugins: {
7417
- legend: { labels: { pointStyle: 'circle', padding: 16, } },
7418
- },
7419
- cutout: '60%'
7420
- };
7421
- }
7422
- getDoughnutV2ChartConfig() {
7423
- return {
7424
- plugins: {
7425
- legend: {
7426
- labels: {
7427
- pointStyle: 'circle',
7428
- padding: 16
7429
- },
7430
- onClick: (e, legendItem) => {
7431
- e.stopPropagation();
7432
- const index = legendItem.index;
7433
- if (this.selectedSegmentIndex !== index) {
7434
- this.selectedSegmentIndex = index;
7435
- this.updateChartColors();
7436
- this.notifyActiveSegment();
7437
- }
7438
- }
7439
- },
7440
- tooltip: {
7441
- enabled: false
7442
- }
7443
- },
7444
- cutout: '60%',
7445
- onHover: (_event, activeElements) => {
7446
- if (activeElements && activeElements.length > 0) {
7447
- this.hoverSegmentIndex = activeElements[0].index;
7448
- this.updateChartColors();
7449
- }
7450
- else {
7451
- this.hoverSegmentIndex = null;
7452
- this.updateChartColors();
7453
- }
7454
- },
7455
- onClick: (_event, activeElements) => {
7456
- if (activeElements && activeElements.length > 0) {
7457
- const clickedIndex = activeElements[0].index;
7458
- if (this.selectedSegmentIndex !== clickedIndex) {
7459
- this.selectedSegmentIndex = clickedIndex;
7460
- this.updateChartColors();
7461
- this.notifyActiveSegment();
7462
- }
7463
- }
7464
- },
7465
- };
7466
- }
7467
- updateChartColors() {
7468
- var _a, _b, _c, _d;
7469
- if (!this.chartInstance || this.chartType !== 'doughnut-v2')
7470
- return;
7471
- const dataset = this.chartInstance.data.datasets[0];
7472
- const chartDataDataset = (_b = (_a = this.chartData) === null || _a === void 0 ? void 0 : _a.datasets) === null || _b === void 0 ? void 0 : _b[0];
7473
- if (this.chartType === 'doughnut-v2' && this.chartInstance.isDatasetVisible(0) === false) {
7474
- this.chartInstance.setDatasetVisibility(0, true);
7475
- }
7476
- // Default color for doughnut-v2
7477
- const defaultSelectedColor = '#45C9B0';
7478
- const defaultHoverColor = '#A3A3A3';
7479
- const defaultInactiveColor = '#E5E5E5';
7480
- const selectedColors = chartDataDataset === null || chartDataDataset === void 0 ? void 0 : chartDataDataset.selectedColors;
7481
- const hoverColors = chartDataDataset === null || chartDataDataset === void 0 ? void 0 : chartDataDataset.hoverColors;
7482
- const inactiveColors = chartDataDataset === null || chartDataDataset === void 0 ? void 0 : chartDataDataset.inactiveColors;
7483
- let newColors = [];
7484
- if (this.selectedSegmentIndex !== null) {
7485
- newColors = dataset.data.map((_, index) => {
7486
- if (index === this.hoverSegmentIndex) {
7487
- return (hoverColors === null || hoverColors === void 0 ? void 0 : hoverColors[index]) || defaultHoverColor;
7488
- }
7489
- else if (index === this.selectedSegmentIndex) {
7490
- return (selectedColors === null || selectedColors === void 0 ? void 0 : selectedColors[index]) || defaultSelectedColor;
7491
- }
7492
- else {
7493
- return (inactiveColors === null || inactiveColors === void 0 ? void 0 : inactiveColors[index]) || defaultInactiveColor;
7494
- }
7495
- });
7496
- }
7497
- else if (this.hoverSegmentIndex !== null) {
7498
- const activeIndex = (_c = this.initialActiveIndex) !== null && _c !== void 0 ? _c : 0;
7499
- newColors = dataset.data.map((_, index) => {
7500
- if (index === this.hoverSegmentIndex) {
7501
- return (hoverColors === null || hoverColors === void 0 ? void 0 : hoverColors[index]) || defaultHoverColor;
7502
- }
7503
- else if (index === activeIndex) {
7504
- return (selectedColors === null || selectedColors === void 0 ? void 0 : selectedColors[index]) || defaultSelectedColor;
7505
- }
7506
- else {
7507
- return (inactiveColors === null || inactiveColors === void 0 ? void 0 : inactiveColors[index]) || defaultInactiveColor;
7508
- }
7509
- });
7510
- }
7511
- else {
7512
- // No hover or selection: show initial active state
7513
- const activeIndex = (_d = this.initialActiveIndex) !== null && _d !== void 0 ? _d : 0;
7514
- newColors = dataset.data.map((_, index) => {
7515
- if (index === activeIndex) {
7516
- return (selectedColors === null || selectedColors === void 0 ? void 0 : selectedColors[index]) || defaultSelectedColor;
7517
- }
7518
- return (inactiveColors === null || inactiveColors === void 0 ? void 0 : inactiveColors[index]) || defaultInactiveColor;
7519
- });
7520
- }
7521
- dataset.backgroundColor = newColors;
7522
- this.chartInstance.update('active');
7523
- }
7524
- lightenColor(color, percent) {
7525
- if (!color || !color.startsWith('#'))
7526
- return color;
7527
- const num = parseInt(color.replace('#', ''), 16);
7528
- const r = Math.min(255, ((num >> 16) & 0xFF) + percent);
7529
- const g = Math.min(255, ((num >> 8) & 0xFF) + percent);
7530
- const b = Math.min(255, (num & 0xFF) + percent);
7531
- return `#${((r << 16) | (g << 8) | b).toString(16).padStart(6, '0')}`;
7532
- }
7533
- getCenterTextPlugin(value) {
7534
- return {
7535
- id: 'centerText',
7536
- afterDatasetsDraw: (chart) => {
7537
- var _a, _b;
7538
- const { ctx } = chart;
7539
- ctx.save();
7540
- const x = chart.getDatasetMeta(0).data[0].x;
7541
- let y = chart.getDatasetMeta(0).data[0].y;
7542
- if (this.chartType === 'semi-gauge') {
7543
- y -= 20;
7544
- }
7545
- let displayValue = value;
7546
- if (this.chartType === 'doughnut-v2') {
7547
- const activeIndex = this.selectedSegmentIndex !== null
7548
- ? this.selectedSegmentIndex
7549
- : ((_a = this.initialActiveIndex) !== null && _a !== void 0 ? _a : 0);
7550
- const segmentValue = (_b = this.chartData.datasets[0]) === null || _b === void 0 ? void 0 : _b.data[activeIndex];
7551
- displayValue = Number(segmentValue || 0).toLocaleString();
7552
- }
7553
- ctx.font = 'bold 20px Roboto';
7554
- ctx.fillStyle = '#111';
7555
- ctx.textAlign = 'center';
7556
- ctx.textBaseline = 'middle';
7557
- ctx.fillText(displayValue, x, y);
7558
- },
7559
- };
7560
- }
7561
- getLegendHoverPlugin() {
7562
- return {
7563
- id: 'legendHover',
7564
- afterDraw: (chart) => {
7565
- if (this.hoverSegmentIndex === null)
7566
- return;
7567
- const legend = chart.legend;
7568
- if (!legend || !legend.legendItems)
7569
- return;
7570
- const ctx = chart.ctx;
7571
- const legendItem = legend.legendItems[this.hoverSegmentIndex];
7572
- if (!legendItem)
7573
- return;
7574
- const boxes = legend.legendHitBoxes;
7575
- if (!boxes || !boxes[this.hoverSegmentIndex])
7576
- return;
7577
- const box = boxes[this.hoverSegmentIndex];
7578
- const padding = 8;
7579
- const borderRadius = 4;
7580
- ctx.save();
7581
- ctx.fillStyle = '#f5f5f5';
7582
- ctx.beginPath();
7583
- ctx.roundRect(box.left - padding, box.top - padding, box.width + padding * 2, box.height + padding * 2, borderRadius);
7584
- ctx.fill();
7585
- const pointRadius = 8;
7586
- const pointX = box.left + pointRadius;
7587
- const pointY = box.top + box.height / 2;
7588
- ctx.fillStyle = '#D1D5DB';
7589
- ctx.beginPath();
7590
- ctx.arc(pointX, pointY, pointRadius, 0, 2 * Math.PI);
7591
- ctx.fill();
7592
- ctx.fillStyle = '#9CA3AF';
7593
- ctx.font = '14px Roboto, sans-serif';
7594
- ctx.textBaseline = 'middle';
7595
- ctx.textAlign = 'left';
7596
- ctx.fillText(legendItem.text, box.left + pointRadius * 2 + 4, pointY);
7597
- ctx.restore();
7598
- },
7599
- };
7600
- }
7601
- getSemiGaugeChartConfig() {
7602
- return {
7603
- plugins: {
7604
- legend: { labels: { pointStyle: 'circle', padding: 16, } },
7605
- },
7606
- rotation: -90,
7607
- circumference: 180,
7608
- cutout: '70%',
7609
- };
7610
- }
7611
- merge(target, source) {
7612
- if (typeof target !== 'object' || typeof source !== 'object')
7613
- return source;
7614
- for (const key of Object.keys(source)) {
7615
- if (source[key] instanceof Object && key in target) {
7616
- target[key] = this.merge(Object.assign({}, target[key]), source[key]);
7617
- }
7618
- else {
7619
- target[key] = source[key];
7620
- }
7621
- }
7622
- return target;
7623
- }
7624
- getChartOptions() {
7625
- const base = this.getBaseOptions();
7626
- let specific = {};
7627
- if (this.chartType === 'line')
7628
- specific = this.getLineChartConfig();
7629
- else if (this.chartType === 'doughnut')
7630
- specific = this.getDoughnutChartConfig();
7631
- else if (this.chartType === 'semi-gauge')
7632
- specific = this.getSemiGaugeChartConfig();
7633
- else if (this.chartType === 'doughnut-v2')
7634
- specific = this.getDoughnutV2ChartConfig();
7635
- return this.merge(this.merge(base, specific), this.chartOptions || {});
7636
- }
7637
- exportChart(format) {
7638
- if (!this.chartInstance)
7639
- return;
7640
- const link = document.createElement('a');
7641
- link.download = `chart-export.${format}`;
7642
- if (format === 'png') {
7643
- link.href = this.chartInstance.toBase64Image('image/png');
7644
- }
7645
- else {
7646
- const svgData = new XMLSerializer().serializeToString(this.canvasEl);
7647
- const blob = new Blob([svgData], { type: 'image/svg+xml' });
7648
- link.href = URL.createObjectURL(blob);
7649
- }
7650
- link.click();
7651
- }
7652
- getErrorContent() {
7653
- return this.commonContent('warning', 'Something went wrong', 'We ran into an issue while trying to load this widget.', '#DC0000', true);
7654
- }
7655
- getNoDataContent() {
7656
- return this.commonContent('ssid_chart', 'No data available', 'There is currently no data available to show performance trends.', '#111');
7657
- }
7658
- commonContent(iconName, heading, message, iconColor, showActions = false) {
7659
- return (h("div", { class: "error-content" }, h("tttx-icon_localcomponent", { 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_localcomponent", { class: 'support-btn', icon: "help", design: "primary", onClick: () => this.renderChart() }, "Contact support"))));
7660
- }
7661
- notifyActiveSegment() {
7662
- var _a, _b;
7663
- if (this.chartType !== 'doughnut-v2' || !this.chartData)
7664
- return;
7665
- const activeIndex = this.selectedSegmentIndex !== null
7666
- ? this.selectedSegmentIndex
7667
- : ((_a = this.initialActiveIndex) !== null && _a !== void 0 ? _a : 0);
7668
- const label = ((_b = this.chartData.labels) === null || _b === void 0 ? void 0 : _b[activeIndex]) || '';
7669
- if (this.activeSegmentChangeCallback) {
7670
- this.activeSegmentChangeCallback(label);
7671
- }
7672
- }
7673
- render() {
7674
- var _a, _b, _c;
7675
- return (h("div", { class: "chart-wrapper", style: { width: this.width, height: this.height } }, this.loading && h("div", { class: "chart-loading" }, h("tttx-loading-spinner_localcomponent", { 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: {
7676
- width: '100%',
7677
- height: '100%',
7678
- cursor: this.chartType === 'doughnut-v2' ? 'pointer' : 'default'
7679
- } }))), this.exportable && !this.loading && !this.error && (h("div", { class: "export-buttons" }, this.showPngSvgExport && h("tttx-button_localcomponent", { class: 'export-png', design: "primary", onClick: () => this.exportChart('png') }, "Export PNG"), this.showPngSvgExport && h("tttx-button_localcomponent", { class: 'export-svg', design: "primary", onClick: () => this.exportChart('svg') }, "Export SVG"), h("tttx-button_localcomponent", { class: 'export-csv', design: "primary", onClick: () => this.exportCSV.emit({ name: this.chartType }) }, "Export CSV")))));
7680
- }
7681
- get el() { return getElement(this); }
7682
- static get watchers() { return {
7683
- "chartData": ["handleUpdate", "notifyActiveSegment"],
7684
- "chartOptions": ["handleUpdate"],
7685
- "selectedSegmentIndex": ["notifyActiveSegment"],
7686
- "initialActiveIndex": ["notifyActiveSegment"]
7687
- }; }
7688
- };
7167
+ const TttxChart = class {
7168
+ constructor(hostRef) {
7169
+ registerInstance(this, hostRef);
7170
+ this.exportCSV = createEvent(this, "exportCSV", 7);
7171
+ this.chartType = undefined;
7172
+ this.chartData = undefined;
7173
+ this.chartOptions = undefined;
7174
+ this.loading = false;
7175
+ this.error = undefined;
7176
+ this.fallbackText = 'No data available';
7177
+ this.width = '100%';
7178
+ this.height = 'auto';
7179
+ this.isYAxisPercentageValues = false;
7180
+ this.showActiveSegmentLabel = false;
7181
+ this.initialActiveIndex = 0;
7182
+ this.activeSegmentChangeCallback = undefined;
7183
+ this.exportable = false;
7184
+ this.chartInstance = undefined;
7185
+ this.showPngSvgExport = false;
7186
+ this.selectedSegmentIndex = null;
7187
+ this.hoverSegmentIndex = null;
7188
+ }
7189
+ handleUpdate(newData) {
7190
+ if (!newData || !newData.datasets || newData.datasets.length === 0) {
7191
+ this.destroyChart();
7192
+ return;
7193
+ }
7194
+ if (this.chartType === 'line') {
7195
+ setTimeout(() => {
7196
+ this.renderChart();
7197
+ }, 0);
7198
+ return;
7199
+ }
7200
+ if (this.chartType === 'doughnut-v2') {
7201
+ if (this.hasChartDataChanged()) {
7202
+ this.renderChart();
7203
+ this.previousChartData = this.deepClone(this.chartData);
7204
+ }
7205
+ return;
7206
+ }
7207
+ this.renderChart();
7208
+ }
7209
+ componentDidLoad() {
7210
+ if (this.chartType === 'doughnut-v2') {
7211
+ this.previousChartData = this.deepClone(this.chartData);
7212
+ }
7213
+ this.renderChart();
7214
+ this.notifyActiveSegment();
7215
+ }
7216
+ hasChartDataChanged() {
7217
+ if (!this.previousChartData)
7218
+ return true;
7219
+ try {
7220
+ return JSON.stringify(this.previousChartData) !== JSON.stringify(this.chartData);
7221
+ }
7222
+ catch (_a) {
7223
+ return true;
7224
+ }
7225
+ }
7226
+ deepClone(obj) {
7227
+ try {
7228
+ return JSON.parse(JSON.stringify(obj));
7229
+ }
7230
+ catch (_a) {
7231
+ return obj;
7232
+ }
7233
+ }
7234
+ disconnectedCallback() {
7235
+ this.destroyChart();
7236
+ }
7237
+ renderChart() {
7238
+ var _a, _b, _c;
7239
+ if (!this.canvasEl || !this.chartData || !this.chartType)
7240
+ return;
7241
+ this.destroyChart();
7242
+ 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)))) || [] });
7243
+ const config = {
7244
+ type: this.getChartJsType(),
7245
+ data: chartData,
7246
+ options: this.getChartOptions(),
7247
+ plugins: []
7248
+ };
7249
+ if (this.chartType === 'doughnut' || this.chartType === 'semi-gauge' || this.chartType === 'doughnut-v2') {
7250
+ 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;
7251
+ config.plugins.push(this.getCenterTextPlugin(total.toLocaleString()));
7252
+ }
7253
+ if (this.chartType === 'doughnut-v2') {
7254
+ config.plugins.push(this.getLegendHoverPlugin());
7255
+ }
7256
+ // create chart
7257
+ this.chartInstance = new Chart(this.canvasEl, config);
7258
+ // Initialize colors for doughnut-v2
7259
+ if (this.chartType === 'doughnut-v2') {
7260
+ this.chartInstance.setDatasetVisibility(0, true);
7261
+ this.updateChartColors();
7262
+ }
7263
+ }
7264
+ destroyChart() {
7265
+ if (this.chartInstance) {
7266
+ this.chartInstance.destroy();
7267
+ this.chartInstance = undefined;
7268
+ }
7269
+ }
7270
+ getChartJsType() {
7271
+ if (this.chartType === 'semi-gauge' || this.chartType === 'doughnut-v2')
7272
+ return 'doughnut';
7273
+ return this.chartType;
7274
+ }
7275
+ getBaseOptions() {
7276
+ return {
7277
+ responsive: true,
7278
+ maintainAspectRatio: false,
7279
+ plugins: {
7280
+ legend: {
7281
+ display: true,
7282
+ position: 'bottom',
7283
+ labels: {
7284
+ usePointStyle: true,
7285
+ pointStyle: 'circle',
7286
+ font: {
7287
+ size: 14
7288
+ }
7289
+ },
7290
+ },
7291
+ tooltip: {
7292
+ callbacks: {
7293
+ label: (ctx) => {
7294
+ const label = ctx.label || ctx.dataset.label || '';
7295
+ // Convert value to number and fix to 2 decimal places
7296
+ const value = Number(ctx.raw);
7297
+ const formattedValue = isNaN(value) ? ctx.formattedValue : value.toFixed(2);
7298
+ return `${label}: ${formattedValue}`;
7299
+ },
7300
+ },
7301
+ backgroundColor: '#17272B'
7302
+ },
7303
+ },
7304
+ };
7305
+ }
7306
+ getLineChartConfig() {
7307
+ const startOfCurrentMonth = new Date();
7308
+ startOfCurrentMonth.setDate(1);
7309
+ startOfCurrentMonth.setHours(0, 0, 0, 0);
7310
+ return {
7311
+ responsive: true,
7312
+ maintainAspectRatio: false,
7313
+ animation: { duration: 0 },
7314
+ elements: {
7315
+ point: { radius: 0, hoverRadius: 4 },
7316
+ },
7317
+ plugins: {
7318
+ legend: {
7319
+ labels: {
7320
+ padding: 20,
7321
+ generateLabels: (chart) => {
7322
+ return chart.data.datasets.map((dataset, i) => ({
7323
+ text: dataset.label || '',
7324
+ strokeStyle: dataset.borderColor,
7325
+ fillStyle: dataset.backgroundColor || 'transparent',
7326
+ lineDash: dataset.borderDash || [],
7327
+ lineWidth: dataset.borderWidth || 2,
7328
+ hidden: !chart.isDatasetVisible(i),
7329
+ datasetIndex: i,
7330
+ pointStyle: 'line',
7331
+ }));
7332
+ },
7333
+ },
7334
+ },
7335
+ tooltip: {
7336
+ mode: 'index',
7337
+ intersect: false,
7338
+ backgroundColor: '#17272B',
7339
+ titleFont: { size: 14, weight: 'bold' },
7340
+ bodyFont: { size: 12 },
7341
+ callbacks: {
7342
+ title: (context) => {
7343
+ var _a, _b;
7344
+ if (!context || !context.length)
7345
+ return '';
7346
+ 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);
7347
+ return date.toLocaleDateString(undefined, {
7348
+ day: '2-digit',
7349
+ month: 'short',
7350
+ year: 'numeric',
7351
+ });
7352
+ },
7353
+ label: (ctx) => {
7354
+ const rawValue = ctx.parsed && ctx.parsed.y !== undefined ? ctx.parsed.y : ctx.raw;
7355
+ // Format to max 2 decimal places
7356
+ const value = Number(rawValue);
7357
+ const formattedValue = isNaN(value) ? rawValue : value.toFixed(2);
7358
+ return `${ctx.dataset.label}: ${formattedValue}${this.isYAxisPercentageValues ? '%' : ''}`;
7359
+ },
7360
+ labelColor: (ctx) => {
7361
+ if (ctx.dataset.label !== 'Overall') {
7362
+ return {
7363
+ borderWidth: 2
7364
+ };
7365
+ }
7366
+ return {
7367
+ borderWidth: 2,
7368
+ borderColor: ctx.dataset.borderColor,
7369
+ backgroundColor: ctx.dataset.borderColor,
7370
+ };
7371
+ }
7372
+ },
7373
+ },
7374
+ },
7375
+ interaction: {
7376
+ mode: 'index',
7377
+ intersect: false,
7378
+ },
7379
+ scales: {
7380
+ x: {
7381
+ type: 'time',
7382
+ time: {
7383
+ unit: 'month',
7384
+ displayFormats: {
7385
+ month: 'MMM yyyy',
7386
+ },
7387
+ tooltipFormat: 'dd MMM yyyy',
7388
+ },
7389
+ grid: { color: '#E5E5E5' },
7390
+ border: { dash: [4, 4] },
7391
+ ticks: {
7392
+ autoSkip: true,
7393
+ maxRotation: 0,
7394
+ },
7395
+ },
7396
+ y: {
7397
+ min: 0,
7398
+ max: 100,
7399
+ beginAtZero: true,
7400
+ ticks: {
7401
+ stepSize: 20,
7402
+ callback: (value) => {
7403
+ const numValue = Number(value);
7404
+ const formatted = isNaN(numValue) ? value : (Number.isInteger(numValue) ? numValue : numValue.toFixed(2));
7405
+ return this.isYAxisPercentageValues ? `${formatted}%` : formatted;
7406
+ },
7407
+ },
7408
+ grid: { color: '#E5E5E5' },
7409
+ border: { dash: [4, 4] },
7410
+ },
7411
+ },
7412
+ };
7413
+ }
7414
+ getDoughnutChartConfig() {
7415
+ return {
7416
+ plugins: {
7417
+ legend: { labels: { pointStyle: 'circle', padding: 16, } },
7418
+ },
7419
+ cutout: '60%'
7420
+ };
7421
+ }
7422
+ getDoughnutV2ChartConfig() {
7423
+ return {
7424
+ plugins: {
7425
+ legend: {
7426
+ labels: {
7427
+ pointStyle: 'circle',
7428
+ padding: 16
7429
+ },
7430
+ onClick: (e, legendItem) => {
7431
+ e.stopPropagation();
7432
+ const index = legendItem.index;
7433
+ if (this.selectedSegmentIndex !== index) {
7434
+ this.selectedSegmentIndex = index;
7435
+ this.updateChartColors();
7436
+ this.notifyActiveSegment();
7437
+ }
7438
+ }
7439
+ },
7440
+ tooltip: {
7441
+ enabled: false
7442
+ }
7443
+ },
7444
+ cutout: '60%',
7445
+ onHover: (_event, activeElements) => {
7446
+ if (activeElements && activeElements.length > 0) {
7447
+ this.hoverSegmentIndex = activeElements[0].index;
7448
+ this.updateChartColors();
7449
+ }
7450
+ else {
7451
+ this.hoverSegmentIndex = null;
7452
+ this.updateChartColors();
7453
+ }
7454
+ },
7455
+ onClick: (_event, activeElements) => {
7456
+ if (activeElements && activeElements.length > 0) {
7457
+ const clickedIndex = activeElements[0].index;
7458
+ if (this.selectedSegmentIndex !== clickedIndex) {
7459
+ this.selectedSegmentIndex = clickedIndex;
7460
+ this.updateChartColors();
7461
+ this.notifyActiveSegment();
7462
+ }
7463
+ }
7464
+ },
7465
+ };
7466
+ }
7467
+ updateChartColors() {
7468
+ var _a, _b, _c, _d;
7469
+ if (!this.chartInstance || this.chartType !== 'doughnut-v2')
7470
+ return;
7471
+ const dataset = this.chartInstance.data.datasets[0];
7472
+ const chartDataDataset = (_b = (_a = this.chartData) === null || _a === void 0 ? void 0 : _a.datasets) === null || _b === void 0 ? void 0 : _b[0];
7473
+ if (this.chartType === 'doughnut-v2' && this.chartInstance.isDatasetVisible(0) === false) {
7474
+ this.chartInstance.setDatasetVisibility(0, true);
7475
+ }
7476
+ // Default color for doughnut-v2
7477
+ const defaultSelectedColor = '#45C9B0';
7478
+ const defaultHoverColor = '#A3A3A3';
7479
+ const defaultInactiveColor = '#E5E5E5';
7480
+ const selectedColors = chartDataDataset === null || chartDataDataset === void 0 ? void 0 : chartDataDataset.selectedColors;
7481
+ const hoverColors = chartDataDataset === null || chartDataDataset === void 0 ? void 0 : chartDataDataset.hoverColors;
7482
+ const inactiveColors = chartDataDataset === null || chartDataDataset === void 0 ? void 0 : chartDataDataset.inactiveColors;
7483
+ let newColors = [];
7484
+ if (this.selectedSegmentIndex !== null) {
7485
+ newColors = dataset.data.map((_, index) => {
7486
+ if (index === this.hoverSegmentIndex) {
7487
+ return (hoverColors === null || hoverColors === void 0 ? void 0 : hoverColors[index]) || defaultHoverColor;
7488
+ }
7489
+ else if (index === this.selectedSegmentIndex) {
7490
+ return (selectedColors === null || selectedColors === void 0 ? void 0 : selectedColors[index]) || defaultSelectedColor;
7491
+ }
7492
+ else {
7493
+ return (inactiveColors === null || inactiveColors === void 0 ? void 0 : inactiveColors[index]) || defaultInactiveColor;
7494
+ }
7495
+ });
7496
+ }
7497
+ else if (this.hoverSegmentIndex !== null) {
7498
+ const activeIndex = (_c = this.initialActiveIndex) !== null && _c !== void 0 ? _c : 0;
7499
+ newColors = dataset.data.map((_, index) => {
7500
+ if (index === this.hoverSegmentIndex) {
7501
+ return (hoverColors === null || hoverColors === void 0 ? void 0 : hoverColors[index]) || defaultHoverColor;
7502
+ }
7503
+ else if (index === activeIndex) {
7504
+ return (selectedColors === null || selectedColors === void 0 ? void 0 : selectedColors[index]) || defaultSelectedColor;
7505
+ }
7506
+ else {
7507
+ return (inactiveColors === null || inactiveColors === void 0 ? void 0 : inactiveColors[index]) || defaultInactiveColor;
7508
+ }
7509
+ });
7510
+ }
7511
+ else {
7512
+ // No hover or selection: show initial active state
7513
+ const activeIndex = (_d = this.initialActiveIndex) !== null && _d !== void 0 ? _d : 0;
7514
+ newColors = dataset.data.map((_, index) => {
7515
+ if (index === activeIndex) {
7516
+ return (selectedColors === null || selectedColors === void 0 ? void 0 : selectedColors[index]) || defaultSelectedColor;
7517
+ }
7518
+ return (inactiveColors === null || inactiveColors === void 0 ? void 0 : inactiveColors[index]) || defaultInactiveColor;
7519
+ });
7520
+ }
7521
+ dataset.backgroundColor = newColors;
7522
+ this.chartInstance.update('active');
7523
+ }
7524
+ lightenColor(color, percent) {
7525
+ if (!color || !color.startsWith('#'))
7526
+ return color;
7527
+ const num = parseInt(color.replace('#', ''), 16);
7528
+ const r = Math.min(255, ((num >> 16) & 0xFF) + percent);
7529
+ const g = Math.min(255, ((num >> 8) & 0xFF) + percent);
7530
+ const b = Math.min(255, (num & 0xFF) + percent);
7531
+ return `#${((r << 16) | (g << 8) | b).toString(16).padStart(6, '0')}`;
7532
+ }
7533
+ getCenterTextPlugin(value) {
7534
+ return {
7535
+ id: 'centerText',
7536
+ afterDatasetsDraw: (chart) => {
7537
+ var _a, _b;
7538
+ const { ctx } = chart;
7539
+ ctx.save();
7540
+ const x = chart.getDatasetMeta(0).data[0].x;
7541
+ let y = chart.getDatasetMeta(0).data[0].y;
7542
+ if (this.chartType === 'semi-gauge') {
7543
+ y -= 20;
7544
+ }
7545
+ let displayValue = value;
7546
+ if (this.chartType === 'doughnut-v2') {
7547
+ const activeIndex = this.selectedSegmentIndex !== null
7548
+ ? this.selectedSegmentIndex
7549
+ : ((_a = this.initialActiveIndex) !== null && _a !== void 0 ? _a : 0);
7550
+ const segmentValue = (_b = this.chartData.datasets[0]) === null || _b === void 0 ? void 0 : _b.data[activeIndex];
7551
+ displayValue = Number(segmentValue || 0).toLocaleString();
7552
+ }
7553
+ ctx.font = 'bold 20px Roboto';
7554
+ ctx.fillStyle = '#111';
7555
+ ctx.textAlign = 'center';
7556
+ ctx.textBaseline = 'middle';
7557
+ ctx.fillText(displayValue, x, y);
7558
+ },
7559
+ };
7560
+ }
7561
+ getLegendHoverPlugin() {
7562
+ return {
7563
+ id: 'legendHover',
7564
+ afterDraw: (chart) => {
7565
+ if (this.hoverSegmentIndex === null)
7566
+ return;
7567
+ const legend = chart.legend;
7568
+ if (!legend || !legend.legendItems)
7569
+ return;
7570
+ const ctx = chart.ctx;
7571
+ const legendItem = legend.legendItems[this.hoverSegmentIndex];
7572
+ if (!legendItem)
7573
+ return;
7574
+ const boxes = legend.legendHitBoxes;
7575
+ if (!boxes || !boxes[this.hoverSegmentIndex])
7576
+ return;
7577
+ const box = boxes[this.hoverSegmentIndex];
7578
+ const padding = 8;
7579
+ const borderRadius = 4;
7580
+ ctx.save();
7581
+ ctx.fillStyle = '#f5f5f5';
7582
+ ctx.beginPath();
7583
+ ctx.roundRect(box.left - padding, box.top - padding, box.width + padding * 2, box.height + padding * 2, borderRadius);
7584
+ ctx.fill();
7585
+ const pointRadius = 8;
7586
+ const pointX = box.left + pointRadius;
7587
+ const pointY = box.top + box.height / 2;
7588
+ ctx.fillStyle = '#D1D5DB';
7589
+ ctx.beginPath();
7590
+ ctx.arc(pointX, pointY, pointRadius, 0, 2 * Math.PI);
7591
+ ctx.fill();
7592
+ ctx.fillStyle = '#9CA3AF';
7593
+ ctx.font = '14px Roboto, sans-serif';
7594
+ ctx.textBaseline = 'middle';
7595
+ ctx.textAlign = 'left';
7596
+ ctx.fillText(legendItem.text, box.left + pointRadius * 2 + 4, pointY);
7597
+ ctx.restore();
7598
+ },
7599
+ };
7600
+ }
7601
+ getSemiGaugeChartConfig() {
7602
+ return {
7603
+ plugins: {
7604
+ legend: { labels: { pointStyle: 'circle', padding: 16, } },
7605
+ },
7606
+ rotation: -90,
7607
+ circumference: 180,
7608
+ cutout: '70%',
7609
+ };
7610
+ }
7611
+ merge(target, source) {
7612
+ if (typeof target !== 'object' || typeof source !== 'object')
7613
+ return source;
7614
+ for (const key of Object.keys(source)) {
7615
+ if (source[key] instanceof Object && key in target) {
7616
+ target[key] = this.merge(Object.assign({}, target[key]), source[key]);
7617
+ }
7618
+ else {
7619
+ target[key] = source[key];
7620
+ }
7621
+ }
7622
+ return target;
7623
+ }
7624
+ getChartOptions() {
7625
+ const base = this.getBaseOptions();
7626
+ let specific = {};
7627
+ if (this.chartType === 'line')
7628
+ specific = this.getLineChartConfig();
7629
+ else if (this.chartType === 'doughnut')
7630
+ specific = this.getDoughnutChartConfig();
7631
+ else if (this.chartType === 'semi-gauge')
7632
+ specific = this.getSemiGaugeChartConfig();
7633
+ else if (this.chartType === 'doughnut-v2')
7634
+ specific = this.getDoughnutV2ChartConfig();
7635
+ return this.merge(this.merge(base, specific), this.chartOptions || {});
7636
+ }
7637
+ exportChart(format) {
7638
+ if (!this.chartInstance)
7639
+ return;
7640
+ const link = document.createElement('a');
7641
+ link.download = `chart-export.${format}`;
7642
+ if (format === 'png') {
7643
+ link.href = this.chartInstance.toBase64Image('image/png');
7644
+ }
7645
+ else {
7646
+ const svgData = new XMLSerializer().serializeToString(this.canvasEl);
7647
+ const blob = new Blob([svgData], { type: 'image/svg+xml' });
7648
+ link.href = URL.createObjectURL(blob);
7649
+ }
7650
+ link.click();
7651
+ }
7652
+ getErrorContent() {
7653
+ return this.commonContent('warning', 'Something went wrong', 'We ran into an issue while trying to load this widget.', '#DC0000', true);
7654
+ }
7655
+ getNoDataContent() {
7656
+ return this.commonContent('ssid_chart', 'No data available', 'There is currently no data available to show performance trends.', '#111');
7657
+ }
7658
+ commonContent(iconName, heading, message, iconColor, showActions = false) {
7659
+ 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"))));
7660
+ }
7661
+ notifyActiveSegment() {
7662
+ var _a, _b;
7663
+ if (this.chartType !== 'doughnut-v2' || !this.chartData)
7664
+ return;
7665
+ const activeIndex = this.selectedSegmentIndex !== null
7666
+ ? this.selectedSegmentIndex
7667
+ : ((_a = this.initialActiveIndex) !== null && _a !== void 0 ? _a : 0);
7668
+ const label = ((_b = this.chartData.labels) === null || _b === void 0 ? void 0 : _b[activeIndex]) || '';
7669
+ if (this.activeSegmentChangeCallback) {
7670
+ this.activeSegmentChangeCallback(label);
7671
+ }
7672
+ }
7673
+ render() {
7674
+ var _a, _b, _c;
7675
+ 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: {
7676
+ width: '100%',
7677
+ height: '100%',
7678
+ cursor: this.chartType === 'doughnut-v2' ? 'pointer' : 'default'
7679
+ } }))), 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")))));
7680
+ }
7681
+ get el() { return getElement(this); }
7682
+ static get watchers() { return {
7683
+ "chartData": ["handleUpdate", "notifyActiveSegment"],
7684
+ "chartOptions": ["handleUpdate"],
7685
+ "selectedSegmentIndex": ["notifyActiveSegment"],
7686
+ "initialActiveIndex": ["notifyActiveSegment"]
7687
+ }; }
7688
+ };
7689
7689
  TttxChart.style = tttxChartCss;
7690
7690
 
7691
- export { TttxChart as tttx_chart_localcomponent };
7691
+ export { TttxChart as tttx_chart_1_9_103 };