@sankhyalabs/ezui 5.22.0-dev.7 → 5.22.0-dev.71
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-b4ef826a.js +445 -0
- package/dist/cjs/FocusResolver-885f2173.js +35 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +4 -3
- package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-badge.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js +12 -6
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item_2.cjs.entry.js +76 -0
- package/dist/cjs/ez-chart.cjs.entry.js +1 -1
- package/dist/cjs/ez-check.cjs.entry.js +2 -2
- 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.cjs.entry.js +68 -14
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +37 -7
- package/dist/cjs/ez-date-input.cjs.entry.js +15 -5
- package/dist/cjs/ez-date-time-input.cjs.entry.js +12 -5
- package/dist/cjs/ez-dialog.cjs.entry.js +11 -3
- 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} +76 -9
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js +130 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +30 -23
- package/dist/cjs/ez-form.cjs.entry.js +7 -326
- package/dist/cjs/ez-grid.cjs.entry.js +14946 -69807
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-icon.cjs.entry.js +2 -2
- package/dist/cjs/ez-list.cjs.entry.js +259 -212
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +3 -2
- package/dist/cjs/ez-modal.cjs.entry.js +20 -5
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +3 -3
- package/dist/cjs/ez-number-input.cjs.entry.js +16 -3
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +25 -3
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_2.cjs.entry.js +4 -4
- package/dist/cjs/ez-search.cjs.entry.js +106 -46
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +2 -2
- package/dist/cjs/ez-split-button.cjs.entry.js +3 -3
- package/dist/cjs/ez-split-item.cjs.entry.js +4 -3
- package/dist/cjs/ez-split-panel.cjs.entry.js +69 -7
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +68 -6
- package/dist/cjs/ez-text-input.cjs.entry.js +154 -17
- package/dist/cjs/ez-time-input.cjs.entry.js +9 -2
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js +55 -0
- package/dist/cjs/ez-tree.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +1 -1
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezListHelper-0d3970b4.js +90 -0
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/filter-column.cjs.entry.js +3 -3
- package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +16 -11
- package/dist/cjs/loader.cjs.js +2 -2
- 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 +9 -1
- 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 +282 -57
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +107 -5
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js +2 -2
- 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 +220 -7
- 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 +153 -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 +189 -49
- 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-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 +20 -1
- package/dist/collection/components/ez-text-area/ez-text-area.css +73 -28
- package/dist/collection/components/ez-text-area/ez-text-area.js +103 -3
- 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/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 +20 -5
- 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 +16564 -70385
- package/dist/esm/DataBinder-d2ecbb0f.js +441 -0
- package/dist/esm/FocusResolver-1ccbf850.js +33 -0
- package/dist/esm/ez-actions-button.entry.js +4 -3
- package/dist/esm/ez-alert-list.entry.js +1 -1
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-badge.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js +1 -1
- package/dist/esm/ez-button.entry.js +12 -6
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item_2.entry.js +71 -0
- package/dist/esm/ez-chart.entry.js +1 -1
- package/dist/esm/ez-check.entry.js +2 -2
- 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.entry.js +69 -15
- package/dist/esm/ez-custom-form-input_2.entry.js +38 -8
- package/dist/esm/ez-date-input.entry.js +15 -5
- package/dist/esm/ez-date-time-input.entry.js +12 -5
- package/dist/esm/ez-dialog.entry.js +11 -3
- package/dist/esm/ez-double-list.entry.js +283 -0
- package/dist/esm/{ez-dropdown.entry.js → ez-dropdown_2.entry.js} +76 -10
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-filter-input.entry.js +126 -0
- package/dist/esm/ez-form-view.entry.js +30 -23
- package/dist/esm/ez-form.entry.js +6 -325
- package/dist/esm/ez-grid.entry.js +14945 -69806
- package/dist/esm/ez-guide-navigator.entry.js +1 -1
- package/dist/esm/ez-icon.entry.js +2 -2
- package/dist/esm/ez-list.entry.js +259 -212
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +3 -2
- package/dist/esm/ez-modal.entry.js +20 -5
- package/dist/esm/ez-multi-selection-list.entry.js +3 -3
- package/dist/esm/ez-number-input.entry.js +16 -3
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +25 -3
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-scroller_2.entry.js +4 -4
- package/dist/esm/ez-search.entry.js +106 -46
- package/dist/esm/ez-sidebar-navigator.entry.js +2 -2
- package/dist/esm/ez-split-button.entry.js +3 -3
- package/dist/esm/ez-split-item.entry.js +4 -3
- package/dist/esm/ez-split-panel.entry.js +69 -7
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +68 -6
- package/dist/esm/ez-text-input.entry.js +154 -17
- package/dist/esm/ez-time-input.entry.js +9 -2
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-tooltip.entry.js +51 -0
- package/dist/esm/ez-tree.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +1 -1
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezListHelper-00fb9b8d.js +87 -0
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/filter-column.entry.js +3 -3
- package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +17 -11
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-e6b38ade.entry.js → p-0306dff7.entry.js} +1 -1
- package/dist/ezui/{p-91ccae0c.entry.js → p-09de35a2.entry.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-b2f6bc0a.entry.js → p-17be134a.entry.js} +1 -1
- package/dist/ezui/p-17eabf46.entry.js +1 -0
- package/dist/ezui/p-181b5ae8.entry.js +1 -0
- package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
- package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
- package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
- package/dist/ezui/p-2475fd6e.entry.js +1 -0
- package/dist/ezui/p-2bb2a0c4.entry.js +1 -0
- package/dist/ezui/p-3175fe8c.entry.js +1 -0
- package/dist/ezui/{p-30951bd7.entry.js → p-35d467a8.entry.js} +1 -1
- package/dist/ezui/p-3f2dd525.entry.js +1 -0
- package/dist/ezui/{p-0378416a.entry.js → p-44caad9a.entry.js} +1 -1
- package/dist/ezui/p-50d83a46.entry.js +1 -0
- package/dist/ezui/{p-7567ccdd.entry.js → p-555c9018.entry.js} +1 -1
- package/dist/ezui/{p-044d46d5.entry.js → p-5b205c80.entry.js} +1 -1
- package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
- package/dist/ezui/{p-f1c2c19e.entry.js → p-650e4b6d.entry.js} +1 -1
- package/dist/ezui/p-654b3f99.entry.js +1 -0
- package/dist/ezui/p-65f471bc.entry.js +1 -0
- package/dist/ezui/p-66924de6.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-fc194825.entry.js → p-6e429cff.entry.js} +1 -1
- package/dist/ezui/p-6f22a385.entry.js +1 -0
- package/dist/ezui/p-7409eeaa.entry.js +1 -0
- package/dist/ezui/{p-11bfeca3.entry.js → p-77a4bd35.entry.js} +1 -1
- package/dist/ezui/p-7e677b7b.entry.js +1 -0
- package/dist/ezui/p-7ed30844.entry.js +1 -0
- package/dist/ezui/p-7fdd479f.entry.js +1 -0
- package/dist/ezui/p-80dfc50b.js +1 -0
- package/dist/ezui/{p-1b08bf3c.entry.js → p-8888d9ed.entry.js} +1 -1
- package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
- package/dist/ezui/p-990b4318.entry.js +1 -0
- package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
- package/dist/ezui/p-a6fe527a.entry.js +1 -0
- package/dist/ezui/{p-dfca5946.entry.js → p-a80b1287.entry.js} +1 -1
- package/dist/ezui/p-b6a4e6de.entry.js +1 -0
- package/dist/ezui/p-bc2f844e.entry.js +1 -0
- package/dist/ezui/{p-92748142.entry.js → p-c0d9c4f8.entry.js} +1 -1
- package/dist/ezui/p-c3045972.entry.js +1 -0
- package/dist/ezui/{p-82ac8b06.entry.js → p-c4320a39.entry.js} +1 -1
- package/dist/ezui/p-ca6340a9.entry.js +1 -0
- package/dist/ezui/p-ceadecd9.js +1 -0
- package/dist/ezui/p-d0ca26fe.entry.js +1 -0
- package/dist/ezui/p-d520839d.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-dd48941c.entry.js +309 -0
- package/dist/ezui/{p-9aa27e69.entry.js → p-e347df9c.entry.js} +1 -1
- package/dist/ezui/p-e3e3fd7a.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 -0
- 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 +60 -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 +23 -1
- 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 +37 -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 +29 -5
- 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 +4 -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.d.ts +448 -25
- 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-11b09aa1.entry.js +0 -1
- package/dist/ezui/p-24ca32a3.entry.js +0 -1
- package/dist/ezui/p-2af4e2de.entry.js +0 -1
- package/dist/ezui/p-31674f8e.entry.js +0 -1
- package/dist/ezui/p-33792b2b.entry.js +0 -1
- package/dist/ezui/p-33b08253.entry.js +0 -304
- package/dist/ezui/p-36180f4d.entry.js +0 -1
- package/dist/ezui/p-3f8c33e0.entry.js +0 -1
- package/dist/ezui/p-5fefcdc9.entry.js +0 -1
- package/dist/ezui/p-6ec40dec.entry.js +0 -1
- package/dist/ezui/p-752c4069.entry.js +0 -1
- package/dist/ezui/p-81cffa53.entry.js +0 -1
- package/dist/ezui/p-81f99ace.entry.js +0 -1
- package/dist/ezui/p-868b56f7.entry.js +0 -1
- package/dist/ezui/p-8eef0f70.entry.js +0 -1
- package/dist/ezui/p-9634631d.entry.js +0 -1
- package/dist/ezui/p-9a11e223.entry.js +0 -1
- package/dist/ezui/p-9a23d513.entry.js +0 -1
- package/dist/ezui/p-9c2e2d68.entry.js +0 -1
- package/dist/ezui/p-a35b41e6.entry.js +0 -1
- package/dist/ezui/p-acbf0e76.entry.js +0 -1
- package/dist/ezui/p-b0e71d23.entry.js +0 -1
- package/dist/ezui/p-c3b7a23e.entry.js +0 -1
- package/dist/ezui/p-cd1a2e6b.entry.js +0 -1
- package/dist/ezui/p-dbeee5aa.entry.js +0 -1
- package/dist/ezui/p-de870657.entry.js +0 -1
- package/dist/ezui/p-e151e795.entry.js +0 -1
- package/dist/ezui/p-ee9315ff.entry.js +0 -1
- package/dist/ezui/p-f1c3f85d.entry.js +0 -1
- package/dist/ezui/p-f291db18.entry.js +0 -1
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
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--medium, 12px);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;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%;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:both}.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;
|
|
@@ -15,6 +17,8 @@ const EzTextArea = class {
|
|
|
15
17
|
this.canShowError = true;
|
|
16
18
|
this.mode = "regular";
|
|
17
19
|
this.enableResize = false;
|
|
20
|
+
this.autoRows = false;
|
|
21
|
+
this.autoFocus = false;
|
|
18
22
|
}
|
|
19
23
|
observeErrorMessage() {
|
|
20
24
|
var _a, _b, _c, _d;
|
|
@@ -52,8 +56,17 @@ const EzTextArea = class {
|
|
|
52
56
|
observeRows() {
|
|
53
57
|
const rows = this.rows > 0 ? this.rows : this.mode != "slim" ? 4 : 2;
|
|
54
58
|
if (rows !== this.rows) {
|
|
55
|
-
this.rows
|
|
56
|
-
|
|
59
|
+
this.updateRows(rows);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
observeAutoRows() {
|
|
63
|
+
var _a, _b;
|
|
64
|
+
if (this.autoRows) {
|
|
65
|
+
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
66
|
+
this.initializeResizeObserver();
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
(_b = this._resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
57
70
|
}
|
|
58
71
|
}
|
|
59
72
|
//---------------------------------------------
|
|
@@ -122,6 +135,42 @@ const EzTextArea = class {
|
|
|
122
135
|
isFocused() {
|
|
123
136
|
return this._hostElement.shadowRoot.activeElement !== null;
|
|
124
137
|
}
|
|
138
|
+
updateRows(newRows) {
|
|
139
|
+
this.rows = newRows;
|
|
140
|
+
this._initialRows = newRows;
|
|
141
|
+
}
|
|
142
|
+
calculateMaxRows() {
|
|
143
|
+
const parentElement = this._hostElement.parentElement;
|
|
144
|
+
if (!parentElement) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const height = Math.max((parentElement === null || parentElement === void 0 ? void 0 : parentElement.clientHeight) || 0, this.LINE_HEIGHT);
|
|
148
|
+
if (height > 0) {
|
|
149
|
+
const maxRows = Math.floor(height / this.LINE_HEIGHT * this.HEIGHT_RATIO);
|
|
150
|
+
if (maxRows !== this.rows) {
|
|
151
|
+
this.updateRows(maxRows);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
initializeResizeObserver() {
|
|
156
|
+
if (!this.autoRows) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
const parentElement = this._hostElement.parentElement;
|
|
160
|
+
if (parentElement) {
|
|
161
|
+
try {
|
|
162
|
+
if (this._resizeObserver != undefined) {
|
|
163
|
+
this._resizeObserver.unobserve(parentElement);
|
|
164
|
+
}
|
|
165
|
+
this._resizeObserver = new ResizeObserver(this.calculateMaxRows.bind(this));
|
|
166
|
+
this._resizeObserver.observe(parentElement);
|
|
167
|
+
}
|
|
168
|
+
catch (e) {
|
|
169
|
+
console.warn(e);
|
|
170
|
+
}
|
|
171
|
+
this.calculateMaxRows();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
125
174
|
//---------------------------------------------
|
|
126
175
|
// Event handlers
|
|
127
176
|
//---------------------------------------------
|
|
@@ -144,6 +193,13 @@ const EzTextArea = class {
|
|
|
144
193
|
this._container.classList.add("textarea--focus");
|
|
145
194
|
}
|
|
146
195
|
}
|
|
196
|
+
connectedCallback() {
|
|
197
|
+
this.initializeResizeObserver();
|
|
198
|
+
}
|
|
199
|
+
disconnectedCallback() {
|
|
200
|
+
var _a;
|
|
201
|
+
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
202
|
+
}
|
|
147
203
|
//---------------------------------------------
|
|
148
204
|
// Lifecycle web component
|
|
149
205
|
//---------------------------------------------
|
|
@@ -151,10 +207,15 @@ const EzTextArea = class {
|
|
|
151
207
|
this.observeErrorMessage();
|
|
152
208
|
this.adjustFloatingLabel();
|
|
153
209
|
this.observeMode();
|
|
210
|
+
if (this.autoFocus) {
|
|
211
|
+
requestAnimationFrame(() => {
|
|
212
|
+
this.setFocus();
|
|
213
|
+
});
|
|
214
|
+
}
|
|
154
215
|
}
|
|
155
216
|
render() {
|
|
156
217
|
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
157
|
-
return (h(Host, null, h("div", { class: "textarea"
|
|
218
|
+
return (h(Host, null, h("div", { class: `textarea ${this.enabled ? "" : "textarea--disabled"}`, ref: (el) => this._container = el }, this.label && this.mode != "slim" ?
|
|
158
219
|
h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "textarea__label" : "textarea__label textarea__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
159
220
|
: 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
221
|
"textarea--slim": this.mode === "slim",
|
|
@@ -167,7 +228,8 @@ const EzTextArea = class {
|
|
|
167
228
|
"errorMessage": ["observeErrorMessage"],
|
|
168
229
|
"value": ["observeValue"],
|
|
169
230
|
"mode": ["observeMode"],
|
|
170
|
-
"rows": ["observeRows"]
|
|
231
|
+
"rows": ["observeRows"],
|
|
232
|
+
"autoRows": ["observeAutoRows"]
|
|
171
233
|
}; }
|
|
172
234
|
};
|
|
173
235
|
EzTextArea.style = ezTextAreaCss;
|
|
@@ -1,7 +1,34 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
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
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Aplica comportamento de elipses a um input caso o texto ultrapasse o tamanho disponível.
|
|
6
|
+
*
|
|
7
|
+
* @param inputElement A referência ao elemento input (HTMLInputElement).
|
|
8
|
+
*/
|
|
9
|
+
const applyEllipsisToInput = (inputElement) => {
|
|
10
|
+
if (!inputElement || !inputElement.style) {
|
|
11
|
+
console.error('[applyEllipsisToInput] Referência ao elemento input é inválida.');
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
inputElement.style.textOverflow = 'ellipsis';
|
|
15
|
+
inputElement.style.overflow = 'hidden';
|
|
16
|
+
inputElement.style.whiteSpace = 'nowrap';
|
|
17
|
+
const adjustEllipsis = () => {
|
|
18
|
+
const value = inputElement.value || '';
|
|
19
|
+
const isOverflowing = inputElement.scrollWidth > inputElement.clientWidth;
|
|
20
|
+
if (isOverflowing) {
|
|
21
|
+
inputElement.setAttribute('title', value);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
inputElement.removeAttribute('title');
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
inputElement.addEventListener('input', adjustEllipsis);
|
|
28
|
+
adjustEllipsis();
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--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--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;height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-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-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-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
32
|
|
|
6
33
|
const EzTextInput = class {
|
|
7
34
|
constructor(hostRef) {
|
|
@@ -12,23 +39,27 @@ const EzTextInput = class {
|
|
|
12
39
|
this.enabled = true;
|
|
13
40
|
this.errorMessage = undefined;
|
|
14
41
|
this.mask = undefined;
|
|
42
|
+
this.cleanValueMask = false;
|
|
15
43
|
this.canShowError = true;
|
|
16
44
|
this.restrict = undefined;
|
|
17
45
|
this.mode = "regular";
|
|
18
46
|
this.noBorder = false;
|
|
19
47
|
this.password = false;
|
|
48
|
+
this.autoFocus = false;
|
|
49
|
+
this.noMargin = false;
|
|
50
|
+
this.hasRightSlotContent = false;
|
|
20
51
|
}
|
|
21
52
|
observeErrorMessage() {
|
|
22
53
|
if (this._inputElem) {
|
|
23
54
|
this.isInvalid().then((hasError) => {
|
|
24
|
-
var _a
|
|
55
|
+
var _a;
|
|
25
56
|
if (hasError) {
|
|
26
57
|
this._inputElem.classList.add("hasError");
|
|
27
|
-
(_a = this.
|
|
58
|
+
(_a = this._tooltipPositioningObserver) === null || _a === void 0 ? void 0 : _a.observe(this._inputElem);
|
|
28
59
|
}
|
|
29
60
|
else {
|
|
30
61
|
this._inputElem.classList.remove("hasError");
|
|
31
|
-
|
|
62
|
+
this.removeGlobalTooltip();
|
|
32
63
|
}
|
|
33
64
|
});
|
|
34
65
|
}
|
|
@@ -126,7 +157,12 @@ const EzTextInput = class {
|
|
|
126
157
|
const value = this._inputElem.value;
|
|
127
158
|
if (value && this._maskFormatter) {
|
|
128
159
|
try {
|
|
129
|
-
|
|
160
|
+
if (this.cleanValueMask) {
|
|
161
|
+
this.applyMask(value);
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
this._inputElem.value = this._maskFormatter.format(value);
|
|
165
|
+
}
|
|
130
166
|
}
|
|
131
167
|
catch (e) {
|
|
132
168
|
this.errorMessage = e.message;
|
|
@@ -144,8 +180,34 @@ const EzTextInput = class {
|
|
|
144
180
|
}
|
|
145
181
|
controlChangeValue() {
|
|
146
182
|
if (this._inputElem && (this.value || '') !== this._inputElem.value) {
|
|
147
|
-
this.
|
|
183
|
+
if (this.cleanValueMask) {
|
|
184
|
+
this.value = this._maskFormatter.removeMask(this._inputElem.value);
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
this.value = this._inputElem.value;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
applyMask(value) {
|
|
192
|
+
if (!value || value === "")
|
|
193
|
+
return value;
|
|
194
|
+
if (this._maskFormatter) {
|
|
195
|
+
try {
|
|
196
|
+
const formattedValue = this._maskFormatter.applyMask(this._maskFormatter.removeMask(value));
|
|
197
|
+
if (this._inputElem) {
|
|
198
|
+
this._inputElem.value = formattedValue;
|
|
199
|
+
return this._inputElem.value;
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
this.value = formattedValue;
|
|
203
|
+
return this.value;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
catch (e) {
|
|
207
|
+
this.errorMessage = e.message;
|
|
208
|
+
}
|
|
148
209
|
}
|
|
210
|
+
return value;
|
|
149
211
|
}
|
|
150
212
|
handleChange() {
|
|
151
213
|
if (!this._inputElem) {
|
|
@@ -161,8 +223,10 @@ const EzTextInput = class {
|
|
|
161
223
|
this.controlChangeValue();
|
|
162
224
|
}
|
|
163
225
|
handleSlotChange(ev) {
|
|
226
|
+
var _a;
|
|
164
227
|
const slot = ev.target;
|
|
165
228
|
const content = slot.assignedElements()[0];
|
|
229
|
+
this.hasRightSlotContent = false;
|
|
166
230
|
if (content) {
|
|
167
231
|
content.style.position = "absolute";
|
|
168
232
|
content.style.display = "flex";
|
|
@@ -188,6 +252,10 @@ const EzTextInput = class {
|
|
|
188
252
|
if (this._labelElem) {
|
|
189
253
|
this._labelElem.classList.add("input__label--right");
|
|
190
254
|
}
|
|
255
|
+
if (this._tooltipIconElem) {
|
|
256
|
+
this._tooltipIconElem.classList.add("rightIconSlot");
|
|
257
|
+
}
|
|
258
|
+
this.hasRightSlotContent = ((_a = content.children) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
191
259
|
}
|
|
192
260
|
slot.name && ElementIDUtils.addIDInfo(content, slot.name);
|
|
193
261
|
}
|
|
@@ -199,21 +267,50 @@ const EzTextInput = class {
|
|
|
199
267
|
}
|
|
200
268
|
this.adjustColorContentSlot("var(--ez-text-input__input--focus--icon-color)");
|
|
201
269
|
}
|
|
270
|
+
renderGlobalTooltip() {
|
|
271
|
+
const tooltip = document.createElement('ez-tooltip');
|
|
272
|
+
tooltip.errorMessage = this.errorMessage;
|
|
273
|
+
tooltip.anchoringElement = this._tooltipIconElem;
|
|
274
|
+
document.body.appendChild(tooltip);
|
|
275
|
+
this._tooltipElem = tooltip;
|
|
276
|
+
}
|
|
277
|
+
removeGlobalTooltip() {
|
|
278
|
+
var _a;
|
|
279
|
+
if (!this._tooltipElem)
|
|
280
|
+
return;
|
|
281
|
+
this._tooltipElem.remove();
|
|
282
|
+
this._tooltipElem = undefined;
|
|
283
|
+
(_a = this._tooltipPositioningObserver) === null || _a === void 0 ? void 0 : _a.unobserve(this._inputElem);
|
|
284
|
+
}
|
|
285
|
+
createTooltipPositioningObserver() {
|
|
286
|
+
const observer = new ResizeObserver(() => {
|
|
287
|
+
if (!this._tooltipElem)
|
|
288
|
+
return;
|
|
289
|
+
if (!this._tooltipIconElem)
|
|
290
|
+
return;
|
|
291
|
+
clearTimeout(this._observerDebounceTimeout);
|
|
292
|
+
this._observerDebounceTimeout = setTimeout(async () => {
|
|
293
|
+
if (this._tooltipElem) {
|
|
294
|
+
await this._tooltipElem.positionTooltip();
|
|
295
|
+
}
|
|
296
|
+
}, 200);
|
|
297
|
+
});
|
|
298
|
+
this._tooltipPositioningObserver = observer;
|
|
299
|
+
}
|
|
202
300
|
//---------------------------------------------
|
|
203
301
|
// Lifecycle web component
|
|
204
302
|
//---------------------------------------------
|
|
205
|
-
componentDidLoad() {
|
|
206
|
-
this.observeErrorMessage();
|
|
207
|
-
this.observeMask();
|
|
208
|
-
this.adjustFloatingLabel();
|
|
209
|
-
this.adjustBorderInput();
|
|
210
|
-
}
|
|
211
303
|
componentWillLoad() {
|
|
212
304
|
this.observeMask();
|
|
213
305
|
if (this.value) {
|
|
214
306
|
if (this._maskFormatter) {
|
|
215
307
|
try {
|
|
216
|
-
|
|
308
|
+
if (this.cleanValueMask) {
|
|
309
|
+
this.applyMask(this.value);
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
this.value = this._maskFormatter.format(this.value);
|
|
313
|
+
}
|
|
217
314
|
}
|
|
218
315
|
catch (e) {
|
|
219
316
|
this.errorMessage = e.message;
|
|
@@ -225,12 +322,52 @@ const EzTextInput = class {
|
|
|
225
322
|
}
|
|
226
323
|
}
|
|
227
324
|
}
|
|
325
|
+
componentDidLoad() {
|
|
326
|
+
var _a, _b;
|
|
327
|
+
this.observeErrorMessage();
|
|
328
|
+
this.observeMask();
|
|
329
|
+
this.adjustFloatingLabel();
|
|
330
|
+
this.adjustBorderInput();
|
|
331
|
+
if (this.autoFocus) {
|
|
332
|
+
requestAnimationFrame(() => {
|
|
333
|
+
this.setFocus({ selectText: true });
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
(_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.addEventListener('focus', () => {
|
|
337
|
+
var _a;
|
|
338
|
+
this._inputElem.setSelectionRange(0, (_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.value.length);
|
|
339
|
+
});
|
|
340
|
+
this.createTooltipPositioningObserver();
|
|
341
|
+
if (this._inputElem) {
|
|
342
|
+
(_b = this._tooltipPositioningObserver) === null || _b === void 0 ? void 0 : _b.observe(this._inputElem);
|
|
343
|
+
applyEllipsisToInput(this._inputElem);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
componentDidRender() {
|
|
347
|
+
if (this._tooltipIconElem && !this._tooltipElem) {
|
|
348
|
+
this.renderGlobalTooltip();
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
componentDidUpdate() {
|
|
352
|
+
if (this._tooltipIconElem && this._tooltipElem) {
|
|
353
|
+
this._tooltipElem.positionTooltip();
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
disconnectedCallback() {
|
|
357
|
+
if (this._tooltipPositioningObserver) {
|
|
358
|
+
this._tooltipPositioningObserver.disconnect();
|
|
359
|
+
}
|
|
360
|
+
if (this._observerDebounceTimeout) {
|
|
361
|
+
clearTimeout(this._observerDebounceTimeout);
|
|
362
|
+
}
|
|
363
|
+
this.removeGlobalTooltip();
|
|
364
|
+
}
|
|
228
365
|
render() {
|
|
229
366
|
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
230
367
|
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.enabled ? "input__label" : "input__label input__label--disabled"
|
|
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("
|
|
368
|
+
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)
|
|
369
|
+
: 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 &&
|
|
370
|
+
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
371
|
}
|
|
235
372
|
get _hostElement() { return getElement(this); }
|
|
236
373
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
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
3
|
import { C as CSSVarsUtils } from './CSSVarsUtils-71ce76be.js';
|
|
4
4
|
|
|
@@ -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.noMargin = false;
|
|
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, noMargin: this.noMargin }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
153
160
|
}
|
|
154
161
|
static get assetsDirs() { return ["../assets"]; }
|
|
155
162
|
get _elem() { return getElement(this); }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, f as forceUpdate, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, f as forceUpdate, h, H as Host, g as getElement } from './index-baa5e267.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezToastCss = ":host{--ez-toast__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--ez-toast__container--z-index:var(--elevation--100, 100);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__container--left:var(--space--large, 24px);--ez-toast__container--bottom:var(--space--large, 24px);--ez-toast__container--width:400px;--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;box-sizing:border-box;border-radius:6px;align-items:center;padding:12px;visibility:hidden;width:var(--ez-toast__container--width);left:var(--ez-toast__container--left);bottom:var(--ez-toast__container--bottom);z-index:var(--ez-toast__container--z-index);background-color:var(--ez-toast__container--background-color)}.message__container{text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:4;display:-webkit-box;text-overflow:ellipsis;font-family:var(--font-pattern, \"Roboto\")}.message__container--icon{width:80%;padding-left:var(--ez-toast__icon--padding-left)}.btn-close{margin-top:3px;display:flex;justify-content:flex-end;align-self:flex-start;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--ez-toast__btn__close__image);mask-image:var(--ez-toast__btn__close__image)}.toast__container--opened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@-webkit-keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}@keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-baa5e267.js';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
|
|
4
|
+
const ezTooltipCss = ":host{position:absolute;z-index:var(--elevation--24);background:var(--color-alert--error-800, #BD0025);padding:var(--space--extra-small, 3px) var(--space--small, 6px);color:var(--color--inverted);border-radius:var(--border--radius-small);display:none;transform:translateX(calc(-50% + 12px)) translateY(8px)}.tooltip::after{--triangle-size:8px;content:'';right:50%;border:var(--triangle-size) solid transparent;border-bottom-color:var(--color-alert--error-800, #BD0025);position:absolute;transform:translateX(calc(50%)) translateY(-100%)}";
|
|
5
|
+
|
|
6
|
+
const EzTooltip = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.errorMessage = undefined;
|
|
10
|
+
this.anchoringElement = undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* TODO: Implementar a possibilidade de definir a posição do tooltip.
|
|
14
|
+
*/
|
|
15
|
+
// @Prop() tooltipSide: 'left' | 'right' | 'top' | 'bottom' = 'bottom';
|
|
16
|
+
/**
|
|
17
|
+
* Reposiciona o tooltip de acordo com a posição do elemento de ancoragem.
|
|
18
|
+
*/
|
|
19
|
+
async positionTooltip() {
|
|
20
|
+
const anchorRect = this.anchoringElement.getBoundingClientRect();
|
|
21
|
+
const top = (anchorRect.bottom + window.scrollY);
|
|
22
|
+
const left = (anchorRect.left + window.scrollX);
|
|
23
|
+
this._element.style.top = `${top}px`;
|
|
24
|
+
this._element.style.left = `${left}px`;
|
|
25
|
+
}
|
|
26
|
+
setEvents() {
|
|
27
|
+
window.addEventListener('scroll', () => {
|
|
28
|
+
this.positionTooltip();
|
|
29
|
+
}, { capture: true });
|
|
30
|
+
window.addEventListener('resize', () => {
|
|
31
|
+
this.positionTooltip();
|
|
32
|
+
}, { capture: true });
|
|
33
|
+
this.anchoringElement.addEventListener('mouseover', () => {
|
|
34
|
+
this._element.style.display = 'block';
|
|
35
|
+
});
|
|
36
|
+
this.anchoringElement.addEventListener('mouseout', () => {
|
|
37
|
+
this._element.style.display = 'none';
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
componentDidLoad() {
|
|
41
|
+
this.positionTooltip();
|
|
42
|
+
this.setEvents();
|
|
43
|
+
}
|
|
44
|
+
render() {
|
|
45
|
+
return (h("div", { inert: true, class: "tooltip", role: "tooltip", "data-element-id": ElementIDUtils.getInternalIDInfo("tooltip") }, this.errorMessage));
|
|
46
|
+
}
|
|
47
|
+
get _element() { return getElement(this); }
|
|
48
|
+
};
|
|
49
|
+
EzTooltip.style = ezTooltipCss;
|
|
50
|
+
|
|
51
|
+
export { EzTooltip as ez_tooltip };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, r as registerInstance, c as createEvent, f as forceUpdate, H as Host, g as getElement } from './index-
|
|
1
|
+
import { h, r as registerInstance, c as createEvent, f as forceUpdate, H as Host, g as getElement } from './index-baa5e267.js';
|
|
2
2
|
import { ElementIDUtils, StringUtils, ObjectUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ICON_EXPANDED = "chevron-down";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, f as forceUpdate, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, f as forceUpdate, h, g as getElement } from './index-baa5e267.js';
|
|
2
2
|
import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
|
|
3
3
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
4
4
|
import './DialogType-54a62731.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement, H as Host } from './index-baa5e267.js';
|
|
2
2
|
import { JSUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezViewStackCss = ":host{width:100%;height:100%}.ez-view-stack__container{width:100%;height:100%}";
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* O dragElement é posicionado ANTERIORMENTE ao targetIndex.
|
|
3
|
+
* Ex: no array: ["A", "B", "C", "D", "E"]
|
|
4
|
+
* se o dragItem for "B" e o targetIndex 3 (referente à "D"),
|
|
5
|
+
* "B" será posicionado logo antes de "D".
|
|
6
|
+
* O resultado será: ["A", "C", "B", "D", "E"]
|
|
7
|
+
*
|
|
8
|
+
* @param configs
|
|
9
|
+
*/
|
|
10
|
+
function processListOnDrop(configs) {
|
|
11
|
+
let newList;
|
|
12
|
+
if (hasToMoveMultipleItems(configs)) {
|
|
13
|
+
newList = processMoveMultipleItems(configs);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
newList = processMoveSingleItem(configs);
|
|
17
|
+
configs.clearSelection();
|
|
18
|
+
}
|
|
19
|
+
return newList;
|
|
20
|
+
}
|
|
21
|
+
function hasToMoveMultipleItems(configs) {
|
|
22
|
+
const { enableMultipleSelection, listItems, dragItem, moveToFinal, targetIndex } = configs;
|
|
23
|
+
if (!enableMultipleSelection)
|
|
24
|
+
return false;
|
|
25
|
+
const selectedItemsIndexes = getSelectedIndices(listItems);
|
|
26
|
+
if (selectedItemsIndexes.length <= 1)
|
|
27
|
+
return false;
|
|
28
|
+
if (!selectedItemsIndexes.includes(dragItem.index))
|
|
29
|
+
return false;
|
|
30
|
+
if (!isContinuousSequence(selectedItemsIndexes))
|
|
31
|
+
return false;
|
|
32
|
+
if (moveToFinal)
|
|
33
|
+
return true;
|
|
34
|
+
return !selectedItemsIndexes.includes(targetIndex);
|
|
35
|
+
}
|
|
36
|
+
function processMoveSingleItem(configs) {
|
|
37
|
+
const { listItems, dragItem, targetIndex, moveToFinal } = configs;
|
|
38
|
+
const newList = [...listItems];
|
|
39
|
+
newList.splice(dragItem.index, 1);
|
|
40
|
+
if (moveToFinal) {
|
|
41
|
+
newList.push(dragItem.item);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
const adjustedIndex = (targetIndex > dragItem.index) ? Math.max(0, targetIndex - 1) : targetIndex;
|
|
45
|
+
newList.splice(adjustedIndex, 0, dragItem.item);
|
|
46
|
+
}
|
|
47
|
+
return newList;
|
|
48
|
+
}
|
|
49
|
+
function processMoveMultipleItems(configs) {
|
|
50
|
+
const { listItems, moveToFinal, targetIndex } = configs;
|
|
51
|
+
const selectedItems = listItems.filter(item => item.selected);
|
|
52
|
+
const selectedItemsIndexes = getSelectedIndices(listItems);
|
|
53
|
+
const minorIndex = Math.min(...selectedItemsIndexes);
|
|
54
|
+
const majorIndex = Math.max(...selectedItemsIndexes);
|
|
55
|
+
const qtdToMove = selectedItems.length;
|
|
56
|
+
const newList = [...listItems];
|
|
57
|
+
newList.splice(minorIndex, qtdToMove);
|
|
58
|
+
if (moveToFinal) {
|
|
59
|
+
newList.push(...selectedItems);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
let adjustedIndex = (targetIndex > majorIndex) ? Math.max(0, targetIndex - qtdToMove) : targetIndex;
|
|
63
|
+
newList.splice(adjustedIndex, 0, ...selectedItems);
|
|
64
|
+
}
|
|
65
|
+
return newList;
|
|
66
|
+
}
|
|
67
|
+
function isContinuousSequence(numbers) {
|
|
68
|
+
if (numbers.length === 0)
|
|
69
|
+
return false;
|
|
70
|
+
const sortedNumbers = [...numbers].sort((a, b) => a - b);
|
|
71
|
+
for (let i = 1; i < sortedNumbers.length; i++) {
|
|
72
|
+
if (sortedNumbers[i] !== sortedNumbers[i - 1] + 1) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
function getSelectedIndices(listItems) {
|
|
79
|
+
return listItems.reduce((indices, item, index) => {
|
|
80
|
+
if (item.selected) {
|
|
81
|
+
indices.push(index);
|
|
82
|
+
}
|
|
83
|
+
return indices;
|
|
84
|
+
}, []);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { isContinuousSequence as i, processListOnDrop as p };
|