@sankhyalabs/ezui 5.22.0-dev.8 → 5.22.0-dev.80
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/DataBinder-e92314c2.js +445 -0
- package/dist/cjs/FocusResolver-885f2173.js +35 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +3 -2
- 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.cjs.entry.js +67 -13
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +35 -5
- package/dist/cjs/ez-date-input.cjs.entry.js +14 -4
- package/dist/cjs/ez-date-time-input.cjs.entry.js +11 -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 +130 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +29 -22
- package/dist/cjs/ez-form.cjs.entry.js +6 -325
- package/dist/cjs/ez-grid.cjs.entry.js +14861 -69696
- 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 -1
- package/dist/cjs/ez-modal.cjs.entry.js +19 -4
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -2
- package/dist/cjs/ez-number-input.cjs.entry.js +15 -2
- 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 +108 -47
- 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 +5 -2
- 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 +153 -16
- package/dist/cjs/ez-time-input.cjs.entry.js +8 -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 +2 -2
- package/dist/cjs/index-a7b0c73d.js +16 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -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.css +13 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +130 -15
- package/dist/collection/components/ez-date-input/ez-date-input.css +1 -1
- package/dist/collection/components/ez-date-input/ez-date-input.js +58 -5
- 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 +55 -5
- 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.js +55 -5
- 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 +292 -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/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 +47 -8
- package/dist/collection/components/ez-grid/ez-grid.js +280 -9
- package/dist/collection/components/ez-grid/subcomponents/filter-column.css +4 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +1 -1
- package/dist/collection/components/ez-icon/ez-icon.css +155 -149
- package/dist/collection/components/ez-list/ez-list.css +2 -1
- 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 +5 -1
- package/dist/collection/components/ez-modal/ez-modal.js +38 -5
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +20 -1
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +2 -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 +68 -1
- 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 +21 -10
- package/dist/collection/components/ez-search/ez-search.js +211 -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 +3 -1
- package/dist/collection/components/ez-skeleton/ez-skeleton.css +54 -34
- package/dist/collection/components/ez-split-button/ez-split-button.css +50 -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 +185 -15
- package/dist/collection/components/ez-time-input/ez-time-input.js +44 -1
- 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/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 +12 -0
- package/dist/custom-elements/index.js +16502 -70294
- package/dist/esm/DataBinder-9c877244.js +441 -0
- package/dist/esm/FocusResolver-1ccbf850.js +33 -0
- package/dist/esm/ez-actions-button.entry.js +3 -2
- 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.entry.js +68 -14
- package/dist/esm/ez-custom-form-input_2.entry.js +36 -6
- package/dist/esm/ez-date-input.entry.js +14 -4
- package/dist/esm/ez-date-time-input.entry.js +11 -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 +126 -0
- package/dist/esm/ez-form-view.entry.js +29 -22
- package/dist/esm/ez-form.entry.js +5 -324
- package/dist/esm/ez-grid.entry.js +14891 -69726
- 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 -1
- package/dist/esm/ez-modal.entry.js +19 -4
- package/dist/esm/ez-multi-selection-list.entry.js +2 -2
- package/dist/esm/ez-number-input.entry.js +15 -2
- 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 +108 -47
- 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 +5 -2
- 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 +153 -16
- package/dist/esm/ez-time-input.entry.js +8 -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 +2 -2
- package/dist/esm/index-baa5e267.js +16 -8
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-14b769d7.entry.js +1 -0
- package/dist/ezui/p-16e612fc.entry.js +1 -0
- package/dist/ezui/p-17eabf46.entry.js +1 -0
- package/dist/ezui/p-2475fd6e.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-35464ae8.entry.js +1 -0
- package/dist/ezui/p-354abfe8.entry.js +1 -0
- package/dist/ezui/{p-baf80b13.entry.js → p-35d467a8.entry.js} +1 -1
- package/dist/ezui/p-3f2dd525.entry.js +1 -0
- package/dist/ezui/p-420f97ff.entry.js +1 -0
- package/dist/ezui/p-50d83a46.entry.js +1 -0
- package/dist/ezui/p-654b3f99.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-6d79930d.entry.js +1 -0
- package/dist/ezui/p-6f22a385.entry.js +1 -0
- package/dist/ezui/p-7409eeaa.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-a6fe527a.entry.js +1 -0
- package/dist/ezui/p-acddfb2e.js +1 -0
- package/dist/ezui/p-b6597f49.entry.js +309 -0
- package/dist/ezui/p-b6a4e6de.entry.js +1 -0
- package/dist/ezui/p-c3045972.entry.js +1 -0
- package/dist/ezui/p-ca6340a9.entry.js +1 -0
- package/dist/ezui/p-cf87aacb.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-dc8b36c3.entry.js +1 -0
- package/dist/ezui/{p-84e439b9.entry.js → p-e347df9c.entry.js} +1 -1
- package/dist/ezui/p-e3e3fd7a.entry.js +1 -0
- package/dist/ezui/p-ea54d056.entry.js +1 -0
- package/dist/ezui/p-f43dbada.entry.js +1 -0
- package/dist/ezui/p-fa6732f2.entry.js +1 -0
- package/dist/ezui/p-fec696ab.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.d.ts +16 -1
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +10 -1
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +10 -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 +10 -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 +49 -1
- 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 +7 -1
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +4 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +12 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +8 -1
- package/dist/types/components/ez-search/ez-search.d.ts +34 -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 +28 -2
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +8 -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 +486 -27
- 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 +12 -4
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -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-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-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-30775e7f.entry.js +0 -1
- package/dist/ezui/p-32e553e5.entry.js +0 -304
- package/dist/ezui/p-3b4eeeb6.entry.js +0 -1
- package/dist/ezui/p-3faa2b46.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-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-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-f3c526cc.entry.js +0 -1
- package/dist/ezui/p-fcf0acce.entry.js +0 -1
|
@@ -7,7 +7,7 @@ import './CheckMode-bdb2ec19.js';
|
|
|
7
7
|
import './ICustomRender-875b5a40.js';
|
|
8
8
|
import { R as REQUIRED_INFO } from './constants-4e0d35b7.js';
|
|
9
9
|
|
|
10
|
-
const ezSearchCss = ":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)
|
|
10
|
+
const ezSearchCss = ":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}}";
|
|
11
11
|
|
|
12
12
|
const EzSearch = class {
|
|
13
13
|
constructor(hostRef) {
|
|
@@ -26,24 +26,30 @@ const EzSearch = class {
|
|
|
26
26
|
this._visibleOptions = undefined;
|
|
27
27
|
this._startLoading = false;
|
|
28
28
|
this._showLoading = true;
|
|
29
|
+
this._showLoadingDescription = false;
|
|
29
30
|
this._criteria = undefined;
|
|
30
31
|
this.value = undefined;
|
|
31
32
|
this.label = undefined;
|
|
32
33
|
this.enabled = true;
|
|
33
34
|
this.errorMessage = undefined;
|
|
34
35
|
this.optionLoader = undefined;
|
|
36
|
+
this.contextProperties = undefined;
|
|
35
37
|
this.showSelectedValue = true;
|
|
36
38
|
this.showOptionValue = true;
|
|
37
39
|
this.suppressEmptyOption = false;
|
|
40
|
+
this.stopPropagateEnterKeyEvent = false;
|
|
38
41
|
this.mode = "regular";
|
|
39
42
|
this.canShowError = true;
|
|
40
43
|
this.hideErrorOnFocusOut = true;
|
|
41
44
|
this.listOptionsPosition = undefined;
|
|
42
45
|
this.isTextSearch = false;
|
|
43
46
|
this.ignoreLimitCharsToSearch = false;
|
|
47
|
+
this.noMargin = false;
|
|
44
48
|
this.options = undefined;
|
|
45
49
|
this.suppressSearch = false;
|
|
46
|
-
this.
|
|
50
|
+
this.ensureClearButtonVisible = false;
|
|
51
|
+
this.suppressPreLoad = true;
|
|
52
|
+
this.autoFocus = false;
|
|
47
53
|
}
|
|
48
54
|
observeErrorMessage() {
|
|
49
55
|
var _a;
|
|
@@ -54,12 +60,21 @@ const EzSearch = class {
|
|
|
54
60
|
}
|
|
55
61
|
}
|
|
56
62
|
}
|
|
63
|
+
getValue(val) {
|
|
64
|
+
return typeof val === 'object' ? val === null || val === void 0 ? void 0 : val.value : val;
|
|
65
|
+
}
|
|
57
66
|
validateNewValue(newValue, oldValue) {
|
|
58
|
-
const
|
|
59
|
-
|
|
67
|
+
const parsedNewValue = this.getValue(newValue);
|
|
68
|
+
const parsedOldValue = this.getValue(oldValue);
|
|
69
|
+
const newValueIsValid = parsedNewValue !== "[object Object]";
|
|
70
|
+
const valuesIsDifferent = parsedNewValue !== parsedOldValue;
|
|
71
|
+
if (newValueIsValid && valuesIsDifferent) {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
return false;
|
|
60
75
|
}
|
|
61
76
|
async observeValue(newValue, oldValue) {
|
|
62
|
-
if (this._textInput &&
|
|
77
|
+
if (this._textInput && this.validateNewValue(newValue, oldValue)) {
|
|
63
78
|
if (typeof newValue === "string") {
|
|
64
79
|
await this.handleValueAsString(newValue);
|
|
65
80
|
return;
|
|
@@ -76,7 +91,7 @@ const EzSearch = class {
|
|
|
76
91
|
}
|
|
77
92
|
}
|
|
78
93
|
observeOptions(newOptions, oldOptions) {
|
|
79
|
-
if (!newOptions.length && this.
|
|
94
|
+
if (!newOptions.length && this.suppressPreLoad)
|
|
80
95
|
return;
|
|
81
96
|
if ((newOptions === null || newOptions === void 0 ? void 0 : newOptions.join('')) === (oldOptions === null || oldOptions === void 0 ? void 0 : oldOptions.join('')))
|
|
82
97
|
return;
|
|
@@ -102,9 +117,9 @@ const EzSearch = class {
|
|
|
102
117
|
/**
|
|
103
118
|
* Aplica o foco no campo.
|
|
104
119
|
*/
|
|
105
|
-
async setFocus() {
|
|
120
|
+
async setFocus(options) {
|
|
106
121
|
if (this._textInput) {
|
|
107
|
-
this._textInput.setFocus();
|
|
122
|
+
this._textInput.setFocus(options);
|
|
108
123
|
}
|
|
109
124
|
}
|
|
110
125
|
/**
|
|
@@ -147,6 +162,9 @@ const EzSearch = class {
|
|
|
147
162
|
return;
|
|
148
163
|
}
|
|
149
164
|
await this.loadDescriptionValue(value);
|
|
165
|
+
if (!this._currentValue) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
150
168
|
this.setInputValue();
|
|
151
169
|
this.ezChange.emit(this.value);
|
|
152
170
|
this._currentValue = this.value;
|
|
@@ -191,7 +209,7 @@ const EzSearch = class {
|
|
|
191
209
|
return this.listOptionsPosition;
|
|
192
210
|
}
|
|
193
211
|
return {
|
|
194
|
-
verticalPosition:
|
|
212
|
+
verticalPosition: 6
|
|
195
213
|
};
|
|
196
214
|
}
|
|
197
215
|
isDifferentValues(firstValue, secondValue) {
|
|
@@ -201,13 +219,16 @@ const EzSearch = class {
|
|
|
201
219
|
if (currentValue == undefined) {
|
|
202
220
|
return;
|
|
203
221
|
}
|
|
204
|
-
let text = (!this.showSelectedValue || currentValue.value == undefined) ? currentValue.label : `${currentValue.value} - ${currentValue.label}
|
|
205
|
-
text = text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
|
|
222
|
+
let text = (!this.showSelectedValue || currentValue.value == undefined) ? currentValue.label : currentValue.label ? `${currentValue.value} - ${currentValue.label}` : currentValue.value;
|
|
223
|
+
text = text === null || text === void 0 ? void 0 : text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
|
|
206
224
|
return text;
|
|
207
225
|
}
|
|
208
226
|
getText() {
|
|
209
227
|
const currentValue = this.getSelectedOption(this._currentValue);
|
|
210
228
|
const text = this.getFormattedText(currentValue);
|
|
229
|
+
return this.replaceQuotes(text);
|
|
230
|
+
}
|
|
231
|
+
replaceQuotes(text) {
|
|
211
232
|
if (text == undefined) {
|
|
212
233
|
return;
|
|
213
234
|
}
|
|
@@ -278,7 +299,7 @@ const EzSearch = class {
|
|
|
278
299
|
title: opt.label,
|
|
279
300
|
details: opt.details
|
|
280
301
|
};
|
|
281
|
-
return h("div", { style: { "height": "100%" }, class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createOption(card), onMouseOver: () => this._preSelection = index }, h("ez-card-item", { item: card }));
|
|
302
|
+
return h("div", { style: { "height": "100%" }, class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createOption(card), onMouseOver: () => this._preSelection = index }, h("ez-card-item", { item: card, compacted: true, enableKey: this.showOptionValue }));
|
|
282
303
|
}
|
|
283
304
|
showOptions() {
|
|
284
305
|
if (!this.enabled)
|
|
@@ -343,10 +364,13 @@ const EzSearch = class {
|
|
|
343
364
|
this._startLoading = false;
|
|
344
365
|
if (source instanceof Promise) {
|
|
345
366
|
this._showLoading = true;
|
|
367
|
+
this._showLoadingDescription = true;
|
|
346
368
|
source.then(result => {
|
|
347
|
-
this._showLoading = false;
|
|
348
369
|
this.updateSource(result);
|
|
349
|
-
}).
|
|
370
|
+
}).finally(() => {
|
|
371
|
+
this._showLoading = false;
|
|
372
|
+
this._showLoadingDescription = false;
|
|
373
|
+
});
|
|
350
374
|
this.updateVisibleOptions();
|
|
351
375
|
}
|
|
352
376
|
else {
|
|
@@ -356,7 +380,7 @@ const EzSearch = class {
|
|
|
356
380
|
this.updateVisibleOptions();
|
|
357
381
|
if (this._tabPressed) {
|
|
358
382
|
this._tabPressed = false;
|
|
359
|
-
this.controlEmptySearch();
|
|
383
|
+
this.controlEmptySearch(false);
|
|
360
384
|
}
|
|
361
385
|
}
|
|
362
386
|
else {
|
|
@@ -371,15 +395,16 @@ const EzSearch = class {
|
|
|
371
395
|
replaceHighlight(value) {
|
|
372
396
|
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
373
397
|
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
374
|
-
return (value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
398
|
+
return String(value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
375
399
|
}
|
|
376
|
-
selectOption(newOption) {
|
|
400
|
+
selectOption(newOption, focusOnInput = true) {
|
|
377
401
|
var _a, _b;
|
|
378
402
|
const currentValue = this.getSelectedOption(this.value);
|
|
379
403
|
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.value), label: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.label) });
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
404
|
+
const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: this.replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value), label: this.replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label) });
|
|
405
|
+
if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) === null || _b === void 0 ? void 0 : _b.toString()))
|
|
406
|
+
|| (currentValue == undefined && newOptionsFormatted != undefined && "value" in newOptionsFormatted)) {
|
|
407
|
+
const adjustedOpt = !(newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) ? undefined : newOptionsFormatted;
|
|
383
408
|
this.value = adjustedOpt;
|
|
384
409
|
this._currentValue = adjustedOpt;
|
|
385
410
|
}
|
|
@@ -389,13 +414,18 @@ const EzSearch = class {
|
|
|
389
414
|
}
|
|
390
415
|
this._visibleOptions = [];
|
|
391
416
|
this.clearSource();
|
|
417
|
+
if (focusOnInput) {
|
|
418
|
+
setTimeout(() => {
|
|
419
|
+
this.setFocus();
|
|
420
|
+
}, 0);
|
|
421
|
+
}
|
|
392
422
|
}
|
|
393
423
|
loadOptions(mode, argument = "") {
|
|
394
424
|
this._criteria = argument;
|
|
395
425
|
this._startLoading = true;
|
|
396
426
|
if (this.optionLoader) {
|
|
397
427
|
const searchArgument = { mode, argument };
|
|
398
|
-
this.updateSource(this.optionLoader(searchArgument));
|
|
428
|
+
this.updateSource(this.optionLoader(searchArgument, this.contextProperties));
|
|
399
429
|
}
|
|
400
430
|
else {
|
|
401
431
|
this.updateSource(this.options);
|
|
@@ -425,7 +455,7 @@ const EzSearch = class {
|
|
|
425
455
|
this.value = null;
|
|
426
456
|
this._currentValue = null;
|
|
427
457
|
}
|
|
428
|
-
controlListWithOnlyOne() {
|
|
458
|
+
controlListWithOnlyOne(focusOnInput = true) {
|
|
429
459
|
var _a, _b;
|
|
430
460
|
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
431
461
|
if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
|
|
@@ -436,32 +466,19 @@ const EzSearch = class {
|
|
|
436
466
|
value: (_b = source[0].value) === null || _b === void 0 ? void 0 : _b.replace(startHighlight, '').replace(endHighlight, ''),
|
|
437
467
|
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
438
468
|
};
|
|
439
|
-
this.selectOption(option);
|
|
469
|
+
this.selectOption(option, focusOnInput);
|
|
440
470
|
}
|
|
441
471
|
}
|
|
442
|
-
controlEmptySearch() {
|
|
472
|
+
controlEmptySearch(focusOnInput = true) {
|
|
443
473
|
var _a;
|
|
444
474
|
if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
445
475
|
this.clearSearch();
|
|
446
476
|
ApplicationUtils.info(this._textEmptyList);
|
|
447
477
|
}
|
|
448
478
|
else {
|
|
449
|
-
this.controlListWithOnlyOne();
|
|
479
|
+
this.controlListWithOnlyOne(focusOnInput);
|
|
450
480
|
}
|
|
451
481
|
}
|
|
452
|
-
validateDescriptionValue() {
|
|
453
|
-
if (StringUtils.isEmpty(this.value)) {
|
|
454
|
-
return;
|
|
455
|
-
}
|
|
456
|
-
if (!this.validateNewValue(this.value, this._currentValue)) {
|
|
457
|
-
return;
|
|
458
|
-
}
|
|
459
|
-
let value = this.value;
|
|
460
|
-
if (typeof value === "object") {
|
|
461
|
-
return;
|
|
462
|
-
}
|
|
463
|
-
this.loadDescriptionValue(value);
|
|
464
|
-
}
|
|
465
482
|
async loadDescriptionValue(argument) {
|
|
466
483
|
var _a, _b;
|
|
467
484
|
if (argument == undefined) {
|
|
@@ -475,7 +492,7 @@ const EzSearch = class {
|
|
|
475
492
|
mode: SearchMode.PREDICTIVE,
|
|
476
493
|
argument
|
|
477
494
|
};
|
|
478
|
-
const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument));
|
|
495
|
+
const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument, this.contextProperties));
|
|
479
496
|
if (source == undefined) {
|
|
480
497
|
return;
|
|
481
498
|
}
|
|
@@ -496,6 +513,15 @@ const EzSearch = class {
|
|
|
496
513
|
}
|
|
497
514
|
this._currentValue = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
|
|
498
515
|
this.value = this._currentValue;
|
|
516
|
+
this.setTextInputValue();
|
|
517
|
+
}
|
|
518
|
+
setTextInputValue() {
|
|
519
|
+
if (this._textInput && (this._textInput.value === null || this._textInput.value === undefined)) {
|
|
520
|
+
if (this.value === undefined || this.value === null)
|
|
521
|
+
return;
|
|
522
|
+
const textValue = (typeof this.value === 'string') ? this.value : this.getFormattedText(this.value);
|
|
523
|
+
this._textInput.value = this.replaceQuotes(textValue);
|
|
524
|
+
}
|
|
499
525
|
}
|
|
500
526
|
loadOptionValue(argument) {
|
|
501
527
|
var _a;
|
|
@@ -521,6 +547,19 @@ const EzSearch = class {
|
|
|
521
547
|
this._preSelection = undefined;
|
|
522
548
|
this.updateVisibleOptions();
|
|
523
549
|
}
|
|
550
|
+
async handleInitialValue() {
|
|
551
|
+
const valueIsValid = !!this.getValue(this.value);
|
|
552
|
+
if (!valueIsValid) {
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
if (typeof this.value === "string") {
|
|
556
|
+
await this.handleValueAsString(this.value);
|
|
557
|
+
return;
|
|
558
|
+
}
|
|
559
|
+
let text = this.getFormattedText(this.value);
|
|
560
|
+
text = this.replaceQuotes(text);
|
|
561
|
+
this._textInput.value = text;
|
|
562
|
+
}
|
|
524
563
|
//---------------------------------------------
|
|
525
564
|
// Lifecycle web component
|
|
526
565
|
//---------------------------------------------
|
|
@@ -551,12 +590,10 @@ const EzSearch = class {
|
|
|
551
590
|
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
552
591
|
ElementIDUtils.addIDInfoIfNotExists(elem, "itemSearch");
|
|
553
592
|
});
|
|
554
|
-
this.validateDescriptionValue();
|
|
555
593
|
}
|
|
556
|
-
componentDidLoad() {
|
|
594
|
+
async componentDidLoad() {
|
|
557
595
|
this._currentValue = this.value;
|
|
558
596
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
559
|
-
this.setInputValue(false);
|
|
560
597
|
this._resizeObserver = new ResizeObserver((entries) => {
|
|
561
598
|
window.requestAnimationFrame(() => {
|
|
562
599
|
if (!Array.isArray(entries) || !entries.length)
|
|
@@ -567,6 +604,16 @@ const EzSearch = class {
|
|
|
567
604
|
}
|
|
568
605
|
});
|
|
569
606
|
});
|
|
607
|
+
await this.handleInitialValue();
|
|
608
|
+
if (this.autoFocus) {
|
|
609
|
+
requestAnimationFrame(() => {
|
|
610
|
+
this.setFocus({ selectText: true });
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
disconnectedCallback() {
|
|
615
|
+
var _a;
|
|
616
|
+
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
570
617
|
}
|
|
571
618
|
//---------------------------------------------
|
|
572
619
|
// Event handlers
|
|
@@ -598,7 +645,7 @@ const EzSearch = class {
|
|
|
598
645
|
if (argument) {
|
|
599
646
|
this._showLoading = false;
|
|
600
647
|
this.clearSource();
|
|
601
|
-
if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
|
|
648
|
+
if (this.ignoreLimitCharsToSearch || !isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
|
|
602
649
|
this._showLoading = true;
|
|
603
650
|
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
604
651
|
this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
|
|
@@ -636,14 +683,19 @@ const EzSearch = class {
|
|
|
636
683
|
}
|
|
637
684
|
switch (event.key) {
|
|
638
685
|
case "ArrowDown":
|
|
639
|
-
this.nextOption();
|
|
640
686
|
event.stopPropagation();
|
|
687
|
+
if (this.canShowListOptions())
|
|
688
|
+
event.preventDefault();
|
|
689
|
+
this.nextOption();
|
|
641
690
|
break;
|
|
642
691
|
case "ArrowUp":
|
|
643
|
-
this.previousOption();
|
|
644
692
|
event.stopPropagation();
|
|
693
|
+
if (this.canShowListOptions())
|
|
694
|
+
event.preventDefault();
|
|
695
|
+
this.previousOption();
|
|
645
696
|
break;
|
|
646
697
|
case "Enter":
|
|
698
|
+
this.handleEventPropagation(event);
|
|
647
699
|
this.selectCurrentOption();
|
|
648
700
|
break;
|
|
649
701
|
case "Escape":
|
|
@@ -651,7 +703,7 @@ const EzSearch = class {
|
|
|
651
703
|
break;
|
|
652
704
|
case "Tab":
|
|
653
705
|
this._tabPressed = true;
|
|
654
|
-
this.controlListWithOnlyOne();
|
|
706
|
+
this.controlListWithOnlyOne(false);
|
|
655
707
|
break;
|
|
656
708
|
}
|
|
657
709
|
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
@@ -660,6 +712,12 @@ const EzSearch = class {
|
|
|
660
712
|
//e o contexto pode reagir (fechar um popup por exemplo).
|
|
661
713
|
//event.stopPropagation();
|
|
662
714
|
}
|
|
715
|
+
//O evento deve ter sua propagação interrompida, apenas se a lista de opções estiver sendo exibida.
|
|
716
|
+
handleEventPropagation(event) {
|
|
717
|
+
if (this._listContainer.hasChildNodes() && this.stopPropagateEnterKeyEvent) {
|
|
718
|
+
event.stopPropagation();
|
|
719
|
+
}
|
|
720
|
+
}
|
|
663
721
|
onTextInputFocusOutHandler() {
|
|
664
722
|
if (this.hideErrorOnFocusOut)
|
|
665
723
|
this.cancelPreselection();
|
|
@@ -667,10 +725,13 @@ const EzSearch = class {
|
|
|
667
725
|
canShowListOptions() {
|
|
668
726
|
return !this._showLoading && this._visibleOptions.length > 0;
|
|
669
727
|
}
|
|
728
|
+
canShowLoadSpinDescription() {
|
|
729
|
+
return this._showLoadingDescription && this._floatingID == undefined;
|
|
730
|
+
}
|
|
670
731
|
render() {
|
|
671
732
|
var _a;
|
|
672
733
|
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
673
|
-
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), 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: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "search" })), (((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value) || this.
|
|
734
|
+
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode, noMargin: this.noMargin }, h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, this.canShowLoadSpinDescription() ? h("div", { class: "message__loading" }) : h("ez-icon", { iconName: "search" })), (((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value) || this.ensureClearButtonVisible)
|
|
674
735
|
? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
|
675
736
|
: undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
|
|
676
737
|
&& this._visibleOptions.length === 0
|
|
@@ -28,7 +28,7 @@ const MESSAGES = {
|
|
|
28
28
|
PUSH_PIN_MENU: 'Fixar menu',
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
const ezSidebarNavigatorCss = ":host{--ez-sidebar-navigator--padding-left:var(--space--xs, 12px);--ez-sidebar-navigator--padding-right:var(--space--xs, 12px);--ez-sidebar-navigator--gap:var(--space--xs, 12px);--ez-sidebar-navigator--box-shadow:var(--shadow, 0px 0px 24px 0px #000);--ez-sidebar-navigator--background-color:var(--color--inverted);--ez-sidebar-navigator--border-radius:0px var(--border--radius-medium) var(--border--radius-medium) 0px;--ez-sidebar-navigator--height:calc(100vh - var(--space--lg, 24px));--ez-sidebar-navigator--header-gap:var(--space--xs, 12px);--ez-sidebar-navigator--footer-gap:var(--space--xs, 12px);--ez-ez-sidebar-navigator__title--font-family:var(--font-pattern, \"Roboto\");--ez-ez-sidebar-navigator__title--font-size:var(--title--medium, 16px);--ez-ez-sidebar-navigator__title--color:var(--title--primary, #2b3a54);--ez-ez-sidebar-navigator__title--font-weight:var(--text-weight--extra-large, 700)}.inverted{transform:rotate(180deg)}.ez-sidebar-navigator{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:var(--ez-sidebar-navigator--height);padding-top:var(--space--xs, 12px);padding-bottom:var(--space--xs, 12px);gap:var(--ez-sidebar-navigator--gap);padding-left:var(--ez-sidebar-navigator--padding-left);padding-right:var(--ez-sidebar-navigator--padding-right);background-color:var(--ez-sidebar-navigator--background-color);-webkit-box-shadow:var(--ez-sidebar-navigator--box-shadow);box-shadow:var(--ez-sidebar-navigator--box-shadow);border-radius:var(--ez-sidebar-navigator--border-radius)}.ez-sidebar-navigator__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;justify-content:space-between;gap:var(--ez-sidebar-navigator--header-gap)}.ez-sidebar-navigator__content{height:100%}.ez-sidebar-navigator__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--ez-sidebar-navigator--footer-gap)}.ez-sidebar-navigator__title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-family:var(--ez-ez-sidebar-navigator__title--font-family);font-size:var(--ez-ez-sidebar-navigator__title--font-size);font-weight:var(--ez-ez-sidebar-navigator__title--font-weight);color:var(--ez-ez-sidebar-navigator__title--color)}.ez-sidebar-navigator__end{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:auto;gap:var(--ez-sidebar-navigator--gap)}.dynamic{position:absolute;z-index:var(--
|
|
31
|
+
const ezSidebarNavigatorCss = ":host{--ez-sidebar-navigator--padding-left:var(--space--xs, 12px);--ez-sidebar-navigator--padding-right:var(--space--xs, 12px);--ez-sidebar-navigator--gap:var(--space--xs, 12px);--ez-sidebar-navigator--box-shadow:var(--shadow, 0px 0px 24px 0px #000);--ez-sidebar-navigator--background-color:var(--color--inverted);--ez-sidebar-navigator--border-radius:0px var(--border--radius-medium) var(--border--radius-medium) 0px;--ez-sidebar-navigator--height:calc(100vh - var(--space--lg, 24px));--ez-sidebar-navigator--z-index:var(--elevation--20, 20);--ez-sidebar-navigator--header-gap:var(--space--xs, 12px);--ez-sidebar-navigator--footer-gap:var(--space--xs, 12px);--ez-ez-sidebar-navigator__title--font-family:var(--font-pattern, \"Roboto\");--ez-ez-sidebar-navigator__title--font-size:var(--title--medium, 16px);--ez-ez-sidebar-navigator__title--color:var(--title--primary, #2b3a54);--ez-ez-sidebar-navigator__title--font-weight:var(--text-weight--extra-large, 700)}.inverted{transform:rotate(180deg)}.ez-sidebar-navigator{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:var(--ez-sidebar-navigator--height);padding-top:var(--space--xs, 12px);padding-bottom:var(--space--xs, 12px);gap:var(--ez-sidebar-navigator--gap);padding-left:var(--ez-sidebar-navigator--padding-left);padding-right:var(--ez-sidebar-navigator--padding-right);background-color:var(--ez-sidebar-navigator--background-color);-webkit-box-shadow:var(--ez-sidebar-navigator--box-shadow);box-shadow:var(--ez-sidebar-navigator--box-shadow);border-radius:var(--ez-sidebar-navigator--border-radius)}.ez-sidebar-navigator__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;justify-content:space-between;gap:var(--ez-sidebar-navigator--header-gap)}.ez-sidebar-navigator__content{height:100%}.ez-sidebar-navigator__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--ez-sidebar-navigator--footer-gap)}.ez-sidebar-navigator__title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-family:var(--ez-ez-sidebar-navigator__title--font-family);font-size:var(--ez-ez-sidebar-navigator__title--font-size);font-weight:var(--ez-ez-sidebar-navigator__title--font-weight);color:var(--ez-ez-sidebar-navigator__title--color)}.ez-sidebar-navigator__end{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:auto;gap:var(--ez-sidebar-navigator--gap)}.dynamic{position:absolute;z-index:var(--ez-sidebar-navigator--z-index)}.fixed{position:relative}.hidden{display:none}.show{animation:fadeIn .1s ease-in-out 1}@keyframes fadeIn{from{transform:translate(-100%)}}.sm{width:240px}.md{width:280px}.lg{width:320px}@media screen and (max-width: 991px){.responsive{width:240px}}@media screen and (min-width: 992px){.responsive{width:280px}}@media screen and (min-width: 1200px){.responsive{width:320px}}";
|
|
32
32
|
|
|
33
33
|
const EzSidebarNavigator = class {
|
|
34
34
|
constructor(hostRef) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-baa5e267.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
|
-
const ezSplitButtonCss = ":host{--ez-split-button--min-width:24;--ez-split-button--width:'auto';--ez-split-button__medium--height:32px;--ez-split-button__large--height:42px;--ez-split-button__medium-icon--width:40px;--ez-split-button__large-icon--width:44px;--ez-split-button__inline__icon--gap:6px;--ez-split-button__label--padding-top:0px;--ez-split-button__label--padding-bottom:0px;--ez-split-button__right-button--padding-left:8px;--ez-split-button--color:var(--title--primary, #
|
|
4
|
+
const ezSplitButtonCss = ":host{--ez-split-button--min-width:24;--ez-split-button--width:'auto';--ez-split-button__medium--height:32px;--ez-split-button__large--height:42px;--ez-split-button__medium-icon--width:40px;--ez-split-button__large-icon--width:44px;--ez-split-button__inline__icon--gap:6px;--ez-split-button__label--padding-top:0px;--ez-split-button__label--padding-bottom:0px;--ez-split-button__right-button--padding-left:8px;--ez-split-button--color:var(--title--primary, #2B3A54);--ez-split-button--font-size:var(--text--small, 12px);--ez-split-button--font-family:var(--font-pattern, Arial);--ez-split-button--font-weight:var(--text-weight--large);--ez-split-button--background-color:var(--background--light, #ffffff);--ez-split-button--border-radius:var(--border--radius-large, 24px);--ez-split-button--border:1px solid var(--color--strokes);--ez-split-button--justify-content:center;--ez-split-button--hover-color:var(--color--primary-600, #007a5a);--ez-split-button--hover--background-color:var(--background--light, #ffffff);--ez-split-button--disabled-color:var(--text--primary);--ez-split-button--disabled--background-color:var(--background--medium);--ez-split-button--focus--border:var(--border--medium, 2px) var(--color--primary-300);--ez-split-button--focus--box-shadow:none;--ez-split-button--active-color:var(--color--primary-700);--ez-split-button--active--background-color:var(--background--strong)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-split-button--min-width);width:var(--ez-split-button--width);height:var(--ez-split-button__medium--height);font-family:var(--ez-split-button--font-family);font-size:var(--ez-split-button--font-size);font-weight:var(--ez-split-button--font-weight);padding:var(--ez-split-button__label--padding-top) 0 var(--ez-split-button__label--padding-bottom) 0;border-top-left-radius:var(--ez-split-button--border-radius);border-bottom-left-radius:var(--ez-split-button--border-radius);background-color:var(--ez-split-button--background-color);color:var(--ez-split-button--color);fill:var(--ez-split-button--color);border:none;justify-content:var(--ez-split-button--justify-content)}label{cursor:pointer}button:active{outline:none;box-shadow:none;background-color:var(--ez-split-button--active--background-color);color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.ez-split-button__left-button{border:var(--ez-split-button--border);border-right:none}.ez-split-button__right-button{border:var(--ez-split-button--border);border-left:none}.ez-split-button__left-button:focus{box-shadow:0 0 0 2px var(--color--primary-300), \n 0 2px 0 0 var(--color--primary-300), \n 0 -2px 0 0 var(--color--primary-300);}.ez-split-button__right-button:focus{box-shadow:2px 0 0 0 var(--color--primary-300), \n 0 2px 0 0 var(--color--primary-300), \n 0 -2px 0 0 var(--color--primary-300);}.ez-split-button__left-button:hover,.ez-split-button__right-button:hover{outline:none;background-color:var(--ez-split-button--hover--background-color);color:var(--ez-split-button--hover-color);fill:var(--ez-split-button--hover-color);--ez-icon--color:var(--ez-split-button--hover-color)}.ez-split-button__left-button:active,.ez-split-button__right-button:active{outline:none;box-shadow:none;background-color:var(--ez-split-button--active--background-color);color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.ez-split-button__left-button:disabled,.ez-split-button__left-button:disabled label,.ez-split-button__right-button:disabled{background-color:var(--ez-split-button--disabled--background-color);color:var(--ez-split-button--disabled-color);fill:var(--ez-split-button--disabled-color);border:none;--ez-icon--color:var(--ez-split-button--disabled-color);cursor:not-allowed}.ez-split-button__left-button:disabled{border:var(--ez-split-button--disabled-border);border-right:none}.ez-split-button__right-button:disabled{border:var(--ez-split-button--disabled-border);border-left:none}button.large{height:var(--ez-split-button__large--height)}button.medium{height:var(--ez-split-button__medium--height)}.default label{padding:var(--ez-split-button__label--padding-top) 12px var(--ez-split-button__label--padding-bottom) 20px}.icon-left{gap:var(--ez-split-button__inline__icon--gap)}.icon-left label{padding-right:12px}.icon-left ez-icon{padding-left:20px}.icon-only{padding-left:12px;padding-right:12px}.ez-split-button__right-button{border-top-right-radius:var(--ez-split-button--border-radius);border-bottom-right-radius:var(--ez-split-button--border-radius);border-top-left-radius:0;border-bottom-left-radius:0;border-right:var(--ez-split-button--border)}.ez-split-button__right-button--medium{min-width:var(--ez-split-button__medium-icon--width)}.ez-split-button__right-button--large{min-width:var(--ez-split-button__large-icon--width)}.ez-split-button__right-button--divider{top:10%;bottom:10%}.ez-split-button__right-button--divider:before{content:\"\";position:absolute;left:0;border-left:1px solid rgba(0, 0, 0, 20%);border-radius:2px;height:75%}.btn-icon--medium{min-width:--ez-split-button__medium-icon--width}.btn-icon--large{min-width:--ez-split-button__large-icon--width}.ez-split-button__right-button-container{position:absolute;left:0;padding-left:var(--ez-split-button__right-button--padding-left)}.label-icon{display:flex;flex-direction:row;align-items:center;color:var(--ez-split-button--color)}.label-icon:active{color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.dropdown{display:flex}.dropdown-content{display:block;position:absolute;background-color:#f1f1f1;min-width:160px;z-index:--ez-elevation--8;border-radius:var(--ez-split-button--border-radius)}.dropdown-content>ez-dropdown{position:relative}";
|
|
5
5
|
|
|
6
6
|
const EzSplitButton = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -49,7 +49,7 @@ const EzSplitButton = class {
|
|
|
49
49
|
}
|
|
50
50
|
getIconSize(sizeParam = 'medium') {
|
|
51
51
|
var _a;
|
|
52
|
-
const sizeList = ['medium', 'large'];
|
|
52
|
+
const sizeList = ['small', 'medium', 'large'];
|
|
53
53
|
const sizeLowerCase = (_a = this.size) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
54
54
|
return sizeList.includes(sizeLowerCase) ? sizeLowerCase : sizeParam;
|
|
55
55
|
}
|
|
@@ -6,7 +6,7 @@ import './CheckMode-bdb2ec19.js';
|
|
|
6
6
|
import '@sankhyalabs/core';
|
|
7
7
|
import './ICustomRender-875b5a40.js';
|
|
8
8
|
|
|
9
|
-
const ezSplitItemCss = ".box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-title{flex:1;white-space:nowrap;overflow:hidden}.ez-split-item--header-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:100%}h3.ez-margin--small{margin-left:var(--space--small)}";
|
|
9
|
+
const ezSplitItemCss = ".box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow--xsmall);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-title{flex:1;white-space:nowrap;overflow:hidden}.ez-split-item--header-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ez-split-item--header-buttons{display:flex;align-items:center;max-height:20px}.ez-split-item--content{display:block;height:100%}h3.ez-margin--small{margin-left:var(--space--small)}.structural__item{background:none;box-shadow:none;padding:0;margin:0;border:0}.content__item{margin:var(--space--extra-small);width:calc(100% - 2*(var(--space--extra-small)));height:calc(100% - 2*(var(--space--extra-small)))}";
|
|
10
10
|
|
|
11
11
|
const SplitItem = class {
|
|
12
12
|
constructor(hostRef) {
|
|
@@ -15,18 +15,21 @@ const SplitItem = class {
|
|
|
15
15
|
this.enableExpand = true;
|
|
16
16
|
this._expanded = false;
|
|
17
17
|
this.size = undefined;
|
|
18
|
+
this.structural = false;
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
21
|
* Alterna a visibilidade do painel.
|
|
21
22
|
*/
|
|
22
23
|
toggleExpandItem() {
|
|
24
|
+
var _a, _b;
|
|
23
25
|
this._expanded = !this._expanded;
|
|
26
|
+
(_b = (_a = this.expandButtonRef.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('button')) === null || _b === void 0 ? void 0 : _b.blur();
|
|
24
27
|
}
|
|
25
28
|
componentDidLoad() {
|
|
26
29
|
CSSVarsUtils.applyVarsGrid(this._element, this._slot.children[0]);
|
|
27
30
|
}
|
|
28
31
|
render() {
|
|
29
|
-
return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("slot", { name: "leftButtons" }), h("div", { class: "ez-split-item--header-title" }, this.label && (h("h3", { class: "ez-text ez-text--primary ez-title ez-title--small ez-margin--small", title: this.label }, this.label))), h("div", { class: "ez-split-item--header-buttons" }, h("slot", { name: "rightButtons" }), this.enableExpand && (h("ez-button", { size: "small", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })))), h("div", { class: "ez-split-item--content grid_height-0", ref: el => (this._slot = el) }, h("slot", null))));
|
|
32
|
+
return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''} ${this.structural ? 'structural__item' : 'content__item'}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("slot", { name: "leftButtons" }), h("div", { class: "ez-split-item--header-title" }, this.label && (h("h3", { class: "ez-text ez-text--primary ez-title ez-title--small ez-margin--small", title: this.label }, this.label))), h("div", { class: "ez-split-item--header-buttons" }, h("slot", { name: "rightButtons" }), this.enableExpand && (h("ez-button", { ref: el => this.expandButtonRef = el, size: "small", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })))), h("div", { class: "ez-split-item--content grid_height-0", ref: el => (this._slot = el) }, h("slot", null))));
|
|
30
33
|
}
|
|
31
34
|
};
|
|
32
35
|
SplitItem.style = ezSplitItemCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-baa5e267.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
|
|
2
2
|
import { StringUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
var numeric = function (value, unit) { return Number(value.slice(0, -1 * unit.length)); };
|
|
@@ -678,15 +678,17 @@ Grid.prototype.destroy = function destroy (immediate) {
|
|
|
678
678
|
|
|
679
679
|
function index (options) { return new Grid(options); }
|
|
680
680
|
|
|
681
|
-
const ezSplitPanelCss = ".ez-split-gutter{cursor:grab;background-color:transparent;max-width:100%}";
|
|
681
|
+
const ezSplitPanelCss = ".ez-split-gutter{cursor:grab;background-color:transparent;max-width:100%}.ez-split-gutter__row{cursor:ns-resize}.ez-split-gutter__column{cursor:ew-resize}.structural__panel{background:none;box-shadow:none;outline:none;padding:0;margin:0;border:0}";
|
|
682
682
|
|
|
683
683
|
const SplitPanel = class {
|
|
684
684
|
constructor(hostRef) {
|
|
685
685
|
registerInstance(this, hostRef);
|
|
686
|
+
this.resizeEnd = createEvent(this, "resizeEnd", 7);
|
|
686
687
|
this._items = [];
|
|
687
688
|
this._buildInProgress = false;
|
|
688
689
|
this.direction = 'column';
|
|
689
690
|
this.anchorToExpand = false;
|
|
691
|
+
this.structural = false;
|
|
690
692
|
}
|
|
691
693
|
rebuildLayout() {
|
|
692
694
|
Array.from(this._element.querySelectorAll(".ez-split-gutter")).reverse().forEach(el => {
|
|
@@ -718,7 +720,7 @@ const SplitPanel = class {
|
|
|
718
720
|
this.initSplit();
|
|
719
721
|
this._mutationObserver = new MutationObserver((mutationsList) => {
|
|
720
722
|
for (const mutation of mutationsList) {
|
|
721
|
-
if (mutation.type === 'childList' && this._buildInProgress
|
|
723
|
+
if (mutation.type === 'childList' && !this._buildInProgress) {
|
|
722
724
|
this._buildInProgress = true;
|
|
723
725
|
window.requestAnimationFrame(() => {
|
|
724
726
|
this.rebuildLayout();
|
|
@@ -741,20 +743,30 @@ const SplitPanel = class {
|
|
|
741
743
|
if (!this._items.length) {
|
|
742
744
|
return;
|
|
743
745
|
}
|
|
744
|
-
this._element.style[this.direction
|
|
746
|
+
this._element.style[this.direction === 'row' ? 'grid-template-rows' : 'grid-template-columns'] = this.getGridTemplate();
|
|
747
|
+
this.removeGuttersMargin();
|
|
745
748
|
index(this.getGutters());
|
|
746
749
|
}
|
|
750
|
+
handlePanelDragEnd() {
|
|
751
|
+
const items = this._items.map(item => ({
|
|
752
|
+
id: item.id,
|
|
753
|
+
height: item.clientHeight,
|
|
754
|
+
width: item.clientWidth,
|
|
755
|
+
}));
|
|
756
|
+
this.resizeEnd.emit({ panelId: this._element.id, items });
|
|
757
|
+
}
|
|
747
758
|
getGutters() {
|
|
748
759
|
const gutters = {
|
|
749
760
|
columnGutters: [],
|
|
750
761
|
rowGutters: [],
|
|
762
|
+
onDragEnd: () => this.handlePanelDragEnd()
|
|
751
763
|
};
|
|
752
764
|
if (!this._items.length) {
|
|
753
765
|
return gutters;
|
|
754
766
|
}
|
|
755
|
-
const proToChange = this.direction
|
|
767
|
+
const proToChange = this.direction === 'row' ? 'rowGutters' : 'columnGutters';
|
|
756
768
|
this._items.forEach((item, index) => {
|
|
757
|
-
if (index
|
|
769
|
+
if (index === this._items.length - 1)
|
|
758
770
|
return;
|
|
759
771
|
let gutterTrack = item.dataset.trackNumber;
|
|
760
772
|
if (index === this._items.length - 1) {
|
|
@@ -771,6 +783,12 @@ const SplitPanel = class {
|
|
|
771
783
|
const gutter = document.createElement('div');
|
|
772
784
|
gutter.classList.add('ez-split-gutter');
|
|
773
785
|
gutter.classList.add(this.direction);
|
|
786
|
+
if (this.direction === 'row') {
|
|
787
|
+
gutter.classList.add('ez-split-gutter__row');
|
|
788
|
+
}
|
|
789
|
+
else {
|
|
790
|
+
gutter.classList.add('ez-split-gutter__column');
|
|
791
|
+
}
|
|
774
792
|
gutter.dataset.itemTrack = `${item.dataset.trackNumber}`;
|
|
775
793
|
gutter.dataset.trackNumber = (Number(item.dataset.trackNumber) + 1).toString();
|
|
776
794
|
item.parentNode.insertBefore(gutter, item.nextSibling);
|
|
@@ -816,8 +834,52 @@ const SplitPanel = class {
|
|
|
816
834
|
});
|
|
817
835
|
return template;
|
|
818
836
|
}
|
|
837
|
+
removeGuttersMargin() {
|
|
838
|
+
if (this._items.length <= 1)
|
|
839
|
+
return;
|
|
840
|
+
if (this.direction == "column") {
|
|
841
|
+
this.removeGuttersMarginColumn();
|
|
842
|
+
return;
|
|
843
|
+
}
|
|
844
|
+
if (this.direction == "row") {
|
|
845
|
+
this.removeGuttersMarginRow();
|
|
846
|
+
return;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
removeGuttersMarginColumn() {
|
|
850
|
+
this._items.forEach((item, index) => {
|
|
851
|
+
if (index == 0) {
|
|
852
|
+
item.style.marginRight = "0";
|
|
853
|
+
return;
|
|
854
|
+
}
|
|
855
|
+
if (index === this._items.length - 1) {
|
|
856
|
+
item.style.marginLeft = "0";
|
|
857
|
+
return;
|
|
858
|
+
}
|
|
859
|
+
item.style.marginRight = "0";
|
|
860
|
+
item.style.marginLeft = "0";
|
|
861
|
+
return;
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
removeGuttersMarginRow() {
|
|
865
|
+
if (this._items.length <= 1)
|
|
866
|
+
return;
|
|
867
|
+
this._items.forEach((item, index) => {
|
|
868
|
+
if (index == 0) {
|
|
869
|
+
item.style.marginBottom = "0";
|
|
870
|
+
return;
|
|
871
|
+
}
|
|
872
|
+
if (index === this._items.length - 1) {
|
|
873
|
+
item.style.marginTop = "0";
|
|
874
|
+
return;
|
|
875
|
+
}
|
|
876
|
+
item.style.marginBottom = "0";
|
|
877
|
+
item.style.marginTop = "0";
|
|
878
|
+
return;
|
|
879
|
+
});
|
|
880
|
+
}
|
|
819
881
|
render() {
|
|
820
|
-
return h(Host, { style: this.getElementStyle() });
|
|
882
|
+
return h(Host, { class: `${this.structural ? 'structural__panel' : 'content__panel'}`, style: this.getElementStyle() });
|
|
821
883
|
}
|
|
822
884
|
get _element() { return getElement(this); }
|
|
823
885
|
};
|