@sankhyalabs/ezui 2.3.12 → 2.3.14
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-actions-button.cjs.entry.js +1 -0
- package/dist/cjs/ez-button.cjs.entry.js +2 -2
- package/dist/cjs/ez-check.cjs.entry.js +1 -4
- package/dist/cjs/ez-chip.cjs.entry.js +1 -2
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +5 -6
- package/dist/cjs/ez-combo-box.cjs.entry.js +2 -2
- package/dist/cjs/ez-date-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-filter-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-form.cjs.entry.js +5 -5
- package/dist/cjs/ez-grid.cjs.entry.js +3 -3
- package/dist/cjs/ez-icon.cjs.entry.js +4 -0
- package/dist/cjs/ez-list.cjs.entry.js +4 -0
- package/dist/cjs/ez-number-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +2 -2
- package/dist/cjs/ez-tabselector.cjs.entry.js +5 -4
- package/dist/cjs/ez-text-area.cjs.entry.js +2 -2
- package/dist/cjs/ez-text-edit.cjs.entry.js +2 -2
- package/dist/cjs/ez-text-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-time-input.cjs.entry.js +2 -2
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +2 -1
- package/dist/collection/components/ez-button/ez-button.js +2 -2
- package/dist/collection/components/ez-check/ez-check.js +1 -4
- package/dist/collection/components/ez-chip/ez-chip.js +1 -2
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +15 -2
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +11 -12
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +2 -2
- package/dist/collection/components/ez-date-input/ez-date-input.js +3 -3
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +3 -3
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +2 -2
- package/dist/collection/components/ez-form/ez-form.js +4 -4
- package/dist/collection/components/ez-form/structure/FormItem.js +1 -1
- package/dist/collection/components/ez-grid/ez-grid.js +3 -3
- package/dist/collection/components/ez-icon/ez-icon.js +6 -2
- package/dist/collection/components/ez-list/ez-list.js +4 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js +2 -2
- package/dist/collection/components/ez-radio-button/ez-radio-button.js +1 -1
- package/dist/collection/components/ez-search/ez-search.js +2 -2
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +5 -4
- package/dist/collection/components/ez-text-area/ez-text-area.js +2 -2
- package/dist/collection/components/ez-text-edit/ez-text-edit.js +2 -2
- package/dist/collection/components/ez-text-input/ez-text-input.js +2 -2
- package/dist/collection/components/ez-time-input/ez-time-input.js +2 -2
- package/dist/custom-elements/index.js +52 -48
- package/dist/esm/ez-actions-button.entry.js +2 -1
- package/dist/esm/ez-button.entry.js +2 -2
- package/dist/esm/ez-check.entry.js +1 -4
- package/dist/esm/ez-chip.entry.js +1 -2
- package/dist/esm/ez-collapsible-box.entry.js +5 -6
- package/dist/esm/ez-combo-box.entry.js +2 -2
- package/dist/esm/ez-date-input.entry.js +2 -2
- package/dist/esm/ez-date-time-input.entry.js +2 -2
- package/dist/esm/ez-filter-input.entry.js +2 -2
- package/dist/esm/ez-form.entry.js +5 -5
- package/dist/esm/ez-grid.entry.js +3 -3
- package/dist/esm/ez-icon.entry.js +6 -2
- package/dist/esm/ez-list.entry.js +4 -0
- package/dist/esm/ez-number-input.entry.js +2 -2
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +2 -2
- package/dist/esm/ez-tabselector.entry.js +5 -4
- package/dist/esm/ez-text-area.entry.js +2 -2
- package/dist/esm/ez-text-edit.entry.js +2 -2
- package/dist/esm/ez-text-input.entry.js +2 -2
- package/dist/esm/ez-time-input.entry.js +2 -2
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-81fb0c90.entry.js → p-01b79946.entry.js} +1 -1
- package/dist/ezui/{p-ccbe8272.entry.js → p-123a2bd5.entry.js} +1 -1
- package/dist/ezui/{p-941d9bf9.entry.js → p-1a89d3ff.entry.js} +1 -1
- package/dist/ezui/{p-ff5be174.entry.js → p-4c061e51.entry.js} +1 -1
- package/dist/ezui/p-51e31ecb.entry.js +1 -0
- package/dist/ezui/p-52997e83.entry.js +1 -0
- package/dist/ezui/p-5cb4b43b.entry.js +1 -0
- package/dist/ezui/p-6d0b9d3c.entry.js +1 -0
- package/dist/ezui/p-7b906805.entry.js +1 -0
- package/dist/ezui/p-7e496975.entry.js +1 -0
- package/dist/ezui/p-87ee59e8.entry.js +1 -0
- package/dist/ezui/p-941e9792.entry.js +1 -0
- package/dist/ezui/p-9def6fd0.entry.js +1 -0
- package/dist/ezui/p-a2e55b33.entry.js +1 -0
- package/dist/ezui/p-a34b52f8.entry.js +1 -0
- package/dist/ezui/p-abcd17e6.entry.js +1 -0
- package/dist/ezui/{p-ede1328a.entry.js → p-ad5fe50b.entry.js} +1 -1
- package/dist/ezui/p-bf26ae36.entry.js +1 -0
- package/dist/ezui/{p-72d755a8.entry.js → p-ea877274.entry.js} +1 -1
- package/dist/ezui/p-f2627de5.entry.js +1 -0
- package/dist/ezui/p-f2c4e811.entry.js +1 -0
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +2 -2
- package/dist/types/components/ez-form/ez-form.d.ts +0 -1
- package/dist/types/components/ez-icon/ez-icon.d.ts +2 -0
- package/dist/types/components/ez-list/ez-list.d.ts +1 -0
- package/dist/types/components.d.ts +8 -8
- package/package.json +1 -1
- package/dist/ezui/p-1214c5ce.entry.js +0 -1
- package/dist/ezui/p-205fc8bc.entry.js +0 -1
- package/dist/ezui/p-66ebdf34.entry.js +0 -1
- package/dist/ezui/p-6bcf35fd.entry.js +0 -1
- package/dist/ezui/p-7cf71eb3.entry.js +0 -1
- package/dist/ezui/p-88d0fc06.entry.js +0 -1
- package/dist/ezui/p-8964287f.entry.js +0 -1
- package/dist/ezui/p-8c874b58.entry.js +0 -1
- package/dist/ezui/p-ac15d77e.entry.js +0 -1
- package/dist/ezui/p-c2ebc450.entry.js +0 -1
- package/dist/ezui/p-ca9a0a49.entry.js +0 -1
- package/dist/ezui/p-e2337c61.entry.js +0 -1
- package/dist/ezui/p-ec9decf2.entry.js +0 -1
- package/dist/ezui/p-f4d2438e.entry.js +0 -1
- package/dist/ezui/p-fcee02c6.entry.js +0 -1
|
@@ -17,9 +17,9 @@ export class EzCollapsibleBox {
|
|
|
17
17
|
*/
|
|
18
18
|
this.iconPlacement = "left";
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Define a posição do conteúdo do cabeçalho do componente.
|
|
21
21
|
*/
|
|
22
|
-
this.
|
|
22
|
+
this.headerAlign = "left";
|
|
23
23
|
/**
|
|
24
24
|
* Se true mostra o ícone para remoção do componente.
|
|
25
25
|
*/
|
|
@@ -112,11 +112,10 @@ export class EzCollapsibleBox {
|
|
|
112
112
|
render() {
|
|
113
113
|
return (h("div", { class: "collapsible-box" },
|
|
114
114
|
h("div", { class: "collapsible-box__header" },
|
|
115
|
-
h("button", Object.assign({}, (!this._activeEditText ? { onClick: () => { this.showHide(); } } : null), { class: "collapsible-box__title" +
|
|
115
|
+
h("button", Object.assign({}, (!this._activeEditText ? { onClick: () => { this.showHide(); } } : null), { class: "collapsible-box__title collapsible-box__title--" + (this.headerAlign || "left") +
|
|
116
116
|
(this.iconPlacement === "right" ? " collapsible-box__title--icon-right" : "") +
|
|
117
|
-
(this.stretchTitle ? " collapsible-box__title--stretched" : "") +
|
|
118
117
|
(this.value ? " collapsible-box__title--no-margin" : "") }),
|
|
119
|
-
h("ez-icon", { slot: "icon", "icon-name": "chevron-right", size: this.getHeaderSize(), class: "collapsible-box__icon collapsible-box__icon--" + this.getHeaderSize() + (this.value ? " collapsible-box__icon--collapsed" : "") }),
|
|
118
|
+
h("ez-icon", { slot: "icon", "icon-name": "chevron-right", size: this.getHeaderSize(), class: "collapsible-box__icon collapsible-box__icon--" + this.getHeaderSize() + (this.value ? " collapsible-box__icon--collapsed" : ""), id: "toggleCollapsible" }),
|
|
120
119
|
!this._activeEditText ?
|
|
121
120
|
h("label", { class: "collapsible-box__label font--" + this.getHeaderSize(), title: this.label, ref: elem => this._refLabel = elem },
|
|
122
121
|
h("span", null, this.label),
|
|
@@ -208,23 +207,23 @@ export class EzCollapsibleBox {
|
|
|
208
207
|
"reflect": true,
|
|
209
208
|
"defaultValue": "\"left\""
|
|
210
209
|
},
|
|
211
|
-
"
|
|
212
|
-
"type": "
|
|
210
|
+
"headerAlign": {
|
|
211
|
+
"type": "string",
|
|
213
212
|
"mutable": false,
|
|
214
213
|
"complexType": {
|
|
215
|
-
"original": "
|
|
216
|
-
"resolved": "
|
|
214
|
+
"original": "\"center\" | \"left\" | \"right\" | \"stretch\" | undefined",
|
|
215
|
+
"resolved": "\"center\" | \"left\" | \"right\" | \"stretch\"",
|
|
217
216
|
"references": {}
|
|
218
217
|
},
|
|
219
218
|
"required": false,
|
|
220
219
|
"optional": false,
|
|
221
220
|
"docs": {
|
|
222
221
|
"tags": [],
|
|
223
|
-
"text": "
|
|
222
|
+
"text": "Define a posi\u00E7\u00E3o do conte\u00FAdo do cabe\u00E7alho do componente."
|
|
224
223
|
},
|
|
225
|
-
"attribute": "
|
|
224
|
+
"attribute": "header-align",
|
|
226
225
|
"reflect": true,
|
|
227
|
-
"defaultValue": "
|
|
226
|
+
"defaultValue": "\"left\""
|
|
228
227
|
},
|
|
229
228
|
"removable": {
|
|
230
229
|
"type": "boolean",
|
|
@@ -441,9 +441,9 @@ export class EzComboBox {
|
|
|
441
441
|
}
|
|
442
442
|
render() {
|
|
443
443
|
var _a;
|
|
444
|
-
|
|
444
|
+
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
445
445
|
return (h(Host, null,
|
|
446
|
-
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(
|
|
446
|
+
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode },
|
|
447
447
|
h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() },
|
|
448
448
|
h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })),
|
|
449
449
|
this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
|
|
@@ -133,11 +133,11 @@ export class EzDateInput {
|
|
|
133
133
|
this.setInputValue();
|
|
134
134
|
}
|
|
135
135
|
render() {
|
|
136
|
-
|
|
136
|
+
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
137
137
|
return (h(Host, null,
|
|
138
|
-
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(
|
|
138
|
+
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), 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 },
|
|
139
139
|
h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })),
|
|
140
|
-
h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo(
|
|
140
|
+
h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
141
141
|
}
|
|
142
142
|
static get is() { return "ez-date-input"; }
|
|
143
143
|
static get encapsulation() { return "shadow"; }
|
|
@@ -186,11 +186,11 @@ export class EzDateTimeInput {
|
|
|
186
186
|
this.setInputValue();
|
|
187
187
|
}
|
|
188
188
|
render() {
|
|
189
|
-
|
|
189
|
+
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
190
190
|
return (h(Host, null,
|
|
191
|
-
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(
|
|
191
|
+
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), 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() },
|
|
192
192
|
h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })),
|
|
193
|
-
h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo(
|
|
193
|
+
h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.changeValue(this._calendar.value); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
|
|
194
194
|
}
|
|
195
195
|
static get is() { return "ez-date-time-input"; }
|
|
196
196
|
static get encapsulation() { return "shadow"; }
|
|
@@ -57,8 +57,8 @@ export class EzFilterInput {
|
|
|
57
57
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
-
|
|
61
|
-
return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(
|
|
60
|
+
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
61
|
+
return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), 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, mode: this.mode },
|
|
62
62
|
h("ez-icon", { slot: "leftIcon", iconName: "search" })));
|
|
63
63
|
}
|
|
64
64
|
static get is() { return "ez-filter-input"; }
|
|
@@ -100,10 +100,10 @@ export class EzForm {
|
|
|
100
100
|
const tabs = allSheets.map((sheet, index) => {
|
|
101
101
|
return { tabKey: sheet.name, label: sheet.label, index };
|
|
102
102
|
});
|
|
103
|
-
const idTabSelector =
|
|
103
|
+
const idTabSelector = `selector`;
|
|
104
104
|
result.push(h("ez-tabselector", { tabs: this.buildIdTabSelector(tabs), onEzChange: (evt) => this._store.dispatch(changeTab(evt.detail)), selectedTab: currentSheet.name, "data-element-id": idTabSelector }));
|
|
105
105
|
}
|
|
106
|
-
const idFormSheet = `${
|
|
106
|
+
const idFormSheet = `${StringUtils.replaceAccentuatedChars(StringUtils.toCamelCase(currentSheet.label), false)}_selectorContainer`;
|
|
107
107
|
result.push(h(FormSheet, { store: this._store, source: currentSheet, dataElementId: idFormSheet }));
|
|
108
108
|
return result;
|
|
109
109
|
}
|
|
@@ -168,7 +168,7 @@ export class EzForm {
|
|
|
168
168
|
this._staticFields = Array.from(this._element.querySelectorAll("[data-field-name]"));
|
|
169
169
|
this.processMetadata();
|
|
170
170
|
const dataInfo = { dataUnit: this.dataUnit };
|
|
171
|
-
|
|
171
|
+
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
172
172
|
}
|
|
173
173
|
componentDidRender() {
|
|
174
174
|
this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")));
|
|
@@ -181,7 +181,7 @@ export class EzForm {
|
|
|
181
181
|
}
|
|
182
182
|
buildIdTabSelector(tabs) {
|
|
183
183
|
if (tabs) {
|
|
184
|
-
tabs.forEach(tab => tab[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] =
|
|
184
|
+
tabs.forEach(tab => tab[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = StringUtils.toCamelCase(tab.label));
|
|
185
185
|
}
|
|
186
186
|
return tabs;
|
|
187
187
|
}
|
|
@@ -3,7 +3,7 @@ import { buildField } from "../fieldbuilder/FieldBuilder";
|
|
|
3
3
|
export const FormItem = ({ source }) => {
|
|
4
4
|
if ("items" in source) {
|
|
5
5
|
const fieldSet = source;
|
|
6
|
-
return h("ez-collapsible-box", { label: source.label, "header-size": "large" }, fieldSet.items.map(fi => buildField(fi)));
|
|
6
|
+
return h("ez-collapsible-box", { label: source.label, "header-size": "large", key: source.label }, fieldSet.items.map(fi => buildField(fi)));
|
|
7
7
|
}
|
|
8
8
|
else {
|
|
9
9
|
return buildField(source);
|
|
@@ -152,9 +152,9 @@ export class EzGrid {
|
|
|
152
152
|
}
|
|
153
153
|
buildDataElementId() {
|
|
154
154
|
const dataInfo = { dataUnit: this.dataUnit };
|
|
155
|
-
|
|
156
|
-
const dtInfo = { id:
|
|
157
|
-
ElementIDUtils.addIDInfo(this._refPaginationControl,
|
|
155
|
+
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
156
|
+
const dtInfo = { id: "ezGrid" };
|
|
157
|
+
ElementIDUtils.addIDInfo(this._refPaginationControl, "pagination", dtInfo);
|
|
158
158
|
}
|
|
159
159
|
previousPage() {
|
|
160
160
|
if (this.dataUnit) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StringUtils } from "@sankhyalabs/core";
|
|
2
|
-
import { Component, h, Host, Prop } from "@stencil/core";
|
|
1
|
+
import { ElementIDUtils, StringUtils } from "@sankhyalabs/core";
|
|
2
|
+
import { Component, Element, h, Host, Prop } from "@stencil/core";
|
|
3
3
|
export class EzIcon {
|
|
4
4
|
constructor() {
|
|
5
5
|
/**
|
|
@@ -25,6 +25,9 @@ export class EzIcon {
|
|
|
25
25
|
return h("img", { class: this.size, src: this.href });
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
componentDidLoad() {
|
|
29
|
+
ElementIDUtils.addIDInfo(this._hostElement, "icon");
|
|
30
|
+
}
|
|
28
31
|
render() {
|
|
29
32
|
return (h(Host, null, this.getIconContent()));
|
|
30
33
|
}
|
|
@@ -90,4 +93,5 @@ export class EzIcon {
|
|
|
90
93
|
"reflect": true
|
|
91
94
|
}
|
|
92
95
|
}; }
|
|
96
|
+
static get elementRef() { return "_hostElement"; }
|
|
93
97
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ElementIDUtils } from "@sankhyalabs/core";
|
|
1
2
|
import { Component, Event, h, Host, Method, Prop, State } from "@stencil/core";
|
|
2
3
|
;
|
|
3
4
|
;
|
|
@@ -159,6 +160,9 @@ export class EzList {
|
|
|
159
160
|
componentWillRender() {
|
|
160
161
|
this.createList();
|
|
161
162
|
}
|
|
163
|
+
componentDidLoad() {
|
|
164
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
165
|
+
}
|
|
162
166
|
onDrop(ev, dragEndItem) {
|
|
163
167
|
this.removeOverClass();
|
|
164
168
|
this.setSelection(undefined);
|
|
@@ -126,8 +126,8 @@ export class EzNumberInput {
|
|
|
126
126
|
this.setInputValue();
|
|
127
127
|
}
|
|
128
128
|
render() {
|
|
129
|
-
|
|
130
|
-
return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(
|
|
129
|
+
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
130
|
+
return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), 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 }));
|
|
131
131
|
}
|
|
132
132
|
static get is() { return "ez-number-input"; }
|
|
133
133
|
static get encapsulation() { return "shadow"; }
|
|
@@ -40,7 +40,7 @@ export class EzRadioButton {
|
|
|
40
40
|
return (h(Host, null,
|
|
41
41
|
this.label && h("label", { class: "label" }, this.label),
|
|
42
42
|
h("div", { class: "form form--" + this.direction }, this._options.map((option, key) => h("div", { class: "form__group" },
|
|
43
|
-
h("input", { id: "rad" + key, class: "form__radio", name: "theradio", type: "radio", value: option.value, onChange: (ev) => { this.handleInputChange(ev); }, disabled: !this.enabled, checked: option.value === this.value }),
|
|
43
|
+
h("input", { id: "rad" + key, class: "form__radio", name: "theradio", type: "radio", value: option.value, onChange: (ev) => { this.handleInputChange(ev); }, disabled: !this.enabled, checked: option.value === this.value, "data-element-id": ElementIDUtils.getInternalIDInfo(`input_${option.value}`) }),
|
|
44
44
|
h("label", { htmlFor: "rad" + key, class: "form__label" }, option.label))))));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "ez-radio-button"; }
|
|
@@ -64,8 +64,8 @@ export class EzSearch {
|
|
|
64
64
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._comboElement);
|
|
65
65
|
}
|
|
66
66
|
render() {
|
|
67
|
-
|
|
68
|
-
return (h("ez-combo-box", { "data-element-id": ElementIDUtils.getInternalIDInfo(
|
|
67
|
+
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
68
|
+
return (h("ez-combo-box", { "data-element-id": ElementIDUtils.getInternalIDInfo("combo"), 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 }));
|
|
69
69
|
}
|
|
70
70
|
;
|
|
71
71
|
static get is() { return "ez-search"; }
|
|
@@ -67,7 +67,6 @@ export class EzTabselector {
|
|
|
67
67
|
this.setFocusedBtn(false, tab.index);
|
|
68
68
|
}
|
|
69
69
|
componentWillRender() {
|
|
70
|
-
ElementIDUtils.addIDInfo(this._hostElem);
|
|
71
70
|
if (!this._processedTabs) {
|
|
72
71
|
this._processedTabs = [];
|
|
73
72
|
if (this.tabs) {
|
|
@@ -99,10 +98,12 @@ export class EzTabselector {
|
|
|
99
98
|
this.updateScroll();
|
|
100
99
|
}
|
|
101
100
|
componentDidLoad() {
|
|
101
|
+
ElementIDUtils.addIDInfo(this._hostElem, "itemsSelector");
|
|
102
102
|
this._hostElem.shadowRoot.querySelectorAll('button[name="tab-button"]').forEach((elem) => {
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
|
|
103
|
+
var _a;
|
|
104
|
+
const label = (_a = elem.querySelector('span.tab-label')) === null || _a === void 0 ? void 0 : _a.innerText;
|
|
105
|
+
const dataInfo = { id: `${StringUtils.toCamelCase(label)}` };
|
|
106
|
+
ElementIDUtils.addIDInfo(elem, "itemSelector", dataInfo);
|
|
106
107
|
});
|
|
107
108
|
}
|
|
108
109
|
handleSlotChange(ev) {
|
|
@@ -136,13 +136,13 @@ export class EzTextArea {
|
|
|
136
136
|
this.observeMode();
|
|
137
137
|
}
|
|
138
138
|
render() {
|
|
139
|
-
|
|
139
|
+
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
140
140
|
return (h(Host, null,
|
|
141
141
|
h("div", { class: "textarea", ref: (el) => this._container = el },
|
|
142
142
|
this.label && this.mode != "slim" ?
|
|
143
143
|
h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "textarea__label" : "textarea__label textarea__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
144
144
|
: null,
|
|
145
|
-
h("textarea", { onFocus: () => this.handleFocus(), "data-element-id": ElementIDUtils.getInternalIDInfo(
|
|
145
|
+
h("textarea", { onFocus: () => this.handleFocus(), "data-element-id": ElementIDUtils.getInternalIDInfo("input"), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, class: this.mode === "slim" ? "textarea--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, onKeyDown: event => event.stopPropagation(), rows: this.rows })),
|
|
146
146
|
this.canShowError && this.mode != "slim" &&
|
|
147
147
|
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
148
148
|
}
|
|
@@ -81,10 +81,10 @@ export class EzTextEdit {
|
|
|
81
81
|
this.setStyledInput();
|
|
82
82
|
}
|
|
83
83
|
render() {
|
|
84
|
-
|
|
84
|
+
ElementIDUtils.addIDInfoIfNotExists(this._element, 'input');
|
|
85
85
|
return (h(Host, null,
|
|
86
86
|
h("span", { class: "text-edit__hidden-value", ref: elem => this._valueBasis = elem }),
|
|
87
|
-
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(
|
|
87
|
+
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), 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 }),
|
|
88
88
|
h("ez-button", { class: "text-edit__icon-check", mode: "icon", iconName: "check", size: "small", onClick: () => { this.handleSaveEdition(); } }),
|
|
89
89
|
h("ez-button", { class: "text-edit__icon-close", mode: "icon", iconName: "close", size: "small", onClick: () => { this.cancelEdition.emit(); } })));
|
|
90
90
|
}
|
|
@@ -223,13 +223,13 @@ export class EzTextInput {
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
render() {
|
|
226
|
-
|
|
226
|
+
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
227
227
|
return (h(Host, null,
|
|
228
228
|
h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
|
|
229
229
|
this.label && this.mode != "slim" ?
|
|
230
230
|
h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
231
231
|
: null,
|
|
232
|
-
h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo(
|
|
232
|
+
h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }),
|
|
233
233
|
h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
|
|
234
234
|
this.canShowError && this.mode != "slim" &&
|
|
235
235
|
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
@@ -142,9 +142,9 @@ export class EzTimeInput {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
render() {
|
|
145
|
-
|
|
145
|
+
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
146
146
|
return (h(Host, null,
|
|
147
|
-
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(
|
|
147
|
+
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: (el) => this._textInput = el, "data-slave-mode": "true", value: this._viewValue, enabled: this.enabled, label: this.label, restrict: "0123456789:", onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), errorMessage: this.errorMessage, mode: this.mode },
|
|
148
148
|
h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
149
149
|
}
|
|
150
150
|
static get is() { return "ez-time-input"; }
|