@sankhyalabs/ezui 5.22.0-dev.14 → 5.22.0-dev.141
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{CSSVarsUtils-10c9d5b4.js → CSSVarsUtils-f20973d1.js} +1 -0
- package/dist/cjs/FocusResolver-885f2173.js +35 -0
- package/dist/cjs/FormLayout-18853e70.js +27 -0
- package/dist/cjs/{constants-2714478b.js → constants-569271bc.js} +4 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +6 -5
- package/dist/cjs/ez-avatar.cjs.entry.js +50 -0
- package/dist/cjs/ez-badge.cjs.entry.js +14 -2
- package/dist/cjs/ez-button.cjs.entry.js +11 -5
- package/dist/cjs/ez-card-item_2.cjs.entry.js +267 -0
- package/dist/cjs/ez-chart.cjs.entry.js +3 -3
- package/dist/cjs/ez-check.cjs.entry.js +18 -10
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +2 -2
- package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +387 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +80 -158
- package/dist/cjs/ez-date-input.cjs.entry.js +16 -19
- package/dist/cjs/ez-date-time-input.cjs.entry.js +15 -20
- package/dist/cjs/ez-dialog.cjs.entry.js +18 -8
- package/dist/cjs/ez-double-list.cjs.entry.js +287 -0
- package/dist/cjs/ez-dropdown.cjs.entry.js +14 -8
- package/dist/cjs/ez-filter-input.cjs.entry.js +129 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +41 -27
- package/dist/cjs/ez-form.cjs.entry.js +89 -327
- package/dist/cjs/ez-grid.cjs.entry.js +15290 -69794
- package/dist/cjs/ez-icon.cjs.entry.js +12 -6
- package/dist/cjs/ez-list.cjs.entry.js +258 -211
- package/dist/cjs/ez-modal-container.cjs.entry.js +7 -3
- package/dist/cjs/ez-modal.cjs.entry.js +17 -4
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -2
- package/dist/cjs/ez-number-input.cjs.entry.js +16 -3
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +238 -0
- package/dist/cjs/ez-popup.cjs.entry.js +29 -3
- package/dist/cjs/ez-scroller_2.cjs.entry.js +3 -3
- package/dist/cjs/ez-search-plus.cjs.entry.js +397 -0
- package/dist/cjs/ez-search-result-list.cjs.entry.js +97 -0
- package/dist/cjs/ez-search.cjs.entry.js +134 -191
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-skeleton.cjs.entry.js +118 -36
- package/dist/cjs/ez-split-button.cjs.entry.js +16 -7
- package/dist/cjs/ez-split-item.cjs.entry.js +7 -4
- package/dist/cjs/ez-split-panel.cjs.entry.js +68 -6
- package/dist/cjs/ez-text-area.cjs.entry.js +91 -8
- package/dist/cjs/ez-text-input.cjs.entry.js +150 -31
- package/dist/cjs/ez-time-input.cjs.entry.js +9 -2
- package/dist/cjs/ez-tooltip.cjs.entry.js +135 -0
- package/dist/cjs/ez-tree.cjs.entry.js +5 -4
- package/dist/cjs/ezListHelper-0d3970b4.js +90 -0
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/filter-column.cjs.entry.js +24 -52
- package/dist/cjs/floating-ui.dom.esm-017acce4.js +1404 -0
- package/dist/cjs/index-a7b0c73d.js +36 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/search-column-27d1f72f.js +505 -0
- package/dist/cjs/searchFormatters-b7e1ed1e.js +23 -0
- package/dist/collection/collection-manifest.json +21 -2
- package/dist/collection/components/ez-actions-button/ez-actions-button.css +2 -0
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +3 -2
- package/dist/collection/components/ez-avatar/ez-avatar.css +139 -0
- package/dist/collection/components/ez-avatar/ez-avatar.js +143 -0
- package/dist/collection/components/ez-badge/ez-badge.css +12 -1
- package/dist/collection/components/ez-badge/ez-badge.js +31 -1
- package/dist/collection/components/ez-button/ez-button.css +24 -14
- package/dist/collection/components/ez-button/ez-button.js +12 -6
- package/dist/collection/components/ez-card-item/ez-card-item.css +58 -10
- package/dist/collection/components/ez-card-item/ez-card-item.js +30 -3
- package/dist/collection/components/ez-chart/ez-chart.js +2 -2
- package/dist/collection/components/ez-chart/interfaces/ChartTypeValue.js +1 -0
- package/dist/collection/components/ez-chart/types/BaseHighChartsRender.js +3 -3
- package/dist/collection/components/ez-check/ez-check.css +10 -6
- package/dist/collection/components/ez-check/ez-check.js +34 -9
- package/dist/collection/components/ez-chip/ez-chip.css +5 -1
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +1 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.css +205 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js +426 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +8 -246
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +141 -167
- package/dist/collection/components/ez-date-input/ez-date-input.css +1 -1
- package/dist/collection/components/ez-date-input/ez-date-input.js +58 -19
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +1 -1
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +57 -20
- package/dist/collection/components/ez-dialog/ez-dialog.css +27 -24
- package/dist/collection/components/ez-dialog/ez-dialog.js +18 -17
- package/dist/collection/components/ez-double-list/doubleListHelper.js +82 -0
- package/dist/collection/components/ez-double-list/ez-double-list.css +62 -0
- package/dist/collection/components/ez-double-list/ez-double-list.js +440 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.js +33 -8
- package/dist/collection/components/ez-filter-input/ez-filter-input.css +1 -1
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +35 -4
- package/dist/collection/components/ez-form/ez-form.js +125 -4
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +49 -6
- package/dist/collection/components/ez-form-view/ez-form-view.css +13 -2
- package/dist/collection/components/ez-form-view/ez-form-view.js +21 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +5 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +8 -4
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js +6 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +443 -76
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +172 -33
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js +2 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +248 -43
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +16 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +10 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +2 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +8 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.js +15 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +4 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +2 -0
- package/dist/collection/components/ez-grid/ez-grid.css +107 -10
- package/dist/collection/components/ez-grid/ez-grid.js +518 -23
- package/dist/collection/components/ez-grid/interfaces/IGridMode.js +1 -0
- package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.css +4 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +23 -51
- package/dist/collection/components/ez-grid/utils/ColumnFilterManager.js +7 -54
- package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js +20 -4
- package/dist/collection/components/ez-icon/ez-icon.css +156 -149
- package/dist/collection/components/ez-icon/ez-icon.js +28 -5
- package/dist/collection/components/ez-list/ez-list.css +6 -4
- package/dist/collection/components/ez-list/ez-list.js +301 -212
- package/dist/collection/components/ez-list/ezListHelper.js +85 -0
- package/dist/collection/components/ez-modal/ez-modal.css +7 -2
- package/dist/collection/components/ez-modal/ez-modal.js +18 -5
- package/dist/collection/components/ez-modal-container/ez-modal-container.css +3 -1
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +6 -2
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +3 -3
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +1 -1
- package/dist/collection/components/ez-multi-selection-list/interfaces/IStaticOptionsFetchConfig.js +1 -0
- package/dist/collection/components/ez-number-input/ez-number-input.css +8 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js +67 -1
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.css +3 -0
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +434 -0
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +67 -0
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +524 -0
- package/dist/collection/components/ez-popup/ez-popup.css +8 -3
- package/dist/collection/components/ez-popup/ez-popup.js +48 -4
- package/dist/collection/components/ez-scroller/ez-scroller.css +4 -0
- package/dist/collection/components/ez-search/ez-search.css +2 -210
- package/dist/collection/components/ez-search/ez-search.js +234 -204
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.css +227 -0
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.js +318 -0
- package/dist/collection/components/ez-search/utils/searchFormatters.js +18 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.css +373 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.js +960 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.css +221 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +278 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +3 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +1 -1
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css +4 -1
- package/dist/collection/components/ez-skeleton/ez-skeleton.constants.js +25 -1
- package/dist/collection/components/ez-skeleton/ez-skeleton.css +140 -78
- package/dist/collection/components/ez-skeleton/ez-skeleton.js +210 -46
- package/dist/collection/components/ez-split-button/ez-split-button.css +53 -15
- package/dist/collection/components/ez-split-button/ez-split-button.js +90 -13
- package/dist/collection/components/ez-split-panel/ez-split-panel.css +15 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +106 -5
- package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js +1 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +14 -2
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +22 -1
- package/dist/collection/components/ez-text-area/ez-text-area.css +78 -29
- package/dist/collection/components/ez-text-area/ez-text-area.js +151 -6
- package/dist/collection/components/ez-text-input/ez-text-input.css +133 -93
- package/dist/collection/components/ez-text-input/ez-text-input.js +231 -29
- package/dist/collection/components/ez-time-input/ez-time-input.js +43 -1
- package/dist/collection/components/ez-tooltip/ez-tooltip.css +62 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.js +310 -0
- package/dist/collection/components/ez-tree/ez-tree.js +21 -1
- package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +3 -3
- package/dist/collection/sw.js +46 -0
- package/dist/collection/utils/CSSVarsUtils.js +1 -0
- package/dist/collection/utils/FocusResolver.js +31 -0
- package/dist/collection/utils/constants.js +2 -0
- package/dist/collection/utils/form/DataBinder.js +65 -21
- package/dist/collection/utils/form/FormMetadata.js +2 -1
- package/dist/collection/utils/form/interfaces/FormLayout.js +5 -0
- package/dist/collection/utils/form/interfaces/index.js +1 -1
- package/dist/collection/utils/form/test/DataBinder.test.js +14 -0
- package/dist/collection/utils/index.js +3 -0
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
- package/dist/collection/utils/search/types.js +7 -0
- package/dist/collection/utils/searchColumn/search-column.js +35 -0
- package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js +1 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +7 -1
- package/dist/custom-elements/index.d.ts +54 -0
- package/dist/custom-elements/index.js +20072 -70949
- package/dist/esm/{CSSVarsUtils-71ce76be.js → CSSVarsUtils-acba92d7.js} +1 -0
- package/dist/esm/FocusResolver-1ccbf850.js +33 -0
- package/dist/esm/FormLayout-071d324c.js +27 -0
- package/dist/esm/constants-b036528f.js +7 -0
- package/dist/esm/ez-actions-button.entry.js +6 -5
- package/dist/esm/ez-avatar.entry.js +46 -0
- package/dist/esm/ez-badge.entry.js +14 -2
- package/dist/esm/ez-button.entry.js +11 -5
- package/dist/esm/ez-card-item_2.entry.js +262 -0
- package/dist/esm/ez-chart.entry.js +3 -3
- package/dist/esm/ez-check.entry.js +18 -10
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +2 -2
- package/dist/esm/ez-combo-box-list_3.entry.js +381 -0
- package/dist/esm/ez-combo-box.entry.js +81 -159
- package/dist/esm/ez-date-input.entry.js +16 -19
- package/dist/esm/ez-date-time-input.entry.js +15 -20
- package/dist/esm/ez-dialog.entry.js +19 -9
- package/dist/esm/ez-double-list.entry.js +283 -0
- package/dist/esm/ez-dropdown.entry.js +14 -8
- package/dist/esm/ez-filter-input.entry.js +125 -0
- package/dist/esm/ez-form-view.entry.js +42 -28
- package/dist/esm/ez-form.entry.js +88 -326
- package/dist/esm/ez-grid.entry.js +15289 -69793
- package/dist/esm/ez-icon.entry.js +12 -6
- package/dist/esm/ez-list.entry.js +258 -211
- package/dist/esm/ez-modal-container.entry.js +7 -3
- package/dist/esm/ez-modal.entry.js +17 -4
- package/dist/esm/ez-multi-selection-list.entry.js +2 -2
- package/dist/esm/ez-number-input.entry.js +16 -3
- package/dist/esm/ez-popover-plus_3.entry.js +232 -0
- package/dist/esm/ez-popup.entry.js +29 -3
- package/dist/esm/ez-scroller_2.entry.js +3 -3
- package/dist/esm/ez-search-plus.entry.js +393 -0
- package/dist/esm/ez-search-result-list.entry.js +93 -0
- package/dist/esm/ez-search.entry.js +135 -192
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-skeleton.entry.js +118 -36
- package/dist/esm/ez-split-button.entry.js +16 -7
- package/dist/esm/ez-split-item.entry.js +7 -4
- package/dist/esm/ez-split-panel.entry.js +69 -7
- package/dist/esm/ez-text-area.entry.js +91 -8
- package/dist/esm/ez-text-input.entry.js +150 -31
- package/dist/esm/ez-time-input.entry.js +9 -2
- package/dist/esm/ez-tooltip.entry.js +131 -0
- package/dist/esm/ez-tree.entry.js +5 -4
- package/dist/esm/ezListHelper-00fb9b8d.js +87 -0
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/filter-column.entry.js +24 -52
- package/dist/esm/floating-ui.dom.esm-5d3da819.js +1398 -0
- package/dist/esm/index-baa5e267.js +36 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/search-column-e609d513.js +495 -0
- package/dist/esm/searchFormatters-8229207e.js +20 -0
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-07894c4a.entry.js +1 -0
- package/dist/ezui/p-0d9856a4.entry.js +1 -0
- package/dist/ezui/p-1bcfd88c.entry.js +1 -0
- package/dist/ezui/p-1eb34cad.entry.js +1 -0
- package/dist/ezui/p-20c024f7.entry.js +1 -0
- package/dist/ezui/p-26685c50.entry.js +1 -0
- package/dist/ezui/p-288631d1.entry.js +1 -0
- package/dist/ezui/p-2b42abbb.entry.js +1 -0
- package/dist/ezui/p-2b4df33d.entry.js +1 -0
- package/dist/ezui/p-30ffb9ed.js +1 -0
- package/dist/ezui/p-33326ac5.entry.js +1 -0
- package/dist/ezui/p-341da682.entry.js +1 -0
- package/dist/ezui/p-35115d5d.entry.js +1 -0
- package/dist/ezui/p-3ba9565c.entry.js +1 -0
- package/dist/ezui/p-40a60148.js +1 -0
- package/dist/ezui/p-496f7832.entry.js +1 -0
- package/dist/ezui/p-4b67138e.entry.js +1 -0
- package/dist/ezui/p-4bd6dd6a.entry.js +1 -0
- package/dist/ezui/p-4d30b703.entry.js +1 -0
- package/dist/ezui/p-57363cfd.entry.js +1 -0
- package/dist/ezui/p-58f69d24.entry.js +1 -0
- package/dist/ezui/{p-84e439b9.entry.js → p-5dde9df3.entry.js} +1 -1
- package/dist/ezui/p-5eea9886.js +1 -0
- package/dist/ezui/p-69937816.entry.js +1 -0
- package/dist/ezui/p-7019f782.entry.js +1 -0
- package/dist/ezui/p-79044c3e.entry.js +1 -0
- package/dist/ezui/p-7e677b7b.entry.js +1 -0
- package/dist/ezui/p-7eae6986.entry.js +1 -0
- package/dist/ezui/p-80dfc50b.js +1 -0
- package/dist/ezui/p-9478b13b.entry.js +1 -0
- package/dist/ezui/p-9567b31a.entry.js +1 -0
- package/dist/ezui/p-97c7cf51.entry.js +1 -0
- package/dist/ezui/p-998afb6a.entry.js +1 -0
- package/dist/ezui/p-9c5cd3b2.entry.js +1 -0
- package/dist/ezui/p-a148e994.entry.js +1 -0
- package/dist/ezui/p-a3bf8cf1.entry.js +1 -0
- package/dist/ezui/p-b38411b4.entry.js +309 -0
- package/dist/ezui/p-b81881ac.entry.js +1 -0
- package/dist/ezui/p-bac0f920.entry.js +1 -0
- package/dist/ezui/p-bff24a7b.js +1 -0
- package/dist/ezui/p-cb75eb46.entry.js +1 -0
- package/dist/ezui/{p-5b205c80.entry.js → p-d47dabdf.entry.js} +1 -1
- package/dist/ezui/p-da1b4a38.entry.js +1 -0
- package/dist/ezui/p-dc628ed3.js +1 -0
- package/dist/ezui/p-dc73e1fe.entry.js +1 -0
- package/dist/ezui/{p-17be134a.entry.js → p-e06a9886.entry.js} +1 -1
- package/dist/ezui/p-e07e4671.js +1 -0
- package/dist/ezui/p-e6a9041d.entry.js +1 -0
- package/dist/ezui/p-e75c7a23.entry.js +1 -0
- package/dist/ezui/p-ec7db713.js +1 -0
- package/dist/ezui/p-fa6732f2.entry.js +1 -0
- package/dist/types/components/ez-avatar/ez-avatar.d.ts +24 -0
- package/dist/types/components/ez-badge/ez-badge.d.ts +5 -0
- package/dist/types/components/ez-button/ez-button.d.ts +2 -1
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +3 -3
- package/dist/types/components/ez-card-item/ez-card-item.d.ts +5 -0
- package/dist/types/components/ez-chart/interfaces/ChartAxis.d.ts +2 -0
- package/dist/types/components/ez-chart/interfaces/ChartTypeValue.d.ts +1 -0
- package/dist/types/components/ez-check/ez-check.d.ts +7 -2
- package/dist/types/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.d.ts +104 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +19 -15
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +12 -3
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +12 -3
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +3 -1
- package/dist/types/components/ez-double-list/doubleListHelper.d.ts +10 -0
- package/dist/types/components/ez-double-list/ez-double-list.d.ts +87 -0
- package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +4 -0
- package/dist/types/components/ez-dropdown/structure/DropdownItem.d.ts +4 -4
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +6 -1
- package/dist/types/components/ez-form/ez-form.d.ts +23 -1
- package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +7 -1
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +4 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +2 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.d.ts +2 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +84 -5
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +47 -7
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +26 -2
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +34 -7
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +4 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +2 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.d.ts +3 -0
- package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +80 -2
- package/dist/types/components/ez-grid/interfaces/IGridMode.d.ts +1 -0
- package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +1 -11
- package/dist/types/components/ez-grid/utils/ColumnFilterManager.d.ts +1 -1
- package/dist/types/components/ez-grid/utils/InMemoryFilterColumnDataSource.d.ts +3 -0
- package/dist/types/components/ez-icon/ez-icon.d.ts +5 -0
- package/dist/types/components/ez-list/ez-list.d.ts +23 -2
- package/dist/types/components/ez-list/ezListHelper.d.ts +20 -0
- package/dist/types/components/ez-modal/ez-modal.d.ts +4 -1
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +2 -0
- package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.d.ts +2 -1
- package/dist/types/components/ez-multi-selection-list/interfaces/IStaticOptionsFetchConfig.d.ts +3 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +12 -0
- package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +74 -0
- package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +89 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +10 -1
- package/dist/types/components/ez-search/ez-search.d.ts +37 -18
- package/dist/types/components/ez-search/subcomponent/search-list/search-list.d.ts +29 -0
- package/dist/types/components/ez-search/utils/searchFormatters.d.ts +2 -0
- package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +186 -0
- package/dist/types/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.d.ts +26 -0
- package/dist/types/components/ez-skeleton/ez-skeleton.constants.d.ts +55 -1
- package/dist/types/components/ez-skeleton/ez-skeleton.d.ts +50 -22
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +15 -3
- package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +11 -0
- package/dist/types/components/ez-split-panel/interfaces/IPanelSizeInfo.d.ts +9 -0
- package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +5 -0
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +25 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +37 -3
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +8 -0
- package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +57 -0
- package/dist/types/components/ez-tree/ez-tree.d.ts +4 -0
- package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +1 -0
- package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +1 -0
- package/dist/types/components.d.ts +1390 -54
- package/dist/types/utils/FocusResolver.d.ts +5 -0
- package/dist/types/utils/constants.d.ts +2 -0
- package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +2 -0
- package/dist/types/utils/form/DataBinder.d.ts +7 -2
- package/dist/types/utils/form/interfaces/FormLayout.d.ts +4 -0
- package/dist/types/utils/form/interfaces/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/search/types.d.ts +12 -0
- package/dist/types/utils/searchColumn/search-column.d.ts +9 -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 +16 -7
- package/react/components.d.ts +63 -54
- package/react/components.js +9 -0
- package/react/components.js.map +1 -1
- package/react/react-component-lib/createComponent.d.ts +1 -1
- package/react/react-component-lib/createComponent.js.map +1 -1
- package/react/react-component-lib/createOverlayComponent.js.map +1 -1
- package/react/react-component-lib/interfaces.js +1 -0
- package/react/react-component-lib/utils/attachProps.d.ts +1 -1
- package/react/react-component-lib/utils/attachProps.js.map +1 -1
- package/react/react-component-lib/utils/dev.js.map +1 -1
- package/react/react-component-lib/utils/index.d.ts +2 -2
- package/react/react-component-lib/utils/index.js.map +1 -1
- package/dist/cjs/ICustomRender-6fafffce.js +0 -13
- package/dist/cjs/RecordValidationProcessor-4c893e04.js +0 -102
- package/dist/cjs/ez-card-item_3.cjs.entry.js +0 -183
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +0 -206
- package/dist/esm/ICustomRender-875b5a40.js +0 -13
- package/dist/esm/RecordValidationProcessor-b00b8b77.js +0 -99
- package/dist/esm/constants-4e0d35b7.js +0 -5
- package/dist/esm/ez-card-item_3.entry.js +0 -177
- package/dist/esm/ez-custom-form-input_2.entry.js +0 -201
- package/dist/ezui/p-04f24913.js +0 -1
- package/dist/ezui/p-05e1f4e7.js +0 -1
- package/dist/ezui/p-072e6347.entry.js +0 -1
- package/dist/ezui/p-1285c902.entry.js +0 -1
- package/dist/ezui/p-13d2fe2d.entry.js +0 -1
- package/dist/ezui/p-2097d0cf.entry.js +0 -1
- package/dist/ezui/p-32e553e5.entry.js +0 -304
- package/dist/ezui/p-34b6916c.entry.js +0 -1
- package/dist/ezui/p-3b4eeeb6.entry.js +0 -1
- package/dist/ezui/p-3faa2b46.entry.js +0 -1
- package/dist/ezui/p-42533ea4.entry.js +0 -1
- package/dist/ezui/p-4607fb89.js +0 -1
- package/dist/ezui/p-49456b34.entry.js +0 -1
- package/dist/ezui/p-4d5235f1.entry.js +0 -1
- package/dist/ezui/p-5bd5e68f.entry.js +0 -1
- package/dist/ezui/p-650e4b6d.entry.js +0 -1
- package/dist/ezui/p-784fe207.entry.js +0 -1
- package/dist/ezui/p-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-9050d2cd.entry.js +0 -1
- package/dist/ezui/p-922ac38b.entry.js +0 -1
- package/dist/ezui/p-9e11fc7b.js +0 -1
- package/dist/ezui/p-a31b9c90.entry.js +0 -1
- package/dist/ezui/p-aba3da00.entry.js +0 -1
- package/dist/ezui/p-af95cd16.entry.js +0 -1
- package/dist/ezui/p-bae4e180.entry.js +0 -1
- package/dist/ezui/p-baf80b13.entry.js +0 -1
- package/dist/ezui/p-bcb53f27.entry.js +0 -1
- package/dist/ezui/p-bf79aaa1.entry.js +0 -1
- package/dist/ezui/p-cdc472cc.entry.js +0 -1
- package/dist/ezui/p-d9401ea0.entry.js +0 -1
- package/dist/ezui/p-e85c48d7.entry.js +0 -1
- package/dist/ezui/p-ecc2c1ec.entry.js +0 -1
- package/dist/ezui/p-fcf0acce.entry.js +0 -1
|
@@ -5,37 +5,35 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:
|
|
8
|
+
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:30px;--ez-text-input--height--slim:32px;--ez-text-input__min-width:0px;--ez-text-input__max-width:100%;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--border-top-left-radius:var(--ez-text-input--border-radius);--ez-text-input--border-bottom-left-radius:var(--ez-text-input--border-radius);--ez-text-input--border-top-right-radius:var(--ez-text-input--border-radius);--ez-text-input--border-bottom-right-radius:var(--ez-text-input--border-radius);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__margin-bottom:var(--space--small);--ez-text-input__input--background-color:var(--background--light, #ffffff);--ez-text-input__input--border:var(--border--small, 1px solid);--ez-text-input__input--border-color:var(--color--strokes,#DCE0E8);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--background--medium, #F0F3F7);--ez-text-input__input--disabled--color:var(--text--primary, #626E82);--ez-text-input__input--error--border-color:var(--color-alert--error-800,#BD0025);--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__placeholder--color:var(--text--secondary, #a2abb9);--ez-text-input__tooltip_icon--error--color:var(--color-alert--error-800,#BD0025);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;--ez-text-input__input--focus--icon-color:var(--title--primary, #2B3A54);--ez-text-input__input--disabled--focus--icon-color:var(--text--primary, #626E82);--ez-text-input__tooltip-icon--spacing:var(--space--large);--ez-text-input__tooltip-icon---width:var(--space--large);--ez-text-input__tooltip-icon---horizontal-margin:var(--space--medium, 12px);--ez-text-input__tooltip-icon---vertical-margin:10px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width);min-width:var(--ez-text-input__min-width);max-width:var(--ez-text-input__max-width)}:host(.grid_editor){--ez-text-input--height--slim:25px}input{width:100%;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;height:var(--ez-text-input--height);border-top-left-radius:var(--ez-text-input--border-top-left-radius);border-bottom-left-radius:var(--ez-text-input--border-bottom-left-radius);border-top-right-radius:var(--ez-text-input--border-top-right-radius);border-bottom-right-radius:var(--ez-text-input--border-bottom-right-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight);padding:var(--ez-text-input__input--padding);margin-bottom:var(--ez-text-input__margin-bottom)}input.no--margin{--ez-text-input__margin-bottom:0}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}input:focus{outline:none;border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--focus--border-color)}input.focused{border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--left.hasError{padding-right:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.icon--right.hasError{padding-right:calc(var(--ez-text-input__icon--width) + var(--ez-text-input__tooltip-icon--spacing))}input.hasError{color:var(--ez-text-input--color);border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--error--border-color);padding-right:calc(var(--ez-text-input__tooltip-icon---width) + (2*var(--ez-text-input__tooltip-icon---horizontal-margin)))}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:disabled,input:read-only{cursor:not-allowed}.hasError{color:var(--ez-text-input__tooltip_icon--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label.hasError{width:calc(100% - 2*(var(--ez-text-input__tooltip-icon--spacing)))}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input__slim--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder,.input--slim:-moz-placeholder,.input--slim::-moz-placeholder,.input--slim:-ms-input-placeholder,.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input__placeholder--color)}.input--slim:disabled::-webkit-input-placeholder,.input--slim:disabled:-moz-placeholder,.input--slim:disabled::-moz-placeholder,.input--slim:disabled:-ms-input-placeholder,.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}ez-icon.tooltip-icon{position:absolute;display:flex;align-items:center;justify-content:center;overflow:hidden;width:var(--ez-text-input__tooltip-icon---width);height:22px;margin:var(--ez-text-input__tooltip-icon---vertical-margin) var(--ez-text-input__tooltip-icon---horizontal-margin);top:0;right:0;z-index:var(--elevation--4);border-radius:var(--ez-text-input--border-radius)}ez-icon.tooltip-icon.rightIconSlot{right:var(--ez-text-input__tooltip-icon--spacing)}ez-icon.tooltip-icon.hasError{--ez-icon--color:var(--ez-text-input__tooltip_icon--error--color)}";
|
|
9
9
|
|
|
10
10
|
const EzTextInput = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
14
|
+
this._isOverflowing = false;
|
|
14
15
|
this.label = undefined;
|
|
16
|
+
this.alternativePlaceholder = undefined;
|
|
15
17
|
this.value = undefined;
|
|
16
18
|
this.enabled = true;
|
|
17
19
|
this.errorMessage = undefined;
|
|
20
|
+
this.hasInvalid = false;
|
|
18
21
|
this.mask = undefined;
|
|
22
|
+
this.cleanValueMask = false;
|
|
19
23
|
this.canShowError = true;
|
|
20
24
|
this.restrict = undefined;
|
|
21
25
|
this.mode = "regular";
|
|
22
26
|
this.noBorder = false;
|
|
23
27
|
this.password = false;
|
|
28
|
+
this.autoFocus = false;
|
|
29
|
+
this.hasRightSlotContent = false;
|
|
30
|
+
this.forceLabelFloat = false;
|
|
24
31
|
}
|
|
25
|
-
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
var _a, _b;
|
|
29
|
-
if (hasError) {
|
|
30
|
-
this._inputElem.classList.add("hasError");
|
|
31
|
-
(_a = this._messageBoxElem) === null || _a === void 0 ? void 0 : _a.classList.add("hasError");
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
this._inputElem.classList.remove("hasError");
|
|
35
|
-
(_b = this._messageBoxElem) === null || _b === void 0 ? void 0 : _b.classList.remove("hasError");
|
|
36
|
-
}
|
|
37
|
-
});
|
|
32
|
+
observeHasInvalid(newValue, oldValue) {
|
|
33
|
+
if (newValue === oldValue) {
|
|
34
|
+
return;
|
|
38
35
|
}
|
|
36
|
+
this.validateErrors();
|
|
39
37
|
}
|
|
40
38
|
observeMask() {
|
|
41
39
|
if (this.mask) {
|
|
@@ -53,6 +51,7 @@ const EzTextInput = class {
|
|
|
53
51
|
this._inputElem.value = this.value || "";
|
|
54
52
|
this.handleChange();
|
|
55
53
|
this.adjustFloatingLabel();
|
|
54
|
+
this.checkIsOverflowing();
|
|
56
55
|
if (!this.isSlaveMode()) {
|
|
57
56
|
this.errorMessage = "";
|
|
58
57
|
this.ezChange.emit(this.value);
|
|
@@ -60,14 +59,38 @@ const EzTextInput = class {
|
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
}
|
|
62
|
+
observeAlternativePlaceholder(newValue) {
|
|
63
|
+
this.forceLabelFloat = !!newValue;
|
|
64
|
+
}
|
|
63
65
|
//---------------------------------------------
|
|
64
66
|
// Private methods
|
|
65
67
|
//---------------------------------------------
|
|
68
|
+
validateErrors() {
|
|
69
|
+
const hasErrorMessage = this.handleValidateErrorMessage(this.errorMessage);
|
|
70
|
+
const hasError = this.canShowError && (hasErrorMessage || this.hasInvalid);
|
|
71
|
+
this.updateClassError(hasError);
|
|
72
|
+
}
|
|
73
|
+
handleValidateErrorMessage(message = this.errorMessage) {
|
|
74
|
+
return typeof message === "string" && message.trim() !== "";
|
|
75
|
+
}
|
|
76
|
+
updateClassError(status) {
|
|
77
|
+
if (!this._inputElem) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (status) {
|
|
81
|
+
this._inputElem.classList.add("hasError");
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this._inputElem.classList.remove("hasError");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
66
87
|
adjustFloatingLabel() {
|
|
67
88
|
if (this.label && this._labelElem) {
|
|
68
89
|
if (this._inputElem && !this._inputElem.classList.contains("input--with--label")) {
|
|
69
90
|
this._inputElem.classList.add("input--with--label");
|
|
70
91
|
}
|
|
92
|
+
if (this.forceLabelFloat)
|
|
93
|
+
return;
|
|
71
94
|
const hasValue = this.value && this.value.toString().length > 0;
|
|
72
95
|
const containsFloatedClass = this._labelElem.classList.contains("input__label--floated");
|
|
73
96
|
if (hasValue || this.isFocused()) {
|
|
@@ -109,7 +132,12 @@ const EzTextInput = class {
|
|
|
109
132
|
const { selectText } = options || {};
|
|
110
133
|
if (selectText)
|
|
111
134
|
this._inputElem.select();
|
|
112
|
-
this._inputElem.
|
|
135
|
+
if (this._inputElem.disabled) {
|
|
136
|
+
this._inputElem.classList.add("focused");
|
|
137
|
+
this._inputElem.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
requestAnimationFrame(() => this._inputElem.focus());
|
|
113
141
|
}
|
|
114
142
|
/**
|
|
115
143
|
* Remove o foco do campo.
|
|
@@ -121,7 +149,7 @@ const EzTextInput = class {
|
|
|
121
149
|
* Retorna se o conteúdo é inválido.
|
|
122
150
|
*/
|
|
123
151
|
async isInvalid() {
|
|
124
|
-
return
|
|
152
|
+
return this.handleValidateErrorMessage();
|
|
125
153
|
}
|
|
126
154
|
//---------------------------------------------
|
|
127
155
|
// Event handlers
|
|
@@ -130,7 +158,12 @@ const EzTextInput = class {
|
|
|
130
158
|
const value = this._inputElem.value;
|
|
131
159
|
if (value && this._maskFormatter) {
|
|
132
160
|
try {
|
|
133
|
-
|
|
161
|
+
if (this.cleanValueMask) {
|
|
162
|
+
this.applyMask(value);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
this._inputElem.value = this._maskFormatter.format(value);
|
|
166
|
+
}
|
|
134
167
|
}
|
|
135
168
|
catch (e) {
|
|
136
169
|
this.errorMessage = e.message;
|
|
@@ -148,8 +181,34 @@ const EzTextInput = class {
|
|
|
148
181
|
}
|
|
149
182
|
controlChangeValue() {
|
|
150
183
|
if (this._inputElem && (this.value || '') !== this._inputElem.value) {
|
|
151
|
-
this.
|
|
184
|
+
if (this.cleanValueMask) {
|
|
185
|
+
this.value = this._maskFormatter.removeMask(this._inputElem.value);
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
this.value = this._inputElem.value;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
applyMask(value) {
|
|
193
|
+
if (!value || value === "")
|
|
194
|
+
return value;
|
|
195
|
+
if (this._maskFormatter) {
|
|
196
|
+
try {
|
|
197
|
+
const formattedValue = this._maskFormatter.applyMask(this._maskFormatter.removeMask(value));
|
|
198
|
+
if (this._inputElem) {
|
|
199
|
+
this._inputElem.value = formattedValue;
|
|
200
|
+
return this._inputElem.value;
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
this.value = formattedValue;
|
|
204
|
+
return this.value;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
catch (e) {
|
|
208
|
+
this.errorMessage = e.message;
|
|
209
|
+
}
|
|
152
210
|
}
|
|
211
|
+
return value;
|
|
153
212
|
}
|
|
154
213
|
handleChange() {
|
|
155
214
|
if (!this._inputElem) {
|
|
@@ -165,8 +224,10 @@ const EzTextInput = class {
|
|
|
165
224
|
this.controlChangeValue();
|
|
166
225
|
}
|
|
167
226
|
handleSlotChange(ev) {
|
|
227
|
+
var _a;
|
|
168
228
|
const slot = ev.target;
|
|
169
229
|
const content = slot.assignedElements()[0];
|
|
230
|
+
this.hasRightSlotContent = false;
|
|
170
231
|
if (content) {
|
|
171
232
|
content.style.position = "absolute";
|
|
172
233
|
content.style.display = "flex";
|
|
@@ -192,10 +253,14 @@ const EzTextInput = class {
|
|
|
192
253
|
if (this._labelElem) {
|
|
193
254
|
this._labelElem.classList.add("input__label--right");
|
|
194
255
|
}
|
|
256
|
+
if (this._tooltipIconElem) {
|
|
257
|
+
this._tooltipIconElem.classList.add("rightIconSlot");
|
|
258
|
+
}
|
|
259
|
+
this.hasRightSlotContent = ((_a = content.children) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
195
260
|
}
|
|
196
261
|
slot.name && core.ElementIDUtils.addIDInfo(content, slot.name);
|
|
197
262
|
}
|
|
198
|
-
this.
|
|
263
|
+
this.validateErrors();
|
|
199
264
|
}
|
|
200
265
|
doFocus() {
|
|
201
266
|
if (this.label && this._labelElem && !this._labelElem.classList.contains("input__label--floated")) {
|
|
@@ -203,21 +268,43 @@ const EzTextInput = class {
|
|
|
203
268
|
}
|
|
204
269
|
this.adjustColorContentSlot("var(--ez-text-input__input--focus--icon-color)");
|
|
205
270
|
}
|
|
271
|
+
getValue() {
|
|
272
|
+
return this.mask && this.cleanValueMask ? this.applyMask(this.value) : this.value;
|
|
273
|
+
}
|
|
274
|
+
buildLabelClass() {
|
|
275
|
+
let classList = this.enabled ? 'input__label' : 'input__label input__label--disabled';
|
|
276
|
+
if (this.errorMessage)
|
|
277
|
+
classList = classList + ' hasError';
|
|
278
|
+
if (this.forceLabelFloat)
|
|
279
|
+
classList = classList + ' input__label--floated';
|
|
280
|
+
return classList;
|
|
281
|
+
}
|
|
282
|
+
buildPlaceholder() {
|
|
283
|
+
if (this.alternativePlaceholder)
|
|
284
|
+
return this.alternativePlaceholder;
|
|
285
|
+
return (this.mode === "slim" && this.label) ? this.label : '';
|
|
286
|
+
}
|
|
287
|
+
checkIsOverflowing() {
|
|
288
|
+
if (this._inputElem) {
|
|
289
|
+
this._isOverflowing = this._inputElem.offsetWidth < this._inputElem.scrollWidth;
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
this._isOverflowing = false;
|
|
293
|
+
}
|
|
206
294
|
//---------------------------------------------
|
|
207
295
|
// Lifecycle web component
|
|
208
296
|
//---------------------------------------------
|
|
209
|
-
componentDidLoad() {
|
|
210
|
-
this.observeErrorMessage();
|
|
211
|
-
this.observeMask();
|
|
212
|
-
this.adjustFloatingLabel();
|
|
213
|
-
this.adjustBorderInput();
|
|
214
|
-
}
|
|
215
297
|
componentWillLoad() {
|
|
216
298
|
this.observeMask();
|
|
217
299
|
if (this.value) {
|
|
218
300
|
if (this._maskFormatter) {
|
|
219
301
|
try {
|
|
220
|
-
|
|
302
|
+
if (this.cleanValueMask) {
|
|
303
|
+
this.applyMask(this.value);
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
this.value = this._maskFormatter.format(this.value);
|
|
307
|
+
}
|
|
221
308
|
}
|
|
222
309
|
catch (e) {
|
|
223
310
|
this.errorMessage = e.message;
|
|
@@ -229,18 +316,50 @@ const EzTextInput = class {
|
|
|
229
316
|
}
|
|
230
317
|
}
|
|
231
318
|
}
|
|
319
|
+
componentDidLoad() {
|
|
320
|
+
var _a;
|
|
321
|
+
this.validateErrors();
|
|
322
|
+
this.observeMask();
|
|
323
|
+
this.adjustFloatingLabel();
|
|
324
|
+
this.adjustBorderInput();
|
|
325
|
+
this.checkIsOverflowing();
|
|
326
|
+
if (this.autoFocus) {
|
|
327
|
+
requestAnimationFrame(() => {
|
|
328
|
+
this.setFocus({ selectText: true });
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
(_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.addEventListener('focus', () => {
|
|
332
|
+
var _a;
|
|
333
|
+
this._inputElem.setSelectionRange(0, (_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.value.length);
|
|
334
|
+
});
|
|
335
|
+
this.onClickOutside = (event) => {
|
|
336
|
+
if (!this._inputElem.contains(event.target)) {
|
|
337
|
+
this._inputElem.classList.remove("focused");
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
document.addEventListener("click", this.onClickOutside);
|
|
341
|
+
}
|
|
342
|
+
disconnectedCallback() {
|
|
343
|
+
document.removeEventListener("click", this.onClickOutside);
|
|
344
|
+
}
|
|
345
|
+
componentDidRender() {
|
|
346
|
+
this.adjustFloatingLabel();
|
|
347
|
+
}
|
|
232
348
|
render() {
|
|
233
349
|
core.ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
234
350
|
return (index.h(index.Host, { style: this._hostElement.classList.contains("grid_editor") ? { "height": "100%" } : null }, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
235
|
-
index.h("label", { ref: (el) => this._labelElem = el, class: this.
|
|
236
|
-
: null, index.h("input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: this.password ? "password" : "text", class: this.mode === "slim" ? "input--slim" : ""
|
|
237
|
-
index.h("
|
|
351
|
+
index.h("label", { ref: (el) => this._labelElem = el, class: this.buildLabelClass(), onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
352
|
+
: null, index.h("input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: this.password ? "password" : "text", class: `${this.mode === "slim" ? "input--slim" : ""}`, placeholder: this.buildPlaceholder(), value: this.getValue(), disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), index.h("ez-tooltip", { anchoringElement: this._hostElement, message: this.getValue(), active: this._isOverflowing, useAnchorSize: true }), this.canShowError && this.mode != "slim" && this.errorMessage &&
|
|
353
|
+
index.h("ez-tooltip", { type: "error", message: this.errorMessage }, index.h("ez-icon", { class: `tooltip-icon ${this.errorMessage ? "hasError" : ""} ${this.hasRightSlotContent ? "rightIconSlot" : ""}`, "data-element-id": core.ElementIDUtils.getInternalIDInfo("tooltip-icon"), ref: (el) => this._tooltipIconElem = el, iconName: "alert-circle" })), index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }, " ")));
|
|
238
354
|
}
|
|
239
355
|
get _hostElement() { return index.getElement(this); }
|
|
240
356
|
static get watchers() { return {
|
|
241
|
-
"
|
|
357
|
+
"hasInvalid": ["observeHasInvalid"],
|
|
358
|
+
"errorMessage": ["observeHasInvalid"],
|
|
359
|
+
"canShowError": ["observeHasInvalid"],
|
|
242
360
|
"mask": ["observeMask"],
|
|
243
|
-
"value": ["observeValue"]
|
|
361
|
+
"value": ["observeValue"],
|
|
362
|
+
"alternativePlaceholder": ["observeAlternativePlaceholder"]
|
|
244
363
|
}; }
|
|
245
364
|
};
|
|
246
365
|
EzTextInput.style = ezTextInputCss;
|
|
@@ -4,7 +4,7 @@ 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 CSSVarsUtils = require('./CSSVarsUtils-
|
|
7
|
+
const CSSVarsUtils = require('./CSSVarsUtils-f20973d1.js');
|
|
8
8
|
|
|
9
9
|
const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;width:100%}.time__input{height:100%}";
|
|
10
10
|
|
|
@@ -21,6 +21,8 @@ const EzTimeInput = class {
|
|
|
21
21
|
this.showSeconds = false;
|
|
22
22
|
this.mode = "regular";
|
|
23
23
|
this.canShowError = true;
|
|
24
|
+
this.autoFocus = false;
|
|
25
|
+
this.alternativePlaceholder = undefined;
|
|
24
26
|
}
|
|
25
27
|
observeErrorMessage() {
|
|
26
28
|
var _a;
|
|
@@ -141,6 +143,11 @@ const EzTimeInput = class {
|
|
|
141
143
|
//---------------------------------------------
|
|
142
144
|
componentDidLoad() {
|
|
143
145
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
146
|
+
if (this.autoFocus) {
|
|
147
|
+
requestAnimationFrame(() => {
|
|
148
|
+
this.setFocus({ selectText: true });
|
|
149
|
+
});
|
|
150
|
+
}
|
|
144
151
|
}
|
|
145
152
|
componentWillLoad() {
|
|
146
153
|
this.observeShowSeconds();
|
|
@@ -153,7 +160,7 @@ const EzTimeInput = class {
|
|
|
153
160
|
}
|
|
154
161
|
render() {
|
|
155
162
|
core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
156
|
-
return (index.h(index.Host, null, index.h("ez-text-input", { class: "time__input", "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: (el) => this._textInput = el, "data-slave-mode": "true", value: this._viewValue, enabled: this.enabled, label: this.label, restrict: "0123456789:", onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }, index.h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
163
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { class: "time__input", "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: (el) => this._textInput = el, "data-slave-mode": "true", value: this._viewValue, enabled: this.enabled, label: this.label, restrict: "0123456789:", onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError, alternativePlaceholder: this.alternativePlaceholder }, index.h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
157
164
|
}
|
|
158
165
|
static get assetsDirs() { return ["../assets"]; }
|
|
159
166
|
get _elem() { return index.getElement(this); }
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a7b0c73d.js');
|
|
6
|
+
const floatingUi_dom_esm = require('./floating-ui.dom.esm-017acce4.js');
|
|
7
|
+
const core = require('@sankhyalabs/core');
|
|
8
|
+
|
|
9
|
+
const ezTooltipCss = ":host{--triangle-size:8px;width:100%}.tooltip{position:absolute;z-index:var(--elevation--24);padding:var(--space--extra-small, 3px) var(--space--small, 6px);border-radius:var(--border--radius-small);box-sizing:border-box;font-family:var(--font-pattern\t, 'Roboto', sans-serif);font-size:var(--text--small, 12px);font-weight:var(--text-weight--medium, 400);text-align:center;width:max-content;display:none}.arrow{position:absolute;width:var(--triangle-size);height:var(--triangle-size);transform:rotate(45deg)}.default-tooltip{background:var(--title--primary, #2b3a54);color:var(--color--inverted)}.default-tooltip .arrow{background:var(--title--primary, #2b3a54)}.error-tooltip{background:var(--color-alert--error-800, #BD0025);color:var(--color--error-200, #F7E0E5)}.error-tooltip .arrow{background:var(--color-alert--error-800, #BD0025)}.success-tooltip{background:var(--color--success, #00cb94);color:var(--color--success-200, #EBFFFA)}.success-tooltip .arrow{background:var(--color--success, #00cb94)}.warning-tooltip{background:var(--color--warning, #f2d410);color:var(--color--warning-200, #FDF8D8)}.warning-tooltip .arrow{background:var(--color--warning, #f2d410)}";
|
|
10
|
+
|
|
11
|
+
const EzTooltip = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this._opened = false;
|
|
15
|
+
this.message = undefined;
|
|
16
|
+
this.anchoringElement = undefined;
|
|
17
|
+
this.placement = 'bottom';
|
|
18
|
+
this.gapOptions = { horizontalGap: 0, verticalGap: 0 };
|
|
19
|
+
this.type = 'default';
|
|
20
|
+
this.debouncingTime = 500;
|
|
21
|
+
this.active = true;
|
|
22
|
+
this.maxWidth = 200;
|
|
23
|
+
this.useAnchorSize = false;
|
|
24
|
+
}
|
|
25
|
+
watchAnchoringElement(newValue, oldValue) {
|
|
26
|
+
if (newValue) {
|
|
27
|
+
this.setEvents(newValue);
|
|
28
|
+
this.removeEvents(oldValue);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
watchMessage(newValue) {
|
|
32
|
+
if (!newValue) {
|
|
33
|
+
this.closeTooltip();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
this.updatePosition();
|
|
37
|
+
}
|
|
38
|
+
openTooltip() {
|
|
39
|
+
if (this.message && this.active) {
|
|
40
|
+
if (this._debouncingTimeout) {
|
|
41
|
+
clearTimeout(this._debouncingTimeout);
|
|
42
|
+
}
|
|
43
|
+
this._debouncingTimeout = setTimeout(() => {
|
|
44
|
+
this._opened = true;
|
|
45
|
+
this._tooltipElement.style.display = 'block';
|
|
46
|
+
this.updatePosition();
|
|
47
|
+
}, this.debouncingTime);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
closeTooltip() {
|
|
51
|
+
clearTimeout(this._debouncingTimeout);
|
|
52
|
+
this._tooltipElement.style.display = 'none';
|
|
53
|
+
this._opened = false;
|
|
54
|
+
}
|
|
55
|
+
async updatePosition(element = this.anchoringElement) {
|
|
56
|
+
if (!element || !this._opened) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (this.useAnchorSize) {
|
|
60
|
+
const anchorSize = element.getBoundingClientRect().width;
|
|
61
|
+
this._tooltipElement.style.width = `${anchorSize}px`;
|
|
62
|
+
}
|
|
63
|
+
await floatingUi_dom_esm.computePosition(element, this._tooltipElement, {
|
|
64
|
+
placement: this.placement,
|
|
65
|
+
middleware: [
|
|
66
|
+
floatingUi_dom_esm.offset(5),
|
|
67
|
+
floatingUi_dom_esm.flip(),
|
|
68
|
+
floatingUi_dom_esm.shift(),
|
|
69
|
+
floatingUi_dom_esm.arrow({ element: this._arrowElement })
|
|
70
|
+
],
|
|
71
|
+
}).then(({ x, y, placement, middlewareData }) => {
|
|
72
|
+
const newTop = placement.includes("bottom") ? y + this.gapOptions.verticalGap : y - this.gapOptions.verticalGap;
|
|
73
|
+
const newLeft = placement.includes("start") ? x + this.gapOptions.horizontalGap : x - this.gapOptions.horizontalGap;
|
|
74
|
+
Object.assign(this._tooltipElement.style, {
|
|
75
|
+
top: `${newTop}px`,
|
|
76
|
+
left: `${newLeft}px`,
|
|
77
|
+
});
|
|
78
|
+
if (middlewareData.arrow) {
|
|
79
|
+
const { x } = middlewareData.arrow;
|
|
80
|
+
const onBottom = placement.includes("bottom");
|
|
81
|
+
Object.assign(this._arrowElement.style, {
|
|
82
|
+
left: `${x}px`,
|
|
83
|
+
top: onBottom ? `${-this._arrowElement.offsetHeight / 2}px` : '',
|
|
84
|
+
bottom: !onBottom ? `${-this._arrowElement.offsetHeight / 2}px` : '',
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
handleSlotChange(ev) {
|
|
90
|
+
const slot = ev.target;
|
|
91
|
+
const content = slot.assignedElements()[0];
|
|
92
|
+
this.anchoringElement = content;
|
|
93
|
+
}
|
|
94
|
+
setEvents(element = this.anchoringElement) {
|
|
95
|
+
if (!element) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
element.addEventListener('mouseenter', () => {
|
|
99
|
+
this.openTooltip();
|
|
100
|
+
});
|
|
101
|
+
element.addEventListener('mouseleave', () => {
|
|
102
|
+
this.closeTooltip();
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
removeEvents(element = this.anchoringElement) {
|
|
106
|
+
if (!element) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
element.removeEventListener('mouseenter', () => {
|
|
110
|
+
this.openTooltip();
|
|
111
|
+
});
|
|
112
|
+
element.removeEventListener('mouseleave', () => {
|
|
113
|
+
this.closeTooltip();
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
componentDidLoad() {
|
|
117
|
+
this.setEvents();
|
|
118
|
+
}
|
|
119
|
+
render() {
|
|
120
|
+
return (index.h(index.Host, null, index.h("div", Object.assign({ ref: ref => this._tooltipElement = ref }, { inert: true }, { class: {
|
|
121
|
+
"tooltip": true,
|
|
122
|
+
[`${this.type}-tooltip`]: true,
|
|
123
|
+
}, style: {
|
|
124
|
+
maxWidth: (this.maxWidth && !this.useAnchorSize) ? `${this.maxWidth}px` : undefined,
|
|
125
|
+
}, role: "tooltip", "data-element-id": core.ElementIDUtils.getInternalIDInfo("tooltip") }), this.message, index.h("div", { ref: ref => this._arrowElement = ref, class: "arrow" })), index.h("slot", { onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
|
|
126
|
+
}
|
|
127
|
+
get _element() { return index.getElement(this); }
|
|
128
|
+
static get watchers() { return {
|
|
129
|
+
"anchoringElement": ["watchAnchoringElement"],
|
|
130
|
+
"message": ["watchMessage"]
|
|
131
|
+
}; }
|
|
132
|
+
};
|
|
133
|
+
EzTooltip.style = ezTooltipCss;
|
|
134
|
+
|
|
135
|
+
exports.ez_tooltip = EzTooltip;
|
|
@@ -19,7 +19,7 @@ const defaultTooltipResolver = (item, _enabled, _level) => {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
const TreeItem = (props) => {
|
|
22
|
-
const { node, selectedId, itemClick, iconClick, iconResolver, tooltipResolver, itemsList } = props;
|
|
22
|
+
const { node, selectedId, itemClick, iconClick, iconResolver, tooltipResolver, itemsList, itemDoubleClick } = props;
|
|
23
23
|
if (!node.visible) {
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
@@ -33,7 +33,7 @@ const TreeItem = (props) => {
|
|
|
33
33
|
itemsList.push(treeItem);
|
|
34
34
|
}
|
|
35
35
|
return (index.h("ul", { class: level === 1 ? "first-level" : undefined },
|
|
36
|
-
index.h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? "tree-item-error" : ""}`, onClick: () => available && itemClick(treeItem) }, {
|
|
36
|
+
index.h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? "tree-item-error" : ""}`, onClick: () => available && itemClick(treeItem), onDblClick: () => available && itemDoubleClick(treeItem) }, {
|
|
37
37
|
disabled,
|
|
38
38
|
selected: treeItem.id === selectedId,
|
|
39
39
|
[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezTreeItem_${treeItem.id}`)
|
|
@@ -44,7 +44,7 @@ const TreeItem = (props) => {
|
|
|
44
44
|
index.h("label", { class: `item-label ${treeItem.bold ? "item-label--bold" : ""}` }, treeItem.label)),
|
|
45
45
|
getBadgeElement(treeItem.id, treeItem.badge, treeItem.id === selectedId)),
|
|
46
46
|
expanded
|
|
47
|
-
&& node.getChildren().map(child => index.h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList }))));
|
|
47
|
+
&& node.getChildren().map(child => index.h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList, itemDoubleClick: itemDoubleClick }))));
|
|
48
48
|
};
|
|
49
49
|
function getBadgeElement(itemId, badge, isSelectedItem) {
|
|
50
50
|
if (badge == undefined) {
|
|
@@ -310,6 +310,7 @@ const EzTree = class {
|
|
|
310
310
|
index.registerInstance(this, hostRef);
|
|
311
311
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
312
312
|
this.ezOpenItem = index.createEvent(this, "ezOpenItem", 7);
|
|
313
|
+
this.ezDbClickItem = index.createEvent(this, "ezDbClickItem", 7);
|
|
313
314
|
this._onItemClick = (item) => {
|
|
314
315
|
this.value = item;
|
|
315
316
|
};
|
|
@@ -579,7 +580,7 @@ const EzTree = class {
|
|
|
579
580
|
:
|
|
580
581
|
this._tree.getChildren().map(node => {
|
|
581
582
|
var _a;
|
|
582
|
-
return index.h(TreeItem, { selectedId: (_a = this.value) === null || _a === void 0 ? void 0 : _a.id, node: node, itemClick: this._onItemClick, iconClick: this._onIconClick, iconResolver: this.iconResolver, tooltipResolver: this.tooltipResolver || defaultTooltipResolver, itemsList: this._visibleItems });
|
|
583
|
+
return index.h(TreeItem, { selectedId: (_a = this.value) === null || _a === void 0 ? void 0 : _a.id, node: node, itemClick: this._onItemClick, iconClick: this._onIconClick, iconResolver: this.iconResolver, tooltipResolver: this.tooltipResolver || defaultTooltipResolver, itemsList: this._visibleItems, itemDoubleClick: (item) => this.ezDbClickItem.emit(item) });
|
|
583
584
|
})));
|
|
584
585
|
}
|
|
585
586
|
get _element() { return index.getElement(this); }
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* O dragElement é posicionado ANTERIORMENTE ao targetIndex.
|
|
5
|
+
* Ex: no array: ["A", "B", "C", "D", "E"]
|
|
6
|
+
* se o dragItem for "B" e o targetIndex 3 (referente à "D"),
|
|
7
|
+
* "B" será posicionado logo antes de "D".
|
|
8
|
+
* O resultado será: ["A", "C", "B", "D", "E"]
|
|
9
|
+
*
|
|
10
|
+
* @param configs
|
|
11
|
+
*/
|
|
12
|
+
function processListOnDrop(configs) {
|
|
13
|
+
let newList;
|
|
14
|
+
if (hasToMoveMultipleItems(configs)) {
|
|
15
|
+
newList = processMoveMultipleItems(configs);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
newList = processMoveSingleItem(configs);
|
|
19
|
+
configs.clearSelection();
|
|
20
|
+
}
|
|
21
|
+
return newList;
|
|
22
|
+
}
|
|
23
|
+
function hasToMoveMultipleItems(configs) {
|
|
24
|
+
const { enableMultipleSelection, listItems, dragItem, moveToFinal, targetIndex } = configs;
|
|
25
|
+
if (!enableMultipleSelection)
|
|
26
|
+
return false;
|
|
27
|
+
const selectedItemsIndexes = getSelectedIndices(listItems);
|
|
28
|
+
if (selectedItemsIndexes.length <= 1)
|
|
29
|
+
return false;
|
|
30
|
+
if (!selectedItemsIndexes.includes(dragItem.index))
|
|
31
|
+
return false;
|
|
32
|
+
if (!isContinuousSequence(selectedItemsIndexes))
|
|
33
|
+
return false;
|
|
34
|
+
if (moveToFinal)
|
|
35
|
+
return true;
|
|
36
|
+
return !selectedItemsIndexes.includes(targetIndex);
|
|
37
|
+
}
|
|
38
|
+
function processMoveSingleItem(configs) {
|
|
39
|
+
const { listItems, dragItem, targetIndex, moveToFinal } = configs;
|
|
40
|
+
const newList = [...listItems];
|
|
41
|
+
newList.splice(dragItem.index, 1);
|
|
42
|
+
if (moveToFinal) {
|
|
43
|
+
newList.push(dragItem.item);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const adjustedIndex = (targetIndex > dragItem.index) ? Math.max(0, targetIndex - 1) : targetIndex;
|
|
47
|
+
newList.splice(adjustedIndex, 0, dragItem.item);
|
|
48
|
+
}
|
|
49
|
+
return newList;
|
|
50
|
+
}
|
|
51
|
+
function processMoveMultipleItems(configs) {
|
|
52
|
+
const { listItems, moveToFinal, targetIndex } = configs;
|
|
53
|
+
const selectedItems = listItems.filter(item => item.selected);
|
|
54
|
+
const selectedItemsIndexes = getSelectedIndices(listItems);
|
|
55
|
+
const minorIndex = Math.min(...selectedItemsIndexes);
|
|
56
|
+
const majorIndex = Math.max(...selectedItemsIndexes);
|
|
57
|
+
const qtdToMove = selectedItems.length;
|
|
58
|
+
const newList = [...listItems];
|
|
59
|
+
newList.splice(minorIndex, qtdToMove);
|
|
60
|
+
if (moveToFinal) {
|
|
61
|
+
newList.push(...selectedItems);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
let adjustedIndex = (targetIndex > majorIndex) ? Math.max(0, targetIndex - qtdToMove) : targetIndex;
|
|
65
|
+
newList.splice(adjustedIndex, 0, ...selectedItems);
|
|
66
|
+
}
|
|
67
|
+
return newList;
|
|
68
|
+
}
|
|
69
|
+
function isContinuousSequence(numbers) {
|
|
70
|
+
if (numbers.length === 0)
|
|
71
|
+
return false;
|
|
72
|
+
const sortedNumbers = [...numbers].sort((a, b) => a - b);
|
|
73
|
+
for (let i = 1; i < sortedNumbers.length; i++) {
|
|
74
|
+
if (sortedNumbers[i] !== sortedNumbers[i - 1] + 1) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
function getSelectedIndices(listItems) {
|
|
81
|
+
return listItems.reduce((indices, item, index) => {
|
|
82
|
+
if (item.selected) {
|
|
83
|
+
indices.push(index);
|
|
84
|
+
}
|
|
85
|
+
return indices;
|
|
86
|
+
}, []);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
exports.isContinuousSequence = isContinuousSequence;
|
|
90
|
+
exports.processListOnDrop = processListOnDrop;
|