@sankhyalabs/ezui 5.22.0-dev.12 → 5.22.0-dev.120
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/{CSSVarsUtils-10c9d5b4.js → CSSVarsUtils-f20973d1.js} +1 -0
- package/dist/cjs/DataBinder-b9973a19.js +474 -0
- package/dist/cjs/FocusResolver-885f2173.js +35 -0
- package/dist/cjs/FormLayout-c2451c7f.js +7 -0
- package/dist/cjs/{constants-2714478b.js → constants-569271bc.js} +4 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +6 -4
- package/dist/cjs/ez-badge.cjs.entry.js +14 -2
- package/dist/cjs/ez-button.cjs.entry.js +11 -5
- package/dist/cjs/ez-card-item_2.cjs.entry.js +270 -0
- package/dist/cjs/ez-chart.cjs.entry.js +3 -3
- package/dist/cjs/ez-check.cjs.entry.js +18 -10
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +3 -2
- package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +388 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +79 -156
- package/dist/cjs/ez-date-input.cjs.entry.js +16 -19
- package/dist/cjs/ez-date-time-input.cjs.entry.js +15 -20
- package/dist/cjs/ez-dialog.cjs.entry.js +18 -8
- package/dist/cjs/ez-double-list.cjs.entry.js +287 -0
- package/dist/cjs/ez-dropdown.cjs.entry.js +14 -8
- package/dist/cjs/ez-filter-input.cjs.entry.js +129 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +41 -27
- package/dist/cjs/ez-form.cjs.entry.js +34 -327
- package/dist/cjs/ez-grid.cjs.entry.js +15146 -69779
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +258 -211
- package/dist/cjs/ez-modal-container.cjs.entry.js +7 -3
- package/dist/cjs/ez-modal.cjs.entry.js +17 -4
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -2
- package/dist/cjs/ez-number-input.cjs.entry.js +16 -3
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +209 -0
- package/dist/cjs/ez-popup.cjs.entry.js +29 -3
- package/dist/cjs/ez-scroller_2.cjs.entry.js +3 -3
- package/dist/cjs/ez-search-plus.cjs.entry.js +398 -0
- package/dist/cjs/ez-search-result-list.cjs.entry.js +97 -0
- package/dist/cjs/ez-search.cjs.entry.js +124 -191
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +2 -2
- package/dist/cjs/ez-split-item.cjs.entry.js +8 -4
- package/dist/cjs/ez-split-panel.cjs.entry.js +68 -6
- package/dist/cjs/ez-text-area.cjs.entry.js +91 -8
- package/dist/cjs/ez-text-input.cjs.entry.js +135 -30
- package/dist/cjs/ez-time-input.cjs.entry.js +9 -2
- package/dist/cjs/ez-tooltip.cjs.entry.js +135 -0
- package/dist/cjs/ez-tree.cjs.entry.js +5 -4
- package/dist/cjs/ezListHelper-0d3970b4.js +90 -0
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/filter-column.cjs.entry.js +10 -47
- package/dist/cjs/floating-ui.dom.esm-017acce4.js +1404 -0
- package/dist/cjs/index-9e5554cb.js +32 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/searchFormatters-b7e1ed1e.js +23 -0
- package/dist/cjs/{ICustomRender-6fafffce.js → types-6a5df0c7.js} +8 -0
- package/dist/collection/collection-manifest.json +20 -2
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +3 -2
- package/dist/collection/components/ez-badge/ez-badge.css +12 -1
- package/dist/collection/components/ez-badge/ez-badge.js +31 -1
- package/dist/collection/components/ez-button/ez-button.css +24 -14
- package/dist/collection/components/ez-button/ez-button.js +12 -6
- package/dist/collection/components/ez-card-item/ez-card-item.css +58 -10
- package/dist/collection/components/ez-card-item/ez-card-item.js +30 -3
- package/dist/collection/components/ez-chart/ez-chart.js +2 -2
- package/dist/collection/components/ez-chart/interfaces/ChartTypeValue.js +1 -0
- package/dist/collection/components/ez-chart/types/BaseHighChartsRender.js +3 -3
- package/dist/collection/components/ez-check/ez-check.css +10 -6
- package/dist/collection/components/ez-check/ez-check.js +34 -9
- package/dist/collection/components/ez-chip/ez-chip.css +5 -1
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +2 -2
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.css +205 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js +426 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +8 -246
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +139 -165
- package/dist/collection/components/ez-date-input/ez-date-input.css +1 -1
- package/dist/collection/components/ez-date-input/ez-date-input.js +58 -19
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +1 -1
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +57 -20
- package/dist/collection/components/ez-dialog/ez-dialog.css +27 -24
- package/dist/collection/components/ez-dialog/ez-dialog.js +18 -17
- package/dist/collection/components/ez-double-list/doubleListHelper.js +82 -0
- package/dist/collection/components/ez-double-list/ez-double-list.css +62 -0
- package/dist/collection/components/ez-double-list/ez-double-list.js +440 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.js +33 -8
- package/dist/collection/components/ez-filter-input/ez-filter-input.css +1 -1
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +35 -4
- package/dist/collection/components/ez-form/ez-form.js +32 -4
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +49 -6
- package/dist/collection/components/ez-form-view/ez-form-view.css +13 -2
- package/dist/collection/components/ez-form-view/ez-form-view.js +21 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +5 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +8 -4
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js +6 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +387 -73
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +170 -33
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js +2 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +248 -43
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +16 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +10 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +2 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +8 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.js +15 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +4 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +2 -0
- package/dist/collection/components/ez-grid/ez-grid.css +95 -10
- package/dist/collection/components/ez-grid/ez-grid.js +370 -12
- package/dist/collection/components/ez-grid/subcomponents/filter-column.css +4 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +9 -46
- package/dist/collection/components/ez-grid/utils/ColumnFilterManager.js +7 -54
- package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js +20 -4
- package/dist/collection/components/ez-icon/ez-icon.css +156 -149
- package/dist/collection/components/ez-list/ez-list.css +5 -4
- package/dist/collection/components/ez-list/ez-list.js +301 -212
- package/dist/collection/components/ez-list/ezListHelper.js +85 -0
- package/dist/collection/components/ez-modal/ez-modal.css +7 -2
- package/dist/collection/components/ez-modal/ez-modal.js +18 -5
- package/dist/collection/components/ez-modal-container/ez-modal-container.css +1 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +6 -2
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +3 -3
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +1 -1
- package/dist/collection/components/ez-number-input/ez-number-input.css +8 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js +67 -1
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.css +3 -0
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +434 -0
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +67 -0
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +527 -0
- package/dist/collection/components/ez-popup/ez-popup.css +8 -3
- package/dist/collection/components/ez-popup/ez-popup.js +48 -4
- package/dist/collection/components/ez-scroller/ez-scroller.css +4 -0
- package/dist/collection/components/ez-search/ez-search.css +2 -210
- package/dist/collection/components/ez-search/ez-search.js +223 -204
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.css +227 -0
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.js +289 -0
- package/dist/collection/components/ez-search/utils/searchFormatters.js +18 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.css +373 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.js +984 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.css +221 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +278 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +3 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +1 -1
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css +4 -1
- package/dist/collection/components/ez-skeleton/ez-skeleton.css +54 -34
- package/dist/collection/components/ez-split-button/ez-split-button.css +52 -14
- package/dist/collection/components/ez-split-button/ez-split-button.js +3 -3
- package/dist/collection/components/ez-split-panel/ez-split-panel.css +15 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +106 -5
- package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js +1 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +14 -2
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +22 -1
- package/dist/collection/components/ez-text-area/ez-text-area.css +78 -29
- package/dist/collection/components/ez-text-area/ez-text-area.js +151 -6
- package/dist/collection/components/ez-text-input/ez-text-input.css +126 -93
- package/dist/collection/components/ez-text-input/ez-text-input.js +216 -28
- package/dist/collection/components/ez-time-input/ez-time-input.js +43 -1
- package/dist/collection/components/ez-tooltip/ez-tooltip.css +61 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.js +310 -0
- package/dist/collection/components/ez-tree/ez-tree.js +21 -1
- package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +3 -3
- package/dist/collection/sw.js +46 -0
- package/dist/collection/utils/CSSVarsUtils.js +1 -0
- package/dist/collection/utils/FocusResolver.js +31 -0
- package/dist/collection/utils/constants.js +2 -0
- package/dist/collection/utils/form/DataBinder.js +65 -21
- package/dist/collection/utils/form/FormMetadata.js +2 -1
- package/dist/collection/utils/form/interfaces/FormLayout.js +5 -0
- package/dist/collection/utils/form/interfaces/index.js +1 -1
- package/dist/collection/utils/form/test/DataBinder.test.js +14 -0
- package/dist/collection/utils/index.js +2 -0
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
- package/dist/collection/utils/search/types.js +7 -0
- package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js +1 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +7 -1
- package/dist/custom-elements/index.d.ts +48 -0
- package/dist/custom-elements/index.js +21625 -72913
- package/dist/esm/{CSSVarsUtils-71ce76be.js → CSSVarsUtils-acba92d7.js} +1 -0
- package/dist/esm/DataBinder-1035e36f.js +470 -0
- package/dist/esm/FocusResolver-1ccbf850.js +33 -0
- package/dist/esm/FormLayout-54092963.js +7 -0
- package/dist/esm/constants-b036528f.js +7 -0
- package/dist/esm/ez-actions-button.entry.js +6 -4
- package/dist/esm/ez-badge.entry.js +14 -2
- package/dist/esm/ez-button.entry.js +11 -5
- package/dist/esm/ez-card-item_2.entry.js +265 -0
- package/dist/esm/ez-chart.entry.js +3 -3
- package/dist/esm/ez-check.entry.js +18 -10
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +3 -2
- package/dist/esm/ez-combo-box-list_3.entry.js +382 -0
- package/dist/esm/ez-combo-box.entry.js +80 -157
- package/dist/esm/ez-date-input.entry.js +16 -19
- package/dist/esm/ez-date-time-input.entry.js +15 -20
- package/dist/esm/ez-dialog.entry.js +19 -9
- package/dist/esm/ez-double-list.entry.js +283 -0
- package/dist/esm/ez-dropdown.entry.js +14 -8
- package/dist/esm/ez-filter-input.entry.js +125 -0
- package/dist/esm/ez-form-view.entry.js +42 -28
- package/dist/esm/ez-form.entry.js +33 -326
- package/dist/esm/ez-grid.entry.js +15145 -69778
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +258 -211
- package/dist/esm/ez-modal-container.entry.js +7 -3
- package/dist/esm/ez-modal.entry.js +17 -4
- package/dist/esm/ez-multi-selection-list.entry.js +2 -2
- package/dist/esm/ez-number-input.entry.js +16 -3
- package/dist/esm/ez-popover-plus_3.entry.js +203 -0
- package/dist/esm/ez-popup.entry.js +29 -3
- package/dist/esm/ez-scroller_2.entry.js +3 -3
- package/dist/esm/ez-search-plus.entry.js +394 -0
- package/dist/esm/ez-search-result-list.entry.js +93 -0
- package/dist/esm/ez-search.entry.js +125 -192
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-skeleton.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +2 -2
- package/dist/esm/ez-split-item.entry.js +8 -4
- package/dist/esm/ez-split-panel.entry.js +69 -7
- package/dist/esm/ez-text-area.entry.js +91 -8
- package/dist/esm/ez-text-input.entry.js +135 -30
- package/dist/esm/ez-time-input.entry.js +9 -2
- package/dist/esm/ez-tooltip.entry.js +131 -0
- package/dist/esm/ez-tree.entry.js +5 -4
- package/dist/esm/ezListHelper-00fb9b8d.js +87 -0
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/filter-column.entry.js +10 -47
- package/dist/esm/floating-ui.dom.esm-5d3da819.js +1398 -0
- package/dist/esm/index-5a720e56.js +32 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/searchFormatters-8229207e.js +20 -0
- package/dist/esm/{ICustomRender-875b5a40.js → types-6f6b2650.js} +9 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-000159dc.entry.js +1 -0
- package/dist/ezui/p-06f1b8e4.entry.js +1 -0
- package/dist/ezui/{p-044d46d5.entry.js → p-07594da0.entry.js} +1 -1
- package/dist/ezui/p-0cfbbe82.entry.js +1 -0
- package/dist/ezui/p-0f658cfd.entry.js +1 -0
- package/dist/ezui/p-15ea0c98.js +1 -0
- package/dist/ezui/p-173f68ea.js +1 -0
- package/dist/ezui/p-18e71523.entry.js +1 -0
- package/dist/ezui/p-19389207.entry.js +1 -0
- package/dist/ezui/p-1f7241cd.entry.js +1 -0
- package/dist/ezui/p-1fefb37a.entry.js +1 -0
- package/dist/ezui/p-2069c78a.entry.js +1 -0
- package/dist/ezui/{p-b2f6bc0a.entry.js → p-2f351332.entry.js} +1 -1
- package/dist/ezui/{p-82ac8b06.entry.js → p-2f77f563.entry.js} +1 -1
- package/dist/ezui/p-3eaa0f67.entry.js +1 -0
- package/dist/ezui/p-40a60148.js +1 -0
- package/dist/ezui/p-44b39e81.entry.js +1 -0
- package/dist/ezui/p-4d8afc8e.entry.js +1 -0
- package/dist/ezui/p-5895e687.js +1 -0
- package/dist/ezui/p-5b85d3de.entry.js +1 -0
- package/dist/ezui/p-5b8639c0.entry.js +1 -0
- package/dist/ezui/p-5eea9886.js +1 -0
- package/dist/ezui/p-6b3fddee.entry.js +1 -0
- package/dist/ezui/p-6ccfb01f.entry.js +1 -0
- package/dist/ezui/p-708b196e.entry.js +1 -0
- package/dist/ezui/p-72731b9b.entry.js +1 -0
- package/dist/ezui/p-80dfc50b.js +1 -0
- package/dist/ezui/p-81452714.entry.js +309 -0
- package/dist/ezui/p-88c615f0.entry.js +1 -0
- package/dist/ezui/p-8d9ab0b0.entry.js +1 -0
- package/dist/ezui/p-8f49705f.entry.js +1 -0
- package/dist/ezui/p-9066b0b0.entry.js +1 -0
- package/dist/ezui/p-90e91173.entry.js +1 -0
- package/dist/ezui/p-926a0bde.entry.js +1 -0
- package/dist/ezui/p-97d94ef3.entry.js +1 -0
- package/dist/ezui/p-9e95bfeb.entry.js +1 -0
- package/dist/ezui/p-a11827ca.entry.js +1 -0
- package/dist/ezui/p-b8344ae8.entry.js +1 -0
- package/dist/ezui/p-b9255e16.entry.js +1 -0
- package/dist/ezui/p-c2b1b592.entry.js +1 -0
- package/dist/ezui/p-c7035d65.entry.js +1 -0
- package/dist/ezui/p-cf33bc48.entry.js +1 -0
- package/dist/ezui/p-d2290004.entry.js +1 -0
- package/dist/ezui/p-dc628ed3.js +1 -0
- package/dist/ezui/p-ddb22a70.entry.js +1 -0
- package/dist/ezui/p-e07e4671.js +1 -0
- package/dist/ezui/p-e18c7afe.entry.js +1 -0
- package/dist/ezui/p-e5e911ef.entry.js +1 -0
- package/dist/ezui/p-ec7db713.js +1 -0
- package/dist/ezui/p-ed48a632.entry.js +1 -0
- package/dist/ezui/p-f6a88217.entry.js +1 -0
- package/dist/types/components/ez-badge/ez-badge.d.ts +5 -0
- package/dist/types/components/ez-button/ez-button.d.ts +2 -1
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +3 -3
- package/dist/types/components/ez-card-item/ez-card-item.d.ts +5 -0
- package/dist/types/components/ez-chart/interfaces/ChartAxis.d.ts +2 -0
- package/dist/types/components/ez-chart/interfaces/ChartTypeValue.d.ts +1 -0
- package/dist/types/components/ez-check/ez-check.d.ts +7 -2
- package/dist/types/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.d.ts +104 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +19 -15
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +12 -3
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +12 -3
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +3 -1
- package/dist/types/components/ez-double-list/doubleListHelper.d.ts +10 -0
- package/dist/types/components/ez-double-list/ez-double-list.d.ts +87 -0
- package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +4 -0
- package/dist/types/components/ez-dropdown/structure/DropdownItem.d.ts +1 -1
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +6 -1
- package/dist/types/components/ez-form/ez-form.d.ts +5 -1
- package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +7 -1
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +4 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +2 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.d.ts +2 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +75 -4
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +42 -6
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +26 -2
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +34 -7
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +4 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +2 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.d.ts +3 -0
- package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +59 -1
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +0 -11
- package/dist/types/components/ez-grid/utils/ColumnFilterManager.d.ts +1 -1
- package/dist/types/components/ez-grid/utils/InMemoryFilterColumnDataSource.d.ts +3 -0
- package/dist/types/components/ez-list/ez-list.d.ts +23 -2
- package/dist/types/components/ez-list/ezListHelper.d.ts +20 -0
- package/dist/types/components/ez-modal/ez-modal.d.ts +4 -1
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +2 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +12 -0
- package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +74 -0
- package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +91 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +10 -1
- package/dist/types/components/ez-search/ez-search.d.ts +36 -18
- package/dist/types/components/ez-search/subcomponent/search-list/search-list.d.ts +23 -0
- package/dist/types/components/ez-search/utils/searchFormatters.d.ts +2 -0
- package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +186 -0
- package/dist/types/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.d.ts +26 -0
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +1 -1
- package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +11 -0
- package/dist/types/components/ez-split-panel/interfaces/IPanelSizeInfo.d.ts +9 -0
- package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +5 -0
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +25 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +35 -3
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +8 -0
- package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +57 -0
- package/dist/types/components/ez-tree/ez-tree.d.ts +4 -0
- package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +1 -0
- package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +1 -0
- package/dist/types/components.d.ts +1233 -63
- package/dist/types/utils/FocusResolver.d.ts +5 -0
- package/dist/types/utils/constants.d.ts +2 -0
- package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +2 -0
- package/dist/types/utils/form/DataBinder.d.ts +7 -2
- package/dist/types/utils/form/interfaces/FormLayout.d.ts +4 -0
- package/dist/types/utils/form/interfaces/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/search/types.d.ts +12 -0
- package/dist/types/utils/validators/recordvalidator/IInvalidCells.d.ts +5 -0
- package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +1 -1
- package/package.json +12 -4
- package/react/components.d.ts +62 -54
- package/react/components.js +8 -0
- package/react/components.js.map +1 -1
- package/react/react-component-lib/createComponent.d.ts +1 -1
- package/react/react-component-lib/createComponent.js.map +1 -1
- package/react/react-component-lib/createOverlayComponent.js.map +1 -1
- package/react/react-component-lib/interfaces.js +1 -0
- package/react/react-component-lib/utils/attachProps.d.ts +1 -1
- package/react/react-component-lib/utils/attachProps.js.map +1 -1
- package/react/react-component-lib/utils/dev.js.map +1 -1
- package/react/react-component-lib/utils/index.d.ts +2 -2
- package/react/react-component-lib/utils/index.js.map +1 -1
- package/dist/cjs/RecordValidationProcessor-4c893e04.js +0 -102
- package/dist/cjs/ez-card-item_3.cjs.entry.js +0 -183
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +0 -206
- package/dist/esm/RecordValidationProcessor-b00b8b77.js +0 -99
- package/dist/esm/constants-4e0d35b7.js +0 -5
- package/dist/esm/ez-card-item_3.entry.js +0 -177
- package/dist/esm/ez-custom-form-input_2.entry.js +0 -201
- package/dist/ezui/p-04f24913.js +0 -1
- package/dist/ezui/p-05e1f4e7.js +0 -1
- package/dist/ezui/p-0ee0ac03.entry.js +0 -1
- package/dist/ezui/p-11b09aa1.entry.js +0 -1
- package/dist/ezui/p-1b08bf3c.entry.js +0 -1
- package/dist/ezui/p-24ca32a3.entry.js +0 -1
- package/dist/ezui/p-2af4e2de.entry.js +0 -1
- package/dist/ezui/p-30951bd7.entry.js +0 -1
- package/dist/ezui/p-3141ee18.entry.js +0 -1
- package/dist/ezui/p-31674f8e.entry.js +0 -1
- package/dist/ezui/p-33792b2b.entry.js +0 -1
- package/dist/ezui/p-36180f4d.entry.js +0 -1
- package/dist/ezui/p-3f8c33e0.entry.js +0 -1
- package/dist/ezui/p-4607fb89.js +0 -1
- package/dist/ezui/p-52100a6e.entry.js +0 -1
- package/dist/ezui/p-5517995b.entry.js +0 -1
- package/dist/ezui/p-5fefcdc9.entry.js +0 -1
- package/dist/ezui/p-615def37.entry.js +0 -304
- package/dist/ezui/p-752c4069.entry.js +0 -1
- package/dist/ezui/p-81cffa53.entry.js +0 -1
- package/dist/ezui/p-81f99ace.entry.js +0 -1
- package/dist/ezui/p-868b56f7.entry.js +0 -1
- package/dist/ezui/p-8eef0f70.entry.js +0 -1
- package/dist/ezui/p-9634631d.entry.js +0 -1
- package/dist/ezui/p-9a23d513.entry.js +0 -1
- package/dist/ezui/p-9aa27e69.entry.js +0 -1
- package/dist/ezui/p-9c2e2d68.entry.js +0 -1
- package/dist/ezui/p-9e11fc7b.js +0 -1
- package/dist/ezui/p-b0e71d23.entry.js +0 -1
- package/dist/ezui/p-c3b7a23e.entry.js +0 -1
- package/dist/ezui/p-cd1a2e6b.entry.js +0 -1
- package/dist/ezui/p-dbeee5aa.entry.js +0 -1
- package/dist/ezui/p-de870657.entry.js +0 -1
- package/dist/ezui/p-ee9315ff.entry.js +0 -1
- package/dist/ezui/p-f1c2c19e.entry.js +0 -1
- package/dist/ezui/p-f1c3f85d.entry.js +0 -1
- package/dist/ezui/p-f291db18.entry.js +0 -1
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-9e5554cb.js');
|
|
6
|
+
const core = require('@sankhyalabs/core');
|
|
7
|
+
require('./ApplicationUtils-c9d1205c.js');
|
|
8
|
+
const CSSVarsUtils = require('./CSSVarsUtils-f20973d1.js');
|
|
9
|
+
require('./DialogType-2114c337.js');
|
|
10
|
+
require('./CheckMode-ecb90b87.js');
|
|
11
|
+
const types = require('./types-6a5df0c7.js');
|
|
12
|
+
require('./FormLayout-c2451c7f.js');
|
|
13
|
+
|
|
14
|
+
const ezSearchPlusCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{margin-top:0px;box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}.ez-search-plus__container{display:flex;flex-grow:1;gap:3px}.ez-search-plus__text-input{--ez-text-input--border-top-left-radius:0px;--ez-text-input--border-bottom-left-radius:0px}.ez-search-plus__code-input-no-border{--ez-text-input--border-top-right-radius:0px;--ez-text-input--border-bottom-right-radius:0px}.ez-search-plus__code-input{max-width:85px}.ez-search-plus__code-input-full{width:100%}.description-input-container{width:100%}";
|
|
15
|
+
|
|
16
|
+
const EzSearchPlus = class {
|
|
17
|
+
constructor(hostRef) {
|
|
18
|
+
index.registerInstance(this, hostRef);
|
|
19
|
+
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
20
|
+
this.SEARCH_DESCRIPTION_TIMEOUT = 300;
|
|
21
|
+
this.INTERVAL_TO_RETRY_ASYNC_VALUE = 100;
|
|
22
|
+
this.value = undefined;
|
|
23
|
+
this.enabled = true;
|
|
24
|
+
this.disableCodeInput = false;
|
|
25
|
+
this.disableDescriptionInput = false;
|
|
26
|
+
this.label = undefined;
|
|
27
|
+
this.codLabel = undefined;
|
|
28
|
+
this.hideDescriptionInput = false;
|
|
29
|
+
this.canShowError = true;
|
|
30
|
+
this.errorMessage = undefined;
|
|
31
|
+
this.mode = "regular";
|
|
32
|
+
this.contextProperties = undefined;
|
|
33
|
+
this.optionLoader = undefined;
|
|
34
|
+
this.showOptionValue = true;
|
|
35
|
+
this.stopPropagateEnterKeyEvent = false;
|
|
36
|
+
this.autoFocus = false;
|
|
37
|
+
this.showSelectedValue = true;
|
|
38
|
+
this.suppressEmptyOption = false;
|
|
39
|
+
this.hideErrorOnFocusOut = true;
|
|
40
|
+
this.listOptionsPosition = undefined;
|
|
41
|
+
this.isTextSearch = false;
|
|
42
|
+
this.ignoreLimitCharsToSearch = false;
|
|
43
|
+
this.suppressSearch = false;
|
|
44
|
+
this.suppressPreLoad = true;
|
|
45
|
+
this.ensureClearButtonVisible = false;
|
|
46
|
+
this.descriptionValue = "";
|
|
47
|
+
this.codeValue = "";
|
|
48
|
+
this.isLoadingDescription = false;
|
|
49
|
+
this.searchDescriptionIsOpen = false;
|
|
50
|
+
this.visibleOptions = undefined;
|
|
51
|
+
this.showLoading = true;
|
|
52
|
+
}
|
|
53
|
+
async observeValue(newValue, oldValue) {
|
|
54
|
+
const newNormalizedValue = this.normalizeValueToCodeValue(newValue);
|
|
55
|
+
const oldNormalizedValue = this.normalizeValueToCodeValue(oldValue);
|
|
56
|
+
if (newNormalizedValue === oldNormalizedValue) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (newNormalizedValue === undefined) {
|
|
60
|
+
this.codeValue = undefined;
|
|
61
|
+
this.descriptionValue = undefined;
|
|
62
|
+
this.ezChange.emit(undefined);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
this.codeValue = newNormalizedValue;
|
|
66
|
+
try {
|
|
67
|
+
this.descriptionValue = await this.normalizeCodeToDescriptionValue(newValue);
|
|
68
|
+
if (this.descriptionValue === null || this.descriptionValue === undefined) {
|
|
69
|
+
throw new Error("Valor não encontrado!");
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
this.value = undefined;
|
|
74
|
+
console.warn("[EzSearchPlus] Erro ao obter descrição do registro.", err);
|
|
75
|
+
throw err;
|
|
76
|
+
}
|
|
77
|
+
this.value = this.buildCurrentValue();
|
|
78
|
+
this.ezChange.emit(this.value);
|
|
79
|
+
}
|
|
80
|
+
canShowLoadSpinDescription() {
|
|
81
|
+
return this.isLoadingDescription;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Aplica o foco no campo.
|
|
85
|
+
*/
|
|
86
|
+
async setFocus(options) {
|
|
87
|
+
var _a;
|
|
88
|
+
if (this.disableCodeInput) {
|
|
89
|
+
(_a = this._textInputDescriptionValue) === null || _a === void 0 ? void 0 : _a.setFocus(options);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (this._latestFocusedInputElement) {
|
|
93
|
+
this._latestFocusedInputElement.setFocus(options);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this._textInputCodeValue.setFocus(options);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Obtém o valor do componente só após a compo de apresentação
|
|
100
|
+
* ter sido resolvido pelo option loader quando necessário
|
|
101
|
+
*/
|
|
102
|
+
async getValueAsync() {
|
|
103
|
+
if (!this.isLoadingDescription) {
|
|
104
|
+
const currentOpt = this.buildCurrentValue();
|
|
105
|
+
return new Promise(resolve => resolve(currentOpt));
|
|
106
|
+
}
|
|
107
|
+
return new Promise(resolve => {
|
|
108
|
+
let id = setInterval(() => {
|
|
109
|
+
if (!this.isLoadingDescription) {
|
|
110
|
+
clearInterval(id);
|
|
111
|
+
const currentOpt = this.buildCurrentValue();
|
|
112
|
+
resolve(currentOpt);
|
|
113
|
+
}
|
|
114
|
+
}, this.INTERVAL_TO_RETRY_ASYNC_VALUE);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Limpa o valor do campo de pesquisa
|
|
119
|
+
*/
|
|
120
|
+
async clearValue() {
|
|
121
|
+
this.clearSearch();
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Remove o foco do campo.
|
|
125
|
+
*/
|
|
126
|
+
async setBlur() {
|
|
127
|
+
var _a, _b;
|
|
128
|
+
(_a = this._textInputCodeValue) === null || _a === void 0 ? void 0 : _a.setBlur();
|
|
129
|
+
(_b = this._textInputDescriptionValue) === null || _b === void 0 ? void 0 : _b.setBlur();
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Retorna se o conteúdo é inválido.
|
|
133
|
+
*/
|
|
134
|
+
async isInvalid() {
|
|
135
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
136
|
+
}
|
|
137
|
+
componentWillLoad() {
|
|
138
|
+
if (this.value && core.StringUtils.isEmpty(this.codeValue)) {
|
|
139
|
+
this.observeValue(this.value, undefined);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
componentDidLoad() {
|
|
143
|
+
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this.el, this._textInputCodeValue);
|
|
144
|
+
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this.el, this._textInputDescriptionValue);
|
|
145
|
+
this.initKeyboardManager();
|
|
146
|
+
if (this.autoFocus) {
|
|
147
|
+
requestAnimationFrame(() => {
|
|
148
|
+
this.setFocus({ selectText: true });
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
clearSearch() {
|
|
153
|
+
this.value = null;
|
|
154
|
+
}
|
|
155
|
+
getCodLabel() {
|
|
156
|
+
var _a;
|
|
157
|
+
if (this.hideDescriptionInput) {
|
|
158
|
+
return this.label;
|
|
159
|
+
}
|
|
160
|
+
return (_a = this.codLabel) !== null && _a !== void 0 ? _a : "Cód.";
|
|
161
|
+
}
|
|
162
|
+
async normalizeCodeToDescriptionValue(valueToNormalize) {
|
|
163
|
+
if (!valueToNormalize) {
|
|
164
|
+
return "";
|
|
165
|
+
}
|
|
166
|
+
if (typeof valueToNormalize == 'string') {
|
|
167
|
+
try {
|
|
168
|
+
valueToNormalize = JSON.parse(valueToNormalize);
|
|
169
|
+
if ((valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.value) && !(valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.label)) {
|
|
170
|
+
return await this.loadDescriptionValueByCode(valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.value);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch (e) {
|
|
174
|
+
return await this.loadDescriptionValueByCode(valueToNormalize);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
//Se é diferente de objeto, temos que resolver a descrição
|
|
178
|
+
if (typeof valueToNormalize != 'object') {
|
|
179
|
+
return await this.loadDescriptionValueByCode(valueToNormalize);
|
|
180
|
+
}
|
|
181
|
+
return valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.label;
|
|
182
|
+
}
|
|
183
|
+
normalizeValueToCodeValue(valueToNormalize) {
|
|
184
|
+
if (!valueToNormalize) {
|
|
185
|
+
return undefined;
|
|
186
|
+
}
|
|
187
|
+
if (typeof valueToNormalize == 'string') {
|
|
188
|
+
try {
|
|
189
|
+
valueToNormalize = JSON.parse(valueToNormalize);
|
|
190
|
+
}
|
|
191
|
+
catch (e) {
|
|
192
|
+
return valueToNormalize;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (typeof valueToNormalize != 'object') {
|
|
196
|
+
return valueToNormalize;
|
|
197
|
+
}
|
|
198
|
+
return valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.value;
|
|
199
|
+
}
|
|
200
|
+
async loadDescriptionValueByCode(codeValue) {
|
|
201
|
+
if (!this.optionLoader) {
|
|
202
|
+
console.warn("optionLoader não definido");
|
|
203
|
+
return "";
|
|
204
|
+
}
|
|
205
|
+
try {
|
|
206
|
+
this.isLoadingDescription = true;
|
|
207
|
+
const searchArgument = { mode: types.SearchMode.LOAD_DESCRIPTION, argument: codeValue };
|
|
208
|
+
const loadedOption = await this.optionLoader(searchArgument);
|
|
209
|
+
if (!loadedOption) {
|
|
210
|
+
return "";
|
|
211
|
+
}
|
|
212
|
+
if (Array.isArray(loadedOption)) {
|
|
213
|
+
return loadedOption[0].label;
|
|
214
|
+
}
|
|
215
|
+
return loadedOption.label;
|
|
216
|
+
}
|
|
217
|
+
finally {
|
|
218
|
+
this.isLoadingDescription = false;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
handleCodeInputFocusOut() {
|
|
222
|
+
this.cancelSelection();
|
|
223
|
+
if (this.codeValue == this._textInputCodeValue.value)
|
|
224
|
+
return;
|
|
225
|
+
this.value = this._textInputCodeValue.value;
|
|
226
|
+
}
|
|
227
|
+
handleSearchClick() {
|
|
228
|
+
this.loadAdvancedSearch();
|
|
229
|
+
}
|
|
230
|
+
async loadAdvancedSearch() {
|
|
231
|
+
if (!this.optionLoader) {
|
|
232
|
+
console.warn("optionLoader não definido");
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
const searchArgument = { mode: types.SearchMode.ADVANCED, argument: "" };
|
|
236
|
+
let selectedItem = undefined;
|
|
237
|
+
try {
|
|
238
|
+
selectedItem = await this.optionLoader(searchArgument, this.contextProperties);
|
|
239
|
+
}
|
|
240
|
+
catch (ignore) { }
|
|
241
|
+
if (!selectedItem)
|
|
242
|
+
return;
|
|
243
|
+
this.value = selectedItem;
|
|
244
|
+
}
|
|
245
|
+
buildCurrentValue() {
|
|
246
|
+
if (core.StringUtils.isEmpty(this.codeValue)) {
|
|
247
|
+
return undefined;
|
|
248
|
+
}
|
|
249
|
+
return {
|
|
250
|
+
value: this.codeValue,
|
|
251
|
+
label: this.descriptionValue
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
async handleTextInputChangeHandler(event) {
|
|
255
|
+
if (!this.searchDescriptionIsOpen) {
|
|
256
|
+
this._popover.showUnder(this.el);
|
|
257
|
+
}
|
|
258
|
+
const argument = event.target.value;
|
|
259
|
+
await this.debounceLoaderOptions(argument);
|
|
260
|
+
}
|
|
261
|
+
async debounceLoaderOptions(argument) {
|
|
262
|
+
if (this._debounceSearch)
|
|
263
|
+
clearTimeout(this._debounceSearch);
|
|
264
|
+
return new Promise((resolve) => {
|
|
265
|
+
this._debounceSearch = setTimeout(async () => {
|
|
266
|
+
await this.processOptionsLoader(argument);
|
|
267
|
+
resolve();
|
|
268
|
+
}, this.SEARCH_DESCRIPTION_TIMEOUT);
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
updateKeyOption(option) {
|
|
272
|
+
return (Object.assign(Object.assign({}, option), { presentationValue: option.value, presentationLabel: option.label }));
|
|
273
|
+
}
|
|
274
|
+
parseSearchOptions(options = []) {
|
|
275
|
+
if (Array.isArray(options)) {
|
|
276
|
+
const firstOption = options[0];
|
|
277
|
+
if (!firstOption) {
|
|
278
|
+
return [];
|
|
279
|
+
}
|
|
280
|
+
if ("label" in firstOption || "value" in firstOption) {
|
|
281
|
+
return options.map((option) => this.updateKeyOption(option));
|
|
282
|
+
}
|
|
283
|
+
return options;
|
|
284
|
+
}
|
|
285
|
+
if ("label" in options || "value" in options) {
|
|
286
|
+
[this.updateKeyOption(options)];
|
|
287
|
+
}
|
|
288
|
+
return [options];
|
|
289
|
+
}
|
|
290
|
+
async processOptionsLoader(argument) {
|
|
291
|
+
try {
|
|
292
|
+
this.showLoading = true;
|
|
293
|
+
const searchArgument = { mode: types.SearchMode.PREDICTIVE, argument };
|
|
294
|
+
const options = await this.optionLoader(searchArgument);
|
|
295
|
+
this.visibleOptions = this.parseSearchOptions(options);
|
|
296
|
+
}
|
|
297
|
+
finally {
|
|
298
|
+
this.showLoading = false;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
handleSelectItem(evt) {
|
|
302
|
+
const currentOpt = evt.detail;
|
|
303
|
+
this.value = currentOpt;
|
|
304
|
+
this._popover.hide();
|
|
305
|
+
window.requestAnimationFrame(() => {
|
|
306
|
+
var _a;
|
|
307
|
+
(_a = this._textInputDescriptionValue) === null || _a === void 0 ? void 0 : _a.setFocus({ selectText: true });
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
async handleArrowUp() {
|
|
311
|
+
if (!this.isOptionsVisible()) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
await this._searchList.previousOption();
|
|
315
|
+
}
|
|
316
|
+
async handleArrowDown() {
|
|
317
|
+
if (!this.isOptionsVisible()) {
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
await this._searchList.nextOption();
|
|
321
|
+
}
|
|
322
|
+
async selectCurrentItem() {
|
|
323
|
+
var _a;
|
|
324
|
+
await ((_a = this._searchList) === null || _a === void 0 ? void 0 : _a.selectCurrentItem());
|
|
325
|
+
}
|
|
326
|
+
async cancelSelection() {
|
|
327
|
+
var _a, _b, _c;
|
|
328
|
+
const description = typeof this.value === 'object' ? (_a = this.value) === null || _a === void 0 ? void 0 : _a.label : "";
|
|
329
|
+
if (this._textInputDescriptionValue && description && this._textInputDescriptionValue.value != description) {
|
|
330
|
+
this._textInputDescriptionValue.value = description;
|
|
331
|
+
}
|
|
332
|
+
await ((_b = this._searchList) === null || _b === void 0 ? void 0 : _b.cancelSelection());
|
|
333
|
+
(_c = this._popover) === null || _c === void 0 ? void 0 : _c.hide();
|
|
334
|
+
}
|
|
335
|
+
async handleInputTab() {
|
|
336
|
+
await this.cancelSelection();
|
|
337
|
+
}
|
|
338
|
+
async handleInputEsc() {
|
|
339
|
+
var _a;
|
|
340
|
+
await this.cancelSelection();
|
|
341
|
+
await ((_a = this._latestFocusedInputElement) === null || _a === void 0 ? void 0 : _a.setFocus({ selectText: true }));
|
|
342
|
+
}
|
|
343
|
+
async initKeyboardManager() {
|
|
344
|
+
this._keyboardManager = new core.KeyboardManager();
|
|
345
|
+
const defaultOpts = { element: this.el, propagate: true };
|
|
346
|
+
this._keyboardManager
|
|
347
|
+
.bind("ArrowUp", () => this.handleArrowUp(), Object.assign(Object.assign({}, defaultOpts), { propagate: false }))
|
|
348
|
+
.bind("ArrowDown", () => this.handleArrowDown(), Object.assign(Object.assign({}, defaultOpts), { propagate: false }))
|
|
349
|
+
.bind("Enter", () => this.selectCurrentItem(), defaultOpts)
|
|
350
|
+
.bind("Tab", () => this.handleInputTab(), defaultOpts)
|
|
351
|
+
.bind("Escape", () => this.handleInputEsc(), defaultOpts);
|
|
352
|
+
}
|
|
353
|
+
disconnectedCallback() {
|
|
354
|
+
this._keyboardManager
|
|
355
|
+
.unbind("ArrowUp")
|
|
356
|
+
.unbind("ArrowDown")
|
|
357
|
+
.unbind("Enter")
|
|
358
|
+
.unbind("Tab")
|
|
359
|
+
.unbind("Escape");
|
|
360
|
+
}
|
|
361
|
+
isOptionsVisible() {
|
|
362
|
+
return this._popover.opened;
|
|
363
|
+
}
|
|
364
|
+
setLatestFocusedInputElement(el) {
|
|
365
|
+
this._latestFocusedInputElement = el;
|
|
366
|
+
}
|
|
367
|
+
handleCodeInputFocus() {
|
|
368
|
+
this.setLatestFocusedInputElement(this._textInputCodeValue);
|
|
369
|
+
}
|
|
370
|
+
handleDescriptionInputFocus() {
|
|
371
|
+
this.setLatestFocusedInputElement(this._textInputDescriptionValue);
|
|
372
|
+
}
|
|
373
|
+
getRightIconElement() {
|
|
374
|
+
var _a, _b;
|
|
375
|
+
if (!this.ensureClearButtonVisible && (!this.value && !((_a = this._textInputCodeValue) === null || _a === void 0 ? void 0 : _a.value) && !((_b = this._textInputDescriptionValue) === null || _b === void 0 ? void 0 : _b.value))) {
|
|
376
|
+
return null;
|
|
377
|
+
}
|
|
378
|
+
return index.h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, index.h("ez-icon", { iconName: "close" }));
|
|
379
|
+
}
|
|
380
|
+
getLeftIconElement() {
|
|
381
|
+
return index.h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handleSearchClick() }, this.canShowLoadSpinDescription() ? index.h("div", { class: "message__loading" }) : index.h("ez-icon", { iconName: "search" }));
|
|
382
|
+
}
|
|
383
|
+
render() {
|
|
384
|
+
core.ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
385
|
+
return (index.h(index.Host, null, index.h("div", { class: "ez-search-plus__container" }, index.h("ez-text-input", { ref: elem => this._textInputCodeValue = elem, class: {
|
|
386
|
+
"ez-search-plus__code-input": !this.hideDescriptionInput,
|
|
387
|
+
"ez-search-plus__code-input-no-border": !this.hideDescriptionInput,
|
|
388
|
+
"ez-search-plus__code-input-full": this.hideDescriptionInput
|
|
389
|
+
}, "data-element-id": core.ElementIDUtils.getInternalIDInfo("codeInput"), "data-slave-mode": "true", enabled: !this.disableCodeInput && this.enabled, mode: this.mode, label: this.getCodLabel(), canShowError: this.canShowError, hasInvalid: !core.StringUtils.isEmpty(this.errorMessage), errorMessage: this.hideDescriptionInput ? this.errorMessage : "", value: this.codeValue, onFocusout: () => this.handleCodeInputFocusOut(), onFocus: () => this.handleCodeInputFocus() }, this.getLeftIconElement()), !this.hideDescriptionInput && (index.h("div", { class: "description-input-container" }, index.h("ez-text-input", { ref: elem => this._textInputDescriptionValue = elem, tabIndex: -1, class: "ez-search-plus__text-input", "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), "data-slave-mode": "true", enabled: !this.disableDescriptionInput && this.enabled, label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode, value: this.descriptionValue, onInput: event => this.handleTextInputChangeHandler(event), onFocus: () => this.handleDescriptionInputFocus() }, this.getRightIconElement()), index.h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this.el, autoClose: true, boxWidth: 'fit-content', overlayType: 'none', useAnchorSize: true, onEzVisibilityChange: (event) => this.searchDescriptionIsOpen = event.detail }, index.h("ez-search-result-list", { ref: (ref) => this._searchList = ref, showLoading: this.showLoading, visibleOptions: this.visibleOptions, value: this.value, showOptionValue: this.showOptionValue, onChangeValue: (evt) => this.handleSelectItem(evt) })))))));
|
|
390
|
+
}
|
|
391
|
+
get el() { return index.getElement(this); }
|
|
392
|
+
static get watchers() { return {
|
|
393
|
+
"value": ["observeValue"]
|
|
394
|
+
}; }
|
|
395
|
+
};
|
|
396
|
+
EzSearchPlus.style = ezSearchPlusCss;
|
|
397
|
+
|
|
398
|
+
exports.ez_search_plus = EzSearchPlus;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-9e5554cb.js');
|
|
6
|
+
const core = require('@sankhyalabs/core');
|
|
7
|
+
|
|
8
|
+
const ezSearchResultListCss = ":host{--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--small, 6px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px)}.list-options{position:relative;z-index:var(--more-visible, 2);margin:var(--space--small) 0px;padding:0px;padding-inline-start:0px;box-sizing:border-box;width:100%;height:100%;max-height:350px;min-width:150px;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;margin:var(--space--medium) 0px;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.loading__container{display:flex;flex-direction:column;margin:var(--space--small)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.preselected{background-color:var(--background--medium)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}";
|
|
9
|
+
|
|
10
|
+
const EzSearchResultList = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.changeValue = index.createEvent(this, "changeValue", 7);
|
|
14
|
+
this._textEmptyList = "Nenhum resultado encontrado";
|
|
15
|
+
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
16
|
+
this._endHighlightTag = "</span>";
|
|
17
|
+
this.showLoading = undefined;
|
|
18
|
+
this.visibleOptions = [];
|
|
19
|
+
this.value = undefined;
|
|
20
|
+
this.showOptionValue = true;
|
|
21
|
+
this._preSelection = undefined;
|
|
22
|
+
}
|
|
23
|
+
async nextOption() {
|
|
24
|
+
const newPreSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this.visibleOptions.length - 1);
|
|
25
|
+
this.preSelectItemByIndex(newPreSelection);
|
|
26
|
+
}
|
|
27
|
+
async previousOption() {
|
|
28
|
+
const newPreSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
|
|
29
|
+
this.preSelectItemByIndex(newPreSelection);
|
|
30
|
+
}
|
|
31
|
+
preSelectItemByIndex(newIndex) {
|
|
32
|
+
this._preSelection = newIndex;
|
|
33
|
+
const option = this.visibleOptions[newIndex];
|
|
34
|
+
this.scrollToOption(option);
|
|
35
|
+
}
|
|
36
|
+
selectOption(newOption) {
|
|
37
|
+
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: newOption === null || newOption === void 0 ? void 0 : newOption.value, label: newOption === null || newOption === void 0 ? void 0 : newOption.label });
|
|
38
|
+
const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value, label: newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label });
|
|
39
|
+
this.changeValue.emit(newOptionsFormatted);
|
|
40
|
+
}
|
|
41
|
+
createAndSelectOption(detail) {
|
|
42
|
+
let { key, title } = detail;
|
|
43
|
+
key = String(key !== null && key !== void 0 ? key : "");
|
|
44
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
45
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
46
|
+
title = core.StringUtils.decodeHtmlEntities(title);
|
|
47
|
+
const option = {
|
|
48
|
+
value: key === null || key === void 0 ? void 0 : key.replace(startHighlight, '').replace(endHighlight, ''),
|
|
49
|
+
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
50
|
+
};
|
|
51
|
+
this.selectOption(option);
|
|
52
|
+
}
|
|
53
|
+
scrollToOption(opt) {
|
|
54
|
+
if (!(opt === null || opt === void 0 ? void 0 : opt.value) || !this._optionsList)
|
|
55
|
+
return;
|
|
56
|
+
window.requestAnimationFrame(() => {
|
|
57
|
+
var _a;
|
|
58
|
+
const currentValue = String((_a = opt === null || opt === void 0 ? void 0 : opt.value) !== null && _a !== void 0 ? _a : "");
|
|
59
|
+
const liElem = currentValue
|
|
60
|
+
? this._optionsList.querySelector(`div#item_${currentValue.replace(/([ #;&,.+*~':"!^$[\]()=<>|/\\])/g, '\\$1')}`)
|
|
61
|
+
: undefined;
|
|
62
|
+
if (liElem) {
|
|
63
|
+
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
buildItem(opt, index$1) {
|
|
68
|
+
var _a;
|
|
69
|
+
opt.label = opt.label || opt.value;
|
|
70
|
+
const card = {
|
|
71
|
+
key: String((_a = opt.presentationValue) !== null && _a !== void 0 ? _a : ""),
|
|
72
|
+
title: opt.presentationLabel,
|
|
73
|
+
details: opt.details
|
|
74
|
+
};
|
|
75
|
+
return index.h("div", { style: { "height": "100%" }, class: index$1 === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createAndSelectOption(card), onMouseOver: () => { this._preSelection = index$1; } }, index.h("ez-card-item", { item: card, compacted: true, enableKey: this.showOptionValue }));
|
|
76
|
+
}
|
|
77
|
+
async selectCurrentItem() {
|
|
78
|
+
this.selectOption(this.visibleOptions[this._preSelection]);
|
|
79
|
+
}
|
|
80
|
+
async cancelSelection() {
|
|
81
|
+
this.cancelPreselection();
|
|
82
|
+
}
|
|
83
|
+
cancelPreselection() {
|
|
84
|
+
this._preSelection = undefined;
|
|
85
|
+
}
|
|
86
|
+
canShowListOptions() {
|
|
87
|
+
return !this.showLoading && this.visibleOptions.length > 0;
|
|
88
|
+
}
|
|
89
|
+
render() {
|
|
90
|
+
return (index.h(index.Host, null, index.h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this.showLoading
|
|
91
|
+
&& this.visibleOptions.length === 0
|
|
92
|
+
&& index.h("div", { class: "message" }, index.h("span", { class: "message__no-result" }, this._textEmptyList)), this.showLoading && (index.h("div", { class: "loading__container" }, index.h("ez-skeleton", { count: 4, height: '20px' }))), this.canShowListOptions() && this.visibleOptions.map((opt, index) => this.buildItem(opt, index)))));
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
EzSearchResultList.style = ezSearchResultListCss;
|
|
96
|
+
|
|
97
|
+
exports.ez_search_result_list = EzSearchResultList;
|