@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,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementIDUtils } from "@sankhyalabs/core";
|
|
2
|
+
import { Component, h, Prop, Method, Element } from "@stencil/core";
|
|
2
3
|
export class EzButton {
|
|
3
4
|
constructor() {
|
|
4
5
|
/**
|
|
@@ -22,6 +23,15 @@ export class EzButton {
|
|
|
22
23
|
async setBlur() {
|
|
23
24
|
this._button.blur();
|
|
24
25
|
}
|
|
26
|
+
componentDidLoad() {
|
|
27
|
+
if (this._element) {
|
|
28
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
29
|
+
}
|
|
30
|
+
if (this._button) {
|
|
31
|
+
const dataInfo = { id: 'ezButton_internal_button' };
|
|
32
|
+
ElementIDUtils.addIDInfo(this._button, null, dataInfo);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
25
35
|
getIconSize(sizeParam = "medium") {
|
|
26
36
|
const sizeList = ["small", "medium", "large"];
|
|
27
37
|
const sizeLowerCase = this.size && this.size.toLowerCase();
|
|
@@ -219,4 +229,5 @@ export class EzButton {
|
|
|
219
229
|
}
|
|
220
230
|
}
|
|
221
231
|
}; }
|
|
232
|
+
static get elementRef() { return "_element"; }
|
|
222
233
|
}
|
|
@@ -179,6 +179,7 @@ export class EzCalendar {
|
|
|
179
179
|
const date = new Date();
|
|
180
180
|
date.setTime(firstDate.getTime());
|
|
181
181
|
date.setDate(date.getDate() + offset + index);
|
|
182
|
+
let dataDayMonth = `${date.getMonth() + 1}-${date.getDate()}-${date.getFullYear()}`;
|
|
182
183
|
let classNames = "calendar__cell";
|
|
183
184
|
if (this._currentPosition.getMonth() != date.getMonth()) {
|
|
184
185
|
classNames += " calendar__cell--secondary";
|
|
@@ -186,7 +187,7 @@ export class EzCalendar {
|
|
|
186
187
|
else if (this.isSelectedDate(date)) {
|
|
187
188
|
classNames += " calendar__cell--selected";
|
|
188
189
|
}
|
|
189
|
-
return h("div", { class: classNames, onClick: () => this.selectDate(date) }, date.getDate());
|
|
190
|
+
return h("div", { "data-day-month": dataDayMonth, class: classNames, onClick: () => this.selectDate(date) }, date.getDate());
|
|
190
191
|
})))),
|
|
191
192
|
h("div", { class: "calendar__footer" },
|
|
192
193
|
h("button", { class: "calendar__btn-today", onClick: () => this.selectDate(new Date()) }, this._todayLabel))),
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementIDUtils, StringUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { Component, Element, Event, h, Host, Prop } from '@stencil/core';
|
|
2
3
|
export class EzCardItem {
|
|
3
4
|
componentWillRender() {
|
|
4
5
|
this.createDetailList();
|
|
5
6
|
}
|
|
7
|
+
componentDidLoad() {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
const dataInfo = { id: StringUtils.toCamelCase(((_a = this.item) === null || _a === void 0 ? void 0 : _a.key) || ((_b = this.item) === null || _b === void 0 ? void 0 : _b.title) || "") };
|
|
10
|
+
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
11
|
+
}
|
|
6
12
|
createDetailList() {
|
|
7
13
|
var _a, _b, _c;
|
|
8
14
|
this._details = { detailsLeft: [], detailsRight: [] };
|
|
@@ -85,4 +91,5 @@ export class EzCardItem {
|
|
|
85
91
|
}
|
|
86
92
|
}
|
|
87
93
|
}]; }
|
|
94
|
+
static get elementRef() { return "_element"; }
|
|
88
95
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { Component, Prop, h, Method, Event, Host, Element } from '@stencil/core';
|
|
2
3
|
import { CheckMode } from './CheckMode';
|
|
3
4
|
export class EzCheck {
|
|
4
5
|
constructor() {
|
|
@@ -29,6 +30,14 @@ export class EzCheck {
|
|
|
29
30
|
async setFocus() {
|
|
30
31
|
this._inputElem.focus();
|
|
31
32
|
}
|
|
33
|
+
componentDidLoad() {
|
|
34
|
+
if (this._inputElem) {
|
|
35
|
+
ElementIDUtils.addIDInfo(this._inputElem, 'input');
|
|
36
|
+
}
|
|
37
|
+
if (this._element) {
|
|
38
|
+
ElementIDUtils.addIDInfo(this._element, 'input');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
32
41
|
changeValue() {
|
|
33
42
|
if (!this.enabled) {
|
|
34
43
|
return;
|
|
@@ -199,4 +208,5 @@ export class EzCheck {
|
|
|
199
208
|
}
|
|
200
209
|
}
|
|
201
210
|
}; }
|
|
211
|
+
static get elementRef() { return "_element"; }
|
|
202
212
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Component, Prop, h, Method, Watch, Event } from "@stencil/core";
|
|
1
|
+
import { Component, Element, Prop, h, Method, Watch, Event } from "@stencil/core";
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
3
|
export class EzChip {
|
|
3
4
|
constructor() {
|
|
4
5
|
/**
|
|
@@ -78,9 +79,14 @@ export class EzChip {
|
|
|
78
79
|
// Lifecycle web component
|
|
79
80
|
//---------------------------------------------
|
|
80
81
|
componentDidLoad() {
|
|
82
|
+
if (this._element) {
|
|
83
|
+
ElementIDUtils.addIDInfo(this._element, 'ezChip');
|
|
84
|
+
}
|
|
81
85
|
if (this._containerElem) {
|
|
82
86
|
this.observeValue();
|
|
83
87
|
this.observeEnabled();
|
|
88
|
+
this._containerElem.setAttribute("data-element-id", 'ezChip_internal_button');
|
|
89
|
+
ElementIDUtils.addIDInfo(this._containerElem);
|
|
84
90
|
}
|
|
85
91
|
}
|
|
86
92
|
render() {
|
|
@@ -268,6 +274,7 @@ export class EzChip {
|
|
|
268
274
|
}
|
|
269
275
|
}
|
|
270
276
|
}; }
|
|
277
|
+
static get elementRef() { return "_element"; }
|
|
271
278
|
static get watchers() { return [{
|
|
272
279
|
"propName": "value",
|
|
273
280
|
"methodName": "observeValue"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, h, Prop, Event, Watch, Method, Element, State } from "@stencil/core";
|
|
2
|
+
import { ElementIDUtils } from "@sankhyalabs/core";
|
|
2
3
|
import { ApplicationUtils } from "../../utils";
|
|
3
4
|
export class EzCollapsibleBox {
|
|
4
5
|
constructor() {
|
|
@@ -105,6 +106,9 @@ export class EzCollapsibleBox {
|
|
|
105
106
|
};
|
|
106
107
|
return styledLabel;
|
|
107
108
|
}
|
|
109
|
+
componentDidLoad() {
|
|
110
|
+
ElementIDUtils.addIDInfo(this._hostElement);
|
|
111
|
+
}
|
|
108
112
|
render() {
|
|
109
113
|
return (h("div", { class: "collapsible-box" },
|
|
110
114
|
h("div", { class: "collapsible-box__header" },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FloatingManager } from "@sankhyalabs/core";
|
|
1
|
+
import { ElementIDUtils, FloatingManager } from "@sankhyalabs/core";
|
|
2
2
|
import { Component, h, Host, Prop, State, Event, Element, Watch, Method } from "@stencil/core";
|
|
3
3
|
import { ApplicationUtils, CSSVarsUtils } from "../../utils";
|
|
4
4
|
export class EzComboBox {
|
|
@@ -349,6 +349,12 @@ 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
|
+
}
|
|
352
358
|
}
|
|
353
359
|
//---------------------------------------------
|
|
354
360
|
// Event handlers
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, Element, Host, h, Prop, Watch, Event, Method } from '@stencil/core';
|
|
2
|
-
import { DateUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { DateUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import CSSVarsUtils from '../../utils/CSSVarsUtils';
|
|
4
4
|
export class EzDateInput {
|
|
5
5
|
constructor() {
|
|
@@ -131,6 +131,15 @@ 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
|
+
}
|
|
134
143
|
}
|
|
135
144
|
render() {
|
|
136
145
|
return (h(Host, null,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, Element, Host, h, Prop, Watch, Event, Method } from '@stencil/core';
|
|
2
|
-
import { DateUtils, TimeFormatter } from '@sankhyalabs/core';
|
|
2
|
+
import { DateUtils, ElementIDUtils, TimeFormatter } from '@sankhyalabs/core';
|
|
3
3
|
import CSSVarsUtils from '../../utils/CSSVarsUtils';
|
|
4
4
|
export class EzDateTimeInput {
|
|
5
5
|
constructor() {
|
|
@@ -184,6 +184,15 @@ 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
|
+
}
|
|
187
196
|
}
|
|
188
197
|
render() {
|
|
189
198
|
return (h(Host, null,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ElementIDUtils } from "@sankhyalabs/core";
|
|
1
2
|
import { Component, h, Event, Prop, Watch, Element, Method } from "@stencil/core";
|
|
2
3
|
import CSSVarsUtils from "../../utils/CSSVarsUtils";
|
|
3
4
|
export class EzFilterInput {
|
|
@@ -54,6 +55,12 @@ export class EzFilterInput {
|
|
|
54
55
|
}
|
|
55
56
|
componentDidLoad() {
|
|
56
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
|
+
}
|
|
57
64
|
}
|
|
58
65
|
render() {
|
|
59
66
|
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 },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, h, Host, Prop, Element, forceUpdate, Method, Watch, Event } from "@stencil/core";
|
|
2
|
-
import { DataUnit, Action, DataUnitAction } from "@sankhyalabs/core";
|
|
2
|
+
import { DataUnit, Action, DataUnitAction, ElementIDUtils, StringUtils } from "@sankhyalabs/core";
|
|
3
3
|
import { FormSheet } from "./structure/FormSheet";
|
|
4
4
|
import { buildFromConfig, buildFromDataUnit } from "./structure/FormSheetMetadata";
|
|
5
5
|
import { createStore } from "redux";
|
|
@@ -103,9 +103,11 @@ export class EzForm {
|
|
|
103
103
|
const tabs = allSheets.map((sheet, index) => {
|
|
104
104
|
return { tabKey: sheet.name, label: sheet.label, index };
|
|
105
105
|
});
|
|
106
|
-
|
|
106
|
+
const idTabSelector = `${this._dataElementIdEzForm}_internal_tabSelector`;
|
|
107
|
+
result.push(h("ez-tabselector", { tabs: this.buildIdTabSelector(tabs), onEzChange: (evt) => this._store.dispatch(changeTab(evt.detail)), selectedTab: currentSheet.name, "data-element-id": idTabSelector }));
|
|
107
108
|
}
|
|
108
|
-
|
|
109
|
+
const idFormSheet = `${this._dataElementIdEzForm}_${StringUtils.toCamelCase(currentSheet.label)}`;
|
|
110
|
+
result.push(h(FormSheet, { store: this._store, source: currentSheet, dataElementId: idFormSheet }));
|
|
109
111
|
return result;
|
|
110
112
|
}
|
|
111
113
|
processMetadata() {
|
|
@@ -168,6 +170,8 @@ export class EzForm {
|
|
|
168
170
|
this._store.subscribe(() => forceUpdate(this));
|
|
169
171
|
this._staticFields = Array.from(this._element.querySelectorAll("[data-field-name]"));
|
|
170
172
|
this.processMetadata();
|
|
173
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
174
|
+
this._dataElementIdEzForm = ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
171
175
|
}
|
|
172
176
|
componentDidRender() {
|
|
173
177
|
this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")));
|
|
@@ -178,6 +182,12 @@ export class EzForm {
|
|
|
178
182
|
this.dataUnit.removeInterceptor(this);
|
|
179
183
|
this._dataBinder.onDisconnectedCallback();
|
|
180
184
|
}
|
|
185
|
+
buildIdTabSelector(tabs) {
|
|
186
|
+
if (tabs) {
|
|
187
|
+
tabs.forEach(tab => tab["data-element-id"] = `${this._dataElementIdEzForm}_${StringUtils.toCamelCase(tab.label)}`);
|
|
188
|
+
}
|
|
189
|
+
return tabs;
|
|
190
|
+
}
|
|
181
191
|
render() {
|
|
182
192
|
return (h(Host, null, this.isStatic() ? null : this.getDynamicContent()));
|
|
183
193
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { FormItem } from "./FormItem";
|
|
3
|
-
export const FormSheet = ({ store, source }) => {
|
|
4
|
-
return (h("div", { class: "dynamic-content ez-box__container" },
|
|
3
|
+
export const FormSheet = ({ store, source, dataElementId }) => {
|
|
4
|
+
return (h("div", { class: "dynamic-content ez-box__container", "data-element-id": dataElementId },
|
|
5
5
|
h("div", { class: "ez-row ez-padding-vertical--small" }, source.items.map(item => h(FormItem, { store: store, source: item })))));
|
|
6
6
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementIDUtils } from "@sankhyalabs/core";
|
|
2
|
+
import { Component, h, Host, Prop, Method, Event, State, Watch, Element } from "@stencil/core";
|
|
2
3
|
import AgGridController from "./controller/ag-grid/AgGridController";
|
|
3
4
|
export class EzGrid {
|
|
4
5
|
constructor() {
|
|
@@ -139,6 +140,13 @@ export class EzGrid {
|
|
|
139
140
|
if (this.config) {
|
|
140
141
|
this.observeConfig(this.config);
|
|
141
142
|
}
|
|
143
|
+
this.buildDataElementId();
|
|
144
|
+
}
|
|
145
|
+
buildDataElementId() {
|
|
146
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
147
|
+
const dataElementIdEzGrid = ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
148
|
+
const dtInfo = { id: `${dataElementIdEzGrid}_ezGrid_pagination` };
|
|
149
|
+
ElementIDUtils.addIDInfo(this._refPaginationControl, null, dtInfo);
|
|
142
150
|
}
|
|
143
151
|
previousPage() {
|
|
144
152
|
if (this.dataUnit) {
|
|
@@ -171,7 +179,7 @@ export class EzGrid {
|
|
|
171
179
|
h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" },
|
|
172
180
|
h("div", { class: "grid-header__container" },
|
|
173
181
|
h("slot", { name: "leftButtons" })),
|
|
174
|
-
h("div", { class: "grid-header__container" }, this.getPaginationControl())),
|
|
182
|
+
h("div", { class: "grid-header__container", ref: ref => this._refPaginationControl = ref }, this.getPaginationControl())),
|
|
175
183
|
h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }),
|
|
176
184
|
h("div", { class: "grid__footer" })));
|
|
177
185
|
}
|
|
@@ -546,6 +554,7 @@ export class EzGrid {
|
|
|
546
554
|
}
|
|
547
555
|
}
|
|
548
556
|
}; }
|
|
557
|
+
static get elementRef() { return "_element"; }
|
|
549
558
|
static get watchers() { return [{
|
|
550
559
|
"propName": "config",
|
|
551
560
|
"methodName": "observeConfig"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NumberUtils } from "@sankhyalabs/core";
|
|
1
|
+
import { ElementIDUtils, NumberUtils } from "@sankhyalabs/core";
|
|
2
2
|
import { Component, h, Event, Prop, Element, Method, Watch } from "@stencil/core";
|
|
3
3
|
import CSSVarsUtils from "../../utils/CSSVarsUtils";
|
|
4
4
|
export class EzNumberInput {
|
|
@@ -124,6 +124,12 @@ 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
|
+
}
|
|
127
133
|
}
|
|
128
134
|
render() {
|
|
129
135
|
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,3 +1,4 @@
|
|
|
1
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
1
2
|
import { Event, Prop, Element, Component, Host, h } from '@stencil/core';
|
|
2
3
|
export class EzRadioButton {
|
|
3
4
|
constructor() {
|
|
@@ -14,6 +15,11 @@ export class EzRadioButton {
|
|
|
14
15
|
*/
|
|
15
16
|
this.direction = "vertical";
|
|
16
17
|
}
|
|
18
|
+
componentDidLoad() {
|
|
19
|
+
if (this.hostElement) {
|
|
20
|
+
ElementIDUtils.addIDInfo(this.hostElement, 'input');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
17
23
|
componentWillLoad() {
|
|
18
24
|
this._options = this.options;
|
|
19
25
|
const optionsTags = this.hostElement.querySelectorAll("ez-radio-button-option");
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component, Event, h, Prop, Watch, Element, Method } from "@stencil/core";
|
|
2
2
|
import CSSVarsUtils from "../../utils/CSSVarsUtils";
|
|
3
|
+
import { ElementIDUtils } from "@sankhyalabs/core";
|
|
3
4
|
export class EzSearch {
|
|
4
5
|
constructor() {
|
|
5
6
|
/**
|
|
@@ -61,6 +62,12 @@ export class EzSearch {
|
|
|
61
62
|
}
|
|
62
63
|
componentDidLoad() {
|
|
63
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
|
+
}
|
|
64
71
|
}
|
|
65
72
|
render() {
|
|
66
73
|
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 { Component, Event, Element, h, Prop, Host, State, Watch } from "@stencil/core";
|
|
2
|
+
import { ElementIDUtils, StringUtils } from "@sankhyalabs/core";
|
|
2
3
|
export class EzTabselector {
|
|
3
4
|
constructor() {
|
|
4
5
|
this.setFocusedParam = (ev) => {
|
|
@@ -66,6 +67,7 @@ export class EzTabselector {
|
|
|
66
67
|
this.setFocusedBtn(false, tab.index);
|
|
67
68
|
}
|
|
68
69
|
componentWillRender() {
|
|
70
|
+
ElementIDUtils.addIDInfo(this._hostElem);
|
|
69
71
|
if (!this._processedTabs) {
|
|
70
72
|
this._processedTabs = [];
|
|
71
73
|
if (this.tabs) {
|
|
@@ -73,6 +75,7 @@ export class EzTabselector {
|
|
|
73
75
|
this.tabs.split(",").forEach((label) => {
|
|
74
76
|
label = label.trim();
|
|
75
77
|
this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
|
|
78
|
+
this.buildElementIdTab(this._processedTabs);
|
|
76
79
|
});
|
|
77
80
|
}
|
|
78
81
|
}
|
|
@@ -88,9 +91,20 @@ export class EzTabselector {
|
|
|
88
91
|
this._hostElem.appendChild(content);
|
|
89
92
|
}
|
|
90
93
|
this._processedTabs.push(tab);
|
|
94
|
+
this.buildElementIdTab(this._processedTabs);
|
|
91
95
|
});
|
|
92
96
|
}
|
|
93
97
|
}
|
|
98
|
+
componentDidRender() {
|
|
99
|
+
this.updateScroll();
|
|
100
|
+
}
|
|
101
|
+
componentDidLoad() {
|
|
102
|
+
this._hostElem.shadowRoot.querySelectorAll('button[name="tab-button"]').forEach((elem) => {
|
|
103
|
+
const elemIdTabSelector = this._hostElem.getAttribute("data-element-id");
|
|
104
|
+
const dataInfo = { id: `${elemIdTabSelector}_${StringUtils.toCamelCase(elem.id)}` };
|
|
105
|
+
ElementIDUtils.addIDInfo(elem, null, dataInfo);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
94
108
|
handleSlotChange(ev) {
|
|
95
109
|
const slot = ev.target;
|
|
96
110
|
const content = slot.assignedElements()[0];
|
|
@@ -116,9 +130,6 @@ export class EzTabselector {
|
|
|
116
130
|
container.scrollLeft = lastTab.offsetLeft + lastTab.offsetWidth;
|
|
117
131
|
}
|
|
118
132
|
}
|
|
119
|
-
componentDidRender() {
|
|
120
|
-
this.updateScroll();
|
|
121
|
-
}
|
|
122
133
|
updateScroll() {
|
|
123
134
|
const container = this._scrollContainer;
|
|
124
135
|
if (container) {
|
|
@@ -180,6 +191,15 @@ export class EzTabselector {
|
|
|
180
191
|
;
|
|
181
192
|
});
|
|
182
193
|
}
|
|
194
|
+
buildElementIdTab(tabs) {
|
|
195
|
+
tabs.forEach(tab => {
|
|
196
|
+
if (!tab.hasOwnProperty("data-element-id")) {
|
|
197
|
+
const elemIdTabSelector = this._hostElem.getAttribute("data-element-id");
|
|
198
|
+
const dataElementID = `${elemIdTabSelector}_${StringUtils.toCamelCase(tab.tabKey)}`;
|
|
199
|
+
tab["data-element-id"] = dataElementID;
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
183
203
|
render() {
|
|
184
204
|
return (h(Host, null,
|
|
185
205
|
h("button", { class: "backward-button", ref: (el) => this._backwardButton = el, onClick: () => this.scrollBackward() }),
|
|
@@ -191,7 +211,7 @@ export class EzTabselector {
|
|
|
191
211
|
this.selectedTab = tab.tabKey;
|
|
192
212
|
this.selectedIndex = index;
|
|
193
213
|
}
|
|
194
|
-
return h("button", { id: tabId, class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab), style: labelStyle },
|
|
214
|
+
return h("button", { id: tabId, name: "tab-button", class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab), style: labelStyle },
|
|
195
215
|
tab.leftIcon && h("ez-icon", { iconName: tab.leftIcon, class: "left-icon" }),
|
|
196
216
|
h("span", { class: "tab-label", title: tab.label }, tab.label),
|
|
197
217
|
tab.rightIcon && h("ez-icon", { iconName: tab.rightIcon, class: "right-icon" }),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
1
2
|
import { Component, Prop, h, Watch, Host, Method, Event, Element } from '@stencil/core';
|
|
2
3
|
export class EzTextArea {
|
|
3
4
|
constructor() {
|
|
@@ -133,6 +134,12 @@ export class EzTextArea {
|
|
|
133
134
|
this.observeErrorMessage();
|
|
134
135
|
this.adjustFloatingLabel();
|
|
135
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
|
+
}
|
|
136
143
|
}
|
|
137
144
|
render() {
|
|
138
145
|
return (h(Host, null,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Component, Host, h, Prop, Event, State, Method } from '@stencil/core';
|
|
2
|
-
import { StringUtils } from '@sankhyalabs/core';
|
|
1
|
+
import { Component, Host, h, Prop, Event, State, Method, Element } from '@stencil/core';
|
|
2
|
+
import { ElementIDUtils, StringUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils } from "../../utils";
|
|
4
4
|
export class EzTextEdit {
|
|
5
5
|
/**
|
|
@@ -76,6 +76,12 @@ 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
|
+
}
|
|
79
85
|
}
|
|
80
86
|
componentDidRender() {
|
|
81
87
|
this.setStyledInput();
|
|
@@ -185,4 +191,5 @@ export class EzTextEdit {
|
|
|
185
191
|
}
|
|
186
192
|
}
|
|
187
193
|
}; }
|
|
194
|
+
static get elementRef() { return "_element"; }
|
|
188
195
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, Prop, h, Watch, Host, Method, Event, Element } from "@stencil/core";
|
|
2
|
-
import { MaskFormatter } from "@sankhyalabs/core";
|
|
2
|
+
import { ElementIDUtils, MaskFormatter } from "@sankhyalabs/core";
|
|
3
3
|
export class EzTextInput {
|
|
4
4
|
constructor() {
|
|
5
5
|
/**
|
|
@@ -204,6 +204,12 @@ 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
|
+
}
|
|
207
213
|
}
|
|
208
214
|
componentWillLoad() {
|
|
209
215
|
this.observeMask();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Element, Component, Prop, h, Watch, Host, Method, Event } from "@stencil/core";
|
|
2
|
-
import { TimeFormatter, MaskFormatter, NumberUtils } from "@sankhyalabs/core";
|
|
2
|
+
import { TimeFormatter, MaskFormatter, NumberUtils, ElementIDUtils } from "@sankhyalabs/core";
|
|
3
3
|
import CSSVarsUtils from "../../utils/CSSVarsUtils";
|
|
4
4
|
export class EzTimeInput {
|
|
5
5
|
constructor() {
|
|
@@ -131,6 +131,12 @@ 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
|
+
}
|
|
134
140
|
}
|
|
135
141
|
componentWillLoad() {
|
|
136
142
|
this.observeShowSeconds();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component, h, Prop, Element, Event, Method, Watch, forceUpdate } from "@stencil/core";
|
|
2
2
|
import ApplicationUtils from "../../utils/ApplicationUtils";
|
|
3
|
+
import { ElementIDUtils } from "@sankhyalabs/core";
|
|
3
4
|
import RemoteFile from "./RemoteFile";
|
|
4
5
|
export class EzUpload {
|
|
5
6
|
constructor() {
|
|
@@ -229,6 +230,9 @@ export class EzUpload {
|
|
|
229
230
|
this._dropZone.style.background = "";
|
|
230
231
|
});
|
|
231
232
|
}
|
|
233
|
+
if (this._host) {
|
|
234
|
+
ElementIDUtils.addIDInfo(this._host, 'input');
|
|
235
|
+
}
|
|
232
236
|
}
|
|
233
237
|
componentWillRender() {
|
|
234
238
|
if (this.value) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, h, Host, Element, Method } from '@stencil/core';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
3
|
export class EzViewStack {
|
|
3
4
|
constructor() {
|
|
4
5
|
/**
|
|
@@ -60,6 +61,9 @@ export class EzViewStack {
|
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
63
|
}
|
|
64
|
+
componentDidLoad() {
|
|
65
|
+
ElementIDUtils.addIDInfo(this._hostElem);
|
|
66
|
+
}
|
|
63
67
|
disconectCallback() {
|
|
64
68
|
this._hostElem = null;
|
|
65
69
|
this._elemList = null;
|