@sankhyalabs/ezui 5.22.0-dev.9 → 5.22.0-dev.91
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-e92314c2.js +445 -0
- package/dist/cjs/FocusResolver-885f2173.js +35 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +4 -3
- package/dist/cjs/ez-button.cjs.entry.js +11 -5
- package/dist/cjs/ez-card-item_2.cjs.entry.js +76 -0
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +366 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +82 -155
- package/dist/cjs/ez-date-input.cjs.entry.js +13 -4
- package/dist/cjs/ez-date-time-input.cjs.entry.js +10 -4
- 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 +28 -21
- package/dist/cjs/ez-form.cjs.entry.js +6 -325
- package/dist/cjs/ez-grid.cjs.entry.js +14959 -69757
- 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 +12 -3
- 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-core_2.cjs.entry.js +1504 -0
- package/dist/cjs/ez-popup.cjs.entry.js +24 -2
- package/dist/cjs/ez-scroller_2.cjs.entry.js +3 -3
- package/dist/cjs/ez-search.cjs.entry.js +109 -48
- 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 +6 -3
- 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 +152 -16
- package/dist/cjs/ez-time-input.cjs.entry.js +7 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js +55 -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/index-a7b0c73d.js +22 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +6 -1
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +3 -2
- package/dist/collection/components/ez-button/ez-button.css +23 -13
- package/dist/collection/components/ez-button/ez-button.js +12 -6
- package/dist/collection/components/ez-card-item/ez-card-item.css +60 -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-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 +405 -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 +129 -166
- package/dist/collection/components/ez-date-input/ez-date-input.css +1 -1
- package/dist/collection/components/ez-date-input/ez-date-input.js +38 -4
- 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 +35 -4
- 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 +1 -0
- 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 +5 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +2 -1
- 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 +3 -2
- 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 +295 -63
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +151 -31
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js +2 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +219 -42
- 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 +8 -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/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 +315 -10
- 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-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 +13 -4
- 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 +385 -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 +468 -0
- package/dist/collection/components/ez-popup/ez-popup.css +8 -3
- package/dist/collection/components/ez-popup/ez-popup.js +43 -3
- package/dist/collection/components/ez-scroller/ez-scroller.css +1 -0
- package/dist/collection/components/ez-search/ez-search.css +22 -11
- package/dist/collection/components/ez-search/ez-search.js +193 -53
- 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 +106 -91
- package/dist/collection/components/ez-text-input/ez-text-input.js +166 -15
- package/dist/collection/components/ez-time-input/ez-time-input.js +24 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.css +20 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.js +116 -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/ResponsiveInputUtils.js +26 -0
- package/dist/collection/utils/form/DataBinder.js +22 -7
- package/dist/collection/utils/form/FormMetadata.js +2 -1
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
- 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 +30 -0
- package/dist/custom-elements/index.js +19539 -71833
- package/dist/esm/{CSSVarsUtils-71ce76be.js → CSSVarsUtils-acba92d7.js} +1 -0
- package/dist/esm/DataBinder-9c877244.js +441 -0
- package/dist/esm/FocusResolver-1ccbf850.js +33 -0
- package/dist/esm/ez-actions-button.entry.js +4 -3
- package/dist/esm/ez-button.entry.js +11 -5
- package/dist/esm/ez-card-item_2.entry.js +71 -0
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box-list_3.entry.js +360 -0
- package/dist/esm/ez-combo-box.entry.js +83 -156
- package/dist/esm/ez-date-input.entry.js +13 -4
- package/dist/esm/ez-date-time-input.entry.js +10 -4
- 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 +28 -21
- package/dist/esm/ez-form.entry.js +5 -324
- package/dist/esm/ez-grid.entry.js +14899 -69697
- 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 +12 -3
- 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-core_2.entry.js +1499 -0
- package/dist/esm/ez-popup.entry.js +24 -2
- package/dist/esm/ez-scroller_2.entry.js +3 -3
- package/dist/esm/ez-search.entry.js +109 -48
- 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 +6 -3
- 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 +152 -16
- package/dist/esm/ez-time-input.entry.js +7 -1
- package/dist/esm/ez-tooltip.entry.js +51 -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/index-baa5e267.js +22 -10
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-0fa52b0f.entry.js +1 -0
- package/dist/ezui/p-0faf71c5.entry.js +1 -0
- package/dist/ezui/p-15134d97.entry.js +1 -0
- package/dist/ezui/p-17de16e5.entry.js +1 -0
- package/dist/ezui/p-17eabf46.entry.js +1 -0
- package/dist/ezui/p-1ad6c61b.entry.js +1 -0
- package/dist/ezui/p-20c024f7.entry.js +1 -0
- package/dist/ezui/p-2bb2a0c4.entry.js +1 -0
- package/dist/ezui/p-2f45506d.entry.js +1 -0
- package/dist/ezui/p-3195a7a7.entry.js +1 -0
- package/dist/ezui/p-31b71e50.entry.js +1 -0
- package/dist/ezui/p-3429080c.entry.js +1 -0
- package/dist/ezui/p-463be973.entry.js +309 -0
- package/dist/ezui/p-556468d9.entry.js +1 -0
- package/dist/ezui/p-56fe5341.entry.js +1 -0
- package/dist/ezui/p-58783dcf.entry.js +1 -0
- package/dist/ezui/p-65f471bc.entry.js +1 -0
- package/dist/ezui/p-6cdd3e0a.entry.js +1 -0
- package/dist/ezui/p-7bd15498.entry.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-990b4318.entry.js +1 -0
- package/dist/ezui/p-a4cee65d.entry.js +1 -0
- package/dist/ezui/p-acddfb2e.js +1 -0
- package/dist/ezui/p-b26f6c5b.entry.js +1 -0
- package/dist/ezui/p-c1527804.entry.js +1 -0
- package/dist/ezui/p-cb1535f7.entry.js +1 -0
- package/dist/ezui/p-cf87aacb.entry.js +1 -0
- package/dist/ezui/p-d9548bdf.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-84e439b9.entry.js → p-e347df9c.entry.js} +1 -1
- package/dist/ezui/p-e6a9041d.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-f5931caa.entry.js +1 -0
- package/dist/ezui/p-fa6732f2.entry.js +1 -0
- package/dist/ezui/p-fd0a19d6.entry.js +1 -0
- package/dist/types/components/ez-button/ez-button.d.ts +2 -1
- 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 +17 -15
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +6 -1
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +6 -1
- 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-view/custom-input/ez-custom-form-input.d.ts +7 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +2 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +1 -1
- 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 +71 -4
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +36 -4
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +25 -2
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +33 -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/mock/Server.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +54 -1
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +0 -11
- 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 +68 -0
- package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +81 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +8 -1
- package/dist/types/components/ez-search/ez-search.d.ts +30 -6
- 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 +24 -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 +21 -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 +717 -29
- package/dist/types/utils/FocusResolver.d.ts +5 -0
- package/dist/types/utils/ResponsiveInputUtils.d.ts +6 -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/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 +5 -0
- package/react/components.js +5 -0
- package/react/components.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/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-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-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-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-784fe207.entry.js +0 -1
- package/dist/ezui/p-7922142b.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-85c8baae.entry.js +0 -1
- package/dist/ezui/p-8888d9ed.entry.js +0 -1
- package/dist/ezui/p-8f0144f6.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-9ab22a07.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-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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementIDUtils,
|
|
1
|
+
import { ElementIDUtils, ObjectUtils } from "@sankhyalabs/core";
|
|
2
2
|
import { h, Host } from "@stencil/core";
|
|
3
3
|
import { CSSVarsUtils } from "../../utils";
|
|
4
4
|
export class EzComboBox {
|
|
@@ -9,11 +9,13 @@ export class EzComboBox {
|
|
|
9
9
|
this._tabPressed = false;
|
|
10
10
|
this._textEmptyList = "Nenhum resultado encontrado";
|
|
11
11
|
this._lookupMode = false;
|
|
12
|
+
this.isOpen = false;
|
|
12
13
|
this._preSelection = undefined;
|
|
13
14
|
this._visibleOptions = undefined;
|
|
14
15
|
this._startLoading = false;
|
|
15
16
|
this._showLoading = true;
|
|
16
17
|
this._criteria = undefined;
|
|
18
|
+
this._textInputReady = undefined;
|
|
17
19
|
this.limitCharsToSearch = 3;
|
|
18
20
|
this.value = undefined;
|
|
19
21
|
this.label = undefined;
|
|
@@ -25,11 +27,13 @@ export class EzComboBox {
|
|
|
25
27
|
this.suppressSearch = false;
|
|
26
28
|
this.optionLoader = undefined;
|
|
27
29
|
this.suppressEmptyOption = false;
|
|
30
|
+
this.stopPropagateEnterKeyEvent = true;
|
|
28
31
|
this.canShowError = true;
|
|
29
32
|
this.mode = "regular";
|
|
30
33
|
this.hideErrorOnFocusOut = true;
|
|
31
34
|
this.listOptionsPosition = undefined;
|
|
32
35
|
this.isTextSearch = false;
|
|
36
|
+
this.autoFocus = false;
|
|
33
37
|
}
|
|
34
38
|
observeErrorMessage() {
|
|
35
39
|
var _a;
|
|
@@ -92,9 +96,9 @@ export class EzComboBox {
|
|
|
92
96
|
/**
|
|
93
97
|
* Aplica o foco no campo.
|
|
94
98
|
*/
|
|
95
|
-
async setFocus() {
|
|
99
|
+
async setFocus(options) {
|
|
96
100
|
if (this._textInput) {
|
|
97
|
-
this._textInput.setFocus();
|
|
101
|
+
this._textInput.setFocus(options);
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
104
|
/**
|
|
@@ -117,63 +121,6 @@ export class EzComboBox {
|
|
|
117
121
|
async clearValue() {
|
|
118
122
|
this.clearSearch();
|
|
119
123
|
}
|
|
120
|
-
scrollListener() {
|
|
121
|
-
var _a;
|
|
122
|
-
if (this._floatingID == undefined) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
if ((_a = this.listOptionsPosition) === null || _a === void 0 ? void 0 : _a.hardPosition) {
|
|
126
|
-
this.hideOptions();
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
window.requestAnimationFrame(() => {
|
|
130
|
-
this.updateListPosition();
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
updateListPosition() {
|
|
135
|
-
let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
|
|
136
|
-
const elementRect = this._listWrapper.getBoundingClientRect();
|
|
137
|
-
const containerRect = this._listContainer.getBoundingClientRect();
|
|
138
|
-
const textInputRect = this._textInput.getBoundingClientRect();
|
|
139
|
-
const limitHeight = bottomLimit || window.innerHeight;
|
|
140
|
-
const neededHeight = containerRect.bottom + elementRect.height;
|
|
141
|
-
if (!fromBottom && (elementRect.top < 0 || neededHeight > limitHeight)) {
|
|
142
|
-
fromBottom = true;
|
|
143
|
-
}
|
|
144
|
-
if (!hardPosition) {
|
|
145
|
-
verticalPosition = verticalPosition || 0;
|
|
146
|
-
horizontalPosition = horizontalPosition || 0;
|
|
147
|
-
if (fromBottom) {
|
|
148
|
-
verticalPosition = window.innerHeight - textInputRect.top + verticalPosition;
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
verticalPosition += containerRect.top;
|
|
152
|
-
}
|
|
153
|
-
if (fromRight) {
|
|
154
|
-
horizontalPosition = window.innerWidth - textInputRect.right + horizontalPosition;
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
horizontalPosition += containerRect.left;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
if (verticalPosition != undefined) {
|
|
161
|
-
this._listWrapper.style[fromBottom ? "bottom" : "top"] = `${verticalPosition}px`;
|
|
162
|
-
this._listWrapper.style[fromBottom ? "top" : "bottom"] = "";
|
|
163
|
-
}
|
|
164
|
-
if (horizontalPosition != undefined) {
|
|
165
|
-
this._listWrapper.style[fromRight ? "right" : "left"] = `${horizontalPosition}px`;
|
|
166
|
-
this._listWrapper.style[fromRight ? "left" : "right"] = "";
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
getListPosition() {
|
|
170
|
-
if (this.listOptionsPosition) {
|
|
171
|
-
return this.listOptionsPosition;
|
|
172
|
-
}
|
|
173
|
-
return {
|
|
174
|
-
verticalPosition: (this.errorMessage || !this.canShowError || this.mode === "slim") ? 6 : -13
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
124
|
isDifferentValues(firstValue, secondValue) {
|
|
178
125
|
return ObjectUtils.objectToString(firstValue || {}) !== ObjectUtils.objectToString(secondValue || {});
|
|
179
126
|
}
|
|
@@ -246,66 +193,24 @@ export class EzComboBox {
|
|
|
246
193
|
}
|
|
247
194
|
return 0;
|
|
248
195
|
}
|
|
249
|
-
buildItem(opt, index) {
|
|
250
|
-
const widthValue = this.showOptionValue && this._maxWidthValue > 0 ? `${this._maxWidthValue}px` : '';
|
|
251
|
-
opt.label = opt.label || opt.value;
|
|
252
|
-
return h("li", { class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.selectOption(opt), onMouseOver: () => this._preSelection = index }, this.showOptionValue
|
|
253
|
-
? h("span", { class: "item__value", title: opt.value, style: { width: widthValue, minWidth: widthValue, maxWidth: widthValue } }, opt.value)
|
|
254
|
-
: undefined, h("span", { class: "item__label " + (this.showOptionValue ? "item__label--bold" : ""), title: opt.label }, opt.label));
|
|
255
|
-
}
|
|
256
196
|
showOptions() {
|
|
197
|
+
var _a, _b;
|
|
257
198
|
if (!this.enabled)
|
|
258
199
|
return;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
200
|
+
this.openPopover();
|
|
201
|
+
const valueString = (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : this.value;
|
|
202
|
+
const indexValue = this._visibleOptions.findIndex(option => option.value === valueString);
|
|
203
|
+
this._preSelection = indexValue === -1 ? 0 : indexValue;
|
|
262
204
|
if (!!this._resizeObserver)
|
|
263
205
|
this._resizeObserver.observe(this._textInput);
|
|
264
|
-
this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, isFixed: true, backClickListener: () => this.hideOptions() });
|
|
265
206
|
this.setFocus();
|
|
266
|
-
window.requestAnimationFrame(() => {
|
|
267
|
-
this.updateListPosition();
|
|
268
|
-
if (!this.listOptionsPosition) {
|
|
269
|
-
this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
207
|
}
|
|
273
208
|
hideOptions() {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
this._floatingID = undefined;
|
|
209
|
+
var _a;
|
|
210
|
+
(_a = this._popover) === null || _a === void 0 ? void 0 : _a.hide();
|
|
278
211
|
if (!!this._resizeObserver)
|
|
279
212
|
this._resizeObserver.unobserve(this._textInput);
|
|
280
213
|
}
|
|
281
|
-
isOptionsVisible() {
|
|
282
|
-
return this._floatingID !== undefined && FloatingManager.isFloating(this._floatingID);
|
|
283
|
-
}
|
|
284
|
-
nextOption() {
|
|
285
|
-
if (!this.isOptionsVisible()) {
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
this.showOptions();
|
|
289
|
-
this._preSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this._visibleOptions.length - 1);
|
|
290
|
-
this.scrollToOption(this._visibleOptions[this._preSelection]);
|
|
291
|
-
}
|
|
292
|
-
previousOption() {
|
|
293
|
-
this._preSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
|
|
294
|
-
this.scrollToOption(this._visibleOptions[this._preSelection]);
|
|
295
|
-
}
|
|
296
|
-
scrollToOption(opt) {
|
|
297
|
-
window.requestAnimationFrame(() => {
|
|
298
|
-
const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`li#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
|
|
299
|
-
if (liElem)
|
|
300
|
-
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
selectCurrentOption() {
|
|
304
|
-
if (this._preSelection !== undefined) {
|
|
305
|
-
this.selectOption(this._visibleOptions[this._preSelection]);
|
|
306
|
-
this._preSelection = undefined;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
214
|
updateSource(source) {
|
|
310
215
|
this._startLoading = false;
|
|
311
216
|
if (source instanceof Promise) {
|
|
@@ -330,17 +235,23 @@ export class EzComboBox {
|
|
|
330
235
|
}
|
|
331
236
|
}
|
|
332
237
|
}
|
|
333
|
-
selectOption(newOption) {
|
|
334
|
-
var _a, _b;
|
|
238
|
+
selectOption(newOption, focusOnInput = true) {
|
|
239
|
+
var _a, _b, _c;
|
|
335
240
|
const currentValue = this.getSelectedOption(this.value);
|
|
336
241
|
if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString()))
|
|
337
242
|
|| (currentValue == undefined && newOption != undefined && "value" in newOption)) {
|
|
338
243
|
const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
|
|
339
244
|
this.value = adjustedOpt;
|
|
245
|
+
(_c = this._popover) === null || _c === void 0 ? void 0 : _c.hide();
|
|
340
246
|
}
|
|
341
247
|
else {
|
|
342
248
|
this.resetOptions();
|
|
343
249
|
}
|
|
250
|
+
if (focusOnInput) {
|
|
251
|
+
setTimeout(() => {
|
|
252
|
+
this.setFocus();
|
|
253
|
+
}, 0);
|
|
254
|
+
}
|
|
344
255
|
}
|
|
345
256
|
loadOptions(mode, argument = "") {
|
|
346
257
|
this._criteria = argument;
|
|
@@ -362,7 +273,6 @@ export class EzComboBox {
|
|
|
362
273
|
this.setInputValue(false);
|
|
363
274
|
}, this._deboucingTime);
|
|
364
275
|
}
|
|
365
|
-
this.resetOptions();
|
|
366
276
|
}
|
|
367
277
|
setInputValue(clearError = true) {
|
|
368
278
|
const textValue = this.getText();
|
|
@@ -385,6 +295,11 @@ export class EzComboBox {
|
|
|
385
295
|
//---------------------------------------------
|
|
386
296
|
// Lifecycle web component
|
|
387
297
|
//---------------------------------------------
|
|
298
|
+
componentDidRender() {
|
|
299
|
+
if (this._textInput) {
|
|
300
|
+
this._textInputReady = true;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
388
303
|
componentWillLoad() {
|
|
389
304
|
if (this.options === undefined) {
|
|
390
305
|
this.options = [];
|
|
@@ -403,15 +318,6 @@ export class EzComboBox {
|
|
|
403
318
|
}
|
|
404
319
|
this.loadOptions(SearchMode.PRELOAD);
|
|
405
320
|
}
|
|
406
|
-
componentDidRender() {
|
|
407
|
-
var _a;
|
|
408
|
-
if (this._floatingID === undefined) {
|
|
409
|
-
this._listWrapper.remove();
|
|
410
|
-
}
|
|
411
|
-
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
412
|
-
ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
321
|
componentDidLoad() {
|
|
416
322
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
417
323
|
this.setInputValue(false);
|
|
@@ -419,12 +325,26 @@ export class EzComboBox {
|
|
|
419
325
|
window.requestAnimationFrame(() => {
|
|
420
326
|
if (!Array.isArray(entries) || !entries.length)
|
|
421
327
|
return;
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
328
|
+
if (!this._textInput)
|
|
329
|
+
return;
|
|
330
|
+
if (!this._comboBoxList)
|
|
331
|
+
return;
|
|
332
|
+
const textInputWidth = this._textInput.clientWidth;
|
|
333
|
+
this._comboBoxList.width = textInputWidth;
|
|
426
334
|
});
|
|
427
335
|
});
|
|
336
|
+
if (this.autoFocus) {
|
|
337
|
+
requestAnimationFrame(() => {
|
|
338
|
+
this.setFocus({ selectText: true });
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
disconnectedCallback() {
|
|
343
|
+
var _a;
|
|
344
|
+
(_a = this._popover) === null || _a === void 0 ? void 0 : _a.remove();
|
|
345
|
+
if (this._resizeObserver) {
|
|
346
|
+
this._resizeObserver.disconnect();
|
|
347
|
+
}
|
|
428
348
|
}
|
|
429
349
|
//---------------------------------------------
|
|
430
350
|
// Event handlers
|
|
@@ -451,7 +371,7 @@ export class EzComboBox {
|
|
|
451
371
|
this.showOptions();
|
|
452
372
|
}
|
|
453
373
|
else {
|
|
454
|
-
this.
|
|
374
|
+
this._preSelection = undefined;
|
|
455
375
|
this.updateVisibleOptions();
|
|
456
376
|
}
|
|
457
377
|
}
|
|
@@ -465,42 +385,48 @@ export class EzComboBox {
|
|
|
465
385
|
this.showOptions();
|
|
466
386
|
}
|
|
467
387
|
keyDownHandler(event) {
|
|
468
|
-
|
|
469
|
-
if (event.ctrlKey) {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
//não é interessante deixar o evento propagar;
|
|
475
|
-
event.stopPropagation();
|
|
476
|
-
event.stopImmediatePropagation();
|
|
477
|
-
event.preventDefault();
|
|
478
|
-
}
|
|
388
|
+
var _a, _b, _c, _d, _e, _f;
|
|
389
|
+
if (event.ctrlKey && (event.key === "f" || event.key === "F")) {
|
|
390
|
+
this.loadOptions(SearchMode.ADVANCED);
|
|
391
|
+
event.preventDefault();
|
|
392
|
+
event.stopPropagation();
|
|
393
|
+
return;
|
|
479
394
|
}
|
|
480
395
|
switch (event.key) {
|
|
481
396
|
case "ArrowDown":
|
|
482
|
-
|
|
483
|
-
|
|
397
|
+
event.preventDefault();
|
|
398
|
+
if (this.canShowListOptions()) {
|
|
399
|
+
this.showOptions();
|
|
400
|
+
(_a = this._comboBoxList) === null || _a === void 0 ? void 0 : _a.nextOption();
|
|
401
|
+
}
|
|
484
402
|
break;
|
|
485
403
|
case "ArrowUp":
|
|
486
|
-
|
|
487
|
-
|
|
404
|
+
event.preventDefault();
|
|
405
|
+
if (this.canShowListOptions()) {
|
|
406
|
+
this.showOptions();
|
|
407
|
+
(_b = this._comboBoxList) === null || _b === void 0 ? void 0 : _b.previousOption();
|
|
408
|
+
}
|
|
488
409
|
break;
|
|
489
410
|
case "Enter":
|
|
490
|
-
this.
|
|
411
|
+
if (this.isOpen) {
|
|
412
|
+
event.preventDefault();
|
|
413
|
+
(_c = this._comboBoxList) === null || _c === void 0 ? void 0 : _c.selectCurrentOption();
|
|
414
|
+
}
|
|
491
415
|
break;
|
|
492
416
|
case "Escape":
|
|
493
|
-
this.
|
|
417
|
+
if (this.isOpen) {
|
|
418
|
+
event.preventDefault();
|
|
419
|
+
(_d = this._popover) === null || _d === void 0 ? void 0 : _d.hide();
|
|
420
|
+
}
|
|
494
421
|
break;
|
|
495
422
|
case "Tab":
|
|
496
423
|
this._tabPressed = true;
|
|
424
|
+
if (this.isOpen) {
|
|
425
|
+
(_e = this._comboBoxList) === null || _e === void 0 ? void 0 : _e.selectCurrentOption();
|
|
426
|
+
(_f = this._popover) === null || _f === void 0 ? void 0 : _f.hide();
|
|
427
|
+
}
|
|
497
428
|
break;
|
|
498
429
|
}
|
|
499
|
-
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
500
|
-
//Por exemplo, quando o usuário dá um Enter, além de selecionar
|
|
501
|
-
//um valor, também significa que a ateração finalizou,
|
|
502
|
-
//e o contexto pode reagir (fechar um popup por exemplo).
|
|
503
|
-
//event.stopPropagation();
|
|
504
430
|
}
|
|
505
431
|
onTextInputFocusOutHandler() {
|
|
506
432
|
if (this.hideErrorOnFocusOut)
|
|
@@ -509,14 +435,15 @@ export class EzComboBox {
|
|
|
509
435
|
canShowListOptions() {
|
|
510
436
|
return !this._showLoading && this._visibleOptions.length > 0;
|
|
511
437
|
}
|
|
438
|
+
openPopover() {
|
|
439
|
+
var _a;
|
|
440
|
+
this.isOpen = true;
|
|
441
|
+
(_a = this._popover) === null || _a === void 0 ? void 0 : _a.show();
|
|
442
|
+
}
|
|
512
443
|
render() {
|
|
444
|
+
var _a;
|
|
513
445
|
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
514
|
-
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : ""
|
|
515
|
-
&& this._visibleOptions.length === 0
|
|
516
|
-
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
|
|
517
|
-
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), this.showOptionValue
|
|
518
|
-
? h("span", { class: "item__value item__value--hidden", ref: elem => this._itemValueBasis = elem })
|
|
519
|
-
: undefined, this.canShowListOptions() && this._visibleOptions.map((opt, index) => this.buildItem(opt, index)))))));
|
|
446
|
+
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: `text-input-slot-container ${this.suppressSearch ? "suppressed-search-input" : ""}`, ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "chevron-down" }))), h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this._textInput, autoClose: true, boxWidth: 'fit-content', overlayType: 'none', onEzVisibilityChange: event => this.isOpen = event.detail }, h("ez-combo-box-list", { ref: ref => this._comboBoxList = ref, showLoading: this._showLoading, visibleOptions: this._visibleOptions, textEmptyList: this._textEmptyList, showOptionValue: this.showOptionValue, preSelection: this._preSelection, maxWidth: this._maxWidthValue, width: (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.clientWidth, onOptionSelect: (opt) => this.selectOption(opt), onOptionHover: (index) => this._preSelection = index }))));
|
|
520
447
|
}
|
|
521
448
|
static get is() { return "ez-combo-box"; }
|
|
522
449
|
static get encapsulation() { return "shadow"; }
|
|
@@ -745,6 +672,24 @@ export class EzComboBox {
|
|
|
745
672
|
"reflect": false,
|
|
746
673
|
"defaultValue": "false"
|
|
747
674
|
},
|
|
675
|
+
"stopPropagateEnterKeyEvent": {
|
|
676
|
+
"type": "boolean",
|
|
677
|
+
"mutable": false,
|
|
678
|
+
"complexType": {
|
|
679
|
+
"original": "boolean",
|
|
680
|
+
"resolved": "boolean",
|
|
681
|
+
"references": {}
|
|
682
|
+
},
|
|
683
|
+
"required": false,
|
|
684
|
+
"optional": false,
|
|
685
|
+
"docs": {
|
|
686
|
+
"tags": [],
|
|
687
|
+
"text": "Se true, ineterrompe a propaga\u00E7\u00E3o do evento de KeyDown da tecla enter"
|
|
688
|
+
},
|
|
689
|
+
"attribute": "stop-propagate-enter-key-event",
|
|
690
|
+
"reflect": false,
|
|
691
|
+
"defaultValue": "true"
|
|
692
|
+
},
|
|
748
693
|
"canShowError": {
|
|
749
694
|
"type": "boolean",
|
|
750
695
|
"mutable": false,
|
|
@@ -835,16 +780,36 @@ export class EzComboBox {
|
|
|
835
780
|
"attribute": "is-text-search",
|
|
836
781
|
"reflect": false,
|
|
837
782
|
"defaultValue": "false"
|
|
783
|
+
},
|
|
784
|
+
"autoFocus": {
|
|
785
|
+
"type": "boolean",
|
|
786
|
+
"mutable": false,
|
|
787
|
+
"complexType": {
|
|
788
|
+
"original": "boolean",
|
|
789
|
+
"resolved": "boolean",
|
|
790
|
+
"references": {}
|
|
791
|
+
},
|
|
792
|
+
"required": false,
|
|
793
|
+
"optional": false,
|
|
794
|
+
"docs": {
|
|
795
|
+
"tags": [],
|
|
796
|
+
"text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
|
|
797
|
+
},
|
|
798
|
+
"attribute": "auto-focus",
|
|
799
|
+
"reflect": false,
|
|
800
|
+
"defaultValue": "false"
|
|
838
801
|
}
|
|
839
802
|
};
|
|
840
803
|
}
|
|
841
804
|
static get states() {
|
|
842
805
|
return {
|
|
806
|
+
"isOpen": {},
|
|
843
807
|
"_preSelection": {},
|
|
844
808
|
"_visibleOptions": {},
|
|
845
809
|
"_startLoading": {},
|
|
846
810
|
"_showLoading": {},
|
|
847
|
-
"_criteria": {}
|
|
811
|
+
"_criteria": {},
|
|
812
|
+
"_textInputReady": {}
|
|
848
813
|
};
|
|
849
814
|
}
|
|
850
815
|
static get events() {
|
|
@@ -889,11 +854,18 @@ export class EzComboBox {
|
|
|
889
854
|
},
|
|
890
855
|
"setFocus": {
|
|
891
856
|
"complexType": {
|
|
892
|
-
"signature": "() => Promise<void>",
|
|
893
|
-
"parameters": [
|
|
857
|
+
"signature": "(options?: TFocusOptions) => Promise<void>",
|
|
858
|
+
"parameters": [{
|
|
859
|
+
"tags": [],
|
|
860
|
+
"text": ""
|
|
861
|
+
}],
|
|
894
862
|
"references": {
|
|
895
863
|
"Promise": {
|
|
896
864
|
"location": "global"
|
|
865
|
+
},
|
|
866
|
+
"TFocusOptions": {
|
|
867
|
+
"location": "import",
|
|
868
|
+
"path": "../ez-text-input/ez-text-input"
|
|
897
869
|
}
|
|
898
870
|
},
|
|
899
871
|
"return": "Promise<void>"
|
|
@@ -966,15 +938,6 @@ export class EzComboBox {
|
|
|
966
938
|
"methodName": "observeOptions"
|
|
967
939
|
}];
|
|
968
940
|
}
|
|
969
|
-
static get listeners() {
|
|
970
|
-
return [{
|
|
971
|
-
"name": "scroll",
|
|
972
|
-
"method": "scrollListener",
|
|
973
|
-
"target": "window",
|
|
974
|
-
"capture": true,
|
|
975
|
-
"passive": true
|
|
976
|
-
}];
|
|
977
|
-
}
|
|
978
941
|
}
|
|
979
942
|
var SearchMode;
|
|
980
943
|
(function (SearchMode) {
|
|
@@ -12,6 +12,7 @@ export class EzDateInput {
|
|
|
12
12
|
this.errorMessage = undefined;
|
|
13
13
|
this.mode = "regular";
|
|
14
14
|
this.canShowError = true;
|
|
15
|
+
this.autoFocus = false;
|
|
15
16
|
}
|
|
16
17
|
observeLabel() {
|
|
17
18
|
if (this._textInput) {
|
|
@@ -48,8 +49,8 @@ export class EzDateInput {
|
|
|
48
49
|
/**
|
|
49
50
|
* Aplica o foco no campo.
|
|
50
51
|
*/
|
|
51
|
-
async setFocus() {
|
|
52
|
-
this._textInput.setFocus();
|
|
52
|
+
async setFocus(options) {
|
|
53
|
+
this._textInput.setFocus(options);
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
55
56
|
* Remove o foco do campo.
|
|
@@ -81,6 +82,9 @@ export class EzDateInput {
|
|
|
81
82
|
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
82
83
|
this.value = newValueValidated;
|
|
83
84
|
}
|
|
85
|
+
else {
|
|
86
|
+
this._changePending = false;
|
|
87
|
+
}
|
|
84
88
|
}
|
|
85
89
|
showCalendar() {
|
|
86
90
|
this.handleBlur();
|
|
@@ -164,6 +168,11 @@ export class EzDateInput {
|
|
|
164
168
|
componentDidLoad() {
|
|
165
169
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
166
170
|
this.setInputValue();
|
|
171
|
+
if (this.autoFocus) {
|
|
172
|
+
requestAnimationFrame(() => {
|
|
173
|
+
this.setFocus({ selectText: true });
|
|
174
|
+
});
|
|
175
|
+
}
|
|
167
176
|
}
|
|
168
177
|
render() {
|
|
169
178
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
@@ -289,6 +298,24 @@ export class EzDateInput {
|
|
|
289
298
|
"attribute": "can-show-error",
|
|
290
299
|
"reflect": true,
|
|
291
300
|
"defaultValue": "true"
|
|
301
|
+
},
|
|
302
|
+
"autoFocus": {
|
|
303
|
+
"type": "boolean",
|
|
304
|
+
"mutable": false,
|
|
305
|
+
"complexType": {
|
|
306
|
+
"original": "boolean",
|
|
307
|
+
"resolved": "boolean",
|
|
308
|
+
"references": {}
|
|
309
|
+
},
|
|
310
|
+
"required": false,
|
|
311
|
+
"optional": false,
|
|
312
|
+
"docs": {
|
|
313
|
+
"tags": [],
|
|
314
|
+
"text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
|
|
315
|
+
},
|
|
316
|
+
"attribute": "auto-focus",
|
|
317
|
+
"reflect": false,
|
|
318
|
+
"defaultValue": "false"
|
|
292
319
|
}
|
|
293
320
|
};
|
|
294
321
|
}
|
|
@@ -353,11 +380,18 @@ export class EzDateInput {
|
|
|
353
380
|
return {
|
|
354
381
|
"setFocus": {
|
|
355
382
|
"complexType": {
|
|
356
|
-
"signature": "() => Promise<void>",
|
|
357
|
-
"parameters": [
|
|
383
|
+
"signature": "(options?: TFocusOptions) => Promise<void>",
|
|
384
|
+
"parameters": [{
|
|
385
|
+
"tags": [],
|
|
386
|
+
"text": ""
|
|
387
|
+
}],
|
|
358
388
|
"references": {
|
|
359
389
|
"Promise": {
|
|
360
390
|
"location": "global"
|
|
391
|
+
},
|
|
392
|
+
"TFocusOptions": {
|
|
393
|
+
"location": "import",
|
|
394
|
+
"path": "../ez-text-input/ez-text-input"
|
|
361
395
|
}
|
|
362
396
|
},
|
|
363
397
|
"return": "Promise<void>"
|
|
@@ -13,6 +13,7 @@ export class EzDateTimeInput {
|
|
|
13
13
|
this.showSeconds = false;
|
|
14
14
|
this.mode = "regular";
|
|
15
15
|
this.canShowError = true;
|
|
16
|
+
this.autoFocus = false;
|
|
16
17
|
}
|
|
17
18
|
observeLabel() {
|
|
18
19
|
if (this._textInput) {
|
|
@@ -49,8 +50,8 @@ export class EzDateTimeInput {
|
|
|
49
50
|
/**
|
|
50
51
|
* Aplica o foco no campo.
|
|
51
52
|
*/
|
|
52
|
-
async setFocus() {
|
|
53
|
-
this._textInput.setFocus();
|
|
53
|
+
async setFocus(options) {
|
|
54
|
+
this._textInput.setFocus(options);
|
|
54
55
|
}
|
|
55
56
|
/**
|
|
56
57
|
* Remove o foco do campo.
|
|
@@ -217,6 +218,11 @@ export class EzDateTimeInput {
|
|
|
217
218
|
componentDidLoad() {
|
|
218
219
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
219
220
|
this.setInputValue();
|
|
221
|
+
if (this.autoFocus) {
|
|
222
|
+
requestAnimationFrame(() => {
|
|
223
|
+
this.setFocus({ selectText: true });
|
|
224
|
+
});
|
|
225
|
+
}
|
|
220
226
|
}
|
|
221
227
|
render() {
|
|
222
228
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
@@ -360,6 +366,24 @@ export class EzDateTimeInput {
|
|
|
360
366
|
"attribute": "can-show-error",
|
|
361
367
|
"reflect": true,
|
|
362
368
|
"defaultValue": "true"
|
|
369
|
+
},
|
|
370
|
+
"autoFocus": {
|
|
371
|
+
"type": "boolean",
|
|
372
|
+
"mutable": false,
|
|
373
|
+
"complexType": {
|
|
374
|
+
"original": "boolean",
|
|
375
|
+
"resolved": "boolean",
|
|
376
|
+
"references": {}
|
|
377
|
+
},
|
|
378
|
+
"required": false,
|
|
379
|
+
"optional": false,
|
|
380
|
+
"docs": {
|
|
381
|
+
"tags": [],
|
|
382
|
+
"text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
|
|
383
|
+
},
|
|
384
|
+
"attribute": "auto-focus",
|
|
385
|
+
"reflect": false,
|
|
386
|
+
"defaultValue": "false"
|
|
363
387
|
}
|
|
364
388
|
};
|
|
365
389
|
}
|
|
@@ -424,11 +448,18 @@ export class EzDateTimeInput {
|
|
|
424
448
|
return {
|
|
425
449
|
"setFocus": {
|
|
426
450
|
"complexType": {
|
|
427
|
-
"signature": "() => Promise<void>",
|
|
428
|
-
"parameters": [
|
|
451
|
+
"signature": "(options?: TFocusOptions) => Promise<void>",
|
|
452
|
+
"parameters": [{
|
|
453
|
+
"tags": [],
|
|
454
|
+
"text": ""
|
|
455
|
+
}],
|
|
429
456
|
"references": {
|
|
430
457
|
"Promise": {
|
|
431
458
|
"location": "global"
|
|
459
|
+
},
|
|
460
|
+
"TFocusOptions": {
|
|
461
|
+
"location": "import",
|
|
462
|
+
"path": "../ez-text-input/ez-text-input"
|
|
432
463
|
}
|
|
433
464
|
},
|
|
434
465
|
"return": "Promise<void>"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/* Container */
|
|
4
4
|
/*@doc Define o espaçamento do container.*/
|
|
5
|
-
--dialog__container-padding: var(--space--
|
|
5
|
+
--dialog__container-padding: var(--space--md, 20px);
|
|
6
6
|
|
|
7
7
|
/* Botões */
|
|
8
8
|
/*@doc Define a cor de fundo do botão de fechar.*/
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
/*@doc Define o peso do texto da mensagem.*/
|
|
32
32
|
--dialog__body--text-weight--medium: var(--text-weight--medium, 400);
|
|
33
33
|
/*@doc Define o espaçamento inferior do texto da mensagem.*/
|
|
34
|
-
--dialog__body--padding-bottom: var(--space--
|
|
34
|
+
--dialog__body--padding-bottom: var(--space--medium, 12px);
|
|
35
35
|
/*@doc Define o tamanho do texto da mensagem.*/
|
|
36
36
|
--dialog__body--font-size: var(--text--medium, 14px);
|
|
37
37
|
/*@doc Define a cor do texto da mensagem.*/
|
|
@@ -141,7 +141,7 @@ h2 {
|
|
|
141
141
|
color: var(--dialog__body--color);
|
|
142
142
|
max-height: 30vh;
|
|
143
143
|
content-visibility: auto;
|
|
144
|
-
margin-bottom:
|
|
144
|
+
margin-bottom: var(--space--medium);
|
|
145
145
|
overflow-y: auto;
|
|
146
146
|
}
|
|
147
147
|
|