@sankhyalabs/ezui 2.2.3 → 2.3.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-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +2 -7
- package/dist/cjs/ez-date-input.cjs.entry.js +2 -10
- package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -10
- package/dist/cjs/ez-filter-input.cjs.entry.js +2 -7
- package/dist/cjs/ez-form.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +2 -7
- package/dist/cjs/ez-search.cjs.entry.js +2 -7
- package/dist/cjs/ez-tabselector.cjs.entry.js +4 -4
- package/dist/cjs/ez-text-area.cjs.entry.js +2 -7
- package/dist/cjs/ez-text-edit.cjs.entry.js +2 -7
- package/dist/cjs/ez-text-input.cjs.entry.js +2 -7
- package/dist/cjs/ez-time-input.cjs.entry.js +2 -7
- package/dist/collection/components/ez-chip/ez-chip.js +1 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +2 -7
- package/dist/collection/components/ez-date-input/ez-date-input.js +3 -11
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +3 -11
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +2 -7
- package/dist/collection/components/ez-form/ez-form.js +1 -1
- package/dist/collection/components/ez-number-input/ez-number-input.js +2 -7
- package/dist/collection/components/ez-search/ez-search.js +2 -7
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +4 -4
- package/dist/collection/components/ez-text-area/ez-text-area.js +2 -7
- package/dist/collection/components/ez-text-edit/ez-text-edit.js +2 -7
- package/dist/collection/components/ez-text-input/ez-text-input.js +2 -7
- package/dist/collection/components/ez-time-input/ez-time-input.js +2 -7
- package/dist/custom-elements/index.js +26 -82
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +2 -7
- package/dist/esm/ez-date-input.entry.js +2 -10
- package/dist/esm/ez-date-time-input.entry.js +2 -10
- package/dist/esm/ez-filter-input.entry.js +2 -7
- package/dist/esm/ez-form.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +2 -7
- package/dist/esm/ez-search.entry.js +2 -7
- package/dist/esm/ez-tabselector.entry.js +4 -4
- package/dist/esm/ez-text-area.entry.js +2 -7
- package/dist/esm/ez-text-edit.entry.js +2 -7
- package/dist/esm/ez-text-input.entry.js +2 -7
- package/dist/esm/ez-time-input.entry.js +2 -7
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-b484a0b3.entry.js → p-0fb5f4be.entry.js} +1 -1
- package/dist/ezui/p-66ebdf34.entry.js +1 -0
- package/dist/ezui/p-6bcf35fd.entry.js +1 -0
- package/dist/ezui/{p-587e8dca.entry.js → p-72d755a8.entry.js} +1 -1
- package/dist/ezui/p-7cf71eb3.entry.js +1 -0
- package/dist/ezui/{p-107aff56.entry.js → p-81fb0c90.entry.js} +1 -1
- package/dist/ezui/p-855f99f8.entry.js +1 -0
- package/dist/ezui/{p-8eae779b.entry.js → p-941d9bf9.entry.js} +1 -1
- package/dist/ezui/p-ac15d77e.entry.js +1 -0
- package/dist/ezui/p-c2ebc450.entry.js +1 -0
- package/dist/ezui/p-ca9a0a49.entry.js +1 -0
- package/dist/ezui/{p-a595dd4e.entry.js → p-cba61296.entry.js} +1 -1
- package/dist/ezui/p-f4d2438e.entry.js +1 -0
- package/package.json +2 -2
- package/dist/ezui/p-019c7fc4.entry.js +0 -1
- package/dist/ezui/p-4b2595f4.entry.js +0 -1
- package/dist/ezui/p-6a8e7fb2.entry.js +0 -1
- package/dist/ezui/p-74e6c2a9.entry.js +0 -1
- package/dist/ezui/p-7b8d1f1c.entry.js +0 -1
- package/dist/ezui/p-c55f63c6.entry.js +0 -1
- package/dist/ezui/p-dff2b725.entry.js +0 -1
- package/dist/ezui/p-fe578dc0.entry.js +0 -1
|
@@ -96,7 +96,7 @@ let EzChip = class {
|
|
|
96
96
|
if (this._containerElem) {
|
|
97
97
|
this.observeValue();
|
|
98
98
|
this.observeEnabled();
|
|
99
|
-
this._containerElem.setAttribute(
|
|
99
|
+
this._containerElem.setAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME, 'ezChip_internal_button');
|
|
100
100
|
core.ElementIDUtils.addIDInfo(this._containerElem);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
@@ -359,12 +359,6 @@ let EzComboBox = class {
|
|
|
359
359
|
componentDidLoad() {
|
|
360
360
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
361
361
|
this.setInputValue(false);
|
|
362
|
-
if (this.el) {
|
|
363
|
-
core.ElementIDUtils.addIDInfo(this.el, 'input');
|
|
364
|
-
if (this._textInput) {
|
|
365
|
-
core.ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this.el.getAttribute("data-element-id") });
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
362
|
}
|
|
369
363
|
//---------------------------------------------
|
|
370
364
|
// Event handlers
|
|
@@ -457,7 +451,8 @@ let EzComboBox = class {
|
|
|
457
451
|
}
|
|
458
452
|
render() {
|
|
459
453
|
var _a;
|
|
460
|
-
|
|
454
|
+
let elementId = core.ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
455
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo(elementId, "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 }, index.h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, index.h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })), this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
|
|
461
456
|
? index.h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, index.h("ez-icon", { iconName: "close" }))
|
|
462
457
|
: undefined), index.h("section", { class: "list-container", ref: elem => this._listContainer = elem }, index.h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, index.h("div", { class: "list-options", ref: elem => this._optionsList = elem }, this._visibleOptions.length === 0
|
|
463
458
|
&& index.h("div", { class: "message" }, !this._showLoading && index.h("span", { class: "message__no-result" }, this._textEmptyList), this._showLoading && index.h("div", { class: "message__loading" })), this.showOptionValue
|
|
@@ -142,18 +142,10 @@ let EzDateInput = class {
|
|
|
142
142
|
componentDidLoad() {
|
|
143
143
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
144
144
|
this.setInputValue();
|
|
145
|
-
if (this._elem) {
|
|
146
|
-
core.ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
147
|
-
if (this._textInput) {
|
|
148
|
-
core.ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
149
|
-
}
|
|
150
|
-
if (this._calendar) {
|
|
151
|
-
core.ElementIDUtils.addIDInfo(this._calendar, 'internal_calendar', { id: this._elem.getAttribute("data-element-id") });
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
145
|
}
|
|
155
146
|
render() {
|
|
156
|
-
|
|
147
|
+
let elementId = core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
148
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo(elementId, "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 }, index.h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), index.h("ez-calendar", { "data-element-id": core.ElementIDUtils.getInternalIDInfo(elementId, "calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
157
149
|
}
|
|
158
150
|
get _elem() { return index.getElement(this); }
|
|
159
151
|
static get watchers() { return {
|
|
@@ -197,18 +197,10 @@ let EzDateTimeInput = class {
|
|
|
197
197
|
componentDidLoad() {
|
|
198
198
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
199
199
|
this.setInputValue();
|
|
200
|
-
if (this._elem) {
|
|
201
|
-
core.ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
202
|
-
if (this._textInput) {
|
|
203
|
-
core.ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
204
|
-
}
|
|
205
|
-
if (this._calendar) {
|
|
206
|
-
core.ElementIDUtils.addIDInfo(this._calendar, 'internal_calendar', { id: this._elem.getAttribute("data-element-id") });
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
200
|
}
|
|
210
201
|
render() {
|
|
211
|
-
|
|
202
|
+
let elementId = core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
203
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo(elementId, "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() }, index.h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), index.h("ez-calendar", { "data-element-id": core.ElementIDUtils.getInternalIDInfo(elementId, "calendar"), onEzChange: (event) => { this.changeValue(this._calendar.value); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
|
|
212
204
|
}
|
|
213
205
|
get _elem() { return index.getElement(this); }
|
|
214
206
|
static get watchers() { return {
|
|
@@ -64,15 +64,10 @@ let EzFilterInput = class {
|
|
|
64
64
|
}
|
|
65
65
|
componentDidLoad() {
|
|
66
66
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
67
|
-
if (this._elem) {
|
|
68
|
-
core.ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
69
|
-
if (this._textInput) {
|
|
70
|
-
core.ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
67
|
}
|
|
74
68
|
render() {
|
|
75
|
-
|
|
69
|
+
let elementId = core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
70
|
+
return (index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo(elementId, "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, loading: this.loading, mode: this.mode }, index.h("ez-icon", { slot: "leftIcon", iconName: "search" })));
|
|
76
71
|
}
|
|
77
72
|
get _elem() { return index.getElement(this); }
|
|
78
73
|
static get watchers() { return {
|
|
@@ -1026,7 +1026,7 @@ let EzForm = class {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
buildIdTabSelector(tabs) {
|
|
1028
1028
|
if (tabs) {
|
|
1029
|
-
tabs.forEach(tab => tab[
|
|
1029
|
+
tabs.forEach(tab => tab[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `${this._dataElementIdEzForm}_${core.StringUtils.toCamelCase(tab.label)}`);
|
|
1030
1030
|
}
|
|
1031
1031
|
return tabs;
|
|
1032
1032
|
}
|
|
@@ -137,15 +137,10 @@ let EzNumberInput = class {
|
|
|
137
137
|
componentDidLoad() {
|
|
138
138
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
139
139
|
this.setInputValue();
|
|
140
|
-
if (this._elem) {
|
|
141
|
-
core.ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
142
|
-
if (this._textInput) {
|
|
143
|
-
core.ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
140
|
}
|
|
147
141
|
render() {
|
|
148
|
-
|
|
142
|
+
let elementId = core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
143
|
+
return (index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo(elementId, "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 }));
|
|
149
144
|
}
|
|
150
145
|
get _elem() { return index.getElement(this); }
|
|
151
146
|
static get watchers() { return {
|
|
@@ -72,15 +72,10 @@ let EzSearch = class {
|
|
|
72
72
|
}
|
|
73
73
|
componentDidLoad() {
|
|
74
74
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._comboElement);
|
|
75
|
-
if (this._elem) {
|
|
76
|
-
core.ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
77
|
-
if (this._comboElement) {
|
|
78
|
-
core.ElementIDUtils.addIDInfo(this._comboElement, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
75
|
}
|
|
82
76
|
render() {
|
|
83
|
-
|
|
77
|
+
let elementId = core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
78
|
+
return (index.h("ez-combo-box", { "data-element-id": core.ElementIDUtils.getInternalIDInfo(elementId, "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 }));
|
|
84
79
|
}
|
|
85
80
|
;
|
|
86
81
|
get _elem() { return index.getElement(this); }
|
|
@@ -109,7 +109,7 @@ let EzTabselector = class {
|
|
|
109
109
|
}
|
|
110
110
|
componentDidLoad() {
|
|
111
111
|
this._hostElem.shadowRoot.querySelectorAll('button[name="tab-button"]').forEach((elem) => {
|
|
112
|
-
const elemIdTabSelector = this._hostElem.getAttribute(
|
|
112
|
+
const elemIdTabSelector = this._hostElem.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
|
113
113
|
const dataInfo = { id: `${elemIdTabSelector}_${core.StringUtils.toCamelCase(elem.id)}` };
|
|
114
114
|
core.ElementIDUtils.addIDInfo(elem, null, dataInfo);
|
|
115
115
|
});
|
|
@@ -201,10 +201,10 @@ let EzTabselector = class {
|
|
|
201
201
|
}
|
|
202
202
|
buildElementIdTab(tabs) {
|
|
203
203
|
tabs.forEach(tab => {
|
|
204
|
-
if (!tab.hasOwnProperty(
|
|
205
|
-
const elemIdTabSelector = this._hostElem.getAttribute(
|
|
204
|
+
if (!tab.hasOwnProperty(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME)) {
|
|
205
|
+
const elemIdTabSelector = this._hostElem.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
|
206
206
|
const dataElementID = `${elemIdTabSelector}_${core.StringUtils.toCamelCase(tab.tabKey)}`;
|
|
207
|
-
tab[
|
|
207
|
+
tab[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = dataElementID;
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
}
|
|
@@ -143,17 +143,12 @@ let EzTextArea = class {
|
|
|
143
143
|
this.observeErrorMessage();
|
|
144
144
|
this.adjustFloatingLabel();
|
|
145
145
|
this.observeMode();
|
|
146
|
-
if (this._hostElement) {
|
|
147
|
-
core.ElementIDUtils.addIDInfo(this._hostElement, 'input');
|
|
148
|
-
if (this._inputElem) {
|
|
149
|
-
core.ElementIDUtils.addIDInfo(this._inputElem, 'internal_input', { id: this._hostElement.getAttribute("data-element-id") });
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
146
|
}
|
|
153
147
|
render() {
|
|
148
|
+
let elementId = core.ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
154
149
|
return (index.h(index.Host, null, index.h("div", { class: "textarea", ref: (el) => this._container = el }, this.label && this.mode != "slim" ?
|
|
155
150
|
index.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)
|
|
156
|
-
: null, index.h("textarea", { onFocus: () => this.handleFocus(), 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 })), this.canShowError && this.mode != "slim" &&
|
|
151
|
+
: null, index.h("textarea", { onFocus: () => this.handleFocus(), "data-element-id": core.ElementIDUtils.getInternalIDInfo(elementId, "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 })), this.canShowError && this.mode != "slim" &&
|
|
157
152
|
index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
158
153
|
}
|
|
159
154
|
get _hostElement() { return index.getElement(this); }
|
|
@@ -90,18 +90,13 @@ let EzTextEdit = class {
|
|
|
90
90
|
componentDidLoad() {
|
|
91
91
|
this.applyFocusSelect();
|
|
92
92
|
this.setNewValue(this.value);
|
|
93
|
-
if (this._element) {
|
|
94
|
-
core.ElementIDUtils.addIDInfo(this._element, 'input');
|
|
95
|
-
if (this._inputElement) {
|
|
96
|
-
core.ElementIDUtils.addIDInfo(this._inputElement, 'internal_input', { id: this._element.getAttribute("data-element-id") });
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
93
|
}
|
|
100
94
|
componentDidRender() {
|
|
101
95
|
this.setStyledInput();
|
|
102
96
|
}
|
|
103
97
|
render() {
|
|
104
|
-
|
|
98
|
+
let elementId = core.ElementIDUtils.addIDInfoIfNotExists(this._element, 'input');
|
|
99
|
+
return (index.h(index.Host, null, index.h("span", { class: "text-edit__hidden-value", ref: elem => this._valueBasis = elem }), index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo(elementId, "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 }), index.h("ez-button", { class: "text-edit__icon-check", mode: "icon", iconName: "check", size: "small", onClick: () => { this.handleSaveEdition(); } }), index.h("ez-button", { class: "text-edit__icon-close", mode: "icon", iconName: "close", size: "small", onClick: () => { this.cancelEdition.emit(); } })));
|
|
105
100
|
}
|
|
106
101
|
get _element() { return index.getElement(this); }
|
|
107
102
|
};
|
|
@@ -213,12 +213,6 @@ let EzTextInput = class {
|
|
|
213
213
|
this.observeMask();
|
|
214
214
|
this.adjustFloatingLabel();
|
|
215
215
|
this.adjustBorderInput();
|
|
216
|
-
if (this._hostElement) {
|
|
217
|
-
core.ElementIDUtils.addIDInfo(this._hostElement, 'input');
|
|
218
|
-
if (this._inputElem) {
|
|
219
|
-
core.ElementIDUtils.addIDInfo(this._inputElem, 'internal_input', { id: this._hostElement.getAttribute("data-element-id") });
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
216
|
}
|
|
223
217
|
componentWillLoad() {
|
|
224
218
|
this.observeMask();
|
|
@@ -238,9 +232,10 @@ let EzTextInput = class {
|
|
|
238
232
|
}
|
|
239
233
|
}
|
|
240
234
|
render() {
|
|
235
|
+
let elementId = core.ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
241
236
|
return (index.h(index.Host, null, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
242
237
|
index.h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
243
|
-
: null, index.h("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(); } }), index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
238
|
+
: null, index.h("input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo(elementId, "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(); } }), index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
244
239
|
index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
245
240
|
}
|
|
246
241
|
get _hostElement() { return index.getElement(this); }
|
|
@@ -142,12 +142,6 @@ let EzTimeInput = class {
|
|
|
142
142
|
//---------------------------------------------
|
|
143
143
|
componentDidLoad() {
|
|
144
144
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
145
|
-
if (this._elem) {
|
|
146
|
-
core.ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
147
|
-
if (this._textInput) {
|
|
148
|
-
core.ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
145
|
}
|
|
152
146
|
componentWillLoad() {
|
|
153
147
|
this.observeShowSeconds();
|
|
@@ -159,7 +153,8 @@ let EzTimeInput = class {
|
|
|
159
153
|
}
|
|
160
154
|
}
|
|
161
155
|
render() {
|
|
162
|
-
|
|
156
|
+
let elementId = core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
157
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo(elementId, "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 }, index.h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
163
158
|
}
|
|
164
159
|
static get assetsDirs() { return ["../assets"]; }
|
|
165
160
|
get _elem() { return index.getElement(this); }
|
|
@@ -85,7 +85,7 @@ export class EzChip {
|
|
|
85
85
|
if (this._containerElem) {
|
|
86
86
|
this.observeValue();
|
|
87
87
|
this.observeEnabled();
|
|
88
|
-
this._containerElem.setAttribute(
|
|
88
|
+
this._containerElem.setAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME, 'ezChip_internal_button');
|
|
89
89
|
ElementIDUtils.addIDInfo(this._containerElem);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -349,12 +349,6 @@ export class EzComboBox {
|
|
|
349
349
|
componentDidLoad() {
|
|
350
350
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
351
351
|
this.setInputValue(false);
|
|
352
|
-
if (this.el) {
|
|
353
|
-
ElementIDUtils.addIDInfo(this.el, 'input');
|
|
354
|
-
if (this._textInput) {
|
|
355
|
-
ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this.el.getAttribute("data-element-id") });
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
352
|
}
|
|
359
353
|
//---------------------------------------------
|
|
360
354
|
// Event handlers
|
|
@@ -447,8 +441,9 @@ export class EzComboBox {
|
|
|
447
441
|
}
|
|
448
442
|
render() {
|
|
449
443
|
var _a;
|
|
444
|
+
let elementId = ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
450
445
|
return (h(Host, null,
|
|
451
|
-
h("ez-text-input", { 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 },
|
|
446
|
+
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(elementId, "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 },
|
|
452
447
|
h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() },
|
|
453
448
|
h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })),
|
|
454
449
|
this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
|
|
@@ -131,21 +131,13 @@ export class EzDateInput {
|
|
|
131
131
|
componentDidLoad() {
|
|
132
132
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
133
133
|
this.setInputValue();
|
|
134
|
-
if (this._elem) {
|
|
135
|
-
ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
136
|
-
if (this._textInput) {
|
|
137
|
-
ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
138
|
-
}
|
|
139
|
-
if (this._calendar) {
|
|
140
|
-
ElementIDUtils.addIDInfo(this._calendar, 'internal_calendar', { id: this._elem.getAttribute("data-element-id") });
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
134
|
}
|
|
144
135
|
render() {
|
|
136
|
+
let elementId = ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
145
137
|
return (h(Host, null,
|
|
146
|
-
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 },
|
|
138
|
+
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(elementId, "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 },
|
|
147
139
|
h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })),
|
|
148
|
-
h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
140
|
+
h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo(elementId, "calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
149
141
|
}
|
|
150
142
|
static get is() { return "ez-date-input"; }
|
|
151
143
|
static get encapsulation() { return "shadow"; }
|
|
@@ -184,21 +184,13 @@ export class EzDateTimeInput {
|
|
|
184
184
|
componentDidLoad() {
|
|
185
185
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
186
186
|
this.setInputValue();
|
|
187
|
-
if (this._elem) {
|
|
188
|
-
ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
189
|
-
if (this._textInput) {
|
|
190
|
-
ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
191
|
-
}
|
|
192
|
-
if (this._calendar) {
|
|
193
|
-
ElementIDUtils.addIDInfo(this._calendar, 'internal_calendar', { id: this._elem.getAttribute("data-element-id") });
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
187
|
}
|
|
197
188
|
render() {
|
|
189
|
+
let elementId = ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
198
190
|
return (h(Host, null,
|
|
199
|
-
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() },
|
|
191
|
+
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(elementId, "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() },
|
|
200
192
|
h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })),
|
|
201
|
-
h("ez-calendar", { onEzChange: (event) => { this.changeValue(this._calendar.value); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
|
|
193
|
+
h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo(elementId, "calendar"), onEzChange: (event) => { this.changeValue(this._calendar.value); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
|
|
202
194
|
}
|
|
203
195
|
static get is() { return "ez-date-time-input"; }
|
|
204
196
|
static get encapsulation() { return "shadow"; }
|
|
@@ -55,15 +55,10 @@ export class EzFilterInput {
|
|
|
55
55
|
}
|
|
56
56
|
componentDidLoad() {
|
|
57
57
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
58
|
-
if (this._elem) {
|
|
59
|
-
ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
60
|
-
if (this._textInput) {
|
|
61
|
-
ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
58
|
}
|
|
65
59
|
render() {
|
|
66
|
-
|
|
60
|
+
let elementId = ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
61
|
+
return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(elementId, "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, loading: this.loading, mode: this.mode },
|
|
67
62
|
h("ez-icon", { slot: "leftIcon", iconName: "search" })));
|
|
68
63
|
}
|
|
69
64
|
static get is() { return "ez-filter-input"; }
|
|
@@ -184,7 +184,7 @@ export class EzForm {
|
|
|
184
184
|
}
|
|
185
185
|
buildIdTabSelector(tabs) {
|
|
186
186
|
if (tabs) {
|
|
187
|
-
tabs.forEach(tab => tab[
|
|
187
|
+
tabs.forEach(tab => tab[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `${this._dataElementIdEzForm}_${StringUtils.toCamelCase(tab.label)}`);
|
|
188
188
|
}
|
|
189
189
|
return tabs;
|
|
190
190
|
}
|
|
@@ -124,15 +124,10 @@ export class EzNumberInput {
|
|
|
124
124
|
componentDidLoad() {
|
|
125
125
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
126
126
|
this.setInputValue();
|
|
127
|
-
if (this._elem) {
|
|
128
|
-
ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
129
|
-
if (this._textInput) {
|
|
130
|
-
ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
127
|
}
|
|
134
128
|
render() {
|
|
135
|
-
|
|
129
|
+
let elementId = ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
130
|
+
return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(elementId, "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 }));
|
|
136
131
|
}
|
|
137
132
|
static get is() { return "ez-number-input"; }
|
|
138
133
|
static get encapsulation() { return "shadow"; }
|
|
@@ -62,15 +62,10 @@ export class EzSearch {
|
|
|
62
62
|
}
|
|
63
63
|
componentDidLoad() {
|
|
64
64
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._comboElement);
|
|
65
|
-
if (this._elem) {
|
|
66
|
-
ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
67
|
-
if (this._comboElement) {
|
|
68
|
-
ElementIDUtils.addIDInfo(this._comboElement, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
65
|
}
|
|
72
66
|
render() {
|
|
73
|
-
|
|
67
|
+
let elementId = ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
68
|
+
return (h("ez-combo-box", { "data-element-id": ElementIDUtils.getInternalIDInfo(elementId, "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 }));
|
|
74
69
|
}
|
|
75
70
|
;
|
|
76
71
|
static get is() { return "ez-search"; }
|
|
@@ -100,7 +100,7 @@ export class EzTabselector {
|
|
|
100
100
|
}
|
|
101
101
|
componentDidLoad() {
|
|
102
102
|
this._hostElem.shadowRoot.querySelectorAll('button[name="tab-button"]').forEach((elem) => {
|
|
103
|
-
const elemIdTabSelector = this._hostElem.getAttribute(
|
|
103
|
+
const elemIdTabSelector = this._hostElem.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
|
104
104
|
const dataInfo = { id: `${elemIdTabSelector}_${StringUtils.toCamelCase(elem.id)}` };
|
|
105
105
|
ElementIDUtils.addIDInfo(elem, null, dataInfo);
|
|
106
106
|
});
|
|
@@ -193,10 +193,10 @@ export class EzTabselector {
|
|
|
193
193
|
}
|
|
194
194
|
buildElementIdTab(tabs) {
|
|
195
195
|
tabs.forEach(tab => {
|
|
196
|
-
if (!tab.hasOwnProperty(
|
|
197
|
-
const elemIdTabSelector = this._hostElem.getAttribute(
|
|
196
|
+
if (!tab.hasOwnProperty(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME)) {
|
|
197
|
+
const elemIdTabSelector = this._hostElem.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
|
198
198
|
const dataElementID = `${elemIdTabSelector}_${StringUtils.toCamelCase(tab.tabKey)}`;
|
|
199
|
-
tab[
|
|
199
|
+
tab[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = dataElementID;
|
|
200
200
|
}
|
|
201
201
|
});
|
|
202
202
|
}
|
|
@@ -134,20 +134,15 @@ export class EzTextArea {
|
|
|
134
134
|
this.observeErrorMessage();
|
|
135
135
|
this.adjustFloatingLabel();
|
|
136
136
|
this.observeMode();
|
|
137
|
-
if (this._hostElement) {
|
|
138
|
-
ElementIDUtils.addIDInfo(this._hostElement, 'input');
|
|
139
|
-
if (this._inputElem) {
|
|
140
|
-
ElementIDUtils.addIDInfo(this._inputElem, 'internal_input', { id: this._hostElement.getAttribute("data-element-id") });
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
137
|
}
|
|
144
138
|
render() {
|
|
139
|
+
let elementId = ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
145
140
|
return (h(Host, null,
|
|
146
141
|
h("div", { class: "textarea", ref: (el) => this._container = el },
|
|
147
142
|
this.label && this.mode != "slim" ?
|
|
148
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)
|
|
149
144
|
: null,
|
|
150
|
-
h("textarea", { onFocus: () => this.handleFocus(), 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 })),
|
|
145
|
+
h("textarea", { onFocus: () => this.handleFocus(), "data-element-id": ElementIDUtils.getInternalIDInfo(elementId, "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 })),
|
|
151
146
|
this.canShowError && this.mode != "slim" &&
|
|
152
147
|
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
153
148
|
}
|
|
@@ -76,20 +76,15 @@ export class EzTextEdit {
|
|
|
76
76
|
componentDidLoad() {
|
|
77
77
|
this.applyFocusSelect();
|
|
78
78
|
this.setNewValue(this.value);
|
|
79
|
-
if (this._element) {
|
|
80
|
-
ElementIDUtils.addIDInfo(this._element, 'input');
|
|
81
|
-
if (this._inputElement) {
|
|
82
|
-
ElementIDUtils.addIDInfo(this._inputElement, 'internal_input', { id: this._element.getAttribute("data-element-id") });
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
79
|
}
|
|
86
80
|
componentDidRender() {
|
|
87
81
|
this.setStyledInput();
|
|
88
82
|
}
|
|
89
83
|
render() {
|
|
84
|
+
let elementId = ElementIDUtils.addIDInfoIfNotExists(this._element, 'input');
|
|
90
85
|
return (h(Host, null,
|
|
91
86
|
h("span", { class: "text-edit__hidden-value", ref: elem => this._valueBasis = elem }),
|
|
92
|
-
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 }),
|
|
87
|
+
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(elementId, "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 }),
|
|
93
88
|
h("ez-button", { class: "text-edit__icon-check", mode: "icon", iconName: "check", size: "small", onClick: () => { this.handleSaveEdition(); } }),
|
|
94
89
|
h("ez-button", { class: "text-edit__icon-close", mode: "icon", iconName: "close", size: "small", onClick: () => { this.cancelEdition.emit(); } })));
|
|
95
90
|
}
|
|
@@ -204,12 +204,6 @@ export class EzTextInput {
|
|
|
204
204
|
this.observeMask();
|
|
205
205
|
this.adjustFloatingLabel();
|
|
206
206
|
this.adjustBorderInput();
|
|
207
|
-
if (this._hostElement) {
|
|
208
|
-
ElementIDUtils.addIDInfo(this._hostElement, 'input');
|
|
209
|
-
if (this._inputElem) {
|
|
210
|
-
ElementIDUtils.addIDInfo(this._inputElem, 'internal_input', { id: this._hostElement.getAttribute("data-element-id") });
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
207
|
}
|
|
214
208
|
componentWillLoad() {
|
|
215
209
|
this.observeMask();
|
|
@@ -229,12 +223,13 @@ export class EzTextInput {
|
|
|
229
223
|
}
|
|
230
224
|
}
|
|
231
225
|
render() {
|
|
226
|
+
let elementId = ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
232
227
|
return (h(Host, null,
|
|
233
228
|
h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
|
|
234
229
|
this.label && this.mode != "slim" ?
|
|
235
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)
|
|
236
231
|
: null,
|
|
237
|
-
h("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(); } }),
|
|
232
|
+
h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo(elementId, "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(); } }),
|
|
238
233
|
h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
|
|
239
234
|
this.canShowError && this.mode != "slim" &&
|
|
240
235
|
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
@@ -131,12 +131,6 @@ export class EzTimeInput {
|
|
|
131
131
|
//---------------------------------------------
|
|
132
132
|
componentDidLoad() {
|
|
133
133
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
134
|
-
if (this._elem) {
|
|
135
|
-
ElementIDUtils.addIDInfo(this._elem, 'input');
|
|
136
|
-
if (this._textInput) {
|
|
137
|
-
ElementIDUtils.addIDInfo(this._textInput, 'internal_input', { id: this._elem.getAttribute("data-element-id") });
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
134
|
}
|
|
141
135
|
componentWillLoad() {
|
|
142
136
|
this.observeShowSeconds();
|
|
@@ -148,8 +142,9 @@ export class EzTimeInput {
|
|
|
148
142
|
}
|
|
149
143
|
}
|
|
150
144
|
render() {
|
|
145
|
+
let elementId = ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
151
146
|
return (h(Host, null,
|
|
152
|
-
h("ez-text-input", { 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 },
|
|
147
|
+
h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo(elementId, "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 },
|
|
153
148
|
h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
154
149
|
}
|
|
155
150
|
static get is() { return "ez-time-input"; }
|