@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.
- package/dist/cjs/{auto-be8ad100.js → auto-356ad09b.js} +177 -177
- package/dist/cjs/{domsanitiser.options-55ce2d65.js → domsanitiser.options-065dbed8.js} +12 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{tttx-action-dropdown_1_9_101.cjs.entry.js → tttx-action-dropdown_1_9_103.cjs.entry.js} +51 -51
- package/dist/cjs/{tttx-button-v2_1_9_101.cjs.entry.js → tttx-button-v2_1_9_103.cjs.entry.js} +147 -147
- package/dist/cjs/{tttx-button_1_9_101.cjs.entry.js → tttx-button_1_9_103.cjs.entry.js} +26 -26
- package/dist/cjs/{tttx-chart_1_9_101.cjs.entry.js → tttx-chart_1_9_103.cjs.entry.js} +524 -524
- 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
- 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
- package/dist/cjs/{tttx-checkbox-group_1_9_101.cjs.entry.js → tttx-checkbox-group_1_9_103.cjs.entry.js} +9 -9
- package/dist/cjs/{tttx-checkbox_1_9_101.cjs.entry.js → tttx-checkbox_1_9_103.cjs.entry.js} +33 -33
- package/dist/cjs/{tttx-comments_1_9_101.cjs.entry.js → tttx-comments_1_9_103.cjs.entry.js} +204 -204
- package/dist/cjs/{tttx-data-pattern_1_9_101.cjs.entry.js → tttx-data-pattern_1_9_103.cjs.entry.js} +20 -20
- package/dist/cjs/{tttx-datacard_1_9_101.cjs.entry.js → tttx-datacard_1_9_103.cjs.entry.js} +43 -43
- package/dist/cjs/tttx-date-range-picker.cjs.entry.js +212 -212
- package/dist/cjs/{tttx-dialog-box_1_9_101.cjs.entry.js → tttx-dialog-box_1_9_103.cjs.entry.js} +94 -94
- package/dist/cjs/{tttx-dialog_1_9_101.cjs.entry.js → tttx-dialog_1_9_103.cjs.entry.js} +69 -69
- package/dist/cjs/{tttx-expander_1_9_101.cjs.entry.js → tttx-expander_1_9_103.cjs.entry.js} +28 -28
- package/dist/cjs/{tttx-filter_1_9_101_4.cjs.entry.js → tttx-filter_1_9_103_4.cjs.entry.js} +386 -386
- package/dist/cjs/{tttx-form_1_9_101.cjs.entry.js → tttx-form_1_9_103.cjs.entry.js} +985 -985
- package/dist/cjs/{tttx-graph_1_9_101.cjs.entry.js → tttx-graph_1_9_103.cjs.entry.js} +124 -124
- package/dist/cjs/{tttx-icon_1_9_101.cjs.entry.js → tttx-icon_1_9_103.cjs.entry.js} +24 -24
- package/dist/cjs/{tttx-keyvalue-block_1_9_101.cjs.entry.js → tttx-keyvalue-block_1_9_103.cjs.entry.js} +62 -62
- 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
- package/dist/cjs/{tttx-multiselect-box_1_9_101.cjs.entry.js → tttx-multiselect-box_1_9_103.cjs.entry.js} +175 -175
- package/dist/cjs/{tttx-percentage-bar_1_9_101.cjs.entry.js → tttx-percentage-bar_1_9_103.cjs.entry.js} +56 -56
- package/dist/cjs/{tttx-qrcode_1_9_101.cjs.entry.js → tttx-qrcode_1_9_103.cjs.entry.js} +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
- package/dist/cjs/{tttx-select-box_1_9_101.cjs.entry.js → tttx-select-box_1_9_103.cjs.entry.js} +239 -239
- package/dist/cjs/{tttx-skeleton_loader_1_9_101.cjs.entry.js → tttx-skeleton_loader_1_9_103.cjs.entry.js} +30 -30
- package/dist/cjs/{tttx-table_1_9_101.cjs.entry.js → tttx-table_1_9_103.cjs.entry.js} +72 -72
- package/dist/cjs/{tttx-tabs_1_9_101.cjs.entry.js → tttx-tabs_1_9_103.cjs.entry.js} +103 -103
- package/dist/cjs/{tttx-tag-v2_1_9_101.cjs.entry.js → tttx-tag-v2_1_9_103.cjs.entry.js} +72 -72
- package/dist/cjs/{tttx-textarea_1_9_101.cjs.entry.js → tttx-textarea_1_9_103.cjs.entry.js} +50 -50
- package/dist/cjs/{tttx-toggle_1_9_101.cjs.entry.js → tttx-toggle_1_9_103.cjs.entry.js} +30 -30
- package/dist/cjs/{tttx-tooltip_1_9_101.cjs.entry.js → tttx-tooltip_1_9_103.cjs.entry.js} +87 -87
- package/dist/cjs/{tttx-tree-view_1_9_101.cjs.entry.js → tttx-tree-view_1_9_103.cjs.entry.js} +342 -342
- package/dist/cjs/tttx.cjs.js +1 -1
- package/dist/collection/components/atoms/tttx-button/tttx-button.js +129 -129
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +40 -40
- package/dist/collection/components/atoms/tttx-button-v2/tttx-button-v2.css +1 -1
- package/dist/collection/components/atoms/tttx-button-v2/tttx-button-v2.js +436 -436
- package/dist/collection/components/atoms/tttx-button-v2/tttx-button-v2.stories.js +143 -143
- package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.js +154 -154
- package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.stories.js +58 -58
- package/dist/collection/components/atoms/tttx-datacard/tttx-datacard.js +186 -186
- package/dist/collection/components/atoms/tttx-datacard/tttx-datacard.stories.js +92 -92
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +92 -92
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +26 -26
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +137 -137
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +94 -94
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +194 -194
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +53 -53
- package/dist/collection/components/atoms/tttx-percentage-bar/tttx-percentage-bar.js +168 -168
- package/dist/collection/components/atoms/tttx-percentage-bar/tttx-percentage-bar.stories.js +52 -52
- package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.js +81 -81
- package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.stories.js +22 -22
- package/dist/collection/components/atoms/tttx-skeleton-loader/tttx-skeleton-loader.js +225 -225
- package/dist/collection/components/atoms/tttx-skeleton-loader/tttx-skeleton-loader.stories.js +44 -44
- package/dist/collection/components/atoms/tttx-tag/tttx-tag.js +157 -157
- package/dist/collection/components/atoms/tttx-tag/tttx-tag.stories.js +53 -53
- package/dist/collection/components/atoms/tttx-tag-v2/tttx-tag-v2.js +281 -281
- package/dist/collection/components/atoms/tttx-tag-v2/tttx-tag-v2.stories.js +84 -84
- package/dist/collection/components/atoms/tttx-toggle/tttx-toggle.js +84 -84
- package/dist/collection/components/atoms/tttx-toggle/tttx-toggle.stories.js +8 -8
- package/dist/collection/components/domsanitiser.options.js +14 -14
- package/dist/collection/components/molecules/tttx-action-dropdown/tttx-action-dropdown.js +213 -213
- package/dist/collection/components/molecules/tttx-action-dropdown/tttx-action-dropdown.stories.js +55 -55
- package/dist/collection/components/molecules/tttx-chart/tttx-chart.js +793 -793
- package/dist/collection/components/molecules/tttx-chart/tttx-chart.stories.js +209 -209
- package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-caption.js +17 -17
- package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-heading.js +17 -17
- package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.js +18 -18
- package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.stories.js +62 -62
- package/dist/collection/components/molecules/tttx-comments/tttx-comments.js +536 -536
- package/dist/collection/components/molecules/tttx-comments/tttx-comments.stories.js +151 -151
- package/dist/collection/components/molecules/tttx-date-range-picker/tttx-date-range-picker.js +292 -292
- package/dist/collection/components/molecules/tttx-date-range-picker/tttx-date-range-picker.stories.js +48 -48
- package/dist/collection/components/molecules/tttx-dialog/icon-types.js +6 -6
- package/dist/collection/components/molecules/tttx-dialog/tttx-dialog.js +218 -218
- package/dist/collection/components/molecules/tttx-dialog/tttx-dialog.stories.js +50 -50
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.js +246 -246
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.js +314 -314
- package/dist/collection/components/molecules/tttx-expander/tttx-expander.js +134 -134
- package/dist/collection/components/molecules/tttx-expander/tttx-expander.stories.js +46 -46
- package/dist/collection/components/molecules/tttx-filter/tttx-filter.js +416 -416
- package/dist/collection/components/molecules/tttx-filter/tttx-filter.stories.js +81 -81
- package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +49 -49
- package/dist/collection/components/molecules/tttx-form/lib/timecomparatorChecks.js +64 -64
- package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +76 -76
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +1267 -1267
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +595 -595
- package/dist/collection/components/molecules/tttx-graph/gauge-label-plugin.js +14 -14
- package/dist/collection/components/molecules/tttx-graph/tttx-graph.js +184 -184
- package/dist/collection/components/molecules/tttx-graph/tttx-graph.stories.js +32 -32
- package/dist/collection/components/molecules/tttx-list/tttx-list.js +165 -165
- package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +134 -134
- package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.js +499 -499
- package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.stories.js +151 -151
- package/dist/collection/components/molecules/tttx-range-slider/tttx-range-slider.js +304 -304
- package/dist/collection/components/molecules/tttx-range-slider/tttx-range-slider.stories.js +22 -22
- package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.js +671 -671
- package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.stories.js +140 -140
- package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.js +253 -253
- package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.stories.js +43 -43
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +764 -764
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +191 -191
- package/dist/collection/components/molecules/tttx-table/tttx-table.css +1 -1
- package/dist/collection/components/molecules/tttx-table/tttx-table.js +318 -318
- package/dist/collection/components/molecules/tttx-table/tttx-table.stories.js +191 -191
- package/dist/collection/components/molecules/tttx-table/tttx-table.types.js +1 -1
- package/dist/collection/components/molecules/tttx-tabs/tttx-tabs.js +253 -253
- package/dist/collection/components/molecules/tttx-tabs/tttx-tabs.stories.js +82 -82
- package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.js +420 -420
- package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.stories.js +81 -81
- package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.js +73 -73
- package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.stories.js +97 -97
- package/dist/collection/components/molecules/tttx-tooltip/tttx-tooltip.js +253 -253
- package/dist/collection/components/molecules/tttx-tooltip/tttx-tootip.stories.js +117 -117
- package/dist/collection/components/molecules/tttx-tree-view/helper/helper.js +1 -1
- package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.css +1 -1
- package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.js +463 -463
- package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.stories.js +402 -402
- package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.js +176 -176
- package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.js +28 -28
- package/dist/collection/components/palette.stories.js +7 -7
- package/dist/collection/icons.js +2838 -2838
- package/dist/collection/index.js +1 -1
- package/dist/collection/shared/domsanitiser.options.js +14 -14
- package/dist/components/auto.js +177 -177
- package/dist/components/domsanitiser.options.js +12 -12
- package/dist/components/index.d.ts +38 -38
- package/dist/components/index.js +38 -38
- package/dist/components/tttx-action-dropdown_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-action-dropdown_1_9_101.js → tttx-action-dropdown_1_9_103.js} +81 -81
- package/dist/components/tttx-button-v2.js +182 -182
- package/dist/components/tttx-button-v2_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-button-v2_1_9_101.js → tttx-button-v2_1_9_103.js} +2 -2
- package/dist/components/tttx-button.js +51 -51
- package/dist/components/{tttx-dialog_1_9_101.d.ts → tttx-button_1_9_103.d.ts} +4 -4
- package/dist/components/{tttx-button_1_9_101.js → tttx-button_1_9_103.js} +2 -2
- package/dist/components/{tttx-table_1_9_101.d.ts → tttx-chart_1_9_103.d.ts} +4 -4
- package/dist/components/{tttx-chart_1_9_101.js → tttx-chart_1_9_103.js} +574 -574
- package/dist/components/tttx-checkbox-group-caption_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-checkbox-group-caption_1_9_101.js → tttx-checkbox-group-caption_1_9_103.js} +24 -24
- package/dist/components/tttx-checkbox-group-heading_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-checkbox-group-heading_1_9_101.js → tttx-checkbox-group-heading_1_9_103.js} +24 -24
- package/dist/components/tttx-checkbox-group_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-checkbox-group_1_9_101.js → tttx-checkbox-group_1_9_103.js} +25 -25
- package/dist/components/tttx-checkbox_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-checkbox_1_9_101.js → tttx-checkbox_1_9_103.js} +59 -59
- package/dist/components/tttx-comments_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-comments_1_9_101.js → tttx-comments_1_9_103.js} +241 -241
- package/dist/components/tttx-data-pattern_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-data-pattern_1_9_101.js → tttx-data-pattern_1_9_103.js} +80 -80
- package/dist/components/tttx-datacard_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-datacard_1_9_101.js → tttx-datacard_1_9_103.js} +79 -79
- package/dist/components/tttx-date-range-picker.js +242 -242
- package/dist/components/tttx-dialog-box_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-dialog-box_1_9_101.js → tttx-dialog-box_1_9_103.js} +125 -125
- package/dist/components/{tttx-filter_1_9_101.d.ts → tttx-dialog_1_9_103.d.ts} +4 -4
- package/dist/components/{tttx-dialog_1_9_101.js → tttx-dialog_1_9_103.js} +103 -103
- package/dist/components/tttx-expander_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-expander_1_9_101.js → tttx-expander_1_9_103.js} +55 -55
- package/dist/components/tttx-filter.js +217 -217
- package/dist/components/{tttx-button_1_9_101.d.ts → tttx-filter_1_9_103.d.ts} +4 -4
- package/dist/components/{tttx-filter_1_9_101.js → tttx-filter_1_9_103.js} +2 -2
- package/dist/components/{tttx-form_1_9_101.d.ts → tttx-form_1_9_103.d.ts} +4 -4
- package/dist/components/{tttx-form_1_9_101.js → tttx-form_1_9_103.js} +1039 -1039
- package/dist/components/tttx-graph.js +143 -143
- package/dist/components/{tttx-graph_1_9_101.d.ts → tttx-graph_1_9_103.d.ts} +4 -4
- package/dist/components/{tttx-graph_1_9_101.js → tttx-graph_1_9_103.js} +2 -2
- package/dist/components/tttx-icon.js +42 -42
- package/dist/components/{tttx-list_1_9_101.d.ts → tttx-icon_1_9_103.d.ts} +4 -4
- package/dist/components/{tttx-icon_1_9_101.js → tttx-icon_1_9_103.js} +2 -2
- package/dist/components/tttx-keyvalue-block_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-keyvalue-block_1_9_101.js → tttx-keyvalue-block_1_9_103.js} +83 -83
- package/dist/components/tttx-list.js +92 -92
- package/dist/components/{tttx-tabs_1_9_101.d.ts → tttx-list_1_9_103.d.ts} +4 -4
- package/dist/components/{tttx-list_1_9_101.js → tttx-list_1_9_103.js} +2 -2
- package/dist/components/tttx-loading-spinner.js +92 -92
- package/dist/components/tttx-loading-spinner_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-loading-spinner_1_9_101.js → tttx-loading-spinner_1_9_103.js} +2 -2
- package/dist/components/tttx-multiselect-box_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-multiselect-box_1_9_101.js → tttx-multiselect-box_1_9_103.js} +231 -231
- package/dist/components/tttx-percentage-bar_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-percentage-bar_1_9_101.js → tttx-percentage-bar_1_9_103.js} +80 -80
- package/dist/components/tttx-qrcode_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-qrcode_1_9_101.js → tttx-qrcode_1_9_103.js} +47 -47
- package/dist/components/tttx-range-slider_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-range-slider_1_9_101.js → tttx-range-slider_1_9_103.js} +208 -208
- package/dist/components/tttx-select-box.js +295 -295
- package/dist/components/tttx-select-box_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-select-box_1_9_101.js → tttx-select-box_1_9_103.js} +2 -2
- package/dist/components/tttx-skeleton_loader_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-skeleton_loader_1_9_101.js → tttx-skeleton_loader_1_9_103.js} +57 -57
- package/dist/components/tttx-sorter.js +136 -136
- package/dist/components/tttx-sorter_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-sorter_1_9_101.js → tttx-sorter_1_9_103.js} +2 -2
- package/dist/components/tttx-standalone-input.js +136 -136
- package/dist/components/tttx-standalone-input_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-standalone-input_1_9_101.js → tttx-standalone-input_1_9_103.js} +2 -2
- package/dist/components/{tttx-chart_1_9_101.d.ts → tttx-table_1_9_103.d.ts} +4 -4
- package/dist/components/{tttx-table_1_9_101.js → tttx-table_1_9_103.js} +109 -109
- package/dist/components/{tttx-icon_1_9_101.d.ts → tttx-tabs_1_9_103.d.ts} +4 -4
- package/dist/components/{tttx-tabs_1_9_101.js → tttx-tabs_1_9_103.js} +128 -128
- package/dist/components/{tttx-tag-v2_1_9_101.d.ts → tttx-tag-v2_1_9_103.d.ts} +4 -4
- package/dist/components/{tttx-tag-v2_1_9_101.js → tttx-tag-v2_1_9_103.js} +105 -105
- package/dist/components/tttx-tag.js +44 -44
- package/dist/components/{tttx-tag_1_9_101.d.ts → tttx-tag_1_9_103.d.ts} +4 -4
- package/dist/components/{tttx-tag_1_9_101.js → tttx-tag_1_9_103.js} +2 -2
- package/dist/components/tttx-textarea_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-textarea_1_9_101.js → tttx-textarea_1_9_103.js} +83 -83
- package/dist/components/tttx-toggle_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-toggle_1_9_101.js → tttx-toggle_1_9_103.js} +49 -49
- package/dist/components/tttx-toolbar.js +42 -42
- package/dist/components/tttx-toolbar_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-toolbar_1_9_101.js → tttx-toolbar_1_9_103.js} +2 -2
- package/dist/components/tttx-tooltip_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-tooltip_1_9_101.js → tttx-tooltip_1_9_103.js} +114 -114
- package/dist/components/tttx-tree-view_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-tree-view_1_9_101.js → tttx-tree-view_1_9_103.js} +371 -371
- package/dist/esm/{auto-421f2656.js → auto-a07ee1b1.js} +177 -177
- package/dist/esm/{domsanitiser.options-38a67458.js → domsanitiser.options-2c1ef894.js} +12 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/{tttx-action-dropdown_1_9_101.entry.js → tttx-action-dropdown_1_9_103.entry.js} +51 -51
- package/dist/esm/{tttx-button-v2_1_9_101.entry.js → tttx-button-v2_1_9_103.entry.js} +147 -147
- package/dist/esm/{tttx-button_1_9_101.entry.js → tttx-button_1_9_103.entry.js} +26 -26
- package/dist/esm/{tttx-chart_1_9_101.entry.js → tttx-chart_1_9_103.entry.js} +524 -524
- package/dist/esm/{tttx-checkbox-group-caption_1_9_101.entry.js → tttx-checkbox-group-caption_1_9_103.entry.js} +9 -9
- package/dist/esm/{tttx-checkbox-group-heading_1_9_101.entry.js → tttx-checkbox-group-heading_1_9_103.entry.js} +9 -9
- package/dist/esm/{tttx-checkbox-group_1_9_101.entry.js → tttx-checkbox-group_1_9_103.entry.js} +9 -9
- package/dist/esm/{tttx-checkbox_1_9_101.entry.js → tttx-checkbox_1_9_103.entry.js} +33 -33
- package/dist/esm/{tttx-comments_1_9_101.entry.js → tttx-comments_1_9_103.entry.js} +204 -204
- package/dist/esm/{tttx-data-pattern_1_9_101.entry.js → tttx-data-pattern_1_9_103.entry.js} +20 -20
- package/dist/esm/{tttx-datacard_1_9_101.entry.js → tttx-datacard_1_9_103.entry.js} +43 -43
- package/dist/esm/tttx-date-range-picker.entry.js +212 -212
- package/dist/esm/{tttx-dialog-box_1_9_101.entry.js → tttx-dialog-box_1_9_103.entry.js} +94 -94
- package/dist/esm/{tttx-dialog_1_9_101.entry.js → tttx-dialog_1_9_103.entry.js} +69 -69
- package/dist/esm/{tttx-expander_1_9_101.entry.js → tttx-expander_1_9_103.entry.js} +28 -28
- package/dist/esm/{tttx-filter_1_9_101_4.entry.js → tttx-filter_1_9_103_4.entry.js} +383 -383
- package/dist/esm/{tttx-form_1_9_101.entry.js → tttx-form_1_9_103.entry.js} +985 -985
- package/dist/esm/{tttx-graph_1_9_101.entry.js → tttx-graph_1_9_103.entry.js} +124 -124
- package/dist/esm/{tttx-icon_1_9_101.entry.js → tttx-icon_1_9_103.entry.js} +24 -24
- package/dist/esm/{tttx-keyvalue-block_1_9_101.entry.js → tttx-keyvalue-block_1_9_103.entry.js} +62 -62
- package/dist/esm/{tttx-loading-spinner_1_9_101_3.entry.js → tttx-loading-spinner_1_9_103_3.entry.js} +170 -170
- package/dist/esm/{tttx-multiselect-box_1_9_101.entry.js → tttx-multiselect-box_1_9_103.entry.js} +175 -175
- package/dist/esm/{tttx-percentage-bar_1_9_101.entry.js → tttx-percentage-bar_1_9_103.entry.js} +56 -56
- package/dist/esm/{tttx-qrcode_1_9_101.entry.js → tttx-qrcode_1_9_103.entry.js} +28 -28
- package/dist/esm/{tttx-range-slider_1_9_101.entry.js → tttx-range-slider_1_9_103.entry.js} +185 -185
- package/dist/esm/{tttx-select-box_1_9_101.entry.js → tttx-select-box_1_9_103.entry.js} +239 -239
- package/dist/esm/{tttx-skeleton_loader_1_9_101.entry.js → tttx-skeleton_loader_1_9_103.entry.js} +30 -30
- package/dist/esm/{tttx-table_1_9_101.entry.js → tttx-table_1_9_103.entry.js} +72 -72
- package/dist/esm/{tttx-tabs_1_9_101.entry.js → tttx-tabs_1_9_103.entry.js} +103 -103
- package/dist/esm/{tttx-tag-v2_1_9_101.entry.js → tttx-tag-v2_1_9_103.entry.js} +72 -72
- package/dist/esm/{tttx-textarea_1_9_101.entry.js → tttx-textarea_1_9_103.entry.js} +50 -50
- package/dist/esm/{tttx-toggle_1_9_101.entry.js → tttx-toggle_1_9_103.entry.js} +30 -30
- package/dist/esm/{tttx-tooltip_1_9_101.entry.js → tttx-tooltip_1_9_103.entry.js} +87 -87
- package/dist/esm/{tttx-tree-view_1_9_101.entry.js → tttx-tree-view_1_9_103.entry.js} +342 -342
- package/dist/esm/tttx.js +1 -1
- package/dist/tttx/{p-b3f49d83.entry.js → p-0c5bc253.entry.js} +1 -1
- package/dist/tttx/{p-82b4e575.entry.js → p-10d2d044.entry.js} +1 -1
- package/dist/tttx/p-1623f3cf.entry.js +1 -1
- package/dist/tttx/{p-b161205b.entry.js → p-16aa3f67.entry.js} +1 -1
- package/dist/tttx/p-21707b8d.entry.js +1 -1
- package/dist/tttx/p-2251ab85.entry.js +1 -1
- package/dist/tttx/p-2d19c46c.entry.js +1 -1
- package/dist/tttx/p-358eaa44.entry.js +1 -1
- package/dist/tttx/p-362999b3.entry.js +1 -1
- package/dist/tttx/p-3ec67d75.entry.js +1 -1
- package/dist/tttx/p-44f0af69.entry.js +1 -1
- package/dist/tttx/p-4664d065.entry.js +1 -1
- package/dist/tttx/{p-00a849cf.entry.js → p-486ca932.entry.js} +1 -1
- package/dist/tttx/{p-e21e3a9c.entry.js → p-59115c8f.entry.js} +1 -1
- package/dist/tttx/p-5d289334.entry.js +1 -1
- package/dist/tttx/p-6ec18b4a.entry.js +1 -1
- package/dist/tttx/{p-a59ad197.entry.js → p-700c2816.entry.js} +1 -1
- package/dist/tttx/p-7b5b0670.entry.js +1 -1
- package/dist/tttx/p-7d1712fe.entry.js +1 -1
- package/dist/tttx/{p-41b69e01.entry.js → p-8f85ab3e.entry.js} +1 -1
- package/dist/tttx/p-a1b8ecda.entry.js +1 -1
- package/dist/tttx/p-a43e2c5e.entry.js +1 -1
- package/dist/tttx/p-b8cc0cb2.entry.js +1 -1
- package/dist/tttx/p-b9003a76.entry.js +1 -1
- package/dist/tttx/p-bb59054f.entry.js +1 -1
- package/dist/tttx/p-c66bc14c.entry.js +1 -1
- package/dist/tttx/p-c8051143.entry.js +1 -1
- package/dist/tttx/p-ca93f786.entry.js +1 -1
- package/dist/tttx/p-d21b0507.entry.js +1 -1
- package/dist/tttx/p-d945d492.entry.js +1 -1
- package/dist/tttx/{p-34e0e487.entry.js → p-df708b75.entry.js} +2 -2
- package/dist/tttx/p-f0c1380f.entry.js +1 -1
- package/dist/tttx/{p-0bb158ce.js → p-f411d1e5.js} +2 -2
- package/dist/tttx/{p-d4c4edbd.entry.js → p-fa25ee03.entry.js} +1 -1
- package/dist/tttx/{p-41f0bf7f.entry.js → p-fbdd1046.entry.js} +1 -1
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +11 -11
- package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +11 -11
- package/dist/types/components/atoms/tttx-button-v2/tttx-button-v2.d.ts +36 -36
- package/dist/types/components/atoms/tttx-button-v2/tttx-button-v2.stories.d.ts +68 -68
- package/dist/types/components/atoms/tttx-checkbox/tttx-checkbox.d.ts +17 -17
- package/dist/types/components/atoms/tttx-datacard/tttx-datacard.d.ts +21 -21
- package/dist/types/components/atoms/tttx-datacard/tttx-datacard.stories.d.ts +44 -44
- package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +9 -9
- package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +25 -25
- package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +13 -13
- package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +11 -11
- package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +23 -23
- package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +47 -47
- package/dist/types/components/atoms/tttx-percentage-bar/tttx-percentage-bar.d.ts +22 -22
- package/dist/types/components/atoms/tttx-percentage-bar/tttx-percentage-bar.stories.d.ts +10 -10
- package/dist/types/components/atoms/tttx-qrcode/tttx-qrcode.d.ts +8 -8
- package/dist/types/components/atoms/tttx-qrcode/tttx-qrcode.stories.d.ts +23 -23
- package/dist/types/components/atoms/tttx-skeleton-loader/tttx-skeleton-loader.d.ts +14 -14
- package/dist/types/components/atoms/tttx-tag/tttx-tag.d.ts +10 -10
- package/dist/types/components/atoms/tttx-tag/tttx-tag.stories.d.ts +51 -51
- package/dist/types/components/atoms/tttx-tag-v2/tttx-tag-v2.d.ts +15 -15
- package/dist/types/components/atoms/tttx-tag-v2/tttx-tag-v2.stories.d.ts +48 -48
- package/dist/types/components/atoms/tttx-toggle/tttx-toggle.d.ts +11 -11
- package/dist/types/components/atoms/tttx-toggle/tttx-toggle.stories.d.ts +6 -6
- package/dist/types/components/domsanitiser.options.d.ts +10 -10
- package/dist/types/components/molecules/tttx-action-dropdown/tttx-action-dropdown.d.ts +21 -21
- package/dist/types/components/molecules/tttx-chart/tttx-chart.d.ts +60 -60
- package/dist/types/components/molecules/tttx-chart/tttx-chart.stories.d.ts +38 -38
- package/dist/types/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-caption.d.ts +3 -3
- package/dist/types/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-heading.d.ts +3 -3
- package/dist/types/components/molecules/tttx-checkbox-group/tttx-checkbox-group.d.ts +3 -3
- package/dist/types/components/molecules/tttx-checkbox-group/tttx-checkbox-group.stories.d.ts +15 -15
- package/dist/types/components/molecules/tttx-comments/tttx-comments.d.ts +68 -68
- package/dist/types/components/molecules/tttx-date-range-picker/tttx-date-range-picker.d.ts +42 -42
- package/dist/types/components/molecules/tttx-dialog/icon-types.d.ts +18 -18
- package/dist/types/components/molecules/tttx-dialog/tttx-dialog.d.ts +27 -27
- package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.d.ts +26 -26
- package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.d.ts +24 -24
- package/dist/types/components/molecules/tttx-expander/tttx-expander.d.ts +16 -16
- package/dist/types/components/molecules/tttx-filter/tttx-filter.d.ts +44 -44
- package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +14 -14
- package/dist/types/components/molecules/tttx-form/lib/timecomparatorChecks.d.ts +4 -4
- package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +15 -15
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +297 -297
- package/dist/types/components/molecules/tttx-graph/gauge-label-plugin.d.ts +4 -4
- package/dist/types/components/molecules/tttx-graph/tttx-graph.d.ts +13 -13
- package/dist/types/components/molecules/tttx-graph/tttx-graph.stories.d.ts +26 -26
- package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +23 -23
- package/dist/types/components/molecules/tttx-multiselect-box/tttx-multiselect-box.d.ts +50 -50
- package/dist/types/components/molecules/tttx-range-slider/tttx-range-slider.d.ts +45 -45
- package/dist/types/components/molecules/tttx-range-slider/tttx-range-slider.stories.d.ts +7 -7
- package/dist/types/components/molecules/tttx-select-box/tttx-select-box.d.ts +55 -55
- package/dist/types/components/molecules/tttx-select-box/tttx-select-box.stories.d.ts +28 -28
- package/dist/types/components/molecules/tttx-sorter/tttx-sorter.d.ts +21 -21
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +69 -69
- package/dist/types/components/molecules/tttx-table/tttx-table.d.ts +32 -32
- package/dist/types/components/molecules/tttx-table/tttx-table.types.d.ts +6 -6
- package/dist/types/components/molecules/tttx-tabs/tttx-tabs.d.ts +25 -25
- package/dist/types/components/molecules/tttx-textarea/tttx-textarea.d.ts +42 -42
- package/dist/types/components/molecules/tttx-textarea/tttx-textarea.stories.d.ts +89 -89
- package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.d.ts +8 -8
- package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.stories.d.ts +19 -19
- package/dist/types/components/molecules/tttx-tooltip/tttx-tooltip.d.ts +37 -37
- package/dist/types/components/molecules/tttx-tooltip/tttx-tootip.stories.d.ts +12 -12
- package/dist/types/components/molecules/tttx-tree-view/helper/helper.d.ts +24 -24
- package/dist/types/components/molecules/tttx-tree-view/tttx-tree-view.d.ts +57 -57
- package/dist/types/components/organisms/tttx-data-pattern/tttx-data-pattern.d.ts +11 -11
- package/dist/types/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.d.ts +13 -13
- package/dist/types/components/palette.stories.d.ts +6 -6
- package/dist/types/components.d.ts +451 -451
- package/dist/types/icons.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/shared/domsanitiser.options.d.ts +10 -10
- package/package.json +1 -1
- package/dist/components/tttx-action-dropdown_1_9_101.d.ts +0 -11
- package/dist/components/tttx-button-v2_1_9_101.d.ts +0 -11
- package/dist/components/tttx-checkbox-group-caption_1_9_101.d.ts +0 -11
- package/dist/components/tttx-checkbox-group-heading_1_9_101.d.ts +0 -11
- package/dist/components/tttx-checkbox-group_1_9_101.d.ts +0 -11
- package/dist/components/tttx-checkbox_1_9_101.d.ts +0 -11
- package/dist/components/tttx-comments_1_9_101.d.ts +0 -11
- package/dist/components/tttx-data-pattern_1_9_101.d.ts +0 -11
- package/dist/components/tttx-datacard_1_9_101.d.ts +0 -11
- package/dist/components/tttx-dialog-box_1_9_101.d.ts +0 -11
- package/dist/components/tttx-expander_1_9_101.d.ts +0 -11
- package/dist/components/tttx-keyvalue-block_1_9_101.d.ts +0 -11
- package/dist/components/tttx-loading-spinner_1_9_101.d.ts +0 -11
- package/dist/components/tttx-multiselect-box_1_9_101.d.ts +0 -11
- package/dist/components/tttx-percentage-bar_1_9_101.d.ts +0 -11
- package/dist/components/tttx-qrcode_1_9_101.d.ts +0 -11
- package/dist/components/tttx-range-slider_1_9_101.d.ts +0 -11
- package/dist/components/tttx-select-box_1_9_101.d.ts +0 -11
- package/dist/components/tttx-skeleton_loader_1_9_101.d.ts +0 -11
- package/dist/components/tttx-sorter_1_9_101.d.ts +0 -11
- package/dist/components/tttx-standalone-input_1_9_101.d.ts +0 -11
- package/dist/components/tttx-textarea_1_9_101.d.ts +0 -11
- package/dist/components/tttx-toggle_1_9_101.d.ts +0 -11
- package/dist/components/tttx-toolbar_1_9_101.d.ts +0 -11
- package/dist/components/tttx-tooltip_1_9_101.d.ts +0 -11
- package/dist/components/tttx-tree-view_1_9_101.d.ts +0 -11
- package/dist/types/components/atoms/tttx-checkbox/tttx-checkbox.stories.d.ts +0 -47
- package/dist/types/components/atoms/tttx-skeleton-loader/tttx-skeleton-loader.stories.d.ts +0 -58
- package/dist/types/components/molecules/tttx-action-dropdown/tttx-action-dropdown.stories.d.ts +0 -36
- package/dist/types/components/molecules/tttx-comments/tttx-comments.stories.d.ts +0 -8
- package/dist/types/components/molecules/tttx-date-range-picker/tttx-date-range-picker.stories.d.ts +0 -28
- package/dist/types/components/molecules/tttx-dialog/tttx-dialog.stories.d.ts +0 -42
- package/dist/types/components/molecules/tttx-expander/tttx-expander.stories.d.ts +0 -27
- package/dist/types/components/molecules/tttx-filter/tttx-filter.stories.d.ts +0 -76
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +0 -718
- package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +0 -15
- package/dist/types/components/molecules/tttx-multiselect-box/tttx-multiselect-box.stories.d.ts +0 -17
- package/dist/types/components/molecules/tttx-sorter/tttx-sorter.stories.d.ts +0 -30
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +0 -150
- package/dist/types/components/molecules/tttx-table/tttx-table.stories.d.ts +0 -79
- package/dist/types/components/molecules/tttx-tabs/tttx-tabs.stories.d.ts +0 -13
- package/dist/types/components/molecules/tttx-tree-view/tttx-tree-view.stories.d.ts +0 -15
- /package/dist/tttx/{p-55799798.js → p-62d92a44.js} +0 -0
|
@@ -7,301 +7,301 @@ import { d as defineCustomElement$1 } from './tttx-tag.js';
|
|
|
7
7
|
|
|
8
8
|
const tttxSelectBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:flex;gap:4px}.label{font-size:16px;font-weight:500;line-height:18.752px;color:#212121}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{position:relative;display:flex;flex-direction:column;width:100%}.dropdown-container:focus-visible{outline:none}.dropdown-container:focus .dropdown-selector{border:1px solid #1479c6}.dropdown-selector,.dropdown-body{display:flex;border-radius:4px;background-color:white}.dropdown-selector{min-height:36px;box-sizing:border-box;align-items:center;gap:8px;padding:4px 8px 4px 16px;cursor:pointer;justify-content:space-between;border:1px solid #d5d5d5;display:flex;flex-direction:row}.dropdown-selector>.left-wrapper{flex:1;min-width:0}.dropdown-selector *{font-weight:400}.dropdown-selector.invalid{border:1px solid #dc0000}.priority-pill{padding:6px 8px 6px 16px}.dropdown-read-only{background-color:#BDBDBD !important}.errorBubble{position:relative;font-size:14px;line-height:16.408px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}.errorBubble:not(.visible){display:none}.errorBubble>*{font-size:16px;margin-right:4px;height:16px}.description{color:#757575;font-size:14px;line-height:16.408px}.description>p{margin:0}.description-dd{color:#757575;font-size:14px;line-height:16.408px}.description-dd>p{margin:0}.truncated-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#212121;font-size:16px;line-height:18.752px}.dropdown-selector-chevron{height:24px}.dropdown-selector-chevron-offset{height:24px}.dropdown-selector-chevron>tttx-icon{cursor:pointer}.dropdown-body-container{position:fixed;z-index:2}.dropdown-body{position:absolute;flex-direction:column;box-shadow:0px 1px 5px #1111114D;padding-bottom:8px;border:1px solid #d5d5d5}.dropdown-options-list{display:flex;flex-direction:column;overflow-y:auto;max-height:368px}.dropdown-option{padding:6px 8px 6px 16px;cursor:pointer}.dropdown-option:hover{background-color:#1111110d}.dropdown-option:active,.dropdown-option.selected{background-color:#ebfbfc}.placeholder{color:#9e9e9e;white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis}.searchbox{padding:8px 16px}.searchbox tttx-standalone-input{margin-top:-4px}.hidden{display:none}";
|
|
9
9
|
|
|
10
|
-
const TttxSelectBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
this.__registerHost();
|
|
14
|
-
this.__attachShadow();
|
|
15
|
-
this.selectItemEvent = createEvent(this, "selectItemEvent", 3);
|
|
16
|
-
this.toggleOpen = createEvent(this, "toggleOpen", 3);
|
|
17
|
-
this.searchUpdated = createEvent(this, "multiselectSearchUpdated", 7);
|
|
18
|
-
this.selectEndReachedEvent = createEvent(this, "selectEndReached", 7);
|
|
19
|
-
this.bodyOffset = {};
|
|
20
|
-
this.closeSelectBoxHandler = () => {
|
|
21
|
-
if (this.open) {
|
|
22
|
-
this.open = false;
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
this.optionsData = null;
|
|
26
|
-
this.label = undefined;
|
|
27
|
-
this.inline = undefined;
|
|
28
|
-
this.placeholder = '';
|
|
29
|
-
this.searchEnabled = undefined;
|
|
30
|
-
this.selectedValue = undefined;
|
|
31
|
-
this.useExternalFiltering = undefined;
|
|
32
|
-
this.useExternalPaginatedFiltering = undefined;
|
|
33
|
-
this.isAllExternalDataLoaded = undefined;
|
|
34
|
-
this.isLoading = undefined;
|
|
35
|
-
this.readOnly = undefined;
|
|
36
|
-
this.priorityLabel = 'Priority Group';
|
|
37
|
-
this.nonPriorityLabel = 'Non Priority Group';
|
|
38
|
-
this.clearable = false;
|
|
39
|
-
this.showErrorMsg = undefined;
|
|
40
|
-
this.showErrorBubble = false;
|
|
41
|
-
this.errorMsg = undefined;
|
|
42
|
-
this.open = false;
|
|
43
|
-
this.selectedItem = undefined;
|
|
44
|
-
this.searchTerm = '';
|
|
45
|
-
this.loadingNextExternalPage = false;
|
|
46
|
-
}
|
|
47
|
-
async componentWillLoad() {
|
|
48
|
-
if (this.optionsData) {
|
|
49
|
-
this.setOptionsData();
|
|
50
|
-
const matchingItems = this._optionsData.filter((item) => {
|
|
51
|
-
return item.value == this.selectedValue;
|
|
52
|
-
});
|
|
53
|
-
this.selectedItem = matchingItems.length > 0 ? matchingItems[0] : undefined;
|
|
54
|
-
}
|
|
55
|
-
this._isAllExternalDataLoaded = this.isAllExternalDataLoaded;
|
|
56
|
-
}
|
|
57
|
-
async setOptionsData() {
|
|
58
|
-
this._optionsData = typeof this.optionsData === 'string' ? JSON.parse(this.optionsData) : this.optionsData;
|
|
59
|
-
if (this.open) {
|
|
60
|
-
this.calculateDropdownMenuOffset();
|
|
61
|
-
}
|
|
62
|
-
this.loadingNextExternalPage = false;
|
|
63
|
-
}
|
|
64
|
-
updateAllLoadedBool() {
|
|
65
|
-
this._isAllExternalDataLoaded = this.isAllExternalDataLoaded;
|
|
66
|
-
}
|
|
67
|
-
async setSelectedItem(value) {
|
|
68
|
-
if (!value)
|
|
69
|
-
return this.cleanSelectedItem();
|
|
70
|
-
const item = this._optionsData.find(x => x.value.toLowerCase() === value.toLowerCase());
|
|
71
|
-
if (!item)
|
|
72
|
-
return this.cleanSelectedItem();
|
|
73
|
-
this.selectedValue = item.value;
|
|
74
|
-
this.selectedItem = item;
|
|
75
|
-
}
|
|
76
|
-
cleanSelectedItem() {
|
|
77
|
-
this.selectedValue = undefined;
|
|
78
|
-
this.selectedItem = undefined;
|
|
79
|
-
this.selectItemEvent.emit(this.selectedItem);
|
|
80
|
-
}
|
|
81
|
-
componentDidLoad() {
|
|
82
|
-
document.addEventListener('closeSelectBoxOnScroll', this.closeSelectBoxHandler);
|
|
83
|
-
}
|
|
84
|
-
componentWillUnload() {
|
|
85
|
-
document.removeEventListener('closeSelectBoxOnScroll', this.closeSelectBoxHandler);
|
|
86
|
-
}
|
|
87
|
-
handleCloseSelectBox() {
|
|
88
|
-
this.open = false;
|
|
89
|
-
}
|
|
90
|
-
handleBlur() {
|
|
91
|
-
this.open = false;
|
|
92
|
-
this.toggleOpen.emit(false);
|
|
93
|
-
}
|
|
94
|
-
onDropdownClicked() {
|
|
95
|
-
if (this.readOnly)
|
|
96
|
-
return;
|
|
97
|
-
this.open = !this.open;
|
|
98
|
-
this.searchTerm = '';
|
|
99
|
-
this.loadingNextExternalPage = false;
|
|
100
|
-
this.calculateDropdownMenuOffset();
|
|
101
|
-
this.toggleOpen.emit(this.open);
|
|
102
|
-
}
|
|
103
|
-
onItemSelected(option) {
|
|
104
|
-
this.selectedItem = option;
|
|
105
|
-
this.selectItemEvent.emit(this.selectedItem);
|
|
106
|
-
this.handleBlur();
|
|
107
|
-
}
|
|
108
|
-
dropdownSelectorContent() {
|
|
109
|
-
let title;
|
|
110
|
-
let subtitle;
|
|
111
|
-
const chevronIcon = this.open ? 'expand_less' : 'expand_more';
|
|
112
|
-
const icon = h("tttx-
|
|
113
|
-
let chevron = h("div", { class: "dropdown-selector-chevron" }, icon);
|
|
114
|
-
if (!this.selectedItem) {
|
|
115
|
-
title = h("div", { class: "placeholder" }, this.placeholder);
|
|
116
|
-
return (h(Fragment, null, title, chevron));
|
|
117
|
-
}
|
|
118
|
-
else if (this.selectedItem.html) {
|
|
119
|
-
title = h("div", { title: this.selectedItem.label, class: "truncated-text", innerHTML: this.selectedItem.html });
|
|
120
|
-
return (h(Fragment, null, title, chevron));
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
title = (h("div", { title: this.selectedItem.label, class: "truncated-text" }, this.selectedItem.label));
|
|
124
|
-
if (this.selectedItem.description) {
|
|
125
|
-
subtitle = (h("div", { class: "description" }, h("p", null, this.selectedItem.description)));
|
|
126
|
-
chevron = h("div", { class: "dropdown-selector-chevron-offset" }, icon);
|
|
127
|
-
}
|
|
128
|
-
return (h(Fragment, null, h("div", { class: "left-wrapper" }, title, subtitle), this.clearable && !this.readOnly &&
|
|
129
|
-
h("tttx-
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
renderDropdownOptions(options) {
|
|
133
|
-
let usingPriority = false;
|
|
134
|
-
const priorityOptions = [];
|
|
135
|
-
const nonPriorityOptions = [];
|
|
136
|
-
for (const option of options) {
|
|
137
|
-
// using priority groups if any item has the option set, so set true for first found
|
|
138
|
-
usingPriority = usingPriority || option.prioritise === true;
|
|
139
|
-
// don't include if it doesn't match the search term when searching
|
|
140
|
-
if (this.searchEnabled &&
|
|
141
|
-
(!this.useExternalFiltering && !this.useExternalPaginatedFiltering) &&
|
|
142
|
-
option.label.toLowerCase().indexOf(this.searchTerm.toLowerCase()) === -1)
|
|
143
|
-
continue;
|
|
144
|
-
if (option.prioritise === true) {
|
|
145
|
-
priorityOptions.push(option);
|
|
146
|
-
continue;
|
|
147
|
-
}
|
|
148
|
-
nonPriorityOptions.push(option);
|
|
149
|
-
}
|
|
150
|
-
// render priority options at the top of the dropdown list
|
|
151
|
-
return (h(Fragment, null, usingPriority && priorityOptions.length > 0 &&
|
|
152
|
-
h(Fragment, null, h("tttx-
|
|
153
|
-
h(Fragment, null, usingPriority &&
|
|
154
|
-
h("tttx-
|
|
155
|
-
}
|
|
156
|
-
dropdownOption(option) {
|
|
157
|
-
const selected = this.selectedItem && option.value === this.selectedItem.value;
|
|
158
|
-
if (option.html) {
|
|
159
|
-
const sanitisedHTML = purify.sanitize(option.html, domSanitiserOptions);
|
|
160
|
-
return (h("div", { class: `dropdown-option ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label, innerHTML: sanitisedHTML }));
|
|
161
|
-
}
|
|
162
|
-
else if (option.description) {
|
|
163
|
-
return (h("div", { class: `dropdown-option ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, option.label, h("div", { class: "description-dd" }, h("p", null, option.description))));
|
|
164
|
-
}
|
|
165
|
-
return (h("div", { class: `dropdown-option ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, option.label));
|
|
166
|
-
}
|
|
167
|
-
handleSearchInput(event) {
|
|
168
|
-
const searchInput = event.target.value;
|
|
169
|
-
if (this.useExternalFiltering || this.useExternalPaginatedFiltering) {
|
|
170
|
-
// emit event with the latest search value
|
|
171
|
-
clearTimeout(this.searchFilterTimeout);
|
|
172
|
-
this.searchFilterTimeout = setTimeout((filterValue) => {
|
|
173
|
-
this.searchUpdated.emit(filterValue);
|
|
174
|
-
}, 500, searchInput);
|
|
175
|
-
}
|
|
176
|
-
this.searchTerm = searchInput;
|
|
177
|
-
}
|
|
178
|
-
calculateDropdownMenuOffset() {
|
|
179
|
-
const dropdownSelector = this.el.shadowRoot.querySelector('.dropdown-selector');
|
|
180
|
-
const clientRectangle = dropdownSelector.getBoundingClientRect();
|
|
181
|
-
const viewportHeight = window.innerHeight;
|
|
182
|
-
const viewportWidth = window.innerWidth;
|
|
183
|
-
// Calculate the maximum dropdown menu height
|
|
184
|
-
let dropdownMenuMaxHeight = Math.min(368, 36 * this._optionsData.length) + 8;
|
|
185
|
-
if (this.searchEnabled)
|
|
186
|
-
dropdownMenuMaxHeight += 52;
|
|
187
|
-
// Determine if the dropdown would overflow the bottom of the viewport
|
|
188
|
-
const availableSpaceBelow = viewportHeight - clientRectangle.bottom;
|
|
189
|
-
const availableSpaceAbove = clientRectangle.top;
|
|
190
|
-
// If there is no option data, add some default height to ensure the loading screen is fully visible.
|
|
191
|
-
if (!this._optionsData.length) {
|
|
192
|
-
dropdownMenuMaxHeight = 200;
|
|
193
|
-
}
|
|
194
|
-
let top, bottom, maxHeight;
|
|
195
|
-
if (availableSpaceBelow >= dropdownMenuMaxHeight) {
|
|
196
|
-
// Enough space below, show dropdown below
|
|
197
|
-
top = clientRectangle.bottom + 'px';
|
|
198
|
-
bottom = '';
|
|
199
|
-
maxHeight = dropdownMenuMaxHeight + 'px';
|
|
200
|
-
}
|
|
201
|
-
else if (availableSpaceAbove >= dropdownMenuMaxHeight) {
|
|
202
|
-
// Enough space above, show dropdown above
|
|
203
|
-
top = '';
|
|
204
|
-
bottom = (viewportHeight - clientRectangle.top) + 'px';
|
|
205
|
-
maxHeight = dropdownMenuMaxHeight + 'px';
|
|
206
|
-
}
|
|
207
|
-
else {
|
|
208
|
-
// No space above, no space below then calculating space base on dropdown height
|
|
209
|
-
top = dropdownMenuMaxHeight - availableSpaceAbove + 'px';
|
|
210
|
-
bottom = (dropdownMenuMaxHeight - availableSpaceBelow) + 'px';
|
|
211
|
-
maxHeight = dropdownMenuMaxHeight + 'px';
|
|
212
|
-
}
|
|
213
|
-
this.bodyOffset = {
|
|
214
|
-
position: 'fixed',
|
|
215
|
-
left: Math.max(clientRectangle.left, 0) + 'px',
|
|
216
|
-
width: Math.min(clientRectangle.width, viewportWidth - clientRectangle.left - 16) + 'px',
|
|
217
|
-
top,
|
|
218
|
-
bottom,
|
|
219
|
-
maxHeight,
|
|
220
|
-
zIndex: '10',
|
|
221
|
-
overflowY: 'auto', // Allow scrolling if needed
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
onSelectScroll(scrollEvent) {
|
|
225
|
-
const selectDiv = scrollEvent.target;
|
|
226
|
-
const scrollOffset = selectDiv.scrollHeight - selectDiv.scrollTop - selectDiv.offsetHeight;
|
|
227
|
-
const isScrolledEnd = scrollOffset <= 5;
|
|
228
|
-
if (this.useExternalPaginatedFiltering && isScrolledEnd && !this.loadingNextExternalPage && !this._isAllExternalDataLoaded) {
|
|
229
|
-
this.loadingNextExternalPage = true;
|
|
230
|
-
clearTimeout(this.selectEndReached);
|
|
231
|
-
this.selectEndReached = setTimeout((filterValue) => {
|
|
232
|
-
this.selectEndReachedEvent.emit(filterValue);
|
|
233
|
-
}, 500, this.searchTerm);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
render() {
|
|
237
|
-
if (!this.optionsData)
|
|
238
|
-
return;
|
|
239
|
-
const invalidClass = this.showErrorMsg ? 'invalid' : '';
|
|
240
|
-
const readOnlyClass = this.readOnly ? 'dropdown-read-only' : '';
|
|
241
|
-
return (h(Host, { class: this.inline ? 'inline' : 'block' }, this.label && h("div", { class: "label" }, this.label), h("div", { tabindex: "0", class: "dropdown-container" }, h("div", { class: ['dropdown-selector', invalidClass, readOnlyClass].join(' '), ref: el => (this.dropdownSelector = el), onClick: this.onDropdownClicked.bind(this) }, this.dropdownSelectorContent()), this.open && (h("div", { class: "dropdown-body-container" }, h("div", { class: "dropdown-body", style: Object.assign({ width: `${this.dropdownSelector.offsetWidth}px` }, this.bodyOffset) }, this.searchEnabled && (h("div", { class: "searchbox" }, h("tttx-standalone-
|
|
242
|
-
}
|
|
243
|
-
get el() { return this; }
|
|
244
|
-
static get watchers() { return {
|
|
245
|
-
"optionsData": ["setOptionsData"],
|
|
246
|
-
"isAllExternalDataLoaded": ["updateAllLoadedBool"]
|
|
247
|
-
}; }
|
|
248
|
-
static get style() { return tttxSelectBoxCss; }
|
|
249
|
-
}, [1, "tttx-select-
|
|
250
|
-
"optionsData": [1, "options-data"],
|
|
251
|
-
"label": [1],
|
|
252
|
-
"inline": [4],
|
|
253
|
-
"placeholder": [1],
|
|
254
|
-
"searchEnabled": [4, "search-enabled"],
|
|
255
|
-
"selectedValue": [1, "selected-value"],
|
|
256
|
-
"useExternalFiltering": [4, "use-external-filtering"],
|
|
257
|
-
"useExternalPaginatedFiltering": [4, "use-external-paginated-filtering"],
|
|
258
|
-
"isAllExternalDataLoaded": [4, "is-all-external-data-loaded"],
|
|
259
|
-
"isLoading": [4, "is-loading"],
|
|
260
|
-
"readOnly": [4, "read-only"],
|
|
261
|
-
"priorityLabel": [1, "priority-label"],
|
|
262
|
-
"nonPriorityLabel": [1, "non-priority-label"],
|
|
263
|
-
"clearable": [4],
|
|
264
|
-
"showErrorMsg": [4, "show-error-msg"],
|
|
265
|
-
"showErrorBubble": [4, "show-error-bubble"],
|
|
266
|
-
"errorMsg": [1, "error-msg"],
|
|
267
|
-
"open": [32],
|
|
268
|
-
"selectedItem": [32],
|
|
269
|
-
"searchTerm": [32],
|
|
270
|
-
"loadingNextExternalPage": [32],
|
|
271
|
-
"setSelectedItem": [64]
|
|
272
|
-
}, [[0, "closeSelectBox", "handleCloseSelectBox"], [0, "blur", "handleBlur"]]]);
|
|
273
|
-
function defineCustomElement() {
|
|
274
|
-
if (typeof customElements === "undefined") {
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
const components = ["tttx-select-
|
|
278
|
-
components.forEach(tagName => { switch (tagName) {
|
|
279
|
-
case "tttx-select-
|
|
280
|
-
if (!customElements.get(tagName)) {
|
|
281
|
-
customElements.define(tagName, TttxSelectBox);
|
|
282
|
-
}
|
|
283
|
-
break;
|
|
284
|
-
case "tttx-
|
|
285
|
-
if (!customElements.get(tagName)) {
|
|
286
|
-
defineCustomElement$4();
|
|
287
|
-
}
|
|
288
|
-
break;
|
|
289
|
-
case "tttx-loading-
|
|
290
|
-
if (!customElements.get(tagName)) {
|
|
291
|
-
defineCustomElement$3();
|
|
292
|
-
}
|
|
293
|
-
break;
|
|
294
|
-
case "tttx-standalone-
|
|
295
|
-
if (!customElements.get(tagName)) {
|
|
296
|
-
defineCustomElement$2();
|
|
297
|
-
}
|
|
298
|
-
break;
|
|
299
|
-
case "tttx-
|
|
300
|
-
if (!customElements.get(tagName)) {
|
|
301
|
-
defineCustomElement$1();
|
|
302
|
-
}
|
|
303
|
-
break;
|
|
304
|
-
} });
|
|
10
|
+
const TttxSelectBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.__registerHost();
|
|
14
|
+
this.__attachShadow();
|
|
15
|
+
this.selectItemEvent = createEvent(this, "selectItemEvent", 3);
|
|
16
|
+
this.toggleOpen = createEvent(this, "toggleOpen", 3);
|
|
17
|
+
this.searchUpdated = createEvent(this, "multiselectSearchUpdated", 7);
|
|
18
|
+
this.selectEndReachedEvent = createEvent(this, "selectEndReached", 7);
|
|
19
|
+
this.bodyOffset = {};
|
|
20
|
+
this.closeSelectBoxHandler = () => {
|
|
21
|
+
if (this.open) {
|
|
22
|
+
this.open = false;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
this.optionsData = null;
|
|
26
|
+
this.label = undefined;
|
|
27
|
+
this.inline = undefined;
|
|
28
|
+
this.placeholder = '';
|
|
29
|
+
this.searchEnabled = undefined;
|
|
30
|
+
this.selectedValue = undefined;
|
|
31
|
+
this.useExternalFiltering = undefined;
|
|
32
|
+
this.useExternalPaginatedFiltering = undefined;
|
|
33
|
+
this.isAllExternalDataLoaded = undefined;
|
|
34
|
+
this.isLoading = undefined;
|
|
35
|
+
this.readOnly = undefined;
|
|
36
|
+
this.priorityLabel = 'Priority Group';
|
|
37
|
+
this.nonPriorityLabel = 'Non Priority Group';
|
|
38
|
+
this.clearable = false;
|
|
39
|
+
this.showErrorMsg = undefined;
|
|
40
|
+
this.showErrorBubble = false;
|
|
41
|
+
this.errorMsg = undefined;
|
|
42
|
+
this.open = false;
|
|
43
|
+
this.selectedItem = undefined;
|
|
44
|
+
this.searchTerm = '';
|
|
45
|
+
this.loadingNextExternalPage = false;
|
|
46
|
+
}
|
|
47
|
+
async componentWillLoad() {
|
|
48
|
+
if (this.optionsData) {
|
|
49
|
+
this.setOptionsData();
|
|
50
|
+
const matchingItems = this._optionsData.filter((item) => {
|
|
51
|
+
return item.value == this.selectedValue;
|
|
52
|
+
});
|
|
53
|
+
this.selectedItem = matchingItems.length > 0 ? matchingItems[0] : undefined;
|
|
54
|
+
}
|
|
55
|
+
this._isAllExternalDataLoaded = this.isAllExternalDataLoaded;
|
|
56
|
+
}
|
|
57
|
+
async setOptionsData() {
|
|
58
|
+
this._optionsData = typeof this.optionsData === 'string' ? JSON.parse(this.optionsData) : this.optionsData;
|
|
59
|
+
if (this.open) {
|
|
60
|
+
this.calculateDropdownMenuOffset();
|
|
61
|
+
}
|
|
62
|
+
this.loadingNextExternalPage = false;
|
|
63
|
+
}
|
|
64
|
+
updateAllLoadedBool() {
|
|
65
|
+
this._isAllExternalDataLoaded = this.isAllExternalDataLoaded;
|
|
66
|
+
}
|
|
67
|
+
async setSelectedItem(value) {
|
|
68
|
+
if (!value)
|
|
69
|
+
return this.cleanSelectedItem();
|
|
70
|
+
const item = this._optionsData.find(x => x.value.toLowerCase() === value.toLowerCase());
|
|
71
|
+
if (!item)
|
|
72
|
+
return this.cleanSelectedItem();
|
|
73
|
+
this.selectedValue = item.value;
|
|
74
|
+
this.selectedItem = item;
|
|
75
|
+
}
|
|
76
|
+
cleanSelectedItem() {
|
|
77
|
+
this.selectedValue = undefined;
|
|
78
|
+
this.selectedItem = undefined;
|
|
79
|
+
this.selectItemEvent.emit(this.selectedItem);
|
|
80
|
+
}
|
|
81
|
+
componentDidLoad() {
|
|
82
|
+
document.addEventListener('closeSelectBoxOnScroll', this.closeSelectBoxHandler);
|
|
83
|
+
}
|
|
84
|
+
componentWillUnload() {
|
|
85
|
+
document.removeEventListener('closeSelectBoxOnScroll', this.closeSelectBoxHandler);
|
|
86
|
+
}
|
|
87
|
+
handleCloseSelectBox() {
|
|
88
|
+
this.open = false;
|
|
89
|
+
}
|
|
90
|
+
handleBlur() {
|
|
91
|
+
this.open = false;
|
|
92
|
+
this.toggleOpen.emit(false);
|
|
93
|
+
}
|
|
94
|
+
onDropdownClicked() {
|
|
95
|
+
if (this.readOnly)
|
|
96
|
+
return;
|
|
97
|
+
this.open = !this.open;
|
|
98
|
+
this.searchTerm = '';
|
|
99
|
+
this.loadingNextExternalPage = false;
|
|
100
|
+
this.calculateDropdownMenuOffset();
|
|
101
|
+
this.toggleOpen.emit(this.open);
|
|
102
|
+
}
|
|
103
|
+
onItemSelected(option) {
|
|
104
|
+
this.selectedItem = option;
|
|
105
|
+
this.selectItemEvent.emit(this.selectedItem);
|
|
106
|
+
this.handleBlur();
|
|
107
|
+
}
|
|
108
|
+
dropdownSelectorContent() {
|
|
109
|
+
let title;
|
|
110
|
+
let subtitle;
|
|
111
|
+
const chevronIcon = this.open ? 'expand_less' : 'expand_more';
|
|
112
|
+
const icon = h("tttx-icon_1_9_103", { icon: chevronIcon, color: "black" });
|
|
113
|
+
let chevron = h("div", { class: "dropdown-selector-chevron" }, icon);
|
|
114
|
+
if (!this.selectedItem) {
|
|
115
|
+
title = h("div", { class: "placeholder" }, this.placeholder);
|
|
116
|
+
return (h(Fragment, null, title, chevron));
|
|
117
|
+
}
|
|
118
|
+
else if (this.selectedItem.html) {
|
|
119
|
+
title = h("div", { title: this.selectedItem.label, class: "truncated-text", innerHTML: this.selectedItem.html });
|
|
120
|
+
return (h(Fragment, null, title, chevron));
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
title = (h("div", { title: this.selectedItem.label, class: "truncated-text" }, this.selectedItem.label));
|
|
124
|
+
if (this.selectedItem.description) {
|
|
125
|
+
subtitle = (h("div", { class: "description" }, h("p", null, this.selectedItem.description)));
|
|
126
|
+
chevron = h("div", { class: "dropdown-selector-chevron-offset" }, icon);
|
|
127
|
+
}
|
|
128
|
+
return (h(Fragment, null, h("div", { class: "left-wrapper" }, title, subtitle), this.clearable && !this.readOnly &&
|
|
129
|
+
h("tttx-icon_1_9_103", { class: "input-icon", style: { paddingTop: '5px', cursor: 'pointer' }, icon: 'close_small', onClick: this.cleanSelectedItem.bind(this) }), chevron));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
renderDropdownOptions(options) {
|
|
133
|
+
let usingPriority = false;
|
|
134
|
+
const priorityOptions = [];
|
|
135
|
+
const nonPriorityOptions = [];
|
|
136
|
+
for (const option of options) {
|
|
137
|
+
// using priority groups if any item has the option set, so set true for first found
|
|
138
|
+
usingPriority = usingPriority || option.prioritise === true;
|
|
139
|
+
// don't include if it doesn't match the search term when searching
|
|
140
|
+
if (this.searchEnabled &&
|
|
141
|
+
(!this.useExternalFiltering && !this.useExternalPaginatedFiltering) &&
|
|
142
|
+
option.label.toLowerCase().indexOf(this.searchTerm.toLowerCase()) === -1)
|
|
143
|
+
continue;
|
|
144
|
+
if (option.prioritise === true) {
|
|
145
|
+
priorityOptions.push(option);
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
nonPriorityOptions.push(option);
|
|
149
|
+
}
|
|
150
|
+
// render priority options at the top of the dropdown list
|
|
151
|
+
return (h(Fragment, null, usingPriority && priorityOptions.length > 0 &&
|
|
152
|
+
h(Fragment, null, h("tttx-tag_1_9_103", { class: 'priority-pill', text: this.priorityLabel, color: "#F0F0F0" }), priorityOptions.map((option) => this.dropdownOption(option))), nonPriorityOptions.length > 0 &&
|
|
153
|
+
h(Fragment, null, usingPriority &&
|
|
154
|
+
h("tttx-tag_1_9_103", { class: 'priority-pill', text: this.nonPriorityLabel, color: "#F0F0F0" }), nonPriorityOptions.map((option) => this.dropdownOption(option)))));
|
|
155
|
+
}
|
|
156
|
+
dropdownOption(option) {
|
|
157
|
+
const selected = this.selectedItem && option.value === this.selectedItem.value;
|
|
158
|
+
if (option.html) {
|
|
159
|
+
const sanitisedHTML = purify.sanitize(option.html, domSanitiserOptions);
|
|
160
|
+
return (h("div", { class: `dropdown-option ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label, innerHTML: sanitisedHTML }));
|
|
161
|
+
}
|
|
162
|
+
else if (option.description) {
|
|
163
|
+
return (h("div", { class: `dropdown-option ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, option.label, h("div", { class: "description-dd" }, h("p", null, option.description))));
|
|
164
|
+
}
|
|
165
|
+
return (h("div", { class: `dropdown-option ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, option.label));
|
|
166
|
+
}
|
|
167
|
+
handleSearchInput(event) {
|
|
168
|
+
const searchInput = event.target.value;
|
|
169
|
+
if (this.useExternalFiltering || this.useExternalPaginatedFiltering) {
|
|
170
|
+
// emit event with the latest search value
|
|
171
|
+
clearTimeout(this.searchFilterTimeout);
|
|
172
|
+
this.searchFilterTimeout = setTimeout((filterValue) => {
|
|
173
|
+
this.searchUpdated.emit(filterValue);
|
|
174
|
+
}, 500, searchInput);
|
|
175
|
+
}
|
|
176
|
+
this.searchTerm = searchInput;
|
|
177
|
+
}
|
|
178
|
+
calculateDropdownMenuOffset() {
|
|
179
|
+
const dropdownSelector = this.el.shadowRoot.querySelector('.dropdown-selector');
|
|
180
|
+
const clientRectangle = dropdownSelector.getBoundingClientRect();
|
|
181
|
+
const viewportHeight = window.innerHeight;
|
|
182
|
+
const viewportWidth = window.innerWidth;
|
|
183
|
+
// Calculate the maximum dropdown menu height
|
|
184
|
+
let dropdownMenuMaxHeight = Math.min(368, 36 * this._optionsData.length) + 8;
|
|
185
|
+
if (this.searchEnabled)
|
|
186
|
+
dropdownMenuMaxHeight += 52;
|
|
187
|
+
// Determine if the dropdown would overflow the bottom of the viewport
|
|
188
|
+
const availableSpaceBelow = viewportHeight - clientRectangle.bottom;
|
|
189
|
+
const availableSpaceAbove = clientRectangle.top;
|
|
190
|
+
// If there is no option data, add some default height to ensure the loading screen is fully visible.
|
|
191
|
+
if (!this._optionsData.length) {
|
|
192
|
+
dropdownMenuMaxHeight = 200;
|
|
193
|
+
}
|
|
194
|
+
let top, bottom, maxHeight;
|
|
195
|
+
if (availableSpaceBelow >= dropdownMenuMaxHeight) {
|
|
196
|
+
// Enough space below, show dropdown below
|
|
197
|
+
top = clientRectangle.bottom + 'px';
|
|
198
|
+
bottom = '';
|
|
199
|
+
maxHeight = dropdownMenuMaxHeight + 'px';
|
|
200
|
+
}
|
|
201
|
+
else if (availableSpaceAbove >= dropdownMenuMaxHeight) {
|
|
202
|
+
// Enough space above, show dropdown above
|
|
203
|
+
top = '';
|
|
204
|
+
bottom = (viewportHeight - clientRectangle.top) + 'px';
|
|
205
|
+
maxHeight = dropdownMenuMaxHeight + 'px';
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
// No space above, no space below then calculating space base on dropdown height
|
|
209
|
+
top = dropdownMenuMaxHeight - availableSpaceAbove + 'px';
|
|
210
|
+
bottom = (dropdownMenuMaxHeight - availableSpaceBelow) + 'px';
|
|
211
|
+
maxHeight = dropdownMenuMaxHeight + 'px';
|
|
212
|
+
}
|
|
213
|
+
this.bodyOffset = {
|
|
214
|
+
position: 'fixed',
|
|
215
|
+
left: Math.max(clientRectangle.left, 0) + 'px',
|
|
216
|
+
width: Math.min(clientRectangle.width, viewportWidth - clientRectangle.left - 16) + 'px',
|
|
217
|
+
top,
|
|
218
|
+
bottom,
|
|
219
|
+
maxHeight,
|
|
220
|
+
zIndex: '10',
|
|
221
|
+
overflowY: 'auto', // Allow scrolling if needed
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
onSelectScroll(scrollEvent) {
|
|
225
|
+
const selectDiv = scrollEvent.target;
|
|
226
|
+
const scrollOffset = selectDiv.scrollHeight - selectDiv.scrollTop - selectDiv.offsetHeight;
|
|
227
|
+
const isScrolledEnd = scrollOffset <= 5;
|
|
228
|
+
if (this.useExternalPaginatedFiltering && isScrolledEnd && !this.loadingNextExternalPage && !this._isAllExternalDataLoaded) {
|
|
229
|
+
this.loadingNextExternalPage = true;
|
|
230
|
+
clearTimeout(this.selectEndReached);
|
|
231
|
+
this.selectEndReached = setTimeout((filterValue) => {
|
|
232
|
+
this.selectEndReachedEvent.emit(filterValue);
|
|
233
|
+
}, 500, this.searchTerm);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
render() {
|
|
237
|
+
if (!this.optionsData)
|
|
238
|
+
return;
|
|
239
|
+
const invalidClass = this.showErrorMsg ? 'invalid' : '';
|
|
240
|
+
const readOnlyClass = this.readOnly ? 'dropdown-read-only' : '';
|
|
241
|
+
return (h(Host, { class: this.inline ? 'inline' : 'block' }, this.label && h("div", { class: "label" }, this.label), h("div", { tabindex: "0", class: "dropdown-container" }, h("div", { class: ['dropdown-selector', invalidClass, readOnlyClass].join(' '), ref: el => (this.dropdownSelector = el), onClick: this.onDropdownClicked.bind(this) }, this.dropdownSelectorContent()), this.open && (h("div", { class: "dropdown-body-container" }, h("div", { class: "dropdown-body", style: Object.assign({ width: `${this.dropdownSelector.offsetWidth}px` }, this.bodyOffset) }, this.searchEnabled && (h("div", { class: "searchbox" }, h("tttx-standalone-input_1_9_103", { type: "text", label: "", required: true, showerrorbubble: false, iconleft: "search", onInput: this.handleSearchInput.bind(this) }))), h("div", { class: "dropdown-options-list", onScroll: this.onSelectScroll.bind(this) }, !this.isLoading && (this.renderDropdownOptions(this._optionsData)), (this.isLoading || this.loadingNextExternalPage) && (h("tttx-loading-spinner_1_9_103", { class: 'loading-style' })))))), this.showErrorBubble && (h("span", { class: ['errorBubble', this.showErrorMsg && this.errorMsg ? 'visible' : ''].join(' ') }, h("tttx-icon_1_9_103", { icon: "warning", color: "#dc0000", size: 16 }), " ", this.errorMsg)))));
|
|
242
|
+
}
|
|
243
|
+
get el() { return this; }
|
|
244
|
+
static get watchers() { return {
|
|
245
|
+
"optionsData": ["setOptionsData"],
|
|
246
|
+
"isAllExternalDataLoaded": ["updateAllLoadedBool"]
|
|
247
|
+
}; }
|
|
248
|
+
static get style() { return tttxSelectBoxCss; }
|
|
249
|
+
}, [1, "tttx-select-box_1_9_103", {
|
|
250
|
+
"optionsData": [1, "options-data"],
|
|
251
|
+
"label": [1],
|
|
252
|
+
"inline": [4],
|
|
253
|
+
"placeholder": [1],
|
|
254
|
+
"searchEnabled": [4, "search-enabled"],
|
|
255
|
+
"selectedValue": [1, "selected-value"],
|
|
256
|
+
"useExternalFiltering": [4, "use-external-filtering"],
|
|
257
|
+
"useExternalPaginatedFiltering": [4, "use-external-paginated-filtering"],
|
|
258
|
+
"isAllExternalDataLoaded": [4, "is-all-external-data-loaded"],
|
|
259
|
+
"isLoading": [4, "is-loading"],
|
|
260
|
+
"readOnly": [4, "read-only"],
|
|
261
|
+
"priorityLabel": [1, "priority-label"],
|
|
262
|
+
"nonPriorityLabel": [1, "non-priority-label"],
|
|
263
|
+
"clearable": [4],
|
|
264
|
+
"showErrorMsg": [4, "show-error-msg"],
|
|
265
|
+
"showErrorBubble": [4, "show-error-bubble"],
|
|
266
|
+
"errorMsg": [1, "error-msg"],
|
|
267
|
+
"open": [32],
|
|
268
|
+
"selectedItem": [32],
|
|
269
|
+
"searchTerm": [32],
|
|
270
|
+
"loadingNextExternalPage": [32],
|
|
271
|
+
"setSelectedItem": [64]
|
|
272
|
+
}, [[0, "closeSelectBox", "handleCloseSelectBox"], [0, "blur", "handleBlur"]]]);
|
|
273
|
+
function defineCustomElement() {
|
|
274
|
+
if (typeof customElements === "undefined") {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
const components = ["tttx-select-box_1_9_103", "tttx-icon_1_9_103", "tttx-loading-spinner_1_9_103", "tttx-standalone-input_1_9_103", "tttx-tag_1_9_103"];
|
|
278
|
+
components.forEach(tagName => { switch (tagName) {
|
|
279
|
+
case "tttx-select-box_1_9_103":
|
|
280
|
+
if (!customElements.get(tagName)) {
|
|
281
|
+
customElements.define(tagName, TttxSelectBox);
|
|
282
|
+
}
|
|
283
|
+
break;
|
|
284
|
+
case "tttx-icon_1_9_103":
|
|
285
|
+
if (!customElements.get(tagName)) {
|
|
286
|
+
defineCustomElement$4();
|
|
287
|
+
}
|
|
288
|
+
break;
|
|
289
|
+
case "tttx-loading-spinner_1_9_103":
|
|
290
|
+
if (!customElements.get(tagName)) {
|
|
291
|
+
defineCustomElement$3();
|
|
292
|
+
}
|
|
293
|
+
break;
|
|
294
|
+
case "tttx-standalone-input_1_9_103":
|
|
295
|
+
if (!customElements.get(tagName)) {
|
|
296
|
+
defineCustomElement$2();
|
|
297
|
+
}
|
|
298
|
+
break;
|
|
299
|
+
case "tttx-tag_1_9_103":
|
|
300
|
+
if (!customElements.get(tagName)) {
|
|
301
|
+
defineCustomElement$1();
|
|
302
|
+
}
|
|
303
|
+
break;
|
|
304
|
+
} });
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
export { TttxSelectBox as T, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxSelectBox_1_9_103 extends Components.TttxSelectBox_1_9_103, HTMLElement {}
|
|
4
|
+
export const TttxSelectBox_1_9_103: {
|
|
5
|
+
prototype: TttxSelectBox_1_9_103;
|
|
6
|
+
new (): TttxSelectBox_1_9_103;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { T as TttxSelectBox, d as defineCustomElement$1 } from './tttx-select-box.js';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const TttxSelectBox_1_9_103 = TttxSelectBox;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
5
5
|
|
|
6
|
-
export {
|
|
6
|
+
export { TttxSelectBox_1_9_103, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxSkeleton_loader_1_9_103 extends Components.TttxSkeleton_loader_1_9_103, HTMLElement {}
|
|
4
|
+
export const TttxSkeleton_loader_1_9_103: {
|
|
5
|
+
prototype: TttxSkeleton_loader_1_9_103;
|
|
6
|
+
new (): TttxSkeleton_loader_1_9_103;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|