@sankhyalabs/ezui 2.0.10 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ez-button.cjs.entry.js +11 -0
- package/dist/cjs/ez-calendar.cjs.entry.js +2 -1
- package/dist/cjs/ez-card-item.cjs.entry.js +7 -0
- package/dist/cjs/ez-check.cjs.entry.js +10 -0
- package/dist/cjs/ez-chip.cjs.entry.js +7 -0
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +4 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +6 -0
- package/dist/cjs/ez-date-input.cjs.entry.js +9 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js +9 -0
- package/dist/cjs/ez-filter-input.cjs.entry.js +7 -0
- package/dist/cjs/ez-form.cjs.entry.js +14 -4
- package/dist/cjs/ez-grid.cjs.entry.js +9 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +6 -0
- package/dist/cjs/ez-radio-button.cjs.entry.js +6 -0
- package/dist/cjs/ez-search.cjs.entry.js +7 -0
- package/dist/cjs/ez-tabselector.cjs.entry.js +24 -4
- package/dist/cjs/ez-text-area.cjs.entry.js +7 -0
- package/dist/cjs/ez-text-edit.cjs.entry.js +7 -0
- package/dist/cjs/ez-text-input.cjs.entry.js +6 -0
- package/dist/cjs/ez-time-input.cjs.entry.js +6 -0
- package/dist/cjs/ez-upload.cjs.entry.js +4 -0
- package/dist/cjs/ez-view-stack.cjs.entry.js +4 -0
- package/dist/collection/components/ez-button/ez-button.js +12 -1
- package/dist/collection/components/ez-calendar/ez-calendar.js +2 -1
- package/dist/collection/components/ez-card-item/ez-card-item.js +8 -1
- package/dist/collection/components/ez-check/ez-check.js +11 -1
- package/dist/collection/components/ez-chip/ez-chip.js +8 -1
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +4 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +7 -1
- package/dist/collection/components/ez-date-input/ez-date-input.js +10 -1
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +10 -1
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +7 -0
- package/dist/collection/components/ez-form/ez-form.js +13 -3
- package/dist/collection/components/ez-form/structure/FormSheet.js +2 -2
- package/dist/collection/components/ez-grid/ez-grid.js +11 -2
- package/dist/collection/components/ez-number-input/ez-number-input.js +7 -1
- package/dist/collection/components/ez-radio-button/ez-radio-button.js +6 -0
- package/dist/collection/components/ez-search/ez-search.js +7 -0
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +24 -4
- package/dist/collection/components/ez-text-area/ez-text-area.js +7 -0
- package/dist/collection/components/ez-text-edit/ez-text-edit.js +9 -2
- package/dist/collection/components/ez-text-input/ez-text-input.js +7 -1
- package/dist/collection/components/ez-time-input/ez-time-input.js +7 -1
- package/dist/collection/components/ez-upload/ez-upload.js +4 -0
- package/dist/collection/components/ez-view-stack/ez-view-stack.js +4 -0
- package/dist/custom-elements/index.js +161 -11
- package/dist/esm/ez-button.entry.js +12 -1
- package/dist/esm/ez-calendar.entry.js +2 -1
- package/dist/esm/ez-card-item.entry.js +8 -1
- package/dist/esm/ez-check.entry.js +11 -1
- package/dist/esm/ez-chip.entry.js +8 -1
- package/dist/esm/ez-collapsible-box.entry.js +4 -0
- package/dist/esm/ez-combo-box.entry.js +7 -1
- package/dist/esm/ez-date-input.entry.js +10 -1
- package/dist/esm/ez-date-time-input.entry.js +10 -1
- package/dist/esm/ez-filter-input.entry.js +7 -0
- package/dist/esm/ez-form.entry.js +15 -5
- package/dist/esm/ez-grid.entry.js +11 -3
- package/dist/esm/ez-number-input.entry.js +7 -1
- package/dist/esm/ez-radio-button.entry.js +6 -0
- package/dist/esm/ez-search.entry.js +7 -0
- package/dist/esm/ez-tabselector.entry.js +24 -4
- package/dist/esm/ez-text-area.entry.js +7 -0
- package/dist/esm/ez-text-edit.entry.js +9 -2
- package/dist/esm/ez-text-input.entry.js +7 -1
- package/dist/esm/ez-time-input.entry.js +7 -1
- package/dist/esm/ez-upload.entry.js +4 -0
- package/dist/esm/ez-view-stack.entry.js +4 -0
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-019c7fc4.entry.js +1 -0
- package/dist/ezui/p-04fab1e9.entry.js +1 -0
- package/dist/ezui/p-107aff56.entry.js +1 -0
- package/dist/ezui/p-3cfefc57.entry.js +1 -0
- package/dist/ezui/p-4b2595f4.entry.js +1 -0
- package/dist/ezui/p-587e8dca.entry.js +1 -0
- package/dist/ezui/p-6700360e.entry.js +1 -0
- package/dist/ezui/p-6a8e7fb2.entry.js +1 -0
- package/dist/ezui/p-74e6c2a9.entry.js +1 -0
- package/dist/ezui/{p-d0b8330e.entry.js → p-77b7b623.entry.js} +2 -2
- package/dist/ezui/p-7b8d1f1c.entry.js +1 -0
- package/dist/ezui/p-88d0fc06.entry.js +1 -0
- package/dist/ezui/p-8c874b58.entry.js +1 -0
- package/dist/ezui/p-8eae779b.entry.js +1 -0
- package/dist/ezui/p-9d57e44a.entry.js +1 -0
- package/dist/ezui/p-a595dd4e.entry.js +1 -0
- package/dist/ezui/p-a713a1aa.entry.js +1 -0
- package/dist/ezui/p-b484a0b3.entry.js +1 -0
- package/dist/ezui/p-c55f63c6.entry.js +1 -0
- package/dist/ezui/p-dff2b725.entry.js +1 -0
- package/dist/ezui/p-e38c4efe.entry.js +1 -0
- package/dist/ezui/p-fe578dc0.entry.js +1 -0
- package/dist/types/components/ez-button/ez-button.d.ts +2 -0
- package/dist/types/components/ez-card-item/ez-card-item.d.ts +2 -0
- package/dist/types/components/ez-check/ez-check.d.ts +2 -0
- package/dist/types/components/ez-chip/ez-chip.d.ts +1 -0
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +1 -0
- package/dist/types/components/ez-form/ez-form.d.ts +3 -0
- package/dist/types/components/ez-form/structure/FormSheet.d.ts +1 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +3 -0
- package/dist/types/components/ez-radio-button/ez-radio-button.d.ts +1 -0
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +3 -1
- package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +1 -0
- package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +1 -0
- package/package.json +1 -1
- package/dist/ezui/p-00d35755.entry.js +0 -1
- package/dist/ezui/p-0bd0afcf.entry.js +0 -1
- package/dist/ezui/p-0c7203d5.entry.js +0 -1
- package/dist/ezui/p-11e137bb.entry.js +0 -1
- package/dist/ezui/p-1a17b0f5.entry.js +0 -1
- package/dist/ezui/p-1d054ad5.entry.js +0 -1
- package/dist/ezui/p-2ccad880.entry.js +0 -1
- package/dist/ezui/p-43bb6a59.entry.js +0 -1
- package/dist/ezui/p-56688470.entry.js +0 -1
- package/dist/ezui/p-5bdb1a41.entry.js +0 -1
- package/dist/ezui/p-63d567cc.entry.js +0 -1
- package/dist/ezui/p-659616e4.entry.js +0 -1
- package/dist/ezui/p-744eb735.entry.js +0 -1
- package/dist/ezui/p-7f9196f6.entry.js +0 -1
- package/dist/ezui/p-9b9ebf95.entry.js +0 -1
- package/dist/ezui/p-a15171b4.entry.js +0 -1
- package/dist/ezui/p-ac296141.entry.js +0 -1
- package/dist/ezui/p-e697ffd5.entry.js +0 -1
- package/dist/ezui/p-efa32bcc.entry.js +0 -1
- package/dist/ezui/p-f27c364b.entry.js +0 -1
- package/dist/ezui/p-fe75f477.entry.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-7bc778b3.js';
|
|
2
|
-
import { DateUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { DateUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
|
|
4
4
|
|
|
5
5
|
const ezDateInputCss = ":host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"15px\"><path d=\"M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z\"/></svg>')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}";
|
|
@@ -138,6 +138,15 @@ let EzDateInput = class {
|
|
|
138
138
|
componentDidLoad() {
|
|
139
139
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
140
140
|
this.setInputValue();
|
|
141
|
+
if (this._elem) {
|
|
142
|
+
ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
143
|
+
if (this._textInput) {
|
|
144
|
+
ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
145
|
+
}
|
|
146
|
+
if (this._calendar) {
|
|
147
|
+
ElementIDUtils.addIDInfo(this._calendar, 'internal_calendar', { id: this._elem.getAttribute("data-element-id") });
|
|
148
|
+
}
|
|
149
|
+
}
|
|
141
150
|
}
|
|
142
151
|
render() {
|
|
143
152
|
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-7bc778b3.js';
|
|
2
|
-
import { DateUtils, TimeFormatter } from '@sankhyalabs/core';
|
|
2
|
+
import { DateUtils, TimeFormatter, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
|
|
4
4
|
|
|
5
5
|
const ezDateTimeInputCss = ":host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"15px\"><path d=\"M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z\"/></svg>')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}";
|
|
@@ -193,6 +193,15 @@ let EzDateTimeInput = class {
|
|
|
193
193
|
componentDidLoad() {
|
|
194
194
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
195
195
|
this.setInputValue();
|
|
196
|
+
if (this._elem) {
|
|
197
|
+
ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
198
|
+
if (this._textInput) {
|
|
199
|
+
ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
200
|
+
}
|
|
201
|
+
if (this._calendar) {
|
|
202
|
+
ElementIDUtils.addIDInfo(this._calendar, 'internal_calendar', { id: this._elem.getAttribute("data-element-id") });
|
|
203
|
+
}
|
|
204
|
+
}
|
|
196
205
|
}
|
|
197
206
|
render() {
|
|
198
207
|
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onKeyDown: event => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), onFocus: () => this.handleFocus(), onClick: () => this.handleClick() }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.changeValue(this._calendar.value); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-7bc778b3.js';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
3
|
import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
|
|
3
4
|
|
|
4
5
|
const ezFilterInputCss = ":host{display:block;width:100%}";
|
|
@@ -59,6 +60,12 @@ let EzFilterInput = class {
|
|
|
59
60
|
}
|
|
60
61
|
componentDidLoad() {
|
|
61
62
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
63
|
+
if (this._elem) {
|
|
64
|
+
ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
65
|
+
if (this._textInput) {
|
|
66
|
+
ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
62
69
|
}
|
|
63
70
|
render() {
|
|
64
71
|
return (h("ez-text-input", { ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.changeValue(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, loading: this.loading, mode: this.mode }, h("ez-icon", { slot: "leftIcon", iconName: "search" })));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, f as forceUpdate, H as Host, g as getElement } from './index-7bc778b3.js';
|
|
2
|
-
import { UserInterface, Action, WaitingChangeException, ApplicationContext, DataUnitAction, DataUnit } from '@sankhyalabs/core';
|
|
2
|
+
import { UserInterface, Action, WaitingChangeException, ApplicationContext, StringUtils, DataUnitAction, DataUnit, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { C as CheckMode } from './CheckMode-bdb2ec19.js';
|
|
4
4
|
import { A as ApplicationUtils } from './ApplicationUtils-205ac4bc.js';
|
|
5
5
|
import './DialogType-4059dc4d.js';
|
|
@@ -127,8 +127,8 @@ const FormItem = ({ source }) => {
|
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
-
const FormSheet = ({ store, source }) => {
|
|
131
|
-
return (h("div", { class: "dynamic-content ez-box__container" },
|
|
130
|
+
const FormSheet = ({ store, source, dataElementId }) => {
|
|
131
|
+
return (h("div", { class: "dynamic-content ez-box__container", "data-element-id": dataElementId },
|
|
132
132
|
h("div", { class: "ez-row ez-padding-vertical--small" }, source.items.map(item => h(FormItem, { store: store, source: item })))));
|
|
133
133
|
};
|
|
134
134
|
|
|
@@ -941,9 +941,11 @@ let EzForm = class {
|
|
|
941
941
|
const tabs = allSheets.map((sheet, index) => {
|
|
942
942
|
return { tabKey: sheet.name, label: sheet.label, index };
|
|
943
943
|
});
|
|
944
|
-
|
|
944
|
+
const idTabSelector = `${this._dataElementIdEzForm}_internal_tabSelector`;
|
|
945
|
+
result.push(h("ez-tabselector", { tabs: this.buildIdTabSelector(tabs), onEzChange: (evt) => this._store.dispatch(changeTab(evt.detail)), selectedTab: currentSheet.name, "data-element-id": idTabSelector }));
|
|
945
946
|
}
|
|
946
|
-
|
|
947
|
+
const idFormSheet = `${this._dataElementIdEzForm}_${StringUtils.toCamelCase(currentSheet.label)}`;
|
|
948
|
+
result.push(h(FormSheet, { store: this._store, source: currentSheet, dataElementId: idFormSheet }));
|
|
947
949
|
return result;
|
|
948
950
|
}
|
|
949
951
|
processMetadata() {
|
|
@@ -1006,6 +1008,8 @@ let EzForm = class {
|
|
|
1006
1008
|
this._store.subscribe(() => forceUpdate(this));
|
|
1007
1009
|
this._staticFields = Array.from(this._element.querySelectorAll("[data-field-name]"));
|
|
1008
1010
|
this.processMetadata();
|
|
1011
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
1012
|
+
this._dataElementIdEzForm = ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
1009
1013
|
}
|
|
1010
1014
|
componentDidRender() {
|
|
1011
1015
|
this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")));
|
|
@@ -1016,6 +1020,12 @@ let EzForm = class {
|
|
|
1016
1020
|
this.dataUnit.removeInterceptor(this);
|
|
1017
1021
|
this._dataBinder.onDisconnectedCallback();
|
|
1018
1022
|
}
|
|
1023
|
+
buildIdTabSelector(tabs) {
|
|
1024
|
+
if (tabs) {
|
|
1025
|
+
tabs.forEach(tab => tab["data-element-id"] = `${this._dataElementIdEzForm}_${StringUtils.toCamelCase(tab.label)}`);
|
|
1026
|
+
}
|
|
1027
|
+
return tabs;
|
|
1028
|
+
}
|
|
1019
1029
|
render() {
|
|
1020
1030
|
return (h(Host, null, this.isStatic() ? null : this.getDynamicContent()));
|
|
1021
1031
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-7bc778b3.js';
|
|
2
|
-
import { Action, ObjectUtils as ObjectUtils$1, ApplicationContext, StringUtils as StringUtils$1, UserInterface, NumberUtils as NumberUtils$1, DataType, SortMode } from '@sankhyalabs/core';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-7bc778b3.js';
|
|
2
|
+
import { Action, ObjectUtils as ObjectUtils$1, ApplicationContext, StringUtils as StringUtils$1, UserInterface, NumberUtils as NumberUtils$1, DataType, SortMode, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.1.1
|
|
@@ -115341,6 +115341,13 @@ let EzGrid = class {
|
|
|
115341
115341
|
if (this.config) {
|
|
115342
115342
|
this.observeConfig(this.config);
|
|
115343
115343
|
}
|
|
115344
|
+
this.buildDataElementId();
|
|
115345
|
+
}
|
|
115346
|
+
buildDataElementId() {
|
|
115347
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
115348
|
+
const dataElementIdEzGrid = ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
115349
|
+
const dtInfo = { id: `${dataElementIdEzGrid}_ezGrid_pagination` };
|
|
115350
|
+
ElementIDUtils.addIDInfo(this._refPaginationControl, null, dtInfo);
|
|
115344
115351
|
}
|
|
115345
115352
|
previousPage() {
|
|
115346
115353
|
if (this.dataUnit) {
|
|
@@ -115367,9 +115374,10 @@ let EzGrid = class {
|
|
|
115367
115374
|
this._gridController.setColumnsState(config.columns);
|
|
115368
115375
|
}
|
|
115369
115376
|
render() {
|
|
115370
|
-
return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container" }, this.getPaginationControl())), h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), h("div", { class: "grid__footer" })));
|
|
115377
|
+
return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container", ref: ref => this._refPaginationControl = ref }, this.getPaginationControl())), h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), h("div", { class: "grid__footer" })));
|
|
115371
115378
|
}
|
|
115372
115379
|
static get assetsDirs() { return ["../assets"]; }
|
|
115380
|
+
get _element() { return getElement(this); }
|
|
115373
115381
|
static get watchers() { return {
|
|
115374
115382
|
"config": ["observeConfig"]
|
|
115375
115383
|
}; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-7bc778b3.js';
|
|
2
|
-
import { NumberUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { NumberUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
|
|
4
4
|
|
|
5
5
|
const ezNumberInputCss = ":host{display:block;width:100%}";
|
|
@@ -133,6 +133,12 @@ let EzNumberInput = class {
|
|
|
133
133
|
componentDidLoad() {
|
|
134
134
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
135
135
|
this.setInputValue();
|
|
136
|
+
if (this._elem) {
|
|
137
|
+
ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
138
|
+
if (this._textInput) {
|
|
139
|
+
ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
140
|
+
}
|
|
141
|
+
}
|
|
136
142
|
}
|
|
137
143
|
render() {
|
|
138
144
|
return (h("ez-text-input", { ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-7bc778b3.js';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
3
|
|
|
3
4
|
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:0px;--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:flex;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:18px;height:18px;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:calc(18px/2);width:calc(18px/2);border-radius:50%;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)}";
|
|
4
5
|
|
|
@@ -19,6 +20,11 @@ let EzRadioButton = class {
|
|
|
19
20
|
*/
|
|
20
21
|
this.direction = "vertical";
|
|
21
22
|
}
|
|
23
|
+
componentDidLoad() {
|
|
24
|
+
if (this.hostElement) {
|
|
25
|
+
ElementIDUtils.addIDInfo(this.hostElement, 'input');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
22
28
|
componentWillLoad() {
|
|
23
29
|
this._options = this.options;
|
|
24
30
|
const optionsTags = this.hostElement.querySelectorAll("ez-radio-button-option");
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-7bc778b3.js';
|
|
2
2
|
import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
|
|
3
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
4
|
|
|
4
5
|
const ezSearchCss = ":host{width:100%}";
|
|
5
6
|
|
|
@@ -67,6 +68,12 @@ let EzSearch = class {
|
|
|
67
68
|
}
|
|
68
69
|
componentDidLoad() {
|
|
69
70
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._comboElement);
|
|
71
|
+
if (this._elem) {
|
|
72
|
+
ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
73
|
+
if (this._comboElement) {
|
|
74
|
+
ElementIDUtils.addIDInfo(this._comboElement, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
70
77
|
}
|
|
71
78
|
render() {
|
|
72
79
|
return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode }));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-7bc778b3.js';
|
|
2
|
+
import { ElementIDUtils, StringUtils } from '@sankhyalabs/core';
|
|
2
3
|
|
|
3
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;min-width:100px;background-color:unset;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)}.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)}";
|
|
4
5
|
|
|
@@ -71,6 +72,7 @@ let EzTabselector = class {
|
|
|
71
72
|
this.setFocusedBtn(false, tab.index);
|
|
72
73
|
}
|
|
73
74
|
componentWillRender() {
|
|
75
|
+
ElementIDUtils.addIDInfo(this._hostElem);
|
|
74
76
|
if (!this._processedTabs) {
|
|
75
77
|
this._processedTabs = [];
|
|
76
78
|
if (this.tabs) {
|
|
@@ -78,6 +80,7 @@ let EzTabselector = class {
|
|
|
78
80
|
this.tabs.split(",").forEach((label) => {
|
|
79
81
|
label = label.trim();
|
|
80
82
|
this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
|
|
83
|
+
this.buildElementIdTab(this._processedTabs);
|
|
81
84
|
});
|
|
82
85
|
}
|
|
83
86
|
}
|
|
@@ -93,9 +96,20 @@ let EzTabselector = class {
|
|
|
93
96
|
this._hostElem.appendChild(content);
|
|
94
97
|
}
|
|
95
98
|
this._processedTabs.push(tab);
|
|
99
|
+
this.buildElementIdTab(this._processedTabs);
|
|
96
100
|
});
|
|
97
101
|
}
|
|
98
102
|
}
|
|
103
|
+
componentDidRender() {
|
|
104
|
+
this.updateScroll();
|
|
105
|
+
}
|
|
106
|
+
componentDidLoad() {
|
|
107
|
+
this._hostElem.shadowRoot.querySelectorAll('button[name="tab-button"]').forEach((elem) => {
|
|
108
|
+
const elemIdTabSelector = this._hostElem.getAttribute("data-element-id");
|
|
109
|
+
const dataInfo = { id: `${elemIdTabSelector}_${StringUtils.toCamelCase(elem.id)}` };
|
|
110
|
+
ElementIDUtils.addIDInfo(elem, null, dataInfo);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
99
113
|
handleSlotChange(ev) {
|
|
100
114
|
const slot = ev.target;
|
|
101
115
|
const content = slot.assignedElements()[0];
|
|
@@ -121,9 +135,6 @@ let EzTabselector = class {
|
|
|
121
135
|
container.scrollLeft = lastTab.offsetLeft + lastTab.offsetWidth;
|
|
122
136
|
}
|
|
123
137
|
}
|
|
124
|
-
componentDidRender() {
|
|
125
|
-
this.updateScroll();
|
|
126
|
-
}
|
|
127
138
|
updateScroll() {
|
|
128
139
|
const container = this._scrollContainer;
|
|
129
140
|
if (container) {
|
|
@@ -184,6 +195,15 @@ let EzTabselector = class {
|
|
|
184
195
|
}
|
|
185
196
|
});
|
|
186
197
|
}
|
|
198
|
+
buildElementIdTab(tabs) {
|
|
199
|
+
tabs.forEach(tab => {
|
|
200
|
+
if (!tab.hasOwnProperty("data-element-id")) {
|
|
201
|
+
const elemIdTabSelector = this._hostElem.getAttribute("data-element-id");
|
|
202
|
+
const dataElementID = `${elemIdTabSelector}_${StringUtils.toCamelCase(tab.tabKey)}`;
|
|
203
|
+
tab["data-element-id"] = dataElementID;
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
}
|
|
187
207
|
render() {
|
|
188
208
|
return (h(Host, null, h("button", { class: "backward-button", ref: (el) => this._backwardButton = el, onClick: () => this.scrollBackward() }), h("div", { class: "scroll", ref: (el) => this._scrollContainer = el, onScroll: () => this.domScrollHandler(), onKeyDown: (ev) => this.setFocusedParam(ev) }, this._processedTabs.map((tab, index) => {
|
|
189
209
|
const labelStyle = { "min-width": this.getTextWidth(tab.label) };
|
|
@@ -193,7 +213,7 @@ let EzTabselector = class {
|
|
|
193
213
|
this.selectedTab = tab.tabKey;
|
|
194
214
|
this.selectedIndex = index;
|
|
195
215
|
}
|
|
196
|
-
return h("button", { id: tabId, class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab), style: labelStyle }, tab.leftIcon && h("ez-icon", { iconName: tab.leftIcon, class: "left-icon" }), h("span", { class: "tab-label", title: tab.label }, tab.label), tab.rightIcon && h("ez-icon", { iconName: tab.rightIcon, class: "right-icon" }), h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } }));
|
|
216
|
+
return h("button", { id: tabId, name: "tab-button", class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab), style: labelStyle }, tab.leftIcon && h("ez-icon", { iconName: tab.leftIcon, class: "left-icon" }), h("span", { class: "tab-label", title: tab.label }, tab.label), tab.rightIcon && h("ez-icon", { iconName: tab.rightIcon, class: "right-icon" }), h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } }));
|
|
197
217
|
})), h("button", { class: "forward-button", ref: (el) => this._forwardButton = el, onClick: () => this.scrollFoward() })));
|
|
198
218
|
}
|
|
199
219
|
get _hostElem() { return getElement(this); }
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-7bc778b3.js';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
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, #000);--text-area__input--background-color:var(--background--medium, #e0e0e0);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--text-area__input--background-color);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-area__input--disabled--color:var(--text--disable, #AFB6C0);--text-area__input--error--border-color:#CC2936;--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--error, #FF0000);--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)}.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--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)}.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{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled:-moz-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled::-moz-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled:-ms-input-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled::placeholder{color:var(--text-area__input--disabled--color)}";
|
|
4
5
|
|
|
@@ -138,6 +139,12 @@ let EzTextArea = class {
|
|
|
138
139
|
this.observeErrorMessage();
|
|
139
140
|
this.adjustFloatingLabel();
|
|
140
141
|
this.observeMode();
|
|
142
|
+
if (this._hostElement) {
|
|
143
|
+
ElementIDUtils.addIDInfo(this._hostElement, 'input');
|
|
144
|
+
if (this._inputElem) {
|
|
145
|
+
ElementIDUtils.addIDInfo(this._inputElem, 'internal_input', { id: this._hostElement.getAttribute("data-element-id") });
|
|
146
|
+
}
|
|
147
|
+
}
|
|
141
148
|
}
|
|
142
149
|
render() {
|
|
143
150
|
return (h(Host, null, h("div", { class: "textarea", ref: (el) => this._container = el }, this.label && this.mode != "slim" ?
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-7bc778b3.js';
|
|
2
|
-
import { StringUtils } from '@sankhyalabs/core';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-7bc778b3.js';
|
|
2
|
+
import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { A as ApplicationUtils } from './ApplicationUtils-205ac4bc.js';
|
|
4
4
|
import './DialogType-4059dc4d.js';
|
|
5
5
|
import './CheckMode-bdb2ec19.js';
|
|
@@ -86,6 +86,12 @@ let EzTextEdit = class {
|
|
|
86
86
|
componentDidLoad() {
|
|
87
87
|
this.applyFocusSelect();
|
|
88
88
|
this.setNewValue(this.value);
|
|
89
|
+
if (this._element) {
|
|
90
|
+
ElementIDUtils.addIDInfo(this._element, 'input');
|
|
91
|
+
if (this._inputElement) {
|
|
92
|
+
ElementIDUtils.addIDInfo(this._inputElement, 'internal_input', { id: this._element.getAttribute("data-element-id") });
|
|
93
|
+
}
|
|
94
|
+
}
|
|
89
95
|
}
|
|
90
96
|
componentDidRender() {
|
|
91
97
|
this.setStyledInput();
|
|
@@ -93,6 +99,7 @@ let EzTextEdit = class {
|
|
|
93
99
|
render() {
|
|
94
100
|
return (h(Host, null, h("span", { class: "text-edit__hidden-value", ref: elem => this._valueBasis = elem }), h("ez-text-input", { onInput: () => { this.calcSizeInput(this._newValue); }, class: "text-edit__form-input", value: this._newValue, ref: (elem) => this._inputElement = elem, mode: "slim", onEzChange: (evt) => this.setNewValue(evt === null || evt === void 0 ? void 0 : evt.detail), noBorder: true }), h("ez-button", { class: "text-edit__icon-check", mode: "icon", iconName: "check", size: "small", onClick: () => { this.handleSaveEdition(); } }), h("ez-button", { class: "text-edit__icon-close", mode: "icon", iconName: "close", size: "small", onClick: () => { this.cancelEdition.emit(); } })));
|
|
95
101
|
}
|
|
102
|
+
get _element() { return getElement(this); }
|
|
96
103
|
};
|
|
97
104
|
EzTextEdit.style = ezTextEditCss;
|
|
98
105
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-7bc778b3.js';
|
|
2
|
-
import { MaskFormatter } from '@sankhyalabs/core';
|
|
2
|
+
import { MaskFormatter, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight);padding:var(--ez-text-input__input--padding)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:read-only{cursor:default}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input__slim--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-ms-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:disabled::-webkit-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-ms-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}";
|
|
5
5
|
|
|
@@ -209,6 +209,12 @@ let EzTextInput = class {
|
|
|
209
209
|
this.observeMask();
|
|
210
210
|
this.adjustFloatingLabel();
|
|
211
211
|
this.adjustBorderInput();
|
|
212
|
+
if (this._hostElement) {
|
|
213
|
+
ElementIDUtils.addIDInfo(this._hostElement, 'input');
|
|
214
|
+
if (this._inputElem) {
|
|
215
|
+
ElementIDUtils.addIDInfo(this._inputElem, 'internal_input', { id: this._hostElement.getAttribute("data-element-id") });
|
|
216
|
+
}
|
|
217
|
+
}
|
|
212
218
|
}
|
|
213
219
|
componentWillLoad() {
|
|
214
220
|
this.observeMask();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-7bc778b3.js';
|
|
2
|
-
import { TimeFormatter, MaskFormatter, NumberUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { TimeFormatter, MaskFormatter, NumberUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
|
|
4
4
|
|
|
5
5
|
const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;width:100%}";
|
|
@@ -138,6 +138,12 @@ let EzTimeInput = class {
|
|
|
138
138
|
//---------------------------------------------
|
|
139
139
|
componentDidLoad() {
|
|
140
140
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
141
|
+
if (this._elem) {
|
|
142
|
+
ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
143
|
+
if (this._textInput) {
|
|
144
|
+
ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
145
|
+
}
|
|
146
|
+
}
|
|
141
147
|
}
|
|
142
148
|
componentWillLoad() {
|
|
143
149
|
this.observeShowSeconds();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, g as getElement } from './index-7bc778b3.js';
|
|
2
2
|
import { A as ApplicationUtils } from './ApplicationUtils-205ac4bc.js';
|
|
3
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
4
|
import './DialogType-4059dc4d.js';
|
|
4
5
|
|
|
5
6
|
class RemoteFile {
|
|
@@ -331,6 +332,9 @@ let EzUpload = class {
|
|
|
331
332
|
this._dropZone.style.background = "";
|
|
332
333
|
});
|
|
333
334
|
}
|
|
335
|
+
if (this._host) {
|
|
336
|
+
ElementIDUtils.addIDInfo(this._host, 'input');
|
|
337
|
+
}
|
|
334
338
|
}
|
|
335
339
|
componentWillRender() {
|
|
336
340
|
if (this.value) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement, H as Host } from './index-7bc778b3.js';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
3
|
|
|
3
4
|
const ezViewStackCss = ":host{width:100%;height:100%}.ez-view-stack__container{width:100%;height:100%}";
|
|
4
5
|
|
|
@@ -63,6 +64,9 @@ let EzViewStack = class {
|
|
|
63
64
|
});
|
|
64
65
|
}
|
|
65
66
|
}
|
|
67
|
+
componentDidLoad() {
|
|
68
|
+
ElementIDUtils.addIDInfo(this._hostElem);
|
|
69
|
+
}
|
|
66
70
|
disconectCallback() {
|
|
67
71
|
this._hostElem = null;
|
|
68
72
|
this._elemList = null;
|
package/dist/ezui/ezui.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-3c7ea91b.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-8c2105a5",[[1,"ez-actions-button",{enabled:[516],actions:[1040],size:[513],showLabel:[516,"show-label"],displayIcon:[513,"display-icon"],checkOption:[516,"check-option"],value:[513],isTransparent:[516,"is-transparent"],arrowActive:[516,"arrow-active"],_selectedAction:[32],hideActions:[64],isOpened:[64]}]]],["p-f6afdc4d",[[1,"ez-dialog",{confirm:[1028],dialogType:[1025,"dialog-type"],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],handleButtonClick:[64],show:[64]}]]],["p-
|
|
1
|
+
import{p as e,b as o}from"./p-3c7ea91b.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-8c2105a5",[[1,"ez-actions-button",{enabled:[516],actions:[1040],size:[513],showLabel:[516,"show-label"],displayIcon:[513,"display-icon"],checkOption:[516,"check-option"],value:[513],isTransparent:[516,"is-transparent"],arrowActive:[516,"arrow-active"],_selectedAction:[32],hideActions:[64],isOpened:[64]}]]],["p-f6afdc4d",[[1,"ez-dialog",{confirm:[1028],dialogType:[1025,"dialog-type"],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],handleButtonClick:[64],show:[64]}]]],["p-fe578dc0",[[1,"ez-filter-input",{label:[1],value:[1537],enabled:[4],loading:[516],errorMessage:[1537,"error-message"],restrict:[1],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-77b7b623",[[6,"ez-grid",{multipleSelection:[4,"multiple-selection"],config:[1040],serverUrl:[1,"server-url"],dataUnit:[16],statusResolver:[16],_paginationInfo:[32],setColumnsDef:[64],addColumnMenuItem:[64],setColumnsState:[64],setData:[64],getSelection:[64],getColumnsState:[64],getColumns:[64],quickFilter:[64]}]]],["p-dfcf55e0",[[6,"ez-modal-container",{modalTitle:[1,"modal-title"],modalSubTitle:[1,"modal-sub-title"],showTitleBar:[4,"show-title-bar"],cancelButtonLabel:[1,"cancel-button-label"],okButtonLabel:[1,"ok-button-label"],cancelButtonStatus:[1,"cancel-button-status"],okButtonStatus:[1,"ok-button-status"]}]]],["p-7b8d1f1c",[[1,"ez-chip",{label:[513],enabled:[516],removePosition:[513,"remove-position"],mode:[513],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-1cc11468",[[0,"ez-application"]]],["p-3cfefc57",[[1,"ez-card-item",{item:[16]}]]],["p-42c6493e",[[1,"ez-list",{dataSource:[1040],useGroups:[1540,"use-groups"],ezDraggable:[1028,"ez-draggable"],ezSelectable:[1028,"ez-selectable"],itemSlotBuilder:[1040],_listItems:[32],_listGroupItems:[32],clearHistory:[64],scrollToTop:[64],setSelection:[64],getSelection:[64],getList:[64]}]]],["p-ed2135a5",[[1,"ez-loading-bar",{_showLoading:[32],hide:[64],show:[64]}]]],["p-7c227b86",[[1,"ez-modal",{modalSize:[1,"modal-size"],align:[1],opened:[1028],closeEsc:[4,"close-esc"],closeOutsideClick:[4,"close-outside-click"]}]]],["p-bffae598",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],innerElement:[1537,"inner-element"],updatePosition:[64],show:[64],hide:[64]}]]],["p-cfcc23e6",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[1540,"use-header"],heightMode:[1537,"height-mode"],ezTitle:[1,"ez-title"]}]]],["p-e38c4efe",[[1,"ez-radio-button",{value:[1544],options:[1040],enabled:[516],label:[513],direction:[1537]}]]],["p-1ba371a3",[[1,"ez-scroller",{direction:[1],locked:[4],activeShadow:[4,"active-shadow"],isFirefox:[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["p-482c3dd8",[[1,"ez-toast",{message:[1025],fadeTime:[1026,"fade-time"],useIcon:[1028,"use-icon"],canClose:[1028,"can-close"],show:[64]}]]],["p-04fab1e9",[[0,"ez-view-stack",{show:[64],getSelectedIndex:[64]}]]],["p-019c7fc4",[[1,"ez-text-input",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],mask:[1],canShowError:[516,"can-show-error"],restrict:[1],mode:[513],noBorder:[516,"no-border"],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-8c874b58",[[1,"ez-collapsible-box",{value:[1540],label:[513],headerSize:[513,"header-size"],iconPlacement:[513,"icon-placement"],stretchTitle:[516,"stretch-title"],removable:[516],editable:[516],conditionalSave:[16],_activeEditText:[32],showHide:[64],applyFocusTextEdit:[64],cancelEdition:[64]}]]],["p-b484a0b3",[[1,"ez-search",{value:[1537],label:[1537],enabled:[1540],errorMessage:[1537,"error-message"],optionLoader:[16],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],suppressEmptyOption:[4,"suppress-empty-option"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-c55f63c6",[[1,"ez-date-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-4b2595f4",[[1,"ez-date-time-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-587e8dca",[[1,"ez-time-input",{label:[513],value:[1026],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-8eae779b",[[1,"ez-number-input",{label:[1],value:[1538],enabled:[4],errorMessage:[1537,"error-message"],precision:[2],prettyPrecision:[2,"pretty-precision"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-dff2b725",[[1,"ez-tabselector",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1],_processedTabs:[32]}]]],["p-6700360e",[[1,"ez-check",{label:[513],value:[1540],enabled:[1540],indeterminate:[4],mode:[513],getMode:[64],setFocus:[64]}]]],["p-74e6c2a9",[[1,"ez-text-area",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],rows:[1538],canShowError:[516,"can-show-error"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-a713a1aa",[[1,"ez-upload",{label:[1],enabled:[4],maxFileSize:[2,"max-file-size"],maxFiles:[2,"max-files"],requestHeaders:[8,"request-headers"],urlUpload:[1,"url-upload"],urlDelete:[1,"url-delete"],value:[1040],addFiles:[64],setFocus:[64],setBlur:[64]}]]],["p-107aff56",[[1,"ez-text-edit",{value:[1],styled:[16],_newValue:[32],applyFocusSelect:[64]}]]],["p-6a8e7fb2",[[1,"ez-combo-box",{value:[1537],label:[513],enabled:[516],options:[1040],errorMessage:[1537,"error-message"],searchMode:[4,"search-mode"],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],suppressSearch:[4,"suppress-search"],optionLoader:[16],suppressEmptyOption:[4,"suppress-empty-option"],canShowError:[516,"can-show-error"],mode:[513],_preSelection:[32],_visibleOptions:[32],_startLoading:[32],_showLoading:[32],_criteria:[32],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-9d57e44a",[[1,"ez-calendar",{value:[1040],floating:[516],time:[516],showSeconds:[516,"show-seconds"],show:[64],fitVertical:[64],hide:[64]}]]],["p-ec9decf2",[[1,"ez-icon",{size:[513],href:[513],iconName:[513,"icon-name"]}]]],["p-88d0fc06",[[1,"ez-button",{label:[513],enabled:[516],mode:[513],image:[513],iconName:[513,"icon-name"],size:[513],setFocus:[64],setBlur:[64]}]]],["p-a595dd4e",[[0,"ez-form",{dataUnit:[1040],config:[16],recordsValidator:[16],submit:[64],cancel:[64],validate:[64]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,H as o,g as r}from"./p-3c7ea91b.js";import{MaskFormatter as n,ElementIDUtils as a}from"@sankhyalabs/core";let s=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.enabled=!0,this.canShowError=!0,this.mode="regular",this.noBorder=!1}observeErrorMessage(){this._inputElem&&this.isInvalid().then((t=>{var i,e;t?(this._inputElem.classList.add("hasError"),null===(i=this._messageBoxElem)||void 0===i||i.classList.add("hasError")):(this._inputElem.classList.remove("hasError"),null===(e=this._messageBoxElem)||void 0===e||e.classList.remove("hasError"))}))}observeMask(){this.mask&&(null==this._maskFormatter?this._maskFormatter=new n(this.mask):this._maskFormatter.mask=this.mask)}observeValue(t,i){this._inputElem&&t!=i&&(this._inputElem.value=this.value||"",this.handleChange(),this.adjustFloatingLabel(),this.isSlaveMode()||(this.errorMessage="",this.ezChange.emit(this.value)))}adjustFloatingLabel(){if(this.label&&this._labelElem){this._inputElem&&!this._inputElem.classList.contains("input--with--label")&&this._inputElem.classList.add("input--with--label");const t=this.value&&this.value.toString().length>0,i=this._labelElem.classList.contains("input__label--floated");t||this.isFocused()?i||this._labelElem.classList.add("input__label--floated"):i&&this._labelElem.classList.remove("input__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}isSlaveMode(){var t,i;return"true"===(null===(i=null===(t=this._hostElement)||void 0===t?void 0:t.dataset)||void 0===i?void 0:i.slaveMode)}adjustColorContentSlot(t=""){this._contentLeftSlot&&(this._contentLeftSlot.style.color=t)}adjustBorderInput(){this.noBorder&&this._inputElem.classList.add("input__slim--noborder")}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}handleFocusout(){const t=this._inputElem.value;if(t&&this._maskFormatter)try{this._inputElem.value=this._maskFormatter.format(t)}catch(t){this.errorMessage=t.message}this.controlChangeValue(),this.adjustFloatingLabel(),this.adjustColorContentSlot()}isValidValue(t){return!this.restrict||Array.from(t).reduce(((t,i)=>t&&this.restrict.indexOf(i)>-1),!0)}controlChangeValue(){this._inputElem&&(this.value||"")!==this._inputElem.value&&(this.value=this._inputElem.value)}handleChange(){if(!this._inputElem)return;const t=this._inputElem.value;this.isValidValue(t)?this._lastValidValue=t:this._inputElem.value=null==this._lastValidValue?"":this._lastValidValue,this.controlChangeValue()}handleSlotChange(t){const i=t.target,e=i.assignedElements()[0];e&&(e.style.position="absolute",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center",e.style.overflow="hidden",e.style.top="0px",e.style.width="var(--ez-text-input__icon--width)",e.style.height="slim"!=this.mode?"var(--ez-text-input--height)":"var(--ez-text-input--height--slim)","leftIcon"==i.name?(e.style.left="0px",e.style.borderRadius="var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)",this._inputElem.classList.add("icon--left"),this._labelElem&&this._labelElem.classList.add("input__label--left"),this._contentLeftSlot=e):"rightIcon"==i.name&&(e.style.right="0px",e.style.borderRadius="0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0",this._inputElem.classList.add("icon--right"),this._labelElem&&this._labelElem.classList.add("input__label--right"))),this.observeErrorMessage()}doFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("input__label--floated")&&this._labelElem.classList.add("input__label--floated"),this.adjustColorContentSlot("var(--ez-text-input__input--focus--border-color)")}componentDidLoad(){this.observeErrorMessage(),this.observeMask(),this.adjustFloatingLabel(),this.adjustBorderInput(),this._hostElement&&(a.addIDInfo(this._hostElement,"input"),this._inputElem&&a.addIDInfo(this._inputElem,"internal_input",{id:this._hostElement.getAttribute("data-element-id")}))}componentWillLoad(){if(this.observeMask(),this.value){if(this._maskFormatter)try{this.value=this._maskFormatter.format(this.value)}catch(t){this.errorMessage=t.message}this.isValidValue(this.value)||(this._lastValidValue="",this.value="")}}render(){return e(o,null,e("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label&&"slim"!=this.mode?e("label",{ref:t=>this._labelElem=t,class:this.enabled?"input__label":"input__label input__label--disabled",onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,e("input",{onFocus:()=>this.doFocus(),ref:t=>this._inputElem=t,type:"text",class:"slim"===this.mode?"input--slim":"",placeholder:"slim"===this.mode&&this.label?this.label:"",value:this.value,disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()}}),e("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.canShowError&&"slim"!=this.mode&&e("span",{class:"message-box",ref:t=>this._messageBoxElem=t,title:this.errorMessage},this.errorMessage))}get _hostElement(){return r(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],mask:["observeMask"],value:["observeValue"]}}};s.style=":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight);padding:var(--ez-text-input__input--padding)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:read-only{cursor:default}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input__slim--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-ms-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:disabled::-webkit-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-ms-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}";export{s as ez_text_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,g as e,H as s}from"./p-3c7ea91b.js";import{ElementIDUtils as h}from"@sankhyalabs/core";let l=class{constructor(i){t(this,i),this._dataKey="id_".concat(Date.now().toString())}async show(t){t!==this._focusedIndex&&0<=t&&t<this._totalStackItems&&(this.policyHideRemove(),this.policyShowAppend(t),this._focusedIndex=t)}async getSelectedIndex(){return this._focusedIndex}policyHideRemove(){let t=this._hostElem.querySelector(`#${this._dataKey}_el_${this._focusedIndex}`);this.checkElementVisibility(t)}policyShowAppend(t){let i=this._hostElem.querySelector(`#${this._dataKey}_el_${t}`);i?i.removeAttribute("style"):this._hostElem.append(this._elemList[t])}checkElementVisibility(t){"hide"!==t.getAttribute("hidePolicy")&&t.getAttribute("hidePolicy")?"remove"===t.getAttribute("hidePolicy")&&t.remove():t.setAttribute("style","display: none")}componentWillRender(){this._elemList||(this._elemList=[],this._focusedIndex=0,this._totalStackItems=0,this._hostElem.classList.add("ez-view-stack__container"),this._hostElem.querySelectorAll(":scope > stack-item").forEach(((t,i)=>{t.setAttribute("id",`${this._dataKey}_el_${i}`),0!==i&&this.checkElementVisibility(t),this._totalStackItems++,this._elemList.push(t)})))}componentDidLoad(){h.addIDInfo(this._hostElem)}disconectCallback(){this._hostElem=null,this._elemList=null}render(){return i(s,null)}get _hostElem(){return e(this)}};l.style=":host{width:100%;height:100%}.ez-view-stack__container{width:100%;height:100%}";export{l as ez_view_stack}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as n}from"./p-3c7ea91b.js";import{StringUtils as o,ElementIDUtils as l}from"@sankhyalabs/core";import{A as h}from"./p-0b44cf1c.js";import"./p-e1148f5c.js";import"./p-b853763b.js";let a=class{constructor(s){t(this,s),this.saveEdition=i(this,"saveEdition",7),this.cancelEdition=i(this,"cancelEdition",7)}async applyFocusSelect(){this.calcSizeInput(this.value,!0)}calcSizeInput(t,i=!1){var s,e;const n=null===(e=null===(s=this._inputElement)||void 0===s?void 0:s.shadowRoot)||void 0===e?void 0:e.querySelector("input");if(null!=n){const s=this.getWidthValue(t);n.style.width=s+"px",i&&setTimeout((()=>n.select()),100)}}getWidthValue(t){if(null!=this._valueBasis){const i=this._valueBasis;if(null!=t){const s=2;return i.innerHTML=t,i.clientWidth>0?i.clientWidth+s:s}i.innerHTML=""}return 0}setStyledInput(){var t,i;let s="",e="",n="";null!=this.styled&&(s=this.styled.fontSize,e=this.styled.fontWeight,n=this.styled.fontFamily);const o=null===(i=null===(t=this._inputElement)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("input");null!=o&&(o.style.fontSize=s,o.style.fontWeight=e,o.style.fontFamily=n);const l=this._valueBasis;null!=l&&(l.style.fontSize=s,l.style.fontWeight=e,l.style.fontFamily=n)}handleSaveEdition(){this._newValue===this.value||o.isEmpty(this._newValue)?this._newValue?this.cancelEdition.emit():h.alert("Aviso","Não é possível salvar um campo em branco.").then((()=>{this.setNewValue(this.value,!0)})):this.saveEdition.emit({value:this.value,newValue:this._newValue})}setNewValue(t,i=!1){this._newValue=t,this.calcSizeInput(this._newValue,i)}componentDidLoad(){this.applyFocusSelect(),this.setNewValue(this.value),this._element&&(l.addIDInfo(this._element,"input"),this._inputElement&&l.addIDInfo(this._inputElement,"internal_input",{id:this._element.getAttribute("data-element-id")}))}componentDidRender(){this.setStyledInput()}render(){return s(e,null,s("span",{class:"text-edit__hidden-value",ref:t=>this._valueBasis=t}),s("ez-text-input",{onInput:()=>{this.calcSizeInput(this._newValue)},class:"text-edit__form-input",value:this._newValue,ref:t=>this._inputElement=t,mode:"slim",onEzChange:t=>this.setNewValue(null==t?void 0:t.detail),noBorder:!0}),s("ez-button",{class:"text-edit__icon-check",mode:"icon",iconName:"check",size:"small",onClick:()=>{this.handleSaveEdition()}}),s("ez-button",{class:"text-edit__icon-close",mode:"icon",iconName:"close",size:"small",onClick:()=>{this.cancelEdition.emit()}}))}get _element(){return n(this)}};a.style=":host{display:flex;align-items:center;gap:5px}.text-edit__form-input{width:auto;--ez-text-input__input--padding:0px}.text-edit__hidden-value{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}";export{a as ez_text_edit}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as a,g as r}from"./p-3c7ea91b.js";import{StringUtils as l,ElementIDUtils as o}from"@sankhyalabs/core";let d=class{constructor(i){t(this,i),this.ezClick=e(this,"ezClick",7)}componentWillRender(){this.createDetailList()}componentDidLoad(){var t,e;const i={id:l.toCamelCase((null===(t=this.item)||void 0===t?void 0:t.key)||(null===(e=this.item)||void 0===e?void 0:e.title)||"")};o.addIDInfo(this._element,null,i)}createDetailList(){var t,e,i;this._details={detailsLeft:[],detailsRight:[]};let a=0;if(null===(t=this.item)||void 0===t?void 0:t.details)for(const t in this.item.details)a<3?this._details.detailsLeft.push({label:t,value:null===(e=this.item.details[t])||void 0===e?void 0:e.toString()}):this._details.detailsRight.push({label:t,value:null===(i=this.item.details[t])||void 0===i?void 0:i.toString()}),a++}buildDetailContent(t){return i("div",{class:"card-item__detail"},i("label",{class:"card-item__detail-label"},t.label),": ",i("label",{class:"card-item__detail-value",innerHTML:t.value}))}render(){return i(a,null,this.item&&i("div",{class:"card-item",onClick:()=>{this.ezClick.emit(this.item)}},i("label",{class:"card-item__title"},i("span",{class:"card-item__key",innerHTML:this.item.key}),i("span",{innerHTML:this.item.title})),i("div",{class:"card-item__details"},i("div",{class:"card-item__details-left"},this._details.detailsLeft.map((t=>this.buildDetailContent(t)))),i("div",{class:"card-item__details-right"},this._details.detailsRight.map((t=>this.buildDetailContent(t)))))))}get _element(){return r(this)}};d.style=":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";export{d as ez_card_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as n}from"./p-3c7ea91b.js";import{DateUtils as a,TimeFormatter as o,ElementIDUtils as r}from"@sankhyalabs/core";import{C as h}from"./p-4a5e37a7.js";let l=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._focused=!1,this.enabled=!0,this.showSeconds=!1,this.mode="regular"}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=a.validateDate(t,!0),s=a.validateDate(i,!0);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!this.getParsedDateTime(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}handleKeyDown(t){const i=this._textInput.shadowRoot.querySelector("input");if(t.shiftKey&&"Tab"===t.key){if(i.selectionStart>0){let e=i.value.lastIndexOf(" ",i.selectionStart);-1!==e&&(i.setSelectionRange(0,e),t.preventDefault())}}else if("Tab"===t.key&&i.value.length!==i.selectionEnd){let e=i.value.indexOf(" ",i.selectionEnd);e=-1===e?i.selectionEnd:e+1,i.setSelectionRange(e,i.value.length),t.preventDefault()}}handleFocus(){const t=this._textInput.shadowRoot.querySelector("input");if(t.selectionStart!==t.selectionEnd){let i=t.value.indexOf(" ",t.selectionStart);i=-1===i?t.value.length:i,t.setSelectionRange(0,i)}}handleClick(){const t=this._textInput.shadowRoot.querySelector("input");let i=t.value.lastIndexOf(" ",t.selectionEnd);i=-1===i?0:i+1,i=i>t.selectionEnd?0:i;let e=0===i?t.value.indexOf(" "):t.value.length;t.setSelectionRange(i,e)}changeValue(t){const i=a.validateDate(this.value,!0),e=a.validateDate(t,!0);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}showCalendar(){this._calendar.fitVertical(this.errorMessage||"slim"===this.mode?6:-13,this._elem.clientHeight),this._calendar.style.visibility="inherit"}getParsedDateTime(t){var i,e;if(void 0===t&&(t=(null===(e=null===(i=this._textInput)||void 0===i?void 0:i.value)||void 0===e?void 0:e.trim())||""),!t)return;const s=t.split(" "),n=s.length>0?s[0]:t,r=o.prepareValue(s[1]?s[1]:"",this.showSeconds);return a.strToDate(n+(r&&" "+r))}handleBlur(){var t,i;const e=(null===(i=null===(t=this._textInput)||void 0===t?void 0:t.value)||void 0===i?void 0:i.trim())||"",s=this.getParsedDateTime();if(s||!e){this.errorMessage="";const t=a.validateDate(this.value,!0),i=a.validateDate(s,!0);(null==t?void 0:t.getTime())===(null==i?void 0:i.getTime())?(i&&(this._textInput.value=this.getTextValue(i)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(i)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage="O valor digitado não é uma data válida"}getTextValue(t){return t?new Intl.DateTimeFormat("pt-BR",this.showSeconds?{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}).format(t):void 0}handleInput(t){const i=this.getParsedDateTime(),e=a.validateDate(this.value,!0),s=a.validateDate(i,!0);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}componentDidLoad(){h.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this._elem&&(r.addIDInfo(this._elem,"input"),this._textInput&&r.addIDInfo(this._textInput,"internal_input",{id:this._elem.getAttribute("data-element-id")}),this._calendar&&r.addIDInfo(this._calendar,"internal_calendar",{id:this._elem.getAttribute("data-element-id")}))}render(){return e(s,null,e("ez-text-input",{ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,restrict:"0123456789/: ",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,onKeyDown:t=>{this.handleKeyDown(t)},onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),onFocus:()=>this.handleFocus(),onClick:()=>this.handleClick()},e("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),e("ez-calendar",{onEzChange:t=>{this.changeValue(this._calendar.value),t.stopPropagation()},floating:!0,ref:t=>this._calendar=t,time:!0,showSeconds:this.showSeconds}))}get _elem(){return n(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};l.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{l as ez_date_time_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as i,H as e,g as h}from"./p-3c7ea91b.js";import{TimeFormatter as r,MaskFormatter as a,NumberUtils as o,ElementIDUtils as n}from"@sankhyalabs/core";import{C as l}from"./p-4a5e37a7.js";let u=class{constructor(i){t(this,i),this.ezChange=s(this,"ezChange",7),this.ezStartChange=s(this,"ezStartChange",7),this.ezCancelWaitingChange=s(this,"ezCancelWaitingChange",7),this.enabled=!0,this.showSeconds=!1,this.mode="regular"}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||(this.prepareValue(this._viewValue),(this._textInput.value||"")!==this._viewValue&&(this._textInput.value=this._viewValue)))}observeShowSeconds(){this.prepareMask(this.showSeconds?"##:##:##":"##:##")}observeValue(t,s){if(this._textInput&&t!=s){let i=this.validateValue(t);i!=this.validateValue(s)&&(this._viewValue=null==i?"":i.toString(),this.prepareValue(this._viewValue),this._viewValue&&!r.validateTime(this._viewValue,this.showSeconds)?(this.setError("Favor inserir um horário válido."),i=void 0):this.setError(""),this.ezChange.emit(null===i?void 0:i))}}prepareMask(t){null==this._maskFormatter?this._maskFormatter=new a(t):this._maskFormatter.mask=t}validateValue(t){return isNaN(t)||void 0===t?null:t}setError(t){this.errorMessage=t,this._textInput&&(null==t?void 0:t.trim())&&this.ezCancelWaitingChange.emit()}getViewValue(){return this._viewValue}prepareValue(t){try{this._viewValue=r.prepareValue(t,this.showSeconds),this._textInput&&this._textInput.value!==this._viewValue&&(this._textInput.value=this._viewValue)}catch(t){this.setError(t.message)}}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}handleBlur(){this._textInput&&(this._viewValue=this._textInput.value,this.prepareValue(this._viewValue),this.value=o.stringToNumber(this._viewValue.replace(/\D/g,"")))}handleInput(){o.stringToNumber(this._textInput.value.replace(/\D/g,""))!==this.value&&this.ezStartChange.emit({waitmessage:"",blocking:!1})}componentDidLoad(){l.applyVarsTextInput(this._elem,this._textInput),this._elem&&(n.addIDInfo(this._elem,"input"),this._textInput&&n.addIDInfo(this._textInput,"internal_input",{id:this._elem.getAttribute("data-element-id")}))}componentWillLoad(){this.observeShowSeconds(),this.value?this.prepareValue(this.value.toString()):this._viewValue&&this.prepareValue(this._viewValue)}render(){return i(e,null,i("ez-text-input",{ref:t=>this._textInput=t,"data-slave-mode":"true",value:this._viewValue,enabled:this.enabled,label:this.label,restrict:"0123456789:",onBlur:()=>this.handleBlur(),onInput:()=>this.handleInput(),errorMessage:this.errorMessage,mode:this.mode},i("ez-icon",{slot:"leftIcon",iconName:"timer-outline"})))}static get assetsDirs(){return["../assets"]}get _elem(){return h(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],showSeconds:["observeShowSeconds"],value:["observeValue"]}}};u.style=":host{display:flex;flex-wrap:wrap;position:relative;width:100%}";export{u as ez_time_input}
|