@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
|
@@ -164,7 +164,7 @@ let EzCalendar$1 = class extends HTMLElement$1 {
|
|
|
164
164
|
this._floatingID = undefined;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
|
|
167
|
+
observeValue() {
|
|
168
168
|
if (this.value) {
|
|
169
169
|
this._currentPosition.setTime(this.value.getTime());
|
|
170
170
|
this._currentPosition.setDate(1);
|
|
@@ -307,7 +307,7 @@ let EzCalendar$1 = class extends HTMLElement$1 {
|
|
|
307
307
|
})))))));
|
|
308
308
|
}
|
|
309
309
|
static get watchers() { return {
|
|
310
|
-
"value": ["
|
|
310
|
+
"value": ["observeValue"]
|
|
311
311
|
}; }
|
|
312
312
|
static get style() { return ezCalendarCss; }
|
|
313
313
|
};
|
|
@@ -332,7 +332,7 @@ let EzCheck$1 = class extends HTMLElement$1 {
|
|
|
332
332
|
*/
|
|
333
333
|
this.mode = "regular";
|
|
334
334
|
}
|
|
335
|
-
|
|
335
|
+
observeMode() {
|
|
336
336
|
if (this.mode === "switch") {
|
|
337
337
|
this._inputElem.classList.remove("regularMode");
|
|
338
338
|
this._inputElem.classList.add("switchMode");
|
|
@@ -358,7 +358,7 @@ let EzCheck$1 = class extends HTMLElement$1 {
|
|
|
358
358
|
this._inputElem.focus();
|
|
359
359
|
}
|
|
360
360
|
componentDidLoad() {
|
|
361
|
-
this.
|
|
361
|
+
this.observeMode();
|
|
362
362
|
}
|
|
363
363
|
changeValue() {
|
|
364
364
|
if (!this.enabled) {
|
|
@@ -378,7 +378,7 @@ let EzCheck$1 = class extends HTMLElement$1 {
|
|
|
378
378
|
return (h(Host, null, h("input", { type: "checkbox", class: "regularMode", checked: this.value === true, onChange: () => { this.changeValue(); }, disabled: !this.enabled, ref: (el) => this._inputElem = el }), this.label ? h("label", { class: this.getLabelClasses(), onClick: () => { this.changeValue(); }, title: this.label }, this.label) : undefined));
|
|
379
379
|
}
|
|
380
380
|
static get watchers() { return {
|
|
381
|
-
"mode": ["
|
|
381
|
+
"mode": ["observeMode"]
|
|
382
382
|
}; }
|
|
383
383
|
static get style() { return ezCheckCss; }
|
|
384
384
|
};
|
|
@@ -589,7 +589,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
589
589
|
*/
|
|
590
590
|
this.mode = "regular";
|
|
591
591
|
}
|
|
592
|
-
|
|
592
|
+
observeValue() {
|
|
593
593
|
if (this._inputElement) {
|
|
594
594
|
this._inputElement.value = this.getText();
|
|
595
595
|
}
|
|
@@ -705,7 +705,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
705
705
|
this.ezChange.emit(adjustedOpt);
|
|
706
706
|
}
|
|
707
707
|
else {
|
|
708
|
-
this.
|
|
708
|
+
this.observeValue();
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
711
|
updateSource(source) {
|
|
@@ -737,7 +737,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
737
737
|
this.selectOption(undefined);
|
|
738
738
|
}
|
|
739
739
|
else {
|
|
740
|
-
this.
|
|
740
|
+
this.observeValue();
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
743
|
//---------------------------------------------
|
|
@@ -827,11 +827,11 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
827
827
|
this.cancelPreselection();
|
|
828
828
|
}
|
|
829
829
|
render() {
|
|
830
|
-
return (h(Host, null, 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(),
|
|
830
|
+
return (h(Host, null, 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 }, h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { slot: "icon", "icon-name": this.searchMode ? "search" : "chevron-down" }))), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "options-list", ref: elem => this._optionsList = elem }, this._visibleOptions.map((opt, index) => this.buildItem(opt, index))))));
|
|
831
831
|
}
|
|
832
832
|
get el() { return this; }
|
|
833
833
|
static get watchers() { return {
|
|
834
|
-
"value": ["
|
|
834
|
+
"value": ["observeValue"]
|
|
835
835
|
}; }
|
|
836
836
|
static get style() { return ezComboBoxCss; }
|
|
837
837
|
};
|
|
@@ -853,13 +853,13 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
853
853
|
*/
|
|
854
854
|
this.mode = "regular";
|
|
855
855
|
}
|
|
856
|
-
|
|
856
|
+
observeLabel() {
|
|
857
857
|
this._textInput.label = this.label;
|
|
858
858
|
}
|
|
859
|
-
|
|
859
|
+
observeErrorMessage() {
|
|
860
860
|
this._textInput.errorMessage = this.errorMessage;
|
|
861
861
|
}
|
|
862
|
-
|
|
862
|
+
observeValue() {
|
|
863
863
|
if (this._textInput) {
|
|
864
864
|
this._textInput.value = this.getTextValue(this.value);
|
|
865
865
|
}
|
|
@@ -878,8 +878,8 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
878
878
|
}
|
|
879
879
|
changeValue(newValue) {
|
|
880
880
|
var _a;
|
|
881
|
-
newValue = newValue instanceof Date ? DateUtils.clearTime(newValue) :
|
|
882
|
-
this.value = this.value instanceof Date ? DateUtils.clearTime(this.value) :
|
|
881
|
+
newValue = newValue instanceof Date ? DateUtils.clearTime(newValue) : undefined;
|
|
882
|
+
this.value = this.value instanceof Date ? DateUtils.clearTime(this.value) : undefined;
|
|
883
883
|
this._textInput.errorMessage = "";
|
|
884
884
|
if ((newValue === null || newValue === void 0 ? void 0 : newValue.toString()) !== ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString())) {
|
|
885
885
|
this.value = newValue;
|
|
@@ -915,7 +915,7 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
917
|
getTextValue(d) {
|
|
918
|
-
return d ? new Intl.DateTimeFormat("pt-BR").format(d) :
|
|
918
|
+
return d ? new Intl.DateTimeFormat("pt-BR").format(d) : undefined;
|
|
919
919
|
}
|
|
920
920
|
componentDidLoad() {
|
|
921
921
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
@@ -924,13 +924,13 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
924
924
|
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => {
|
|
925
925
|
if (event.key === "H" || event.key === "h")
|
|
926
926
|
this.changeValue(new Date());
|
|
927
|
-
}, label: this.label,
|
|
927
|
+
}, label: this.label, value: this.getTextValue(this.value), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
928
928
|
}
|
|
929
929
|
get _elem() { return this; }
|
|
930
930
|
static get watchers() { return {
|
|
931
|
-
"label": ["
|
|
932
|
-
"errorMessage": ["
|
|
933
|
-
"value": ["
|
|
931
|
+
"label": ["observeLabel"],
|
|
932
|
+
"errorMessage": ["observeErrorMessage"],
|
|
933
|
+
"value": ["observeValue"]
|
|
934
934
|
}; }
|
|
935
935
|
static get style() { return ezDateInputCss; }
|
|
936
936
|
};
|
|
@@ -956,13 +956,13 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
956
956
|
*/
|
|
957
957
|
this.mode = "regular";
|
|
958
958
|
}
|
|
959
|
-
|
|
959
|
+
observeLabel() {
|
|
960
960
|
this._textInput.label = this.label;
|
|
961
961
|
}
|
|
962
|
-
|
|
962
|
+
observeErrorMessage() {
|
|
963
963
|
this._textInput.errorMessage = this.errorMessage;
|
|
964
964
|
}
|
|
965
|
-
|
|
965
|
+
observeValue() {
|
|
966
966
|
if (this._textInput) {
|
|
967
967
|
this._textInput.value = this.getTextValue(this.value);
|
|
968
968
|
}
|
|
@@ -1060,19 +1060,19 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1060
1060
|
year: 'numeric', month: 'numeric', day: 'numeric',
|
|
1061
1061
|
hour: 'numeric', minute: 'numeric', second: 'numeric'
|
|
1062
1062
|
};
|
|
1063
|
-
return d ? (new Intl.DateTimeFormat('pt-BR', this.showSeconds ? optionsSecond : options).format(d)) :
|
|
1063
|
+
return d ? (new Intl.DateTimeFormat('pt-BR', this.showSeconds ? optionsSecond : options).format(d)) : undefined;
|
|
1064
1064
|
}
|
|
1065
1065
|
componentDidLoad() {
|
|
1066
1066
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
1067
1067
|
}
|
|
1068
1068
|
render() {
|
|
1069
|
-
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => { this.onChangeKeyDown(event); }, label: this.label,
|
|
1069
|
+
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => { this.onChangeKeyDown(event); }, label: this.label, value: this.getTextValue(this.value), restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onFocus: () => this.onFocused(), onClick: () => this.onClicked(), slaveMode: true }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.changeValue(this._calendar.value); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
|
|
1070
1070
|
}
|
|
1071
1071
|
get _elem() { return this; }
|
|
1072
1072
|
static get watchers() { return {
|
|
1073
|
-
"label": ["
|
|
1074
|
-
"errorMessage": ["
|
|
1075
|
-
"value": ["
|
|
1073
|
+
"label": ["observeLabel"],
|
|
1074
|
+
"errorMessage": ["observeErrorMessage"],
|
|
1075
|
+
"value": ["observeValue"]
|
|
1076
1076
|
}; }
|
|
1077
1077
|
static get style() { return ezDateTimeInputCss; }
|
|
1078
1078
|
};
|
|
@@ -1182,17 +1182,17 @@ let EzFilterInput$1 = class extends HTMLElement$1 {
|
|
|
1182
1182
|
*/
|
|
1183
1183
|
this.mode = "regular";
|
|
1184
1184
|
}
|
|
1185
|
-
|
|
1185
|
+
observeLabel() {
|
|
1186
1186
|
if (this._textInput) {
|
|
1187
1187
|
this._textInput.label = this.label;
|
|
1188
1188
|
}
|
|
1189
1189
|
}
|
|
1190
|
-
|
|
1190
|
+
observeErrorMessage() {
|
|
1191
1191
|
if (this._textInput) {
|
|
1192
1192
|
this._textInput.errorMessage = this.errorMessage;
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
1195
|
-
|
|
1195
|
+
observeValue() {
|
|
1196
1196
|
if (this._textInput) {
|
|
1197
1197
|
this._textInput.value = this.value;
|
|
1198
1198
|
}
|
|
@@ -1225,9 +1225,9 @@ let EzFilterInput$1 = class extends HTMLElement$1 {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
get _elem() { return this; }
|
|
1227
1227
|
static get watchers() { return {
|
|
1228
|
-
"label": ["
|
|
1229
|
-
"errorMessage": ["
|
|
1230
|
-
"value": ["
|
|
1228
|
+
"label": ["observeLabel"],
|
|
1229
|
+
"errorMessage": ["observeErrorMessage"],
|
|
1230
|
+
"value": ["observeValue"]
|
|
1231
1231
|
}; }
|
|
1232
1232
|
static get style() { return ezFilterInputCss; }
|
|
1233
1233
|
};
|
|
@@ -1365,6 +1365,7 @@ class FormMetadata {
|
|
|
1365
1365
|
this._sheets = new Map();
|
|
1366
1366
|
this._requiredFields = [];
|
|
1367
1367
|
this._cleanOnCopyFields = [];
|
|
1368
|
+
this._defaultValues = {};
|
|
1368
1369
|
}
|
|
1369
1370
|
getSheet(name) {
|
|
1370
1371
|
return this._sheets.get(name);
|
|
@@ -1376,6 +1377,7 @@ class FormMetadata {
|
|
|
1376
1377
|
this._sheets.set(sheet.name, sheet);
|
|
1377
1378
|
this._requiredFields = this._requiredFields.concat(sheet.requiredFields);
|
|
1378
1379
|
this._cleanOnCopyFields = this._cleanOnCopyFields.concat(sheet.cleanOnCopyFields);
|
|
1380
|
+
this._defaultValues = sheet.defaultValues;
|
|
1379
1381
|
}
|
|
1380
1382
|
getRequiredFields() {
|
|
1381
1383
|
return this._requiredFields;
|
|
@@ -1383,6 +1385,9 @@ class FormMetadata {
|
|
|
1383
1385
|
getCleanOnCopyFields() {
|
|
1384
1386
|
return this._cleanOnCopyFields;
|
|
1385
1387
|
}
|
|
1388
|
+
getDefaultValues() {
|
|
1389
|
+
return this._defaultValues;
|
|
1390
|
+
}
|
|
1386
1391
|
}
|
|
1387
1392
|
const buildFromDataUnit = (dataUnit) => {
|
|
1388
1393
|
var _a;
|
|
@@ -1390,6 +1395,10 @@ const buildFromDataUnit = (dataUnit) => {
|
|
|
1390
1395
|
const metadata = new FormMetadata();
|
|
1391
1396
|
if (unitMD) {
|
|
1392
1397
|
const visibleFields = (_a = unitMD.fields) === null || _a === void 0 ? void 0 : _a.filter(descriptor => descriptor.visible !== false);
|
|
1398
|
+
let defaultValues = {};
|
|
1399
|
+
visibleFields
|
|
1400
|
+
.filter(descriptor => descriptor.defaultValue)
|
|
1401
|
+
.map((descriptor) => defaultValues[descriptor.name] = descriptor.defaultValue);
|
|
1393
1402
|
metadata.addSheet({
|
|
1394
1403
|
label: unitMD.label,
|
|
1395
1404
|
name: unitMD.name,
|
|
@@ -1399,7 +1408,8 @@ const buildFromDataUnit = (dataUnit) => {
|
|
|
1399
1408
|
.map(descriptor => descriptor.name),
|
|
1400
1409
|
cleanOnCopyFields: visibleFields
|
|
1401
1410
|
.filter(descriptor => { var _a; return (_a = descriptor.properties) === null || _a === void 0 ? void 0 : _a.cleanOnCopy; })
|
|
1402
|
-
.map(descriptor => descriptor.name)
|
|
1411
|
+
.map(descriptor => descriptor.name),
|
|
1412
|
+
defaultValues
|
|
1403
1413
|
});
|
|
1404
1414
|
}
|
|
1405
1415
|
return metadata;
|
|
@@ -1415,8 +1425,9 @@ const buildFromConfig = (fields, dataUnit) => {
|
|
|
1415
1425
|
const sheets = new Map();
|
|
1416
1426
|
const requiredFields = [];
|
|
1417
1427
|
const cleanOnCopyFields = [];
|
|
1428
|
+
const defaultValues = {};
|
|
1418
1429
|
fields.forEach(config => {
|
|
1419
|
-
var _a;
|
|
1430
|
+
var _a, _b;
|
|
1420
1431
|
if (config.visible !== false) {
|
|
1421
1432
|
const tabConfig = getTabConfig(config.tab || "Geral", sheets);
|
|
1422
1433
|
const descriptor = dataUnit.getField(config.name);
|
|
@@ -1433,6 +1444,10 @@ const buildFromConfig = (fields, dataUnit) => {
|
|
|
1433
1444
|
if (clearOnCopy) {
|
|
1434
1445
|
cleanOnCopyFields.push(config.name);
|
|
1435
1446
|
}
|
|
1447
|
+
const defaultValue = config.defaultValue === undefined ? (_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.defaultValue : config.defaultValue;
|
|
1448
|
+
if (defaultValue) {
|
|
1449
|
+
defaultValues[config.name] = config.defaultValue;
|
|
1450
|
+
}
|
|
1436
1451
|
const fieldMD = { config, descriptor };
|
|
1437
1452
|
const group = config.group;
|
|
1438
1453
|
if (group) {
|
|
@@ -1459,7 +1474,8 @@ const buildFromConfig = (fields, dataUnit) => {
|
|
|
1459
1474
|
name: key.label,
|
|
1460
1475
|
items: Array.from(value.values()),
|
|
1461
1476
|
requiredFields,
|
|
1462
|
-
cleanOnCopyFields
|
|
1477
|
+
cleanOnCopyFields,
|
|
1478
|
+
defaultValues
|
|
1463
1479
|
});
|
|
1464
1480
|
});
|
|
1465
1481
|
return metadata;
|
|
@@ -1867,12 +1883,7 @@ class DataBinder {
|
|
|
1867
1883
|
const oldValue = field["value"];
|
|
1868
1884
|
const newValue = this._dataUnit.getFieldValue(fieldName);
|
|
1869
1885
|
if (oldValue != newValue) {
|
|
1870
|
-
|
|
1871
|
-
field.removeAttribute("value");
|
|
1872
|
-
}
|
|
1873
|
-
else {
|
|
1874
|
-
field["value"] = newValue;
|
|
1875
|
-
}
|
|
1886
|
+
field["value"] = newValue;
|
|
1876
1887
|
}
|
|
1877
1888
|
}
|
|
1878
1889
|
updateBind(fieldName, field) {
|
|
@@ -1880,13 +1891,7 @@ class DataBinder {
|
|
|
1880
1891
|
if (oldBind) {
|
|
1881
1892
|
oldBind.destroy();
|
|
1882
1893
|
}
|
|
1883
|
-
|
|
1884
|
-
if (value === undefined) {
|
|
1885
|
-
field.removeAttribute("value");
|
|
1886
|
-
}
|
|
1887
|
-
else {
|
|
1888
|
-
field["value"] = value;
|
|
1889
|
-
}
|
|
1894
|
+
field["value"] = this._dataUnit.getFieldValue(fieldName);
|
|
1890
1895
|
this._fields.set(fieldName, Bind.create(fieldName, field, (fieldName, waitingChange) => this.changeStarted(fieldName, waitingChange), (fieldName, newValue) => this.setFieldValue(fieldName, newValue)));
|
|
1891
1896
|
this.bindSearchOptionsLoader(fieldName, field);
|
|
1892
1897
|
this.applyEzUploadContext(fieldName, field);
|
|
@@ -1904,7 +1909,7 @@ class DataBinder {
|
|
|
1904
1909
|
this._dataUnit.setFieldValue(fieldName, newValue);
|
|
1905
1910
|
}
|
|
1906
1911
|
bindSearchOptionsLoader(fieldName, field) {
|
|
1907
|
-
if (field.nodeName === "EZ-SEARCH" && field["optionLoader"]
|
|
1912
|
+
if (field.nodeName === "EZ-SEARCH" && field["optionLoader"] == undefined) {
|
|
1908
1913
|
const loader = ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
|
|
1909
1914
|
if (loader) {
|
|
1910
1915
|
field["optionLoader"] = (arg) => {
|
|
@@ -2023,7 +2028,7 @@ let EzForm$1 = class extends HTMLElement$1 {
|
|
|
2023
2028
|
accept();
|
|
2024
2029
|
});
|
|
2025
2030
|
}
|
|
2026
|
-
|
|
2031
|
+
observeConfig() {
|
|
2027
2032
|
this.processMetadata();
|
|
2028
2033
|
}
|
|
2029
2034
|
validateRequired(requiredFields, record) {
|
|
@@ -2085,6 +2090,21 @@ let EzForm$1 = class extends HTMLElement$1 {
|
|
|
2085
2090
|
}));
|
|
2086
2091
|
}
|
|
2087
2092
|
}
|
|
2093
|
+
if (action.type === Action.RECORDS_ADDED) {
|
|
2094
|
+
debugger;
|
|
2095
|
+
const metadata = selectFormMetadata(this._store.getState());
|
|
2096
|
+
const defaultValues = metadata.getDefaultValues();
|
|
2097
|
+
if (defaultValues) {
|
|
2098
|
+
const records = action.payload;
|
|
2099
|
+
return new DataUnitAction(Action.RECORDS_ADDED, records.map(record => {
|
|
2100
|
+
const newRecord = Object.assign({}, record);
|
|
2101
|
+
for (const field in defaultValues) {
|
|
2102
|
+
newRecord[field] = this.dataUnit.valueFromString(field, defaultValues[field]);
|
|
2103
|
+
}
|
|
2104
|
+
return newRecord;
|
|
2105
|
+
}));
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2088
2108
|
return action;
|
|
2089
2109
|
}
|
|
2090
2110
|
componentWillLoad() {
|
|
@@ -2113,7 +2133,7 @@ let EzForm$1 = class extends HTMLElement$1 {
|
|
|
2113
2133
|
}
|
|
2114
2134
|
get _element() { return this; }
|
|
2115
2135
|
static get watchers() { return {
|
|
2116
|
-
"config": ["
|
|
2136
|
+
"config": ["observeConfig"]
|
|
2117
2137
|
}; }
|
|
2118
2138
|
static get style() { return ezFormCss; }
|
|
2119
2139
|
};
|
|
@@ -112927,7 +112947,7 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
112927
112947
|
this._gridController.setColumnsDef(this._dataUnitBridge.buildColumnDefs(), true);
|
|
112928
112948
|
}
|
|
112929
112949
|
if (this.config) {
|
|
112930
|
-
this.
|
|
112950
|
+
this.observeConfig(this.config);
|
|
112931
112951
|
}
|
|
112932
112952
|
}
|
|
112933
112953
|
disconnectedCallback() {
|
|
@@ -112945,7 +112965,7 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
112945
112965
|
h("ez-button", { size: "small", iconName: "chevron-right", class: "ez-margin-right--medium", mode: "icon", enabled: this._navigationHasNext, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })
|
|
112946
112966
|
];
|
|
112947
112967
|
}
|
|
112948
|
-
|
|
112968
|
+
observeConfig(config) {
|
|
112949
112969
|
this._gridController.setColumnsState(config.columns);
|
|
112950
112970
|
this.closeGridConfig();
|
|
112951
112971
|
}
|
|
@@ -112958,11 +112978,11 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
112958
112978
|
this._popUpGridConfig = true;
|
|
112959
112979
|
}
|
|
112960
112980
|
render() {
|
|
112961
|
-
return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container" }, this.getPaginationControl())), h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), h("div", { class: "grid__footer" }), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("grid-config", { ref: ref => this._gridConfig = ref, config: this.config, selectedTab: "Colunas", onConfigFinish: evt => { this.
|
|
112981
|
+
return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container" }, this.getPaginationControl())), h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), h("div", { class: "grid__footer" }), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("grid-config", { ref: ref => this._gridConfig = ref, config: this.config, selectedTab: "Colunas", onConfigFinish: evt => { this.observeConfig(evt.detail); this.configChange.emit(evt.detail); }, onConfigCancel: _evt => this.closeGridConfig() }))));
|
|
112962
112982
|
}
|
|
112963
112983
|
static get assetsDirs() { return ["../assets"]; }
|
|
112964
112984
|
static get watchers() { return {
|
|
112965
|
-
"config": ["
|
|
112985
|
+
"config": ["observeConfig"]
|
|
112966
112986
|
}; }
|
|
112967
112987
|
static get style() { return ezGridCss; }
|
|
112968
112988
|
};
|
|
@@ -113515,6 +113535,29 @@ let EzList$1 = class extends HTMLElement$1 {
|
|
|
113515
113535
|
static get style() { return ezListCss; }
|
|
113516
113536
|
};
|
|
113517
113537
|
|
|
113538
|
+
const ezLoadingBarCss = ":host{position:fixed;top:0px;width:100%}.loading-bar{width:100%;margin:0 auto;position:absolute;background-color:var(--color--primary-300, #e2f4ef);height:5px}.loading-bar:before{content:'';position:absolute}.loading-bar__container{position:absolute;top:0;right:100%;bottom:0;left:0;background-color:var(--color--primary, #008561);width:0;animation:loading 2s linear infinite}@keyframes loading{0%{left:0%;right:100%;width:0%}25%{left:0%;right:75%;width:25%}50%{left:0%;right:50%;width:90%}70%{right:0%;left:75%;width:25%}100%{left:100%;right:0%;width:0%}}@-webkit-keyframes loading{0%{left:0%;right:100%;width:0%}25%{left:0%;right:75%;width:25%}50%{left:0%;right:50%;width:90%}70%{right:0%;left:75%;width:25%}100%{left:100%;right:0%;width:0%}}";
|
|
113539
|
+
|
|
113540
|
+
let EzLoadingBar$1 = class extends HTMLElement$1 {
|
|
113541
|
+
constructor() {
|
|
113542
|
+
super();
|
|
113543
|
+
this.__registerHost();
|
|
113544
|
+
this.__attachShadow();
|
|
113545
|
+
this._showLoading = true;
|
|
113546
|
+
}
|
|
113547
|
+
hide() {
|
|
113548
|
+
this._showLoading = false;
|
|
113549
|
+
return Promise.resolve();
|
|
113550
|
+
}
|
|
113551
|
+
show() {
|
|
113552
|
+
this._showLoading = true;
|
|
113553
|
+
return Promise.resolve();
|
|
113554
|
+
}
|
|
113555
|
+
render() {
|
|
113556
|
+
return (h(Host, null, this._showLoading && h("div", { class: "loading-bar" }, h("div", { class: "loading-bar__container" }))));
|
|
113557
|
+
}
|
|
113558
|
+
static get style() { return ezLoadingBarCss; }
|
|
113559
|
+
};
|
|
113560
|
+
|
|
113518
113561
|
const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:calc(100% - 48px);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
113519
113562
|
|
|
113520
113563
|
let EzModal$1 = class extends HTMLElement$1 {
|
|
@@ -113542,7 +113585,7 @@ let EzModal$1 = class extends HTMLElement$1 {
|
|
|
113542
113585
|
}
|
|
113543
113586
|
};
|
|
113544
113587
|
}
|
|
113545
|
-
|
|
113588
|
+
observeOpened() {
|
|
113546
113589
|
if (this.opened) {
|
|
113547
113590
|
document.addEventListener("keydown", this.handleKeyboardEvent);
|
|
113548
113591
|
}
|
|
@@ -113555,7 +113598,7 @@ let EzModal$1 = class extends HTMLElement$1 {
|
|
|
113555
113598
|
this.ezCloseModal.emit(this.opened);
|
|
113556
113599
|
}
|
|
113557
113600
|
componentDidLoad() {
|
|
113558
|
-
this.
|
|
113601
|
+
this.observeOpened();
|
|
113559
113602
|
}
|
|
113560
113603
|
componentDidRender() {
|
|
113561
113604
|
if (this.opened) {
|
|
@@ -113576,7 +113619,7 @@ let EzModal$1 = class extends HTMLElement$1 {
|
|
|
113576
113619
|
undefined));
|
|
113577
113620
|
}
|
|
113578
113621
|
static get watchers() { return {
|
|
113579
|
-
"opened": ["
|
|
113622
|
+
"opened": ["observeOpened"]
|
|
113580
113623
|
}; }
|
|
113581
113624
|
static get style() { return ezModalCss; }
|
|
113582
113625
|
};
|
|
@@ -113598,17 +113641,6 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
113598
113641
|
*/
|
|
113599
113642
|
this.mode = "regular";
|
|
113600
113643
|
}
|
|
113601
|
-
setLabel() {
|
|
113602
|
-
this._textInput.label = this.label;
|
|
113603
|
-
}
|
|
113604
|
-
setErrorMessage() {
|
|
113605
|
-
this._textInput.errorMessage = this.errorMessage;
|
|
113606
|
-
}
|
|
113607
|
-
applyValueToInput() {
|
|
113608
|
-
if (this._textInput) {
|
|
113609
|
-
this._textInput.value = this.getTextValue(this.value);
|
|
113610
|
-
}
|
|
113611
|
-
}
|
|
113612
113644
|
/**
|
|
113613
113645
|
* Realiza o foco no componente de input
|
|
113614
113646
|
*/
|
|
@@ -113621,16 +113653,34 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
113621
113653
|
async setBlur() {
|
|
113622
113654
|
this._textInput.setBlur();
|
|
113623
113655
|
}
|
|
113656
|
+
observeLabel() {
|
|
113657
|
+
if (this._textInput) {
|
|
113658
|
+
this._textInput.label = this.label;
|
|
113659
|
+
}
|
|
113660
|
+
}
|
|
113661
|
+
observeErrorMessage() {
|
|
113662
|
+
if (this._textInput) {
|
|
113663
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
113664
|
+
}
|
|
113665
|
+
}
|
|
113666
|
+
observeValue() {
|
|
113667
|
+
if (this._textInput) {
|
|
113668
|
+
this._textInput.value = this.getTextValue(this.value) || '';
|
|
113669
|
+
}
|
|
113670
|
+
}
|
|
113624
113671
|
changeValue(newValue) {
|
|
113625
113672
|
this.errorMessage = "";
|
|
113626
113673
|
if (newValue !== this.value) {
|
|
113627
113674
|
this.value = newValue;
|
|
113628
113675
|
this.ezChange.emit(this.value);
|
|
113629
113676
|
}
|
|
113677
|
+
else {
|
|
113678
|
+
this.observeValue();
|
|
113679
|
+
}
|
|
113630
113680
|
}
|
|
113631
113681
|
parseNumber() {
|
|
113632
|
-
const parsedNumber = this._textInput.value ? NumberUtils.stringToNumber(this._textInput.value) :
|
|
113633
|
-
if (parsedNumber
|
|
113682
|
+
const parsedNumber = this._textInput.value ? NumberUtils.stringToNumber(this._textInput.value) : undefined;
|
|
113683
|
+
if (parsedNumber !== undefined && isNaN(parsedNumber)) {
|
|
113634
113684
|
this.errorMessage = "O valor digitado não é um número válido";
|
|
113635
113685
|
}
|
|
113636
113686
|
else {
|
|
@@ -113647,19 +113697,19 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
113647
113697
|
if (value) {
|
|
113648
113698
|
return this.precision > 0 ? NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
|
|
113649
113699
|
}
|
|
113650
|
-
return
|
|
113700
|
+
return undefined;
|
|
113651
113701
|
}
|
|
113652
113702
|
componentDidLoad() {
|
|
113653
113703
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
113654
113704
|
}
|
|
113655
113705
|
render() {
|
|
113656
|
-
return (h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label,
|
|
113706
|
+
return (h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label, value: this.getTextValue(this.value), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }));
|
|
113657
113707
|
}
|
|
113658
113708
|
get _elem() { return this; }
|
|
113659
113709
|
static get watchers() { return {
|
|
113660
|
-
"label": ["
|
|
113661
|
-
"errorMessage": ["
|
|
113662
|
-
"value": ["
|
|
113710
|
+
"label": ["observeLabel"],
|
|
113711
|
+
"errorMessage": ["observeErrorMessage"],
|
|
113712
|
+
"value": ["observeValue"]
|
|
113663
113713
|
}; }
|
|
113664
113714
|
static get style() { return ezNumberInputCss; }
|
|
113665
113715
|
};
|
|
@@ -113735,7 +113785,7 @@ let EzPopover$1 = class extends HTMLElement$1 {
|
|
|
113735
113785
|
this.ezVisibilityChange.emit(false);
|
|
113736
113786
|
};
|
|
113737
113787
|
}
|
|
113738
|
-
|
|
113788
|
+
observeOpened(newValue, oldValue) {
|
|
113739
113789
|
if (newValue != oldValue) {
|
|
113740
113790
|
this.ezVisibilityChange.emit(newValue);
|
|
113741
113791
|
}
|
|
@@ -113792,7 +113842,7 @@ let EzPopover$1 = class extends HTMLElement$1 {
|
|
|
113792
113842
|
}
|
|
113793
113843
|
get _host() { return this; }
|
|
113794
113844
|
static get watchers() { return {
|
|
113795
|
-
"opened": ["
|
|
113845
|
+
"opened": ["observeOpened"]
|
|
113796
113846
|
}; }
|
|
113797
113847
|
static get style() { return ezPopoverCss; }
|
|
113798
113848
|
};
|
|
@@ -113870,7 +113920,7 @@ let EzSearch$1 = class extends HTMLElement$1 {
|
|
|
113870
113920
|
*/
|
|
113871
113921
|
this.mode = "regular";
|
|
113872
113922
|
}
|
|
113873
|
-
|
|
113923
|
+
observeValue() {
|
|
113874
113924
|
if (this._comboElement) {
|
|
113875
113925
|
this._comboElement.value = this.value;
|
|
113876
113926
|
}
|
|
@@ -113901,7 +113951,7 @@ let EzSearch$1 = class extends HTMLElement$1 {
|
|
|
113901
113951
|
;
|
|
113902
113952
|
get _elem() { return this; }
|
|
113903
113953
|
static get watchers() { return {
|
|
113904
|
-
"value": ["
|
|
113954
|
+
"value": ["observeValue"]
|
|
113905
113955
|
}; }
|
|
113906
113956
|
static get style() { return ezSearchCss; }
|
|
113907
113957
|
};
|
|
@@ -114124,7 +114174,7 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114124
114174
|
*/
|
|
114125
114175
|
this.mode = "regular";
|
|
114126
114176
|
}
|
|
114127
|
-
|
|
114177
|
+
observeErrorMessage() {
|
|
114128
114178
|
var _a, _b;
|
|
114129
114179
|
const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
|
|
114130
114180
|
if (hasError) {
|
|
@@ -114136,13 +114186,13 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114136
114186
|
(_b = this._messageBoxElem) === null || _b === void 0 ? void 0 : _b.classList.remove('hasError');
|
|
114137
114187
|
}
|
|
114138
114188
|
}
|
|
114139
|
-
|
|
114140
|
-
this._inputElem.value = this.value
|
|
114189
|
+
observeValue() {
|
|
114190
|
+
this._inputElem.value = this.value == undefined ? "" : this.value;
|
|
114141
114191
|
this.handleChange();
|
|
114142
114192
|
this.adjustFloatingLabel();
|
|
114143
114193
|
this.ezChange.emit(this.value);
|
|
114144
114194
|
}
|
|
114145
|
-
|
|
114195
|
+
observeMode() {
|
|
114146
114196
|
if (this._initialRows == undefined) {
|
|
114147
114197
|
this._initialRows = this.rows > 0 ? this.rows : undefined;
|
|
114148
114198
|
}
|
|
@@ -114151,7 +114201,7 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114151
114201
|
this.rows = rows;
|
|
114152
114202
|
}
|
|
114153
114203
|
}
|
|
114154
|
-
|
|
114204
|
+
observeRows() {
|
|
114155
114205
|
const rows = this.rows > 0 ? this.rows : this.mode != "slim" ? 4 : 2;
|
|
114156
114206
|
if (rows !== this.rows) {
|
|
114157
114207
|
this.rows = rows;
|
|
@@ -114217,9 +114267,9 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114217
114267
|
// Lifecycle web component
|
|
114218
114268
|
//---------------------------------------------
|
|
114219
114269
|
componentDidLoad() {
|
|
114220
|
-
this.
|
|
114270
|
+
this.observeErrorMessage();
|
|
114221
114271
|
this.adjustFloatingLabel();
|
|
114222
|
-
this.
|
|
114272
|
+
this.observeMode();
|
|
114223
114273
|
}
|
|
114224
114274
|
render() {
|
|
114225
114275
|
return (h(Host, null, h("div", { class: "textarea", ref: (el) => this._container = el }, this.label && this.mode != "slim" ?
|
|
@@ -114229,10 +114279,10 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114229
114279
|
}
|
|
114230
114280
|
get _hostElement() { return this; }
|
|
114231
114281
|
static get watchers() { return {
|
|
114232
|
-
"errorMessage": ["
|
|
114233
|
-
"value": ["
|
|
114234
|
-
"mode": ["
|
|
114235
|
-
"rows": ["
|
|
114282
|
+
"errorMessage": ["observeErrorMessage"],
|
|
114283
|
+
"value": ["observeValue"],
|
|
114284
|
+
"mode": ["observeMode"],
|
|
114285
|
+
"rows": ["observeRows"]
|
|
114236
114286
|
}; }
|
|
114237
114287
|
static get style() { return ezTextAreaCss; }
|
|
114238
114288
|
};
|
|
@@ -114257,8 +114307,12 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114257
114307
|
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
114258
114308
|
*/
|
|
114259
114309
|
this.mode = "regular";
|
|
114310
|
+
/**
|
|
114311
|
+
* Define se o controle de change do value será controlado por um componente pai.
|
|
114312
|
+
*/
|
|
114313
|
+
this.slaveMode = false;
|
|
114260
114314
|
}
|
|
114261
|
-
|
|
114315
|
+
observeErrorMessage() {
|
|
114262
114316
|
var _a, _b;
|
|
114263
114317
|
if (this._inputElem) {
|
|
114264
114318
|
const hasError = typeof this.errorMessage === "string" && this.errorMessage !== "";
|
|
@@ -114272,7 +114326,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114272
114326
|
}
|
|
114273
114327
|
}
|
|
114274
114328
|
}
|
|
114275
|
-
|
|
114329
|
+
observeMask() {
|
|
114276
114330
|
if (this.mask) {
|
|
114277
114331
|
if (this._maskFormatter == undefined) {
|
|
114278
114332
|
this._maskFormatter = new MaskFormatter(this.mask);
|
|
@@ -114282,14 +114336,17 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114282
114336
|
}
|
|
114283
114337
|
}
|
|
114284
114338
|
}
|
|
114285
|
-
|
|
114339
|
+
observeValue() {
|
|
114286
114340
|
if (this._inputElem) {
|
|
114287
|
-
this._inputElem.value = this.value;
|
|
114341
|
+
this._inputElem.value = this.value || "";
|
|
114288
114342
|
}
|
|
114289
114343
|
this.handleChange();
|
|
114344
|
+
this.adjustFloatingLabel();
|
|
114345
|
+
if (this.slaveMode) {
|
|
114346
|
+
return;
|
|
114347
|
+
}
|
|
114290
114348
|
this.errorMessage = "";
|
|
114291
114349
|
this.ezChange.emit(this.value);
|
|
114292
|
-
this.adjustFloatingLabel();
|
|
114293
114350
|
}
|
|
114294
114351
|
adjustFloatingLabel() {
|
|
114295
114352
|
if (this.label && this._labelElem) {
|
|
@@ -114341,7 +114398,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114341
114398
|
this.errorMessage = e.message;
|
|
114342
114399
|
}
|
|
114343
114400
|
}
|
|
114344
|
-
this.
|
|
114401
|
+
this.controlChangeValue();
|
|
114345
114402
|
this.adjustFloatingLabel();
|
|
114346
114403
|
}
|
|
114347
114404
|
isValidValue(value) {
|
|
@@ -114350,7 +114407,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114350
114407
|
}
|
|
114351
114408
|
return true;
|
|
114352
114409
|
}
|
|
114353
|
-
|
|
114410
|
+
controlChangeValue() {
|
|
114354
114411
|
if ((this.value || '') !== this._inputElem.value) {
|
|
114355
114412
|
this.value = this._inputElem.value;
|
|
114356
114413
|
}
|
|
@@ -114364,9 +114421,9 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114364
114421
|
this._lastValidValue = value;
|
|
114365
114422
|
}
|
|
114366
114423
|
else {
|
|
114367
|
-
this._inputElem.value = this._lastValidValue
|
|
114424
|
+
this._inputElem.value = this._lastValidValue == undefined ? "" : this._lastValidValue;
|
|
114368
114425
|
}
|
|
114369
|
-
this.
|
|
114426
|
+
this.controlChangeValue();
|
|
114370
114427
|
}
|
|
114371
114428
|
handleSlotChange(ev) {
|
|
114372
114429
|
const slot = ev.target;
|
|
@@ -114397,7 +114454,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114397
114454
|
}
|
|
114398
114455
|
}
|
|
114399
114456
|
}
|
|
114400
|
-
this.
|
|
114457
|
+
this.observeErrorMessage();
|
|
114401
114458
|
}
|
|
114402
114459
|
doFocus() {
|
|
114403
114460
|
if (this.label && this._labelElem && !this._labelElem.classList.contains("input__label--floated")) {
|
|
@@ -114408,12 +114465,12 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114408
114465
|
// Lifecycle web component
|
|
114409
114466
|
//---------------------------------------------
|
|
114410
114467
|
componentDidLoad() {
|
|
114411
|
-
this.
|
|
114412
|
-
this.
|
|
114468
|
+
this.observeErrorMessage();
|
|
114469
|
+
this.observeMask();
|
|
114413
114470
|
this.adjustFloatingLabel();
|
|
114414
114471
|
}
|
|
114415
114472
|
componentWillLoad() {
|
|
114416
|
-
this.
|
|
114473
|
+
this.observeMask();
|
|
114417
114474
|
if (this.value) {
|
|
114418
114475
|
if (this._maskFormatter) {
|
|
114419
114476
|
try {
|
|
@@ -114437,9 +114494,9 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114437
114494
|
}
|
|
114438
114495
|
get _hostElement() { return this; }
|
|
114439
114496
|
static get watchers() { return {
|
|
114440
|
-
"errorMessage": ["
|
|
114441
|
-
"mask": ["
|
|
114442
|
-
"value": ["
|
|
114497
|
+
"errorMessage": ["observeErrorMessage"],
|
|
114498
|
+
"mask": ["observeMask"],
|
|
114499
|
+
"value": ["observeValue"]
|
|
114443
114500
|
}; }
|
|
114444
114501
|
static get style() { return ezTextInputCss; }
|
|
114445
114502
|
};
|
|
@@ -114451,6 +114508,7 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114451
114508
|
super();
|
|
114452
114509
|
this.__registerHost();
|
|
114453
114510
|
this.__attachShadow();
|
|
114511
|
+
this.ezChange = createEvent(this, "ezChange", 7);
|
|
114454
114512
|
/**
|
|
114455
114513
|
* Deixa o campo disponível ou não para digitação.
|
|
114456
114514
|
*/
|
|
@@ -114464,28 +114522,28 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114464
114522
|
*/
|
|
114465
114523
|
this.mode = "regular";
|
|
114466
114524
|
}
|
|
114467
|
-
|
|
114525
|
+
observeShowSeconds() {
|
|
114468
114526
|
if (this.showSeconds) {
|
|
114469
|
-
|
|
114470
|
-
this._maskFormatter = new MaskFormatter("##:##:##");
|
|
114471
|
-
}
|
|
114472
|
-
else {
|
|
114473
|
-
this._maskFormatter.mask = "##:##:##";
|
|
114474
|
-
}
|
|
114527
|
+
this.prepareMask("##:##:##");
|
|
114475
114528
|
}
|
|
114476
114529
|
else {
|
|
114477
|
-
|
|
114478
|
-
this._maskFormatter = new MaskFormatter("##:##");
|
|
114479
|
-
}
|
|
114480
|
-
else {
|
|
114481
|
-
this._maskFormatter.mask = "##:##";
|
|
114482
|
-
}
|
|
114530
|
+
this.prepareMask("##:##");
|
|
114483
114531
|
}
|
|
114484
114532
|
}
|
|
114485
|
-
|
|
114486
|
-
if (this.value
|
|
114533
|
+
observeValue() {
|
|
114534
|
+
if (isNaN(this.value)) {
|
|
114487
114535
|
this.value = undefined;
|
|
114488
|
-
|
|
114536
|
+
}
|
|
114537
|
+
}
|
|
114538
|
+
//---------------------------------------------
|
|
114539
|
+
// Private methods
|
|
114540
|
+
//---------------------------------------------
|
|
114541
|
+
prepareMask(mask) {
|
|
114542
|
+
if (this._maskFormatter == undefined) {
|
|
114543
|
+
this._maskFormatter = new MaskFormatter(mask);
|
|
114544
|
+
}
|
|
114545
|
+
else {
|
|
114546
|
+
this._maskFormatter.mask = mask;
|
|
114489
114547
|
}
|
|
114490
114548
|
}
|
|
114491
114549
|
//---------------------------------------------
|
|
@@ -114495,13 +114553,13 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114495
114553
|
* Faz o foco no componente de input
|
|
114496
114554
|
*/
|
|
114497
114555
|
async setFocus() {
|
|
114498
|
-
this._inputElem.
|
|
114556
|
+
this._inputElem.setFocus();
|
|
114499
114557
|
}
|
|
114500
114558
|
/**
|
|
114501
114559
|
* Remove o foco no componente de input
|
|
114502
114560
|
*/
|
|
114503
114561
|
async setBlur() {
|
|
114504
|
-
this._inputElem.
|
|
114562
|
+
this._inputElem.setBlur();
|
|
114505
114563
|
}
|
|
114506
114564
|
//---------------------------------------------
|
|
114507
114565
|
// Event handlers
|
|
@@ -114509,24 +114567,29 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114509
114567
|
handleFocusout() {
|
|
114510
114568
|
this.errorMessage = "";
|
|
114511
114569
|
this.prepareValue(this.viewValue);
|
|
114512
|
-
if (!TimeFormatter.validateTime(this.viewValue, this.showSeconds)) {
|
|
114513
|
-
this.
|
|
114570
|
+
if (this.viewValue && !TimeFormatter.validateTime(this.viewValue, this.showSeconds)) {
|
|
114571
|
+
this._oldViewValue = this.viewValue;
|
|
114514
114572
|
this.errorMessage = "Favor inserir um horário válido.";
|
|
114515
114573
|
}
|
|
114574
|
+
else {
|
|
114575
|
+
if (this.viewValue === this._oldViewValue) {
|
|
114576
|
+
return;
|
|
114577
|
+
}
|
|
114578
|
+
this._oldViewValue = this.viewValue;
|
|
114579
|
+
if (this.viewValue === "00:00" && this.value == undefined) {
|
|
114580
|
+
this.value = 0;
|
|
114581
|
+
}
|
|
114582
|
+
this.ezChange.emit(this.value);
|
|
114583
|
+
}
|
|
114516
114584
|
}
|
|
114517
114585
|
prepareValue(value) {
|
|
114518
114586
|
try {
|
|
114519
114587
|
this.viewValue = TimeFormatter.prepareValue(value, this.showSeconds);
|
|
114520
114588
|
}
|
|
114521
114589
|
catch (e) {
|
|
114522
|
-
this.clearField();
|
|
114523
114590
|
this.errorMessage = e.message;
|
|
114524
114591
|
}
|
|
114525
114592
|
}
|
|
114526
|
-
clearField() {
|
|
114527
|
-
this.viewValue = '';
|
|
114528
|
-
this.value = undefined;
|
|
114529
|
-
}
|
|
114530
114593
|
handleChange() {
|
|
114531
114594
|
this.viewValue = this._inputElem.value;
|
|
114532
114595
|
this.value = NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
|
|
@@ -114535,11 +114598,11 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114535
114598
|
// Lifecycle web component
|
|
114536
114599
|
//---------------------------------------------
|
|
114537
114600
|
componentDidLoad() {
|
|
114538
|
-
this.
|
|
114601
|
+
this.observeValue();
|
|
114539
114602
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._inputElem);
|
|
114540
114603
|
}
|
|
114541
114604
|
componentWillLoad() {
|
|
114542
|
-
this.
|
|
114605
|
+
this.observeShowSeconds();
|
|
114543
114606
|
if (this.value) {
|
|
114544
114607
|
this.prepareValue(this.value.toString());
|
|
114545
114608
|
}
|
|
@@ -114548,13 +114611,13 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114548
114611
|
}
|
|
114549
114612
|
}
|
|
114550
114613
|
render() {
|
|
114551
|
-
return (h(Host, null, 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 }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
114614
|
+
return (h(Host, null, 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 }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
114552
114615
|
}
|
|
114553
114616
|
static get assetsDirs() { return ["../assets"]; }
|
|
114554
114617
|
get _elem() { return this; }
|
|
114555
114618
|
static get watchers() { return {
|
|
114556
|
-
"showSeconds": ["
|
|
114557
|
-
"value": ["
|
|
114619
|
+
"showSeconds": ["observeShowSeconds"],
|
|
114620
|
+
"value": ["observeValue"]
|
|
114558
114621
|
}; }
|
|
114559
114622
|
static get style() { return ezTimeInputCss; }
|
|
114560
114623
|
};
|
|
@@ -114747,7 +114810,7 @@ let EzUpload$1 = class extends HTMLElement$1 {
|
|
|
114747
114810
|
*/
|
|
114748
114811
|
this.enabled = true;
|
|
114749
114812
|
}
|
|
114750
|
-
|
|
114813
|
+
observeValue(newValue) {
|
|
114751
114814
|
//Observamos o mundo externo, se um novo valor foi atribuído,
|
|
114752
114815
|
//precisamos cancelar a alteração anterior, isso envolve, percorrer
|
|
114753
114816
|
//a lista de ponteiros e cancelar todos os uploads em andamento.
|
|
@@ -114767,7 +114830,7 @@ let EzUpload$1 = class extends HTMLElement$1 {
|
|
|
114767
114830
|
this.value.forEach(ezFile => this._filePointers.set(ezFile.name, ezFile));
|
|
114768
114831
|
}
|
|
114769
114832
|
}
|
|
114770
|
-
|
|
114833
|
+
observeRequestHeaders() {
|
|
114771
114834
|
this._requestHeaders = new Map();
|
|
114772
114835
|
if (typeof this.requestHeaders == "string") {
|
|
114773
114836
|
try {
|
|
@@ -114993,12 +115056,77 @@ let EzUpload$1 = class extends HTMLElement$1 {
|
|
|
114993
115056
|
}
|
|
114994
115057
|
get _host() { return this; }
|
|
114995
115058
|
static get watchers() { return {
|
|
114996
|
-
"value": ["
|
|
114997
|
-
"requestHeaders": ["
|
|
115059
|
+
"value": ["observeValue"],
|
|
115060
|
+
"requestHeaders": ["observeRequestHeaders"]
|
|
114998
115061
|
}; }
|
|
114999
115062
|
static get style() { return ezUploadCss; }
|
|
115000
115063
|
};
|
|
115001
115064
|
|
|
115065
|
+
const ezViewStackCss = ":host{width:100%;height:100%}.ez-view-stack__container{width:100%;height:100%}";
|
|
115066
|
+
|
|
115067
|
+
let EzViewStack$1 = class extends HTMLElement$1 {
|
|
115068
|
+
constructor() {
|
|
115069
|
+
super();
|
|
115070
|
+
this.__registerHost();
|
|
115071
|
+
}
|
|
115072
|
+
/**
|
|
115073
|
+
* Exibe a aba desejada de acordo com o index passado na tela fazendo com a ativa atual seja removida ou oculta dependendo da hidePolicy.
|
|
115074
|
+
*/
|
|
115075
|
+
async show(index) {
|
|
115076
|
+
if (index !== this._focusedIndex && 0 <= index && index < this._totalStackItems) {
|
|
115077
|
+
this.policyHideRemove();
|
|
115078
|
+
this.policyShowAppend(index);
|
|
115079
|
+
this._focusedIndex = index;
|
|
115080
|
+
}
|
|
115081
|
+
}
|
|
115082
|
+
policyHideRemove() {
|
|
115083
|
+
let element = this._hostElem.querySelector(`#el_${this._focusedIndex}`);
|
|
115084
|
+
this.checkElementVisibility(element);
|
|
115085
|
+
}
|
|
115086
|
+
policyShowAppend(index) {
|
|
115087
|
+
let selectedElement = this._hostElem.querySelector(`#el_${index}`);
|
|
115088
|
+
if (selectedElement) {
|
|
115089
|
+
selectedElement.removeAttribute("style");
|
|
115090
|
+
}
|
|
115091
|
+
else {
|
|
115092
|
+
this._hostElem.append(this._elemList[index]);
|
|
115093
|
+
}
|
|
115094
|
+
}
|
|
115095
|
+
checkElementVisibility(element) {
|
|
115096
|
+
if (element.getAttribute("hidePolicy") === "hide" || !element.getAttribute("hidePolicy")) {
|
|
115097
|
+
element.setAttribute("style", "display: none");
|
|
115098
|
+
}
|
|
115099
|
+
else if (element.getAttribute("hidePolicy") === "remove") {
|
|
115100
|
+
element.remove();
|
|
115101
|
+
}
|
|
115102
|
+
}
|
|
115103
|
+
componentWillRender() {
|
|
115104
|
+
if (!this._elemList) {
|
|
115105
|
+
this._elemList = [];
|
|
115106
|
+
this._focusedIndex = 0;
|
|
115107
|
+
this._totalStackItems = 0;
|
|
115108
|
+
this._hostElem.classList.add("ez-view-stack__container");
|
|
115109
|
+
this._hostElem.querySelectorAll("stack-item").forEach((element, index) => {
|
|
115110
|
+
element.setAttribute("id", `el_${index}`);
|
|
115111
|
+
if (index !== 0) {
|
|
115112
|
+
this.checkElementVisibility(element);
|
|
115113
|
+
}
|
|
115114
|
+
this._totalStackItems++;
|
|
115115
|
+
this._elemList.push(element);
|
|
115116
|
+
});
|
|
115117
|
+
}
|
|
115118
|
+
}
|
|
115119
|
+
disconectCallback() {
|
|
115120
|
+
this._hostElem = null;
|
|
115121
|
+
this._elemList = null;
|
|
115122
|
+
}
|
|
115123
|
+
render() {
|
|
115124
|
+
return (h(Host, null));
|
|
115125
|
+
}
|
|
115126
|
+
get _hostElem() { return this; }
|
|
115127
|
+
static get style() { return ezViewStackCss; }
|
|
115128
|
+
};
|
|
115129
|
+
|
|
115002
115130
|
const gridConfigCss = ".sc-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__main__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__main__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid__group--font-family:var(--font-pattern, \"Sora\");--ez-grid__group--font-size:var(--text--medium, 14px);--ez-grid__group--font-weight:var(--text-weight--large, 600);--ez-grid__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.padding-right--medium.sc-grid-config{padding-right:var(--space--medium)}ez-list.sc-grid-config{height:100%}.heigth-calc.sc-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-grid-config{padding-top:var(--ez-grid-config__footer--padding-top);display:flex;justify-content:flex-end;width:100%}.hidden.sc-grid-config{display:none}.grid-config__main.sc-grid-config{padding-right:var(--ez-grid-config__main--padding-right);overflow-y:auto}.tabselector-container.sc-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-grid-config{display:flex;justify-content:space-between;align-items:center;width:359px}.subtitle.sc-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-grid-config{display:flex;margin:0;font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight);line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary)}.grid-config__main.sc-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__main__scrollbar--background-color);border-radius:var(--ez-grid-config__main__scrollbar--border-radius)}.grid-config__main.sc-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-grid-config{font-family:var(--ez-grid__group--font-family);font-size:var(--ez-grid__group--font-size);font-weight:var(--ez-grid__group--font-weight);padding-bottom:var(--ez-grid__group--padding-bottom)}";
|
|
115003
115131
|
|
|
115004
115132
|
let GridConfig$1 = class extends HTMLElement$1 {
|
|
@@ -115458,17 +115586,50 @@ let TestDu$1 = class extends HTMLElement$1 {
|
|
|
115458
115586
|
label: "Parceiro",
|
|
115459
115587
|
fields: [
|
|
115460
115588
|
{
|
|
115461
|
-
name: "
|
|
115462
|
-
label: "
|
|
115463
|
-
dataType: DataType.
|
|
115464
|
-
userInterface: UserInterface.
|
|
115465
|
-
|
|
115466
|
-
|
|
115467
|
-
|
|
115468
|
-
|
|
115469
|
-
|
|
115589
|
+
name: "CODPARC",
|
|
115590
|
+
label: "Parceiro",
|
|
115591
|
+
dataType: DataType.NUMBER,
|
|
115592
|
+
userInterface: UserInterface.INTEGERNUMBER,
|
|
115593
|
+
defaultValue: 666,
|
|
115594
|
+
required: false,
|
|
115595
|
+
properties: {}
|
|
115596
|
+
},
|
|
115597
|
+
{
|
|
115598
|
+
name: "RECDESP",
|
|
115599
|
+
label: "Receita/Despesa",
|
|
115600
|
+
dataType: DataType.TEXT,
|
|
115601
|
+
userInterface: UserInterface.OPTIONSELECTOR,
|
|
115602
|
+
required: true,
|
|
115603
|
+
properties: { options: `{"-1": "Despesa", "1": "Receita"}` }
|
|
115604
|
+
},
|
|
115605
|
+
{
|
|
115606
|
+
name: "P",
|
|
115607
|
+
label: "pera",
|
|
115608
|
+
dataType: DataType.TEXT,
|
|
115609
|
+
userInterface: UserInterface.OPTIONSELECTOR,
|
|
115610
|
+
properties: { options: `{"M": "Madura", "V": "Verde", "P": "Passada"}` }
|
|
115611
|
+
},
|
|
115470
115612
|
]
|
|
115471
115613
|
};
|
|
115614
|
+
this.formConfig = [
|
|
115615
|
+
{
|
|
115616
|
+
name: "CODPARC",
|
|
115617
|
+
label: "Parceiro",
|
|
115618
|
+
dataType: DataType.NUMBER,
|
|
115619
|
+
userInterface: UserInterface.INTEGERNUMBER,
|
|
115620
|
+
defaultValue: 666,
|
|
115621
|
+
required: false,
|
|
115622
|
+
properties: {}
|
|
115623
|
+
},
|
|
115624
|
+
{
|
|
115625
|
+
name: "RECDESP",
|
|
115626
|
+
label: "Receita/Despesa",
|
|
115627
|
+
dataType: DataType.TEXT,
|
|
115628
|
+
userInterface: UserInterface.OPTIONSELECTOR,
|
|
115629
|
+
required: true,
|
|
115630
|
+
properties: { options: `{"-1": "Despesa", "1": "Receita"}` }
|
|
115631
|
+
}
|
|
115632
|
+
];
|
|
115472
115633
|
this.dataUnit.dataLoader = () => new Promise(accept => accept({
|
|
115473
115634
|
records: [{
|
|
115474
115635
|
__record__id__: "1321321321321321",
|
|
@@ -115499,7 +115660,7 @@ let TestDu$1 = class extends HTMLElement$1 {
|
|
|
115499
115660
|
});
|
|
115500
115661
|
}
|
|
115501
115662
|
render() {
|
|
115502
|
-
return (h("div", null, h("button", { onClick: () => this.dataUnit.loadData() }, "Carregar"), h("button", { onClick: () => this.save(), disabled: !this.isDirty }, "Salvar"), h("ez-form", { dataUnit: this.dataUnit })));
|
|
115663
|
+
return (h("div", null, h("button", { onClick: () => this.dataUnit.addRecord() }, "Novo"), h("button", { onClick: () => this.dataUnit.loadData() }, "Carregar"), h("button", { onClick: () => this.save(), disabled: !this.isDirty }, "Salvar"), h("ez-form", { dataUnit: this.dataUnit, config: this.formConfig })));
|
|
115503
115664
|
}
|
|
115504
115665
|
static get style() { return testDuCss; }
|
|
115505
115666
|
};
|
|
@@ -115519,6 +115680,7 @@ const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [0,"ez-form",{"dataUnit
|
|
|
115519
115680
|
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [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]}]);
|
|
115520
115681
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
115521
115682
|
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32]}]);
|
|
115683
|
+
const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
|
|
115522
115684
|
const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]);
|
|
115523
115685
|
const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513]}]);
|
|
115524
115686
|
const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [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"]}]);
|
|
@@ -115526,10 +115688,11 @@ const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size"
|
|
|
115526
115688
|
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [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]}]);
|
|
115527
115689
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]);
|
|
115528
115690
|
const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [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]}]);
|
|
115529
|
-
const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [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]}]);
|
|
115691
|
+
const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [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"]}]);
|
|
115530
115692
|
const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513]}]);
|
|
115531
115693
|
const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"]}]);
|
|
115532
115694
|
const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [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]}]);
|
|
115695
|
+
const EzViewStack = /*@__PURE__*/proxyCustomElement(EzViewStack$1, [0,"ez-view-stack"]);
|
|
115533
115696
|
const GridConfig = /*@__PURE__*/proxyCustomElement(GridConfig$1, [2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]);
|
|
115534
115697
|
const SelectBox = /*@__PURE__*/proxyCustomElement(SelectBox$1, [1,"select-box",{"selectedOption":[1,"selected-option"]}]);
|
|
115535
115698
|
const TestDu = /*@__PURE__*/proxyCustomElement(TestDu$1, [0,"test-du",{"isDirty":[32]}]);
|
|
@@ -115551,6 +115714,7 @@ const defineCustomElements = (opts) => {
|
|
|
115551
115714
|
EzGrid,
|
|
115552
115715
|
EzIcon,
|
|
115553
115716
|
EzList,
|
|
115717
|
+
EzLoadingBar,
|
|
115554
115718
|
EzModal,
|
|
115555
115719
|
EzNumberInput,
|
|
115556
115720
|
EzPopover,
|
|
@@ -115562,6 +115726,7 @@ const defineCustomElements = (opts) => {
|
|
|
115562
115726
|
EzTimeInput,
|
|
115563
115727
|
EzToast,
|
|
115564
115728
|
EzUpload,
|
|
115729
|
+
EzViewStack,
|
|
115565
115730
|
GridConfig,
|
|
115566
115731
|
SelectBox,
|
|
115567
115732
|
TestDu
|
|
@@ -115573,4 +115738,4 @@ const defineCustomElements = (opts) => {
|
|
|
115573
115738
|
}
|
|
115574
115739
|
};
|
|
115575
115740
|
|
|
115576
|
-
export { EzApplication, EzButton, EzCalendar, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzFilterInput, EzForm, EzGrid, EzIcon, EzList, EzModal, EzNumberInput, EzPopover, EzPopup, EzSearch, EzTabselector, EzTextArea, EzTextInput, EzTimeInput, EzToast, EzUpload, GridConfig, SelectBox, TestDu, defineCustomElements };
|
|
115741
|
+
export { EzApplication, EzButton, EzCalendar, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzFilterInput, EzForm, EzGrid, EzIcon, EzList, EzLoadingBar, EzModal, EzNumberInput, EzPopover, EzPopup, EzSearch, EzTabselector, EzTextArea, EzTextInput, EzTimeInput, EzToast, EzUpload, EzViewStack, GridConfig, SelectBox, TestDu, defineCustomElements };
|