@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
|
@@ -4,14 +4,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
+
const ezListHelper = require('./ezListHelper-0d3970b4.js');
|
|
7
8
|
|
|
8
|
-
const ezListCss = ":host {\n /* @doc Define a camada de visibilidae do componente. */\n --ez-list__host--z-index: var(--visible, 1);\n\n /* @doc Define o raio da borda do componente. */\n --ez-list__host--border-radius: var(--border--radius-medium, 12px);\n\n /* @doc Define o espaçamento entre a lista e o componente. */\n --ez-list__host--padding: var(--space--medium, 12px);\n\n /* @doc Define o espaçamento interno do ícone. */\n --ez-list__icon--padding: var(--space--small, 6px);\n\n /* @doc Define a cor do ícone de arrasto do item da lista. */\n --ez-list__icon--color: #AFB6C0;\n\n /* @doc Define o espaçamento externo do item da lista. */\n --ez-list__item--margin: 0 var(--space--small, 6px);\n\n /* @doc Define a cor do texto do item da lista. */\n --ez-list__item--color: var(--title--primary, #2b3a54);\n\n /* @doc Define o estilo borda inferior do item da lista. */\n --ez-list__item--border-bottom;\n\n /* @doc Define a cor da borda inferior do item da lista. */\n --ez-list__item--border-bottom-color;\n\n /* @doc Define o estilo do texto do item da lista. */\n --ez-list__item--font-family: var(--font-pattern, \"Roboto\");\n\n /* @doc Define o tamanho do texto do item da lista. */\n --ez-list__item--font-size: var(--text--medium, 14px);\n \n /* @doc Define o tipo da quebra de linha do item da lista. */\n --ez-list__item--white-space: var(--ez-list__item--white-space, nowrap);\n\n /* @doc Define o espaçamento lateral direito para items selecionados. */\n --ez-list__selectable--padding-right: var(--space--small, 6px);\n \n /* @doc Define o espaçamento lateral esquerdo para items selecionados. */\n --ez-list__selectable--padding-left: var(--space--small, 6px);\n\n /*@doc Define o raio da borda de items selecionados.*/\n --ez-list__selected-item--border-radius: var(--border--radius-small, 6px);\n \n /*@doc Define a cor de fundo de items selecionados.*/\n --ez-list__selected-item--background-color: var(--color--primary-300, #E2F4EF);\n\n /* @doc Define o estilo do texto do grupo da lista. */\n --ez-list__group--font-family: var(--font-pattern, \"Roboto\");\n \n /* @doc Define o tamanho do texto do grupo da lista. */\n --ez-list__group--font-size: var(--text--medium, 14px);\n \n /* @doc Define o peso do texto do grupo da lista. */\n --ez-list__group--font-weight: var(--text-weight--large, 600);\n \n /* @doc Define o espaçamento inferior do grupo da lista. */\n --ez-list__group--padding-bottom: var(--space-small, 6px);\n\n /* @doc Define o estilo do texto da área de transferência de grupos. */\n --ez-list__group-overlay--font-family: var(--font-pattern, \"Roboto\");\n\n /* @doc Define o tamanho do texto da área de transferência de grupos. */\n --ez-list__group-overlay--font-size: var(--text--medium, 14px);\n \n /* @doc Define a cor da borda pontilhada sobre os elementos da lista. */\n --ez-list__over--border--color: var(--color--primary, #008561);\n\n /*@doc Define a altura do container para arrasto para última posição .*/\n --ez-list__last-droppable-space--height: var(--space--small, 6px);\n \n /*@doc Define o espaçamento do container de itens arrastáveis .*/\n --ez-list__draggable-list--padding-bottom: var(--space--small, 6px);\n\n /* @doc Define a imagem do ícone de drag. */\n --ez-list__draggable-icon--image: url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');\n\n /* scrollbar */\n /*@doc Define a cor da barra de rolagem do componente.*/\n --ez-list__scrollbar--color-default: var(--scrollbar--default, #626e82);\n /*@doc Define a cor de fundo da barra de rolagem do componente.*/\n --ez-list__scrollbar--color-background: var(--scrollbar--background, #E5EAF0);\n /*@doc Define a cor do hover na barra de rolagem do componente.*/\n --ez-list__scrollbar--color-hover: var(--scrollbar--hover, #2B3A54);\n /*@doc Define a cor do active na barra de rolagem do componente.*/\n --ez-list__scrollbar--color-clicked: var(--scrollbar--clicked, #a2abb9);\n /*@doc Define o raio da borda da barra de rolagem do componente.*/\n --ez-list__scrollbar--border-radius: var(--border--radius-small, 6px);\n /*@doc Define a largura da barra de rolagem do componente.*/\n --ez-list__scrollbar--width: var(--space--medium, 12px);\n\n max-height: 100%;\n width: 100%;\n background-color: #fff;\n display: flex;\n\n /*public*/\n z-index: var(--ez-list__host--z-index);\n}\n\np {\n margin: 0;\n}\n\n.draggable {\n /* private */\n width: 100%;\n display: grid;\n grid-template-columns: minmax(0px, auto) minmax(0px, auto);\n place-items: center;\n border-top: 1px dashed #fff;\n justify-content: space-between;\n\n /*public*/\n font-family: var(--ez-list__item--font-family);\n font-size: var(--ez-list__item--font-size);\n}\n\n.dragging {\n background: #FFFFFF;\n /* Primary/color--primary */\n\n border: 1px solid #008561;\n box-sizing: border-box;\n box-shadow: 0px 0px 16px rgba(0, 38, 111, 0.122);\n border-radius: 6px;\n}\n\n.selectable {\n cursor: pointer;\n\n /*public*/\n padding-right: var(--ez-list__selectable--padding-right);\n padding-left: var(--ez-list__selectable--padding-left);\n}\n\n.selectable-container {\n margin: 0px !important;\n}\n\n.hover-feedback:hover {\n background-color: var(--background--medium);\n border-radius: var(--border--radius-regular);\n}\n\n.item-content {\n display: flex;\n overflow: hidden;\n justify-content: flex-start;\n width: 100%;\n}\n\n.draggable-list {\n padding: 0;\n margin: 0;\n width: 100%;\n max-height: 100%;\n scrollbar-width: thin;\n \n /*public*/\n color: var(--text-color);\n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.draggable-list li {\n display: flex;\n \n /*public*/\n font-family: var(--ez-list__item--font-family);\n font-size: var(--ez-list__item--font-size);\n color: var(--ez-list__item--color);\n border-bottom: var(--ez-list__item--border-bottom, none) var(--ez-list__item--border-bottom-color);\n}\n\n.draggable-list li > div {\n /*public*/\n padding: var(--space--2xs, 8px) var(--space--3xs, 4px);\n margin: var(--ez-list__item--margin);\n}\n\n.over {\n /*public*/\n border-top: 1px dashed var(--ez-list__over--border--color);\n}\n\n.last-droppable-space {\n /*public*/\n height: var(--ez-list__last-droppable-space--height);\n}\n\n.draggable-selected {\n /*public*/\n background-color: var(--background--strong) !important;\n}\n\n.draggable-selected div:hover {\n /*public*/\n background-color: var(--background--strong) !important;\n}\n\n.draggable-list::-webkit-scrollbar {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.draggable-list::-webkit-scrollbar-track {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.draggable-list::-webkit-scrollbar-thumb {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.draggable-list::-webkit-scrollbar-thumb:vertical:hover,\n.draggable-list::-webkit-scrollbar-thumb:horizontal:hover {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.draggable-list::-webkit-scrollbar-thumb:vertical:active,\n.draggable-list::-webkit-scrollbar-thumb:horizontal:active {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.draggable-icon {\n align-items: flex-start;\n display: flex;\n outline: none;\n border: none;\n background-color: unset;\n}\n\n.draggable-icon::after {\n content: '';\n display: flex;\n width: 18px;\n height: 18px;\n\n /*public*/\n background-color: var(--ez-list__icon--color);\n -webkit-mask-image: var(--ez-list__draggable-icon--image);\n mask-image: var(--ez-list__draggable-icon--image);\n}\n\n* {\n box-sizing: border-box;\n}\n\n.checkbox {\n width: fit-content;\n}\n\n.text--ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n \n /*public*/\n white-space: var(--ez-list__item--white-space);\n}\n\n.group-container {\n display: flex;\n flex-direction: column;\n max-height: 100%;\n overflow-y: auto;\n outline: none;\n width: 100%;\n scrollbar-width: thin;\n\n /*public*/\n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.group-name {\n -webkit-user-select: none;\n -moz-user-select: -moz-none;\n -ms-user-select: none;\n user-select: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n /*public*/\n color: var(--title--primary);\n font-family: var(--ez-list__group--font-family);\n font-size: var(--ez-list__group--font-size);\n font-weight: var(--ez-list__group--font-weight);\n padding-bottom: var(--ez-list__group--padding-bottom);\n}\n\n.group {\n display: flex;\n flex-direction: column;\n}\n\n.group-container::-webkit-scrollbar {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.group-container::-webkit-scrollbar-track {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.group-container::-webkit-scrollbar-thumb {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.group-container::-webkit-scrollbar-thumb:vertical:hover,\n.group-container::-webkit-scrollbar-thumb:horizontal:hover {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.group-container::-webkit-scrollbar-thumb:vertical:active,\n.group-container::-webkit-scrollbar-thumb:horizontal:active {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.section-container {\n display: flex;\n position: relative;\n height: 100%;\n}\n\n.items-container {\n width: 100%;\n max-height: 100%;\n outline: none;\n scrollbar-width: thin;\n\n /*public*/\n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.group-items-container {\n width: 100%;\n max-height: 100%;\n height: 100%;\n outline: none;\n}\n\n.items-container::-webkit-scrollbar {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.items-container::-webkit-scrollbar-track {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.items-container::-webkit-scrollbar-thumb {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.items-container::-webkit-scrollbar-thumb:vertical:hover,\n.items-container::-webkit-scrollbar-thumb:horizontal:hover {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.items-container::-webkit-scrollbar-thumb:vertical:active,\n.items-container::-webkit-scrollbar-thumb:horizontal:active {\n /*public*/\n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.group-overlay {\n background: rgba(226, 244, 239, 0.8);\n border: 1px solid #008561;\n border-radius: 8px;\n position: absolute;\n display: none;\n place-items: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 2;\n margin: 0;\n cursor: pointer;\n\n /*public*/\n font-family: var(--ez-list__group-overlay--font-family);\n font-size: var(--ez-list__group-overlay--font-size);\n}\n\n.presetedHeight {\n min-height: 100px;\n}\n\n.overlay-text {\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 50px;\n color: white;\n transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n}\n\n.selected-item {\n /*public*/\n background: var(--ez-list__selected-item--background-color);\n border-radius: var(--ez-list__selected-item--border-radius);\n}\n\n.slot-item {\n align-items: flex-end;\n}\n\n.overGroup {\n background: rgba(226, 244, 239, 0.8);\n border: 1px solid #008561;\n box-sizing: border-box;\n border-radius: 8px;\n padding-top: 6px;\n}";
|
|
9
|
+
const ezListCss = ".sc-ez-list-h {\n \n --ez-list__host--z-index: var(--visible, 1);\n\n \n --ez-list__host--border-radius: var(--border--radius-medium, 12px);\n\n \n --ez-list__host--padding: var(--space--medium, 12px);\n\n \n --ez-list__icon--padding: var(--space--small, 6px);\n\n \n --ez-list__icon--color: #AFB6C0;\n\n \n --ez-list__item--margin: 0 var(--space--small, 6px);\n\n \n --ez-list__item--color: var(--title--primary, #2b3a54);\n\n \n --ez-list__item--border-bottom;\n\n \n --ez-list__item--border-bottom-color;\n\n \n --ez-list__item--font-family: var(--font-pattern, \"Roboto\");\n\n \n --ez-list__item--font-size: var(--text--medium, 14px);\n \n \n --ez-list__item--white-space: var(--ez-list__item--white-space, nowrap);\n\n \n --ez-list__selectable--padding-right: var(--space--small, 6px);\n \n \n --ez-list__selectable--padding-left: var(--space--small, 6px);\n\n \n --ez-list__selected-item--border-radius: var(--border--radius-small, 6px);\n \n \n --ez-list__selected-item--background-color: var(--color--primary-300, #E2F4EF);\n\n \n --ez-list__group--font-family: var(--font-pattern, \"Roboto\");\n \n \n --ez-list__group--font-size: var(--text--medium, 14px);\n \n \n --ez-list__group--font-weight: var(--text-weight--large, 600);\n \n \n --ez-list__group--padding-bottom: var(--space-small, 6px);\n\n \n --ez-list__group-overlay--font-family: var(--font-pattern, \"Roboto\");\n\n \n --ez-list__group-overlay--font-size: var(--text--medium, 14px);\n \n \n --ez-list__over--border--color: var(--color--primary, #008561);\n\n \n --ez-list__last-droppable-space--height: var(--space--small, 6px);\n \n \n --ez-list__draggable-list--padding-bottom: var(--space--small, 6px);\n\n \n --ez-list__draggable-icon--image: url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');\n\n \n \n --ez-list__scrollbar--color-default: var(--scrollbar--default, #626e82);\n \n --ez-list__scrollbar--color-background: var(--scrollbar--background, #E5EAF0);\n \n --ez-list__scrollbar--color-hover: var(--scrollbar--hover, #2B3A54);\n \n --ez-list__scrollbar--color-clicked: var(--scrollbar--clicked, #a2abb9);\n \n --ez-list__scrollbar--border-radius: var(--border--radius-small, 6px);\n \n --ez-list__scrollbar--width: var(--space--medium, 12px);\n\n max-height: 100%;\n width: 100%;\n background-color: #fff;\n display: flex;\n\n \n z-index: var(--ez-list__host--z-index);\n}\n\np.sc-ez-list {\n margin: 0;\n}\n\n.draggable.sc-ez-list {\n \n width: 100%;\n display: grid;\n grid-template-columns: minmax(0px, auto) minmax(0px, auto);\n place-items: center;\n border-top: 1px dashed #fff;\n justify-content: space-between;\n\n \n font-family: var(--ez-list__item--font-family);\n font-size: var(--ez-list__item--font-size);\n}\n\n.dragging.sc-ez-list {\n background: #FFFFFF;\n \n\n border: 1px solid #008561;\n box-sizing: border-box;\n box-shadow: 0px 0px 16px rgba(0, 38, 111, 0.122);\n border-radius: 6px;\n}\n\n.selectable.sc-ez-list {\n cursor: pointer;\n\n \n padding-right: var(--ez-list__selectable--padding-right);\n padding-left: var(--ez-list__selectable--padding-left);\n}\n\n.selectable-container.sc-ez-list {\n margin: 0px !important;\n}\n\n.hover-feedback.sc-ez-list:hover {\n background-color: var(--background--medium);\n border-radius: var(--border--radius-regular);\n}\n\n.item-content.sc-ez-list {\n display: flex;\n align-items: center;\n overflow: hidden;\n justify-content: flex-start;\n width: 100%;\n}\n\n.draggable-list.sc-ez-list {\n padding: 0;\n margin: 0;\n width: 100%;\n max-height: 100%;\n scrollbar-width: thin;\n \n \n color: var(--text-color);\n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.draggable-list.sc-ez-list li.sc-ez-list {\n display: flex;\n \n \n font-family: var(--ez-list__item--font-family);\n font-size: var(--ez-list__item--font-size);\n color: var(--ez-list__item--color);\n border-bottom: var(--ez-list__item--border-bottom, none) var(--ez-list__item--border-bottom-color);\n}\n\n.draggable-list.sc-ez-list li.sc-ez-list > div.sc-ez-list {\n \n padding: var(--space--3xs, 4px) var(--space--3xs, 4px);\n margin: var(--ez-list__item--margin);\n}\n\n.over.sc-ez-list {\n \n border-top: 1px dashed var(--ez-list__over--border--color);\n}\n\n.last-droppable-space.sc-ez-list {\n \n height: var(--ez-list__last-droppable-space--height);\n}\n\n.draggable-selected.sc-ez-list {\n \n background-color: var(--background--strong) !important;\n}\n\n.draggable-selected.sc-ez-list div.sc-ez-list:hover {\n \n background-color: var(--background--strong) !important;\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar {\n \n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-track {\n \n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-thumb {\n \n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover, .draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover {\n \n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:active, .draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active {\n \n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.draggable-icon.sc-ez-list {\n align-items: flex-start;\n display: flex;\n outline: none;\n border: none;\n background-color: unset;\n}\n\n.draggable-icon.sc-ez-list::after {\n content: '';\n display: flex;\n width: 18px;\n height: 18px;\n\n \n background-color: var(--ez-list__icon--color);\n -webkit-mask-image: var(--ez-list__draggable-icon--image);\n mask-image: var(--ez-list__draggable-icon--image);\n}\n\n*.sc-ez-list {\n box-sizing: border-box;\n}\n\n.checkbox.sc-ez-list {\n width: fit-content;\n}\n\n.text--ellipsis.sc-ez-list {\n overflow: hidden;\n text-overflow: ellipsis;\n \n \n white-space: var(--ez-list__item--white-space);\n}\n\n.group-container.sc-ez-list {\n display: flex;\n flex-direction: column;\n max-height: 100%;\n overflow-y: auto;\n outline: none;\n width: 100%;\n scrollbar-width: thin;\n\n \n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.group-name.sc-ez-list {\n -webkit-user-select: none;\n -moz-user-select: -moz-none;\n -ms-user-select: none;\n user-select: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n \n color: var(--title--primary);\n font-family: var(--ez-list__group--font-family);\n font-size: var(--ez-list__group--font-size);\n font-weight: var(--ez-list__group--font-weight);\n padding-bottom: var(--ez-list__group--padding-bottom);\n}\n\n.group.sc-ez-list {\n display: flex;\n flex-direction: column;\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar {\n \n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-track {\n \n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-thumb {\n \n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover, .group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover {\n \n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active, .group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active {\n \n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.section-container.sc-ez-list {\n display: flex;\n position: relative;\n height: 100%;\n}\n\n.items-container.sc-ez-list {\n width: 100%;\n max-height: 100%;\n outline: none;\n scrollbar-width: thin;\n\n \n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.group-items-container.sc-ez-list {\n width: 100%;\n max-height: 100%;\n height: 100%;\n outline: none;\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar {\n \n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-track {\n \n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-thumb {\n \n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover, .items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover {\n \n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active, .items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active {\n \n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.group-overlay.sc-ez-list {\n background: rgba(226, 244, 239, 0.8);\n border: 1px solid #008561;\n border-radius: 8px;\n position: absolute;\n display: none;\n place-items: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 2;\n margin: 0;\n cursor: pointer;\n\n \n font-family: var(--ez-list__group-overlay--font-family);\n font-size: var(--ez-list__group-overlay--font-size);\n}\n\n.presetedHeight.sc-ez-list {\n min-height: 100px;\n}\n\n.overlay-text.sc-ez-list {\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 50px;\n color: white;\n transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n}\n\n.selected-item.sc-ez-list {\n \n background: var(--ez-list__selected-item--background-color);\n border-radius: var(--ez-list__selected-item--border-radius);\n}\n\n.slot-item.sc-ez-list {\n align-items: flex-end;\n}\n\n.overGroup.sc-ez-list {\n background: rgba(226, 244, 239, 0.8);\n border: 1px solid #008561;\n box-sizing: border-box;\n border-radius: 8px;\n padding-top: 6px;\n}";
|
|
9
10
|
|
|
10
11
|
const EzList = class {
|
|
11
12
|
constructor(hostRef) {
|
|
12
13
|
index.registerInstance(this, hostRef);
|
|
13
14
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
14
15
|
this.ezSelectItem = index.createEvent(this, "ezSelectItem", 7);
|
|
16
|
+
this.ezSelectMultipleItems = index.createEvent(this, "ezSelectMultipleItems", 7);
|
|
15
17
|
this.ezCheckChange = index.createEvent(this, "ezCheckChange", 7);
|
|
16
18
|
this.ezDoubleClick = index.createEvent(this, "ezDoubleClick", 7);
|
|
17
19
|
this._listItemsHistory = [];
|
|
@@ -25,6 +27,7 @@ const EzList = class {
|
|
|
25
27
|
this.itemSlotBuilder = undefined;
|
|
26
28
|
this.itemLeftSlotBuilder = undefined;
|
|
27
29
|
this.hoverFeedback = false;
|
|
30
|
+
this.enableMultipleSelection = false;
|
|
28
31
|
}
|
|
29
32
|
/**
|
|
30
33
|
* Limpa o histórico da lista.
|
|
@@ -37,65 +40,108 @@ const EzList = class {
|
|
|
37
40
|
*/
|
|
38
41
|
async scrollToTop() {
|
|
39
42
|
if (this.useGroups) {
|
|
40
|
-
this._element.
|
|
43
|
+
this._element.querySelector('.group-container').scrollTop = 0;
|
|
41
44
|
}
|
|
42
45
|
else {
|
|
43
|
-
this._element.
|
|
46
|
+
this._element.querySelector('.items-container').scrollTop = 0;
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
/**
|
|
47
50
|
* Aplica seleção nas linhas da lista.
|
|
48
51
|
*/
|
|
49
|
-
async setSelection(selectedItem, scrollToOption) {
|
|
50
|
-
if (selectedItem
|
|
51
|
-
this.ezSelectItem.emit(selectedItem);
|
|
52
|
-
if (this.useGroups) {
|
|
53
|
-
let newList = [...this._listGroupItems];
|
|
54
|
-
newList.forEach(groupItem => {
|
|
55
|
-
groupItem.items.forEach(item => {
|
|
56
|
-
item.selected = item.id === selectedItem.id;
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
this._listGroupItems = newList;
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
let newList = [...this._listItems];
|
|
63
|
-
newList.forEach(item => {
|
|
64
|
-
item.selected = item.id === selectedItem.id;
|
|
65
|
-
});
|
|
66
|
-
this._listItems = newList;
|
|
67
|
-
}
|
|
68
|
-
if (scrollToOption) {
|
|
69
|
-
let liElem = this.useGroups
|
|
70
|
-
? this._groupContainer.querySelector('li#item_' + selectedItem.id)
|
|
71
|
-
: this._itemContainer.querySelector('li#item_' + selectedItem.id);
|
|
72
|
-
if (liElem) {
|
|
73
|
-
liElem.scrollIntoView();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
52
|
+
async setSelection(selectedItem, scrollToOption, shitkey, ctrlKey) {
|
|
53
|
+
if (!selectedItem || !this.ezSelectable) {
|
|
78
54
|
await this.removeSelection();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (this.useGroups) {
|
|
58
|
+
this.setSelectionWithGroups(selectedItem, scrollToOption);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (this.enableMultipleSelection && ctrlKey) {
|
|
62
|
+
this.setSelectionMultiple(selectedItem);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (this.enableMultipleSelection && shitkey) {
|
|
66
|
+
this.setSelectionRange(selectedItem);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.setSelectionSingleItem(selectedItem, scrollToOption);
|
|
70
|
+
this.emitSelectedItems(selectedItem);
|
|
71
|
+
}
|
|
72
|
+
emitSelectedItems(singleItem, listItem) {
|
|
73
|
+
this.ezSelectItem.emit(singleItem);
|
|
74
|
+
this.ezSelectMultipleItems.emit(listItem !== null && listItem !== void 0 ? listItem : [singleItem]);
|
|
75
|
+
}
|
|
76
|
+
setSelectionRange(selectedItem) {
|
|
77
|
+
const lastSelectedIndex = this._listItems.findIndex(item => item.selected);
|
|
78
|
+
const seletedItemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
|
|
79
|
+
if (lastSelectedIndex < 0 || lastSelectedIndex === seletedItemIndex) {
|
|
80
|
+
this.setSelectionSingleItem(selectedItem);
|
|
81
|
+
return;
|
|
79
82
|
}
|
|
83
|
+
const minorIndex = Math.min(lastSelectedIndex, seletedItemIndex);
|
|
84
|
+
const majorIndex = Math.max(lastSelectedIndex, seletedItemIndex);
|
|
85
|
+
let newList = [...this._listItems];
|
|
86
|
+
newList.forEach((item, index) => {
|
|
87
|
+
item.selected = (index >= minorIndex && index <= majorIndex);
|
|
88
|
+
});
|
|
89
|
+
this._listItems = [...newList];
|
|
90
|
+
const selectedList = this._listItems.filter(item => item.selected);
|
|
91
|
+
this.emitSelectedItems(selectedItem, selectedList);
|
|
92
|
+
}
|
|
93
|
+
setSelectionMultiple(selectedItem) {
|
|
94
|
+
let newList = [...this._listItems];
|
|
95
|
+
newList.forEach(item => {
|
|
96
|
+
item.selected = (item.id === selectedItem.id) ? !item.selected : item.selected;
|
|
97
|
+
});
|
|
98
|
+
this._listItems = [...newList];
|
|
99
|
+
const selectedList = this._listItems.filter(item => item.selected);
|
|
100
|
+
this.emitSelectedItems(selectedItem, selectedList);
|
|
101
|
+
}
|
|
102
|
+
setSelectionSingleItem(selectedItem, scrollToOption) {
|
|
103
|
+
this.emitSelectedItems(selectedItem);
|
|
104
|
+
let newList = [...this._listItems];
|
|
105
|
+
newList.forEach(item => {
|
|
106
|
+
item.selected = item.id === selectedItem.id;
|
|
107
|
+
});
|
|
108
|
+
this._listItems = newList;
|
|
109
|
+
if (!scrollToOption)
|
|
110
|
+
return;
|
|
111
|
+
let liElem = this._itemContainer.querySelector('li#item_' + selectedItem.id);
|
|
112
|
+
if (liElem)
|
|
113
|
+
liElem.scrollIntoView();
|
|
114
|
+
}
|
|
115
|
+
setSelectionWithGroups(selectedItem, scrollToOption) {
|
|
116
|
+
this.emitSelectedItems(selectedItem);
|
|
117
|
+
let newList = [...this._listGroupItems];
|
|
118
|
+
newList.forEach(groupItem => {
|
|
119
|
+
groupItem.items.forEach(item => {
|
|
120
|
+
item.selected = item.id === selectedItem.id;
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
this._listGroupItems = newList;
|
|
124
|
+
if (!scrollToOption)
|
|
125
|
+
return;
|
|
126
|
+
let liElem = this._groupContainer.querySelector('li#item_' + selectedItem.id);
|
|
127
|
+
if (liElem)
|
|
128
|
+
liElem.scrollIntoView();
|
|
80
129
|
}
|
|
81
130
|
/**
|
|
82
131
|
* Obtém o item selecionado.
|
|
83
132
|
*/
|
|
84
133
|
async getSelection() {
|
|
134
|
+
if (!this.useGroups)
|
|
135
|
+
return this._listItems.find(item => item.selected == true);
|
|
85
136
|
let selectedItem;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
selectedItem = this._listItems.find(item => item.selected == true);
|
|
98
|
-
}
|
|
137
|
+
this._listGroupItems.every(group => {
|
|
138
|
+
let item = group.items.find(item => item.selected == true);
|
|
139
|
+
if (item) {
|
|
140
|
+
selectedItem = item;
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
return true;
|
|
144
|
+
});
|
|
99
145
|
return selectedItem;
|
|
100
146
|
}
|
|
101
147
|
/**
|
|
@@ -119,14 +165,11 @@ const EzList = class {
|
|
|
119
165
|
});
|
|
120
166
|
});
|
|
121
167
|
this._listGroupItems = newList;
|
|
168
|
+
return;
|
|
122
169
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
item.selected = false;
|
|
127
|
-
});
|
|
128
|
-
this._listItems = newList;
|
|
129
|
-
}
|
|
170
|
+
let newList = [...this._listItems];
|
|
171
|
+
newList.forEach(item => item.selected = false);
|
|
172
|
+
this._listItems = newList;
|
|
130
173
|
}
|
|
131
174
|
applyUUID(item) {
|
|
132
175
|
if (!item.id) {
|
|
@@ -160,8 +203,7 @@ const EzList = class {
|
|
|
160
203
|
}
|
|
161
204
|
}
|
|
162
205
|
buildIdDraggableListAndSelectable() {
|
|
163
|
-
const
|
|
164
|
-
const draggableList = shadow.querySelectorAll('.draggable-list');
|
|
206
|
+
const draggableList = this._element.querySelectorAll('.draggable-list');
|
|
165
207
|
draggableList === null || draggableList === void 0 ? void 0 : draggableList.forEach((draggable, index) => {
|
|
166
208
|
var _a, _b;
|
|
167
209
|
let suffix = 'draggableList';
|
|
@@ -171,7 +213,7 @@ const EzList = class {
|
|
|
171
213
|
}
|
|
172
214
|
core.ElementIDUtils.addIDInfoIfNotExists(draggable, suffix);
|
|
173
215
|
});
|
|
174
|
-
const selectable =
|
|
216
|
+
const selectable = this._element.querySelectorAll('.selectable-container');
|
|
175
217
|
selectable === null || selectable === void 0 ? void 0 : selectable.forEach((item) => {
|
|
176
218
|
core.ElementIDUtils.addIDInfoIfNotExists(item, 'selectable');
|
|
177
219
|
});
|
|
@@ -189,78 +231,88 @@ const EzList = class {
|
|
|
189
231
|
core.ElementIDUtils.addIDInfo(this._element);
|
|
190
232
|
}
|
|
191
233
|
onDrop(ev, dragEndItem) {
|
|
234
|
+
ev.stopPropagation();
|
|
192
235
|
this.removeOverClass();
|
|
236
|
+
if (!this._dragStartItem)
|
|
237
|
+
return;
|
|
238
|
+
if (this.useGroups) {
|
|
239
|
+
this.onDropWithGroups(dragEndItem);
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
this._listItems = [...ezListHelper.processListOnDrop(this.buildDragHandlerConfig(dragEndItem.index, false))];
|
|
243
|
+
this._listItemsHistory = [...this._listItems];
|
|
244
|
+
this.ezChange.emit(this._listItems);
|
|
245
|
+
}
|
|
246
|
+
buildDragHandlerConfig(targetIndex, moveToFinal) {
|
|
247
|
+
return {
|
|
248
|
+
listItems: this._listItems,
|
|
249
|
+
dragItem: this._dragStartItem,
|
|
250
|
+
enableMultipleSelection: this.enableMultipleSelection,
|
|
251
|
+
targetIndex,
|
|
252
|
+
moveToFinal,
|
|
253
|
+
clearSelection: () => this.setSelection(undefined)
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
;
|
|
257
|
+
onDropWithGroups(dragEndItem) {
|
|
193
258
|
this.setSelection(undefined);
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
if (groupEnd.sort === 'DSC') {
|
|
209
|
-
newList.find(group => group.group == dragEndItem.groupName).items.reverse();
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
let indexForAdd = dragEndItem.index > this._dragStartItem.index ? dragEndItem.index - 1 : dragEndItem.index;
|
|
214
|
-
newList.find(group => group.group == dragEndItem.groupName).items.splice(indexForAdd, 0, this._dragStartItem.item);
|
|
215
|
-
}
|
|
216
|
-
this._listGroupItems = newList;
|
|
217
|
-
this.ezChange.emit(this._listGroupItems);
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
let newList = [...this._listItems];
|
|
221
|
-
newList.splice(this._dragStartItem.index, 1);
|
|
222
|
-
newList.splice(dragEndItem.index, 0, this._dragStartItem.item);
|
|
223
|
-
this._listItems = newList;
|
|
224
|
-
this._listItemsHistory = newList;
|
|
225
|
-
this.ezChange.emit(this._listItems);
|
|
259
|
+
let newList = [...this._listGroupItems];
|
|
260
|
+
let groupEnd = this._listGroupItems.find(group => dragEndItem.groupName == group.group);
|
|
261
|
+
//Remove item arrastado
|
|
262
|
+
newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
|
|
263
|
+
//Adiciona item arrastado
|
|
264
|
+
if (groupEnd.sort) {
|
|
265
|
+
newList.find(group => group.group == dragEndItem.groupName).items.push(this._dragStartItem.item);
|
|
266
|
+
newList
|
|
267
|
+
.find(group => group.group == dragEndItem.groupName)
|
|
268
|
+
.items.sort(function (a, b) {
|
|
269
|
+
return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
270
|
+
});
|
|
271
|
+
if (groupEnd.sort === 'DSC') {
|
|
272
|
+
newList.find(group => group.group == dragEndItem.groupName).items.reverse();
|
|
226
273
|
}
|
|
227
274
|
}
|
|
228
|
-
|
|
275
|
+
else {
|
|
276
|
+
let indexForAdd = dragEndItem.index > this._dragStartItem.index ? dragEndItem.index - 1 : dragEndItem.index;
|
|
277
|
+
newList.find(group => group.group == dragEndItem.groupName).items.splice(indexForAdd, 0, this._dragStartItem.item);
|
|
278
|
+
}
|
|
279
|
+
this._listGroupItems = newList;
|
|
280
|
+
this.ezChange.emit(this._listGroupItems);
|
|
229
281
|
}
|
|
230
282
|
onDropLastIndex(ev, groupDropped) {
|
|
283
|
+
ev.stopPropagation();
|
|
231
284
|
this.removeOverClass();
|
|
285
|
+
if (!this._dragStartItem)
|
|
286
|
+
return;
|
|
287
|
+
if (this.useGroups) {
|
|
288
|
+
this.onDropLastItemWithGroups(groupDropped);
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
const lastIndex = this._listItems.length - 1;
|
|
292
|
+
this._listItems = [...ezListHelper.processListOnDrop(this.buildDragHandlerConfig(lastIndex, true))];
|
|
293
|
+
this._listItemsHistory = [...this._listItems];
|
|
294
|
+
this.ezChange.emit(this._listItems);
|
|
295
|
+
}
|
|
296
|
+
onDropLastItemWithGroups(groupDropped) {
|
|
232
297
|
this.setSelection(undefined);
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
if (groupEnd.sort === 'DSC') {
|
|
248
|
-
newList.find(group => group.group == groupDropped.group).items.reverse();
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
this._listGroupItems = newList;
|
|
252
|
-
this.ezChange.emit(this._listGroupItems);
|
|
253
|
-
}
|
|
254
|
-
else {
|
|
255
|
-
let newList = [...this._listItems];
|
|
256
|
-
newList.splice(this._dragStartItem.index, 1);
|
|
257
|
-
newList.push(this._dragStartItem.item);
|
|
258
|
-
this._listItems = newList;
|
|
259
|
-
this._listItemsHistory = newList;
|
|
260
|
-
this.ezChange.emit(this._listItems);
|
|
298
|
+
let newList = [...this._listGroupItems];
|
|
299
|
+
let groupEnd = this._listGroupItems.find(group => groupDropped.group == group.group);
|
|
300
|
+
//Remove item arrastado
|
|
301
|
+
newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
|
|
302
|
+
//Adiciona item arrastado
|
|
303
|
+
newList.find(group => group.group == groupDropped.group).items.push(this._dragStartItem.item);
|
|
304
|
+
if (groupEnd.sort) {
|
|
305
|
+
newList
|
|
306
|
+
.find(group => group.group == groupDropped.group)
|
|
307
|
+
.items.sort(function (a, b) {
|
|
308
|
+
return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
309
|
+
});
|
|
310
|
+
if (groupEnd.sort === 'DSC') {
|
|
311
|
+
newList.find(group => group.group == groupDropped.group).items.reverse();
|
|
261
312
|
}
|
|
262
313
|
}
|
|
263
|
-
|
|
314
|
+
this._listGroupItems = newList;
|
|
315
|
+
this.ezChange.emit(this._listGroupItems);
|
|
264
316
|
}
|
|
265
317
|
onDropGroup(groupSelected) {
|
|
266
318
|
var _a;
|
|
@@ -298,19 +350,13 @@ const EzList = class {
|
|
|
298
350
|
if (this.useGroups) {
|
|
299
351
|
this.hideOverlays();
|
|
300
352
|
}
|
|
301
|
-
if (this._draggingElement) {
|
|
302
|
-
try {
|
|
303
|
-
this._element.shadowRoot.removeChild(this._draggingElement);
|
|
304
|
-
}
|
|
305
|
-
catch (err) { }
|
|
306
|
-
this._draggingElement = undefined;
|
|
307
|
-
}
|
|
308
353
|
}
|
|
309
354
|
addOverClass(element) {
|
|
310
355
|
if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains('draggable')) {
|
|
311
356
|
element.classList.add('over');
|
|
357
|
+
return;
|
|
312
358
|
}
|
|
313
|
-
|
|
359
|
+
if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains('draggable-list')) {
|
|
314
360
|
this.addOverClass(element.parentElement);
|
|
315
361
|
}
|
|
316
362
|
}
|
|
@@ -366,84 +412,94 @@ const EzList = class {
|
|
|
366
412
|
window.clearTimeout(this._changeDeboucingTimeout);
|
|
367
413
|
}
|
|
368
414
|
if (this.useGroups) {
|
|
369
|
-
this.
|
|
370
|
-
|
|
371
|
-
this.showOverlays(group);
|
|
372
|
-
}, 10);
|
|
373
|
-
}
|
|
374
|
-
else {
|
|
375
|
-
this._dragStartItem = { item: item.item, index: item.index };
|
|
415
|
+
this.onDragStartWithGroups(group, item, index);
|
|
416
|
+
return;
|
|
376
417
|
}
|
|
418
|
+
this._dragStartItem = { item: item.item, index: item.index };
|
|
419
|
+
}
|
|
420
|
+
onDragStartWithGroups(group, item, index) {
|
|
421
|
+
this._dragStartItem = { groupName: group.group, item: item, index: index };
|
|
422
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
423
|
+
this.showOverlays(group);
|
|
424
|
+
}, 10);
|
|
377
425
|
}
|
|
378
426
|
selectFirstItem() {
|
|
379
427
|
if (this.useGroups) {
|
|
380
428
|
this.setSelection(this._listGroupItems[0].items[0]);
|
|
381
429
|
}
|
|
382
|
-
{
|
|
430
|
+
else {
|
|
383
431
|
this.setSelection(this._listItems[0]);
|
|
384
432
|
}
|
|
385
433
|
}
|
|
386
434
|
nextOption(selectedItem) {
|
|
387
|
-
let nextItem = undefined;
|
|
388
435
|
if (this.useGroups) {
|
|
389
|
-
this.
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
436
|
+
this.setSelection(this.nextOptionWithGroups(selectedItem), true);
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
439
|
+
let nextItem = undefined;
|
|
440
|
+
let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
|
|
441
|
+
if (itemIndex >= 0 && itemIndex < this._listItems.length) {
|
|
442
|
+
nextItem = this._listItems[itemIndex + 1];
|
|
443
|
+
}
|
|
444
|
+
this.setSelection(nextItem, true);
|
|
445
|
+
}
|
|
446
|
+
nextOptionWithGroups(selectedItem) {
|
|
447
|
+
let nextItem = undefined;
|
|
448
|
+
this._listGroupItems.every((group, groupIndex, listGroupItems) => {
|
|
449
|
+
let item = undefined;
|
|
450
|
+
let itemIndex = group.items.findIndex(item => item.id == selectedItem.id);
|
|
451
|
+
if (itemIndex != undefined && itemIndex != -1) {
|
|
452
|
+
if (itemIndex === group.items.length - 1) {
|
|
453
|
+
if (groupIndex + 1 <= listGroupItems.length - 1) {
|
|
454
|
+
item = { label: listGroupItems[groupIndex + 1].items[0].label };
|
|
400
455
|
}
|
|
401
456
|
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
return false;
|
|
457
|
+
else {
|
|
458
|
+
item = { label: group.items[itemIndex + 1].label };
|
|
405
459
|
}
|
|
406
|
-
return true;
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
else {
|
|
410
|
-
let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
|
|
411
|
-
if (itemIndex >= 0 && itemIndex < this._listItems.length) {
|
|
412
|
-
nextItem = this._listItems[itemIndex + 1];
|
|
413
460
|
}
|
|
414
|
-
|
|
415
|
-
|
|
461
|
+
if (item != undefined) {
|
|
462
|
+
nextItem = item;
|
|
463
|
+
return false;
|
|
464
|
+
}
|
|
465
|
+
return true;
|
|
466
|
+
});
|
|
467
|
+
return nextItem;
|
|
416
468
|
}
|
|
417
469
|
previousOption(selectedItem) {
|
|
418
|
-
let previousItem = undefined;
|
|
419
470
|
if (this.useGroups) {
|
|
420
|
-
this.
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
471
|
+
this.setSelection(this.previousOptionWithGroups(selectedItem), true);
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
let previousItem = undefined;
|
|
475
|
+
let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
|
|
476
|
+
if (itemIndex > 0 && itemIndex < this._listItems.length) {
|
|
477
|
+
previousItem = this._listItems[itemIndex - 1];
|
|
478
|
+
}
|
|
479
|
+
this.setSelection(previousItem, true);
|
|
480
|
+
}
|
|
481
|
+
previousOptionWithGroups(selectedItem) {
|
|
482
|
+
let previousItem = undefined;
|
|
483
|
+
this._listGroupItems.every((group, groupIndex, listGroupItems) => {
|
|
484
|
+
let item = undefined;
|
|
485
|
+
let itemIndex = group.items.findIndex(item => item.id === selectedItem.id);
|
|
486
|
+
if (itemIndex != undefined && itemIndex != -1) {
|
|
487
|
+
if (itemIndex === 0) {
|
|
488
|
+
if (groupIndex - 1 >= 0) {
|
|
489
|
+
item = { label: listGroupItems[groupIndex - 1].items[listGroupItems[groupIndex - 1].items.length - 1].label };
|
|
431
490
|
}
|
|
432
491
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
return false;
|
|
492
|
+
else {
|
|
493
|
+
item = { label: group.items[itemIndex - 1].label };
|
|
436
494
|
}
|
|
437
|
-
return true;
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
else {
|
|
441
|
-
let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
|
|
442
|
-
if (itemIndex > 0 && itemIndex < this._listItems.length) {
|
|
443
|
-
previousItem = this._listItems[itemIndex - 1];
|
|
444
495
|
}
|
|
445
|
-
|
|
446
|
-
|
|
496
|
+
if (item != undefined) {
|
|
497
|
+
previousItem = item;
|
|
498
|
+
return false;
|
|
499
|
+
}
|
|
500
|
+
return true;
|
|
501
|
+
});
|
|
502
|
+
return previousItem;
|
|
447
503
|
}
|
|
448
504
|
keyDownHandler(event) {
|
|
449
505
|
if (!event.ctrlKey) {
|
|
@@ -485,11 +541,11 @@ const EzList = class {
|
|
|
485
541
|
}
|
|
486
542
|
}
|
|
487
543
|
onDragOverItem(event) {
|
|
488
|
-
if (this._dragStartItem)
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
544
|
+
if (!this._dragStartItem)
|
|
545
|
+
return;
|
|
546
|
+
event.preventDefault();
|
|
547
|
+
this.addOverClass(event.target);
|
|
548
|
+
event.stopPropagation();
|
|
493
549
|
}
|
|
494
550
|
onDragOverLastIndex(ev) {
|
|
495
551
|
ev.preventDefault();
|
|
@@ -529,38 +585,29 @@ const EzList = class {
|
|
|
529
585
|
doubleClickItem(item) {
|
|
530
586
|
this.ezDoubleClick.emit(item);
|
|
531
587
|
}
|
|
532
|
-
|
|
533
|
-
return
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
588
|
+
buildItem(item, evt) {
|
|
589
|
+
return { id: item.id, label: item.label, check: evt.detail };
|
|
590
|
+
}
|
|
591
|
+
renderListWithGroups() {
|
|
592
|
+
return index.h("div", { class: 'group-container', ref: el => (this._groupContainer = el), tabIndex: 0, onKeyDown: event => this.keyDownHandler(event) }, this._listGroupItems.map(group => {
|
|
593
|
+
return (index.h("div", { id: this.getDivGroupId(group.group), class: 'group', key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, index.h("label", { draggable: false, class: 'group-name', title: group.group }, group.group), index.h("section", { class: 'section-container', onDragOver: ev => ev.preventDefault() }, index.h("div", { class: 'group-items-container' }, index.h("div", { class: 'draggable-list' }, group.items.map((item, index$1) => (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
|
|
537
594
|
'selectable-container': this.ezSelectable,
|
|
538
595
|
'hover-feedback': this.hoverFeedback,
|
|
539
596
|
}, key: 'item_' + item.id }, {
|
|
540
597
|
[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`),
|
|
541
|
-
}), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
group.sort ? undefined : this.removeOverClass();
|
|
547
|
-
}, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index$1), onDragOver: event => {
|
|
548
|
-
group.sort ? undefined : this.onDragOverItem(event);
|
|
549
|
-
}, onDrop: event => this.onDrop(event, { groupName: group.group, item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, this.listMode === 'regular' ? (index.h(index.Fragment, null, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item, group), index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) }))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item, group, 'slot-item')))))), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
|
|
550
|
-
this.onDragOverLastIndex(event);
|
|
551
|
-
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event, group) })), group.sort ? (index.h("div", { id: this.getGroupOverlayId(group.group), class: "group-overlay" }, "Mover para ", group.group)) : undefined)));
|
|
552
|
-
}))) : (index.h("div", { class: "items-container", ref: el => (this._itemContainer = el), tabIndex: 0, onKeyDown: event => {
|
|
598
|
+
}), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => this.doubleClickItem(item), onClick: () => this.setSelection(item), onDragLeave: () => group.sort ? undefined : this.removeOverClass(), onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index$1), onDragOver: event => group.sort ? undefined : this.onDragOverItem(event), onDrop: event => this.onDrop(event, { groupName: group.group, item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: 'item-content' }, this.ezDraggable ? index.h("span", { class: 'draggable-icon' }) : undefined, this.listMode === 'regular' ? (index.h(index.Fragment, null, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item, group), index.h("p", { title: item.label, class: 'person-name text--ellipsis' }, item.label))) : (index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit(this.buildItem(item, evt)) }))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item, group, 'slot-item')))))), index.h("div", { class: 'last-droppable-space', onDragLeave: () => this.removeOverClass(), onDragOver: event => this.onDragOverLastIndex(event), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event, group) })), group.sort ? (index.h("div", { id: this.getGroupOverlayId(group.group), class: 'group-overlay' }, "Mover para ", group.group)) : undefined)));
|
|
599
|
+
}));
|
|
600
|
+
}
|
|
601
|
+
renderList() {
|
|
602
|
+
return index.h("div", { class: 'items-container', ref: el => (this._itemContainer = el), tabIndex: 0, onKeyDown: event => {
|
|
553
603
|
this.keyDownHandler(event);
|
|
554
|
-
} }, index.h("div", { class:
|
|
604
|
+
} }, index.h("div", { class: 'draggable-list' }, this._listItems.map((item, index$1) => (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
|
|
555
605
|
'selectable-container': this.ezSelectable,
|
|
556
606
|
'hover-feedback': this.hoverFeedback,
|
|
557
|
-
}, key: 'item_' + item.id }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`) }), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDragStart: () => this.onDragStart({ item: item, index: index$1 }),
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
}, onDragLeave: () => this.removeOverClass(), onDragOver: event => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDrop(event, { item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.listMode === 'regular' ? (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item), index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) })))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item))))), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
|
|
562
|
-
this.onDragOverLastIndex(event);
|
|
563
|
-
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event) }))))));
|
|
607
|
+
}, key: 'item_' + item.id }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`) }), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => this.doubleClickItem(item), onClick: (event) => this.setSelection(item, false, event.shiftKey, (event.altKey || event.metaKey)), onDragStart: () => this.onDragStart({ item: item, index: index$1 }), onDragOver: event => this.onDragOverItem(event), onDragLeave: () => this.removeOverClass(), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDrop(event, { item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: 'item-content' }, this.listMode === 'regular' ? (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: 'draggable-icon' }) : undefined, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item), index.h("p", { title: item.label, class: 'person-name text--ellipsis' }, item.label))) : (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: 'draggable-icon' }) : undefined, index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) })))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item))))), index.h("div", { class: 'last-droppable-space', onDragLeave: () => this.removeOverClass(), onDragOver: event => this.onDragOverLastIndex(event), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event) })));
|
|
608
|
+
}
|
|
609
|
+
render() {
|
|
610
|
+
return (index.h(index.Host, { ref: el => (this._element = el) }, this.useGroups ? this.renderListWithGroups() : this.renderList()));
|
|
564
611
|
}
|
|
565
612
|
};
|
|
566
613
|
EzList.style = ezListCss;
|