@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-78812.3 → 0.0.0-bugfix-dev-KB-76362.1
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/RecordValidationProcessor-10846595.js +108 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
- 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 +2 -2
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item_3.cjs.entry.js +20 -13
- package/dist/cjs/ez-chart.cjs.entry.js +2 -2
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +11 -47
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +4 -5
- package/dist/cjs/ez-date-input.cjs.entry.js +3 -9
- package/dist/cjs/ez-date-time-input.cjs.entry.js +3 -9
- package/dist/cjs/ez-dialog.cjs.entry.js +3 -11
- package/dist/cjs/ez-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +3 -3
- package/dist/cjs/ez-form.cjs.entry.js +326 -6
- package/dist/cjs/ez-grid.cjs.entry.js +70519 -14637
- 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 +101 -152
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +2 -2
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -8
- package/dist/cjs/ez-popover.cjs.entry.js +2 -2
- package/dist/cjs/ez-popup.cjs.entry.js +2 -2
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +23 -72
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +2 -2
- package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +5 -67
- package/dist/cjs/ez-text-input.cjs.entry.js +8 -50
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -7
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- 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/ezui.cjs.js +2 -2
- package/dist/cjs/filter-column.cjs.entry.js +1 -1
- package/dist/cjs/{index-a7b0c73d.js → index-9e5554cb.js} +3 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ez-button/ez-button.css +2 -2
- package/dist/collection/components/ez-card-item/ez-card-item.css +5 -14
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +14 -75
- package/dist/collection/components/ez-date-input/ez-date-input.js +4 -35
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +4 -35
- package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
- package/dist/collection/components/ez-dialog/ez-dialog.js +1 -9
- package/dist/collection/components/ez-filter-input/ez-filter-input.css +11 -0
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +52 -22
- package/dist/collection/components/ez-form/ez-form.js +0 -1
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +2 -3
- 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 +27 -100
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +0 -8
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +46 -164
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +0 -7
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +0 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +0 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +0 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +0 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +1 -4
- package/dist/collection/components/ez-grid/ez-grid.js +3 -90
- package/dist/collection/components/ez-icon/ez-icon.css +149 -153
- package/dist/collection/components/ez-list/ez-list.css +5 -5
- package/dist/collection/components/ez-list/ez-list.js +170 -152
- package/dist/collection/components/ez-modal/ez-modal.css +0 -4
- package/dist/collection/components/ez-modal/ez-modal.js +2 -2
- package/dist/collection/components/ez-number-input/ez-number-input.js +0 -25
- package/dist/collection/components/ez-popover/ez-popover.css +10 -3
- package/dist/collection/components/ez-popup/ez-popup.css +7 -3
- package/dist/collection/components/ez-search/ez-search.css +1 -1
- package/dist/collection/components/ez-search/ez-search.js +24 -98
- package/dist/collection/components/ez-split-button/ez-split-button.css +2 -2
- package/dist/collection/components/ez-text-area/ez-text-area.css +0 -49
- package/dist/collection/components/ez-text-area/ez-text-area.js +2 -102
- package/dist/collection/components/ez-text-input/ez-text-input.css +53 -27
- package/dist/collection/components/ez-text-input/ez-text-input.js +6 -84
- package/dist/collection/components/ez-time-input/ez-time-input.js +0 -24
- package/dist/collection/utils/form/DataBinder.js +3 -18
- package/dist/collection/utils/form/FormMetadata.js +1 -1
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
- package/dist/custom-elements/index.js +71095 -15526
- package/dist/esm/RecordValidationProcessor-9c6cc267.js +105 -0
- package/dist/esm/ez-actions-button.entry.js +1 -1
- 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 +2 -2
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item_3.entry.js +20 -13
- package/dist/esm/ez-chart.entry.js +2 -2
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +12 -48
- package/dist/esm/ez-custom-form-input_2.entry.js +4 -5
- package/dist/esm/ez-date-input.entry.js +3 -9
- package/dist/esm/ez-date-time-input.entry.js +3 -9
- package/dist/esm/ez-dialog.entry.js +3 -11
- package/dist/esm/ez-dropdown_2.entry.js +1 -1
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +3 -3
- package/dist/esm/ez-form.entry.js +325 -5
- package/dist/esm/ez-grid.entry.js +70546 -14664
- 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 +102 -153
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +2 -2
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +1 -8
- package/dist/esm/ez-popover.entry.js +2 -2
- package/dist/esm/ez-popup.entry.js +2 -2
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-scroller_2.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +23 -72
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +2 -2
- package/dist/esm/ez-split-item.entry.js +1 -1
- package/dist/esm/ez-split-panel.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +5 -67
- package/dist/esm/ez-text-input.entry.js +8 -50
- package/dist/esm/ez-time-input.entry.js +1 -7
- package/dist/esm/ez-toast.entry.js +1 -1
- 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/ezui.js +3 -3
- package/dist/esm/filter-column.entry.js +1 -1
- package/dist/esm/{index-baa5e267.js → index-5a720e56.js} +3 -1
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-00687830.entry.js +1 -0
- package/dist/ezui/{p-44caad9a.entry.js → p-0378416a.entry.js} +1 -1
- package/dist/ezui/p-044d46d5.entry.js +1 -0
- package/dist/ezui/{p-1285c902.entry.js → p-11b09aa1.entry.js} +1 -1
- package/dist/ezui/{p-77a4bd35.entry.js → p-11bfeca3.entry.js} +1 -1
- package/dist/ezui/p-190c190f.entry.js +304 -0
- package/dist/ezui/{p-8888d9ed.entry.js → p-1b08bf3c.entry.js} +1 -1
- package/dist/ezui/p-2de9f0aa.entry.js +1 -0
- package/dist/ezui/{p-baf80b13.entry.js → p-30951bd7.entry.js} +1 -1
- package/dist/ezui/p-36180f4d.entry.js +1 -0
- package/dist/ezui/{p-7409eeaa.entry.js → p-3b546374.entry.js} +1 -1
- package/dist/ezui/p-3f8c33e0.entry.js +1 -0
- package/dist/ezui/p-52100a6e.entry.js +1 -0
- package/dist/ezui/{p-6d79930d.entry.js → p-554522db.entry.js} +1 -1
- package/dist/ezui/p-5a40c77a.entry.js +1 -0
- package/dist/ezui/p-61059f6b.entry.js +1 -0
- package/dist/ezui/p-68267f59.entry.js +1 -0
- package/dist/ezui/{p-1f50fa05.entry.js → p-6b51c9cc.entry.js} +1 -1
- package/dist/ezui/p-6ec40dec.entry.js +1 -0
- package/dist/ezui/{p-5ed81457.entry.js → p-6fc26622.entry.js} +1 -1
- package/dist/ezui/{p-f9e551de.entry.js → p-70f1c812.entry.js} +1 -1
- package/dist/ezui/{p-555c9018.entry.js → p-7567ccdd.entry.js} +1 -1
- package/dist/ezui/{p-1e7a8633.entry.js → p-81461d2f.entry.js} +1 -1
- package/dist/ezui/p-823cc11b.entry.js +1 -0
- package/dist/ezui/{p-8df1ca33.entry.js → p-82fa4b09.entry.js} +1 -1
- package/dist/ezui/p-85b500bb.entry.js +1 -0
- package/dist/ezui/{p-bcb53f27.entry.js → p-868b56f7.entry.js} +1 -1
- package/dist/ezui/p-8ac13678.entry.js +1 -0
- package/dist/ezui/{p-09de35a2.entry.js → p-91ccae0c.entry.js} +1 -1
- package/dist/ezui/{p-c0d9c4f8.entry.js → p-92748142.entry.js} +1 -1
- package/dist/ezui/p-940760bf.entry.js +1 -0
- package/dist/ezui/p-9e08ddb0.entry.js +1 -0
- package/dist/ezui/{p-c4320a39.entry.js → p-a563df31.entry.js} +1 -1
- package/dist/ezui/{p-990b4318.entry.js → p-a921e3e7.entry.js} +1 -1
- package/dist/ezui/p-b2a1398f.entry.js +1 -0
- package/dist/ezui/{p-17be134a.entry.js → p-b2f6bc0a.entry.js} +1 -1
- package/dist/ezui/{p-c3045972.entry.js → p-b858fc6e.entry.js} +1 -1
- package/dist/ezui/p-ba5f4ee7.entry.js +1 -0
- package/dist/ezui/{p-e347df9c.entry.js → p-bef7daac.entry.js} +1 -1
- package/dist/ezui/{p-9f5fa3f9.entry.js → p-c2b20f78.entry.js} +1 -1
- package/dist/ezui/p-d40b93a7.entry.js +1 -0
- package/dist/ezui/p-d4aba783.entry.js +1 -0
- package/dist/ezui/{p-7fdd479f.entry.js → p-e18d9e6a.entry.js} +1 -1
- package/dist/ezui/p-e3ec7422.entry.js +1 -0
- package/dist/ezui/{p-23a36bb6.js → p-e4c7eb39.js} +2 -2
- package/dist/ezui/{p-0306dff7.entry.js → p-e6b38ade.entry.js} +1 -1
- package/dist/ezui/{p-90bcd2ba.entry.js → p-e7395eae.entry.js} +1 -1
- package/dist/ezui/{p-650e4b6d.entry.js → p-f1c2c19e.entry.js} +1 -1
- package/dist/ezui/p-f291db18.entry.js +1 -0
- package/dist/ezui/p-f42855b9.js +1 -0
- package/dist/ezui/{p-6e429cff.entry.js → p-fc194825.entry.js} +1 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -7
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +1 -6
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +1 -6
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +0 -2
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +11 -4
- 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 +0 -12
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -7
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -2
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +7 -19
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +1 -3
- 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 +1 -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 +0 -1
- 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 +1 -11
- package/dist/types/components/ez-list/ez-list.d.ts +26 -3
- package/dist/types/components/ez-modal/ez-modal.d.ts +1 -1
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +0 -4
- package/dist/types/components/ez-search/ez-search.d.ts +2 -10
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +0 -17
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +0 -9
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +0 -4
- package/dist/types/components.d.ts +44 -109
- package/dist/types/utils/form/DataBinder.d.ts +0 -3
- package/package.json +4 -11
- package/dist/cjs/DataBinder-3b083480.js +0 -445
- package/dist/cjs/FocusResolver-885f2173.js +0 -35
- package/dist/collection/utils/FocusResolver.js +0 -31
- package/dist/esm/DataBinder-02fa9bb9.js +0 -441
- package/dist/esm/FocusResolver-1ccbf850.js +0 -33
- package/dist/ezui/p-0a75bb05.entry.js +0 -1
- package/dist/ezui/p-0db68715.entry.js +0 -1
- package/dist/ezui/p-15d7af92.entry.js +0 -1
- package/dist/ezui/p-19098a3f.entry.js +0 -1
- package/dist/ezui/p-1f830a2f.entry.js +0 -1
- package/dist/ezui/p-2aa8e4b2.entry.js +0 -1
- package/dist/ezui/p-2bb2a0c4.entry.js +0 -1
- package/dist/ezui/p-3175fe8c.entry.js +0 -1
- package/dist/ezui/p-43b41d3e.entry.js +0 -309
- package/dist/ezui/p-455e737c.js +0 -1
- package/dist/ezui/p-7ed30844.entry.js +0 -1
- package/dist/ezui/p-97af4b13.entry.js +0 -1
- package/dist/ezui/p-a5b91a77.entry.js +0 -1
- package/dist/ezui/p-a80b1287.entry.js +0 -1
- package/dist/ezui/p-bc2f844e.entry.js +0 -1
- package/dist/ezui/p-bfad39eb.entry.js +0 -1
- package/dist/ezui/p-cd2e78f0.entry.js +0 -1
- package/dist/ezui/p-d0ca26fe.entry.js +0 -1
- package/dist/ezui/p-d24a7b4c.entry.js +0 -1
- package/dist/ezui/p-dc628ed3.js +0 -1
- package/dist/ezui/p-dc8b36c3.entry.js +0 -1
- package/dist/ezui/p-e5e16038.entry.js +0 -1
- package/dist/ezui/p-fec696ab.entry.js +0 -1
- package/dist/ezui/p-ffd246f5.entry.js +0 -1
- package/dist/types/utils/FocusResolver.d.ts +0 -5
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9e5554cb.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
8
|
const ezRadioButtonCss = ":host{--ez-radio-button--font-family:var(--font-pattern, Arial);--ez-radio-button--font-size:var(--text--medium, 14px);--ez-radio-button--font-weight:var(--text-weight--large);--ez-radio-button--font-color:var(--title--primary, #2B3A54);--ez-radio-button--padding-vertical:var(--space--medium, 12px);--ez-radio-button--padding-horizontal:var(--space--small, 6px);--ez-radio-button__form-label--font-family:var(--font-pattern, Arial);--ez-radio-button__form-label--font-weight:var(--text-weight--medium, 400);--ez-radio-button__form-label--title-primary:var(--title--primary, #2B3A54);--ez-radio-button__form-label--font-size:var(--text--medium, 14px);--ez-radio-button__form-label--padding-horizontal:var(--space--medium, 12px);--ez-radio-button__form-radio--border-color:var(--title--primary, #2B3A54);--ez-radio-button__form-radio--checked--color:var(--color--primary, #008561);--ez-radio-button__form-radio--disabled--border-color:var(--color--strokes, #dce0e8);--ez-radio-button__form-radio--disabled--background-color:var(--background--medium, #f0f3f7);--ez-radio-button__form-radio--disabled--color:var(--color--strokes, #dce0e8);--ez-radio-button__form-radio--disabled--before--background-color:var(--color--strokes, #dce0e8);--ez-radio-button__form-radio--focus--background-color:var(--color--inverted, #fff);--ez-radio-button__form-radio--checked--box-shadow-color:var(--background--strong, #e4eaf1);--ez-radio-button__form-radio--checked--focus--background-color:var(--color--inverted, #fff);--ez-radio-button__form-radio--checked--focus--box-shadow-color:var(--color--primary-300, #e2f4ef);--ez-radio-button__form-radio--checked--hover--background-color:var(--color--inverted, #fff);--ez-radio-button__form-radio--checked--hover--box-shadow-color:#daece7;--ez-radio-button__form-radio--hover--box-shadow-color:var(--color--strokes, #dce0e8);--ez-radio-button__form-radio--checked--disabled--hover--background-color:var(--background--medium, #f0f3f7);display:flex;width:100%;flex-direction:column;align-items:flex-start;box-sizing:border-box}.form{padding:var(--ez-radio-button--padding-vertical) var(--ez-radio-button--padding-horizontal);gap:var(--ez-radio-button__form-label--padding-horizontal)}.form--vertical{display:flex;flex-direction:column}.form--horizontal{display:flex;flex-direction:row}.form__group{display:grid;grid-template-columns:20px auto;align-items:center}.label{font-family:var(--ez-radio-button--font-family);font-size:var(--ez-radio-button--font-size);font-weight:var(--ez-radio-button--font-weight);color:var(--ez-radio-button--font-color)}.form__label{cursor:pointer;font-weight:var(--ez-radio-button__form-label--font-weight);color:var(--ez-radio-button__form-label--title-primary);font-family:var(--ez-radio-button__form-label--font-family);font-size:var(--ez-radio-button__form-label--font-size);padding-left:var(--ez-radio-button__form-label--padding-horizontal);padding-right:var(--ez-radio-button__form-label--padding-horizontal)}.form__radio{cursor:pointer;appearance:none;outline:none;position:relative;display:flex;align-items:center;justify-content:center;margin:0;padding:0;width:20px;height:20px;border-radius:50%;border:2px solid var(--ez-radio-button__form-radio--border-color)}.form__radio::before{content:'';display:block;position:absolute;opacity:0;transition:all 300ms ease-in-out;height:100%;width:100%;border-radius:50%;transform:scale(0.5);background:var(--ez-radio-button__form-radio--checked--color)}.form__radio:checked:before{opacity:1}.form__radio:checked{border:2px solid var(--ez-radio-button__form-radio--checked--color)}.form__radio:disabled{cursor:default;border:2px solid var(--ez-radio-button__form-radio--disabled--border-color);background-color:var(--ez-radio-button__form-radio--disabled--background-color)}.form__radio:disabled:hover{box-shadow:inherit}input[type=radio]:disabled~label{cursor:default;color:var(--ez-radio-button__form-radio--disabled--color)}.form__radio:disabled:before{background:var(--ez-radio-button__form-radio--disabled--before--background-color)}.form__radio:focus{transition:0.25s linear;background-color:var(--ez-radio-button__form-radio--focus--background-color);box-shadow:0px 0px 0px 6px var(--ez-radio-button__form-radio--checked--box-shadow-color)}.form__radio:checked:focus{transition:0.25s linear;background-color:var(--ez-radio-button__form-radio--checked--focus--background-color);box-shadow:0px 0px 0px 6px var(--ez-radio-button__form-radio--checked--focus--box-shadow-color)}.form__radio:checked:hover{transition:0.25s linear;background-color:var(--ez-radio-button__form-radio--checked--hover--background-color);box-shadow:0px 0px 0px 6px var(--ez-radio-button__form-radio--checked--hover--box-shadow-color)}.form__radio:hover{transition:0.25s linear;box-shadow:0px 0px 0px 6px var(--ez-radio-button__form-radio--hover--box-shadow-color)}.form__radio:checked:disabled:hover{box-shadow:none;background-color:var(--ez-radio-button__form-radio--checked--disabled--hover--background-color)}";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9e5554cb.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const EzScrollDirection = require('./EzScrollDirection-b2c99895.js');
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9e5554cb.js');
|
|
6
6
|
const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
|
|
7
7
|
const core = require('@sankhyalabs/core');
|
|
8
8
|
const ApplicationUtils = require('./ApplicationUtils-c9d1205c.js');
|
|
@@ -50,8 +50,7 @@ const EzSearch = class {
|
|
|
50
50
|
this.options = undefined;
|
|
51
51
|
this.suppressSearch = false;
|
|
52
52
|
this.ensureClearButtonVisible = false;
|
|
53
|
-
this.suppressPreLoad =
|
|
54
|
-
this.autoFocus = false;
|
|
53
|
+
this.suppressPreLoad = false;
|
|
55
54
|
}
|
|
56
55
|
observeErrorMessage() {
|
|
57
56
|
var _a;
|
|
@@ -62,25 +61,12 @@ const EzSearch = class {
|
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
|
-
getValue(val) {
|
|
66
|
-
return typeof val === 'object' ? val === null || val === void 0 ? void 0 : val.value : val;
|
|
67
|
-
}
|
|
68
64
|
validateNewValue(newValue, oldValue) {
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
const newValueIsValid = parsedNewValue !== "[object Object]" && !!parsedNewValue;
|
|
72
|
-
const oldValueIsValid = parsedOldValue !== "[object Object]" && !!parsedOldValue;
|
|
73
|
-
const valuesIsDifferent = parsedNewValue !== parsedOldValue;
|
|
74
|
-
if (!oldValueIsValid && newValueIsValid) {
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
if (newValueIsValid && oldValueIsValid && valuesIsDifferent) {
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
return false;
|
|
65
|
+
const getValue = (val) => typeof val === 'object' ? val === null || val === void 0 ? void 0 : val.value : val;
|
|
66
|
+
return (getValue(newValue) !== getValue(oldValue));
|
|
81
67
|
}
|
|
82
68
|
async observeValue(newValue, oldValue) {
|
|
83
|
-
if (this._textInput && this.validateNewValue(newValue, oldValue)) {
|
|
69
|
+
if (this._textInput && newValue !== oldValue && this.validateNewValue(newValue, oldValue)) {
|
|
84
70
|
if (typeof newValue === "string") {
|
|
85
71
|
await this.handleValueAsString(newValue);
|
|
86
72
|
return;
|
|
@@ -123,9 +109,9 @@ const EzSearch = class {
|
|
|
123
109
|
/**
|
|
124
110
|
* Aplica o foco no campo.
|
|
125
111
|
*/
|
|
126
|
-
async setFocus(
|
|
112
|
+
async setFocus() {
|
|
127
113
|
if (this._textInput) {
|
|
128
|
-
this._textInput.setFocus(
|
|
114
|
+
this._textInput.setFocus();
|
|
129
115
|
}
|
|
130
116
|
}
|
|
131
117
|
/**
|
|
@@ -168,9 +154,6 @@ const EzSearch = class {
|
|
|
168
154
|
return;
|
|
169
155
|
}
|
|
170
156
|
await this.loadDescriptionValue(value);
|
|
171
|
-
if (!this._currentValue) {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
157
|
this.setInputValue();
|
|
175
158
|
this.ezChange.emit(this.value);
|
|
176
159
|
this._currentValue = this.value;
|
|
@@ -226,7 +209,7 @@ const EzSearch = class {
|
|
|
226
209
|
return;
|
|
227
210
|
}
|
|
228
211
|
let text = (!this.showSelectedValue || currentValue.value == undefined) ? currentValue.label : currentValue.label ? `${currentValue.value} - ${currentValue.label}` : currentValue.value;
|
|
229
|
-
text = text
|
|
212
|
+
text = text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
|
|
230
213
|
return text;
|
|
231
214
|
}
|
|
232
215
|
getText() {
|
|
@@ -386,7 +369,7 @@ const EzSearch = class {
|
|
|
386
369
|
this.updateVisibleOptions();
|
|
387
370
|
if (this._tabPressed) {
|
|
388
371
|
this._tabPressed = false;
|
|
389
|
-
this.controlEmptySearch(
|
|
372
|
+
this.controlEmptySearch();
|
|
390
373
|
}
|
|
391
374
|
}
|
|
392
375
|
else {
|
|
@@ -401,16 +384,15 @@ const EzSearch = class {
|
|
|
401
384
|
replaceHighlight(value) {
|
|
402
385
|
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
403
386
|
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
404
|
-
return
|
|
387
|
+
return (value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
405
388
|
}
|
|
406
|
-
selectOption(newOption
|
|
389
|
+
selectOption(newOption) {
|
|
407
390
|
var _a, _b;
|
|
408
391
|
const currentValue = this.getSelectedOption(this.value);
|
|
409
392
|
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.value), label: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.label) });
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
const adjustedOpt = !(newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) ? undefined : newOptionsFormatted;
|
|
393
|
+
if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) === null || _b === void 0 ? void 0 : _b.toString()))
|
|
394
|
+
|| (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
|
|
395
|
+
const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
|
|
414
396
|
this.value = adjustedOpt;
|
|
415
397
|
this._currentValue = adjustedOpt;
|
|
416
398
|
}
|
|
@@ -420,11 +402,6 @@ const EzSearch = class {
|
|
|
420
402
|
}
|
|
421
403
|
this._visibleOptions = [];
|
|
422
404
|
this.clearSource();
|
|
423
|
-
if (focusOnInput) {
|
|
424
|
-
setTimeout(() => {
|
|
425
|
-
this.setFocus();
|
|
426
|
-
}, 0);
|
|
427
|
-
}
|
|
428
405
|
}
|
|
429
406
|
loadOptions(mode, argument = "") {
|
|
430
407
|
this._criteria = argument;
|
|
@@ -461,7 +438,7 @@ const EzSearch = class {
|
|
|
461
438
|
this.value = null;
|
|
462
439
|
this._currentValue = null;
|
|
463
440
|
}
|
|
464
|
-
controlListWithOnlyOne(
|
|
441
|
+
controlListWithOnlyOne() {
|
|
465
442
|
var _a, _b;
|
|
466
443
|
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
467
444
|
if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
|
|
@@ -472,17 +449,17 @@ const EzSearch = class {
|
|
|
472
449
|
value: (_b = source[0].value) === null || _b === void 0 ? void 0 : _b.replace(startHighlight, '').replace(endHighlight, ''),
|
|
473
450
|
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
474
451
|
};
|
|
475
|
-
this.selectOption(option
|
|
452
|
+
this.selectOption(option);
|
|
476
453
|
}
|
|
477
454
|
}
|
|
478
|
-
controlEmptySearch(
|
|
455
|
+
controlEmptySearch() {
|
|
479
456
|
var _a;
|
|
480
457
|
if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
481
458
|
this.clearSearch();
|
|
482
459
|
ApplicationUtils.ApplicationUtils.info(this._textEmptyList);
|
|
483
460
|
}
|
|
484
461
|
else {
|
|
485
|
-
this.controlListWithOnlyOne(
|
|
462
|
+
this.controlListWithOnlyOne();
|
|
486
463
|
}
|
|
487
464
|
}
|
|
488
465
|
async loadDescriptionValue(argument) {
|
|
@@ -553,19 +530,6 @@ const EzSearch = class {
|
|
|
553
530
|
this._preSelection = undefined;
|
|
554
531
|
this.updateVisibleOptions();
|
|
555
532
|
}
|
|
556
|
-
async handleInitialValue() {
|
|
557
|
-
const valueIsValid = !!this.getValue(this.value);
|
|
558
|
-
if (!valueIsValid) {
|
|
559
|
-
return;
|
|
560
|
-
}
|
|
561
|
-
if (typeof this.value === "string") {
|
|
562
|
-
await this.handleValueAsString(this.value);
|
|
563
|
-
return;
|
|
564
|
-
}
|
|
565
|
-
let text = this.getFormattedText(this.value);
|
|
566
|
-
text = this.replaceQuotes(text);
|
|
567
|
-
this._textInput.value = text;
|
|
568
|
-
}
|
|
569
533
|
//---------------------------------------------
|
|
570
534
|
// Lifecycle web component
|
|
571
535
|
//---------------------------------------------
|
|
@@ -597,9 +561,10 @@ const EzSearch = class {
|
|
|
597
561
|
core.ElementIDUtils.addIDInfoIfNotExists(elem, "itemSearch");
|
|
598
562
|
});
|
|
599
563
|
}
|
|
600
|
-
|
|
564
|
+
componentDidLoad() {
|
|
601
565
|
this._currentValue = this.value;
|
|
602
566
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
567
|
+
this.setInputValue(false);
|
|
603
568
|
this._resizeObserver = new ResizeObserver((entries) => {
|
|
604
569
|
window.requestAnimationFrame(() => {
|
|
605
570
|
if (!Array.isArray(entries) || !entries.length)
|
|
@@ -610,16 +575,6 @@ const EzSearch = class {
|
|
|
610
575
|
}
|
|
611
576
|
});
|
|
612
577
|
});
|
|
613
|
-
await this.handleInitialValue();
|
|
614
|
-
if (this.autoFocus) {
|
|
615
|
-
requestAnimationFrame(() => {
|
|
616
|
-
this.setFocus({ selectText: true });
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
disconnectedCallback() {
|
|
621
|
-
var _a;
|
|
622
|
-
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
623
578
|
}
|
|
624
579
|
//---------------------------------------------
|
|
625
580
|
// Event handlers
|
|
@@ -689,16 +644,12 @@ const EzSearch = class {
|
|
|
689
644
|
}
|
|
690
645
|
switch (event.key) {
|
|
691
646
|
case "ArrowDown":
|
|
692
|
-
event.stopPropagation();
|
|
693
|
-
if (this.canShowListOptions())
|
|
694
|
-
event.preventDefault();
|
|
695
647
|
this.nextOption();
|
|
648
|
+
event.stopPropagation();
|
|
696
649
|
break;
|
|
697
650
|
case "ArrowUp":
|
|
698
|
-
event.stopPropagation();
|
|
699
|
-
if (this.canShowListOptions())
|
|
700
|
-
event.preventDefault();
|
|
701
651
|
this.previousOption();
|
|
652
|
+
event.stopPropagation();
|
|
702
653
|
break;
|
|
703
654
|
case "Enter":
|
|
704
655
|
this.handleEventPropagation(event);
|
|
@@ -709,7 +660,7 @@ const EzSearch = class {
|
|
|
709
660
|
break;
|
|
710
661
|
case "Tab":
|
|
711
662
|
this._tabPressed = true;
|
|
712
|
-
this.controlListWithOnlyOne(
|
|
663
|
+
this.controlListWithOnlyOne();
|
|
713
664
|
break;
|
|
714
665
|
}
|
|
715
666
|
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9e5554cb.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const EzScrollDirection = require('./EzScrollDirection-b2c99895.js');
|
|
8
8
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9e5554cb.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezSplitButtonCss = ":host{--ez-split-button--min-width:24;--ez-split-button--width:'auto';--ez-split-button__medium--height:32px;--ez-split-button__large--height:42px;--ez-split-button__medium-icon--width:40px;--ez-split-button__large-icon--width:44px;--ez-split-button__inline__icon--gap:6px;--ez-split-button__label--padding-top:0px;--ez-split-button__label--padding-bottom:0px;--ez-split-button__right-button--padding-left:8px;--ez-split-button--color:var(--title--primary, #2B3A54);--ez-split-button--font-size:var(--text--small, 12px);--ez-split-button--font-family:var(--font-pattern, Arial);--ez-split-button--font-weight:var(--text-weight--large);--ez-split-button--background-color:var(--background--light, #ffffff);--ez-split-button--border-radius:var(--border--radius-large, 24px);--ez-split-button--border:1px solid var(--color--strokes);--ez-split-button--justify-content:center;--ez-split-button--hover-color:var(--color--primary-600, #007a5a);--ez-split-button--hover--background-color:var(--background--light, #ffffff);--ez-split-button--disabled-color:var(--text--
|
|
8
|
+
const ezSplitButtonCss = ":host{--ez-split-button--min-width:24;--ez-split-button--width:'auto';--ez-split-button__medium--height:32px;--ez-split-button__large--height:42px;--ez-split-button__medium-icon--width:40px;--ez-split-button__large-icon--width:44px;--ez-split-button__inline__icon--gap:6px;--ez-split-button__label--padding-top:0px;--ez-split-button__label--padding-bottom:0px;--ez-split-button__right-button--padding-left:8px;--ez-split-button--color:var(--title--primary, #2B3A54);--ez-split-button--font-size:var(--text--small, 12px);--ez-split-button--font-family:var(--font-pattern, Arial);--ez-split-button--font-weight:var(--text-weight--large);--ez-split-button--background-color:var(--background--light, #ffffff);--ez-split-button--border-radius:var(--border--radius-large, 24px);--ez-split-button--border:1px solid var(--color--strokes);--ez-split-button--justify-content:center;--ez-split-button--hover-color:var(--color--primary-600, #007a5a);--ez-split-button--hover--background-color:var(--background--light, #ffffff);--ez-split-button--disabled-color:var(--text--disable);--ez-split-button--disabled--background-color:var(--color--disable-secondary);--ez-split-button--focus--border:var(--border--medium, 2px) var(--color--primary-300);--ez-split-button--focus--box-shadow:none;--ez-split-button--active-color:var(--color--primary-700);--ez-split-button--active--background-color:var(--background--strong)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-split-button--min-width);width:var(--ez-split-button--width);height:var(--ez-split-button__medium--height);font-family:var(--ez-split-button--font-family);font-size:var(--ez-split-button--font-size);font-weight:var(--ez-split-button--font-weight);padding:var(--ez-split-button__label--padding-top) 0 var(--ez-split-button__label--padding-bottom) 0;border-top-left-radius:var(--ez-split-button--border-radius);border-bottom-left-radius:var(--ez-split-button--border-radius);background-color:var(--ez-split-button--background-color);color:var(--ez-split-button--color);fill:var(--ez-split-button--color);border:none;justify-content:var(--ez-split-button--justify-content)}label{cursor:pointer}button:active{outline:none;box-shadow:none;background-color:var(--ez-split-button--active--background-color);color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.ez-split-button__left-button{border:var(--ez-split-button--border);border-right:none}.ez-split-button__right-button{border:var(--ez-split-button--border);border-left:none}.ez-split-button__left-button:focus{box-shadow:0 0 0 2px var(--color--primary-300), \n 0 2px 0 0 var(--color--primary-300), \n 0 -2px 0 0 var(--color--primary-300);}.ez-split-button__right-button:focus{box-shadow:2px 0 0 0 var(--color--primary-300), \n 0 2px 0 0 var(--color--primary-300), \n 0 -2px 0 0 var(--color--primary-300);}.ez-split-button__left-button:hover,.ez-split-button__right-button:hover{outline:none;background-color:var(--ez-split-button--hover--background-color);color:var(--ez-split-button--hover-color);fill:var(--ez-split-button--hover-color);--ez-icon--color:var(--ez-split-button--hover-color)}.ez-split-button__left-button:active,.ez-split-button__right-button:active{outline:none;box-shadow:none;background-color:var(--ez-split-button--active--background-color);color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.ez-split-button__left-button:disabled,.ez-split-button__left-button:disabled label,.ez-split-button__right-button:disabled{background-color:var(--ez-split-button--disabled--background-color);color:var(--ez-split-button--disabled-color);fill:var(--ez-split-button--disabled-color);border:none;--ez-icon--color:var(--ez-split-button--disabled-color);cursor:not-allowed}.ez-split-button__left-button:disabled{border:var(--ez-split-button--disabled-border);border-right:none}.ez-split-button__right-button:disabled{border:var(--ez-split-button--disabled-border);border-left:none}button.large{height:var(--ez-split-button__large--height)}button.medium{height:var(--ez-split-button__medium--height)}.default label{padding:var(--ez-split-button__label--padding-top) 12px var(--ez-split-button__label--padding-bottom) 20px}.icon-left{gap:var(--ez-split-button__inline__icon--gap)}.icon-left label{padding-right:12px}.icon-left ez-icon{padding-left:20px}.icon-only{padding-left:12px;padding-right:12px}.ez-split-button__right-button{border-top-right-radius:var(--ez-split-button--border-radius);border-bottom-right-radius:var(--ez-split-button--border-radius);border-top-left-radius:0;border-bottom-left-radius:0;border-right:var(--ez-split-button--border)}.ez-split-button__right-button--medium{min-width:var(--ez-split-button__medium-icon--width)}.ez-split-button__right-button--large{min-width:var(--ez-split-button__large-icon--width)}.ez-split-button__right-button--divider{top:10%;bottom:10%}.ez-split-button__right-button--divider:before{content:\"\";position:absolute;left:0;border-left:1px solid rgba(0, 0, 0, 20%);border-radius:2px;height:75%}.btn-icon--medium{min-width:--ez-split-button__medium-icon--width}.btn-icon--large{min-width:--ez-split-button__large-icon--width}.ez-split-button__right-button-container{position:absolute;left:0;padding-left:var(--ez-split-button__right-button--padding-left)}.label-icon{display:flex;flex-direction:row;align-items:center;color:var(--ez-split-button--color)}.label-icon:active{color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.dropdown{display:flex}.dropdown-content{display:block;position:absolute;background-color:#f1f1f1;min-width:160px;z-index:--ez-elevation--8;border-radius:var(--ez-split-button--border-radius)}.dropdown-content>ez-dropdown{position:relative}";
|
|
9
9
|
|
|
10
10
|
const EzSplitButton = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9e5554cb.js');
|
|
6
6
|
require('./ApplicationUtils-c9d1205c.js');
|
|
7
7
|
const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
|
|
8
8
|
require('./DialogType-2114c337.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index$1 = require('./index-
|
|
5
|
+
const index$1 = require('./index-9e5554cb.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
8
|
var numeric = function (value, unit) { return Number(value.slice(0, -1 * unit.length)); };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9e5554cb.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
8
|
const ezTabselectorCss = "@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--tabselector--forward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.middle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;background-color:unset;min-width:100px;max-width:260px;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, \"Roboto\");font-size:var(--title--small, 14px);flex-shrink:0}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:\"\";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}.left-icon{padding-right:var(--space--small)}.right-icon{padding-left:var(--space--small)}";
|
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9e5554cb.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
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
|
|
8
|
+
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;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)}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{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}";
|
|
9
9
|
|
|
10
10
|
const EzTextArea = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
14
|
-
this.LINE_HEIGHT = 24;
|
|
15
|
-
this.HEIGHT_RATIO = 1.4;
|
|
16
14
|
this.label = undefined;
|
|
17
15
|
this.value = undefined;
|
|
18
16
|
this.enabled = true;
|
|
@@ -21,8 +19,6 @@ const EzTextArea = class {
|
|
|
21
19
|
this.canShowError = true;
|
|
22
20
|
this.mode = "regular";
|
|
23
21
|
this.enableResize = false;
|
|
24
|
-
this.autoRows = false;
|
|
25
|
-
this.autoFocus = false;
|
|
26
22
|
}
|
|
27
23
|
observeErrorMessage() {
|
|
28
24
|
var _a, _b, _c, _d;
|
|
@@ -60,17 +56,8 @@ const EzTextArea = class {
|
|
|
60
56
|
observeRows() {
|
|
61
57
|
const rows = this.rows > 0 ? this.rows : this.mode != "slim" ? 4 : 2;
|
|
62
58
|
if (rows !== this.rows) {
|
|
63
|
-
this.
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
observeAutoRows() {
|
|
67
|
-
var _a, _b;
|
|
68
|
-
if (this.autoRows) {
|
|
69
|
-
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
70
|
-
this.initializeResizeObserver();
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
(_b = this._resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
59
|
+
this.rows = rows;
|
|
60
|
+
this._initialRows = rows;
|
|
74
61
|
}
|
|
75
62
|
}
|
|
76
63
|
//---------------------------------------------
|
|
@@ -139,42 +126,6 @@ const EzTextArea = class {
|
|
|
139
126
|
isFocused() {
|
|
140
127
|
return this._hostElement.shadowRoot.activeElement !== null;
|
|
141
128
|
}
|
|
142
|
-
updateRows(newRows) {
|
|
143
|
-
this.rows = newRows;
|
|
144
|
-
this._initialRows = newRows;
|
|
145
|
-
}
|
|
146
|
-
calculateMaxRows() {
|
|
147
|
-
const parentElement = this._hostElement.parentElement;
|
|
148
|
-
if (!parentElement) {
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
const height = Math.max((parentElement === null || parentElement === void 0 ? void 0 : parentElement.clientHeight) || 0, this.LINE_HEIGHT);
|
|
152
|
-
if (height > 0) {
|
|
153
|
-
const maxRows = Math.floor(height / this.LINE_HEIGHT * this.HEIGHT_RATIO);
|
|
154
|
-
if (maxRows !== this.rows) {
|
|
155
|
-
this.updateRows(maxRows);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
initializeResizeObserver() {
|
|
160
|
-
if (!this.autoRows) {
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
const parentElement = this._hostElement.parentElement;
|
|
164
|
-
if (parentElement) {
|
|
165
|
-
try {
|
|
166
|
-
if (this._resizeObserver != undefined) {
|
|
167
|
-
this._resizeObserver.unobserve(parentElement);
|
|
168
|
-
}
|
|
169
|
-
this._resizeObserver = new ResizeObserver(this.calculateMaxRows.bind(this));
|
|
170
|
-
this._resizeObserver.observe(parentElement);
|
|
171
|
-
}
|
|
172
|
-
catch (e) {
|
|
173
|
-
console.warn(e);
|
|
174
|
-
}
|
|
175
|
-
this.calculateMaxRows();
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
129
|
//---------------------------------------------
|
|
179
130
|
// Event handlers
|
|
180
131
|
//---------------------------------------------
|
|
@@ -197,13 +148,6 @@ const EzTextArea = class {
|
|
|
197
148
|
this._container.classList.add("textarea--focus");
|
|
198
149
|
}
|
|
199
150
|
}
|
|
200
|
-
connectedCallback() {
|
|
201
|
-
this.initializeResizeObserver();
|
|
202
|
-
}
|
|
203
|
-
disconnectedCallback() {
|
|
204
|
-
var _a;
|
|
205
|
-
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
206
|
-
}
|
|
207
151
|
//---------------------------------------------
|
|
208
152
|
// Lifecycle web component
|
|
209
153
|
//---------------------------------------------
|
|
@@ -211,11 +155,6 @@ const EzTextArea = class {
|
|
|
211
155
|
this.observeErrorMessage();
|
|
212
156
|
this.adjustFloatingLabel();
|
|
213
157
|
this.observeMode();
|
|
214
|
-
if (this.autoFocus) {
|
|
215
|
-
requestAnimationFrame(() => {
|
|
216
|
-
this.setFocus();
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
158
|
}
|
|
220
159
|
render() {
|
|
221
160
|
core.ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
@@ -232,8 +171,7 @@ const EzTextArea = class {
|
|
|
232
171
|
"errorMessage": ["observeErrorMessage"],
|
|
233
172
|
"value": ["observeValue"],
|
|
234
173
|
"mode": ["observeMode"],
|
|
235
|
-
"rows": ["observeRows"]
|
|
236
|
-
"autoRows": ["observeAutoRows"]
|
|
174
|
+
"rows": ["observeRows"]
|
|
237
175
|
}; }
|
|
238
176
|
};
|
|
239
177
|
EzTextArea.style = ezTextAreaCss;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9e5554cb.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width: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--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-
|
|
8
|
+
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input__icon--left--width:var(--ez-text-input__icon--width);--ez-text-input__icon--right--width:var(--ez-text-input__icon--width);--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--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__message_box--font-size:var(--text--extra-small, 10px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--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);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);text-overflow:ellipsis;overflow:hidden}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--left--width)}input.icon--right{padding-right:var(--ez-text-input__icon--right--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:disabled,input:read-only{cursor:not-allowed}.message-box{min-height:14px;min-width:100%;margin-top:3px;line-height:10px;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);cursor:not-allowed}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--left--width) + 2px);width:calc(100% - (var(--ez-text-input__icon--right--width) + var(--ez-text-input__icon--left--width)))}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--left--width) + 2px);width:calc(100% - var(--ez-text-input__icon--left--width))}.input__label--right{right:var(--ez-text-input__icon--right--width);width:calc(100% - var(--ez-text-input__icon--right--width))}.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,.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)}";
|
|
9
9
|
|
|
10
10
|
const EzTextInput = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -16,13 +16,11 @@ const EzTextInput = class {
|
|
|
16
16
|
this.enabled = true;
|
|
17
17
|
this.errorMessage = undefined;
|
|
18
18
|
this.mask = undefined;
|
|
19
|
-
this.cleanValueMask = false;
|
|
20
19
|
this.canShowError = true;
|
|
21
20
|
this.restrict = undefined;
|
|
22
21
|
this.mode = "regular";
|
|
23
22
|
this.noBorder = false;
|
|
24
23
|
this.password = false;
|
|
25
|
-
this.autoFocus = false;
|
|
26
24
|
}
|
|
27
25
|
observeErrorMessage() {
|
|
28
26
|
if (this._inputElem) {
|
|
@@ -132,12 +130,7 @@ const EzTextInput = class {
|
|
|
132
130
|
const value = this._inputElem.value;
|
|
133
131
|
if (value && this._maskFormatter) {
|
|
134
132
|
try {
|
|
135
|
-
|
|
136
|
-
this.applyMask(value);
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
this._inputElem.value = this._maskFormatter.format(value);
|
|
140
|
-
}
|
|
133
|
+
this._inputElem.value = this._maskFormatter.format(value);
|
|
141
134
|
}
|
|
142
135
|
catch (e) {
|
|
143
136
|
this.errorMessage = e.message;
|
|
@@ -155,34 +148,8 @@ const EzTextInput = class {
|
|
|
155
148
|
}
|
|
156
149
|
controlChangeValue() {
|
|
157
150
|
if (this._inputElem && (this.value || '') !== this._inputElem.value) {
|
|
158
|
-
|
|
159
|
-
this.value = this._maskFormatter.removeMask(this._inputElem.value);
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
this.value = this._inputElem.value;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
applyMask(value) {
|
|
167
|
-
if (!value || value === "")
|
|
168
|
-
return value;
|
|
169
|
-
if (this._maskFormatter) {
|
|
170
|
-
try {
|
|
171
|
-
const formattedValue = this._maskFormatter.applyMask(this._maskFormatter.removeMask(value));
|
|
172
|
-
if (this._inputElem) {
|
|
173
|
-
this._inputElem.value = formattedValue;
|
|
174
|
-
return this._inputElem.value;
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
this.value = formattedValue;
|
|
178
|
-
return this.value;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
catch (e) {
|
|
182
|
-
this.errorMessage = e.message;
|
|
183
|
-
}
|
|
151
|
+
this.value = this._inputElem.value;
|
|
184
152
|
}
|
|
185
|
-
return value;
|
|
186
153
|
}
|
|
187
154
|
handleChange() {
|
|
188
155
|
if (!this._inputElem) {
|
|
@@ -207,9 +174,9 @@ const EzTextInput = class {
|
|
|
207
174
|
content.style.justifyContent = "center";
|
|
208
175
|
content.style.overflow = "hidden";
|
|
209
176
|
content.style.top = "0px";
|
|
210
|
-
content.style.width = "var(--ez-text-input__icon--width)";
|
|
211
177
|
content.style.height = this.mode != "slim" ? "var(--ez-text-input--height)" : "var(--ez-text-input--height--slim)";
|
|
212
178
|
if (slot.name == "leftIcon") {
|
|
179
|
+
content.style.width = "var(--ez-text-input__icon--left--width)";
|
|
213
180
|
content.style.left = "0px";
|
|
214
181
|
content.style.borderRadius = "var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)";
|
|
215
182
|
this._inputElem.classList.add("icon--left");
|
|
@@ -219,6 +186,7 @@ const EzTextInput = class {
|
|
|
219
186
|
this._contentLeftSlot = content;
|
|
220
187
|
}
|
|
221
188
|
else if (slot.name == "rightIcon") {
|
|
189
|
+
content.style.width = "var(--ez-text-input__icon--right--width)";
|
|
222
190
|
content.style.right = "0px";
|
|
223
191
|
content.style.borderRadius = "0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0";
|
|
224
192
|
this._inputElem.classList.add("icon--right");
|
|
@@ -244,11 +212,6 @@ const EzTextInput = class {
|
|
|
244
212
|
this.observeMask();
|
|
245
213
|
this.adjustFloatingLabel();
|
|
246
214
|
this.adjustBorderInput();
|
|
247
|
-
if (this.autoFocus) {
|
|
248
|
-
requestAnimationFrame(() => {
|
|
249
|
-
this.setFocus({ selectText: true });
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
215
|
this._inputElem.addEventListener('focus', () => {
|
|
253
216
|
this._inputElem.setSelectionRange(0, this._inputElem.value.length);
|
|
254
217
|
});
|
|
@@ -258,12 +221,7 @@ const EzTextInput = class {
|
|
|
258
221
|
if (this.value) {
|
|
259
222
|
if (this._maskFormatter) {
|
|
260
223
|
try {
|
|
261
|
-
|
|
262
|
-
this.applyMask(this.value);
|
|
263
|
-
}
|
|
264
|
-
else {
|
|
265
|
-
this.value = this._maskFormatter.format(this.value);
|
|
266
|
-
}
|
|
224
|
+
this.value = this._maskFormatter.format(this.value);
|
|
267
225
|
}
|
|
268
226
|
catch (e) {
|
|
269
227
|
this.errorMessage = e.message;
|
|
@@ -279,7 +237,7 @@ const EzTextInput = class {
|
|
|
279
237
|
core.ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
280
238
|
return (index.h(index.Host, { style: this._hostElement.classList.contains("grid_editor") ? { "height": "100%" } : null }, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
281
239
|
index.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)
|
|
282
|
-
: null, index.h("input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: this.password ? "password" : "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.
|
|
240
|
+
: null, index.h("input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: this.password ? "password" : "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
283
241
|
index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage, "data-element-id": core.ElementIDUtils.getInternalIDInfo("message_box") }, this.errorMessage)));
|
|
284
242
|
}
|
|
285
243
|
get _hostElement() { return index.getElement(this); }
|