@sankhyalabs/ezui 1.1.136 → 1.1.139
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-calendar.cjs.entry.js +2 -2
- package/dist/cjs/ez-check.cjs.entry.js +3 -3
- package/dist/cjs/ez-combo-box.cjs.entry.js +5 -5
- package/dist/cjs/ez-date-input.cjs.entry.js +10 -10
- package/dist/cjs/ez-date-time-input.cjs.entry.js +8 -8
- package/dist/cjs/ez-filter-input.cjs.entry.js +6 -6
- package/dist/cjs/ez-form.cjs.entry.js +39 -19
- package/dist/cjs/ez-grid.cjs.entry.js +4 -4
- package/dist/cjs/ez-loading-bar.cjs.entry.js +28 -0
- package/dist/cjs/ez-modal.cjs.entry.js +3 -3
- package/dist/cjs/ez-number-input.cjs.entry.js +25 -18
- package/dist/cjs/ez-popover.cjs.entry.js +2 -2
- package/dist/cjs/ez-search.cjs.entry.js +2 -2
- package/dist/cjs/ez-text-area.cjs.entry.js +11 -11
- package/dist/cjs/ez-text-input.cjs.entry.js +23 -16
- package/dist/cjs/ez-time-input.cjs.entry.js +36 -30
- package/dist/cjs/ez-upload.cjs.entry.js +4 -4
- package/dist/cjs/ez-view-stack.cjs.entry.js +71 -0
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/test-du.cjs.entry.js +43 -10
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/ez-calendar/ez-calendar.js +2 -2
- package/dist/collection/components/ez-check/ez-check.js +3 -3
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +5 -5
- package/dist/collection/components/ez-date-input/ez-date-input.js +10 -10
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +8 -8
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +6 -6
- package/dist/collection/components/ez-form/DataBinder.js +3 -14
- package/dist/collection/components/ez-form/ez-form.js +17 -2
- package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +19 -3
- package/dist/collection/components/ez-grid/ez-grid.js +4 -4
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.css +85 -0
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.js +63 -0
- package/dist/collection/components/ez-modal/ez-modal.js +3 -3
- package/dist/collection/components/ez-number-input/ez-number-input.js +26 -19
- package/dist/collection/components/ez-popover/ez-popover.js +2 -2
- package/dist/collection/components/ez-search/ez-search.js +2 -2
- package/dist/collection/components/ez-text-area/ez-text-area.js +11 -11
- package/dist/collection/components/ez-text-input/ez-text-input.js +41 -16
- package/dist/collection/components/ez-time-input/ez-time-input.js +52 -31
- package/dist/collection/components/ez-upload/ez-upload.js +4 -4
- package/dist/collection/components/ez-view-stack/ez-view-stack.css +9 -0
- package/dist/collection/components/ez-view-stack/ez-view-stack.js +87 -0
- package/dist/collection/components/test-du/test-du.js +44 -10
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +320 -155
- package/dist/esm/ez-calendar.entry.js +2 -2
- package/dist/esm/ez-check.entry.js +3 -3
- package/dist/esm/ez-combo-box.entry.js +5 -5
- package/dist/esm/ez-date-input.entry.js +10 -10
- package/dist/esm/ez-date-time-input.entry.js +8 -8
- package/dist/esm/ez-filter-input.entry.js +6 -6
- package/dist/esm/ez-form.entry.js +39 -19
- package/dist/esm/ez-grid.entry.js +4 -4
- package/dist/esm/ez-loading-bar.entry.js +24 -0
- package/dist/esm/ez-modal.entry.js +3 -3
- package/dist/esm/ez-number-input.entry.js +25 -18
- package/dist/esm/ez-popover.entry.js +2 -2
- package/dist/esm/ez-search.entry.js +2 -2
- package/dist/esm/ez-text-area.entry.js +11 -11
- package/dist/esm/ez-text-input.entry.js +23 -16
- package/dist/esm/ez-time-input.entry.js +37 -31
- package/dist/esm/ez-upload.entry.js +4 -4
- package/dist/esm/ez-view-stack.entry.js +67 -0
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/test-du.entry.js +43 -10
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-248361f5.entry.js +1 -0
- package/dist/ezui/p-347b145b.entry.js +1 -0
- package/dist/ezui/p-4c3cd534.entry.js +1 -0
- package/dist/ezui/p-517d7759.entry.js +1 -0
- package/dist/ezui/{p-5f2add6f.entry.js → p-51cdfa9e.entry.js} +1 -1
- package/dist/ezui/p-6287fc90.entry.js +1 -0
- package/dist/ezui/p-6d4b1628.entry.js +1 -0
- package/dist/ezui/p-8be1a4d6.entry.js +1 -0
- package/dist/ezui/p-9b82c2fe.entry.js +1 -0
- package/dist/ezui/p-b65e22a1.entry.js +1 -0
- package/dist/ezui/p-b8d64970.entry.js +1 -0
- package/dist/ezui/{p-c6c91589.entry.js → p-c246e251.entry.js} +1 -1
- package/dist/ezui/p-c2de757f.entry.js +1 -0
- package/dist/ezui/p-c620258b.entry.js +1 -0
- package/dist/ezui/p-cb73bee7.entry.js +1 -0
- package/dist/ezui/p-db0981c1.entry.js +1 -0
- package/dist/ezui/p-dd6f4872.entry.js +1 -0
- package/dist/ezui/p-ec8419f1.entry.js +1 -0
- package/dist/ezui/p-fc9b9487.entry.js +1 -0
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +1 -1
- package/dist/types/components/ez-check/ez-check.d.ts +1 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -1
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +3 -3
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +3 -3
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +3 -3
- package/dist/types/components/ez-form/ez-form.d.ts +1 -1
- package/dist/types/components/ez-form/structure/FormSheetMetadata.d.ts +3 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +1 -1
- package/dist/types/components/ez-loading-bar/ez-loading-bar.d.ts +6 -0
- package/dist/types/components/ez-modal/ez-modal.d.ts +1 -1
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +3 -3
- package/dist/types/components/ez-popover/ez-popover.d.ts +1 -1
- package/dist/types/components/ez-search/ez-search.d.ts +1 -1
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -4
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +8 -4
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +9 -3
- package/dist/types/components/ez-upload/ez-upload.d.ts +2 -2
- package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +16 -0
- package/dist/types/components/test-du/test-du.d.ts +1 -0
- package/dist/types/components.d.ts +44 -0
- package/package.json +1 -1
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-097d5dc6.entry.js +0 -1
- package/dist/ezui/p-0fd2624d.entry.js +0 -1
- package/dist/ezui/p-1587cbbc.entry.js +0 -1
- package/dist/ezui/p-18d67107.entry.js +0 -1
- package/dist/ezui/p-49f70be3.entry.js +0 -1
- package/dist/ezui/p-50038ae3.entry.js +0 -1
- package/dist/ezui/p-53110643.entry.js +0 -1
- package/dist/ezui/p-685a35b3.entry.js +0 -1
- package/dist/ezui/p-699c31d1.entry.js +0 -1
- package/dist/ezui/p-6c22c9f9.entry.js +0 -1
- package/dist/ezui/p-a1304302.entry.js +0 -1
- package/dist/ezui/p-b2cc27e5.entry.js +0 -1
- package/dist/ezui/p-b71d454d.entry.js +0 -1
- package/dist/ezui/p-cbb62e2c.entry.js +0 -1
- package/dist/ezui/p-dcf5f013.entry.js +0 -1
|
@@ -23,8 +23,12 @@ let EzTextInput = class {
|
|
|
23
23
|
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
24
24
|
*/
|
|
25
25
|
this.mode = "regular";
|
|
26
|
+
/**
|
|
27
|
+
* Define se o controle de change do value será controlado por um componente pai.
|
|
28
|
+
*/
|
|
29
|
+
this.slaveMode = false;
|
|
26
30
|
}
|
|
27
|
-
|
|
31
|
+
observeErrorMessage() {
|
|
28
32
|
var _a, _b;
|
|
29
33
|
if (this._inputElem) {
|
|
30
34
|
const hasError = typeof this.errorMessage === "string" && this.errorMessage !== "";
|
|
@@ -38,7 +42,7 @@ let EzTextInput = class {
|
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
|
-
|
|
45
|
+
observeMask() {
|
|
42
46
|
if (this.mask) {
|
|
43
47
|
if (this._maskFormatter == undefined) {
|
|
44
48
|
this._maskFormatter = new core.MaskFormatter(this.mask);
|
|
@@ -48,14 +52,17 @@ let EzTextInput = class {
|
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
}
|
|
51
|
-
|
|
55
|
+
observeValue() {
|
|
52
56
|
if (this._inputElem) {
|
|
53
|
-
this._inputElem.value = this.value;
|
|
57
|
+
this._inputElem.value = this.value || "";
|
|
54
58
|
}
|
|
55
59
|
this.handleChange();
|
|
60
|
+
this.adjustFloatingLabel();
|
|
61
|
+
if (this.slaveMode) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
56
64
|
this.errorMessage = "";
|
|
57
65
|
this.ezChange.emit(this.value);
|
|
58
|
-
this.adjustFloatingLabel();
|
|
59
66
|
}
|
|
60
67
|
adjustFloatingLabel() {
|
|
61
68
|
if (this.label && this._labelElem) {
|
|
@@ -107,7 +114,7 @@ let EzTextInput = class {
|
|
|
107
114
|
this.errorMessage = e.message;
|
|
108
115
|
}
|
|
109
116
|
}
|
|
110
|
-
this.
|
|
117
|
+
this.controlChangeValue();
|
|
111
118
|
this.adjustFloatingLabel();
|
|
112
119
|
}
|
|
113
120
|
isValidValue(value) {
|
|
@@ -116,7 +123,7 @@ let EzTextInput = class {
|
|
|
116
123
|
}
|
|
117
124
|
return true;
|
|
118
125
|
}
|
|
119
|
-
|
|
126
|
+
controlChangeValue() {
|
|
120
127
|
if ((this.value || '') !== this._inputElem.value) {
|
|
121
128
|
this.value = this._inputElem.value;
|
|
122
129
|
}
|
|
@@ -130,9 +137,9 @@ let EzTextInput = class {
|
|
|
130
137
|
this._lastValidValue = value;
|
|
131
138
|
}
|
|
132
139
|
else {
|
|
133
|
-
this._inputElem.value = this._lastValidValue
|
|
140
|
+
this._inputElem.value = this._lastValidValue == undefined ? "" : this._lastValidValue;
|
|
134
141
|
}
|
|
135
|
-
this.
|
|
142
|
+
this.controlChangeValue();
|
|
136
143
|
}
|
|
137
144
|
handleSlotChange(ev) {
|
|
138
145
|
const slot = ev.target;
|
|
@@ -163,7 +170,7 @@ let EzTextInput = class {
|
|
|
163
170
|
}
|
|
164
171
|
}
|
|
165
172
|
}
|
|
166
|
-
this.
|
|
173
|
+
this.observeErrorMessage();
|
|
167
174
|
}
|
|
168
175
|
doFocus() {
|
|
169
176
|
if (this.label && this._labelElem && !this._labelElem.classList.contains("input__label--floated")) {
|
|
@@ -174,12 +181,12 @@ let EzTextInput = class {
|
|
|
174
181
|
// Lifecycle web component
|
|
175
182
|
//---------------------------------------------
|
|
176
183
|
componentDidLoad() {
|
|
177
|
-
this.
|
|
178
|
-
this.
|
|
184
|
+
this.observeErrorMessage();
|
|
185
|
+
this.observeMask();
|
|
179
186
|
this.adjustFloatingLabel();
|
|
180
187
|
}
|
|
181
188
|
componentWillLoad() {
|
|
182
|
-
this.
|
|
189
|
+
this.observeMask();
|
|
183
190
|
if (this.value) {
|
|
184
191
|
if (this._maskFormatter) {
|
|
185
192
|
try {
|
|
@@ -203,9 +210,9 @@ let EzTextInput = class {
|
|
|
203
210
|
}
|
|
204
211
|
get _hostElement() { return index.getElement(this); }
|
|
205
212
|
static get watchers() { return {
|
|
206
|
-
"errorMessage": ["
|
|
207
|
-
"mask": ["
|
|
208
|
-
"value": ["
|
|
213
|
+
"errorMessage": ["observeErrorMessage"],
|
|
214
|
+
"mask": ["observeMask"],
|
|
215
|
+
"value": ["observeValue"]
|
|
209
216
|
}; }
|
|
210
217
|
};
|
|
211
218
|
EzTextInput.style = ezTextInputCss;
|
|
@@ -11,6 +11,7 @@ const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;widt
|
|
|
11
11
|
let EzTimeInput = class {
|
|
12
12
|
constructor(hostRef) {
|
|
13
13
|
index.registerInstance(this, hostRef);
|
|
14
|
+
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
14
15
|
/**
|
|
15
16
|
* Deixa o campo disponível ou não para digitação.
|
|
16
17
|
*/
|
|
@@ -24,28 +25,28 @@ let EzTimeInput = class {
|
|
|
24
25
|
*/
|
|
25
26
|
this.mode = "regular";
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
observeShowSeconds() {
|
|
28
29
|
if (this.showSeconds) {
|
|
29
|
-
|
|
30
|
-
this._maskFormatter = new core.MaskFormatter("##:##:##");
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
this._maskFormatter.mask = "##:##:##";
|
|
34
|
-
}
|
|
30
|
+
this.prepareMask("##:##:##");
|
|
35
31
|
}
|
|
36
32
|
else {
|
|
37
|
-
|
|
38
|
-
this._maskFormatter = new core.MaskFormatter("##:##");
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
this._maskFormatter.mask = "##:##";
|
|
42
|
-
}
|
|
33
|
+
this.prepareMask("##:##");
|
|
43
34
|
}
|
|
44
35
|
}
|
|
45
|
-
|
|
46
|
-
if (this.value
|
|
36
|
+
observeValue() {
|
|
37
|
+
if (isNaN(this.value)) {
|
|
47
38
|
this.value = undefined;
|
|
48
|
-
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//---------------------------------------------
|
|
42
|
+
// Private methods
|
|
43
|
+
//---------------------------------------------
|
|
44
|
+
prepareMask(mask) {
|
|
45
|
+
if (this._maskFormatter == undefined) {
|
|
46
|
+
this._maskFormatter = new core.MaskFormatter(mask);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
this._maskFormatter.mask = mask;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
//---------------------------------------------
|
|
@@ -55,13 +56,13 @@ let EzTimeInput = class {
|
|
|
55
56
|
* Faz o foco no componente de input
|
|
56
57
|
*/
|
|
57
58
|
async setFocus() {
|
|
58
|
-
this._inputElem.
|
|
59
|
+
this._inputElem.setFocus();
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
61
62
|
* Remove o foco no componente de input
|
|
62
63
|
*/
|
|
63
64
|
async setBlur() {
|
|
64
|
-
this._inputElem.
|
|
65
|
+
this._inputElem.setBlur();
|
|
65
66
|
}
|
|
66
67
|
//---------------------------------------------
|
|
67
68
|
// Event handlers
|
|
@@ -69,24 +70,29 @@ let EzTimeInput = class {
|
|
|
69
70
|
handleFocusout() {
|
|
70
71
|
this.errorMessage = "";
|
|
71
72
|
this.prepareValue(this.viewValue);
|
|
72
|
-
if (!core.TimeFormatter.validateTime(this.viewValue, this.showSeconds)) {
|
|
73
|
-
this.
|
|
73
|
+
if (this.viewValue && !core.TimeFormatter.validateTime(this.viewValue, this.showSeconds)) {
|
|
74
|
+
this._oldViewValue = this.viewValue;
|
|
74
75
|
this.errorMessage = "Favor inserir um horário válido.";
|
|
75
76
|
}
|
|
77
|
+
else {
|
|
78
|
+
if (this.viewValue === this._oldViewValue) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
this._oldViewValue = this.viewValue;
|
|
82
|
+
if (this.viewValue === "00:00" && this.value == undefined) {
|
|
83
|
+
this.value = 0;
|
|
84
|
+
}
|
|
85
|
+
this.ezChange.emit(this.value);
|
|
86
|
+
}
|
|
76
87
|
}
|
|
77
88
|
prepareValue(value) {
|
|
78
89
|
try {
|
|
79
90
|
this.viewValue = core.TimeFormatter.prepareValue(value, this.showSeconds);
|
|
80
91
|
}
|
|
81
92
|
catch (e) {
|
|
82
|
-
this.clearField();
|
|
83
93
|
this.errorMessage = e.message;
|
|
84
94
|
}
|
|
85
95
|
}
|
|
86
|
-
clearField() {
|
|
87
|
-
this.viewValue = '';
|
|
88
|
-
this.value = undefined;
|
|
89
|
-
}
|
|
90
96
|
handleChange() {
|
|
91
97
|
this.viewValue = this._inputElem.value;
|
|
92
98
|
this.value = core.NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
|
|
@@ -95,11 +101,11 @@ let EzTimeInput = class {
|
|
|
95
101
|
// Lifecycle web component
|
|
96
102
|
//---------------------------------------------
|
|
97
103
|
componentDidLoad() {
|
|
98
|
-
this.
|
|
104
|
+
this.observeValue();
|
|
99
105
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._inputElem);
|
|
100
106
|
}
|
|
101
107
|
componentWillLoad() {
|
|
102
|
-
this.
|
|
108
|
+
this.observeShowSeconds();
|
|
103
109
|
if (this.value) {
|
|
104
110
|
this.prepareValue(this.value.toString());
|
|
105
111
|
}
|
|
@@ -108,13 +114,13 @@ let EzTimeInput = class {
|
|
|
108
114
|
}
|
|
109
115
|
}
|
|
110
116
|
render() {
|
|
111
|
-
return (index.h(index.Host, null, index.h("ez-text-input", { ref: (el) => this._inputElem = el, value: this.viewValue, enabled: this.enabled, label: this.label, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, errorMessage: this.errorMessage, mode: this.mode }, index.h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
117
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { ref: (el) => this._inputElem = el, value: this.viewValue, enabled: this.enabled, label: this.label, restrict: "0123456789:", onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }, index.h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
112
118
|
}
|
|
113
119
|
static get assetsDirs() { return ["../assets"]; }
|
|
114
120
|
get _elem() { return index.getElement(this); }
|
|
115
121
|
static get watchers() { return {
|
|
116
|
-
"showSeconds": ["
|
|
117
|
-
"value": ["
|
|
122
|
+
"showSeconds": ["observeShowSeconds"],
|
|
123
|
+
"value": ["observeValue"]
|
|
118
124
|
}; }
|
|
119
125
|
};
|
|
120
126
|
EzTimeInput.style = ezTimeInputCss;
|
|
@@ -108,7 +108,7 @@ let EzUpload = class {
|
|
|
108
108
|
*/
|
|
109
109
|
this.enabled = true;
|
|
110
110
|
}
|
|
111
|
-
|
|
111
|
+
observeValue(newValue) {
|
|
112
112
|
//Observamos o mundo externo, se um novo valor foi atribuído,
|
|
113
113
|
//precisamos cancelar a alteração anterior, isso envolve, percorrer
|
|
114
114
|
//a lista de ponteiros e cancelar todos os uploads em andamento.
|
|
@@ -128,7 +128,7 @@ let EzUpload = class {
|
|
|
128
128
|
this.value.forEach(ezFile => this._filePointers.set(ezFile.name, ezFile));
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
|
|
131
|
+
observeRequestHeaders() {
|
|
132
132
|
this._requestHeaders = new Map();
|
|
133
133
|
if (typeof this.requestHeaders == "string") {
|
|
134
134
|
try {
|
|
@@ -354,8 +354,8 @@ let EzUpload = class {
|
|
|
354
354
|
}
|
|
355
355
|
get _host() { return index.getElement(this); }
|
|
356
356
|
static get watchers() { return {
|
|
357
|
-
"value": ["
|
|
358
|
-
"requestHeaders": ["
|
|
357
|
+
"value": ["observeValue"],
|
|
358
|
+
"requestHeaders": ["observeRequestHeaders"]
|
|
359
359
|
}; }
|
|
360
360
|
};
|
|
361
361
|
EzUpload.style = ezUploadCss;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-c15a9551.js');
|
|
6
|
+
|
|
7
|
+
const ezViewStackCss = ":host{width:100%;height:100%}.ez-view-stack__container{width:100%;height:100%}";
|
|
8
|
+
|
|
9
|
+
let EzViewStack = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Exibe a aba desejada de acordo com o index passado na tela fazendo com a ativa atual seja removida ou oculta dependendo da hidePolicy.
|
|
15
|
+
*/
|
|
16
|
+
async show(index) {
|
|
17
|
+
if (index !== this._focusedIndex && 0 <= index && index < this._totalStackItems) {
|
|
18
|
+
this.policyHideRemove();
|
|
19
|
+
this.policyShowAppend(index);
|
|
20
|
+
this._focusedIndex = index;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
policyHideRemove() {
|
|
24
|
+
let element = this._hostElem.querySelector(`#el_${this._focusedIndex}`);
|
|
25
|
+
this.checkElementVisibility(element);
|
|
26
|
+
}
|
|
27
|
+
policyShowAppend(index) {
|
|
28
|
+
let selectedElement = this._hostElem.querySelector(`#el_${index}`);
|
|
29
|
+
if (selectedElement) {
|
|
30
|
+
selectedElement.removeAttribute("style");
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this._hostElem.append(this._elemList[index]);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
checkElementVisibility(element) {
|
|
37
|
+
if (element.getAttribute("hidePolicy") === "hide" || !element.getAttribute("hidePolicy")) {
|
|
38
|
+
element.setAttribute("style", "display: none");
|
|
39
|
+
}
|
|
40
|
+
else if (element.getAttribute("hidePolicy") === "remove") {
|
|
41
|
+
element.remove();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
componentWillRender() {
|
|
45
|
+
if (!this._elemList) {
|
|
46
|
+
this._elemList = [];
|
|
47
|
+
this._focusedIndex = 0;
|
|
48
|
+
this._totalStackItems = 0;
|
|
49
|
+
this._hostElem.classList.add("ez-view-stack__container");
|
|
50
|
+
this._hostElem.querySelectorAll("stack-item").forEach((element, index) => {
|
|
51
|
+
element.setAttribute("id", `el_${index}`);
|
|
52
|
+
if (index !== 0) {
|
|
53
|
+
this.checkElementVisibility(element);
|
|
54
|
+
}
|
|
55
|
+
this._totalStackItems++;
|
|
56
|
+
this._elemList.push(element);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
disconectCallback() {
|
|
61
|
+
this._hostElem = null;
|
|
62
|
+
this._elemList = null;
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
return (index.h(index.Host, null));
|
|
66
|
+
}
|
|
67
|
+
get _hostElem() { return index.getElement(this); }
|
|
68
|
+
};
|
|
69
|
+
EzViewStack.style = ezViewStackCss;
|
|
70
|
+
|
|
71
|
+
exports.ez_view_stack = EzViewStack;
|
package/dist/cjs/ezui.cjs.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"showHide":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"refresh":[64],"quickFilter":[64],"nextPage":[64],"previousPage":[64],"hasNextPage":[64],"hasPreviousPage":[64],"isLastOfPage":[64],"isFirstOfPage":[64],"nextRecord":[64],"previousRecord":[64],"hasNextRecord":[64],"hasPreviousRecord":[64],"openGridConfig":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["
|
|
18
|
+
return index.bootstrapLazy([["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["select-box.cjs",[[1,"select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"showHide":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"refresh":[64],"quickFilter":[64],"nextPage":[64],"previousPage":[64],"hasNextPage":[64],"hasPreviousPage":[64],"isLastOfPage":[64],"isFirstOfPage":[64],"nextRecord":[64],"previousRecord":[64],"hasNextRecord":[64],"hasPreviousRecord":[64],"openGridConfig":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"slaveMode":[516,"slave-mode"],"setFocus":[64],"setBlur":[64]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["test-du.cjs",[[0,"test-du",{"isDirty":[32]}]]]], options);
|
|
19
19
|
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"showHide":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"refresh":[64],"quickFilter":[64],"nextPage":[64],"previousPage":[64],"hasNextPage":[64],"hasPreviousPage":[64],"isLastOfPage":[64],"isFirstOfPage":[64],"nextRecord":[64],"previousRecord":[64],"hasNextRecord":[64],"hasPreviousRecord":[64],"openGridConfig":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["
|
|
17
|
+
return index.bootstrapLazy([["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["select-box.cjs",[[1,"select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"showHide":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"refresh":[64],"quickFilter":[64],"nextPage":[64],"previousPage":[64],"hasNextPage":[64],"hasPreviousPage":[64],"isLastOfPage":[64],"isFirstOfPage":[64],"nextRecord":[64],"previousRecord":[64],"hasNextRecord":[64],"hasPreviousRecord":[64],"openGridConfig":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"slaveMode":[516,"slave-mode"],"setFocus":[64],"setBlur":[64]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["test-du.cjs",[[0,"test-du",{"isDirty":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -21,17 +21,50 @@ let TestDu = class {
|
|
|
21
21
|
label: "Parceiro",
|
|
22
22
|
fields: [
|
|
23
23
|
{
|
|
24
|
-
name: "
|
|
25
|
-
label: "
|
|
26
|
-
dataType: core.DataType.
|
|
27
|
-
userInterface: core.UserInterface.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
name: "CODPARC",
|
|
25
|
+
label: "Parceiro",
|
|
26
|
+
dataType: core.DataType.NUMBER,
|
|
27
|
+
userInterface: core.UserInterface.INTEGERNUMBER,
|
|
28
|
+
defaultValue: 666,
|
|
29
|
+
required: false,
|
|
30
|
+
properties: {}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "RECDESP",
|
|
34
|
+
label: "Receita/Despesa",
|
|
35
|
+
dataType: core.DataType.TEXT,
|
|
36
|
+
userInterface: core.UserInterface.OPTIONSELECTOR,
|
|
37
|
+
required: true,
|
|
38
|
+
properties: { options: `{"-1": "Despesa", "1": "Receita"}` }
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "P",
|
|
42
|
+
label: "pera",
|
|
43
|
+
dataType: core.DataType.TEXT,
|
|
44
|
+
userInterface: core.UserInterface.OPTIONSELECTOR,
|
|
45
|
+
properties: { options: `{"M": "Madura", "V": "Verde", "P": "Passada"}` }
|
|
46
|
+
},
|
|
33
47
|
]
|
|
34
48
|
};
|
|
49
|
+
this.formConfig = [
|
|
50
|
+
{
|
|
51
|
+
name: "CODPARC",
|
|
52
|
+
label: "Parceiro",
|
|
53
|
+
dataType: core.DataType.NUMBER,
|
|
54
|
+
userInterface: core.UserInterface.INTEGERNUMBER,
|
|
55
|
+
defaultValue: 666,
|
|
56
|
+
required: false,
|
|
57
|
+
properties: {}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "RECDESP",
|
|
61
|
+
label: "Receita/Despesa",
|
|
62
|
+
dataType: core.DataType.TEXT,
|
|
63
|
+
userInterface: core.UserInterface.OPTIONSELECTOR,
|
|
64
|
+
required: true,
|
|
65
|
+
properties: { options: `{"-1": "Despesa", "1": "Receita"}` }
|
|
66
|
+
}
|
|
67
|
+
];
|
|
35
68
|
this.dataUnit.dataLoader = () => new Promise(accept => accept({
|
|
36
69
|
records: [{
|
|
37
70
|
__record__id__: "1321321321321321",
|
|
@@ -62,7 +95,7 @@ let TestDu = class {
|
|
|
62
95
|
});
|
|
63
96
|
}
|
|
64
97
|
render() {
|
|
65
|
-
return (index.h("div", null, index.h("button", { onClick: () => this.dataUnit.loadData() }, "Carregar"), index.h("button", { onClick: () => this.save(), disabled: !this.isDirty }, "Salvar"), index.h("ez-form", { dataUnit: this.dataUnit })));
|
|
98
|
+
return (index.h("div", null, index.h("button", { onClick: () => this.dataUnit.addRecord() }, "Novo"), index.h("button", { onClick: () => this.dataUnit.loadData() }, "Carregar"), index.h("button", { onClick: () => this.save(), disabled: !this.isDirty }, "Salvar"), index.h("ez-form", { dataUnit: this.dataUnit, config: this.formConfig })));
|
|
66
99
|
}
|
|
67
100
|
};
|
|
68
101
|
TestDu.style = testDuCss;
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"./components/ez-grid/subcomponents/gridconfig/grid-config.js",
|
|
20
20
|
"./components/ez-grid/subcomponents/select-box/select-box.js",
|
|
21
21
|
"./components/ez-icon/ez-icon.js",
|
|
22
|
+
"./components/ez-loading-bar/ez-loading-bar.js",
|
|
22
23
|
"./components/ez-modal/ez-modal.js",
|
|
23
24
|
"./components/ez-number-input/ez-number-input.js",
|
|
24
25
|
"./components/ez-popover/ez-popover.js",
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
"./components/ez-text-input/ez-text-input.js",
|
|
29
30
|
"./components/ez-time-input/ez-time-input.js",
|
|
30
31
|
"./components/ez-toast/ez-toast.js",
|
|
32
|
+
"./components/ez-view-stack/ez-view-stack.js",
|
|
31
33
|
"./components/test-du/test-du.js"
|
|
32
34
|
],
|
|
33
35
|
"compiler": {
|
|
@@ -63,7 +63,7 @@ export class EzCalendar {
|
|
|
63
63
|
this._floatingID = undefined;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
observeValue() {
|
|
67
67
|
if (this.value) {
|
|
68
68
|
this._currentPosition.setTime(this.value.getTime());
|
|
69
69
|
this._currentPosition.setDate(1);
|
|
@@ -409,6 +409,6 @@ export class EzCalendar {
|
|
|
409
409
|
}; }
|
|
410
410
|
static get watchers() { return [{
|
|
411
411
|
"propName": "value",
|
|
412
|
-
"methodName": "
|
|
412
|
+
"methodName": "observeValue"
|
|
413
413
|
}]; }
|
|
414
414
|
}
|
|
@@ -13,7 +13,7 @@ export class EzCheck {
|
|
|
13
13
|
*/
|
|
14
14
|
this.mode = "regular";
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
observeMode() {
|
|
17
17
|
if (this.mode === "switch") {
|
|
18
18
|
this._inputElem.classList.remove("regularMode");
|
|
19
19
|
this._inputElem.classList.add("switchMode");
|
|
@@ -39,7 +39,7 @@ export class EzCheck {
|
|
|
39
39
|
this._inputElem.focus();
|
|
40
40
|
}
|
|
41
41
|
componentDidLoad() {
|
|
42
|
-
this.
|
|
42
|
+
this.observeMode();
|
|
43
43
|
}
|
|
44
44
|
changeValue() {
|
|
45
45
|
if (!this.enabled) {
|
|
@@ -192,6 +192,6 @@ export class EzCheck {
|
|
|
192
192
|
}; }
|
|
193
193
|
static get watchers() { return [{
|
|
194
194
|
"propName": "mode",
|
|
195
|
-
"methodName": "
|
|
195
|
+
"methodName": "observeMode"
|
|
196
196
|
}]; }
|
|
197
197
|
}
|
|
@@ -32,7 +32,7 @@ export class EzComboBox {
|
|
|
32
32
|
*/
|
|
33
33
|
this.mode = "regular";
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
observeValue() {
|
|
36
36
|
if (this._inputElement) {
|
|
37
37
|
this._inputElement.value = this.getText();
|
|
38
38
|
}
|
|
@@ -150,7 +150,7 @@ export class EzComboBox {
|
|
|
150
150
|
this.ezChange.emit(adjustedOpt);
|
|
151
151
|
}
|
|
152
152
|
else {
|
|
153
|
-
this.
|
|
153
|
+
this.observeValue();
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
updateSource(source) {
|
|
@@ -182,7 +182,7 @@ export class EzComboBox {
|
|
|
182
182
|
this.selectOption(undefined);
|
|
183
183
|
}
|
|
184
184
|
else {
|
|
185
|
-
this.
|
|
185
|
+
this.observeValue();
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
//---------------------------------------------
|
|
@@ -273,7 +273,7 @@ export class EzComboBox {
|
|
|
273
273
|
}
|
|
274
274
|
render() {
|
|
275
275
|
return (h(Host, null,
|
|
276
|
-
h("ez-text-input", { class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._inputElement = elem, enabled: this.enabled && !this.suppressSearch, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(),
|
|
276
|
+
h("ez-text-input", { class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._inputElement = elem, enabled: this.enabled && !this.suppressSearch, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true },
|
|
277
277
|
h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() },
|
|
278
278
|
h("ez-icon", { slot: "icon", "icon-name": this.searchMode ? "search" : "chevron-down" }))),
|
|
279
279
|
h("section", { class: "list-container", ref: elem => this._listContainer = elem },
|
|
@@ -589,7 +589,7 @@ export class EzComboBox {
|
|
|
589
589
|
static get elementRef() { return "el"; }
|
|
590
590
|
static get watchers() { return [{
|
|
591
591
|
"propName": "value",
|
|
592
|
-
"methodName": "
|
|
592
|
+
"methodName": "observeValue"
|
|
593
593
|
}]; }
|
|
594
594
|
}
|
|
595
595
|
;
|