@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.
- 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_localcomponent.cjs.entry.js → tttx-action-dropdown_1_9_103.cjs.entry.js} +51 -51
- package/dist/cjs/{tttx-button-v2_localcomponent.cjs.entry.js → tttx-button-v2_1_9_103.cjs.entry.js} +147 -147
- package/dist/cjs/{tttx-button_localcomponent.cjs.entry.js → tttx-button_1_9_103.cjs.entry.js} +26 -26
- package/dist/cjs/{tttx-chart_localcomponent.cjs.entry.js → tttx-chart_1_9_103.cjs.entry.js} +524 -524
- package/dist/cjs/{tttx-checkbox-group-caption_localcomponent.cjs.entry.js → tttx-checkbox-group-caption_1_9_103.cjs.entry.js} +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
- package/dist/cjs/{tttx-checkbox-group_localcomponent.cjs.entry.js → tttx-checkbox-group_1_9_103.cjs.entry.js} +9 -9
- package/dist/cjs/{tttx-checkbox_localcomponent.cjs.entry.js → tttx-checkbox_1_9_103.cjs.entry.js} +33 -33
- package/dist/cjs/{tttx-comments_localcomponent.cjs.entry.js → tttx-comments_1_9_103.cjs.entry.js} +204 -204
- package/dist/cjs/tttx-data-pattern_1_9_103.cjs.entry.js +30 -0
- package/dist/cjs/{tttx-datacard_localcomponent.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_localcomponent.cjs.entry.js → tttx-dialog-box_1_9_103.cjs.entry.js} +94 -94
- package/dist/cjs/{tttx-dialog_localcomponent.cjs.entry.js → tttx-dialog_1_9_103.cjs.entry.js} +69 -69
- package/dist/cjs/{tttx-expander_localcomponent.cjs.entry.js → tttx-expander_1_9_103.cjs.entry.js} +28 -28
- package/dist/cjs/{tttx-filter_localcomponent_4.cjs.entry.js → tttx-filter_1_9_103_4.cjs.entry.js} +386 -386
- package/dist/cjs/{tttx-form_localcomponent.cjs.entry.js → tttx-form_1_9_103.cjs.entry.js} +985 -985
- package/dist/cjs/{tttx-graph_localcomponent.cjs.entry.js → tttx-graph_1_9_103.cjs.entry.js} +124 -124
- package/dist/cjs/{tttx-icon_localcomponent.cjs.entry.js → tttx-icon_1_9_103.cjs.entry.js} +24 -24
- package/dist/cjs/{tttx-keyvalue-block_localcomponent.cjs.entry.js → tttx-keyvalue-block_1_9_103.cjs.entry.js} +62 -62
- package/dist/cjs/{tttx-loading-spinner_localcomponent_3.cjs.entry.js → tttx-loading-spinner_1_9_103_3.cjs.entry.js} +172 -172
- package/dist/cjs/{tttx-multiselect-box_localcomponent.cjs.entry.js → tttx-multiselect-box_1_9_103.cjs.entry.js} +175 -175
- package/dist/cjs/{tttx-percentage-bar_localcomponent.cjs.entry.js → tttx-percentage-bar_1_9_103.cjs.entry.js} +56 -56
- package/dist/cjs/{tttx-qrcode_localcomponent.cjs.entry.js → tttx-qrcode_1_9_103.cjs.entry.js} +28 -28
- package/dist/cjs/{tttx-range-slider_localcomponent.cjs.entry.js → tttx-range-slider_1_9_103.cjs.entry.js} +185 -185
- package/dist/cjs/{tttx-select-box_localcomponent.cjs.entry.js → tttx-select-box_1_9_103.cjs.entry.js} +239 -239
- package/dist/cjs/{tttx-skeleton_loader_localcomponent.cjs.entry.js → tttx-skeleton_loader_1_9_103.cjs.entry.js} +30 -30
- package/dist/cjs/{tttx-table_localcomponent.cjs.entry.js → tttx-table_1_9_103.cjs.entry.js} +72 -72
- package/dist/cjs/{tttx-tabs_localcomponent.cjs.entry.js → tttx-tabs_1_9_103.cjs.entry.js} +103 -103
- package/dist/cjs/{tttx-tag-v2_localcomponent.cjs.entry.js → tttx-tag-v2_1_9_103.cjs.entry.js} +72 -72
- package/dist/cjs/{tttx-textarea_localcomponent.cjs.entry.js → tttx-textarea_1_9_103.cjs.entry.js} +50 -50
- package/dist/cjs/{tttx-toggle_localcomponent.cjs.entry.js → tttx-toggle_1_9_103.cjs.entry.js} +30 -30
- package/dist/cjs/{tttx-tooltip_localcomponent.cjs.entry.js → tttx-tooltip_1_9_103.cjs.entry.js} +87 -87
- package/dist/cjs/{tttx-tree-view_localcomponent.cjs.entry.js → tttx-tree-view_1_9_103.cjs.entry.js} +341 -341
- 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.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_localcomponent.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_localcomponent.js → tttx-button-v2_1_9_103.js} +2 -2
- package/dist/components/tttx-button.js +51 -51
- package/dist/components/tttx-button_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-button_localcomponent.js → tttx-button_1_9_103.js} +2 -2
- package/dist/components/tttx-chart_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-chart_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.js → tttx-dialog-box_1_9_103.js} +125 -125
- package/dist/components/tttx-dialog_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-dialog_localcomponent.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_localcomponent.js → tttx-expander_1_9_103.js} +55 -55
- package/dist/components/tttx-filter.js +217 -217
- package/dist/components/tttx-filter_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-filter_localcomponent.js → tttx-filter_1_9_103.js} +2 -2
- package/dist/components/tttx-form_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-form_localcomponent.js → tttx-form_1_9_103.js} +1039 -1039
- package/dist/components/tttx-graph.js +143 -143
- package/dist/components/tttx-graph_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-graph_localcomponent.js → tttx-graph_1_9_103.js} +2 -2
- package/dist/components/tttx-icon.js +42 -42
- package/dist/components/tttx-icon_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-icon_localcomponent.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_localcomponent.js → tttx-keyvalue-block_1_9_103.js} +83 -83
- package/dist/components/tttx-list.js +92 -92
- package/dist/components/tttx-list_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-list_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.js → tttx-standalone-input_1_9_103.js} +2 -2
- package/dist/components/tttx-table_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-table_localcomponent.js → tttx-table_1_9_103.js} +109 -109
- package/dist/components/tttx-tabs_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-tabs_localcomponent.js → tttx-tabs_1_9_103.js} +128 -128
- package/dist/components/tttx-tag-v2_1_9_103.d.ts +11 -0
- package/dist/components/{tttx-tag-v2_localcomponent.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_103.d.ts +11 -0
- package/dist/components/{tttx-tag_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.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_localcomponent.js → tttx-tree-view_1_9_103.js} +370 -370
- 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_localcomponent.entry.js → tttx-action-dropdown_1_9_103.entry.js} +51 -51
- package/dist/esm/{tttx-button-v2_localcomponent.entry.js → tttx-button-v2_1_9_103.entry.js} +147 -147
- package/dist/esm/{tttx-button_localcomponent.entry.js → tttx-button_1_9_103.entry.js} +26 -26
- package/dist/esm/{tttx-chart_localcomponent.entry.js → tttx-chart_1_9_103.entry.js} +524 -524
- package/dist/esm/{tttx-checkbox-group-caption_localcomponent.entry.js → tttx-checkbox-group-caption_1_9_103.entry.js} +9 -9
- package/dist/esm/{tttx-checkbox-group-heading_localcomponent.entry.js → tttx-checkbox-group-heading_1_9_103.entry.js} +9 -9
- package/dist/esm/{tttx-checkbox-group_localcomponent.entry.js → tttx-checkbox-group_1_9_103.entry.js} +9 -9
- package/dist/esm/{tttx-checkbox_localcomponent.entry.js → tttx-checkbox_1_9_103.entry.js} +33 -33
- package/dist/esm/{tttx-comments_localcomponent.entry.js → tttx-comments_1_9_103.entry.js} +204 -204
- package/dist/esm/tttx-data-pattern_1_9_103.entry.js +26 -0
- package/dist/esm/{tttx-datacard_localcomponent.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_localcomponent.entry.js → tttx-dialog-box_1_9_103.entry.js} +94 -94
- package/dist/esm/{tttx-dialog_localcomponent.entry.js → tttx-dialog_1_9_103.entry.js} +69 -69
- package/dist/esm/{tttx-expander_localcomponent.entry.js → tttx-expander_1_9_103.entry.js} +28 -28
- package/dist/esm/{tttx-filter_localcomponent_4.entry.js → tttx-filter_1_9_103_4.entry.js} +383 -383
- package/dist/esm/{tttx-form_localcomponent.entry.js → tttx-form_1_9_103.entry.js} +985 -985
- package/dist/esm/{tttx-graph_localcomponent.entry.js → tttx-graph_1_9_103.entry.js} +124 -124
- package/dist/esm/{tttx-icon_localcomponent.entry.js → tttx-icon_1_9_103.entry.js} +24 -24
- package/dist/esm/{tttx-keyvalue-block_localcomponent.entry.js → tttx-keyvalue-block_1_9_103.entry.js} +62 -62
- package/dist/esm/tttx-loading-spinner_1_9_103_3.entry.js +183 -0
- package/dist/esm/{tttx-multiselect-box_localcomponent.entry.js → tttx-multiselect-box_1_9_103.entry.js} +175 -175
- package/dist/esm/{tttx-percentage-bar_localcomponent.entry.js → tttx-percentage-bar_1_9_103.entry.js} +56 -56
- package/dist/esm/{tttx-qrcode_localcomponent.entry.js → tttx-qrcode_1_9_103.entry.js} +28 -28
- package/dist/esm/{tttx-range-slider_localcomponent.entry.js → tttx-range-slider_1_9_103.entry.js} +185 -185
- package/dist/esm/{tttx-select-box_localcomponent.entry.js → tttx-select-box_1_9_103.entry.js} +239 -239
- package/dist/esm/{tttx-skeleton_loader_localcomponent.entry.js → tttx-skeleton_loader_1_9_103.entry.js} +30 -30
- package/dist/esm/{tttx-table_localcomponent.entry.js → tttx-table_1_9_103.entry.js} +72 -72
- package/dist/esm/{tttx-tabs_localcomponent.entry.js → tttx-tabs_1_9_103.entry.js} +103 -103
- package/dist/esm/{tttx-tag-v2_localcomponent.entry.js → tttx-tag-v2_1_9_103.entry.js} +72 -72
- package/dist/esm/{tttx-textarea_localcomponent.entry.js → tttx-textarea_1_9_103.entry.js} +50 -50
- package/dist/esm/{tttx-toggle_localcomponent.entry.js → tttx-toggle_1_9_103.entry.js} +30 -30
- package/dist/esm/{tttx-tooltip_localcomponent.entry.js → tttx-tooltip_1_9_103.entry.js} +87 -87
- package/dist/esm/{tttx-tree-view_localcomponent.entry.js → tttx-tree-view_1_9_103.entry.js} +341 -341
- package/dist/esm/tttx.js +1 -1
- package/dist/tttx/p-0c5bc253.entry.js +1 -0
- package/dist/tttx/p-10d2d044.entry.js +1 -0
- package/dist/tttx/p-1623f3cf.entry.js +1 -1
- package/dist/tttx/p-16aa3f67.entry.js +1 -0
- 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-486ca932.entry.js +1 -0
- package/dist/tttx/p-59115c8f.entry.js +1 -0
- package/dist/tttx/p-5d289334.entry.js +1 -1
- package/dist/tttx/p-6ec18b4a.entry.js +1 -1
- package/dist/tttx/p-700c2816.entry.js +1 -0
- 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-fa25ee03.entry.js +1 -0
- package/dist/tttx/p-fbdd1046.entry.js +1 -0
- 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/cjs/tttx-data-pattern_localcomponent.cjs.entry.js +0 -30
- package/dist/components/tttx-action-dropdown_localcomponent.d.ts +0 -11
- package/dist/components/tttx-button-v2_localcomponent.d.ts +0 -11
- package/dist/components/tttx-button_localcomponent.d.ts +0 -11
- package/dist/components/tttx-chart_localcomponent.d.ts +0 -11
- package/dist/components/tttx-checkbox-group-caption_localcomponent.d.ts +0 -11
- package/dist/components/tttx-checkbox-group-heading_localcomponent.d.ts +0 -11
- package/dist/components/tttx-checkbox-group_localcomponent.d.ts +0 -11
- package/dist/components/tttx-checkbox_localcomponent.d.ts +0 -11
- package/dist/components/tttx-comments_localcomponent.d.ts +0 -11
- package/dist/components/tttx-data-pattern_localcomponent.d.ts +0 -11
- package/dist/components/tttx-datacard_localcomponent.d.ts +0 -11
- package/dist/components/tttx-dialog-box_localcomponent.d.ts +0 -11
- package/dist/components/tttx-dialog_localcomponent.d.ts +0 -11
- package/dist/components/tttx-expander_localcomponent.d.ts +0 -11
- package/dist/components/tttx-filter_localcomponent.d.ts +0 -11
- package/dist/components/tttx-form_localcomponent.d.ts +0 -11
- package/dist/components/tttx-graph_localcomponent.d.ts +0 -11
- package/dist/components/tttx-icon_localcomponent.d.ts +0 -11
- package/dist/components/tttx-keyvalue-block_localcomponent.d.ts +0 -11
- package/dist/components/tttx-list_localcomponent.d.ts +0 -11
- package/dist/components/tttx-loading-spinner_localcomponent.d.ts +0 -11
- package/dist/components/tttx-multiselect-box_localcomponent.d.ts +0 -11
- package/dist/components/tttx-percentage-bar_localcomponent.d.ts +0 -11
- package/dist/components/tttx-qrcode_localcomponent.d.ts +0 -11
- package/dist/components/tttx-range-slider_localcomponent.d.ts +0 -11
- package/dist/components/tttx-select-box_localcomponent.d.ts +0 -11
- package/dist/components/tttx-skeleton_loader_localcomponent.d.ts +0 -11
- package/dist/components/tttx-sorter_localcomponent.d.ts +0 -11
- package/dist/components/tttx-standalone-input_localcomponent.d.ts +0 -11
- package/dist/components/tttx-table_localcomponent.d.ts +0 -11
- package/dist/components/tttx-tabs_localcomponent.d.ts +0 -11
- package/dist/components/tttx-tag-v2_localcomponent.d.ts +0 -11
- package/dist/components/tttx-tag_localcomponent.d.ts +0 -11
- package/dist/components/tttx-textarea_localcomponent.d.ts +0 -11
- package/dist/components/tttx-toggle_localcomponent.d.ts +0 -11
- package/dist/components/tttx-toolbar_localcomponent.d.ts +0 -11
- package/dist/components/tttx-tooltip_localcomponent.d.ts +0 -11
- package/dist/components/tttx-tree-view_localcomponent.d.ts +0 -11
- package/dist/esm/tttx-data-pattern_localcomponent.entry.js +0 -26
- package/dist/esm/tttx-loading-spinner_localcomponent_3.entry.js +0 -183
- package/dist/tttx/p-00a849cf.entry.js +0 -1
- package/dist/tttx/p-41f0bf7f.entry.js +0 -1
- package/dist/tttx/p-82b4e575.entry.js +0 -1
- package/dist/tttx/p-86e4c8cc.entry.js +0 -1
- package/dist/tttx/p-b161205b.entry.js +0 -1
- package/dist/tttx/p-b3f49d83.entry.js +0 -1
- package/dist/tttx/p-d4c4edbd.entry.js +0 -1
- package/dist/tttx/p-e21e3a9c.entry.js +0 -1
- 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
|
@@ -1,416 +1,416 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
-
import { h, Host } from '@stencil/core';
|
|
3
|
-
export class TttxFilter {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.filterKey = undefined;
|
|
6
|
-
this.filterOptions = [
|
|
7
|
-
{ optionIcon: 'cancel', optionIconColor: 'darkred', optionText: 'Expired' },
|
|
8
|
-
{ optionIcon: 'warning', optionIconColor: 'orange', optionText: 'Expiring soon' },
|
|
9
|
-
{ optionIcon: 'check_circle', optionIconColor: 'green', optionText: 'Active' },
|
|
10
|
-
];
|
|
11
|
-
this.showSelectAll = true;
|
|
12
|
-
this.showSearchField = false;
|
|
13
|
-
this.showOptionIcons = true;
|
|
14
|
-
this.filterButtonStyle = 'list filter';
|
|
15
|
-
this.filterHeader = 'Qualification status';
|
|
16
|
-
this.defaultFilterOptions = undefined;
|
|
17
|
-
this.popoverWidth = '193px';
|
|
18
|
-
this.showPopover = false;
|
|
19
|
-
this.displayedFilterSettings = undefined;
|
|
20
|
-
this.selectedFilters = undefined;
|
|
21
|
-
this.filterSearchTerm = '';
|
|
22
|
-
this.allSelected = undefined;
|
|
23
|
-
}
|
|
24
|
-
handleCloseFilter() {
|
|
25
|
-
this.showPopover = false;
|
|
26
|
-
}
|
|
27
|
-
emitFilterEvent() {
|
|
28
|
-
this.filterChangeEvent.emit({
|
|
29
|
-
selectedFilters: this.selectedFilters,
|
|
30
|
-
filterKey: this.filterKey,
|
|
31
|
-
allSelected: this.allSelected,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
onFilterButtonClick() {
|
|
35
|
-
this.togglePopover();
|
|
36
|
-
}
|
|
37
|
-
onCloseButtonClick() {
|
|
38
|
-
this.togglePopover();
|
|
39
|
-
}
|
|
40
|
-
onApplyFilterButtonClick() {
|
|
41
|
-
this.emitFilterEvent();
|
|
42
|
-
this.togglePopover();
|
|
43
|
-
}
|
|
44
|
-
onFilterOptionSelected(selectedOption) {
|
|
45
|
-
this.allSelected = false;
|
|
46
|
-
if (this.selectedFilters.includes(selectedOption)) {
|
|
47
|
-
this.selectedFilters = this.selectedFilters.filter((filter) => filter != selectedOption);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
this.selectedFilters = [...this.selectedFilters, selectedOption];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
componentWillLoad() {
|
|
54
|
-
this.displayedFilterSettings = this.parseFilterOptions();
|
|
55
|
-
if (this.defaultFilterOptions !== undefined) {
|
|
56
|
-
const parsedDefaultFilterOptions = this.parseDefaultFilterOptions();
|
|
57
|
-
this.selectedFilters = parsedDefaultFilterOptions;
|
|
58
|
-
let allSelected = true;
|
|
59
|
-
this.parseFilterOptions().map(filterOption => {
|
|
60
|
-
if (!this.selectedFilters.includes(filterOption.optionText)) {
|
|
61
|
-
allSelected = false;
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
this.allSelected = allSelected;
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
this.allSelected = true;
|
|
68
|
-
this.selectedFilters = this.displayedFilterSettings.map((filterOption) => filterOption.optionText);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
togglePopover() {
|
|
72
|
-
this.showPopover = !this.showPopover;
|
|
73
|
-
this.toggleFilter.emit(this.showPopover);
|
|
74
|
-
// if(!this.showPopover) {
|
|
75
|
-
// // this._focussedElementIndex = -1;
|
|
76
|
-
// }
|
|
77
|
-
}
|
|
78
|
-
// Commented out keyboard interaction for now
|
|
79
|
-
// @Listen('keyup')
|
|
80
|
-
// handleKeyUp(event: KeyboardEvent) {
|
|
81
|
-
// const keyboardEventValue = event.key;
|
|
82
|
-
// if (document.activeElement.id != `filter__${this.filterKey}`) return;
|
|
83
|
-
// if (event.key == " " || event.code == "Space" || event.keyCode == 32) {
|
|
84
|
-
// if (this._focussedElementIndex == 0) {
|
|
85
|
-
// this.onSelectAllClick()
|
|
86
|
-
// } else {
|
|
87
|
-
// const options = this.el.shadowRoot.querySelectorAll('.filter-option') as HTMLElement[];
|
|
88
|
-
// this.onFilterOptionSelected(options[this._focussedElementIndex].textContent)
|
|
89
|
-
// }
|
|
90
|
-
// return;
|
|
91
|
-
// }
|
|
92
|
-
// switch (keyboardEventValue) {
|
|
93
|
-
// case 'Enter':
|
|
94
|
-
// if(!this.showPopover) {
|
|
95
|
-
// this.showPopover=true
|
|
96
|
-
// } else {
|
|
97
|
-
// this.emitFilterEvent()
|
|
98
|
-
// }
|
|
99
|
-
// break;
|
|
100
|
-
// case 'Escape':
|
|
101
|
-
// this.showPopover = false;
|
|
102
|
-
// this._focussedElementIndex = -1;
|
|
103
|
-
// break;
|
|
104
|
-
// case 'ArrowDown':
|
|
105
|
-
// this.showPopover = true;
|
|
106
|
-
// if (this._focussedElementIndex == -1) {
|
|
107
|
-
// this._focussedElementIndex = 0;
|
|
108
|
-
// } else {
|
|
109
|
-
// const options = this.el.shadowRoot.querySelectorAll('.filter-option') as HTMLElement[];
|
|
110
|
-
// const currentOption = options[this._focussedElementIndex] as HTMLElement;
|
|
111
|
-
// currentOption.blur();
|
|
112
|
-
// // options[this._focussedElementIndex].focus();
|
|
113
|
-
// this._focussedElementIndex + 1 < options.length ? this._focussedElementIndex++ : (this._focussedElementIndex = 0);
|
|
114
|
-
// }
|
|
115
|
-
// break;
|
|
116
|
-
// case 'ArrowUp':
|
|
117
|
-
// if (this._focussedElementIndex == -1) {
|
|
118
|
-
// this.showPopover = true;
|
|
119
|
-
// this._focussedElementIndex = 0;
|
|
120
|
-
// } else {
|
|
121
|
-
// const options = this.el.shadowRoot.querySelectorAll('.filter-option') as HTMLElement[];
|
|
122
|
-
// const currentOption = options[this._focussedElementIndex] as HTMLElement;
|
|
123
|
-
// currentOption.blur();
|
|
124
|
-
// // options[this._focussedElementIndex].focus();
|
|
125
|
-
// this._focussedElementIndex > 0 ? this._focussedElementIndex-- : (this._focussedElementIndex = options.length - 1);
|
|
126
|
-
// }
|
|
127
|
-
// break;
|
|
128
|
-
// }
|
|
129
|
-
// }
|
|
130
|
-
handleFilterChange(event) {
|
|
131
|
-
const target = event.target;
|
|
132
|
-
this.filterSearchTerm = target.value;
|
|
133
|
-
const filteredResults = this.parseFilterOptions().filter((filterOption) => {
|
|
134
|
-
const lowercaseOption = filterOption.optionText.toLowerCase();
|
|
135
|
-
const filterTerm = this.filterSearchTerm.toLowerCase();
|
|
136
|
-
return lowercaseOption.includes(filterTerm);
|
|
137
|
-
});
|
|
138
|
-
this.displayedFilterSettings = filteredResults;
|
|
139
|
-
}
|
|
140
|
-
onSelectAllClick() {
|
|
141
|
-
this.allSelected = !this.allSelected;
|
|
142
|
-
if (this.allSelected) {
|
|
143
|
-
this.displayedFilterSettings.forEach((filterSetting) => { this.selectedFilters = [...this.selectedFilters, filterSetting.optionText]; });
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
this.selectedFilters = [];
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
getFilterButtonClassName(buttonStyle) {
|
|
150
|
-
switch (buttonStyle) {
|
|
151
|
-
case 'table icon': {
|
|
152
|
-
return '--table-icon';
|
|
153
|
-
}
|
|
154
|
-
case 'list icon': {
|
|
155
|
-
return '--list-icon';
|
|
156
|
-
}
|
|
157
|
-
default: {
|
|
158
|
-
return '';
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
parseFilterOptions() {
|
|
163
|
-
return typeof this.filterOptions === 'string' ? JSON.parse(this.filterOptions) : this.filterOptions;
|
|
164
|
-
}
|
|
165
|
-
parseDefaultFilterOptions() {
|
|
166
|
-
return typeof this.defaultFilterOptions === 'string' ? JSON.parse(this.defaultFilterOptions) : this.defaultFilterOptions;
|
|
167
|
-
}
|
|
168
|
-
render() {
|
|
169
|
-
const filterPopoverContainerClassNameModifier = this.showSearchField ? '--with-search-field' : '';
|
|
170
|
-
const selectAllCheckboxIcon = this.allSelected ? 'check_box' : 'check_box_outline_blank';
|
|
171
|
-
const selectAllCheckboxColor = this.allSelected ? 'blue' : 'grey';
|
|
172
|
-
const buttonStyleClassNameModifier = this.getFilterButtonClassName(this.filterButtonStyle);
|
|
173
|
-
const filterKey = `filter__${this.filterKey}`;
|
|
174
|
-
return (h(Host, { id: filterKey }, h("div", { class: 'filter-container' }, h("button", { class: `filter-button ${buttonStyleClassNameModifier}`, type: 'button', onClick: this.onFilterButtonClick.bind(this) }, h("tttx-
|
|
175
|
-
const checkboxIcon = this.selectedFilters.includes(option.optionText) ? 'check_box' : 'check_box_outline_blank';
|
|
176
|
-
const checkboxColor = this.selectedFilters.includes(option.optionText) ? 'blue' : 'grey';
|
|
177
|
-
return h("div", { class: 'filter-option', tabIndex: -1, onClick: () => this.onFilterOptionSelected(option.optionText), key: option.optionText }, h("tttx-
|
|
178
|
-
})), h("div", { class: 'filter-popover-button-container' }, h("button", { type: 'button', class: 'close-button', onClick: this.onCloseButtonClick.bind(this) }, "Close"), h("button", { type: 'button', class: 'apply-button', onClick: this.onApplyFilterButtonClick.bind(this) }, "Apply")))))));
|
|
179
|
-
}
|
|
180
|
-
static get is() { return "tttx-
|
|
181
|
-
static get encapsulation() { return "shadow"; }
|
|
182
|
-
static get originalStyleUrls() {
|
|
183
|
-
return {
|
|
184
|
-
"$": ["tttx-filter.scss"]
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
static get styleUrls() {
|
|
188
|
-
return {
|
|
189
|
-
"$": ["tttx-filter.css"]
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
static get properties() {
|
|
193
|
-
return {
|
|
194
|
-
"filterKey": {
|
|
195
|
-
"type": "string",
|
|
196
|
-
"mutable": false,
|
|
197
|
-
"complexType": {
|
|
198
|
-
"original": "string",
|
|
199
|
-
"resolved": "string",
|
|
200
|
-
"references": {}
|
|
201
|
-
},
|
|
202
|
-
"required": false,
|
|
203
|
-
"optional": false,
|
|
204
|
-
"docs": {
|
|
205
|
-
"tags": [],
|
|
206
|
-
"text": ""
|
|
207
|
-
},
|
|
208
|
-
"attribute": "filter-key",
|
|
209
|
-
"reflect": false
|
|
210
|
-
},
|
|
211
|
-
"filterOptions": {
|
|
212
|
-
"type": "string",
|
|
213
|
-
"mutable": false,
|
|
214
|
-
"complexType": {
|
|
215
|
-
"original": "string | FilterSettings[]",
|
|
216
|
-
"resolved": "FilterSettings[] | string",
|
|
217
|
-
"references": {
|
|
218
|
-
"FilterSettings": {
|
|
219
|
-
"location": "local"
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
"required": false,
|
|
224
|
-
"optional": false,
|
|
225
|
-
"docs": {
|
|
226
|
-
"tags": [],
|
|
227
|
-
"text": ""
|
|
228
|
-
},
|
|
229
|
-
"attribute": "filter-options",
|
|
230
|
-
"reflect": false,
|
|
231
|
-
"defaultValue": "[\n { optionIcon: 'cancel', optionIconColor: 'darkred', optionText: 'Expired' },\n { optionIcon: 'warning', optionIconColor: 'orange', optionText: 'Expiring soon' },\n { optionIcon: 'check_circle', optionIconColor: 'green', optionText: 'Active' },\n ]"
|
|
232
|
-
},
|
|
233
|
-
"showSelectAll": {
|
|
234
|
-
"type": "boolean",
|
|
235
|
-
"mutable": false,
|
|
236
|
-
"complexType": {
|
|
237
|
-
"original": "boolean",
|
|
238
|
-
"resolved": "boolean",
|
|
239
|
-
"references": {}
|
|
240
|
-
},
|
|
241
|
-
"required": false,
|
|
242
|
-
"optional": false,
|
|
243
|
-
"docs": {
|
|
244
|
-
"tags": [],
|
|
245
|
-
"text": ""
|
|
246
|
-
},
|
|
247
|
-
"attribute": "show-select-all",
|
|
248
|
-
"reflect": false,
|
|
249
|
-
"defaultValue": "true"
|
|
250
|
-
},
|
|
251
|
-
"showSearchField": {
|
|
252
|
-
"type": "boolean",
|
|
253
|
-
"mutable": false,
|
|
254
|
-
"complexType": {
|
|
255
|
-
"original": "boolean",
|
|
256
|
-
"resolved": "boolean",
|
|
257
|
-
"references": {}
|
|
258
|
-
},
|
|
259
|
-
"required": false,
|
|
260
|
-
"optional": false,
|
|
261
|
-
"docs": {
|
|
262
|
-
"tags": [],
|
|
263
|
-
"text": ""
|
|
264
|
-
},
|
|
265
|
-
"attribute": "show-search-field",
|
|
266
|
-
"reflect": false,
|
|
267
|
-
"defaultValue": "false"
|
|
268
|
-
},
|
|
269
|
-
"showOptionIcons": {
|
|
270
|
-
"type": "boolean",
|
|
271
|
-
"mutable": false,
|
|
272
|
-
"complexType": {
|
|
273
|
-
"original": "boolean",
|
|
274
|
-
"resolved": "boolean",
|
|
275
|
-
"references": {}
|
|
276
|
-
},
|
|
277
|
-
"required": false,
|
|
278
|
-
"optional": false,
|
|
279
|
-
"docs": {
|
|
280
|
-
"tags": [],
|
|
281
|
-
"text": ""
|
|
282
|
-
},
|
|
283
|
-
"attribute": "show-option-icons",
|
|
284
|
-
"reflect": false,
|
|
285
|
-
"defaultValue": "true"
|
|
286
|
-
},
|
|
287
|
-
"filterButtonStyle": {
|
|
288
|
-
"type": "string",
|
|
289
|
-
"mutable": false,
|
|
290
|
-
"complexType": {
|
|
291
|
-
"original": "'list filter' | 'list icon' | 'table icon'",
|
|
292
|
-
"resolved": "\"list filter\" | \"list icon\" | \"table icon\"",
|
|
293
|
-
"references": {}
|
|
294
|
-
},
|
|
295
|
-
"required": false,
|
|
296
|
-
"optional": false,
|
|
297
|
-
"docs": {
|
|
298
|
-
"tags": [],
|
|
299
|
-
"text": ""
|
|
300
|
-
},
|
|
301
|
-
"attribute": "filter-button-style",
|
|
302
|
-
"reflect": false,
|
|
303
|
-
"defaultValue": "'list filter'"
|
|
304
|
-
},
|
|
305
|
-
"filterHeader": {
|
|
306
|
-
"type": "string",
|
|
307
|
-
"mutable": false,
|
|
308
|
-
"complexType": {
|
|
309
|
-
"original": "string",
|
|
310
|
-
"resolved": "string",
|
|
311
|
-
"references": {}
|
|
312
|
-
},
|
|
313
|
-
"required": false,
|
|
314
|
-
"optional": false,
|
|
315
|
-
"docs": {
|
|
316
|
-
"tags": [],
|
|
317
|
-
"text": ""
|
|
318
|
-
},
|
|
319
|
-
"attribute": "filter-header",
|
|
320
|
-
"reflect": false,
|
|
321
|
-
"defaultValue": "'Qualification status'"
|
|
322
|
-
},
|
|
323
|
-
"defaultFilterOptions": {
|
|
324
|
-
"type": "string",
|
|
325
|
-
"mutable": false,
|
|
326
|
-
"complexType": {
|
|
327
|
-
"original": "string[] | string",
|
|
328
|
-
"resolved": "string | string[]",
|
|
329
|
-
"references": {}
|
|
330
|
-
},
|
|
331
|
-
"required": false,
|
|
332
|
-
"optional": false,
|
|
333
|
-
"docs": {
|
|
334
|
-
"tags": [],
|
|
335
|
-
"text": ""
|
|
336
|
-
},
|
|
337
|
-
"attribute": "default-filter-options",
|
|
338
|
-
"reflect": false
|
|
339
|
-
},
|
|
340
|
-
"popoverWidth": {
|
|
341
|
-
"type": "string",
|
|
342
|
-
"mutable": false,
|
|
343
|
-
"complexType": {
|
|
344
|
-
"original": "string",
|
|
345
|
-
"resolved": "string",
|
|
346
|
-
"references": {}
|
|
347
|
-
},
|
|
348
|
-
"required": false,
|
|
349
|
-
"optional": false,
|
|
350
|
-
"docs": {
|
|
351
|
-
"tags": [],
|
|
352
|
-
"text": ""
|
|
353
|
-
},
|
|
354
|
-
"attribute": "popover-width",
|
|
355
|
-
"reflect": false,
|
|
356
|
-
"defaultValue": "'193px'"
|
|
357
|
-
}
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
static get states() {
|
|
361
|
-
return {
|
|
362
|
-
"showPopover": {},
|
|
363
|
-
"displayedFilterSettings": {},
|
|
364
|
-
"selectedFilters": {},
|
|
365
|
-
"filterSearchTerm": {},
|
|
366
|
-
"allSelected": {}
|
|
367
|
-
};
|
|
368
|
-
}
|
|
369
|
-
static get events() {
|
|
370
|
-
return [{
|
|
371
|
-
"method": "filterChangeEvent",
|
|
372
|
-
"name": "filterChangeEvent",
|
|
373
|
-
"bubbles": true,
|
|
374
|
-
"cancelable": true,
|
|
375
|
-
"composed": true,
|
|
376
|
-
"docs": {
|
|
377
|
-
"tags": [],
|
|
378
|
-
"text": ""
|
|
379
|
-
},
|
|
380
|
-
"complexType": {
|
|
381
|
-
"original": "FilterChangeEvent",
|
|
382
|
-
"resolved": "FilterChangeEvent",
|
|
383
|
-
"references": {
|
|
384
|
-
"FilterChangeEvent": {
|
|
385
|
-
"location": "local"
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
}, {
|
|
390
|
-
"method": "toggleFilter",
|
|
391
|
-
"name": "toggleFilter",
|
|
392
|
-
"bubbles": true,
|
|
393
|
-
"cancelable": true,
|
|
394
|
-
"composed": true,
|
|
395
|
-
"docs": {
|
|
396
|
-
"tags": [],
|
|
397
|
-
"text": ""
|
|
398
|
-
},
|
|
399
|
-
"complexType": {
|
|
400
|
-
"original": "boolean",
|
|
401
|
-
"resolved": "boolean",
|
|
402
|
-
"references": {}
|
|
403
|
-
}
|
|
404
|
-
}];
|
|
405
|
-
}
|
|
406
|
-
static get elementRef() { return "el"; }
|
|
407
|
-
static get listeners() {
|
|
408
|
-
return [{
|
|
409
|
-
"name": "closeFilter",
|
|
410
|
-
"method": "handleCloseFilter",
|
|
411
|
-
"target": undefined,
|
|
412
|
-
"capture": false,
|
|
413
|
-
"passive": false
|
|
414
|
-
}];
|
|
415
|
-
}
|
|
416
|
-
}
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { h, Host } from '@stencil/core';
|
|
3
|
+
export class TttxFilter {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.filterKey = undefined;
|
|
6
|
+
this.filterOptions = [
|
|
7
|
+
{ optionIcon: 'cancel', optionIconColor: 'darkred', optionText: 'Expired' },
|
|
8
|
+
{ optionIcon: 'warning', optionIconColor: 'orange', optionText: 'Expiring soon' },
|
|
9
|
+
{ optionIcon: 'check_circle', optionIconColor: 'green', optionText: 'Active' },
|
|
10
|
+
];
|
|
11
|
+
this.showSelectAll = true;
|
|
12
|
+
this.showSearchField = false;
|
|
13
|
+
this.showOptionIcons = true;
|
|
14
|
+
this.filterButtonStyle = 'list filter';
|
|
15
|
+
this.filterHeader = 'Qualification status';
|
|
16
|
+
this.defaultFilterOptions = undefined;
|
|
17
|
+
this.popoverWidth = '193px';
|
|
18
|
+
this.showPopover = false;
|
|
19
|
+
this.displayedFilterSettings = undefined;
|
|
20
|
+
this.selectedFilters = undefined;
|
|
21
|
+
this.filterSearchTerm = '';
|
|
22
|
+
this.allSelected = undefined;
|
|
23
|
+
}
|
|
24
|
+
handleCloseFilter() {
|
|
25
|
+
this.showPopover = false;
|
|
26
|
+
}
|
|
27
|
+
emitFilterEvent() {
|
|
28
|
+
this.filterChangeEvent.emit({
|
|
29
|
+
selectedFilters: this.selectedFilters,
|
|
30
|
+
filterKey: this.filterKey,
|
|
31
|
+
allSelected: this.allSelected,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
onFilterButtonClick() {
|
|
35
|
+
this.togglePopover();
|
|
36
|
+
}
|
|
37
|
+
onCloseButtonClick() {
|
|
38
|
+
this.togglePopover();
|
|
39
|
+
}
|
|
40
|
+
onApplyFilterButtonClick() {
|
|
41
|
+
this.emitFilterEvent();
|
|
42
|
+
this.togglePopover();
|
|
43
|
+
}
|
|
44
|
+
onFilterOptionSelected(selectedOption) {
|
|
45
|
+
this.allSelected = false;
|
|
46
|
+
if (this.selectedFilters.includes(selectedOption)) {
|
|
47
|
+
this.selectedFilters = this.selectedFilters.filter((filter) => filter != selectedOption);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this.selectedFilters = [...this.selectedFilters, selectedOption];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
componentWillLoad() {
|
|
54
|
+
this.displayedFilterSettings = this.parseFilterOptions();
|
|
55
|
+
if (this.defaultFilterOptions !== undefined) {
|
|
56
|
+
const parsedDefaultFilterOptions = this.parseDefaultFilterOptions();
|
|
57
|
+
this.selectedFilters = parsedDefaultFilterOptions;
|
|
58
|
+
let allSelected = true;
|
|
59
|
+
this.parseFilterOptions().map(filterOption => {
|
|
60
|
+
if (!this.selectedFilters.includes(filterOption.optionText)) {
|
|
61
|
+
allSelected = false;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
this.allSelected = allSelected;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this.allSelected = true;
|
|
68
|
+
this.selectedFilters = this.displayedFilterSettings.map((filterOption) => filterOption.optionText);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
togglePopover() {
|
|
72
|
+
this.showPopover = !this.showPopover;
|
|
73
|
+
this.toggleFilter.emit(this.showPopover);
|
|
74
|
+
// if(!this.showPopover) {
|
|
75
|
+
// // this._focussedElementIndex = -1;
|
|
76
|
+
// }
|
|
77
|
+
}
|
|
78
|
+
// Commented out keyboard interaction for now
|
|
79
|
+
// @Listen('keyup')
|
|
80
|
+
// handleKeyUp(event: KeyboardEvent) {
|
|
81
|
+
// const keyboardEventValue = event.key;
|
|
82
|
+
// if (document.activeElement.id != `filter__${this.filterKey}`) return;
|
|
83
|
+
// if (event.key == " " || event.code == "Space" || event.keyCode == 32) {
|
|
84
|
+
// if (this._focussedElementIndex == 0) {
|
|
85
|
+
// this.onSelectAllClick()
|
|
86
|
+
// } else {
|
|
87
|
+
// const options = this.el.shadowRoot.querySelectorAll('.filter-option') as HTMLElement[];
|
|
88
|
+
// this.onFilterOptionSelected(options[this._focussedElementIndex].textContent)
|
|
89
|
+
// }
|
|
90
|
+
// return;
|
|
91
|
+
// }
|
|
92
|
+
// switch (keyboardEventValue) {
|
|
93
|
+
// case 'Enter':
|
|
94
|
+
// if(!this.showPopover) {
|
|
95
|
+
// this.showPopover=true
|
|
96
|
+
// } else {
|
|
97
|
+
// this.emitFilterEvent()
|
|
98
|
+
// }
|
|
99
|
+
// break;
|
|
100
|
+
// case 'Escape':
|
|
101
|
+
// this.showPopover = false;
|
|
102
|
+
// this._focussedElementIndex = -1;
|
|
103
|
+
// break;
|
|
104
|
+
// case 'ArrowDown':
|
|
105
|
+
// this.showPopover = true;
|
|
106
|
+
// if (this._focussedElementIndex == -1) {
|
|
107
|
+
// this._focussedElementIndex = 0;
|
|
108
|
+
// } else {
|
|
109
|
+
// const options = this.el.shadowRoot.querySelectorAll('.filter-option') as HTMLElement[];
|
|
110
|
+
// const currentOption = options[this._focussedElementIndex] as HTMLElement;
|
|
111
|
+
// currentOption.blur();
|
|
112
|
+
// // options[this._focussedElementIndex].focus();
|
|
113
|
+
// this._focussedElementIndex + 1 < options.length ? this._focussedElementIndex++ : (this._focussedElementIndex = 0);
|
|
114
|
+
// }
|
|
115
|
+
// break;
|
|
116
|
+
// case 'ArrowUp':
|
|
117
|
+
// if (this._focussedElementIndex == -1) {
|
|
118
|
+
// this.showPopover = true;
|
|
119
|
+
// this._focussedElementIndex = 0;
|
|
120
|
+
// } else {
|
|
121
|
+
// const options = this.el.shadowRoot.querySelectorAll('.filter-option') as HTMLElement[];
|
|
122
|
+
// const currentOption = options[this._focussedElementIndex] as HTMLElement;
|
|
123
|
+
// currentOption.blur();
|
|
124
|
+
// // options[this._focussedElementIndex].focus();
|
|
125
|
+
// this._focussedElementIndex > 0 ? this._focussedElementIndex-- : (this._focussedElementIndex = options.length - 1);
|
|
126
|
+
// }
|
|
127
|
+
// break;
|
|
128
|
+
// }
|
|
129
|
+
// }
|
|
130
|
+
handleFilterChange(event) {
|
|
131
|
+
const target = event.target;
|
|
132
|
+
this.filterSearchTerm = target.value;
|
|
133
|
+
const filteredResults = this.parseFilterOptions().filter((filterOption) => {
|
|
134
|
+
const lowercaseOption = filterOption.optionText.toLowerCase();
|
|
135
|
+
const filterTerm = this.filterSearchTerm.toLowerCase();
|
|
136
|
+
return lowercaseOption.includes(filterTerm);
|
|
137
|
+
});
|
|
138
|
+
this.displayedFilterSettings = filteredResults;
|
|
139
|
+
}
|
|
140
|
+
onSelectAllClick() {
|
|
141
|
+
this.allSelected = !this.allSelected;
|
|
142
|
+
if (this.allSelected) {
|
|
143
|
+
this.displayedFilterSettings.forEach((filterSetting) => { this.selectedFilters = [...this.selectedFilters, filterSetting.optionText]; });
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
this.selectedFilters = [];
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
getFilterButtonClassName(buttonStyle) {
|
|
150
|
+
switch (buttonStyle) {
|
|
151
|
+
case 'table icon': {
|
|
152
|
+
return '--table-icon';
|
|
153
|
+
}
|
|
154
|
+
case 'list icon': {
|
|
155
|
+
return '--list-icon';
|
|
156
|
+
}
|
|
157
|
+
default: {
|
|
158
|
+
return '';
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
parseFilterOptions() {
|
|
163
|
+
return typeof this.filterOptions === 'string' ? JSON.parse(this.filterOptions) : this.filterOptions;
|
|
164
|
+
}
|
|
165
|
+
parseDefaultFilterOptions() {
|
|
166
|
+
return typeof this.defaultFilterOptions === 'string' ? JSON.parse(this.defaultFilterOptions) : this.defaultFilterOptions;
|
|
167
|
+
}
|
|
168
|
+
render() {
|
|
169
|
+
const filterPopoverContainerClassNameModifier = this.showSearchField ? '--with-search-field' : '';
|
|
170
|
+
const selectAllCheckboxIcon = this.allSelected ? 'check_box' : 'check_box_outline_blank';
|
|
171
|
+
const selectAllCheckboxColor = this.allSelected ? 'blue' : 'grey';
|
|
172
|
+
const buttonStyleClassNameModifier = this.getFilterButtonClassName(this.filterButtonStyle);
|
|
173
|
+
const filterKey = `filter__${this.filterKey}`;
|
|
174
|
+
return (h(Host, { id: filterKey }, h("div", { class: 'filter-container' }, h("button", { class: `filter-button ${buttonStyleClassNameModifier}`, type: 'button', onClick: this.onFilterButtonClick.bind(this) }, h("tttx-icon_1_9_103", { icon: 'filter_list', class: 'filter-icon', color: 'black' }), "Filter"), this.showPopover && (h("div", { class: `filter-popover-container ${filterPopoverContainerClassNameModifier}`, style: { width: this.popoverWidth } }, h("div", { class: 'filter-header' }, this.filterHeader), this.showSearchField ? (h("div", { class: 'search-field-container' }, h("tttx-icon_1_9_103", { icon: 'search', class: 'search-icon' }), h("input", { type: 'text', class: 'search-input', placeholder: 'Search', value: this.filterSearchTerm, onInput: this.handleFilterChange.bind(this) }))) : (''), h("div", { class: 'filter-options-container' }, this.showSelectAll ? (h("div", { class: 'filter-option', tabIndex: -1, onClick: this.onSelectAllClick.bind(this) }, h("tttx-icon_1_9_103", { icon: selectAllCheckboxIcon, color: selectAllCheckboxColor, class: 'select-all-icon' }), h("label", { class: 'filter-label' }, "Select all"))) : (''), this.displayedFilterSettings.map((option) => {
|
|
175
|
+
const checkboxIcon = this.selectedFilters.includes(option.optionText) ? 'check_box' : 'check_box_outline_blank';
|
|
176
|
+
const checkboxColor = this.selectedFilters.includes(option.optionText) ? 'blue' : 'grey';
|
|
177
|
+
return h("div", { class: 'filter-option', tabIndex: -1, onClick: () => this.onFilterOptionSelected(option.optionText), key: option.optionText }, h("tttx-icon_1_9_103", { icon: checkboxIcon, color: checkboxColor, class: 'checkbox-icon' }), this.showOptionIcons && h("tttx-icon_1_9_103", { icon: option.optionIcon, color: option.optionIconColor }), h("label", { class: 'filter-label' }, option.optionText));
|
|
178
|
+
})), h("div", { class: 'filter-popover-button-container' }, h("button", { type: 'button', class: 'close-button', onClick: this.onCloseButtonClick.bind(this) }, "Close"), h("button", { type: 'button', class: 'apply-button', onClick: this.onApplyFilterButtonClick.bind(this) }, "Apply")))))));
|
|
179
|
+
}
|
|
180
|
+
static get is() { return "tttx-filter_1_9_103"; }
|
|
181
|
+
static get encapsulation() { return "shadow"; }
|
|
182
|
+
static get originalStyleUrls() {
|
|
183
|
+
return {
|
|
184
|
+
"$": ["tttx-filter.scss"]
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
static get styleUrls() {
|
|
188
|
+
return {
|
|
189
|
+
"$": ["tttx-filter.css"]
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
static get properties() {
|
|
193
|
+
return {
|
|
194
|
+
"filterKey": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"mutable": false,
|
|
197
|
+
"complexType": {
|
|
198
|
+
"original": "string",
|
|
199
|
+
"resolved": "string",
|
|
200
|
+
"references": {}
|
|
201
|
+
},
|
|
202
|
+
"required": false,
|
|
203
|
+
"optional": false,
|
|
204
|
+
"docs": {
|
|
205
|
+
"tags": [],
|
|
206
|
+
"text": ""
|
|
207
|
+
},
|
|
208
|
+
"attribute": "filter-key",
|
|
209
|
+
"reflect": false
|
|
210
|
+
},
|
|
211
|
+
"filterOptions": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"mutable": false,
|
|
214
|
+
"complexType": {
|
|
215
|
+
"original": "string | FilterSettings[]",
|
|
216
|
+
"resolved": "FilterSettings[] | string",
|
|
217
|
+
"references": {
|
|
218
|
+
"FilterSettings": {
|
|
219
|
+
"location": "local"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"required": false,
|
|
224
|
+
"optional": false,
|
|
225
|
+
"docs": {
|
|
226
|
+
"tags": [],
|
|
227
|
+
"text": ""
|
|
228
|
+
},
|
|
229
|
+
"attribute": "filter-options",
|
|
230
|
+
"reflect": false,
|
|
231
|
+
"defaultValue": "[\n { optionIcon: 'cancel', optionIconColor: 'darkred', optionText: 'Expired' },\n { optionIcon: 'warning', optionIconColor: 'orange', optionText: 'Expiring soon' },\n { optionIcon: 'check_circle', optionIconColor: 'green', optionText: 'Active' },\n ]"
|
|
232
|
+
},
|
|
233
|
+
"showSelectAll": {
|
|
234
|
+
"type": "boolean",
|
|
235
|
+
"mutable": false,
|
|
236
|
+
"complexType": {
|
|
237
|
+
"original": "boolean",
|
|
238
|
+
"resolved": "boolean",
|
|
239
|
+
"references": {}
|
|
240
|
+
},
|
|
241
|
+
"required": false,
|
|
242
|
+
"optional": false,
|
|
243
|
+
"docs": {
|
|
244
|
+
"tags": [],
|
|
245
|
+
"text": ""
|
|
246
|
+
},
|
|
247
|
+
"attribute": "show-select-all",
|
|
248
|
+
"reflect": false,
|
|
249
|
+
"defaultValue": "true"
|
|
250
|
+
},
|
|
251
|
+
"showSearchField": {
|
|
252
|
+
"type": "boolean",
|
|
253
|
+
"mutable": false,
|
|
254
|
+
"complexType": {
|
|
255
|
+
"original": "boolean",
|
|
256
|
+
"resolved": "boolean",
|
|
257
|
+
"references": {}
|
|
258
|
+
},
|
|
259
|
+
"required": false,
|
|
260
|
+
"optional": false,
|
|
261
|
+
"docs": {
|
|
262
|
+
"tags": [],
|
|
263
|
+
"text": ""
|
|
264
|
+
},
|
|
265
|
+
"attribute": "show-search-field",
|
|
266
|
+
"reflect": false,
|
|
267
|
+
"defaultValue": "false"
|
|
268
|
+
},
|
|
269
|
+
"showOptionIcons": {
|
|
270
|
+
"type": "boolean",
|
|
271
|
+
"mutable": false,
|
|
272
|
+
"complexType": {
|
|
273
|
+
"original": "boolean",
|
|
274
|
+
"resolved": "boolean",
|
|
275
|
+
"references": {}
|
|
276
|
+
},
|
|
277
|
+
"required": false,
|
|
278
|
+
"optional": false,
|
|
279
|
+
"docs": {
|
|
280
|
+
"tags": [],
|
|
281
|
+
"text": ""
|
|
282
|
+
},
|
|
283
|
+
"attribute": "show-option-icons",
|
|
284
|
+
"reflect": false,
|
|
285
|
+
"defaultValue": "true"
|
|
286
|
+
},
|
|
287
|
+
"filterButtonStyle": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"mutable": false,
|
|
290
|
+
"complexType": {
|
|
291
|
+
"original": "'list filter' | 'list icon' | 'table icon'",
|
|
292
|
+
"resolved": "\"list filter\" | \"list icon\" | \"table icon\"",
|
|
293
|
+
"references": {}
|
|
294
|
+
},
|
|
295
|
+
"required": false,
|
|
296
|
+
"optional": false,
|
|
297
|
+
"docs": {
|
|
298
|
+
"tags": [],
|
|
299
|
+
"text": ""
|
|
300
|
+
},
|
|
301
|
+
"attribute": "filter-button-style",
|
|
302
|
+
"reflect": false,
|
|
303
|
+
"defaultValue": "'list filter'"
|
|
304
|
+
},
|
|
305
|
+
"filterHeader": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"mutable": false,
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "string",
|
|
310
|
+
"resolved": "string",
|
|
311
|
+
"references": {}
|
|
312
|
+
},
|
|
313
|
+
"required": false,
|
|
314
|
+
"optional": false,
|
|
315
|
+
"docs": {
|
|
316
|
+
"tags": [],
|
|
317
|
+
"text": ""
|
|
318
|
+
},
|
|
319
|
+
"attribute": "filter-header",
|
|
320
|
+
"reflect": false,
|
|
321
|
+
"defaultValue": "'Qualification status'"
|
|
322
|
+
},
|
|
323
|
+
"defaultFilterOptions": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"mutable": false,
|
|
326
|
+
"complexType": {
|
|
327
|
+
"original": "string[] | string",
|
|
328
|
+
"resolved": "string | string[]",
|
|
329
|
+
"references": {}
|
|
330
|
+
},
|
|
331
|
+
"required": false,
|
|
332
|
+
"optional": false,
|
|
333
|
+
"docs": {
|
|
334
|
+
"tags": [],
|
|
335
|
+
"text": ""
|
|
336
|
+
},
|
|
337
|
+
"attribute": "default-filter-options",
|
|
338
|
+
"reflect": false
|
|
339
|
+
},
|
|
340
|
+
"popoverWidth": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"mutable": false,
|
|
343
|
+
"complexType": {
|
|
344
|
+
"original": "string",
|
|
345
|
+
"resolved": "string",
|
|
346
|
+
"references": {}
|
|
347
|
+
},
|
|
348
|
+
"required": false,
|
|
349
|
+
"optional": false,
|
|
350
|
+
"docs": {
|
|
351
|
+
"tags": [],
|
|
352
|
+
"text": ""
|
|
353
|
+
},
|
|
354
|
+
"attribute": "popover-width",
|
|
355
|
+
"reflect": false,
|
|
356
|
+
"defaultValue": "'193px'"
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
static get states() {
|
|
361
|
+
return {
|
|
362
|
+
"showPopover": {},
|
|
363
|
+
"displayedFilterSettings": {},
|
|
364
|
+
"selectedFilters": {},
|
|
365
|
+
"filterSearchTerm": {},
|
|
366
|
+
"allSelected": {}
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
static get events() {
|
|
370
|
+
return [{
|
|
371
|
+
"method": "filterChangeEvent",
|
|
372
|
+
"name": "filterChangeEvent",
|
|
373
|
+
"bubbles": true,
|
|
374
|
+
"cancelable": true,
|
|
375
|
+
"composed": true,
|
|
376
|
+
"docs": {
|
|
377
|
+
"tags": [],
|
|
378
|
+
"text": ""
|
|
379
|
+
},
|
|
380
|
+
"complexType": {
|
|
381
|
+
"original": "FilterChangeEvent",
|
|
382
|
+
"resolved": "FilterChangeEvent",
|
|
383
|
+
"references": {
|
|
384
|
+
"FilterChangeEvent": {
|
|
385
|
+
"location": "local"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}, {
|
|
390
|
+
"method": "toggleFilter",
|
|
391
|
+
"name": "toggleFilter",
|
|
392
|
+
"bubbles": true,
|
|
393
|
+
"cancelable": true,
|
|
394
|
+
"composed": true,
|
|
395
|
+
"docs": {
|
|
396
|
+
"tags": [],
|
|
397
|
+
"text": ""
|
|
398
|
+
},
|
|
399
|
+
"complexType": {
|
|
400
|
+
"original": "boolean",
|
|
401
|
+
"resolved": "boolean",
|
|
402
|
+
"references": {}
|
|
403
|
+
}
|
|
404
|
+
}];
|
|
405
|
+
}
|
|
406
|
+
static get elementRef() { return "el"; }
|
|
407
|
+
static get listeners() {
|
|
408
|
+
return [{
|
|
409
|
+
"name": "closeFilter",
|
|
410
|
+
"method": "handleCloseFilter",
|
|
411
|
+
"target": undefined,
|
|
412
|
+
"capture": false,
|
|
413
|
+
"passive": false
|
|
414
|
+
}];
|
|
415
|
+
}
|
|
416
|
+
}
|