@sankhyalabs/ezui 5.22.0-dev.11 → 5.22.0-dev.110
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-c2060474.js +446 -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-check.cjs.entry.js +1 -1
- 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 +78 -156
- package/dist/cjs/ez-date-input.cjs.entry.js +15 -19
- package/dist/cjs/ez-date-time-input.cjs.entry.js +14 -20
- package/dist/cjs/ez-dialog.cjs.entry.js +14 -7
- package/dist/cjs/ez-double-list.cjs.entry.js +287 -0
- package/dist/cjs/{ez-dropdown.cjs.entry.js → ez-dropdown_2.cjs.entry.js} +75 -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 +15147 -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 +2 -2
- package/dist/cjs/ez-modal.cjs.entry.js +13 -4
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -2
- package/dist/cjs/ez-number-input.cjs.entry.js +15 -3
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +209 -0
- package/dist/cjs/ez-popup.cjs.entry.js +25 -3
- package/dist/cjs/ez-scroller_2.cjs.entry.js +3 -3
- package/dist/cjs/ez-search-plus.cjs.entry.js +369 -0
- package/dist/cjs/ez-search-result-list.cjs.entry.js +98 -0
- package/dist/cjs/ez-search.cjs.entry.js +123 -191
- package/dist/cjs/ez-sidebar-navigator.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 +68 -6
- package/dist/cjs/ez-text-input.cjs.entry.js +85 -16
- package/dist/cjs/ez-time-input.cjs.entry.js +7 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js +130 -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-a7b0c73d.js +30 -10
- 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-check/ez-check.css +1 -6
- 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 -247
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +121 -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 +40 -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 +39 -20
- package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
- package/dist/collection/components/ez-dialog/ez-dialog.js +14 -16
- 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 +244 -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 +375 -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 +14 -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 +1 -1
- 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 +49 -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 +44 -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 +205 -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 +952 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.css +227 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +279 -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 +104 -4
- package/dist/collection/components/ez-text-input/ez-text-input.css +124 -93
- package/dist/collection/components/ez-text-input/ez-text-input.js +145 -15
- package/dist/collection/components/ez-time-input/ez-time-input.js +24 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.css +60 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.js +287 -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 +25 -9
- 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/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 +21426 -72860
- package/dist/esm/{CSSVarsUtils-71ce76be.js → CSSVarsUtils-acba92d7.js} +1 -0
- package/dist/esm/DataBinder-89946126.js +442 -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-check.entry.js +1 -1
- 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 +79 -157
- package/dist/esm/ez-date-input.entry.js +15 -19
- package/dist/esm/ez-date-time-input.entry.js +14 -20
- package/dist/esm/ez-dialog.entry.js +15 -8
- package/dist/esm/ez-double-list.entry.js +283 -0
- package/dist/esm/{ez-dropdown.entry.js → ez-dropdown_2.entry.js} +75 -9
- 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 +15146 -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 +2 -2
- package/dist/esm/ez-modal.entry.js +13 -4
- package/dist/esm/ez-multi-selection-list.entry.js +2 -2
- package/dist/esm/ez-number-input.entry.js +15 -3
- package/dist/esm/ez-popover-plus_3.entry.js +203 -0
- package/dist/esm/ez-popup.entry.js +25 -3
- package/dist/esm/ez-scroller_2.entry.js +3 -3
- package/dist/esm/ez-search-plus.entry.js +365 -0
- package/dist/esm/ez-search-result-list.entry.js +94 -0
- package/dist/esm/ez-search.entry.js +124 -192
- package/dist/esm/ez-sidebar-navigator.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 +68 -6
- package/dist/esm/ez-text-input.entry.js +85 -16
- package/dist/esm/ez-time-input.entry.js +7 -1
- package/dist/esm/ez-tooltip.entry.js +126 -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-baa5e267.js +30 -10
- 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-0bffeffc.entry.js +1 -0
- package/dist/ezui/p-0fa52b0f.entry.js +1 -0
- package/dist/ezui/p-173f68ea.js +1 -0
- package/dist/ezui/p-17de16e5.entry.js +1 -0
- package/dist/ezui/p-1a060042.entry.js +1 -0
- package/dist/ezui/p-1ec8bdd2.entry.js +309 -0
- package/dist/ezui/p-20c024f7.entry.js +1 -0
- package/dist/ezui/p-248d4f54.entry.js +1 -0
- package/dist/ezui/p-2872fd16.entry.js +1 -0
- package/dist/ezui/p-288631d1.entry.js +1 -0
- package/dist/ezui/p-2f45506d.entry.js +1 -0
- package/dist/ezui/p-3176a6ef.entry.js +1 -0
- package/dist/ezui/p-31b71e50.entry.js +1 -0
- package/dist/ezui/p-40a60148.js +1 -0
- package/dist/ezui/p-4e0628a7.entry.js +1 -0
- package/dist/ezui/p-56fe5341.entry.js +1 -0
- package/dist/ezui/p-5895e687.js +1 -0
- package/dist/ezui/p-5a14f506.entry.js +1 -0
- package/dist/ezui/p-5ec0ae79.entry.js +1 -0
- package/dist/ezui/p-5eea9886.js +1 -0
- package/dist/ezui/p-7e677b7b.entry.js +1 -0
- package/dist/ezui/{p-bf79aaa1.entry.js → p-7fdd479f.entry.js} +1 -1
- package/dist/ezui/p-80dfc50b.js +1 -0
- package/dist/ezui/p-81145609.entry.js +1 -0
- package/dist/ezui/p-84b1c99e.entry.js +1 -0
- package/dist/ezui/p-8ac8093c.entry.js +1 -0
- package/dist/ezui/p-9142b27a.entry.js +1 -0
- package/dist/ezui/p-9567b31a.entry.js +1 -0
- package/dist/ezui/p-9f22e1dc.entry.js +1 -0
- package/dist/ezui/p-a4cee65d.entry.js +1 -0
- package/dist/ezui/p-a64cfcfc.js +1 -0
- package/dist/ezui/p-bf9dec89.entry.js +1 -0
- package/dist/ezui/p-c1527804.entry.js +1 -0
- package/dist/ezui/p-c5df78be.entry.js +1 -0
- package/dist/ezui/p-cd07f8be.entry.js +1 -0
- package/dist/ezui/p-da1b4a38.entry.js +1 -0
- package/dist/ezui/p-dc628ed3.js +1 -0
- package/dist/ezui/p-dc73e1fe.entry.js +1 -0
- package/dist/ezui/{p-17be134a.entry.js → p-e06a9886.entry.js} +1 -1
- package/dist/ezui/p-e07e4671.js +1 -0
- package/dist/ezui/p-e3544d23.entry.js +1 -0
- package/dist/ezui/p-e6a9041d.entry.js +1 -0
- package/dist/ezui/p-e75c7a23.entry.js +1 -0
- package/dist/ezui/p-ea54d056.entry.js +1 -0
- package/dist/ezui/p-ec7db713.js +1 -0
- package/dist/ezui/p-ecaac11f.entry.js +1 -0
- package/dist/ezui/p-f4861c6a.entry.js +1 -0
- package/dist/ezui/p-f5a30e35.entry.js +1 -0
- package/dist/ezui/p-fa6732f2.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-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 +15 -15
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +8 -3
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +8 -3
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -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 +2 -1
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +8 -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 +8 -1
- package/dist/types/components/ez-search/ez-search.d.ts +32 -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 +184 -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 +17 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +21 -2
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
- package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +53 -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 +1162 -72
- 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 +3 -0
- 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 +11 -3
- 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/cjs/ez-skeleton.cjs.entry.js +0 -67
- 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/esm/ez-skeleton.entry.js +0 -63
- package/dist/ezui/p-04f24913.js +0 -1
- package/dist/ezui/p-05e1f4e7.js +0 -1
- package/dist/ezui/p-072e6347.entry.js +0 -1
- package/dist/ezui/p-1285c902.entry.js +0 -1
- package/dist/ezui/p-13d2fe2d.entry.js +0 -1
- package/dist/ezui/p-2097d0cf.entry.js +0 -1
- package/dist/ezui/p-32e553e5.entry.js +0 -304
- package/dist/ezui/p-33286e5f.entry.js +0 -1
- package/dist/ezui/p-34b6916c.entry.js +0 -1
- package/dist/ezui/p-3b4eeeb6.entry.js +0 -1
- package/dist/ezui/p-3faa2b46.entry.js +0 -1
- package/dist/ezui/p-42533ea4.entry.js +0 -1
- package/dist/ezui/p-4607fb89.js +0 -1
- package/dist/ezui/p-49456b34.entry.js +0 -1
- package/dist/ezui/p-4d5235f1.entry.js +0 -1
- package/dist/ezui/p-5bd5e68f.entry.js +0 -1
- package/dist/ezui/p-650e4b6d.entry.js +0 -1
- package/dist/ezui/p-784fe207.entry.js +0 -1
- package/dist/ezui/p-7af81663.entry.js +0 -1
- package/dist/ezui/p-7bc07c31.entry.js +0 -1
- package/dist/ezui/p-84e439b9.entry.js +0 -1
- package/dist/ezui/p-85c8baae.entry.js +0 -1
- package/dist/ezui/p-8888d9ed.entry.js +0 -1
- package/dist/ezui/p-8d4d90ec.entry.js +0 -1
- package/dist/ezui/p-9050d2cd.entry.js +0 -1
- package/dist/ezui/p-922ac38b.entry.js +0 -1
- package/dist/ezui/p-9e11fc7b.js +0 -1
- package/dist/ezui/p-a31b9c90.entry.js +0 -1
- package/dist/ezui/p-af95cd16.entry.js +0 -1
- package/dist/ezui/p-bae4e180.entry.js +0 -1
- package/dist/ezui/p-baf80b13.entry.js +0 -1
- package/dist/ezui/p-bcb53f27.entry.js +0 -1
- package/dist/ezui/p-cdc472cc.entry.js +0 -1
- package/dist/ezui/p-d9401ea0.entry.js +0 -1
- package/dist/ezui/p-e85c48d7.entry.js +0 -1
- package/dist/ezui/p-ecc2c1ec.entry.js +0 -1
- package/dist/ezui/p-fcf0acce.entry.js +0 -1
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
|
|
2
|
+
import { StringUtils, KeyboardManager, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
import './ApplicationUtils-eaf91331.js';
|
|
4
|
+
import { C as CSSVarsUtils } from './CSSVarsUtils-acba92d7.js';
|
|
5
|
+
import './DialogType-54a62731.js';
|
|
6
|
+
import './CheckMode-bdb2ec19.js';
|
|
7
|
+
import { S as SearchMode } from './types-6f6b2650.js';
|
|
8
|
+
import './FormLayout-54092963.js';
|
|
9
|
+
|
|
10
|
+
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{width:107px}.ez-search-plus__code-input-full{width:100%}.description-input-container{width:100%}";
|
|
11
|
+
|
|
12
|
+
const EzSearchPlus = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
registerInstance(this, hostRef);
|
|
15
|
+
this.ezChange = createEvent(this, "ezChange", 7);
|
|
16
|
+
this.SEARCH_DESCRIPTION_TIMEOUT = 300;
|
|
17
|
+
this.INTERVAL_TO_RETRY_ASYNC_VALUE = 100;
|
|
18
|
+
this.value = undefined;
|
|
19
|
+
this.enabled = true;
|
|
20
|
+
this.disableCodeInput = false;
|
|
21
|
+
this.disableDescriptionInput = false;
|
|
22
|
+
this.label = undefined;
|
|
23
|
+
this.codLabel = undefined;
|
|
24
|
+
this.hideDescriptionInput = false;
|
|
25
|
+
this.canShowError = true;
|
|
26
|
+
this.errorMessage = undefined;
|
|
27
|
+
this.mode = "regular";
|
|
28
|
+
this.contextProperties = undefined;
|
|
29
|
+
this.optionLoader = undefined;
|
|
30
|
+
this.showOptionValue = true;
|
|
31
|
+
this.stopPropagateEnterKeyEvent = false;
|
|
32
|
+
this.autoFocus = false;
|
|
33
|
+
this.showSelectedValue = true;
|
|
34
|
+
this.suppressEmptyOption = false;
|
|
35
|
+
this.hideErrorOnFocusOut = true;
|
|
36
|
+
this.listOptionsPosition = undefined;
|
|
37
|
+
this.isTextSearch = false;
|
|
38
|
+
this.ignoreLimitCharsToSearch = false;
|
|
39
|
+
this.suppressSearch = false;
|
|
40
|
+
this.suppressPreLoad = true;
|
|
41
|
+
this.ensureClearButtonVisible = false;
|
|
42
|
+
this.descriptionValue = "";
|
|
43
|
+
this.codeValue = "";
|
|
44
|
+
this.isLoadingDescription = false;
|
|
45
|
+
this.searchDescriptionIsOpen = false;
|
|
46
|
+
this.visibleOptions = undefined;
|
|
47
|
+
this.showLoading = true;
|
|
48
|
+
}
|
|
49
|
+
async observeValue(newValue, oldValue) {
|
|
50
|
+
const newNormalizedValue = this.normalizeValueToCodeValue(newValue);
|
|
51
|
+
const oldNormalizedValue = this.normalizeValueToCodeValue(oldValue);
|
|
52
|
+
if (newNormalizedValue == oldNormalizedValue)
|
|
53
|
+
return;
|
|
54
|
+
if (newNormalizedValue == undefined) {
|
|
55
|
+
this.codeValue = undefined;
|
|
56
|
+
this.descriptionValue = undefined;
|
|
57
|
+
this.ezChange.emit(undefined);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
this.codeValue = newNormalizedValue;
|
|
61
|
+
try {
|
|
62
|
+
this.descriptionValue = await this.normalizeCodeToDescriptionValue(newValue);
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
this.value = undefined;
|
|
66
|
+
console.warn("[EzSearchPlus] Erro ao obter descrição do registro.", err);
|
|
67
|
+
throw err;
|
|
68
|
+
}
|
|
69
|
+
this.ezChange.emit(this.buildCurrentValue());
|
|
70
|
+
}
|
|
71
|
+
canShowLoadSpinDescription() {
|
|
72
|
+
return this.isLoadingDescription;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Aplica o foco no campo.
|
|
76
|
+
*/
|
|
77
|
+
async setFocus(options) {
|
|
78
|
+
var _a;
|
|
79
|
+
if (this.disableCodeInput) {
|
|
80
|
+
(_a = this._textInputDescriptionValue) === null || _a === void 0 ? void 0 : _a.setFocus(options);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (this._latestFocusedInputElement) {
|
|
84
|
+
this._latestFocusedInputElement.setFocus(options);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
this._textInputCodeValue.setFocus(options);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Obtém o valor do componente só após a compo de apresentação
|
|
91
|
+
* ter sido resolvido pelo option loader quando necessário
|
|
92
|
+
*/
|
|
93
|
+
async getValueAsync() {
|
|
94
|
+
if (!this.isLoadingDescription) {
|
|
95
|
+
const currentOpt = this.buildCurrentValue();
|
|
96
|
+
return new Promise(resolve => resolve(currentOpt));
|
|
97
|
+
}
|
|
98
|
+
return new Promise(resolve => {
|
|
99
|
+
let id = setInterval(() => {
|
|
100
|
+
if (!this.isLoadingDescription) {
|
|
101
|
+
clearInterval(id);
|
|
102
|
+
const currentOpt = this.buildCurrentValue();
|
|
103
|
+
resolve(currentOpt);
|
|
104
|
+
}
|
|
105
|
+
}, this.INTERVAL_TO_RETRY_ASYNC_VALUE);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Limpa o valor do campo de pesquisa
|
|
110
|
+
*/
|
|
111
|
+
async clearValue() {
|
|
112
|
+
this.clearSearch();
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Remove o foco do campo.
|
|
116
|
+
*/
|
|
117
|
+
async setBlur() {
|
|
118
|
+
var _a, _b;
|
|
119
|
+
(_a = this._textInputCodeValue) === null || _a === void 0 ? void 0 : _a.setBlur();
|
|
120
|
+
(_b = this._textInputDescriptionValue) === null || _b === void 0 ? void 0 : _b.setBlur();
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Retorna se o conteúdo é inválido.
|
|
124
|
+
*/
|
|
125
|
+
async isInvalid() {
|
|
126
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
127
|
+
}
|
|
128
|
+
componentWillLoad() {
|
|
129
|
+
if (this.value && StringUtils.isEmpty(this.codeValue)) {
|
|
130
|
+
this.observeValue(this.value, undefined);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
componentDidLoad() {
|
|
134
|
+
CSSVarsUtils.applyVarsTextInput(this.el, this._textInputCodeValue);
|
|
135
|
+
CSSVarsUtils.applyVarsTextInput(this.el, this._textInputDescriptionValue);
|
|
136
|
+
this.initKeyboardManager();
|
|
137
|
+
if (this.autoFocus) {
|
|
138
|
+
requestAnimationFrame(() => {
|
|
139
|
+
this.setFocus({ selectText: true });
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
clearSearch() {
|
|
144
|
+
this.value = null;
|
|
145
|
+
}
|
|
146
|
+
getCodLabel() {
|
|
147
|
+
var _a;
|
|
148
|
+
if (this.hideDescriptionInput) {
|
|
149
|
+
return this.label;
|
|
150
|
+
}
|
|
151
|
+
return (_a = this.codLabel) !== null && _a !== void 0 ? _a : "Cód.";
|
|
152
|
+
}
|
|
153
|
+
async normalizeCodeToDescriptionValue(valueToNormalize) {
|
|
154
|
+
if (!valueToNormalize) {
|
|
155
|
+
return "";
|
|
156
|
+
}
|
|
157
|
+
if (typeof valueToNormalize == 'string') {
|
|
158
|
+
try {
|
|
159
|
+
valueToNormalize = JSON.parse(valueToNormalize);
|
|
160
|
+
if ((valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.value) && !(valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.label)) {
|
|
161
|
+
return await this.loadDescriptionValueByCode(valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.value);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
catch (e) {
|
|
165
|
+
return await this.loadDescriptionValueByCode(valueToNormalize);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
//Se é diferente de objeto, temos que resolver a descrição
|
|
169
|
+
if (typeof valueToNormalize != 'object') {
|
|
170
|
+
return await this.loadDescriptionValueByCode(valueToNormalize);
|
|
171
|
+
}
|
|
172
|
+
return valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.label;
|
|
173
|
+
}
|
|
174
|
+
normalizeValueToCodeValue(valueToNormalize) {
|
|
175
|
+
if (!valueToNormalize) {
|
|
176
|
+
return undefined;
|
|
177
|
+
}
|
|
178
|
+
if (typeof valueToNormalize == 'string') {
|
|
179
|
+
try {
|
|
180
|
+
valueToNormalize = JSON.parse(valueToNormalize);
|
|
181
|
+
}
|
|
182
|
+
catch (e) {
|
|
183
|
+
return valueToNormalize;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
if (typeof valueToNormalize != 'object') {
|
|
187
|
+
return valueToNormalize;
|
|
188
|
+
}
|
|
189
|
+
return valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.value;
|
|
190
|
+
}
|
|
191
|
+
async loadDescriptionValueByCode(codeValue) {
|
|
192
|
+
if (!this.optionLoader) {
|
|
193
|
+
console.warn("optionLoader não definido");
|
|
194
|
+
return "";
|
|
195
|
+
}
|
|
196
|
+
try {
|
|
197
|
+
this.isLoadingDescription = true;
|
|
198
|
+
const searchArgument = { mode: SearchMode.LOAD_DESCRIPTION, argument: codeValue };
|
|
199
|
+
const loadedOption = await this.optionLoader(searchArgument);
|
|
200
|
+
if (!loadedOption) {
|
|
201
|
+
return "";
|
|
202
|
+
}
|
|
203
|
+
return loadedOption.label;
|
|
204
|
+
}
|
|
205
|
+
finally {
|
|
206
|
+
this.isLoadingDescription = false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
handleCodeInputFocusOut() {
|
|
210
|
+
this.cancelSelection();
|
|
211
|
+
if (this.codeValue == this._textInputCodeValue.value)
|
|
212
|
+
return;
|
|
213
|
+
this.value = this._textInputCodeValue.value;
|
|
214
|
+
}
|
|
215
|
+
handleSearchClick() {
|
|
216
|
+
this.loadAdvancedSearch();
|
|
217
|
+
}
|
|
218
|
+
async loadAdvancedSearch() {
|
|
219
|
+
if (!this.optionLoader) {
|
|
220
|
+
console.warn("optionLoader não definido");
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
const searchArgument = { mode: SearchMode.ADVANCED, argument: "" };
|
|
224
|
+
let selectedItem = undefined;
|
|
225
|
+
try {
|
|
226
|
+
selectedItem = await this.optionLoader(searchArgument, this.contextProperties);
|
|
227
|
+
}
|
|
228
|
+
catch (ignore) { }
|
|
229
|
+
if (!selectedItem)
|
|
230
|
+
return;
|
|
231
|
+
this.value = selectedItem;
|
|
232
|
+
}
|
|
233
|
+
buildCurrentValue() {
|
|
234
|
+
if (StringUtils.isEmpty(this.codeValue)) {
|
|
235
|
+
return undefined;
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
value: this.codeValue,
|
|
239
|
+
label: this.descriptionValue
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
async handleTextInputChangeHandler(event) {
|
|
243
|
+
if (!this.searchDescriptionIsOpen) {
|
|
244
|
+
this._popover.show();
|
|
245
|
+
}
|
|
246
|
+
const argument = event.target.value;
|
|
247
|
+
await this.debounceLoaderOptions(argument);
|
|
248
|
+
}
|
|
249
|
+
async debounceLoaderOptions(argument) {
|
|
250
|
+
if (this._debounceSearch)
|
|
251
|
+
clearTimeout(this._debounceSearch);
|
|
252
|
+
return new Promise((resolve) => {
|
|
253
|
+
this._debounceSearch = setTimeout(async () => {
|
|
254
|
+
await this.processOptionsLoader(argument);
|
|
255
|
+
resolve();
|
|
256
|
+
}, this.SEARCH_DESCRIPTION_TIMEOUT);
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
async processOptionsLoader(argument) {
|
|
260
|
+
try {
|
|
261
|
+
this.showLoading = true;
|
|
262
|
+
const searchArgument = { mode: SearchMode.PREDICTIVE, argument };
|
|
263
|
+
this.visibleOptions = await this.optionLoader(searchArgument);
|
|
264
|
+
}
|
|
265
|
+
finally {
|
|
266
|
+
this.showLoading = false;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
handleSelectItem(evt) {
|
|
270
|
+
const currentOpt = evt.detail;
|
|
271
|
+
this.value = currentOpt;
|
|
272
|
+
this._popover.hide();
|
|
273
|
+
window.requestAnimationFrame(() => {
|
|
274
|
+
var _a;
|
|
275
|
+
(_a = this._textInputDescriptionValue) === null || _a === void 0 ? void 0 : _a.setFocus({ selectText: true });
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
async handleArrowUp() {
|
|
279
|
+
if (!this.isOptionsVisible()) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
await this._searchList.previousOption();
|
|
283
|
+
}
|
|
284
|
+
async handleArrowDown() {
|
|
285
|
+
if (!this.isOptionsVisible()) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
await this._searchList.nextOption();
|
|
289
|
+
}
|
|
290
|
+
async selectCurrentItem() {
|
|
291
|
+
var _a;
|
|
292
|
+
await ((_a = this._searchList) === null || _a === void 0 ? void 0 : _a.selectCurrentItem());
|
|
293
|
+
}
|
|
294
|
+
async cancelSelection() {
|
|
295
|
+
var _a, _b, _c, _d;
|
|
296
|
+
if (this._textInputDescriptionValue && this._textInputDescriptionValue.value != ((_a = this.value) === null || _a === void 0 ? void 0 : _a.label)) {
|
|
297
|
+
this._textInputDescriptionValue.value = (_b = this.value) === null || _b === void 0 ? void 0 : _b.label;
|
|
298
|
+
}
|
|
299
|
+
await ((_c = this._searchList) === null || _c === void 0 ? void 0 : _c.cancelSelection());
|
|
300
|
+
(_d = this._popover) === null || _d === void 0 ? void 0 : _d.hide();
|
|
301
|
+
}
|
|
302
|
+
async handleInputTab() {
|
|
303
|
+
await this.cancelSelection();
|
|
304
|
+
}
|
|
305
|
+
async handleInputEsc() {
|
|
306
|
+
var _a;
|
|
307
|
+
await this.cancelSelection();
|
|
308
|
+
await ((_a = this._latestFocusedInputElement) === null || _a === void 0 ? void 0 : _a.setFocus({ selectText: true }));
|
|
309
|
+
}
|
|
310
|
+
async initKeyboardManager() {
|
|
311
|
+
this._keyboardManager = new KeyboardManager();
|
|
312
|
+
const opts = { element: this.el, propagate: true };
|
|
313
|
+
this._keyboardManager
|
|
314
|
+
.bind("ArrowUp", () => this.handleArrowUp(), opts)
|
|
315
|
+
.bind("ArrowDown", () => this.handleArrowDown(), opts)
|
|
316
|
+
.bind("Enter", () => this.selectCurrentItem(), opts)
|
|
317
|
+
.bind("Tab", () => this.handleInputTab(), opts)
|
|
318
|
+
.bind("Escape", () => this.handleInputEsc(), opts);
|
|
319
|
+
}
|
|
320
|
+
disconnectedCallback() {
|
|
321
|
+
this._keyboardManager
|
|
322
|
+
.unbind("ArrowUp")
|
|
323
|
+
.unbind("ArrowDown")
|
|
324
|
+
.unbind("Enter")
|
|
325
|
+
.unbind("Tab")
|
|
326
|
+
.unbind("Escape");
|
|
327
|
+
}
|
|
328
|
+
isOptionsVisible() {
|
|
329
|
+
return this._popover.opened;
|
|
330
|
+
}
|
|
331
|
+
setLatestFocusedInputElement(el) {
|
|
332
|
+
this._latestFocusedInputElement = el;
|
|
333
|
+
}
|
|
334
|
+
handleCodeInputFocus() {
|
|
335
|
+
this.setLatestFocusedInputElement(this._textInputCodeValue);
|
|
336
|
+
}
|
|
337
|
+
handleDescriptionInputFocus() {
|
|
338
|
+
this.setLatestFocusedInputElement(this._textInputDescriptionValue);
|
|
339
|
+
}
|
|
340
|
+
getRightIconElement() {
|
|
341
|
+
var _a, _b;
|
|
342
|
+
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))) {
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
345
|
+
return h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }));
|
|
346
|
+
}
|
|
347
|
+
getLeftIconElement() {
|
|
348
|
+
return h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handleSearchClick() }, this.canShowLoadSpinDescription() ? h("div", { class: "message__loading" }) : h("ez-icon", { iconName: "search" }));
|
|
349
|
+
}
|
|
350
|
+
render() {
|
|
351
|
+
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
352
|
+
return (h(Host, null, h("div", { class: "ez-search-plus__container" }, h("ez-text-input", { ref: elem => this._textInputCodeValue = elem, class: {
|
|
353
|
+
"ez-search-plus__code-input": true,
|
|
354
|
+
"ez-search-plus__code-input-no-border": !this.hideDescriptionInput,
|
|
355
|
+
"ez-search-plus__code-input-full": this.hideDescriptionInput
|
|
356
|
+
}, "data-element-id": ElementIDUtils.getInternalIDInfo("codeInput"), "data-slave-mode": "true", enabled: !this.disableCodeInput && this.enabled, mode: this.mode, label: this.getCodLabel(), hasInvalid: !StringUtils.isEmpty(this.errorMessage), errorMessage: this.hideDescriptionInput ? this.errorMessage : "", value: this.codeValue, onFocusout: () => this.handleCodeInputFocusOut(), onFocus: () => this.handleCodeInputFocus() }, this.getLeftIconElement()), !this.hideDescriptionInput && h("div", { class: "description-input-container" }, h("ez-text-input", { ref: elem => this._textInputDescriptionValue = elem, tabIndex: -1, class: "ez-search-plus__text-input", "data-element-id": 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()), h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this._textInputDescriptionValue, autoClose: true, boxWidth: 'fit-content', overlayType: 'none', useAnchorSize: true, onEzVisibilityChange: event => this.searchDescriptionIsOpen = event.detail }, 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) }))))));
|
|
357
|
+
}
|
|
358
|
+
get el() { return getElement(this); }
|
|
359
|
+
static get watchers() { return {
|
|
360
|
+
"value": ["observeValue"]
|
|
361
|
+
}; }
|
|
362
|
+
};
|
|
363
|
+
EzSearchPlus.style = ezSearchPlusCss;
|
|
364
|
+
|
|
365
|
+
export { EzSearchPlus as ez_search_plus };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-baa5e267.js';
|
|
2
|
+
import { StringUtils } from '@sankhyalabs/core';
|
|
3
|
+
|
|
4
|
+
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)}.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__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}}";
|
|
5
|
+
|
|
6
|
+
const EzSearchResultList = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.changeValue = createEvent(this, "changeValue", 7);
|
|
10
|
+
this._textEmptyList = "Nenhum resultado encontrado";
|
|
11
|
+
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
12
|
+
this._endHighlightTag = "</span>";
|
|
13
|
+
this.showLoading = undefined;
|
|
14
|
+
this.visibleOptions = [];
|
|
15
|
+
this.value = undefined;
|
|
16
|
+
this.showOptionValue = true;
|
|
17
|
+
this._preSelection = undefined;
|
|
18
|
+
}
|
|
19
|
+
async nextOption() {
|
|
20
|
+
const newPreSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this.visibleOptions.length - 1);
|
|
21
|
+
this.preSelectItemByIndex(newPreSelection);
|
|
22
|
+
}
|
|
23
|
+
async previousOption() {
|
|
24
|
+
const newPreSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
|
|
25
|
+
this.preSelectItemByIndex(newPreSelection);
|
|
26
|
+
}
|
|
27
|
+
preSelectItemByIndex(newIndex) {
|
|
28
|
+
this._preSelection = newIndex;
|
|
29
|
+
const option = this.visibleOptions[newIndex];
|
|
30
|
+
this.scrollToOption(option);
|
|
31
|
+
}
|
|
32
|
+
selectOption(newOption) {
|
|
33
|
+
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 });
|
|
34
|
+
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 });
|
|
35
|
+
this.changeValue.emit(newOptionsFormatted);
|
|
36
|
+
}
|
|
37
|
+
createAndSelectOption(detail) {
|
|
38
|
+
let { key, title } = detail;
|
|
39
|
+
key = String(key !== null && key !== void 0 ? key : "");
|
|
40
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
41
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
42
|
+
title = StringUtils.decodeHtmlEntities(title);
|
|
43
|
+
const option = {
|
|
44
|
+
value: key === null || key === void 0 ? void 0 : key.replace(startHighlight, '').replace(endHighlight, ''),
|
|
45
|
+
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
46
|
+
};
|
|
47
|
+
this.selectOption(option);
|
|
48
|
+
}
|
|
49
|
+
scrollToOption(opt) {
|
|
50
|
+
if (!(opt === null || opt === void 0 ? void 0 : opt.value) || !this._optionsList)
|
|
51
|
+
return;
|
|
52
|
+
window.requestAnimationFrame(() => {
|
|
53
|
+
var _a;
|
|
54
|
+
const currentValue = String((_a = opt === null || opt === void 0 ? void 0 : opt.value) !== null && _a !== void 0 ? _a : "");
|
|
55
|
+
const liElem = currentValue
|
|
56
|
+
? this._optionsList.querySelector(`div#item_${currentValue.replace(/([ #;&,.+*~':"!^$[\]()=<>|/\\])/g, '\\$1')}`)
|
|
57
|
+
: undefined;
|
|
58
|
+
if (liElem) {
|
|
59
|
+
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
buildItem(opt, index) {
|
|
64
|
+
var _a;
|
|
65
|
+
opt.label = opt.label || opt.value;
|
|
66
|
+
const card = {
|
|
67
|
+
key: String((_a = opt.presentationValue) !== null && _a !== void 0 ? _a : ""),
|
|
68
|
+
title: opt.presentationLabel,
|
|
69
|
+
details: opt.details
|
|
70
|
+
};
|
|
71
|
+
return h("div", { style: { "height": "100%" }, class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createAndSelectOption(card), onMouseOver: () => { this._preSelection = index; } }, h("ez-card-item", { item: card, compacted: true, enableKey: this.showOptionValue }));
|
|
72
|
+
}
|
|
73
|
+
async selectCurrentItem() {
|
|
74
|
+
this.selectOption(this.visibleOptions[this._preSelection]);
|
|
75
|
+
}
|
|
76
|
+
async cancelSelection() {
|
|
77
|
+
this.cancelPreselection();
|
|
78
|
+
}
|
|
79
|
+
cancelPreselection() {
|
|
80
|
+
this._preSelection = undefined;
|
|
81
|
+
}
|
|
82
|
+
canShowListOptions() {
|
|
83
|
+
return !this.showLoading && this.visibleOptions.length > 0;
|
|
84
|
+
}
|
|
85
|
+
render() {
|
|
86
|
+
return (h(Host, null, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this.showLoading
|
|
87
|
+
&& this.visibleOptions.length === 0
|
|
88
|
+
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this.showLoading
|
|
89
|
+
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), this.canShowListOptions() && this.visibleOptions.map((opt, index) => this.buildItem(opt, index)))));
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
EzSearchResultList.style = ezSearchResultListCss;
|
|
93
|
+
|
|
94
|
+
export { EzSearchResultList as ez_search_result_list };
|