@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
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
|
-
const ezTextAreaCss = ":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--medium, 400);--text-area--color:var(--title--primary, #
|
|
4
|
+
const ezTextAreaCss = ":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--medium, 400);--text-area--color:var(--title--primary, #2B3A54);--text-area__input--background-color:var(--background--light, #FFFFFF);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--color--strokes,#DCE0E8);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--background--medium, #F0F3F7);--text-area__input--disabled--color:var(--text--primary, #626E82);--text-area__input--disabled--border--color:var(--color--strokes,#DCE0E8);--text-area__input--error--border-color:var(--color-alert--error-800,#BD0025);--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color-alert--error-800,#BD0025);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;--text-area__scrollbar--color-default:var(--scrollbar--default, #626e82);--text-area__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--text-area__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--text-area__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--text-area__scrollbar--border-radius:var(--border--radius-small, 6px);--text-area__scrollbar--width:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;width:100%;padding:0;background:none;min-height:42px;font-weight:var(--text-area--font-weight);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);margin-top:calc(var(--space--medium, 12px) + 4px);scrollbar-width:thin;scrollbar-color:var(--text-area__scrollbar--color-clicked) var(--text-area__scrollbar--color-background)}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color);border:var(--text-area__input--disabled--border);cursor:not-allowed}textarea::-webkit-scrollbar{background-color:var(--text-area__scrollbar--color-background);width:var(--text-area__scrollbar--width);max-width:var(--text-area__scrollbar--width);min-width:var(--text-area__scrollbar--width)}textarea::-webkit-scrollbar-thumb{background-color:var(--text-area__scrollbar--color-default);border-radius:var(--text-area__scrollbar--border-radius)}textarea::-webkit-scrollbar-track{background-color:var(--text-area__scrollbar--color-background);border-radius:var(--text-area__scrollbar--border-radius)}textarea::-webkit-scrollbar-thumb:vertical:hover,textarea::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--text-area__scrollbar--color-hover)}textarea::-webkit-scrollbar-thumb:vertical:active,textarea::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--text-area__scrollbar--color-clicked)}.textarea{width:100%;min-height:42px;max-width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--disabled{border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--disabled--border--color);background-color:var(--text-area__input--disabled--background-color);cursor:not-allowed}.textarea--resizable{resize:vertical}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__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(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color);cursor:not-allowed}.textarea--slim{margin-top:var(--space--small, 6px)}.textarea--slim::-webkit-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-ms-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:disabled::-webkit-input-placeholder,.textarea--slim:disabled:-moz-placeholder,.textarea--slim:disabled::-moz-placeholder,.textarea--slim:disabled:-ms-input-placeholder,.textarea--slim:disabled::placeholder{color:var(--text-area__input--disabled--color);cursor:not-allowed}";
|
|
5
5
|
|
|
6
6
|
const EzTextArea = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
10
|
+
this.LINE_HEIGHT = 24;
|
|
11
|
+
this.HEIGHT_RATIO = 1.4;
|
|
10
12
|
this.label = undefined;
|
|
11
13
|
this.value = undefined;
|
|
12
14
|
this.enabled = true;
|
|
@@ -14,7 +16,11 @@ const EzTextArea = class {
|
|
|
14
16
|
this.rows = 4;
|
|
15
17
|
this.canShowError = true;
|
|
16
18
|
this.mode = "regular";
|
|
17
|
-
this.enableResize =
|
|
19
|
+
this.enableResize = true;
|
|
20
|
+
this.autoRows = false;
|
|
21
|
+
this.autoFocus = false;
|
|
22
|
+
this.alternativePlaceholder = undefined;
|
|
23
|
+
this.forceLabelFloat = false;
|
|
18
24
|
}
|
|
19
25
|
observeErrorMessage() {
|
|
20
26
|
var _a, _b, _c, _d;
|
|
@@ -52,9 +58,21 @@ const EzTextArea = class {
|
|
|
52
58
|
observeRows() {
|
|
53
59
|
const rows = this.rows > 0 ? this.rows : this.mode != "slim" ? 4 : 2;
|
|
54
60
|
if (rows !== this.rows) {
|
|
55
|
-
this.rows
|
|
56
|
-
|
|
61
|
+
this.updateRows(rows);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
observeAutoRows() {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
if (this.autoRows) {
|
|
67
|
+
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
68
|
+
this.initializeResizeObserver();
|
|
57
69
|
}
|
|
70
|
+
else {
|
|
71
|
+
(_b = this._resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
observeAlternativePlaceholder(newValue) {
|
|
75
|
+
this.forceLabelFloat = !!newValue;
|
|
58
76
|
}
|
|
59
77
|
//---------------------------------------------
|
|
60
78
|
// Public methods
|
|
@@ -104,6 +122,8 @@ const EzTextArea = class {
|
|
|
104
122
|
return this._inputElem && (this.value || "") !== this._inputElem.value;
|
|
105
123
|
}
|
|
106
124
|
adjustFloatingLabel() {
|
|
125
|
+
if (this.forceLabelFloat)
|
|
126
|
+
return;
|
|
107
127
|
if (this.label && this._labelElem) {
|
|
108
128
|
const hasValue = this.value && this.value.toString().length > 0;
|
|
109
129
|
const containsFloatedClass = this._labelElem.classList.contains("textarea__label--floated");
|
|
@@ -122,6 +142,42 @@ const EzTextArea = class {
|
|
|
122
142
|
isFocused() {
|
|
123
143
|
return this._hostElement.shadowRoot.activeElement !== null;
|
|
124
144
|
}
|
|
145
|
+
updateRows(newRows) {
|
|
146
|
+
this.rows = newRows;
|
|
147
|
+
this._initialRows = newRows;
|
|
148
|
+
}
|
|
149
|
+
calculateMaxRows() {
|
|
150
|
+
const parentElement = this._hostElement.parentElement;
|
|
151
|
+
if (!parentElement) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const height = Math.max((parentElement === null || parentElement === void 0 ? void 0 : parentElement.clientHeight) || 0, this.LINE_HEIGHT);
|
|
155
|
+
if (height > 0) {
|
|
156
|
+
const maxRows = Math.floor(height / this.LINE_HEIGHT * this.HEIGHT_RATIO);
|
|
157
|
+
if (maxRows !== this.rows) {
|
|
158
|
+
this.updateRows(maxRows);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
initializeResizeObserver() {
|
|
163
|
+
if (!this.autoRows) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const parentElement = this._hostElement.parentElement;
|
|
167
|
+
if (parentElement) {
|
|
168
|
+
try {
|
|
169
|
+
if (this._resizeObserver != undefined) {
|
|
170
|
+
this._resizeObserver.unobserve(parentElement);
|
|
171
|
+
}
|
|
172
|
+
this._resizeObserver = new ResizeObserver(this.calculateMaxRows.bind(this));
|
|
173
|
+
this._resizeObserver.observe(parentElement);
|
|
174
|
+
}
|
|
175
|
+
catch (e) {
|
|
176
|
+
console.warn(e);
|
|
177
|
+
}
|
|
178
|
+
this.calculateMaxRows();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
125
181
|
//---------------------------------------------
|
|
126
182
|
// Event handlers
|
|
127
183
|
//---------------------------------------------
|
|
@@ -144,6 +200,26 @@ const EzTextArea = class {
|
|
|
144
200
|
this._container.classList.add("textarea--focus");
|
|
145
201
|
}
|
|
146
202
|
}
|
|
203
|
+
connectedCallback() {
|
|
204
|
+
this.initializeResizeObserver();
|
|
205
|
+
}
|
|
206
|
+
disconnectedCallback() {
|
|
207
|
+
var _a;
|
|
208
|
+
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
209
|
+
}
|
|
210
|
+
buildPlaceholder() {
|
|
211
|
+
if (this.alternativePlaceholder)
|
|
212
|
+
return this.alternativePlaceholder;
|
|
213
|
+
return (this.mode === "slim" && this.label) ? this.label : '';
|
|
214
|
+
}
|
|
215
|
+
buildLabelClass() {
|
|
216
|
+
let classList = this.enabled ? 'textarea__label' : 'textarea__label textarea__label--disabled';
|
|
217
|
+
if (this.errorMessage)
|
|
218
|
+
classList = classList + ' hasError';
|
|
219
|
+
if (this.forceLabelFloat)
|
|
220
|
+
classList = classList + ' textarea__label--floated';
|
|
221
|
+
return classList;
|
|
222
|
+
}
|
|
147
223
|
//---------------------------------------------
|
|
148
224
|
// Lifecycle web component
|
|
149
225
|
//---------------------------------------------
|
|
@@ -151,15 +227,20 @@ const EzTextArea = class {
|
|
|
151
227
|
this.observeErrorMessage();
|
|
152
228
|
this.adjustFloatingLabel();
|
|
153
229
|
this.observeMode();
|
|
230
|
+
if (this.autoFocus) {
|
|
231
|
+
requestAnimationFrame(() => {
|
|
232
|
+
this.setFocus();
|
|
233
|
+
});
|
|
234
|
+
}
|
|
154
235
|
}
|
|
155
236
|
render() {
|
|
156
237
|
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
157
|
-
return (h(Host, null, h("div", { class: "textarea"
|
|
158
|
-
h("label", { ref: (el) => this._labelElem = el, class: this.
|
|
238
|
+
return (h(Host, null, h("div", { class: `textarea ${this.enabled ? "" : "textarea--disabled"}`, ref: (el) => this._container = el }, this.label && this.mode != "slim" ?
|
|
239
|
+
h("label", { ref: (el) => this._labelElem = el, class: this.buildLabelClass(), onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
159
240
|
: null, h("textarea", { onFocus: () => this.handleFocus(), "data-element-id": ElementIDUtils.getInternalIDInfo("input"), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, class: {
|
|
160
241
|
"textarea--slim": this.mode === "slim",
|
|
161
242
|
"textarea--resizable": this.enableResize
|
|
162
|
-
}, placeholder: this.
|
|
243
|
+
}, placeholder: this.buildPlaceholder(), onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, rows: this.rows })), this.canShowError && this.mode != "slim" &&
|
|
163
244
|
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
164
245
|
}
|
|
165
246
|
get _hostElement() { return getElement(this); }
|
|
@@ -167,7 +248,9 @@ const EzTextArea = class {
|
|
|
167
248
|
"errorMessage": ["observeErrorMessage"],
|
|
168
249
|
"value": ["observeValue"],
|
|
169
250
|
"mode": ["observeMode"],
|
|
170
|
-
"rows": ["observeRows"]
|
|
251
|
+
"rows": ["observeRows"],
|
|
252
|
+
"autoRows": ["observeAutoRows"],
|
|
253
|
+
"alternativePlaceholder": ["observeAlternativePlaceholder"]
|
|
171
254
|
}; }
|
|
172
255
|
};
|
|
173
256
|
EzTextArea.style = ezTextAreaCss;
|
|
@@ -1,37 +1,35 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
|
|
2
2
|
import { MaskFormatter, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
|
-
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:
|
|
4
|
+
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)}";
|
|
5
5
|
|
|
6
6
|
const EzTextInput = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
10
|
+
this._isOverflowing = false;
|
|
10
11
|
this.label = undefined;
|
|
12
|
+
this.alternativePlaceholder = undefined;
|
|
11
13
|
this.value = undefined;
|
|
12
14
|
this.enabled = true;
|
|
13
15
|
this.errorMessage = undefined;
|
|
16
|
+
this.hasInvalid = false;
|
|
14
17
|
this.mask = undefined;
|
|
18
|
+
this.cleanValueMask = false;
|
|
15
19
|
this.canShowError = true;
|
|
16
20
|
this.restrict = undefined;
|
|
17
21
|
this.mode = "regular";
|
|
18
22
|
this.noBorder = false;
|
|
19
23
|
this.password = false;
|
|
24
|
+
this.autoFocus = false;
|
|
25
|
+
this.hasRightSlotContent = false;
|
|
26
|
+
this.forceLabelFloat = false;
|
|
20
27
|
}
|
|
21
|
-
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
var _a, _b;
|
|
25
|
-
if (hasError) {
|
|
26
|
-
this._inputElem.classList.add("hasError");
|
|
27
|
-
(_a = this._messageBoxElem) === null || _a === void 0 ? void 0 : _a.classList.add("hasError");
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
this._inputElem.classList.remove("hasError");
|
|
31
|
-
(_b = this._messageBoxElem) === null || _b === void 0 ? void 0 : _b.classList.remove("hasError");
|
|
32
|
-
}
|
|
33
|
-
});
|
|
28
|
+
observeHasInvalid(newValue, oldValue) {
|
|
29
|
+
if (newValue === oldValue) {
|
|
30
|
+
return;
|
|
34
31
|
}
|
|
32
|
+
this.validateErrors();
|
|
35
33
|
}
|
|
36
34
|
observeMask() {
|
|
37
35
|
if (this.mask) {
|
|
@@ -49,6 +47,7 @@ const EzTextInput = class {
|
|
|
49
47
|
this._inputElem.value = this.value || "";
|
|
50
48
|
this.handleChange();
|
|
51
49
|
this.adjustFloatingLabel();
|
|
50
|
+
this.checkIsOverflowing();
|
|
52
51
|
if (!this.isSlaveMode()) {
|
|
53
52
|
this.errorMessage = "";
|
|
54
53
|
this.ezChange.emit(this.value);
|
|
@@ -56,14 +55,38 @@ const EzTextInput = class {
|
|
|
56
55
|
}
|
|
57
56
|
}
|
|
58
57
|
}
|
|
58
|
+
observeAlternativePlaceholder(newValue) {
|
|
59
|
+
this.forceLabelFloat = !!newValue;
|
|
60
|
+
}
|
|
59
61
|
//---------------------------------------------
|
|
60
62
|
// Private methods
|
|
61
63
|
//---------------------------------------------
|
|
64
|
+
validateErrors() {
|
|
65
|
+
const hasErrorMessage = this.handleValidateErrorMessage(this.errorMessage);
|
|
66
|
+
const hasError = this.canShowError && (hasErrorMessage || this.hasInvalid);
|
|
67
|
+
this.updateClassError(hasError);
|
|
68
|
+
}
|
|
69
|
+
handleValidateErrorMessage(message = this.errorMessage) {
|
|
70
|
+
return typeof message === "string" && message.trim() !== "";
|
|
71
|
+
}
|
|
72
|
+
updateClassError(status) {
|
|
73
|
+
if (!this._inputElem) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (status) {
|
|
77
|
+
this._inputElem.classList.add("hasError");
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
this._inputElem.classList.remove("hasError");
|
|
81
|
+
}
|
|
82
|
+
}
|
|
62
83
|
adjustFloatingLabel() {
|
|
63
84
|
if (this.label && this._labelElem) {
|
|
64
85
|
if (this._inputElem && !this._inputElem.classList.contains("input--with--label")) {
|
|
65
86
|
this._inputElem.classList.add("input--with--label");
|
|
66
87
|
}
|
|
88
|
+
if (this.forceLabelFloat)
|
|
89
|
+
return;
|
|
67
90
|
const hasValue = this.value && this.value.toString().length > 0;
|
|
68
91
|
const containsFloatedClass = this._labelElem.classList.contains("input__label--floated");
|
|
69
92
|
if (hasValue || this.isFocused()) {
|
|
@@ -105,7 +128,12 @@ const EzTextInput = class {
|
|
|
105
128
|
const { selectText } = options || {};
|
|
106
129
|
if (selectText)
|
|
107
130
|
this._inputElem.select();
|
|
108
|
-
this._inputElem.
|
|
131
|
+
if (this._inputElem.disabled) {
|
|
132
|
+
this._inputElem.classList.add("focused");
|
|
133
|
+
this._inputElem.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
requestAnimationFrame(() => this._inputElem.focus());
|
|
109
137
|
}
|
|
110
138
|
/**
|
|
111
139
|
* Remove o foco do campo.
|
|
@@ -117,7 +145,7 @@ const EzTextInput = class {
|
|
|
117
145
|
* Retorna se o conteúdo é inválido.
|
|
118
146
|
*/
|
|
119
147
|
async isInvalid() {
|
|
120
|
-
return
|
|
148
|
+
return this.handleValidateErrorMessage();
|
|
121
149
|
}
|
|
122
150
|
//---------------------------------------------
|
|
123
151
|
// Event handlers
|
|
@@ -126,7 +154,12 @@ const EzTextInput = class {
|
|
|
126
154
|
const value = this._inputElem.value;
|
|
127
155
|
if (value && this._maskFormatter) {
|
|
128
156
|
try {
|
|
129
|
-
|
|
157
|
+
if (this.cleanValueMask) {
|
|
158
|
+
this.applyMask(value);
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
this._inputElem.value = this._maskFormatter.format(value);
|
|
162
|
+
}
|
|
130
163
|
}
|
|
131
164
|
catch (e) {
|
|
132
165
|
this.errorMessage = e.message;
|
|
@@ -144,8 +177,34 @@ const EzTextInput = class {
|
|
|
144
177
|
}
|
|
145
178
|
controlChangeValue() {
|
|
146
179
|
if (this._inputElem && (this.value || '') !== this._inputElem.value) {
|
|
147
|
-
this.
|
|
180
|
+
if (this.cleanValueMask) {
|
|
181
|
+
this.value = this._maskFormatter.removeMask(this._inputElem.value);
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
this.value = this._inputElem.value;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
applyMask(value) {
|
|
189
|
+
if (!value || value === "")
|
|
190
|
+
return value;
|
|
191
|
+
if (this._maskFormatter) {
|
|
192
|
+
try {
|
|
193
|
+
const formattedValue = this._maskFormatter.applyMask(this._maskFormatter.removeMask(value));
|
|
194
|
+
if (this._inputElem) {
|
|
195
|
+
this._inputElem.value = formattedValue;
|
|
196
|
+
return this._inputElem.value;
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
this.value = formattedValue;
|
|
200
|
+
return this.value;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
catch (e) {
|
|
204
|
+
this.errorMessage = e.message;
|
|
205
|
+
}
|
|
148
206
|
}
|
|
207
|
+
return value;
|
|
149
208
|
}
|
|
150
209
|
handleChange() {
|
|
151
210
|
if (!this._inputElem) {
|
|
@@ -161,8 +220,10 @@ const EzTextInput = class {
|
|
|
161
220
|
this.controlChangeValue();
|
|
162
221
|
}
|
|
163
222
|
handleSlotChange(ev) {
|
|
223
|
+
var _a;
|
|
164
224
|
const slot = ev.target;
|
|
165
225
|
const content = slot.assignedElements()[0];
|
|
226
|
+
this.hasRightSlotContent = false;
|
|
166
227
|
if (content) {
|
|
167
228
|
content.style.position = "absolute";
|
|
168
229
|
content.style.display = "flex";
|
|
@@ -188,10 +249,14 @@ const EzTextInput = class {
|
|
|
188
249
|
if (this._labelElem) {
|
|
189
250
|
this._labelElem.classList.add("input__label--right");
|
|
190
251
|
}
|
|
252
|
+
if (this._tooltipIconElem) {
|
|
253
|
+
this._tooltipIconElem.classList.add("rightIconSlot");
|
|
254
|
+
}
|
|
255
|
+
this.hasRightSlotContent = ((_a = content.children) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
191
256
|
}
|
|
192
257
|
slot.name && ElementIDUtils.addIDInfo(content, slot.name);
|
|
193
258
|
}
|
|
194
|
-
this.
|
|
259
|
+
this.validateErrors();
|
|
195
260
|
}
|
|
196
261
|
doFocus() {
|
|
197
262
|
if (this.label && this._labelElem && !this._labelElem.classList.contains("input__label--floated")) {
|
|
@@ -199,21 +264,43 @@ const EzTextInput = class {
|
|
|
199
264
|
}
|
|
200
265
|
this.adjustColorContentSlot("var(--ez-text-input__input--focus--icon-color)");
|
|
201
266
|
}
|
|
267
|
+
getValue() {
|
|
268
|
+
return this.mask && this.cleanValueMask ? this.applyMask(this.value) : this.value;
|
|
269
|
+
}
|
|
270
|
+
buildLabelClass() {
|
|
271
|
+
let classList = this.enabled ? 'input__label' : 'input__label input__label--disabled';
|
|
272
|
+
if (this.errorMessage)
|
|
273
|
+
classList = classList + ' hasError';
|
|
274
|
+
if (this.forceLabelFloat)
|
|
275
|
+
classList = classList + ' input__label--floated';
|
|
276
|
+
return classList;
|
|
277
|
+
}
|
|
278
|
+
buildPlaceholder() {
|
|
279
|
+
if (this.alternativePlaceholder)
|
|
280
|
+
return this.alternativePlaceholder;
|
|
281
|
+
return (this.mode === "slim" && this.label) ? this.label : '';
|
|
282
|
+
}
|
|
283
|
+
checkIsOverflowing() {
|
|
284
|
+
if (this._inputElem) {
|
|
285
|
+
this._isOverflowing = this._inputElem.offsetWidth < this._inputElem.scrollWidth;
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
this._isOverflowing = false;
|
|
289
|
+
}
|
|
202
290
|
//---------------------------------------------
|
|
203
291
|
// Lifecycle web component
|
|
204
292
|
//---------------------------------------------
|
|
205
|
-
componentDidLoad() {
|
|
206
|
-
this.observeErrorMessage();
|
|
207
|
-
this.observeMask();
|
|
208
|
-
this.adjustFloatingLabel();
|
|
209
|
-
this.adjustBorderInput();
|
|
210
|
-
}
|
|
211
293
|
componentWillLoad() {
|
|
212
294
|
this.observeMask();
|
|
213
295
|
if (this.value) {
|
|
214
296
|
if (this._maskFormatter) {
|
|
215
297
|
try {
|
|
216
|
-
|
|
298
|
+
if (this.cleanValueMask) {
|
|
299
|
+
this.applyMask(this.value);
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
this.value = this._maskFormatter.format(this.value);
|
|
303
|
+
}
|
|
217
304
|
}
|
|
218
305
|
catch (e) {
|
|
219
306
|
this.errorMessage = e.message;
|
|
@@ -225,18 +312,50 @@ const EzTextInput = class {
|
|
|
225
312
|
}
|
|
226
313
|
}
|
|
227
314
|
}
|
|
315
|
+
componentDidLoad() {
|
|
316
|
+
var _a;
|
|
317
|
+
this.validateErrors();
|
|
318
|
+
this.observeMask();
|
|
319
|
+
this.adjustFloatingLabel();
|
|
320
|
+
this.adjustBorderInput();
|
|
321
|
+
this.checkIsOverflowing();
|
|
322
|
+
if (this.autoFocus) {
|
|
323
|
+
requestAnimationFrame(() => {
|
|
324
|
+
this.setFocus({ selectText: true });
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
(_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.addEventListener('focus', () => {
|
|
328
|
+
var _a;
|
|
329
|
+
this._inputElem.setSelectionRange(0, (_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.value.length);
|
|
330
|
+
});
|
|
331
|
+
this.onClickOutside = (event) => {
|
|
332
|
+
if (!this._inputElem.contains(event.target)) {
|
|
333
|
+
this._inputElem.classList.remove("focused");
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
document.addEventListener("click", this.onClickOutside);
|
|
337
|
+
}
|
|
338
|
+
disconnectedCallback() {
|
|
339
|
+
document.removeEventListener("click", this.onClickOutside);
|
|
340
|
+
}
|
|
341
|
+
componentDidRender() {
|
|
342
|
+
this.adjustFloatingLabel();
|
|
343
|
+
}
|
|
228
344
|
render() {
|
|
229
345
|
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
230
346
|
return (h(Host, { style: this._hostElement.classList.contains("grid_editor") ? { "height": "100%" } : null }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
231
|
-
h("label", { ref: (el) => this._labelElem = el, class: this.
|
|
232
|
-
: null, h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: this.password ? "password" : "text", class: this.mode === "slim" ? "input--slim" : ""
|
|
233
|
-
h("
|
|
347
|
+
h("label", { ref: (el) => this._labelElem = el, class: this.buildLabelClass(), onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
348
|
+
: null, h("input", { "data-element-id": 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(); } }), h("ez-tooltip", { anchoringElement: this._hostElement, message: this.getValue(), active: this._isOverflowing, useAnchorSize: true }), this.canShowError && this.mode != "slim" && this.errorMessage &&
|
|
349
|
+
h("ez-tooltip", { type: "error", message: this.errorMessage }, h("ez-icon", { class: `tooltip-icon ${this.errorMessage ? "hasError" : ""} ${this.hasRightSlotContent ? "rightIconSlot" : ""}`, "data-element-id": ElementIDUtils.getInternalIDInfo("tooltip-icon"), ref: (el) => this._tooltipIconElem = el, iconName: "alert-circle" })), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }, " ")));
|
|
234
350
|
}
|
|
235
351
|
get _hostElement() { return getElement(this); }
|
|
236
352
|
static get watchers() { return {
|
|
237
|
-
"
|
|
353
|
+
"hasInvalid": ["observeHasInvalid"],
|
|
354
|
+
"errorMessage": ["observeHasInvalid"],
|
|
355
|
+
"canShowError": ["observeHasInvalid"],
|
|
238
356
|
"mask": ["observeMask"],
|
|
239
|
-
"value": ["observeValue"]
|
|
357
|
+
"value": ["observeValue"],
|
|
358
|
+
"alternativePlaceholder": ["observeAlternativePlaceholder"]
|
|
240
359
|
}; }
|
|
241
360
|
};
|
|
242
361
|
EzTextInput.style = ezTextInputCss;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
|
|
2
2
|
import { TimeFormatter, MaskFormatter, NumberUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import { C as CSSVarsUtils } from './CSSVarsUtils-
|
|
3
|
+
import { C as CSSVarsUtils } from './CSSVarsUtils-acba92d7.js';
|
|
4
4
|
|
|
5
5
|
const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;width:100%}.time__input{height:100%}";
|
|
6
6
|
|
|
@@ -17,6 +17,8 @@ const EzTimeInput = class {
|
|
|
17
17
|
this.showSeconds = false;
|
|
18
18
|
this.mode = "regular";
|
|
19
19
|
this.canShowError = true;
|
|
20
|
+
this.autoFocus = false;
|
|
21
|
+
this.alternativePlaceholder = undefined;
|
|
20
22
|
}
|
|
21
23
|
observeErrorMessage() {
|
|
22
24
|
var _a;
|
|
@@ -137,6 +139,11 @@ const EzTimeInput = class {
|
|
|
137
139
|
//---------------------------------------------
|
|
138
140
|
componentDidLoad() {
|
|
139
141
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
142
|
+
if (this.autoFocus) {
|
|
143
|
+
requestAnimationFrame(() => {
|
|
144
|
+
this.setFocus({ selectText: true });
|
|
145
|
+
});
|
|
146
|
+
}
|
|
140
147
|
}
|
|
141
148
|
componentWillLoad() {
|
|
142
149
|
this.observeShowSeconds();
|
|
@@ -149,7 +156,7 @@ const EzTimeInput = class {
|
|
|
149
156
|
}
|
|
150
157
|
render() {
|
|
151
158
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
152
|
-
return (h(Host, null, h("ez-text-input", { class: "time__input", "data-element-id": 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 }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
159
|
+
return (h(Host, null, h("ez-text-input", { class: "time__input", "data-element-id": 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 }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
153
160
|
}
|
|
154
161
|
static get assetsDirs() { return ["../assets"]; }
|
|
155
162
|
get _elem() { return getElement(this); }
|