@sankhyalabs/ezui 5.22.0-dev.8 → 5.22.0-dev.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DataBinder-e92314c2.js +445 -0
- package/dist/cjs/FocusResolver-885f2173.js +35 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +3 -2
- package/dist/cjs/ez-button.cjs.entry.js +11 -5
- package/dist/cjs/ez-card-item_2.cjs.entry.js +76 -0
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +67 -13
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +35 -5
- package/dist/cjs/ez-date-input.cjs.entry.js +14 -4
- package/dist/cjs/ez-date-time-input.cjs.entry.js +11 -4
- package/dist/cjs/ez-dialog.cjs.entry.js +14 -7
- package/dist/cjs/ez-double-list.cjs.entry.js +287 -0
- package/dist/cjs/{ez-dropdown.cjs.entry.js → ez-dropdown_2.cjs.entry.js} +75 -8
- package/dist/cjs/ez-filter-input.cjs.entry.js +130 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +29 -22
- package/dist/cjs/ez-form.cjs.entry.js +6 -325
- package/dist/cjs/ez-grid.cjs.entry.js +14861 -69696
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +258 -211
- package/dist/cjs/ez-modal-container.cjs.entry.js +2 -1
- package/dist/cjs/ez-modal.cjs.entry.js +19 -4
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -2
- package/dist/cjs/ez-number-input.cjs.entry.js +15 -2
- package/dist/cjs/ez-popup.cjs.entry.js +24 -2
- package/dist/cjs/ez-scroller_2.cjs.entry.js +3 -3
- package/dist/cjs/ez-search.cjs.entry.js +108 -47
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +2 -2
- package/dist/cjs/ez-split-item.cjs.entry.js +5 -2
- package/dist/cjs/ez-split-panel.cjs.entry.js +68 -6
- package/dist/cjs/ez-text-area.cjs.entry.js +68 -6
- package/dist/cjs/ez-text-input.cjs.entry.js +153 -16
- package/dist/cjs/ez-time-input.cjs.entry.js +8 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js +55 -0
- package/dist/cjs/ez-tree.cjs.entry.js +5 -4
- package/dist/cjs/ezListHelper-0d3970b4.js +90 -0
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/filter-column.cjs.entry.js +2 -2
- package/dist/cjs/index-a7b0c73d.js +16 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +3 -2
- package/dist/collection/components/ez-button/ez-button.css +23 -13
- package/dist/collection/components/ez-button/ez-button.js +12 -6
- package/dist/collection/components/ez-card-item/ez-card-item.css +60 -10
- package/dist/collection/components/ez-card-item/ez-card-item.js +30 -3
- package/dist/collection/components/ez-check/ez-check.css +1 -6
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +2 -2
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +13 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +130 -15
- package/dist/collection/components/ez-date-input/ez-date-input.css +1 -1
- package/dist/collection/components/ez-date-input/ez-date-input.js +58 -5
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +1 -1
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +55 -5
- package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
- package/dist/collection/components/ez-dialog/ez-dialog.js +14 -16
- package/dist/collection/components/ez-double-list/doubleListHelper.js +82 -0
- package/dist/collection/components/ez-double-list/ez-double-list.css +62 -0
- package/dist/collection/components/ez-double-list/ez-double-list.js +440 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.js +33 -8
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +55 -5
- package/dist/collection/components/ez-form/ez-form.js +1 -0
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +49 -6
- package/dist/collection/components/ez-form-view/ez-form-view.css +5 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +2 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +8 -4
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +3 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +292 -63
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +151 -31
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js +2 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +219 -42
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +16 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +8 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +2 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +8 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +4 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +2 -0
- package/dist/collection/components/ez-grid/ez-grid.css +47 -8
- package/dist/collection/components/ez-grid/ez-grid.js +280 -9
- package/dist/collection/components/ez-grid/subcomponents/filter-column.css +4 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +1 -1
- package/dist/collection/components/ez-icon/ez-icon.css +155 -149
- package/dist/collection/components/ez-list/ez-list.css +2 -1
- package/dist/collection/components/ez-list/ez-list.js +301 -212
- package/dist/collection/components/ez-list/ezListHelper.js +85 -0
- package/dist/collection/components/ez-modal/ez-modal.css +5 -1
- package/dist/collection/components/ez-modal/ez-modal.js +38 -5
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +20 -1
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +2 -3
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +1 -1
- package/dist/collection/components/ez-number-input/ez-number-input.css +8 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js +68 -1
- package/dist/collection/components/ez-popup/ez-popup.css +8 -3
- package/dist/collection/components/ez-popup/ez-popup.js +43 -3
- package/dist/collection/components/ez-scroller/ez-scroller.css +1 -0
- package/dist/collection/components/ez-search/ez-search.css +21 -10
- package/dist/collection/components/ez-search/ez-search.js +211 -53
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +3 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +1 -1
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css +3 -1
- package/dist/collection/components/ez-skeleton/ez-skeleton.css +54 -34
- package/dist/collection/components/ez-split-button/ez-split-button.css +50 -14
- package/dist/collection/components/ez-split-button/ez-split-button.js +3 -3
- package/dist/collection/components/ez-split-panel/ez-split-panel.css +15 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +106 -5
- package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js +1 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +14 -2
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +22 -1
- package/dist/collection/components/ez-text-area/ez-text-area.css +78 -29
- package/dist/collection/components/ez-text-area/ez-text-area.js +104 -4
- package/dist/collection/components/ez-text-input/ez-text-input.css +106 -91
- package/dist/collection/components/ez-text-input/ez-text-input.js +185 -15
- package/dist/collection/components/ez-time-input/ez-time-input.js +44 -1
- package/dist/collection/components/ez-tooltip/ez-tooltip.css +20 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.js +116 -0
- package/dist/collection/components/ez-tree/ez-tree.js +21 -1
- package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +3 -3
- package/dist/collection/sw.js +46 -0
- package/dist/collection/utils/FocusResolver.js +31 -0
- package/dist/collection/utils/ResponsiveInputUtils.js +26 -0
- package/dist/collection/utils/form/DataBinder.js +22 -7
- package/dist/collection/utils/form/FormMetadata.js +2 -1
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
- package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js +1 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +7 -1
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +16502 -70294
- package/dist/esm/DataBinder-9c877244.js +441 -0
- package/dist/esm/FocusResolver-1ccbf850.js +33 -0
- package/dist/esm/ez-actions-button.entry.js +3 -2
- package/dist/esm/ez-button.entry.js +11 -5
- package/dist/esm/ez-card-item_2.entry.js +71 -0
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +68 -14
- package/dist/esm/ez-custom-form-input_2.entry.js +36 -6
- package/dist/esm/ez-date-input.entry.js +14 -4
- package/dist/esm/ez-date-time-input.entry.js +11 -4
- package/dist/esm/ez-dialog.entry.js +15 -8
- package/dist/esm/ez-double-list.entry.js +283 -0
- package/dist/esm/{ez-dropdown.entry.js → ez-dropdown_2.entry.js} +75 -9
- package/dist/esm/ez-filter-input.entry.js +126 -0
- package/dist/esm/ez-form-view.entry.js +29 -22
- package/dist/esm/ez-form.entry.js +5 -324
- package/dist/esm/ez-grid.entry.js +14891 -69726
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +258 -211
- package/dist/esm/ez-modal-container.entry.js +2 -1
- package/dist/esm/ez-modal.entry.js +19 -4
- package/dist/esm/ez-multi-selection-list.entry.js +2 -2
- package/dist/esm/ez-number-input.entry.js +15 -2
- package/dist/esm/ez-popup.entry.js +24 -2
- package/dist/esm/ez-scroller_2.entry.js +3 -3
- package/dist/esm/ez-search.entry.js +108 -47
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +2 -2
- package/dist/esm/ez-split-item.entry.js +5 -2
- package/dist/esm/ez-split-panel.entry.js +69 -7
- package/dist/esm/ez-text-area.entry.js +68 -6
- package/dist/esm/ez-text-input.entry.js +153 -16
- package/dist/esm/ez-time-input.entry.js +8 -1
- package/dist/esm/ez-tooltip.entry.js +51 -0
- package/dist/esm/ez-tree.entry.js +5 -4
- package/dist/esm/ezListHelper-00fb9b8d.js +87 -0
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/filter-column.entry.js +2 -2
- package/dist/esm/index-baa5e267.js +16 -8
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-14b769d7.entry.js +1 -0
- package/dist/ezui/p-16e612fc.entry.js +1 -0
- package/dist/ezui/p-17eabf46.entry.js +1 -0
- package/dist/ezui/p-2475fd6e.entry.js +1 -0
- package/dist/ezui/p-2bb2a0c4.entry.js +1 -0
- package/dist/ezui/p-2f45506d.entry.js +1 -0
- package/dist/ezui/p-35464ae8.entry.js +1 -0
- package/dist/ezui/p-354abfe8.entry.js +1 -0
- package/dist/ezui/{p-baf80b13.entry.js → p-35d467a8.entry.js} +1 -1
- package/dist/ezui/p-3f2dd525.entry.js +1 -0
- package/dist/ezui/p-420f97ff.entry.js +1 -0
- package/dist/ezui/p-50d83a46.entry.js +1 -0
- package/dist/ezui/p-654b3f99.entry.js +1 -0
- package/dist/ezui/p-65f471bc.entry.js +1 -0
- package/dist/ezui/p-6cdd3e0a.entry.js +1 -0
- package/dist/ezui/p-6d79930d.entry.js +1 -0
- package/dist/ezui/p-6f22a385.entry.js +1 -0
- package/dist/ezui/p-7409eeaa.entry.js +1 -0
- package/dist/ezui/p-7e677b7b.entry.js +1 -0
- package/dist/ezui/{p-bf79aaa1.entry.js → p-7fdd479f.entry.js} +1 -1
- package/dist/ezui/p-80dfc50b.js +1 -0
- package/dist/ezui/p-990b4318.entry.js +1 -0
- package/dist/ezui/p-a6fe527a.entry.js +1 -0
- package/dist/ezui/p-acddfb2e.js +1 -0
- package/dist/ezui/p-b6597f49.entry.js +309 -0
- package/dist/ezui/p-b6a4e6de.entry.js +1 -0
- package/dist/ezui/p-c3045972.entry.js +1 -0
- package/dist/ezui/p-ca6340a9.entry.js +1 -0
- package/dist/ezui/p-cf87aacb.entry.js +1 -0
- package/dist/ezui/p-da1b4a38.entry.js +1 -0
- package/dist/ezui/p-dc628ed3.js +1 -0
- package/dist/ezui/p-dc8b36c3.entry.js +1 -0
- package/dist/ezui/{p-84e439b9.entry.js → p-e347df9c.entry.js} +1 -1
- package/dist/ezui/p-e3e3fd7a.entry.js +1 -0
- package/dist/ezui/p-ea54d056.entry.js +1 -0
- package/dist/ezui/p-f43dbada.entry.js +1 -0
- package/dist/ezui/p-fa6732f2.entry.js +1 -0
- package/dist/ezui/p-fec696ab.entry.js +1 -0
- package/dist/types/components/ez-button/ez-button.d.ts +2 -1
- package/dist/types/components/ez-card-item/ez-card-item.d.ts +5 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +16 -1
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +10 -1
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +10 -1
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -1
- package/dist/types/components/ez-double-list/doubleListHelper.d.ts +10 -0
- package/dist/types/components/ez-double-list/ez-double-list.d.ts +87 -0
- package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +4 -0
- package/dist/types/components/ez-dropdown/structure/DropdownItem.d.ts +1 -1
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +10 -1
- package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +7 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +2 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +1 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +71 -4
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +36 -4
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +25 -2
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +33 -7
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +4 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +2 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +49 -1
- package/dist/types/components/ez-list/ez-list.d.ts +23 -2
- package/dist/types/components/ez-list/ezListHelper.d.ts +20 -0
- package/dist/types/components/ez-modal/ez-modal.d.ts +7 -1
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +4 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +12 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +8 -1
- package/dist/types/components/ez-search/ez-search.d.ts +34 -6
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +1 -1
- package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +11 -0
- package/dist/types/components/ez-split-panel/interfaces/IPanelSizeInfo.d.ts +9 -0
- package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +5 -0
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +17 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +28 -2
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +8 -0
- package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +21 -0
- package/dist/types/components/ez-tree/ez-tree.d.ts +4 -0
- package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +1 -0
- package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +1 -0
- package/dist/types/components.d.ts +486 -27
- package/dist/types/utils/FocusResolver.d.ts +5 -0
- package/dist/types/utils/ResponsiveInputUtils.d.ts +6 -0
- package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +2 -0
- package/dist/types/utils/form/DataBinder.d.ts +3 -0
- package/dist/types/utils/validators/recordvalidator/IInvalidCells.d.ts +5 -0
- package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +1 -1
- package/package.json +12 -4
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/RecordValidationProcessor-4c893e04.js +0 -102
- package/dist/cjs/ez-card-item_3.cjs.entry.js +0 -183
- package/dist/cjs/ez-skeleton.cjs.entry.js +0 -67
- package/dist/esm/RecordValidationProcessor-b00b8b77.js +0 -99
- package/dist/esm/ez-card-item_3.entry.js +0 -177
- package/dist/esm/ez-skeleton.entry.js +0 -63
- package/dist/ezui/p-04f24913.js +0 -1
- package/dist/ezui/p-072e6347.entry.js +0 -1
- package/dist/ezui/p-1285c902.entry.js +0 -1
- package/dist/ezui/p-13d2fe2d.entry.js +0 -1
- package/dist/ezui/p-2097d0cf.entry.js +0 -1
- package/dist/ezui/p-30775e7f.entry.js +0 -1
- package/dist/ezui/p-32e553e5.entry.js +0 -304
- package/dist/ezui/p-3b4eeeb6.entry.js +0 -1
- package/dist/ezui/p-3faa2b46.entry.js +0 -1
- package/dist/ezui/p-49456b34.entry.js +0 -1
- package/dist/ezui/p-4d5235f1.entry.js +0 -1
- package/dist/ezui/p-5bd5e68f.entry.js +0 -1
- package/dist/ezui/p-784fe207.entry.js +0 -1
- package/dist/ezui/p-7922142b.entry.js +0 -1
- package/dist/ezui/p-7af81663.entry.js +0 -1
- package/dist/ezui/p-7bc07c31.entry.js +0 -1
- package/dist/ezui/p-85c8baae.entry.js +0 -1
- package/dist/ezui/p-8888d9ed.entry.js +0 -1
- package/dist/ezui/p-8f0144f6.entry.js +0 -1
- package/dist/ezui/p-9050d2cd.entry.js +0 -1
- package/dist/ezui/p-922ac38b.entry.js +0 -1
- package/dist/ezui/p-9ab22a07.entry.js +0 -1
- package/dist/ezui/p-a31b9c90.entry.js +0 -1
- package/dist/ezui/p-af95cd16.entry.js +0 -1
- package/dist/ezui/p-bae4e180.entry.js +0 -1
- package/dist/ezui/p-bcb53f27.entry.js +0 -1
- package/dist/ezui/p-d9401ea0.entry.js +0 -1
- package/dist/ezui/p-e85c48d7.entry.js +0 -1
- package/dist/ezui/p-ecc2c1ec.entry.js +0 -1
- package/dist/ezui/p-f3c526cc.entry.js +0 -1
- package/dist/ezui/p-fcf0acce.entry.js +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { ElementIDUtils, MaskFormatter } from "@sankhyalabs/core";
|
|
3
|
+
import { applyEllipsisToInput } from "../../utils/ResponsiveInputUtils";
|
|
3
4
|
export class EzTextInput {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.label = undefined;
|
|
@@ -7,23 +8,27 @@ export class EzTextInput {
|
|
|
7
8
|
this.enabled = true;
|
|
8
9
|
this.errorMessage = undefined;
|
|
9
10
|
this.mask = undefined;
|
|
11
|
+
this.cleanValueMask = false;
|
|
10
12
|
this.canShowError = true;
|
|
11
13
|
this.restrict = undefined;
|
|
12
14
|
this.mode = "regular";
|
|
13
15
|
this.noBorder = false;
|
|
14
16
|
this.password = false;
|
|
17
|
+
this.autoFocus = false;
|
|
18
|
+
this.noMargin = false;
|
|
19
|
+
this.hasRightSlotContent = false;
|
|
15
20
|
}
|
|
16
21
|
observeErrorMessage() {
|
|
17
22
|
if (this._inputElem) {
|
|
18
23
|
this.isInvalid().then((hasError) => {
|
|
19
|
-
var _a
|
|
24
|
+
var _a;
|
|
20
25
|
if (hasError) {
|
|
21
26
|
this._inputElem.classList.add("hasError");
|
|
22
|
-
(_a = this.
|
|
27
|
+
(_a = this._tooltipPositioningObserver) === null || _a === void 0 ? void 0 : _a.observe(this._inputElem);
|
|
23
28
|
}
|
|
24
29
|
else {
|
|
25
30
|
this._inputElem.classList.remove("hasError");
|
|
26
|
-
|
|
31
|
+
this.removeGlobalTooltip();
|
|
27
32
|
}
|
|
28
33
|
});
|
|
29
34
|
}
|
|
@@ -121,7 +126,12 @@ export class EzTextInput {
|
|
|
121
126
|
const value = this._inputElem.value;
|
|
122
127
|
if (value && this._maskFormatter) {
|
|
123
128
|
try {
|
|
124
|
-
|
|
129
|
+
if (this.cleanValueMask) {
|
|
130
|
+
this.applyMask(value);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
this._inputElem.value = this._maskFormatter.format(value);
|
|
134
|
+
}
|
|
125
135
|
}
|
|
126
136
|
catch (e) {
|
|
127
137
|
this.errorMessage = e.message;
|
|
@@ -139,8 +149,34 @@ export class EzTextInput {
|
|
|
139
149
|
}
|
|
140
150
|
controlChangeValue() {
|
|
141
151
|
if (this._inputElem && (this.value || '') !== this._inputElem.value) {
|
|
142
|
-
this.
|
|
152
|
+
if (this.cleanValueMask) {
|
|
153
|
+
this.value = this._maskFormatter.removeMask(this._inputElem.value);
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
this.value = this._inputElem.value;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
applyMask(value) {
|
|
161
|
+
if (!value || value === "")
|
|
162
|
+
return value;
|
|
163
|
+
if (this._maskFormatter) {
|
|
164
|
+
try {
|
|
165
|
+
const formattedValue = this._maskFormatter.applyMask(this._maskFormatter.removeMask(value));
|
|
166
|
+
if (this._inputElem) {
|
|
167
|
+
this._inputElem.value = formattedValue;
|
|
168
|
+
return this._inputElem.value;
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
this.value = formattedValue;
|
|
172
|
+
return this.value;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
catch (e) {
|
|
176
|
+
this.errorMessage = e.message;
|
|
177
|
+
}
|
|
143
178
|
}
|
|
179
|
+
return value;
|
|
144
180
|
}
|
|
145
181
|
handleChange() {
|
|
146
182
|
if (!this._inputElem) {
|
|
@@ -156,8 +192,10 @@ export class EzTextInput {
|
|
|
156
192
|
this.controlChangeValue();
|
|
157
193
|
}
|
|
158
194
|
handleSlotChange(ev) {
|
|
195
|
+
var _a;
|
|
159
196
|
const slot = ev.target;
|
|
160
197
|
const content = slot.assignedElements()[0];
|
|
198
|
+
this.hasRightSlotContent = false;
|
|
161
199
|
if (content) {
|
|
162
200
|
content.style.position = "absolute";
|
|
163
201
|
content.style.display = "flex";
|
|
@@ -183,6 +221,10 @@ export class EzTextInput {
|
|
|
183
221
|
if (this._labelElem) {
|
|
184
222
|
this._labelElem.classList.add("input__label--right");
|
|
185
223
|
}
|
|
224
|
+
if (this._tooltipIconElem) {
|
|
225
|
+
this._tooltipIconElem.classList.add("rightIconSlot");
|
|
226
|
+
}
|
|
227
|
+
this.hasRightSlotContent = ((_a = content.children) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
186
228
|
}
|
|
187
229
|
slot.name && ElementIDUtils.addIDInfo(content, slot.name);
|
|
188
230
|
}
|
|
@@ -194,21 +236,50 @@ export class EzTextInput {
|
|
|
194
236
|
}
|
|
195
237
|
this.adjustColorContentSlot("var(--ez-text-input__input--focus--icon-color)");
|
|
196
238
|
}
|
|
239
|
+
renderGlobalTooltip() {
|
|
240
|
+
const tooltip = document.createElement('ez-tooltip');
|
|
241
|
+
tooltip.errorMessage = this.errorMessage;
|
|
242
|
+
tooltip.anchoringElement = this._tooltipIconElem;
|
|
243
|
+
document.body.appendChild(tooltip);
|
|
244
|
+
this._tooltipElem = tooltip;
|
|
245
|
+
}
|
|
246
|
+
removeGlobalTooltip() {
|
|
247
|
+
var _a;
|
|
248
|
+
if (!this._tooltipElem)
|
|
249
|
+
return;
|
|
250
|
+
this._tooltipElem.remove();
|
|
251
|
+
this._tooltipElem = undefined;
|
|
252
|
+
(_a = this._tooltipPositioningObserver) === null || _a === void 0 ? void 0 : _a.unobserve(this._inputElem);
|
|
253
|
+
}
|
|
254
|
+
createTooltipPositioningObserver() {
|
|
255
|
+
const observer = new ResizeObserver(() => {
|
|
256
|
+
if (!this._tooltipElem)
|
|
257
|
+
return;
|
|
258
|
+
if (!this._tooltipIconElem)
|
|
259
|
+
return;
|
|
260
|
+
clearTimeout(this._observerDebounceTimeout);
|
|
261
|
+
this._observerDebounceTimeout = setTimeout(async () => {
|
|
262
|
+
if (this._tooltipElem) {
|
|
263
|
+
await this._tooltipElem.positionTooltip();
|
|
264
|
+
}
|
|
265
|
+
}, 200);
|
|
266
|
+
});
|
|
267
|
+
this._tooltipPositioningObserver = observer;
|
|
268
|
+
}
|
|
197
269
|
//---------------------------------------------
|
|
198
270
|
// Lifecycle web component
|
|
199
271
|
//---------------------------------------------
|
|
200
|
-
componentDidLoad() {
|
|
201
|
-
this.observeErrorMessage();
|
|
202
|
-
this.observeMask();
|
|
203
|
-
this.adjustFloatingLabel();
|
|
204
|
-
this.adjustBorderInput();
|
|
205
|
-
}
|
|
206
272
|
componentWillLoad() {
|
|
207
273
|
this.observeMask();
|
|
208
274
|
if (this.value) {
|
|
209
275
|
if (this._maskFormatter) {
|
|
210
276
|
try {
|
|
211
|
-
|
|
277
|
+
if (this.cleanValueMask) {
|
|
278
|
+
this.applyMask(this.value);
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
this.value = this._maskFormatter.format(this.value);
|
|
282
|
+
}
|
|
212
283
|
}
|
|
213
284
|
catch (e) {
|
|
214
285
|
this.errorMessage = e.message;
|
|
@@ -220,12 +291,52 @@ export class EzTextInput {
|
|
|
220
291
|
}
|
|
221
292
|
}
|
|
222
293
|
}
|
|
294
|
+
componentDidLoad() {
|
|
295
|
+
var _a, _b;
|
|
296
|
+
this.observeErrorMessage();
|
|
297
|
+
this.observeMask();
|
|
298
|
+
this.adjustFloatingLabel();
|
|
299
|
+
this.adjustBorderInput();
|
|
300
|
+
if (this.autoFocus) {
|
|
301
|
+
requestAnimationFrame(() => {
|
|
302
|
+
this.setFocus({ selectText: true });
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
(_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.addEventListener('focus', () => {
|
|
306
|
+
var _a;
|
|
307
|
+
this._inputElem.setSelectionRange(0, (_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.value.length);
|
|
308
|
+
});
|
|
309
|
+
this.createTooltipPositioningObserver();
|
|
310
|
+
if (this._inputElem) {
|
|
311
|
+
(_b = this._tooltipPositioningObserver) === null || _b === void 0 ? void 0 : _b.observe(this._inputElem);
|
|
312
|
+
applyEllipsisToInput(this._inputElem);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
componentDidRender() {
|
|
316
|
+
if (this._tooltipIconElem && !this._tooltipElem) {
|
|
317
|
+
this.renderGlobalTooltip();
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
componentDidUpdate() {
|
|
321
|
+
if (this._tooltipIconElem && this._tooltipElem) {
|
|
322
|
+
this._tooltipElem.positionTooltip();
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
disconnectedCallback() {
|
|
326
|
+
if (this._tooltipPositioningObserver) {
|
|
327
|
+
this._tooltipPositioningObserver.disconnect();
|
|
328
|
+
}
|
|
329
|
+
if (this._observerDebounceTimeout) {
|
|
330
|
+
clearTimeout(this._observerDebounceTimeout);
|
|
331
|
+
}
|
|
332
|
+
this.removeGlobalTooltip();
|
|
333
|
+
}
|
|
223
334
|
render() {
|
|
224
335
|
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
225
336
|
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" ?
|
|
226
|
-
h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled"
|
|
227
|
-
: 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" : ""
|
|
228
|
-
h("
|
|
337
|
+
h("label", { ref: (el) => this._labelElem = el, class: `${this.enabled ? "input__label" : "input__label input__label--disabled"} ${this.errorMessage ? "hasError" : ""}`, onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
338
|
+
: 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" : ""} ${this.noMargin ? "no--margin" : ""}`, placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.mask && this.cleanValueMask ? this.applyMask(this.value) : this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), this.canShowError && this.mode != "slim" && this.errorMessage &&
|
|
339
|
+
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); } }, " ")));
|
|
229
340
|
}
|
|
230
341
|
static get is() { return "ez-text-input"; }
|
|
231
342
|
static get encapsulation() { return "shadow"; }
|
|
@@ -327,6 +438,24 @@ export class EzTextInput {
|
|
|
327
438
|
"attribute": "mask",
|
|
328
439
|
"reflect": false
|
|
329
440
|
},
|
|
441
|
+
"cleanValueMask": {
|
|
442
|
+
"type": "boolean",
|
|
443
|
+
"mutable": false,
|
|
444
|
+
"complexType": {
|
|
445
|
+
"original": "boolean",
|
|
446
|
+
"resolved": "boolean",
|
|
447
|
+
"references": {}
|
|
448
|
+
},
|
|
449
|
+
"required": false,
|
|
450
|
+
"optional": false,
|
|
451
|
+
"docs": {
|
|
452
|
+
"tags": [],
|
|
453
|
+
"text": "Para remover a m\u00E1scara quando fizer um apply no formul\u00E1rio."
|
|
454
|
+
},
|
|
455
|
+
"attribute": "clean-value-mask",
|
|
456
|
+
"reflect": false,
|
|
457
|
+
"defaultValue": "false"
|
|
458
|
+
},
|
|
330
459
|
"canShowError": {
|
|
331
460
|
"type": "boolean",
|
|
332
461
|
"mutable": false,
|
|
@@ -415,9 +544,50 @@ export class EzTextInput {
|
|
|
415
544
|
"attribute": "password",
|
|
416
545
|
"reflect": false,
|
|
417
546
|
"defaultValue": "false"
|
|
547
|
+
},
|
|
548
|
+
"autoFocus": {
|
|
549
|
+
"type": "boolean",
|
|
550
|
+
"mutable": false,
|
|
551
|
+
"complexType": {
|
|
552
|
+
"original": "boolean",
|
|
553
|
+
"resolved": "boolean",
|
|
554
|
+
"references": {}
|
|
555
|
+
},
|
|
556
|
+
"required": false,
|
|
557
|
+
"optional": false,
|
|
558
|
+
"docs": {
|
|
559
|
+
"tags": [],
|
|
560
|
+
"text": "Se true o campo receber\u00E1 o foco ao ser renderizado."
|
|
561
|
+
},
|
|
562
|
+
"attribute": "auto-focus",
|
|
563
|
+
"reflect": false,
|
|
564
|
+
"defaultValue": "false"
|
|
565
|
+
},
|
|
566
|
+
"noMargin": {
|
|
567
|
+
"type": "boolean",
|
|
568
|
+
"mutable": false,
|
|
569
|
+
"complexType": {
|
|
570
|
+
"original": "boolean",
|
|
571
|
+
"resolved": "boolean",
|
|
572
|
+
"references": {}
|
|
573
|
+
},
|
|
574
|
+
"required": false,
|
|
575
|
+
"optional": false,
|
|
576
|
+
"docs": {
|
|
577
|
+
"tags": [],
|
|
578
|
+
"text": "Quando verdadeiro, o campo n\u00E3o ter\u00E1 espa\u00E7amento externo."
|
|
579
|
+
},
|
|
580
|
+
"attribute": "no-margin",
|
|
581
|
+
"reflect": false,
|
|
582
|
+
"defaultValue": "false"
|
|
418
583
|
}
|
|
419
584
|
};
|
|
420
585
|
}
|
|
586
|
+
static get states() {
|
|
587
|
+
return {
|
|
588
|
+
"hasRightSlotContent": {}
|
|
589
|
+
};
|
|
590
|
+
}
|
|
421
591
|
static get events() {
|
|
422
592
|
return [{
|
|
423
593
|
"method": "ezChange",
|
|
@@ -10,6 +10,8 @@ export class EzTimeInput {
|
|
|
10
10
|
this.showSeconds = false;
|
|
11
11
|
this.mode = "regular";
|
|
12
12
|
this.canShowError = true;
|
|
13
|
+
this.autoFocus = false;
|
|
14
|
+
this.noMargin = false;
|
|
13
15
|
}
|
|
14
16
|
observeErrorMessage() {
|
|
15
17
|
var _a;
|
|
@@ -130,6 +132,11 @@ export class EzTimeInput {
|
|
|
130
132
|
//---------------------------------------------
|
|
131
133
|
componentDidLoad() {
|
|
132
134
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
135
|
+
if (this.autoFocus) {
|
|
136
|
+
requestAnimationFrame(() => {
|
|
137
|
+
this.setFocus({ selectText: true });
|
|
138
|
+
});
|
|
139
|
+
}
|
|
133
140
|
}
|
|
134
141
|
componentWillLoad() {
|
|
135
142
|
this.observeShowSeconds();
|
|
@@ -142,7 +149,7 @@ export class EzTimeInput {
|
|
|
142
149
|
}
|
|
143
150
|
render() {
|
|
144
151
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
145
|
-
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" }))));
|
|
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, noMargin: this.noMargin }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
146
153
|
}
|
|
147
154
|
static get is() { return "ez-time-input"; }
|
|
148
155
|
static get encapsulation() { return "shadow"; }
|
|
@@ -281,6 +288,42 @@ export class EzTimeInput {
|
|
|
281
288
|
"attribute": "can-show-error",
|
|
282
289
|
"reflect": true,
|
|
283
290
|
"defaultValue": "true"
|
|
291
|
+
},
|
|
292
|
+
"autoFocus": {
|
|
293
|
+
"type": "boolean",
|
|
294
|
+
"mutable": false,
|
|
295
|
+
"complexType": {
|
|
296
|
+
"original": "boolean",
|
|
297
|
+
"resolved": "boolean",
|
|
298
|
+
"references": {}
|
|
299
|
+
},
|
|
300
|
+
"required": false,
|
|
301
|
+
"optional": false,
|
|
302
|
+
"docs": {
|
|
303
|
+
"tags": [],
|
|
304
|
+
"text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
|
|
305
|
+
},
|
|
306
|
+
"attribute": "auto-focus",
|
|
307
|
+
"reflect": false,
|
|
308
|
+
"defaultValue": "false"
|
|
309
|
+
},
|
|
310
|
+
"noMargin": {
|
|
311
|
+
"type": "boolean",
|
|
312
|
+
"mutable": false,
|
|
313
|
+
"complexType": {
|
|
314
|
+
"original": "boolean",
|
|
315
|
+
"resolved": "boolean",
|
|
316
|
+
"references": {}
|
|
317
|
+
},
|
|
318
|
+
"required": false,
|
|
319
|
+
"optional": false,
|
|
320
|
+
"docs": {
|
|
321
|
+
"tags": [],
|
|
322
|
+
"text": "Quando verdadeiro, o campo n\u00E3o ter\u00E1 espa\u00E7amento."
|
|
323
|
+
},
|
|
324
|
+
"attribute": "no-margin",
|
|
325
|
+
"reflect": false,
|
|
326
|
+
"defaultValue": "false"
|
|
284
327
|
}
|
|
285
328
|
};
|
|
286
329
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
position: absolute;
|
|
3
|
+
z-index: var(--elevation--24);
|
|
4
|
+
background: var(--color-alert--error-800, #BD0025);
|
|
5
|
+
padding: var(--space--extra-small, 3px) var(--space--small, 6px);
|
|
6
|
+
color: var(--color--inverted);
|
|
7
|
+
border-radius: var(--border--radius-small);
|
|
8
|
+
display: none; /* Initially hide the tooltip */
|
|
9
|
+
transform: translateX(calc(-50% + 12px)) translateY(8px);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.tooltip::after{
|
|
13
|
+
--triangle-size: 8px;
|
|
14
|
+
content: '';
|
|
15
|
+
right: 50%;
|
|
16
|
+
border: var(--triangle-size) solid transparent;
|
|
17
|
+
border-bottom-color: var(--color-alert--error-800, #BD0025);
|
|
18
|
+
position: absolute;
|
|
19
|
+
transform: translateX(calc(50%)) translateY(-100%);
|
|
20
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { ElementIDUtils } from "@sankhyalabs/core";
|
|
2
|
+
import { h } from "@stencil/core";
|
|
3
|
+
export class EzTooltip {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.errorMessage = undefined;
|
|
6
|
+
this.anchoringElement = undefined;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* TODO: Implementar a possibilidade de definir a posição do tooltip.
|
|
10
|
+
*/
|
|
11
|
+
// @Prop() tooltipSide: 'left' | 'right' | 'top' | 'bottom' = 'bottom';
|
|
12
|
+
/**
|
|
13
|
+
* Reposiciona o tooltip de acordo com a posição do elemento de ancoragem.
|
|
14
|
+
*/
|
|
15
|
+
async positionTooltip() {
|
|
16
|
+
const anchorRect = this.anchoringElement.getBoundingClientRect();
|
|
17
|
+
const top = (anchorRect.bottom + window.scrollY);
|
|
18
|
+
const left = (anchorRect.left + window.scrollX);
|
|
19
|
+
this._element.style.top = `${top}px`;
|
|
20
|
+
this._element.style.left = `${left}px`;
|
|
21
|
+
}
|
|
22
|
+
setEvents() {
|
|
23
|
+
window.addEventListener('scroll', () => {
|
|
24
|
+
this.positionTooltip();
|
|
25
|
+
}, { capture: true });
|
|
26
|
+
window.addEventListener('resize', () => {
|
|
27
|
+
this.positionTooltip();
|
|
28
|
+
}, { capture: true });
|
|
29
|
+
this.anchoringElement.addEventListener('mouseover', () => {
|
|
30
|
+
this._element.style.display = 'block';
|
|
31
|
+
});
|
|
32
|
+
this.anchoringElement.addEventListener('mouseout', () => {
|
|
33
|
+
this._element.style.display = 'none';
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
componentDidLoad() {
|
|
37
|
+
this.positionTooltip();
|
|
38
|
+
this.setEvents();
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
return (h("div", { inert: true, class: "tooltip", role: "tooltip", "data-element-id": ElementIDUtils.getInternalIDInfo("tooltip") }, this.errorMessage));
|
|
42
|
+
}
|
|
43
|
+
static get is() { return "ez-tooltip"; }
|
|
44
|
+
static get encapsulation() { return "shadow"; }
|
|
45
|
+
static get originalStyleUrls() {
|
|
46
|
+
return {
|
|
47
|
+
"$": ["ez-tooltip.css"]
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static get styleUrls() {
|
|
51
|
+
return {
|
|
52
|
+
"$": ["ez-tooltip.css"]
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static get properties() {
|
|
56
|
+
return {
|
|
57
|
+
"errorMessage": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"mutable": false,
|
|
60
|
+
"complexType": {
|
|
61
|
+
"original": "string",
|
|
62
|
+
"resolved": "string",
|
|
63
|
+
"references": {}
|
|
64
|
+
},
|
|
65
|
+
"required": false,
|
|
66
|
+
"optional": false,
|
|
67
|
+
"docs": {
|
|
68
|
+
"tags": [],
|
|
69
|
+
"text": "Mensagem de erro que ser\u00E1 apresentada no tooltip."
|
|
70
|
+
},
|
|
71
|
+
"attribute": "error-message",
|
|
72
|
+
"reflect": false
|
|
73
|
+
},
|
|
74
|
+
"anchoringElement": {
|
|
75
|
+
"type": "unknown",
|
|
76
|
+
"mutable": false,
|
|
77
|
+
"complexType": {
|
|
78
|
+
"original": "HTMLElement",
|
|
79
|
+
"resolved": "HTMLElement",
|
|
80
|
+
"references": {
|
|
81
|
+
"HTMLElement": {
|
|
82
|
+
"location": "global"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"required": false,
|
|
87
|
+
"optional": false,
|
|
88
|
+
"docs": {
|
|
89
|
+
"tags": [],
|
|
90
|
+
"text": "Elemento HTML que ser\u00E1 utilizado como ancoragem do tooltip."
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
static get methods() {
|
|
96
|
+
return {
|
|
97
|
+
"positionTooltip": {
|
|
98
|
+
"complexType": {
|
|
99
|
+
"signature": "() => Promise<void>",
|
|
100
|
+
"parameters": [],
|
|
101
|
+
"references": {
|
|
102
|
+
"Promise": {
|
|
103
|
+
"location": "global"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"return": "Promise<void>"
|
|
107
|
+
},
|
|
108
|
+
"docs": {
|
|
109
|
+
"text": "Reposiciona o tooltip de acordo com a posi\u00E7\u00E3o do elemento de ancoragem.",
|
|
110
|
+
"tags": []
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
static get elementRef() { return "_element"; }
|
|
116
|
+
}
|
|
@@ -274,7 +274,7 @@ export class EzTree {
|
|
|
274
274
|
:
|
|
275
275
|
this._tree.getChildren().map(node => {
|
|
276
276
|
var _a;
|
|
277
|
-
return 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 });
|
|
277
|
+
return 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) });
|
|
278
278
|
})));
|
|
279
279
|
}
|
|
280
280
|
static get is() { return "ez-tree"; }
|
|
@@ -442,6 +442,26 @@ export class EzTree {
|
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
|
+
}, {
|
|
446
|
+
"method": "ezDbClickItem",
|
|
447
|
+
"name": "ezDbClickItem",
|
|
448
|
+
"bubbles": true,
|
|
449
|
+
"cancelable": true,
|
|
450
|
+
"composed": true,
|
|
451
|
+
"docs": {
|
|
452
|
+
"tags": [],
|
|
453
|
+
"text": "Emitido ao dar clique duplo em um item da \u00E1rvore."
|
|
454
|
+
},
|
|
455
|
+
"complexType": {
|
|
456
|
+
"original": "ITreeItem",
|
|
457
|
+
"resolved": "ITreeItem",
|
|
458
|
+
"references": {
|
|
459
|
+
"ITreeItem": {
|
|
460
|
+
"location": "import",
|
|
461
|
+
"path": "./interfaces/ITreeItem"
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
445
465
|
}];
|
|
446
466
|
}
|
|
447
467
|
static get methods() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementIDUtils } from "@sankhyalabs/core";
|
|
2
2
|
import { h } from "@stencil/core";
|
|
3
3
|
export const TreeItem = (props) => {
|
|
4
|
-
const { node, selectedId, itemClick, iconClick, iconResolver, tooltipResolver, itemsList } = props;
|
|
4
|
+
const { node, selectedId, itemClick, iconClick, iconResolver, tooltipResolver, itemsList, itemDoubleClick } = props;
|
|
5
5
|
if (!node.visible) {
|
|
6
6
|
return;
|
|
7
7
|
}
|
|
@@ -14,13 +14,13 @@ export const TreeItem = (props) => {
|
|
|
14
14
|
if (available) {
|
|
15
15
|
itemsList.push(treeItem);
|
|
16
16
|
}
|
|
17
|
-
return (h("ul", { class: level === 1 ? "first-level" : undefined }, h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? "tree-item-error" : ""}`, onClick: () => available && itemClick(treeItem) }, {
|
|
17
|
+
return (h("ul", { class: level === 1 ? "first-level" : undefined }, 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) }, {
|
|
18
18
|
disabled,
|
|
19
19
|
selected: treeItem.id === selectedId,
|
|
20
20
|
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezTreeItem_${treeItem.id}`)
|
|
21
21
|
}), h("div", { class: "item-label-container" }, h("div", { class: "item-icon-box" }, expandable &&
|
|
22
22
|
h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })), h("label", { class: `item-label ${treeItem.bold ? "item-label--bold" : ""}` }, treeItem.label)), getBadgeElement(treeItem.id, treeItem.badge, treeItem.id === selectedId)), expanded
|
|
23
|
-
&& node.getChildren().map(child => h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList }))));
|
|
23
|
+
&& node.getChildren().map(child => h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList, itemDoubleClick: itemDoubleClick }))));
|
|
24
24
|
};
|
|
25
25
|
function getBadgeElement(itemId, badge, isSelectedItem) {
|
|
26
26
|
if (badge == undefined) {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching';
|
|
2
|
+
import { registerRoute } from 'workbox-routing';
|
|
3
|
+
import { StaleWhileRevalidate, CacheFirst } from 'workbox-strategies';
|
|
4
|
+
import { CacheableResponsePlugin } from 'workbox-cacheable-response';
|
|
5
|
+
import { ExpirationPlugin } from 'workbox-expiration';
|
|
6
|
+
|
|
7
|
+
// Placeholder for Workbox to inject the precache manifest
|
|
8
|
+
precacheAndRoute([]);
|
|
9
|
+
|
|
10
|
+
// Additional custom logic follows...
|
|
11
|
+
registerRoute(
|
|
12
|
+
({ url }) =>
|
|
13
|
+
url.pathname.endsWith('/service.sbr') &&
|
|
14
|
+
url.searchParams.has('serviceName'),
|
|
15
|
+
new StaleWhileRevalidate({
|
|
16
|
+
cacheName: 'api-cache',
|
|
17
|
+
plugins: [new CacheableResponsePlugin({ statuses: [200] })],
|
|
18
|
+
})
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
registerRoute(
|
|
22
|
+
({ request }) =>
|
|
23
|
+
['image', 'font', 'style'].includes(request.destination),
|
|
24
|
+
new CacheFirst({
|
|
25
|
+
cacheName: 'assets-cache',
|
|
26
|
+
plugins: [
|
|
27
|
+
new CacheableResponsePlugin({ statuses: [0, 200] }),
|
|
28
|
+
new ExpirationPlugin({ maxEntries: 50, maxAgeSeconds: 30 * 24 * 60 * 60 }),
|
|
29
|
+
],
|
|
30
|
+
})
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
registerRoute(
|
|
34
|
+
({ request }) => request.mode === 'navigate',
|
|
35
|
+
createHandlerBoundToURL('/index.html')
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
self.addEventListener('install', (event) => {
|
|
39
|
+
console.log('Service Worker installing.');
|
|
40
|
+
self.skipWaiting();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
self.addEventListener('activate', (event) => {
|
|
44
|
+
console.log('Service Worker activating.');
|
|
45
|
+
clients.claim();
|
|
46
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export default class FocusResolver {
|
|
2
|
+
static resolveFocus(element, selectText = true) {
|
|
3
|
+
var _a;
|
|
4
|
+
if (!element)
|
|
5
|
+
return;
|
|
6
|
+
(_a = element.focus) === null || _a === void 0 ? void 0 : _a.call(element);
|
|
7
|
+
if (element.setFocus) {
|
|
8
|
+
element.setFocus({ selectText });
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
this.resolveFocusOnChild(element, selectText);
|
|
12
|
+
}
|
|
13
|
+
static resolveFocusOnChild(element, selectText = true) {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
if (this.isGridCell(element) && element.firstElementChild) {
|
|
16
|
+
this.resolveFocusOnChild(element.firstElementChild);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (!element || !element.classList.contains('hydrated'))
|
|
20
|
+
return;
|
|
21
|
+
const firstChild = element.firstElementChild;
|
|
22
|
+
if (!(firstChild === null || firstChild === void 0 ? void 0 : firstChild.focus) && !(firstChild === null || firstChild === void 0 ? void 0 : firstChild.setFocus))
|
|
23
|
+
return;
|
|
24
|
+
(_a = firstChild === null || firstChild === void 0 ? void 0 : firstChild.focus) === null || _a === void 0 ? void 0 : _a.call(firstChild);
|
|
25
|
+
(_b = firstChild === null || firstChild === void 0 ? void 0 : firstChild.setFocus) === null || _b === void 0 ? void 0 : _b.call(firstChild, { selectText });
|
|
26
|
+
}
|
|
27
|
+
static isGridCell(element) {
|
|
28
|
+
var _a;
|
|
29
|
+
return ((_a = element === null || element === void 0 ? void 0 : element.getAttribute) === null || _a === void 0 ? void 0 : _a.call(element, "role")) === 'gridcell';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aplica comportamento de elipses a um input caso o texto ultrapasse o tamanho disponível.
|
|
3
|
+
*
|
|
4
|
+
* @param inputElement A referência ao elemento input (HTMLInputElement).
|
|
5
|
+
*/
|
|
6
|
+
export const applyEllipsisToInput = (inputElement) => {
|
|
7
|
+
if (!inputElement || !inputElement.style) {
|
|
8
|
+
console.error('[applyEllipsisToInput] Referência ao elemento input é inválida.');
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
inputElement.style.textOverflow = 'ellipsis';
|
|
12
|
+
inputElement.style.overflow = 'hidden';
|
|
13
|
+
inputElement.style.whiteSpace = 'nowrap';
|
|
14
|
+
const adjustEllipsis = () => {
|
|
15
|
+
const value = inputElement.value || '';
|
|
16
|
+
const isOverflowing = inputElement.scrollWidth > inputElement.clientWidth;
|
|
17
|
+
if (isOverflowing) {
|
|
18
|
+
inputElement.setAttribute('title', value);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
inputElement.removeAttribute('title');
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
inputElement.addEventListener('input', adjustEllipsis);
|
|
25
|
+
adjustEllipsis();
|
|
26
|
+
};
|