@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-08202.0
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/README.md +78 -0
- package/dist/assets/actions-sprite.svg +257 -0
- package/dist/cjs/ApplicationUtils-2e444734.js +162 -0
- package/dist/cjs/CSSVarsUtils-b136a156.js +77 -0
- package/dist/cjs/CheckMode-ecb90b87.js +7 -0
- package/dist/cjs/DialogType-2114c337.js +9 -0
- package/dist/cjs/EzScrollDirection-b2c99895.js +8 -0
- package/dist/cjs/RecordValidationProcessor-edd23705.js +102 -0
- package/dist/cjs/constants-3a1d64fb.js +7 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +212 -0
- package/dist/cjs/ez-alert.cjs.entry.js +30 -0
- package/dist/cjs/ez-application.cjs.entry.js +26 -0
- package/dist/cjs/ez-badge.cjs.entry.js +120 -0
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +285 -0
- package/dist/cjs/ez-button.cjs.entry.js +87 -0
- package/dist/cjs/ez-calendar.cjs.entry.js +238 -0
- package/dist/cjs/ez-card-item.cjs.entry.js +52 -0
- package/dist/cjs/ez-check.cjs.entry.js +95 -0
- package/dist/cjs/ez-chip.cjs.entry.js +116 -0
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +133 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +690 -0
- package/dist/cjs/ez-date-input.cjs.entry.js +188 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js +242 -0
- package/dist/cjs/ez-dialog.cjs.entry.js +180 -0
- package/dist/cjs/ez-dropdown.cjs.entry.js +515 -0
- package/dist/cjs/ez-file-item.cjs.entry.js +74 -0
- package/dist/cjs/ez-filter-input_2.cjs.entry.js +137 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +191 -0
- package/dist/cjs/ez-form.cjs.entry.js +933 -0
- package/dist/cjs/ez-grid.cjs.entry.js +120838 -0
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +96 -0
- package/dist/cjs/ez-icon.cjs.entry.js +44 -0
- package/dist/cjs/ez-list.cjs.entry.js +558 -0
- package/dist/cjs/ez-loading-bar.cjs.entry.js +32 -0
- package/dist/cjs/ez-modal-container.cjs.entry.js +64 -0
- package/dist/cjs/ez-modal.cjs.entry.js +72 -0
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +183 -0
- package/dist/cjs/ez-number-input.cjs.entry.js +181 -0
- package/dist/cjs/ez-popover.cjs.entry.js +156 -0
- package/dist/cjs/ez-popup.cjs.entry.js +66 -0
- package/dist/cjs/ez-radio-button.cjs.entry.js +48 -0
- package/dist/cjs/ez-scroller_3.cjs.entry.js +792 -0
- package/dist/cjs/ez-search.cjs.entry.js +96 -0
- package/dist/cjs/ez-skeleton.cjs.entry.js +67 -0
- package/dist/cjs/ez-tabselector.cjs.entry.js +228 -0
- package/dist/cjs/ez-text-area.cjs.entry.js +179 -0
- package/dist/cjs/ez-text-edit.cjs.entry.js +107 -0
- package/dist/cjs/ez-text-input.cjs.entry.js +247 -0
- package/dist/cjs/ez-time-input.cjs.entry.js +168 -0
- package/dist/cjs/ez-toast.cjs.entry.js +101 -0
- package/dist/cjs/ez-upload.cjs.entry.js +395 -0
- package/dist/cjs/ez-view-stack.cjs.entry.js +86 -0
- package/dist/cjs/ezui.cjs.js +23 -0
- package/dist/cjs/filter-column.cjs.entry.js +151 -0
- package/dist/cjs/index-1064511f.js +2340 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +22 -0
- package/dist/collection/collection-manifest.json +184 -0
- package/dist/collection/components/assets/actions-sprite.svg +257 -0
- package/dist/collection/components/ez-actions-button/ez-actions-button.css +139 -0
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +440 -0
- package/dist/collection/components/ez-alert/ez-alert.css +76 -0
- package/dist/collection/components/ez-alert/ez-alert.js +53 -0
- package/dist/collection/components/ez-application/ez-application.css +3 -0
- package/dist/collection/components/ez-application/ez-application.js +41 -0
- package/dist/collection/components/ez-badge/enum/sizes.js +9 -0
- package/dist/collection/components/ez-badge/ez-badge.css +165 -0
- package/dist/collection/components/ez-badge/ez-badge.js +211 -0
- package/dist/collection/components/ez-badge/interfaces/IPosition.js +1 -0
- package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.css +66 -0
- package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.js +373 -0
- package/dist/collection/components/ez-breadcrumb/subcomponents/breadcrumb-item.js +20 -0
- package/dist/collection/components/ez-button/ez-button.css +255 -0
- package/dist/collection/components/ez-button/ez-button.js +241 -0
- package/dist/collection/components/ez-calendar/ez-calendar.css +318 -0
- package/dist/collection/components/ez-calendar/ez-calendar.js +439 -0
- package/dist/collection/components/ez-card-item/ez-card-item.css +126 -0
- package/dist/collection/components/ez-card-item/ez-card-item.js +97 -0
- package/dist/collection/components/ez-check/CheckMode.js +5 -0
- package/dist/collection/components/ez-check/ez-check.css +366 -0
- package/dist/collection/components/ez-check/ez-check.js +272 -0
- package/dist/collection/components/ez-chip/ez-chip.css +163 -0
- package/dist/collection/components/ez-chip/ez-chip.js +312 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +254 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +442 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +334 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +1125 -0
- package/dist/collection/components/ez-date-input/ez-date-input.css +49 -0
- package/dist/collection/components/ez-date-input/ez-date-input.js +432 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +44 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +504 -0
- package/dist/collection/components/ez-dialog/DialogType.js +7 -0
- package/dist/collection/components/ez-dialog/ez-dialog.css +544 -0
- package/dist/collection/components/ez-dialog/ez-dialog.js +401 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.css +349 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.js +356 -0
- package/dist/collection/components/ez-dropdown/structure/DropdownItem.js +30 -0
- package/dist/collection/components/ez-dropdown/structure/SubmenuControl.js +241 -0
- package/dist/collection/components/ez-file-item/ez-file-item.css +125 -0
- package/dist/collection/components/ez-file-item/ez-file-item.js +200 -0
- package/dist/collection/components/ez-filter-input/ez-filter-input.css +4 -0
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +407 -0
- package/dist/collection/components/ez-form/ez-form.css +10 -0
- package/dist/collection/components/ez-form/ez-form.js +237 -0
- package/dist/collection/components/ez-form/store/form.slice.js +42 -0
- package/dist/collection/components/ez-form-view/ez-form-view.css +6 -0
- package/dist/collection/components/ez-form-view/ez-form-view.js +154 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +30 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +11 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +13 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +10 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +11 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +12 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +4 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +4 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +4 -0
- package/dist/collection/components/ez-form-view/interfaces/IFormViewField.js +1 -0
- package/dist/collection/components/ez-form-view/interfaces/index.js +1 -0
- package/dist/collection/components/ez-form-view/structure/index.js +29 -0
- package/dist/collection/components/ez-grid/controller/EzGridController.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +791 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridUtils.js +8 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +101 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +230 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +88 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRendererStatus.js +43 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/selectionHeader.js +40 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +49 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.js +10 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.js +4 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellEditor.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +38 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +40 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +20 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +15 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +41 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +75 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js +69 -0
- package/dist/collection/components/ez-grid/ez-grid.css +97 -0
- package/dist/collection/components/ez-grid/ez-grid.js +833 -0
- package/dist/collection/components/ez-grid/interfaces/ISelection.js +1 -0
- package/dist/collection/components/ez-grid/interfaces/ISelectionToastConfig.js +1 -0
- package/dist/collection/components/ez-grid/interfaces/index.js +2 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.css +34 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +377 -0
- package/dist/collection/components/ez-grid/subcomponents/selection-counter.js +29 -0
- package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js +78 -0
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.css +66 -0
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js +385 -0
- package/dist/collection/components/ez-guide-navigator/interfaces/IGuideItem.js +1 -0
- package/dist/collection/components/ez-guide-navigator/interfaces/index.js +1 -0
- package/dist/collection/components/ez-icon/ez-icon.css +223 -0
- package/dist/collection/components/ez-icon/ez-icon.js +101 -0
- package/dist/collection/components/ez-list/ez-list.css +434 -0
- package/dist/collection/components/ez-list/ez-list.js +911 -0
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.css +85 -0
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.js +74 -0
- package/dist/collection/components/ez-modal/ez-modal.css +369 -0
- package/dist/collection/components/ez-modal/ez-modal.js +239 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.css +55 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +191 -0
- package/dist/collection/components/ez-modal-container/index.js +2 -0
- package/dist/collection/components/ez-modal-container/modal-action.js +8 -0
- package/dist/collection/components/ez-modal-container/modal-button-status.js +7 -0
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +36 -0
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +338 -0
- package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.js +1 -0
- package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionOption.js +1 -0
- package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.css +18 -0
- package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.js +41 -0
- package/dist/collection/components/ez-number-input/ez-number-input.css +8 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js +457 -0
- package/dist/collection/components/ez-popover/ez-popover.css +42 -0
- package/dist/collection/components/ez-popover/ez-popover.js +365 -0
- package/dist/collection/components/ez-popup/ez-popup.css +418 -0
- package/dist/collection/components/ez-popup/ez-popup.js +180 -0
- package/dist/collection/components/ez-radio-button/ez-radio-button.css +217 -0
- package/dist/collection/components/ez-radio-button/ez-radio-button.js +163 -0
- package/dist/collection/components/ez-scroller/EzScrollDirection.js +6 -0
- package/dist/collection/components/ez-scroller/ez-scroller.css +192 -0
- package/dist/collection/components/ez-scroller/ez-scroller.js +293 -0
- package/dist/collection/components/ez-search/ez-search.css +3 -0
- package/dist/collection/components/ez-search/ez-search.js +462 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +63 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +47 -0
- package/dist/collection/components/ez-skeleton/ez-skeleton.constants.js +1 -0
- package/dist/collection/components/ez-skeleton/ez-skeleton.css +94 -0
- package/dist/collection/components/ez-skeleton/ez-skeleton.js +211 -0
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +149 -0
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +321 -0
- package/dist/collection/components/ez-text-area/ez-text-area.css +242 -0
- package/dist/collection/components/ez-text-area/ez-text-area.js +428 -0
- package/dist/collection/components/ez-text-edit/ez-text-edit.css +19 -0
- package/dist/collection/components/ez-text-edit/ez-text-edit.js +202 -0
- package/dist/collection/components/ez-text-input/ez-text-input.css +301 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js +491 -0
- package/dist/collection/components/ez-time-input/ez-time-input.css +14 -0
- package/dist/collection/components/ez-time-input/ez-time-input.js +412 -0
- package/dist/collection/components/ez-toast/ez-toast.css +167 -0
- package/dist/collection/components/ez-toast/ez-toast.js +209 -0
- package/dist/collection/components/ez-tree/ez-tree.css +159 -0
- package/dist/collection/components/ez-tree/ez-tree.js +696 -0
- package/dist/collection/components/ez-tree/interfaces/ITree.js +1 -0
- package/dist/collection/components/ez-tree/interfaces/ITreeItem.js +1 -0
- package/dist/collection/components/ez-tree/subcomponents/DefaultIconResolver.js +8 -0
- package/dist/collection/components/ez-tree/subcomponents/DefaultTooltipResolver.js +3 -0
- package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +24 -0
- package/dist/collection/components/ez-tree/subcomponents/index.js +2 -0
- package/dist/collection/components/ez-tree/types/Node.js +110 -0
- package/dist/collection/components/ez-tree/types/Tree.js +132 -0
- package/dist/collection/components/ez-upload/RemoteFile.js +94 -0
- package/dist/collection/components/ez-upload/ez-upload.css +582 -0
- package/dist/collection/components/ez-upload/ez-upload.js +587 -0
- package/dist/collection/components/ez-view-stack/ez-view-stack.css +9 -0
- package/dist/collection/components/ez-view-stack/ez-view-stack.js +126 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/servidor.js +101 -0
- package/dist/collection/setupTests.js +1 -0
- package/dist/collection/utils/ApplicationUtils.js +94 -0
- package/dist/collection/utils/AssetsUtils.js +19 -0
- package/dist/collection/utils/CSSVarsUtils.js +73 -0
- package/dist/collection/utils/constants.js +3 -0
- package/dist/collection/utils/form/DataBinder.js +287 -0
- package/dist/collection/utils/form/FormMetadata.js +176 -0
- package/dist/collection/utils/form/index.js +2 -0
- package/dist/collection/utils/form/interfaces/IDefaultConfig.js +1 -0
- package/dist/collection/utils/form/interfaces/IFormCardConfig.js +1 -0
- package/dist/collection/utils/form/interfaces/IFormConfig.js +1 -0
- package/dist/collection/utils/form/interfaces/IFormSheetMetadata.js +1 -0
- package/dist/collection/utils/form/interfaces/ISummaryField.js +1 -0
- package/dist/collection/utils/form/interfaces/ITabConfig.js +1 -0
- package/dist/collection/utils/form/interfaces/index.js +1 -0
- package/dist/collection/utils/index.js +6 -0
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +21 -0
- package/dist/collection/utils/interfaces/IFieldConfig.js +1 -0
- package/dist/collection/utils/mock/ez-upload-mock.js +30 -0
- package/dist/collection/utils/utils.js +6 -0
- package/dist/collection/utils/validators/recordvalidator/IInvalidField.js +1 -0
- package/dist/collection/utils/validators/recordvalidator/IRecordValidator.js +1 -0
- package/dist/collection/utils/validators/recordvalidator/IValidationResult.js +1 -0
- package/dist/collection/utils/validators/recordvalidator/IValidationSource.js +1 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +74 -0
- package/dist/custom-elements/index.d.ts +321 -0
- package/dist/custom-elements/index.js +129655 -0
- package/dist/esm/ApplicationUtils-d9a34a16.js +160 -0
- package/dist/esm/CSSVarsUtils-a97cfa29.js +75 -0
- package/dist/esm/CheckMode-bdb2ec19.js +7 -0
- package/dist/esm/DialogType-54a62731.js +9 -0
- package/dist/esm/EzScrollDirection-2df26c93.js +8 -0
- package/dist/esm/RecordValidationProcessor-abc814af.js +99 -0
- package/dist/esm/constants-6dab64f7.js +4 -0
- package/dist/esm/ez-actions-button.entry.js +208 -0
- package/dist/esm/ez-alert.entry.js +26 -0
- package/dist/esm/ez-application.entry.js +22 -0
- package/dist/esm/ez-badge.entry.js +116 -0
- package/dist/esm/ez-breadcrumb.entry.js +281 -0
- package/dist/esm/ez-button.entry.js +83 -0
- package/dist/esm/ez-calendar.entry.js +234 -0
- package/dist/esm/ez-card-item.entry.js +48 -0
- package/dist/esm/ez-check.entry.js +91 -0
- package/dist/esm/ez-chip.entry.js +112 -0
- package/dist/esm/ez-collapsible-box.entry.js +129 -0
- package/dist/esm/ez-combo-box.entry.js +686 -0
- package/dist/esm/ez-date-input.entry.js +184 -0
- package/dist/esm/ez-date-time-input.entry.js +238 -0
- package/dist/esm/ez-dialog.entry.js +176 -0
- package/dist/esm/ez-dropdown.entry.js +511 -0
- package/dist/esm/ez-file-item.entry.js +70 -0
- package/dist/esm/ez-filter-input_2.entry.js +132 -0
- package/dist/esm/ez-form-view.entry.js +187 -0
- package/dist/esm/ez-form.entry.js +929 -0
- package/dist/esm/ez-grid.entry.js +120834 -0
- package/dist/esm/ez-guide-navigator.entry.js +92 -0
- package/dist/esm/ez-icon.entry.js +40 -0
- package/dist/esm/ez-list.entry.js +554 -0
- package/dist/esm/ez-loading-bar.entry.js +28 -0
- package/dist/esm/ez-modal-container.entry.js +60 -0
- package/dist/esm/ez-modal.entry.js +68 -0
- package/dist/esm/ez-multi-selection-list.entry.js +179 -0
- package/dist/esm/ez-number-input.entry.js +177 -0
- package/dist/esm/ez-popover.entry.js +152 -0
- package/dist/esm/ez-popup.entry.js +62 -0
- package/dist/esm/ez-radio-button.entry.js +44 -0
- package/dist/esm/ez-scroller_3.entry.js +786 -0
- package/dist/esm/ez-search.entry.js +92 -0
- package/dist/esm/ez-skeleton.entry.js +63 -0
- package/dist/esm/ez-tabselector.entry.js +224 -0
- package/dist/esm/ez-text-area.entry.js +175 -0
- package/dist/esm/ez-text-edit.entry.js +103 -0
- package/dist/esm/ez-text-input.entry.js +243 -0
- package/dist/esm/ez-time-input.entry.js +164 -0
- package/dist/esm/ez-toast.entry.js +97 -0
- package/dist/esm/ez-upload.entry.js +391 -0
- package/dist/esm/ez-view-stack.entry.js +82 -0
- package/dist/esm/ezui.js +18 -0
- package/dist/esm/filter-column.entry.js +147 -0
- package/dist/esm/index-296b8458.js +2309 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +18 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/ezui/ezui.esm.js +1 -0
- package/dist/ezui/index.esm.js +0 -0
- package/dist/ezui/p-028f264f.entry.js +1 -0
- package/dist/ezui/p-050247dc.entry.js +1 -0
- package/dist/ezui/p-061f4d73.entry.js +1 -0
- package/dist/ezui/p-1e7c4986.entry.js +1 -0
- package/dist/ezui/p-244dfe8a.entry.js +1 -0
- package/dist/ezui/p-25562cf8.entry.js +1 -0
- package/dist/ezui/p-27a01a26.js +1 -0
- package/dist/ezui/p-2da09f70.entry.js +1 -0
- package/dist/ezui/p-32b4163f.entry.js +1 -0
- package/dist/ezui/p-37673563.entry.js +1 -0
- package/dist/ezui/p-391de0e4.entry.js +1 -0
- package/dist/ezui/p-5ce6548c.entry.js +1 -0
- package/dist/ezui/p-5cef0264.entry.js +1 -0
- package/dist/ezui/p-5d6f2550.entry.js +1 -0
- package/dist/ezui/p-5e55a42b.entry.js +1 -0
- package/dist/ezui/p-60ba28ea.entry.js +1 -0
- package/dist/ezui/p-68352e41.entry.js +1 -0
- package/dist/ezui/p-6ab2f7c2.entry.js +1 -0
- package/dist/ezui/p-7525e604.entry.js +1 -0
- package/dist/ezui/p-7526f2b6.entry.js +1 -0
- package/dist/ezui/p-7eb3e1a5.js +1 -0
- package/dist/ezui/p-83885b21.entry.js +1 -0
- package/dist/ezui/p-86a2036d.js +1 -0
- package/dist/ezui/p-87e85160.entry.js +1 -0
- package/dist/ezui/p-8bd3903b.entry.js +1 -0
- package/dist/ezui/p-8fdff9cd.entry.js +1 -0
- package/dist/ezui/p-9285b53e.entry.js +1 -0
- package/dist/ezui/p-95426f93.entry.js +1 -0
- package/dist/ezui/p-964e5571.entry.js +304 -0
- package/dist/ezui/p-98bb8b16.js +1 -0
- package/dist/ezui/p-9b347f04.entry.js +1 -0
- package/dist/ezui/p-a01068e1.entry.js +1 -0
- package/dist/ezui/p-a510a4c5.entry.js +1 -0
- package/dist/ezui/p-a5e09759.entry.js +1 -0
- package/dist/ezui/p-ab574d59.js +1 -0
- package/dist/ezui/p-b11f035c.entry.js +1 -0
- package/dist/ezui/p-b853763b.js +1 -0
- package/dist/ezui/p-c49dbf23.entry.js +1 -0
- package/dist/ezui/p-ccb4ccd9.entry.js +1 -0
- package/dist/ezui/p-cd19a6f8.entry.js +1 -0
- package/dist/ezui/p-ce035beb.entry.js +1 -0
- package/dist/ezui/p-d43b22f3.entry.js +1 -0
- package/dist/ezui/p-d51aa09b.entry.js +1 -0
- package/dist/ezui/p-db528b31.entry.js +1 -0
- package/dist/ezui/p-e2dfd935.entry.js +1 -0
- package/dist/ezui/p-e318d280.js +2 -0
- package/dist/ezui/p-e67d0bd5.entry.js +1 -0
- package/dist/ezui/p-e7fa0ad6.entry.js +1 -0
- package/dist/ezui/p-f15ec3bb.js +1 -0
- package/dist/ezui/p-f4208819.entry.js +1 -0
- package/dist/ezui/p-fa571a4e.entry.js +1 -0
- package/dist/ezui/p-ff82b176.entry.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +82 -0
- package/dist/types/components/ez-alert/ez-alert.d.ts +10 -0
- package/dist/types/components/ez-application/ez-application.d.ts +10 -0
- package/dist/types/components/ez-badge/enum/sizes.d.ts +8 -0
- package/dist/types/components/ez-badge/ez-badge.d.ts +35 -0
- package/dist/types/components/ez-badge/interfaces/IPosition.d.ts +4 -0
- package/dist/types/components/ez-breadcrumb/ez-breadcrumb.d.ts +71 -0
- package/dist/types/components/ez-breadcrumb/subcomponents/breadcrumb-item.d.ts +13 -0
- package/dist/types/components/ez-button/ez-button.d.ts +41 -0
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +74 -0
- package/dist/types/components/ez-card-item/ez-card-item.d.ts +32 -0
- package/dist/types/components/ez-check/CheckMode.d.ts +4 -0
- package/dist/types/components/ez-check/ez-check.d.ts +49 -0
- package/dist/types/components/ez-chip/ez-chip.d.ts +60 -0
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +91 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +182 -0
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +72 -0
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +80 -0
- package/dist/types/components/ez-dialog/DialogType.d.ts +6 -0
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +82 -0
- package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +60 -0
- package/dist/types/components/ez-dropdown/structure/DropdownItem.d.ts +28 -0
- package/dist/types/components/ez-dropdown/structure/SubmenuControl.d.ts +78 -0
- package/dist/types/components/ez-file-item/ez-file-item.d.ts +36 -0
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +77 -0
- package/dist/types/components/ez-form/ez-form.d.ts +47 -0
- package/dist/types/components/ez-form/store/form.slice.d.ts +27 -0
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +22 -0
- package/dist/types/components/ez-form-view/fieldbuilder/FieldBuilder.d.ts +2 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.d.ts +3 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.d.ts +2 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +4 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.d.ts +2 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.d.ts +3 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +2 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.d.ts +2 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +2 -0
- package/dist/types/components/ez-form-view/interfaces/IFormViewField.d.ts +3 -0
- package/dist/types/components/ez-form-view/interfaces/index.d.ts +1 -0
- package/dist/types/components/ez-form-view/structure/index.d.ts +14 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +287 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +89 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridUtils.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +20 -0
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +38 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +32 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +11 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +12 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +10 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.d.ts +9 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +10 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.d.ts +5 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.d.ts +3 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +8 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +139 -0
- package/dist/types/components/ez-grid/interfaces/ISelection.d.ts +3 -0
- package/dist/types/components/ez-grid/interfaces/ISelectionToastConfig.d.ts +3 -0
- package/dist/types/components/ez-grid/interfaces/index.d.ts +2 -0
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +57 -0
- package/dist/types/components/ez-grid/subcomponents/selection-counter.d.ts +15 -0
- package/dist/types/components/ez-grid/utils/InMemoryFilterColumnDataSource.d.ts +16 -0
- package/dist/types/components/ez-guide-navigator/ez-guide-navigator.d.ts +64 -0
- package/dist/types/components/ez-guide-navigator/interfaces/IGuideItem.d.ts +4 -0
- package/dist/types/components/ez-guide-navigator/interfaces/index.d.ts +1 -0
- package/dist/types/components/ez-icon/ez-icon.d.ts +20 -0
- package/dist/types/components/ez-list/ez-list.d.ts +133 -0
- package/dist/types/components/ez-loading-bar/ez-loading-bar.d.ts +12 -0
- package/dist/types/components/ez-modal/ez-modal.d.ts +53 -0
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +47 -0
- package/dist/types/components/ez-modal-container/index.d.ts +2 -0
- package/dist/types/components/ez-modal-container/modal-action.d.ts +7 -0
- package/dist/types/components/ez-modal-container/modal-button-status.d.ts +6 -0
- package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +68 -0
- package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.d.ts +4 -0
- package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionOption.d.ts +4 -0
- package/dist/types/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.d.ts +4 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +81 -0
- package/dist/types/components/ez-popover/ez-popover.d.ts +60 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +37 -0
- package/dist/types/components/ez-radio-button/ez-radio-button.d.ts +37 -0
- package/dist/types/components/ez-scroller/EzScrollDirection.d.ts +5 -0
- package/dist/types/components/ez-scroller/ez-scroller.d.ts +38 -0
- package/dist/types/components/ez-search/ez-search.d.ts +84 -0
- package/dist/types/components/ez-sidebar-button/ez-sidebar-button.d.ts +11 -0
- package/dist/types/components/ez-skeleton/ez-skeleton.constants.d.ts +1 -0
- package/dist/types/components/ez-skeleton/ez-skeleton.d.ts +54 -0
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +52 -0
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +78 -0
- package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +41 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +82 -0
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +74 -0
- package/dist/types/components/ez-toast/ez-toast.d.ts +45 -0
- package/dist/types/components/ez-tree/ez-tree.d.ts +101 -0
- package/dist/types/components/ez-tree/interfaces/ITree.d.ts +5 -0
- package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +11 -0
- package/dist/types/components/ez-tree/subcomponents/DefaultIconResolver.d.ts +2 -0
- package/dist/types/components/ez-tree/subcomponents/DefaultTooltipResolver.d.ts +2 -0
- package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +15 -0
- package/dist/types/components/ez-tree/subcomponents/index.d.ts +2 -0
- package/dist/types/components/ez-tree/types/Node.d.ts +22 -0
- package/dist/types/components/ez-tree/types/Tree.d.ts +21 -0
- package/dist/types/components/ez-upload/RemoteFile.d.ts +14 -0
- package/dist/types/components/ez-upload/ez-upload.d.ts +101 -0
- package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +25 -0
- package/dist/types/components.d.ts +3464 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1637 -0
- package/dist/types/utils/ApplicationUtils.d.ts +31 -0
- package/dist/types/utils/AssetsUtils.d.ts +1 -0
- package/dist/types/utils/CSSVarsUtils.d.ts +6 -0
- package/dist/types/utils/constants.d.ts +3 -0
- package/dist/types/utils/form/DataBinder.d.ts +30 -0
- package/dist/types/utils/form/FormMetadata.d.ts +23 -0
- package/dist/types/utils/form/index.d.ts +2 -0
- package/dist/types/utils/form/interfaces/IDefaultConfig.d.ts +5 -0
- package/dist/types/utils/form/interfaces/IFormCardConfig.d.ts +5 -0
- package/dist/types/utils/form/interfaces/IFormConfig.d.ts +13 -0
- package/dist/types/utils/form/interfaces/IFormSheetMetadata.d.ts +6 -0
- package/dist/types/utils/form/interfaces/ISummaryField.d.ts +4 -0
- package/dist/types/utils/form/interfaces/ITabConfig.d.ts +6 -0
- package/dist/types/utils/form/interfaces/index.d.ts +10 -0
- package/dist/types/utils/index.d.ts +6 -0
- package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +17 -0
- package/dist/types/utils/interfaces/IFieldConfig.d.ts +13 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/dist/types/utils/validators/recordvalidator/IInvalidField.d.ts +4 -0
- package/dist/types/utils/validators/recordvalidator/IRecordValidator.d.ts +5 -0
- package/dist/types/utils/validators/recordvalidator/IValidationResult.d.ts +8 -0
- package/dist/types/utils/validators/recordvalidator/IValidationSource.d.ts +6 -0
- package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +13 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +93 -0
- package/react/.keepfolder +0 -0
- package/react/components.d.ts +48 -0
- package/react/components.js +52 -0
- package/react/components.js.map +1 -0
- package/react/react-component-lib/createComponent.d.ts +10 -0
- package/react/react-component-lib/createComponent.js +59 -0
- package/react/react-component-lib/createComponent.js.map +1 -0
- package/react/react-component-lib/createOverlayComponent.d.ts +20 -0
- package/react/react-component-lib/createOverlayComponent.js +89 -0
- package/react/react-component-lib/createOverlayComponent.js.map +1 -0
- package/react/react-component-lib/index.d.ts +2 -0
- package/react/react-component-lib/index.js +3 -0
- package/react/react-component-lib/index.js.map +1 -0
- package/react/react-component-lib/interfaces.d.ts +29 -0
- package/react/react-component-lib/interfaces.js +1 -0
- package/react/react-component-lib/interfaces.js.map +1 -0
- package/react/react-component-lib/utils/attachProps.d.ts +12 -0
- package/react/react-component-lib/utils/attachProps.js +96 -0
- package/react/react-component-lib/utils/attachProps.js.map +1 -0
- package/react/react-component-lib/utils/case.d.ts +2 -0
- package/react/react-component-lib/utils/case.js +7 -0
- package/react/react-component-lib/utils/case.js.map +1 -0
- package/react/react-component-lib/utils/dev.d.ts +2 -0
- package/react/react-component-lib/utils/dev.js +13 -0
- package/react/react-component-lib/utils/dev.js.map +1 -0
- package/react/react-component-lib/utils/index.d.ts +7 -0
- package/react/react-component-lib/utils/index.js +21 -0
- package/react/react-component-lib/utils/index.js.map +1 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-296b8458.js';
|
|
2
|
+
import { MaskFormatter, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
|
|
4
|
+
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--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__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--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(--ez-text-input__input--focus--border-color);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--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)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}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--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:read-only{cursor:default}.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(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--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--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)}.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--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.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{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)}.input--slim:-moz-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--color)}.input--slim::-moz-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--color)}.input--slim:-ms-input-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--color)}.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--color)}.input--slim:disabled::-webkit-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-ms-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.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)}";
|
|
5
|
+
|
|
6
|
+
const EzTextInput = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.ezChange = createEvent(this, "ezChange", 7);
|
|
10
|
+
this.label = undefined;
|
|
11
|
+
this.value = undefined;
|
|
12
|
+
this.enabled = true;
|
|
13
|
+
this.errorMessage = undefined;
|
|
14
|
+
this.mask = undefined;
|
|
15
|
+
this.canShowError = true;
|
|
16
|
+
this.restrict = undefined;
|
|
17
|
+
this.mode = "regular";
|
|
18
|
+
this.noBorder = false;
|
|
19
|
+
}
|
|
20
|
+
observeErrorMessage() {
|
|
21
|
+
if (this._inputElem) {
|
|
22
|
+
this.isInvalid().then((hasError) => {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
if (hasError) {
|
|
25
|
+
this._inputElem.classList.add("hasError");
|
|
26
|
+
(_a = this._messageBoxElem) === null || _a === void 0 ? void 0 : _a.classList.add("hasError");
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
this._inputElem.classList.remove("hasError");
|
|
30
|
+
(_b = this._messageBoxElem) === null || _b === void 0 ? void 0 : _b.classList.remove("hasError");
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
observeMask() {
|
|
36
|
+
if (this.mask) {
|
|
37
|
+
if (this._maskFormatter == undefined) {
|
|
38
|
+
this._maskFormatter = new MaskFormatter(this.mask);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this._maskFormatter.mask = this.mask;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
observeValue(newValue, oldValue) {
|
|
46
|
+
if (this._inputElem) {
|
|
47
|
+
if (newValue != oldValue) {
|
|
48
|
+
this._inputElem.value = this.value || "";
|
|
49
|
+
this.handleChange();
|
|
50
|
+
this.adjustFloatingLabel();
|
|
51
|
+
if (!this.isSlaveMode()) {
|
|
52
|
+
this.errorMessage = "";
|
|
53
|
+
this.ezChange.emit(this.value);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//---------------------------------------------
|
|
59
|
+
// Private methods
|
|
60
|
+
//---------------------------------------------
|
|
61
|
+
adjustFloatingLabel() {
|
|
62
|
+
if (this.label && this._labelElem) {
|
|
63
|
+
if (this._inputElem && !this._inputElem.classList.contains("input--with--label")) {
|
|
64
|
+
this._inputElem.classList.add("input--with--label");
|
|
65
|
+
}
|
|
66
|
+
const hasValue = this.value && this.value.toString().length > 0;
|
|
67
|
+
const containsFloatedClass = this._labelElem.classList.contains("input__label--floated");
|
|
68
|
+
if (hasValue || this.isFocused()) {
|
|
69
|
+
if (!containsFloatedClass) {
|
|
70
|
+
this._labelElem.classList.add("input__label--floated");
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
if (containsFloatedClass) {
|
|
75
|
+
this._labelElem.classList.remove("input__label--floated");
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
isFocused() {
|
|
81
|
+
return this._hostElement.shadowRoot.activeElement !== null;
|
|
82
|
+
}
|
|
83
|
+
isSlaveMode() {
|
|
84
|
+
var _a, _b;
|
|
85
|
+
return ((_b = (_a = this._hostElement) === null || _a === void 0 ? void 0 : _a.dataset) === null || _b === void 0 ? void 0 : _b.slaveMode) === "true";
|
|
86
|
+
}
|
|
87
|
+
adjustColorContentSlot(color = "") {
|
|
88
|
+
if (this._contentLeftSlot) {
|
|
89
|
+
this._contentLeftSlot.style.color = color;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
adjustBorderInput() {
|
|
93
|
+
if (this.noBorder) {
|
|
94
|
+
this._inputElem.classList.add("input__slim--noborder");
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//---------------------------------------------
|
|
98
|
+
// Public methods
|
|
99
|
+
//---------------------------------------------
|
|
100
|
+
/**
|
|
101
|
+
* Aplica o foco no campo.
|
|
102
|
+
*/
|
|
103
|
+
async setFocus(options) {
|
|
104
|
+
const { selectText } = options || {};
|
|
105
|
+
if (selectText)
|
|
106
|
+
this._inputElem.select();
|
|
107
|
+
this._inputElem.focus();
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Remove o foco do campo.
|
|
111
|
+
*/
|
|
112
|
+
async setBlur() {
|
|
113
|
+
this._inputElem.blur();
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Retorna se o conteúdo é inválido.
|
|
117
|
+
*/
|
|
118
|
+
async isInvalid() {
|
|
119
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
120
|
+
}
|
|
121
|
+
//---------------------------------------------
|
|
122
|
+
// Event handlers
|
|
123
|
+
//---------------------------------------------
|
|
124
|
+
handleFocusout() {
|
|
125
|
+
const value = this._inputElem.value;
|
|
126
|
+
if (value && this._maskFormatter) {
|
|
127
|
+
try {
|
|
128
|
+
this._inputElem.value = this._maskFormatter.format(value);
|
|
129
|
+
}
|
|
130
|
+
catch (e) {
|
|
131
|
+
this.errorMessage = e.message;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
this.controlChangeValue();
|
|
135
|
+
this.adjustFloatingLabel();
|
|
136
|
+
this.adjustColorContentSlot();
|
|
137
|
+
}
|
|
138
|
+
isValidValue(value) {
|
|
139
|
+
if (this.restrict) {
|
|
140
|
+
return Array.from(value).reduce((valid, c) => valid && this.restrict.indexOf(c) > -1, true);
|
|
141
|
+
}
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
controlChangeValue() {
|
|
145
|
+
if (this._inputElem && (this.value || '') !== this._inputElem.value) {
|
|
146
|
+
this.value = this._inputElem.value;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
handleChange() {
|
|
150
|
+
if (!this._inputElem) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
const value = this._inputElem.value;
|
|
154
|
+
if (this.isValidValue(value)) {
|
|
155
|
+
this._lastValidValue = value;
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
this._inputElem.value = this._lastValidValue == undefined ? "" : this._lastValidValue;
|
|
159
|
+
}
|
|
160
|
+
this.controlChangeValue();
|
|
161
|
+
}
|
|
162
|
+
handleSlotChange(ev) {
|
|
163
|
+
const slot = ev.target;
|
|
164
|
+
const content = slot.assignedElements()[0];
|
|
165
|
+
if (content) {
|
|
166
|
+
content.style.position = "absolute";
|
|
167
|
+
content.style.display = "flex";
|
|
168
|
+
content.style.alignItems = "center";
|
|
169
|
+
content.style.justifyContent = "center";
|
|
170
|
+
content.style.overflow = "hidden";
|
|
171
|
+
content.style.top = "0px";
|
|
172
|
+
content.style.width = "var(--ez-text-input__icon--width)";
|
|
173
|
+
content.style.height = this.mode != "slim" ? "var(--ez-text-input--height)" : "var(--ez-text-input--height--slim)";
|
|
174
|
+
if (slot.name == "leftIcon") {
|
|
175
|
+
content.style.left = "0px";
|
|
176
|
+
content.style.borderRadius = "var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)";
|
|
177
|
+
this._inputElem.classList.add("icon--left");
|
|
178
|
+
if (this._labelElem) {
|
|
179
|
+
this._labelElem.classList.add("input__label--left");
|
|
180
|
+
}
|
|
181
|
+
this._contentLeftSlot = content;
|
|
182
|
+
}
|
|
183
|
+
else if (slot.name == "rightIcon") {
|
|
184
|
+
content.style.right = "0px";
|
|
185
|
+
content.style.borderRadius = "0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0";
|
|
186
|
+
this._inputElem.classList.add("icon--right");
|
|
187
|
+
if (this._labelElem) {
|
|
188
|
+
this._labelElem.classList.add("input__label--right");
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
slot.name && ElementIDUtils.addIDInfo(content, slot.name);
|
|
192
|
+
}
|
|
193
|
+
this.observeErrorMessage();
|
|
194
|
+
}
|
|
195
|
+
doFocus() {
|
|
196
|
+
if (this.label && this._labelElem && !this._labelElem.classList.contains("input__label--floated")) {
|
|
197
|
+
this._labelElem.classList.add("input__label--floated");
|
|
198
|
+
}
|
|
199
|
+
this.adjustColorContentSlot("var(--ez-text-input__input--focus--icon-color)");
|
|
200
|
+
}
|
|
201
|
+
//---------------------------------------------
|
|
202
|
+
// Lifecycle web component
|
|
203
|
+
//---------------------------------------------
|
|
204
|
+
componentDidLoad() {
|
|
205
|
+
this.observeErrorMessage();
|
|
206
|
+
this.observeMask();
|
|
207
|
+
this.adjustFloatingLabel();
|
|
208
|
+
this.adjustBorderInput();
|
|
209
|
+
}
|
|
210
|
+
componentWillLoad() {
|
|
211
|
+
this.observeMask();
|
|
212
|
+
if (this.value) {
|
|
213
|
+
if (this._maskFormatter) {
|
|
214
|
+
try {
|
|
215
|
+
this.value = this._maskFormatter.format(this.value);
|
|
216
|
+
}
|
|
217
|
+
catch (e) {
|
|
218
|
+
this.errorMessage = e.message;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (!this.isValidValue(this.value)) {
|
|
222
|
+
this._lastValidValue = "";
|
|
223
|
+
this.value = "";
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
render() {
|
|
228
|
+
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
229
|
+
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" ?
|
|
230
|
+
h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
231
|
+
: null, h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
232
|
+
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage, "data-element-id": ElementIDUtils.getInternalIDInfo("message_box") }, this.errorMessage)));
|
|
233
|
+
}
|
|
234
|
+
get _hostElement() { return getElement(this); }
|
|
235
|
+
static get watchers() { return {
|
|
236
|
+
"errorMessage": ["observeErrorMessage"],
|
|
237
|
+
"mask": ["observeMask"],
|
|
238
|
+
"value": ["observeValue"]
|
|
239
|
+
}; }
|
|
240
|
+
};
|
|
241
|
+
EzTextInput.style = ezTextInputCss;
|
|
242
|
+
|
|
243
|
+
export { EzTextInput as ez_text_input };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-296b8458.js';
|
|
2
|
+
import { TimeFormatter, MaskFormatter, NumberUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
import { C as CSSVarsUtils } from './CSSVarsUtils-a97cfa29.js';
|
|
4
|
+
|
|
5
|
+
const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;width:100%}.time__input{height:100%}";
|
|
6
|
+
|
|
7
|
+
const EzTimeInput = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.ezChange = createEvent(this, "ezChange", 7);
|
|
11
|
+
this.ezStartChange = createEvent(this, "ezStartChange", 7);
|
|
12
|
+
this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
|
|
13
|
+
this.label = undefined;
|
|
14
|
+
this.value = undefined;
|
|
15
|
+
this.enabled = true;
|
|
16
|
+
this.errorMessage = undefined;
|
|
17
|
+
this.showSeconds = false;
|
|
18
|
+
this.mode = "regular";
|
|
19
|
+
this.canShowError = true;
|
|
20
|
+
}
|
|
21
|
+
observeErrorMessage() {
|
|
22
|
+
var _a;
|
|
23
|
+
if (this._textInput) {
|
|
24
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
25
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
26
|
+
this.prepareValue(this._viewValue);
|
|
27
|
+
if ((this._textInput.value || '') !== this._viewValue) {
|
|
28
|
+
this._textInput.value = this._viewValue;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
observeShowSeconds() {
|
|
34
|
+
if (this.showSeconds) {
|
|
35
|
+
this.prepareMask("##:##:##");
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.prepareMask("##:##");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
observeValue(newValue, oldValue) {
|
|
42
|
+
if (this._textInput && newValue != oldValue) {
|
|
43
|
+
let newValueValidated = this.validateValue(newValue);
|
|
44
|
+
const oldValueValidated = this.validateValue(oldValue);
|
|
45
|
+
if (newValueValidated != oldValueValidated) {
|
|
46
|
+
this._viewValue = newValueValidated == undefined ? "" : newValueValidated.toString();
|
|
47
|
+
this.prepareValue(this._viewValue);
|
|
48
|
+
if (this._viewValue && !TimeFormatter.validateTime(this._viewValue, this.showSeconds)) {
|
|
49
|
+
this.setError("Favor inserir um horário válido.");
|
|
50
|
+
newValueValidated = undefined;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
this.setError("");
|
|
54
|
+
}
|
|
55
|
+
const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
|
|
56
|
+
this.ezChange.emit(valueEmitted);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//---------------------------------------------
|
|
61
|
+
// Private methods
|
|
62
|
+
//---------------------------------------------
|
|
63
|
+
prepareMask(mask) {
|
|
64
|
+
if (this._maskFormatter == undefined) {
|
|
65
|
+
this._maskFormatter = new MaskFormatter(mask);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
this._maskFormatter.mask = mask;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
validateValue(value) {
|
|
72
|
+
return isNaN(value) || value === undefined ? null : value;
|
|
73
|
+
}
|
|
74
|
+
setError(msg) {
|
|
75
|
+
this.errorMessage = msg;
|
|
76
|
+
if (this._textInput && (msg === null || msg === void 0 ? void 0 : msg.trim())) {
|
|
77
|
+
this.ezCancelWaitingChange.emit();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//---------------------------------------------
|
|
81
|
+
// Public methods
|
|
82
|
+
//---------------------------------------------
|
|
83
|
+
getViewValue() {
|
|
84
|
+
return this._viewValue;
|
|
85
|
+
}
|
|
86
|
+
prepareValue(value) {
|
|
87
|
+
try {
|
|
88
|
+
this._viewValue = TimeFormatter.prepareValue(value, this.showSeconds);
|
|
89
|
+
if (this._textInput && this._textInput.value !== this._viewValue) {
|
|
90
|
+
this._textInput.value = this._viewValue;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
catch (e) {
|
|
94
|
+
this.setError(e.message);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Aplica o foco no campo.
|
|
99
|
+
*/
|
|
100
|
+
async setFocus({ selectText }) {
|
|
101
|
+
this._textInput.setFocus({ selectText });
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Remove o foco do campo.
|
|
105
|
+
*/
|
|
106
|
+
async setBlur() {
|
|
107
|
+
this._textInput.setBlur();
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Retorna se o conteúdo é inválido.
|
|
111
|
+
*/
|
|
112
|
+
async isInvalid() {
|
|
113
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
114
|
+
}
|
|
115
|
+
//---------------------------------------------
|
|
116
|
+
// Event handlers
|
|
117
|
+
//---------------------------------------------
|
|
118
|
+
handleBlur() {
|
|
119
|
+
if (this._textInput) {
|
|
120
|
+
this._viewValue = this._textInput.value;
|
|
121
|
+
this.prepareValue(this._viewValue);
|
|
122
|
+
const value = NumberUtils.stringToNumber(this._viewValue.replace(/\D/g, ""));
|
|
123
|
+
this.value = ['string', 'number'].includes(typeof value) ? value : null;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
handleInput() {
|
|
127
|
+
const textInputValue = this._textInput.value;
|
|
128
|
+
if (!['string', 'number'].includes(typeof textInputValue))
|
|
129
|
+
return;
|
|
130
|
+
const parsedNumber = NumberUtils.stringToNumber(textInputValue.replace(/\D/g, ""));
|
|
131
|
+
if (parsedNumber !== this.value) {
|
|
132
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
//---------------------------------------------
|
|
136
|
+
// Lifecycle web component
|
|
137
|
+
//---------------------------------------------
|
|
138
|
+
componentDidLoad() {
|
|
139
|
+
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
140
|
+
}
|
|
141
|
+
componentWillLoad() {
|
|
142
|
+
this.observeShowSeconds();
|
|
143
|
+
if (this.value) {
|
|
144
|
+
this.prepareValue(this.value.toString());
|
|
145
|
+
}
|
|
146
|
+
else if (this._viewValue) {
|
|
147
|
+
this.prepareValue(this._viewValue);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
render() {
|
|
151
|
+
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" }))));
|
|
153
|
+
}
|
|
154
|
+
static get assetsDirs() { return ["../assets"]; }
|
|
155
|
+
get _elem() { return getElement(this); }
|
|
156
|
+
static get watchers() { return {
|
|
157
|
+
"errorMessage": ["observeErrorMessage"],
|
|
158
|
+
"showSeconds": ["observeShowSeconds"],
|
|
159
|
+
"value": ["observeValue"]
|
|
160
|
+
}; }
|
|
161
|
+
};
|
|
162
|
+
EzTimeInput.style = ezTimeInputCss;
|
|
163
|
+
|
|
164
|
+
export { EzTimeInput as ez_time_input };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { r as registerInstance, f as forceUpdate, h, H as Host, g as getElement } from './index-296b8458.js';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
|
|
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(--most-visible, 3);--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}}";
|
|
5
|
+
|
|
6
|
+
const EzToast = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this._nextMessages = [];
|
|
10
|
+
this._currentMessageInfo = { message: "", fadeTime: undefined, useIcon: undefined };
|
|
11
|
+
this._toastOpenedClass = "toast__container--opened";
|
|
12
|
+
this._lastTimeOut = undefined;
|
|
13
|
+
this._lang = "pt"; // Controla qual idioma será usado para definir a regras de hifenização.
|
|
14
|
+
this.message = undefined;
|
|
15
|
+
this.fadeTime = 5000;
|
|
16
|
+
this.useIcon = false;
|
|
17
|
+
this.canClose = true;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Exibe o ez-toast.
|
|
21
|
+
*/
|
|
22
|
+
async show(message, fadeTime, useIcon, canClose) {
|
|
23
|
+
const isClosable = (canClose !== undefined) ? canClose : this.canClose;
|
|
24
|
+
return new Promise(resolve => {
|
|
25
|
+
var _a;
|
|
26
|
+
if ((_a = this.container) === null || _a === void 0 ? void 0 : _a.classList.contains(this._toastOpenedClass)) {
|
|
27
|
+
if (this.isRepeatedMessage(message)) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
this._nextMessages.push({ message, fadeTime, useIcon, canClose: isClosable, callBack: resolve });
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this._currentMessageInfo.message = message || this.message;
|
|
34
|
+
this._currentMessageInfo.fadeTime = fadeTime || this.fadeTime;
|
|
35
|
+
this._currentMessageInfo.useIcon = useIcon || this.useIcon;
|
|
36
|
+
this._currentMessageInfo.callBack = resolve;
|
|
37
|
+
if (isClosable) {
|
|
38
|
+
this._currentMessageInfo.canClose = isClosable;
|
|
39
|
+
}
|
|
40
|
+
forceUpdate(this);
|
|
41
|
+
this.displayToast();
|
|
42
|
+
this._lastTimeOut = setTimeout(() => {
|
|
43
|
+
this.hideToast();
|
|
44
|
+
}, this._currentMessageInfo.fadeTime + 400);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
hideToast() {
|
|
49
|
+
this.makeToastInvisible();
|
|
50
|
+
if (this._nextMessages.length > 0) {
|
|
51
|
+
if (this._currentMessageInfo.callBack) {
|
|
52
|
+
this._currentMessageInfo.callBack(true);
|
|
53
|
+
}
|
|
54
|
+
setTimeout(() => {
|
|
55
|
+
let newMessageInfo = this._nextMessages.shift();
|
|
56
|
+
this.show(newMessageInfo.message, newMessageInfo.fadeTime, newMessageInfo.useIcon);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (this._currentMessageInfo.callBack) {
|
|
60
|
+
this._currentMessageInfo.callBack(true);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
isRepeatedMessage(message) {
|
|
64
|
+
var _a, _b;
|
|
65
|
+
return ((_a = this._nextMessages) === null || _a === void 0 ? void 0 : _a.some((info) => info.message === message))
|
|
66
|
+
|| ((_b = this._currentMessageInfo) === null || _b === void 0 ? void 0 : _b.message) === message;
|
|
67
|
+
}
|
|
68
|
+
makeToastInvisible() {
|
|
69
|
+
this.container.classList.remove(this._toastOpenedClass);
|
|
70
|
+
this.container.style.animation = `none`;
|
|
71
|
+
if (this._lastTimeOut)
|
|
72
|
+
clearTimeout(this._lastTimeOut);
|
|
73
|
+
}
|
|
74
|
+
displayToast() {
|
|
75
|
+
this.container.classList.add(this._toastOpenedClass);
|
|
76
|
+
this.container.style.animation = `fadein 0.5s, fadeout 0.5s ${this.fadeTime / 1000}s`;
|
|
77
|
+
}
|
|
78
|
+
buildDataElementId() {
|
|
79
|
+
var _a, _b;
|
|
80
|
+
const dataElementId = ElementIDUtils.addIDInfo(this._element);
|
|
81
|
+
const attribute = ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME;
|
|
82
|
+
(_a = this._elemBtnClose) === null || _a === void 0 ? void 0 : _a.setAttribute(attribute, `${dataElementId}_buttonClose`);
|
|
83
|
+
(_b = this._elemText) === null || _b === void 0 ? void 0 : _b.setAttribute(attribute, `${dataElementId}_title`);
|
|
84
|
+
}
|
|
85
|
+
componentDidLoad() {
|
|
86
|
+
this.buildDataElementId();
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
return (h(Host, null, h("div", { ref: (el) => this.container = el, class: "toast__container" }, this._currentMessageInfo.useIcon &&
|
|
90
|
+
h("slot", { name: "icon" }), h("div", { lang: this._lang, ref: (el) => this._elemText = el, class: this._currentMessageInfo.useIcon ? "message__container message__container--icon" : "message__container", title: this._currentMessageInfo.message, innerHTML: this._currentMessageInfo.message }), this._currentMessageInfo.canClose &&
|
|
91
|
+
h("button", { class: "btn-close", onClick: () => { this.hideToast(); }, ref: (el) => this._elemBtnClose = el }))));
|
|
92
|
+
}
|
|
93
|
+
get _element() { return getElement(this); }
|
|
94
|
+
};
|
|
95
|
+
EzToast.style = ezToastCss;
|
|
96
|
+
|
|
97
|
+
export { EzToast as ez_toast };
|