@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5a720e56.js';
|
|
2
2
|
import { C as CSSVarsUtils } from './CSSVarsUtils-71ce76be.js';
|
|
3
3
|
import { ObjectUtils, StringUtils, FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
|
|
4
4
|
import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
|
|
@@ -46,8 +46,7 @@ const EzSearch = class {
|
|
|
46
46
|
this.options = undefined;
|
|
47
47
|
this.suppressSearch = false;
|
|
48
48
|
this.ensureClearButtonVisible = false;
|
|
49
|
-
this.suppressPreLoad =
|
|
50
|
-
this.autoFocus = false;
|
|
49
|
+
this.suppressPreLoad = false;
|
|
51
50
|
}
|
|
52
51
|
observeErrorMessage() {
|
|
53
52
|
var _a;
|
|
@@ -58,25 +57,12 @@ const EzSearch = class {
|
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
|
-
getValue(val) {
|
|
62
|
-
return typeof val === 'object' ? val === null || val === void 0 ? void 0 : val.value : val;
|
|
63
|
-
}
|
|
64
60
|
validateNewValue(newValue, oldValue) {
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
const newValueIsValid = parsedNewValue !== "[object Object]" && !!parsedNewValue;
|
|
68
|
-
const oldValueIsValid = parsedOldValue !== "[object Object]" && !!parsedOldValue;
|
|
69
|
-
const valuesIsDifferent = parsedNewValue !== parsedOldValue;
|
|
70
|
-
if (!oldValueIsValid && newValueIsValid) {
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
if (newValueIsValid && oldValueIsValid && valuesIsDifferent) {
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
return false;
|
|
61
|
+
const getValue = (val) => typeof val === 'object' ? val === null || val === void 0 ? void 0 : val.value : val;
|
|
62
|
+
return (getValue(newValue) !== getValue(oldValue));
|
|
77
63
|
}
|
|
78
64
|
async observeValue(newValue, oldValue) {
|
|
79
|
-
if (this._textInput && this.validateNewValue(newValue, oldValue)) {
|
|
65
|
+
if (this._textInput && newValue !== oldValue && this.validateNewValue(newValue, oldValue)) {
|
|
80
66
|
if (typeof newValue === "string") {
|
|
81
67
|
await this.handleValueAsString(newValue);
|
|
82
68
|
return;
|
|
@@ -119,9 +105,9 @@ const EzSearch = class {
|
|
|
119
105
|
/**
|
|
120
106
|
* Aplica o foco no campo.
|
|
121
107
|
*/
|
|
122
|
-
async setFocus(
|
|
108
|
+
async setFocus() {
|
|
123
109
|
if (this._textInput) {
|
|
124
|
-
this._textInput.setFocus(
|
|
110
|
+
this._textInput.setFocus();
|
|
125
111
|
}
|
|
126
112
|
}
|
|
127
113
|
/**
|
|
@@ -164,9 +150,6 @@ const EzSearch = class {
|
|
|
164
150
|
return;
|
|
165
151
|
}
|
|
166
152
|
await this.loadDescriptionValue(value);
|
|
167
|
-
if (!this._currentValue) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
153
|
this.setInputValue();
|
|
171
154
|
this.ezChange.emit(this.value);
|
|
172
155
|
this._currentValue = this.value;
|
|
@@ -222,7 +205,7 @@ const EzSearch = class {
|
|
|
222
205
|
return;
|
|
223
206
|
}
|
|
224
207
|
let text = (!this.showSelectedValue || currentValue.value == undefined) ? currentValue.label : currentValue.label ? `${currentValue.value} - ${currentValue.label}` : currentValue.value;
|
|
225
|
-
text = text
|
|
208
|
+
text = text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
|
|
226
209
|
return text;
|
|
227
210
|
}
|
|
228
211
|
getText() {
|
|
@@ -382,7 +365,7 @@ const EzSearch = class {
|
|
|
382
365
|
this.updateVisibleOptions();
|
|
383
366
|
if (this._tabPressed) {
|
|
384
367
|
this._tabPressed = false;
|
|
385
|
-
this.controlEmptySearch(
|
|
368
|
+
this.controlEmptySearch();
|
|
386
369
|
}
|
|
387
370
|
}
|
|
388
371
|
else {
|
|
@@ -397,16 +380,15 @@ const EzSearch = class {
|
|
|
397
380
|
replaceHighlight(value) {
|
|
398
381
|
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
399
382
|
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
400
|
-
return
|
|
383
|
+
return (value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
401
384
|
}
|
|
402
|
-
selectOption(newOption
|
|
385
|
+
selectOption(newOption) {
|
|
403
386
|
var _a, _b;
|
|
404
387
|
const currentValue = this.getSelectedOption(this.value);
|
|
405
388
|
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) });
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
const adjustedOpt = !(newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) ? undefined : newOptionsFormatted;
|
|
389
|
+
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()))
|
|
390
|
+
|| (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
|
|
391
|
+
const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
|
|
410
392
|
this.value = adjustedOpt;
|
|
411
393
|
this._currentValue = adjustedOpt;
|
|
412
394
|
}
|
|
@@ -416,11 +398,6 @@ const EzSearch = class {
|
|
|
416
398
|
}
|
|
417
399
|
this._visibleOptions = [];
|
|
418
400
|
this.clearSource();
|
|
419
|
-
if (focusOnInput) {
|
|
420
|
-
setTimeout(() => {
|
|
421
|
-
this.setFocus();
|
|
422
|
-
}, 0);
|
|
423
|
-
}
|
|
424
401
|
}
|
|
425
402
|
loadOptions(mode, argument = "") {
|
|
426
403
|
this._criteria = argument;
|
|
@@ -457,7 +434,7 @@ const EzSearch = class {
|
|
|
457
434
|
this.value = null;
|
|
458
435
|
this._currentValue = null;
|
|
459
436
|
}
|
|
460
|
-
controlListWithOnlyOne(
|
|
437
|
+
controlListWithOnlyOne() {
|
|
461
438
|
var _a, _b;
|
|
462
439
|
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
463
440
|
if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
|
|
@@ -468,17 +445,17 @@ const EzSearch = class {
|
|
|
468
445
|
value: (_b = source[0].value) === null || _b === void 0 ? void 0 : _b.replace(startHighlight, '').replace(endHighlight, ''),
|
|
469
446
|
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
470
447
|
};
|
|
471
|
-
this.selectOption(option
|
|
448
|
+
this.selectOption(option);
|
|
472
449
|
}
|
|
473
450
|
}
|
|
474
|
-
controlEmptySearch(
|
|
451
|
+
controlEmptySearch() {
|
|
475
452
|
var _a;
|
|
476
453
|
if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
477
454
|
this.clearSearch();
|
|
478
455
|
ApplicationUtils.info(this._textEmptyList);
|
|
479
456
|
}
|
|
480
457
|
else {
|
|
481
|
-
this.controlListWithOnlyOne(
|
|
458
|
+
this.controlListWithOnlyOne();
|
|
482
459
|
}
|
|
483
460
|
}
|
|
484
461
|
async loadDescriptionValue(argument) {
|
|
@@ -549,19 +526,6 @@ const EzSearch = class {
|
|
|
549
526
|
this._preSelection = undefined;
|
|
550
527
|
this.updateVisibleOptions();
|
|
551
528
|
}
|
|
552
|
-
async handleInitialValue() {
|
|
553
|
-
const valueIsValid = !!this.getValue(this.value);
|
|
554
|
-
if (!valueIsValid) {
|
|
555
|
-
return;
|
|
556
|
-
}
|
|
557
|
-
if (typeof this.value === "string") {
|
|
558
|
-
await this.handleValueAsString(this.value);
|
|
559
|
-
return;
|
|
560
|
-
}
|
|
561
|
-
let text = this.getFormattedText(this.value);
|
|
562
|
-
text = this.replaceQuotes(text);
|
|
563
|
-
this._textInput.value = text;
|
|
564
|
-
}
|
|
565
529
|
//---------------------------------------------
|
|
566
530
|
// Lifecycle web component
|
|
567
531
|
//---------------------------------------------
|
|
@@ -593,9 +557,10 @@ const EzSearch = class {
|
|
|
593
557
|
ElementIDUtils.addIDInfoIfNotExists(elem, "itemSearch");
|
|
594
558
|
});
|
|
595
559
|
}
|
|
596
|
-
|
|
560
|
+
componentDidLoad() {
|
|
597
561
|
this._currentValue = this.value;
|
|
598
562
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
563
|
+
this.setInputValue(false);
|
|
599
564
|
this._resizeObserver = new ResizeObserver((entries) => {
|
|
600
565
|
window.requestAnimationFrame(() => {
|
|
601
566
|
if (!Array.isArray(entries) || !entries.length)
|
|
@@ -606,16 +571,6 @@ const EzSearch = class {
|
|
|
606
571
|
}
|
|
607
572
|
});
|
|
608
573
|
});
|
|
609
|
-
await this.handleInitialValue();
|
|
610
|
-
if (this.autoFocus) {
|
|
611
|
-
requestAnimationFrame(() => {
|
|
612
|
-
this.setFocus({ selectText: true });
|
|
613
|
-
});
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
disconnectedCallback() {
|
|
617
|
-
var _a;
|
|
618
|
-
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
619
574
|
}
|
|
620
575
|
//---------------------------------------------
|
|
621
576
|
// Event handlers
|
|
@@ -685,16 +640,12 @@ const EzSearch = class {
|
|
|
685
640
|
}
|
|
686
641
|
switch (event.key) {
|
|
687
642
|
case "ArrowDown":
|
|
688
|
-
event.stopPropagation();
|
|
689
|
-
if (this.canShowListOptions())
|
|
690
|
-
event.preventDefault();
|
|
691
643
|
this.nextOption();
|
|
644
|
+
event.stopPropagation();
|
|
692
645
|
break;
|
|
693
646
|
case "ArrowUp":
|
|
694
|
-
event.stopPropagation();
|
|
695
|
-
if (this.canShowListOptions())
|
|
696
|
-
event.preventDefault();
|
|
697
647
|
this.previousOption();
|
|
648
|
+
event.stopPropagation();
|
|
698
649
|
break;
|
|
699
650
|
case "Enter":
|
|
700
651
|
this.handleEventPropagation(event);
|
|
@@ -705,7 +656,7 @@ const EzSearch = class {
|
|
|
705
656
|
break;
|
|
706
657
|
case "Tab":
|
|
707
658
|
this._tabPressed = true;
|
|
708
|
-
this.controlListWithOnlyOne(
|
|
659
|
+
this.controlListWithOnlyOne();
|
|
709
660
|
break;
|
|
710
661
|
}
|
|
711
662
|
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5a720e56.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { E as EzScrollDirection } from './EzScrollDirection-2df26c93.js';
|
|
4
4
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-5a720e56.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
|
-
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--
|
|
4
|
+
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}";
|
|
5
5
|
|
|
6
6
|
const EzSplitButton = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-5a720e56.js';
|
|
2
2
|
import './ApplicationUtils-eaf91331.js';
|
|
3
3
|
import { C as CSSVarsUtils } from './CSSVarsUtils-71ce76be.js';
|
|
4
4
|
import './DialogType-54a62731.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-5a720e56.js';
|
|
2
2
|
import { StringUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
var numeric = function (value, unit) { return Number(value.slice(0, -1 * unit.length)); };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5a720e56.js';
|
|
2
2
|
import { ElementIDUtils, StringUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
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)}";
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5a720e56.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
|
-
const ezTextAreaCss = ":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--medium, 400);--text-area--color:var(--title--primary, #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
|
|
4
|
+
const ezTextAreaCss = ":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--medium, 400);--text-area--color:var(--title--primary, #2B3A54);--text-area__input--background-color:var(--background--light, #FFFFFF);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--color--strokes,#DCE0E8);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--background--medium, #F0F3F7);--text-area__input--disabled--color:var(--text--primary, #626E82);--text-area__input--disabled--border--color:var(--color--strokes,#DCE0E8);--text-area__input--error--border-color:var(--color-alert--error-800,#BD0025);--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color-alert--error-800,#BD0025);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;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}";
|
|
5
5
|
|
|
6
6
|
const EzTextArea = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
10
|
-
this.LINE_HEIGHT = 24;
|
|
11
|
-
this.HEIGHT_RATIO = 1.4;
|
|
12
10
|
this.label = undefined;
|
|
13
11
|
this.value = undefined;
|
|
14
12
|
this.enabled = true;
|
|
@@ -17,8 +15,6 @@ const EzTextArea = class {
|
|
|
17
15
|
this.canShowError = true;
|
|
18
16
|
this.mode = "regular";
|
|
19
17
|
this.enableResize = false;
|
|
20
|
-
this.autoRows = false;
|
|
21
|
-
this.autoFocus = false;
|
|
22
18
|
}
|
|
23
19
|
observeErrorMessage() {
|
|
24
20
|
var _a, _b, _c, _d;
|
|
@@ -56,17 +52,8 @@ const EzTextArea = class {
|
|
|
56
52
|
observeRows() {
|
|
57
53
|
const rows = this.rows > 0 ? this.rows : this.mode != "slim" ? 4 : 2;
|
|
58
54
|
if (rows !== this.rows) {
|
|
59
|
-
this.
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
observeAutoRows() {
|
|
63
|
-
var _a, _b;
|
|
64
|
-
if (this.autoRows) {
|
|
65
|
-
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
66
|
-
this.initializeResizeObserver();
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
(_b = this._resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
55
|
+
this.rows = rows;
|
|
56
|
+
this._initialRows = rows;
|
|
70
57
|
}
|
|
71
58
|
}
|
|
72
59
|
//---------------------------------------------
|
|
@@ -135,42 +122,6 @@ const EzTextArea = class {
|
|
|
135
122
|
isFocused() {
|
|
136
123
|
return this._hostElement.shadowRoot.activeElement !== null;
|
|
137
124
|
}
|
|
138
|
-
updateRows(newRows) {
|
|
139
|
-
this.rows = newRows;
|
|
140
|
-
this._initialRows = newRows;
|
|
141
|
-
}
|
|
142
|
-
calculateMaxRows() {
|
|
143
|
-
const parentElement = this._hostElement.parentElement;
|
|
144
|
-
if (!parentElement) {
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
const height = Math.max((parentElement === null || parentElement === void 0 ? void 0 : parentElement.clientHeight) || 0, this.LINE_HEIGHT);
|
|
148
|
-
if (height > 0) {
|
|
149
|
-
const maxRows = Math.floor(height / this.LINE_HEIGHT * this.HEIGHT_RATIO);
|
|
150
|
-
if (maxRows !== this.rows) {
|
|
151
|
-
this.updateRows(maxRows);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
initializeResizeObserver() {
|
|
156
|
-
if (!this.autoRows) {
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
const parentElement = this._hostElement.parentElement;
|
|
160
|
-
if (parentElement) {
|
|
161
|
-
try {
|
|
162
|
-
if (this._resizeObserver != undefined) {
|
|
163
|
-
this._resizeObserver.unobserve(parentElement);
|
|
164
|
-
}
|
|
165
|
-
this._resizeObserver = new ResizeObserver(this.calculateMaxRows.bind(this));
|
|
166
|
-
this._resizeObserver.observe(parentElement);
|
|
167
|
-
}
|
|
168
|
-
catch (e) {
|
|
169
|
-
console.warn(e);
|
|
170
|
-
}
|
|
171
|
-
this.calculateMaxRows();
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
125
|
//---------------------------------------------
|
|
175
126
|
// Event handlers
|
|
176
127
|
//---------------------------------------------
|
|
@@ -193,13 +144,6 @@ const EzTextArea = class {
|
|
|
193
144
|
this._container.classList.add("textarea--focus");
|
|
194
145
|
}
|
|
195
146
|
}
|
|
196
|
-
connectedCallback() {
|
|
197
|
-
this.initializeResizeObserver();
|
|
198
|
-
}
|
|
199
|
-
disconnectedCallback() {
|
|
200
|
-
var _a;
|
|
201
|
-
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
202
|
-
}
|
|
203
147
|
//---------------------------------------------
|
|
204
148
|
// Lifecycle web component
|
|
205
149
|
//---------------------------------------------
|
|
@@ -207,11 +151,6 @@ const EzTextArea = class {
|
|
|
207
151
|
this.observeErrorMessage();
|
|
208
152
|
this.adjustFloatingLabel();
|
|
209
153
|
this.observeMode();
|
|
210
|
-
if (this.autoFocus) {
|
|
211
|
-
requestAnimationFrame(() => {
|
|
212
|
-
this.setFocus();
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
154
|
}
|
|
216
155
|
render() {
|
|
217
156
|
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
@@ -228,8 +167,7 @@ const EzTextArea = class {
|
|
|
228
167
|
"errorMessage": ["observeErrorMessage"],
|
|
229
168
|
"value": ["observeValue"],
|
|
230
169
|
"mode": ["observeMode"],
|
|
231
|
-
"rows": ["observeRows"]
|
|
232
|
-
"autoRows": ["observeAutoRows"]
|
|
170
|
+
"rows": ["observeRows"]
|
|
233
171
|
}; }
|
|
234
172
|
};
|
|
235
173
|
EzTextArea.style = ezTextAreaCss;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5a720e56.js';
|
|
2
2
|
import { MaskFormatter, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
|
-
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width: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-
|
|
4
|
+
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)}";
|
|
5
5
|
|
|
6
6
|
const EzTextInput = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -12,13 +12,11 @@ const EzTextInput = class {
|
|
|
12
12
|
this.enabled = true;
|
|
13
13
|
this.errorMessage = undefined;
|
|
14
14
|
this.mask = undefined;
|
|
15
|
-
this.cleanValueMask = false;
|
|
16
15
|
this.canShowError = true;
|
|
17
16
|
this.restrict = undefined;
|
|
18
17
|
this.mode = "regular";
|
|
19
18
|
this.noBorder = false;
|
|
20
19
|
this.password = false;
|
|
21
|
-
this.autoFocus = false;
|
|
22
20
|
}
|
|
23
21
|
observeErrorMessage() {
|
|
24
22
|
if (this._inputElem) {
|
|
@@ -128,12 +126,7 @@ const EzTextInput = class {
|
|
|
128
126
|
const value = this._inputElem.value;
|
|
129
127
|
if (value && this._maskFormatter) {
|
|
130
128
|
try {
|
|
131
|
-
|
|
132
|
-
this.applyMask(value);
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
this._inputElem.value = this._maskFormatter.format(value);
|
|
136
|
-
}
|
|
129
|
+
this._inputElem.value = this._maskFormatter.format(value);
|
|
137
130
|
}
|
|
138
131
|
catch (e) {
|
|
139
132
|
this.errorMessage = e.message;
|
|
@@ -151,34 +144,8 @@ const EzTextInput = class {
|
|
|
151
144
|
}
|
|
152
145
|
controlChangeValue() {
|
|
153
146
|
if (this._inputElem && (this.value || '') !== this._inputElem.value) {
|
|
154
|
-
|
|
155
|
-
this.value = this._maskFormatter.removeMask(this._inputElem.value);
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
this.value = this._inputElem.value;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
applyMask(value) {
|
|
163
|
-
if (!value || value === "")
|
|
164
|
-
return value;
|
|
165
|
-
if (this._maskFormatter) {
|
|
166
|
-
try {
|
|
167
|
-
const formattedValue = this._maskFormatter.applyMask(this._maskFormatter.removeMask(value));
|
|
168
|
-
if (this._inputElem) {
|
|
169
|
-
this._inputElem.value = formattedValue;
|
|
170
|
-
return this._inputElem.value;
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
this.value = formattedValue;
|
|
174
|
-
return this.value;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
catch (e) {
|
|
178
|
-
this.errorMessage = e.message;
|
|
179
|
-
}
|
|
147
|
+
this.value = this._inputElem.value;
|
|
180
148
|
}
|
|
181
|
-
return value;
|
|
182
149
|
}
|
|
183
150
|
handleChange() {
|
|
184
151
|
if (!this._inputElem) {
|
|
@@ -203,9 +170,9 @@ const EzTextInput = class {
|
|
|
203
170
|
content.style.justifyContent = "center";
|
|
204
171
|
content.style.overflow = "hidden";
|
|
205
172
|
content.style.top = "0px";
|
|
206
|
-
content.style.width = "var(--ez-text-input__icon--width)";
|
|
207
173
|
content.style.height = this.mode != "slim" ? "var(--ez-text-input--height)" : "var(--ez-text-input--height--slim)";
|
|
208
174
|
if (slot.name == "leftIcon") {
|
|
175
|
+
content.style.width = "var(--ez-text-input__icon--left--width)";
|
|
209
176
|
content.style.left = "0px";
|
|
210
177
|
content.style.borderRadius = "var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)";
|
|
211
178
|
this._inputElem.classList.add("icon--left");
|
|
@@ -215,6 +182,7 @@ const EzTextInput = class {
|
|
|
215
182
|
this._contentLeftSlot = content;
|
|
216
183
|
}
|
|
217
184
|
else if (slot.name == "rightIcon") {
|
|
185
|
+
content.style.width = "var(--ez-text-input__icon--right--width)";
|
|
218
186
|
content.style.right = "0px";
|
|
219
187
|
content.style.borderRadius = "0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0";
|
|
220
188
|
this._inputElem.classList.add("icon--right");
|
|
@@ -240,11 +208,6 @@ const EzTextInput = class {
|
|
|
240
208
|
this.observeMask();
|
|
241
209
|
this.adjustFloatingLabel();
|
|
242
210
|
this.adjustBorderInput();
|
|
243
|
-
if (this.autoFocus) {
|
|
244
|
-
requestAnimationFrame(() => {
|
|
245
|
-
this.setFocus({ selectText: true });
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
211
|
this._inputElem.addEventListener('focus', () => {
|
|
249
212
|
this._inputElem.setSelectionRange(0, this._inputElem.value.length);
|
|
250
213
|
});
|
|
@@ -254,12 +217,7 @@ const EzTextInput = class {
|
|
|
254
217
|
if (this.value) {
|
|
255
218
|
if (this._maskFormatter) {
|
|
256
219
|
try {
|
|
257
|
-
|
|
258
|
-
this.applyMask(this.value);
|
|
259
|
-
}
|
|
260
|
-
else {
|
|
261
|
-
this.value = this._maskFormatter.format(this.value);
|
|
262
|
-
}
|
|
220
|
+
this.value = this._maskFormatter.format(this.value);
|
|
263
221
|
}
|
|
264
222
|
catch (e) {
|
|
265
223
|
this.errorMessage = e.message;
|
|
@@ -275,7 +233,7 @@ const EzTextInput = class {
|
|
|
275
233
|
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
276
234
|
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" ?
|
|
277
235
|
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)
|
|
278
|
-
: null, h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: this.password ? "password" : "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.
|
|
236
|
+
: null, h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: this.password ? "password" : "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.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" &&
|
|
279
237
|
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage, "data-element-id": ElementIDUtils.getInternalIDInfo("message_box") }, this.errorMessage)));
|
|
280
238
|
}
|
|
281
239
|
get _hostElement() { return getElement(this); }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5a720e56.js';
|
|
2
2
|
import { TimeFormatter, MaskFormatter, NumberUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { C as CSSVarsUtils } from './CSSVarsUtils-71ce76be.js';
|
|
4
4
|
|
|
@@ -17,7 +17,6 @@ const EzTimeInput = class {
|
|
|
17
17
|
this.showSeconds = false;
|
|
18
18
|
this.mode = "regular";
|
|
19
19
|
this.canShowError = true;
|
|
20
|
-
this.autoFocus = false;
|
|
21
20
|
}
|
|
22
21
|
observeErrorMessage() {
|
|
23
22
|
var _a;
|
|
@@ -138,11 +137,6 @@ const EzTimeInput = class {
|
|
|
138
137
|
//---------------------------------------------
|
|
139
138
|
componentDidLoad() {
|
|
140
139
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
141
|
-
if (this.autoFocus) {
|
|
142
|
-
requestAnimationFrame(() => {
|
|
143
|
-
this.setFocus({ selectText: true });
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
140
|
}
|
|
147
141
|
componentWillLoad() {
|
|
148
142
|
this.observeShowSeconds();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, f as forceUpdate, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, f as forceUpdate, h, H as Host, g as getElement } from './index-5a720e56.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezToastCss = ":host{--ez-toast__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--ez-toast__container--z-index:var(--elevation--100, 100);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__container--left:var(--space--large, 24px);--ez-toast__container--bottom:var(--space--large, 24px);--ez-toast__container--width:400px;--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;box-sizing:border-box;border-radius:6px;align-items:center;padding:12px;visibility:hidden;width:var(--ez-toast__container--width);left:var(--ez-toast__container--left);bottom:var(--ez-toast__container--bottom);z-index:var(--ez-toast__container--z-index);background-color:var(--ez-toast__container--background-color)}.message__container{text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:4;display:-webkit-box;text-overflow:ellipsis;font-family:var(--font-pattern, \"Roboto\")}.message__container--icon{width:80%;padding-left:var(--ez-toast__icon--padding-left)}.btn-close{margin-top:3px;display:flex;justify-content:flex-end;align-self:flex-start;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--ez-toast__btn__close__image);mask-image:var(--ez-toast__btn__close__image)}.toast__container--opened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@-webkit-keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}@keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, r as registerInstance, c as createEvent, f as forceUpdate, H as Host, g as getElement } from './index-
|
|
1
|
+
import { h, r as registerInstance, c as createEvent, f as forceUpdate, H as Host, g as getElement } from './index-5a720e56.js';
|
|
2
2
|
import { ElementIDUtils, StringUtils, ObjectUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ICON_EXPANDED = "chevron-down";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, f as forceUpdate, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, f as forceUpdate, h, g as getElement } from './index-5a720e56.js';
|
|
2
2
|
import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
|
|
3
3
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
4
4
|
import './DialogType-54a62731.js';
|