@sankhyalabs/ezui 1.1.159 → 1.1.160
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-combo-box.cjs.entry.js +62 -27
- package/dist/cjs/ez-date-input.cjs.entry.js +71 -25
- package/dist/cjs/ez-date-time-input.cjs.entry.js +94 -31
- package/dist/cjs/ez-filter-input.cjs.entry.js +10 -4
- package/dist/cjs/ez-form.cjs.entry.js +54 -9
- package/dist/cjs/ez-grid.cjs.entry.js +9 -6
- package/dist/cjs/ez-number-input.cjs.entry.js +69 -25
- package/dist/cjs/ez-search.cjs.entry.js +20 -5
- package/dist/cjs/ez-text-area.cjs.entry.js +8 -2
- package/dist/cjs/ez-text-input.cjs.entry.js +30 -21
- package/dist/cjs/ez-time-input.cjs.entry.js +75 -40
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +81 -28
- package/dist/collection/components/ez-date-input/ez-date-input.js +87 -25
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +108 -31
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +26 -4
- package/dist/collection/components/ez-form/DataBinder.js +12 -3
- package/dist/collection/components/ez-form/ez-form.js +43 -6
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +1 -1
- package/dist/collection/components/ez-grid/ez-grid.js +14 -7
- package/dist/collection/components/ez-number-input/ez-number-input.js +83 -25
- package/dist/collection/components/ez-search/ez-search.js +38 -5
- package/dist/collection/components/ez-text-area/ez-text-area.css +1 -1
- package/dist/collection/components/ez-text-area/ez-text-area.js +23 -1
- package/dist/collection/components/ez-text-input/ez-text-input.css +1 -1
- package/dist/collection/components/ez-text-input/ez-text-input.js +45 -38
- package/dist/collection/components/ez-time-input/ez-time-input.js +95 -59
- package/dist/custom-elements/index.js +504 -197
- package/dist/esm/ez-combo-box.entry.js +62 -27
- package/dist/esm/ez-date-input.entry.js +71 -25
- package/dist/esm/ez-date-time-input.entry.js +94 -31
- package/dist/esm/ez-filter-input.entry.js +10 -4
- package/dist/esm/ez-form.entry.js +54 -9
- package/dist/esm/ez-grid.entry.js +9 -6
- package/dist/esm/ez-number-input.entry.js +69 -25
- package/dist/esm/ez-search.entry.js +20 -5
- package/dist/esm/ez-text-area.entry.js +8 -2
- package/dist/esm/ez-text-input.entry.js +30 -21
- package/dist/esm/ez-time-input.entry.js +76 -41
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-003d53b1.entry.js +1 -0
- package/dist/ezui/p-267fa515.entry.js +1 -0
- package/dist/ezui/p-2acf7d59.entry.js +1 -0
- package/dist/ezui/p-403de0a4.entry.js +1 -0
- package/dist/ezui/p-4c3d136c.entry.js +1 -0
- package/dist/ezui/p-53bbba8e.entry.js +1 -0
- package/dist/ezui/p-6668c3b0.entry.js +1 -0
- package/dist/ezui/p-7fd6deec.entry.js +1 -0
- package/dist/ezui/p-ad6cc559.entry.js +1 -0
- package/dist/ezui/{p-be87ac5e.entry.js → p-ae2fea4c.entry.js} +1 -1
- package/dist/ezui/p-ff7b4b13.entry.js +1 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +13 -7
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +10 -3
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +15 -7
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +5 -1
- package/dist/types/components/ez-form/DataBinder.d.ts +1 -1
- package/dist/types/components/ez-form/ez-form.d.ts +1 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +4 -1
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +14 -5
- package/dist/types/components/ez-search/ez-search.d.ts +6 -1
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +7 -6
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +17 -13
- package/dist/types/components.d.ts +43 -20
- package/package.json +1 -1
- package/dist/ezui/p-1859a3d8.entry.js +0 -1
- package/dist/ezui/p-49fdfa4b.entry.js +0 -1
- package/dist/ezui/p-4fdceb7d.entry.js +0 -1
- package/dist/ezui/p-6d4b1628.entry.js +0 -1
- package/dist/ezui/p-8f4fac31.entry.js +0 -1
- package/dist/ezui/p-91377c65.entry.js +0 -1
- package/dist/ezui/p-b524dfca.entry.js +0 -1
- package/dist/ezui/p-bc8aa27f.entry.js +0 -1
- package/dist/ezui/p-ec21ecce.entry.js +0 -1
- package/dist/ezui/p-fc9b9487.entry.js +0 -1
|
@@ -676,40 +676,66 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
676
676
|
*/
|
|
677
677
|
this.mode = "regular";
|
|
678
678
|
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
679
|
+
observeErrorMessage() {
|
|
680
|
+
var _a;
|
|
681
|
+
if (this._textInput) {
|
|
682
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
683
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
684
|
+
this.setInputValue();
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
observeValue(newValue, oldValue) {
|
|
689
|
+
var _a, _b, _c, _d;
|
|
690
|
+
if (this._textInput && newValue != oldValue) {
|
|
691
|
+
const newValueSelected = this.getSelectedOption(newValue);
|
|
692
|
+
const oldValueSelected = this.getSelectedOption(oldValue);
|
|
693
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
694
|
+
if (((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) != ((_b = newValueSelected === null || newValueSelected === void 0 ? void 0 : newValueSelected.value) === null || _b === void 0 ? void 0 : _b.toString())) {
|
|
695
|
+
this.value = newValueSelected;
|
|
696
|
+
}
|
|
697
|
+
if (((_c = newValueSelected === null || newValueSelected === void 0 ? void 0 : newValueSelected.value) === null || _c === void 0 ? void 0 : _c.toString()) !== ((_d = oldValueSelected === null || oldValueSelected === void 0 ? void 0 : oldValueSelected.value) === null || _d === void 0 ? void 0 : _d.toString())) {
|
|
698
|
+
this.setInputValue();
|
|
699
|
+
const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
|
|
700
|
+
this.ezChange.emit(valueEmitted);
|
|
701
|
+
}
|
|
702
|
+
this.hideOptions();
|
|
703
|
+
this._criteria = undefined;
|
|
704
|
+
this._preSelection = undefined;
|
|
705
|
+
this.updateVisibleOptions();
|
|
682
706
|
}
|
|
683
|
-
this.hideOptions();
|
|
684
|
-
this._criteria = undefined;
|
|
685
|
-
this._preSelection = undefined;
|
|
686
|
-
this.updateVisibleOptions();
|
|
687
707
|
}
|
|
688
708
|
/**
|
|
689
709
|
* Realiza o foco no componente de seleção
|
|
690
710
|
*/
|
|
691
711
|
async setFocus() {
|
|
692
|
-
this.
|
|
712
|
+
this._textInput.setFocus();
|
|
693
713
|
}
|
|
694
714
|
/**
|
|
695
715
|
* Remove o foco no componente de seleção
|
|
696
716
|
*/
|
|
697
717
|
async setBlur() {
|
|
698
|
-
this.
|
|
718
|
+
this._textInput.setBlur();
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
722
|
+
*/
|
|
723
|
+
async isInvalid() {
|
|
724
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
699
725
|
}
|
|
700
726
|
getText() {
|
|
701
727
|
let text = "";
|
|
702
|
-
const
|
|
703
|
-
if (
|
|
704
|
-
text = this.showSelectedValue ? `${
|
|
728
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
729
|
+
if (currentValue) {
|
|
730
|
+
text = this.showSelectedValue ? `${currentValue.value} - ${currentValue.label}` : currentValue.label;
|
|
705
731
|
}
|
|
706
732
|
return text;
|
|
707
733
|
}
|
|
708
|
-
getSelectedOption() {
|
|
709
|
-
if (typeof
|
|
710
|
-
return this._visibleOptions.find(o => o.value ===
|
|
734
|
+
getSelectedOption(value) {
|
|
735
|
+
if (typeof value === "string" || value instanceof String) {
|
|
736
|
+
return this._visibleOptions.find(o => o.value === value);
|
|
711
737
|
}
|
|
712
|
-
return
|
|
738
|
+
return value;
|
|
713
739
|
}
|
|
714
740
|
updateVisibleOptions() {
|
|
715
741
|
let opts = this._source || [];
|
|
@@ -764,7 +790,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
764
790
|
//FIXME: Provavelmente isso fará com que o popup abra em uma
|
|
765
791
|
//posição errada no futuro. Preferi fazer simples no começo,
|
|
766
792
|
//porque não quis onerar o text input com essa funcionalidade...
|
|
767
|
-
const top = (this.errorMessage || !this.canShowError || this.mode
|
|
793
|
+
const top = (this.errorMessage || !this.canShowError || this.mode === "slim") ? "0px" : "-19px";
|
|
768
794
|
this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, top });
|
|
769
795
|
window.requestAnimationFrame(() => {
|
|
770
796
|
this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
@@ -847,15 +873,13 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
847
873
|
}
|
|
848
874
|
selectOption(newOption) {
|
|
849
875
|
var _a, _b;
|
|
850
|
-
const
|
|
851
|
-
if (((_a =
|
|
876
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
877
|
+
if (((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString())) {
|
|
852
878
|
const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
|
|
853
879
|
this.value = adjustedOpt;
|
|
854
|
-
this.errorMessage = "";
|
|
855
|
-
this.ezChange.emit(this.value);
|
|
856
880
|
}
|
|
857
881
|
else {
|
|
858
|
-
this.
|
|
882
|
+
this.setInputValue();
|
|
859
883
|
}
|
|
860
884
|
if (this.searchMode) {
|
|
861
885
|
this._visibleOptions = [];
|
|
@@ -872,11 +896,20 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
872
896
|
}
|
|
873
897
|
}
|
|
874
898
|
cancelPreselection() {
|
|
875
|
-
if (!this.
|
|
899
|
+
if (!this._textInput.value && this.value) {
|
|
876
900
|
this.selectOption(undefined);
|
|
877
901
|
}
|
|
878
902
|
else {
|
|
879
|
-
this.
|
|
903
|
+
this.setInputValue();
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
setInputValue(clearError = true) {
|
|
907
|
+
const textValue = this.getText();
|
|
908
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
909
|
+
this._textInput.value = textValue;
|
|
910
|
+
if (clearError) {
|
|
911
|
+
this.errorMessage = "";
|
|
912
|
+
}
|
|
880
913
|
}
|
|
881
914
|
}
|
|
882
915
|
clearSearch() {
|
|
@@ -934,7 +967,8 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
934
967
|
}
|
|
935
968
|
}
|
|
936
969
|
componentDidLoad() {
|
|
937
|
-
CSSVarsUtils.applyVarsTextInput(this.el, this.
|
|
970
|
+
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
971
|
+
this.setInputValue(false);
|
|
938
972
|
}
|
|
939
973
|
//---------------------------------------------
|
|
940
974
|
// Event handlers
|
|
@@ -954,7 +988,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
954
988
|
const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
955
989
|
const argumentNumber = Number(argument || undefined);
|
|
956
990
|
if (!this._criteria) {
|
|
957
|
-
this.
|
|
991
|
+
this._textInput.value = event.data || argument;
|
|
958
992
|
}
|
|
959
993
|
this._criteria = argument;
|
|
960
994
|
if (argument && (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch)) {
|
|
@@ -1012,7 +1046,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
1012
1046
|
}
|
|
1013
1047
|
render() {
|
|
1014
1048
|
var _a;
|
|
1015
|
-
return (h(Host, null, h("ez-text-input", { class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this.
|
|
1049
|
+
return (h(Host, null, h("ez-text-input", { class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })), this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
|
|
1016
1050
|
? h("button", { class: "btn", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
|
1017
1051
|
: undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("div", { class: "list-options", ref: elem => this._optionsList = elem }, this._visibleOptions.length === 0
|
|
1018
1052
|
&& h("div", { class: "message" }, !this._showLoading && h("span", { class: "message__no-result" }, this._textEmptyList), this._showLoading && h("div", { class: "message__loading" })), this.showOptionValue
|
|
@@ -1021,6 +1055,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
1021
1055
|
}
|
|
1022
1056
|
get el() { return this; }
|
|
1023
1057
|
static get watchers() { return {
|
|
1058
|
+
"errorMessage": ["observeErrorMessage"],
|
|
1024
1059
|
"value": ["observeValue"]
|
|
1025
1060
|
}; }
|
|
1026
1061
|
static get style() { return ezComboBoxCss; }
|
|
@@ -1036,6 +1071,7 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
1036
1071
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
1037
1072
|
this.ezStartChange = createEvent(this, "ezStartChange", 7);
|
|
1038
1073
|
this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
|
|
1074
|
+
this._focused = false;
|
|
1039
1075
|
/**
|
|
1040
1076
|
* Deixa o campo disponível ou não para uso.
|
|
1041
1077
|
*/
|
|
@@ -1046,18 +1082,33 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
1046
1082
|
this.mode = "regular";
|
|
1047
1083
|
}
|
|
1048
1084
|
observeLabel() {
|
|
1049
|
-
this._textInput
|
|
1085
|
+
if (this._textInput) {
|
|
1086
|
+
this._textInput.label = this.label;
|
|
1087
|
+
}
|
|
1050
1088
|
}
|
|
1051
1089
|
observeErrorMessage() {
|
|
1090
|
+
var _a;
|
|
1052
1091
|
if (this._textInput) {
|
|
1053
1092
|
this._textInput.errorMessage = this.errorMessage;
|
|
1093
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
1094
|
+
this.setInputValue();
|
|
1095
|
+
}
|
|
1054
1096
|
}
|
|
1055
1097
|
}
|
|
1056
1098
|
observeValue(newValue, oldValue) {
|
|
1057
|
-
if (newValue != oldValue) {
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1099
|
+
if (this._textInput && newValue != oldValue) {
|
|
1100
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1101
|
+
const oldValueValidated = this.validateValue(oldValue);
|
|
1102
|
+
if ((newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime()) !== (oldValueValidated === null || oldValueValidated === void 0 ? void 0 : oldValueValidated.getTime())) {
|
|
1103
|
+
const textValue = this.getTextValue(newValueValidated) || '';
|
|
1104
|
+
const parsedDate = DateUtils.strToDate(textValue);
|
|
1105
|
+
if ((parsedDate || !this._focused) && (this._textInput.value || '') !== textValue) {
|
|
1106
|
+
this._textInput.value = textValue;
|
|
1107
|
+
this._focused = false;
|
|
1108
|
+
this.errorMessage = "";
|
|
1109
|
+
}
|
|
1110
|
+
const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
|
|
1111
|
+
this.ezChange.emit(valueEmitted);
|
|
1061
1112
|
}
|
|
1062
1113
|
}
|
|
1063
1114
|
}
|
|
@@ -1073,59 +1124,89 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
1073
1124
|
async setBlur() {
|
|
1074
1125
|
this._textInput.setBlur();
|
|
1075
1126
|
}
|
|
1127
|
+
/**
|
|
1128
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
1129
|
+
*/
|
|
1130
|
+
async isInvalid() {
|
|
1131
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
1132
|
+
}
|
|
1076
1133
|
changeValue(newValue) {
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
if ((newValue === null || newValue === void 0 ? void 0 : newValue.toString()) !== ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString())) {
|
|
1082
|
-
this.value = newValue;
|
|
1083
|
-
this.ezChange.emit(this.value);
|
|
1134
|
+
const currentValue = this.validateValue(this.value);
|
|
1135
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1136
|
+
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
1137
|
+
this.value = newValueValidated;
|
|
1084
1138
|
}
|
|
1085
1139
|
}
|
|
1086
1140
|
showCalendar() {
|
|
1087
|
-
this.
|
|
1141
|
+
this.handleBlur();
|
|
1088
1142
|
this._calendar.value = this.value;
|
|
1089
1143
|
//FIXME: Provavelmente isso fará com que o popup abra em uma
|
|
1090
1144
|
//posição errada no futuro. Preferi fazer simples no começo,
|
|
1091
1145
|
//porque não quis onerar o text input com essa funcionalidade...
|
|
1092
|
-
const top = this.
|
|
1146
|
+
const top = this.errorMessage || this.mode === "slim" ? 0 : -19;
|
|
1093
1147
|
this._calendar.fitVertical(top, this._elem.clientHeight);
|
|
1094
1148
|
}
|
|
1095
1149
|
hideCalendar() {
|
|
1096
1150
|
this.changeValue(this._calendar.value);
|
|
1097
1151
|
this._calendar.hide();
|
|
1098
1152
|
}
|
|
1099
|
-
|
|
1153
|
+
handleBlur() {
|
|
1100
1154
|
const strValue = this._textInput.value;
|
|
1101
|
-
const
|
|
1102
|
-
if (
|
|
1103
|
-
|
|
1104
|
-
|
|
1155
|
+
const newValue = DateUtils.strToDate(strValue);
|
|
1156
|
+
if (newValue || !strValue) {
|
|
1157
|
+
this.errorMessage = "";
|
|
1158
|
+
const currentValue = this.validateValue(this.value);
|
|
1159
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1160
|
+
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) === (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
1161
|
+
if (newValueValidated) {
|
|
1162
|
+
this._textInput.value = this.getTextValue(newValueValidated) || '';
|
|
1163
|
+
this._focused = false;
|
|
1164
|
+
}
|
|
1165
|
+
this.ezCancelWaitingChange.emit();
|
|
1105
1166
|
}
|
|
1106
1167
|
else {
|
|
1107
|
-
this.changeValue(
|
|
1168
|
+
this.changeValue(newValueValidated);
|
|
1108
1169
|
}
|
|
1109
1170
|
}
|
|
1110
1171
|
else {
|
|
1172
|
+
this.changeValue(undefined);
|
|
1111
1173
|
this.ezCancelWaitingChange.emit();
|
|
1112
|
-
this.
|
|
1174
|
+
this.errorMessage = "O valor digitado não é uma data válida";
|
|
1113
1175
|
}
|
|
1114
1176
|
}
|
|
1115
1177
|
getTextValue(d) {
|
|
1116
1178
|
return d ? new Intl.DateTimeFormat("pt-BR").format(d) : undefined;
|
|
1117
1179
|
}
|
|
1118
|
-
|
|
1119
|
-
this.
|
|
1180
|
+
handleInput() {
|
|
1181
|
+
const strValue = this._textInput.value;
|
|
1182
|
+
const newValue = DateUtils.strToDate(strValue);
|
|
1183
|
+
const currentValue = this.validateValue(this.value);
|
|
1184
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1185
|
+
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
1186
|
+
this._focused = true;
|
|
1187
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
validateValue(value) {
|
|
1191
|
+
return value instanceof Date && !isNaN(value.valueOf())
|
|
1192
|
+
? DateUtils.clearTime(value)
|
|
1193
|
+
: undefined;
|
|
1194
|
+
}
|
|
1195
|
+
setInputValue() {
|
|
1196
|
+
const textValue = this.getTextValue(this.value) || '';
|
|
1197
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
1198
|
+
this._textInput.value = textValue;
|
|
1199
|
+
}
|
|
1120
1200
|
}
|
|
1121
1201
|
componentDidLoad() {
|
|
1122
1202
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
1203
|
+
this.setInputValue();
|
|
1123
1204
|
}
|
|
1124
1205
|
render() {
|
|
1125
|
-
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem,
|
|
1206
|
+
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, "data-slave-mode": "true", onKeyDown: event => {
|
|
1126
1207
|
if (event.key === "H" || event.key === "h")
|
|
1127
1208
|
this.changeValue(new Date());
|
|
1128
|
-
}, label: this.label,
|
|
1209
|
+
}, label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }, 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 })));
|
|
1129
1210
|
}
|
|
1130
1211
|
get _elem() { return this; }
|
|
1131
1212
|
static get watchers() { return {
|
|
@@ -1146,6 +1227,7 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1146
1227
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
1147
1228
|
this.ezStartChange = createEvent(this, "ezStartChange", 7);
|
|
1148
1229
|
this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
|
|
1230
|
+
this._focused = false;
|
|
1149
1231
|
/**
|
|
1150
1232
|
* Deixa o campo disponível ou não para uso.
|
|
1151
1233
|
*/
|
|
@@ -1160,14 +1242,34 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1160
1242
|
this.mode = "regular";
|
|
1161
1243
|
}
|
|
1162
1244
|
observeLabel() {
|
|
1163
|
-
this._textInput
|
|
1245
|
+
if (this._textInput) {
|
|
1246
|
+
this._textInput.label = this.label;
|
|
1247
|
+
}
|
|
1164
1248
|
}
|
|
1165
1249
|
observeErrorMessage() {
|
|
1166
|
-
|
|
1167
|
-
}
|
|
1168
|
-
observeValue() {
|
|
1250
|
+
var _a;
|
|
1169
1251
|
if (this._textInput) {
|
|
1170
|
-
this._textInput.
|
|
1252
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
1253
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
1254
|
+
this.setInputValue();
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
observeValue(newValue, oldValue) {
|
|
1259
|
+
if (this._textInput && newValue != oldValue) {
|
|
1260
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1261
|
+
const oldValueValidated = this.validateValue(oldValue);
|
|
1262
|
+
if ((newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime()) !== (oldValueValidated === null || oldValueValidated === void 0 ? void 0 : oldValueValidated.getTime())) {
|
|
1263
|
+
const textValue = this.getTextValue(newValueValidated) || '';
|
|
1264
|
+
const parsedDate = this.getParsedDateTime(textValue);
|
|
1265
|
+
if ((parsedDate || !this._focused) && (this._textInput.value || '') !== textValue) {
|
|
1266
|
+
this._textInput.value = textValue;
|
|
1267
|
+
this._focused = false;
|
|
1268
|
+
this.errorMessage = "";
|
|
1269
|
+
}
|
|
1270
|
+
const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
|
|
1271
|
+
this.ezChange.emit(valueEmitted);
|
|
1272
|
+
}
|
|
1171
1273
|
}
|
|
1172
1274
|
}
|
|
1173
1275
|
/**
|
|
@@ -1182,30 +1284,36 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1182
1284
|
async setBlur() {
|
|
1183
1285
|
this._textInput.setBlur();
|
|
1184
1286
|
}
|
|
1185
|
-
|
|
1287
|
+
/**
|
|
1288
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
1289
|
+
*/
|
|
1290
|
+
async isInvalid() {
|
|
1291
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
1292
|
+
}
|
|
1293
|
+
handleKeyDown(event) {
|
|
1186
1294
|
const input = this._textInput.shadowRoot.querySelector('input');
|
|
1187
|
-
if (
|
|
1295
|
+
if (event.key === "H" || event.key === "h") {
|
|
1188
1296
|
this.changeValue(new Date());
|
|
1189
1297
|
}
|
|
1190
|
-
else if (
|
|
1298
|
+
else if (event.shiftKey && event.key === "Tab") {
|
|
1191
1299
|
if (input.selectionStart > 0) {
|
|
1192
1300
|
let selectIni = input.value.lastIndexOf(" ", input.selectionStart);
|
|
1193
1301
|
if (selectIni !== -1) {
|
|
1194
1302
|
input.setSelectionRange(0, selectIni);
|
|
1195
|
-
|
|
1303
|
+
event.preventDefault();
|
|
1196
1304
|
}
|
|
1197
1305
|
}
|
|
1198
1306
|
}
|
|
1199
|
-
else if (
|
|
1307
|
+
else if (event.key === "Tab") {
|
|
1200
1308
|
if (input.value.length !== input.selectionEnd) {
|
|
1201
1309
|
let selectIni = input.value.indexOf(" ", input.selectionEnd);
|
|
1202
1310
|
selectIni = selectIni === -1 ? input.selectionEnd : selectIni + 1;
|
|
1203
1311
|
input.setSelectionRange(selectIni, input.value.length);
|
|
1204
|
-
|
|
1312
|
+
event.preventDefault();
|
|
1205
1313
|
}
|
|
1206
1314
|
}
|
|
1207
1315
|
}
|
|
1208
|
-
|
|
1316
|
+
handleFocus() {
|
|
1209
1317
|
const input = this._textInput.shadowRoot.querySelector('input');
|
|
1210
1318
|
if (input.selectionStart !== input.selectionEnd) {
|
|
1211
1319
|
let selectIni = input.value.indexOf(" ", input.selectionStart);
|
|
@@ -1213,7 +1321,7 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1213
1321
|
input.setSelectionRange(0, selectIni);
|
|
1214
1322
|
}
|
|
1215
1323
|
}
|
|
1216
|
-
|
|
1324
|
+
handleClick() {
|
|
1217
1325
|
const input = this._textInput.shadowRoot.querySelector('input');
|
|
1218
1326
|
let selectIni = input.value.lastIndexOf(" ", input.selectionEnd);
|
|
1219
1327
|
selectIni = selectIni === -1 ? 0 : selectIni + 1;
|
|
@@ -1222,37 +1330,55 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1222
1330
|
input.setSelectionRange(selectIni, selectFin);
|
|
1223
1331
|
}
|
|
1224
1332
|
changeValue(newValue) {
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
if ((
|
|
1228
|
-
this.value =
|
|
1229
|
-
this.ezChange.emit(this.value);
|
|
1333
|
+
const currentValue = this.validateValue(this.value);
|
|
1334
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1335
|
+
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
1336
|
+
this.value = newValueValidated;
|
|
1230
1337
|
}
|
|
1231
1338
|
}
|
|
1232
1339
|
showCalendar() {
|
|
1233
|
-
const top = this.
|
|
1340
|
+
const top = this.errorMessage || this.mode === "slim" ? 0 : -19;
|
|
1234
1341
|
this._calendar.fitVertical(top, this._elem.clientHeight);
|
|
1235
1342
|
this._calendar.style.visibility = 'inherit';
|
|
1236
1343
|
}
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1344
|
+
getParsedDateTime(strValue) {
|
|
1345
|
+
var _a, _b;
|
|
1346
|
+
if (strValue === void 0) {
|
|
1347
|
+
strValue = (((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "");
|
|
1348
|
+
}
|
|
1349
|
+
if (!strValue) {
|
|
1350
|
+
return;
|
|
1351
|
+
}
|
|
1352
|
+
const partsDateTime = strValue.split(" ");
|
|
1240
1353
|
const onlyDate = partsDateTime.length > 0 ? partsDateTime[0] : strValue;
|
|
1241
1354
|
const onlyTime = partsDateTime[1] ? partsDateTime[1] : "";
|
|
1242
1355
|
const parsedTime = TimeFormatter.prepareValue(onlyTime, this.showSeconds);
|
|
1243
1356
|
const strDateTime = onlyDate + (parsedTime && " " + parsedTime);
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1357
|
+
return DateUtils.strToDate(strDateTime);
|
|
1358
|
+
}
|
|
1359
|
+
handleBlur() {
|
|
1360
|
+
var _a, _b;
|
|
1361
|
+
const strValue = ((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
|
|
1362
|
+
const newValue = this.getParsedDateTime();
|
|
1363
|
+
if (newValue || !strValue) {
|
|
1364
|
+
this.errorMessage = "";
|
|
1365
|
+
const currentValue = this.validateValue(this.value);
|
|
1366
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1367
|
+
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) === (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
1368
|
+
if (newValueValidated) {
|
|
1369
|
+
this._textInput.value = this.getTextValue(newValueValidated) || '';
|
|
1370
|
+
this._focused = false;
|
|
1371
|
+
}
|
|
1372
|
+
this.ezCancelWaitingChange.emit();
|
|
1248
1373
|
}
|
|
1249
1374
|
else {
|
|
1250
|
-
this.changeValue(
|
|
1375
|
+
this.changeValue(newValueValidated);
|
|
1251
1376
|
}
|
|
1252
1377
|
}
|
|
1253
1378
|
else {
|
|
1379
|
+
this.changeValue(undefined);
|
|
1254
1380
|
this.ezCancelWaitingChange.emit();
|
|
1255
|
-
this.
|
|
1381
|
+
this.errorMessage = "O valor digitado não é uma data válida";
|
|
1256
1382
|
}
|
|
1257
1383
|
}
|
|
1258
1384
|
getTextValue(d) {
|
|
@@ -1266,14 +1392,32 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1266
1392
|
};
|
|
1267
1393
|
return d ? (new Intl.DateTimeFormat('pt-BR', this.showSeconds ? optionsSecond : options).format(d)) : undefined;
|
|
1268
1394
|
}
|
|
1269
|
-
|
|
1270
|
-
|
|
1395
|
+
validateValue(value) {
|
|
1396
|
+
return value instanceof Date && !isNaN(value.valueOf())
|
|
1397
|
+
? value
|
|
1398
|
+
: undefined;
|
|
1399
|
+
}
|
|
1400
|
+
handleInput() {
|
|
1401
|
+
const newValue = this.getParsedDateTime();
|
|
1402
|
+
const currentValue = this.validateValue(this.value);
|
|
1403
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1404
|
+
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
1405
|
+
this._focused = true;
|
|
1406
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
setInputValue() {
|
|
1410
|
+
const textValue = this.getTextValue(this.value) || '';
|
|
1411
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
1412
|
+
this._textInput.value = textValue;
|
|
1413
|
+
}
|
|
1271
1414
|
}
|
|
1272
1415
|
componentDidLoad() {
|
|
1273
1416
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
1417
|
+
this.setInputValue();
|
|
1274
1418
|
}
|
|
1275
1419
|
render() {
|
|
1276
|
-
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem,
|
|
1420
|
+
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onKeyDown: event => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), onFocus: () => this.handleFocus(), onClick: () => this.handleClick() }, 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 })));
|
|
1277
1421
|
}
|
|
1278
1422
|
get _elem() { return this; }
|
|
1279
1423
|
static get watchers() { return {
|
|
@@ -1399,9 +1543,10 @@ let EzFilterInput$1 = class extends HTMLElement$1 {
|
|
|
1399
1543
|
this._textInput.errorMessage = this.errorMessage;
|
|
1400
1544
|
}
|
|
1401
1545
|
}
|
|
1402
|
-
observeValue() {
|
|
1403
|
-
if (this._textInput) {
|
|
1404
|
-
this._textInput.value =
|
|
1546
|
+
observeValue(newValue, oldValue) {
|
|
1547
|
+
if (this._textInput && newValue != oldValue) {
|
|
1548
|
+
this._textInput.value = newValue;
|
|
1549
|
+
this.ezChange.emit(newValue);
|
|
1405
1550
|
}
|
|
1406
1551
|
}
|
|
1407
1552
|
/**
|
|
@@ -1416,12 +1561,17 @@ let EzFilterInput$1 = class extends HTMLElement$1 {
|
|
|
1416
1561
|
async setBlur() {
|
|
1417
1562
|
this._textInput.setBlur();
|
|
1418
1563
|
}
|
|
1564
|
+
/**
|
|
1565
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
1566
|
+
*/
|
|
1567
|
+
async isInvalid() {
|
|
1568
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
1569
|
+
}
|
|
1419
1570
|
changeValue(evt) {
|
|
1420
1571
|
const newValue = evt.detail;
|
|
1421
1572
|
this.errorMessage = "";
|
|
1422
1573
|
if (newValue !== this.value) {
|
|
1423
1574
|
this.value = newValue;
|
|
1424
|
-
this.ezChange.emit(this.value);
|
|
1425
1575
|
}
|
|
1426
1576
|
}
|
|
1427
1577
|
componentDidLoad() {
|
|
@@ -2068,7 +2218,7 @@ class DataBinder {
|
|
|
2068
2218
|
case Action.NEXT_SELECTED:
|
|
2069
2219
|
case Action.PREVIOUS_SELECTED:
|
|
2070
2220
|
(_a = this._fields) === null || _a === void 0 ? void 0 : _a.forEach(field => {
|
|
2071
|
-
this.updateValue(field.fieldName, field.field);
|
|
2221
|
+
this.updateValue(field.fieldName, field.field, action.type === Action.EDITION_CANCELED);
|
|
2072
2222
|
});
|
|
2073
2223
|
break;
|
|
2074
2224
|
}
|
|
@@ -2086,15 +2236,24 @@ class DataBinder {
|
|
|
2086
2236
|
onDisconnectedCallback() {
|
|
2087
2237
|
this._dataUnit.unsubscribe(this.onDataUnitEvent);
|
|
2088
2238
|
}
|
|
2089
|
-
updateValue(fieldName, field) {
|
|
2239
|
+
updateValue(fieldName, field, actionCanceled = false) {
|
|
2240
|
+
var _a;
|
|
2090
2241
|
field["value"] = this._dataUnit.getFieldValue(fieldName);
|
|
2242
|
+
/**
|
|
2243
|
+
* FIXME: Campo já salvo com undefined, ao inserir valor inválido e cancelar,
|
|
2244
|
+
* o campo não é limpo e atualizado automaticamente, pois o value não mudou,
|
|
2245
|
+
* assim, não dispara o Watch do value, que é o responsável por limpar o errorMessage.
|
|
2246
|
+
*/
|
|
2247
|
+
if (actionCanceled && ((_a = field["errorMessage"]) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
2248
|
+
field["errorMessage"] = "";
|
|
2249
|
+
}
|
|
2091
2250
|
}
|
|
2092
2251
|
updateBind(fieldName, field) {
|
|
2093
2252
|
const oldBind = this._fields.get(fieldName);
|
|
2094
2253
|
if (oldBind) {
|
|
2095
2254
|
oldBind.destroy();
|
|
2096
2255
|
}
|
|
2097
|
-
|
|
2256
|
+
this.updateValue(fieldName, field);
|
|
2098
2257
|
this._fields.set(fieldName, Bind.create(fieldName, field, (fieldName, waitingChange) => this.changeStarted(fieldName, waitingChange), (fieldName) => this.cancelWaitingChange(fieldName), (fieldName, newValue) => this.setFieldValue(fieldName, newValue)));
|
|
2099
2258
|
this.bindSearchOptionsLoader(fieldName, field);
|
|
2100
2259
|
this.applyEzUploadContext(fieldName, field);
|
|
@@ -2226,25 +2385,58 @@ let EzForm$1 = class extends HTMLElement$1 {
|
|
|
2226
2385
|
return Promise.resolve();
|
|
2227
2386
|
}
|
|
2228
2387
|
validate() {
|
|
2229
|
-
return new Promise((accept, reject) => {
|
|
2388
|
+
return new Promise(async (accept, reject) => {
|
|
2230
2389
|
const metadata = selectFormMetadata(this._store.getState());
|
|
2231
2390
|
const requiredFields = this._staticFields
|
|
2232
2391
|
.filter(f => f.dataset.required)
|
|
2233
2392
|
.map(f => f.dataset.fieldName)
|
|
2234
2393
|
.concat(metadata.getRequiredFields());
|
|
2394
|
+
let isReject = false;
|
|
2235
2395
|
const records = this.dataUnit.getModifiedRecords();
|
|
2236
2396
|
for (let i = 0; i < records.length; i++) {
|
|
2237
2397
|
if (!this.validateRequired(requiredFields, records[i])) {
|
|
2238
|
-
|
|
2398
|
+
isReject = true;
|
|
2239
2399
|
break;
|
|
2240
2400
|
}
|
|
2241
2401
|
}
|
|
2242
|
-
|
|
2402
|
+
if (!isReject) {
|
|
2403
|
+
const validateError = await this.validateError();
|
|
2404
|
+
if (!validateError) {
|
|
2405
|
+
isReject = true;
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
if (isReject) {
|
|
2409
|
+
reject();
|
|
2410
|
+
}
|
|
2411
|
+
else {
|
|
2412
|
+
accept();
|
|
2413
|
+
}
|
|
2243
2414
|
});
|
|
2244
2415
|
}
|
|
2245
2416
|
observeConfig() {
|
|
2246
2417
|
this.processMetadata();
|
|
2247
2418
|
}
|
|
2419
|
+
async validateError() {
|
|
2420
|
+
var _a;
|
|
2421
|
+
const invalidFields = [];
|
|
2422
|
+
const dataFields = (_a = this._element) === null || _a === void 0 ? void 0 : _a.querySelectorAll("[data-field-name]");
|
|
2423
|
+
if (dataFields && dataFields.length > 0) {
|
|
2424
|
+
for (let i = 0; i < dataFields.length; i++) {
|
|
2425
|
+
const fieldElem = dataFields[i];
|
|
2426
|
+
if (fieldElem && fieldElem['isInvalid']) {
|
|
2427
|
+
const hasError = await fieldElem['isInvalid']();
|
|
2428
|
+
if (hasError && fieldElem['dataset']) {
|
|
2429
|
+
invalidFields.push(fieldElem['dataset'].fieldName);
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
const isValid = invalidFields.length === 0;
|
|
2435
|
+
if (!isValid) {
|
|
2436
|
+
ApplicationUtils.info("Há pelo menos um campo com conteúdo inválido.");
|
|
2437
|
+
}
|
|
2438
|
+
return isValid;
|
|
2439
|
+
}
|
|
2248
2440
|
validateRequired(requiredFields, record) {
|
|
2249
2441
|
const invalidFields = [];
|
|
2250
2442
|
requiredFields.forEach(field => {
|
|
@@ -2257,13 +2449,16 @@ let EzForm$1 = class extends HTMLElement$1 {
|
|
|
2257
2449
|
* na aba, isso será tratado no card: https://sankhya.atlassian.net/browse/SKA-44182
|
|
2258
2450
|
*/
|
|
2259
2451
|
if (fieldElem) {
|
|
2452
|
+
/**
|
|
2453
|
+
* Devido o StencilJS não possuir Getter e Setter, para casos que o Watch não for chamado,
|
|
2454
|
+
* é necessário limpar a propriedade antes de setar o valor novamente, para que o Watch seja disparado novamente,
|
|
2455
|
+
* solução necessária para controlar componentes com herança (Exemplo: EzSearch -> EzComboBox -> EzTextInput).
|
|
2456
|
+
*/
|
|
2457
|
+
fieldElem["errorMessage"] = "";
|
|
2260
2458
|
if (value === null || value === undefined || value === "") {
|
|
2261
2459
|
invalidFields.push(field);
|
|
2262
2460
|
fieldElem["errorMessage"] = "Essa informação é obrigatória";
|
|
2263
2461
|
}
|
|
2264
|
-
else {
|
|
2265
|
-
fieldElem["errorMessage"] = "";
|
|
2266
|
-
}
|
|
2267
2462
|
}
|
|
2268
2463
|
});
|
|
2269
2464
|
const isValid = invalidFields.length === 0;
|
|
@@ -112638,7 +112833,7 @@ class AgGridController {
|
|
|
112638
112833
|
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
112639
112834
|
}
|
|
112640
112835
|
const colDef = this._gridOptions.columnApi.getAllColumns();
|
|
112641
|
-
return colDef.map(c => {
|
|
112836
|
+
return colDef.filter(c => c.getColId() !== "checkBoxColumn").map(c => {
|
|
112642
112837
|
const def = c.getColDef();
|
|
112643
112838
|
const colDef = { name: def.field, label: def.headerName };
|
|
112644
112839
|
this.conditionalSet(colDef, "sortable", def.sortable);
|
|
@@ -113135,6 +113330,14 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
113135
113330
|
async hasPreviousRecord() {
|
|
113136
113331
|
return Promise.resolve(this._gridController.hasPreviousRecord());
|
|
113137
113332
|
}
|
|
113333
|
+
/**
|
|
113334
|
+
* Método para abrir a configuração da grid.
|
|
113335
|
+
*/
|
|
113336
|
+
async openGridConfig() {
|
|
113337
|
+
this._gridConfig.columns = this._gridController.getColumnsState().filter(c => c.name);
|
|
113338
|
+
this._gridConfig.selectedTab = "Colunas";
|
|
113339
|
+
this._popUpGridConfig = true;
|
|
113340
|
+
}
|
|
113138
113341
|
componentWillLoad() {
|
|
113139
113342
|
if (this.dataUnit) {
|
|
113140
113343
|
this._dataUnitBridge = new DataUnitBridge(this._gridController, this.dataUnit);
|
|
@@ -113252,11 +113455,6 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
113252
113455
|
closeGridConfig() {
|
|
113253
113456
|
this._popUpGridConfig = false;
|
|
113254
113457
|
}
|
|
113255
|
-
openGridConfig() {
|
|
113256
|
-
this._gridConfig.columns = this._gridController.getColumnsState().filter(c => c.name);
|
|
113257
|
-
this._gridConfig.selectedTab = "Colunas";
|
|
113258
|
-
this._popUpGridConfig = true;
|
|
113259
|
-
}
|
|
113260
113458
|
render() {
|
|
113261
113459
|
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() }))));
|
|
113262
113460
|
}
|
|
@@ -113914,6 +114112,7 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
113914
114112
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
113915
114113
|
this.ezStartChange = createEvent(this, "ezStartChange", 7);
|
|
113916
114114
|
this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
|
|
114115
|
+
this._focused = false;
|
|
113917
114116
|
/**
|
|
113918
114117
|
* Deixa o campo disponível ou não para uso.
|
|
113919
114118
|
*/
|
|
@@ -113935,66 +114134,109 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
113935
114134
|
async setBlur() {
|
|
113936
114135
|
this._textInput.setBlur();
|
|
113937
114136
|
}
|
|
114137
|
+
/**
|
|
114138
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
114139
|
+
*/
|
|
114140
|
+
async isInvalid() {
|
|
114141
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
114142
|
+
}
|
|
113938
114143
|
observeLabel() {
|
|
113939
114144
|
if (this._textInput) {
|
|
113940
114145
|
this._textInput.label = this.label;
|
|
113941
114146
|
}
|
|
113942
114147
|
}
|
|
113943
114148
|
observeErrorMessage() {
|
|
114149
|
+
var _a;
|
|
113944
114150
|
if (this._textInput) {
|
|
113945
114151
|
this._textInput.errorMessage = this.errorMessage;
|
|
114152
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
114153
|
+
this.setInputValue();
|
|
114154
|
+
}
|
|
113946
114155
|
}
|
|
113947
114156
|
}
|
|
113948
|
-
observeValue() {
|
|
113949
|
-
if (this._textInput) {
|
|
113950
|
-
|
|
114157
|
+
observeValue(newValue, oldValue) {
|
|
114158
|
+
if (this._textInput && newValue != oldValue) {
|
|
114159
|
+
const newValueValidated = this.validateValue(newValue);
|
|
114160
|
+
const oldValueValidated = this.validateValue(oldValue);
|
|
114161
|
+
if (newValueValidated != oldValueValidated) {
|
|
114162
|
+
const textValue = this.getTextValue(newValueValidated) || '';
|
|
114163
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
114164
|
+
const parsedNumber = this.getParsedNumber(textValue);
|
|
114165
|
+
if (parsedNumber !== undefined || !this._focused) {
|
|
114166
|
+
this._textInput.value = textValue;
|
|
114167
|
+
this._focused = false;
|
|
114168
|
+
this.errorMessage = "";
|
|
114169
|
+
}
|
|
114170
|
+
}
|
|
114171
|
+
const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
|
|
114172
|
+
this.ezChange.emit(valueEmitted);
|
|
114173
|
+
}
|
|
114174
|
+
}
|
|
114175
|
+
}
|
|
114176
|
+
validateValue(value) {
|
|
114177
|
+
return isNaN(value) || value === undefined ? null : value;
|
|
114178
|
+
}
|
|
114179
|
+
getTextValue(value) {
|
|
114180
|
+
if (value != undefined) {
|
|
114181
|
+
return this.precision > 0 ? NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
|
|
113951
114182
|
}
|
|
114183
|
+
return undefined;
|
|
113952
114184
|
}
|
|
113953
114185
|
changeValue(newValue) {
|
|
113954
114186
|
this.errorMessage = "";
|
|
113955
|
-
if (
|
|
113956
|
-
this.value = newValue;
|
|
113957
|
-
this.ezChange.emit(this.value);
|
|
113958
|
-
return true;
|
|
114187
|
+
if (this.value != newValue) {
|
|
114188
|
+
this.value = newValue === undefined ? null : newValue;
|
|
113959
114189
|
}
|
|
113960
114190
|
else {
|
|
113961
|
-
this.
|
|
114191
|
+
this.ezCancelWaitingChange.emit();
|
|
113962
114192
|
}
|
|
113963
|
-
return false;
|
|
113964
114193
|
}
|
|
113965
|
-
|
|
113966
|
-
|
|
114194
|
+
setError(msg) {
|
|
114195
|
+
this.value = null;
|
|
114196
|
+
this.errorMessage = msg;
|
|
114197
|
+
this.ezCancelWaitingChange.emit();
|
|
114198
|
+
}
|
|
114199
|
+
handleBlur() {
|
|
114200
|
+
const parsedNumber = this.getParsedNumber();
|
|
113967
114201
|
if (parsedNumber !== undefined && isNaN(parsedNumber)) {
|
|
113968
|
-
this.
|
|
113969
|
-
this.errorMessage = "O valor digitado não é um número válido";
|
|
114202
|
+
this.setError("O valor digitado não é um número válido");
|
|
113970
114203
|
}
|
|
113971
114204
|
else {
|
|
113972
114205
|
try {
|
|
113973
|
-
|
|
113974
|
-
this.ezCancelWaitingChange.emit();
|
|
113975
|
-
}
|
|
114206
|
+
this.changeValue(parsedNumber);
|
|
113976
114207
|
}
|
|
113977
114208
|
catch (e) {
|
|
113978
|
-
this.
|
|
113979
|
-
this.errorMessage = e.message;
|
|
114209
|
+
this.setError(e.message);
|
|
113980
114210
|
return;
|
|
113981
114211
|
}
|
|
113982
114212
|
}
|
|
113983
114213
|
}
|
|
113984
|
-
|
|
113985
|
-
|
|
113986
|
-
|
|
114214
|
+
handleInput() {
|
|
114215
|
+
const parsedNumber = this.getParsedNumber();
|
|
114216
|
+
if (parsedNumber !== this.value) {
|
|
114217
|
+
this._focused = true;
|
|
114218
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
113987
114219
|
}
|
|
113988
|
-
return undefined;
|
|
113989
114220
|
}
|
|
113990
|
-
|
|
113991
|
-
|
|
114221
|
+
getParsedNumber(value) {
|
|
114222
|
+
var _a;
|
|
114223
|
+
if (value === void 0) {
|
|
114224
|
+
value = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value;
|
|
114225
|
+
}
|
|
114226
|
+
return (value === null || value === void 0 ? void 0 : value.trim()) ? NumberUtils.stringToNumber(value) : undefined;
|
|
114227
|
+
}
|
|
114228
|
+
setInputValue() {
|
|
114229
|
+
const textValue = this.getTextValue(this.value) || '';
|
|
114230
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
114231
|
+
this._textInput.value = textValue;
|
|
114232
|
+
}
|
|
113992
114233
|
}
|
|
113993
114234
|
componentDidLoad() {
|
|
113994
114235
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
114236
|
+
this.setInputValue();
|
|
113995
114237
|
}
|
|
113996
114238
|
render() {
|
|
113997
|
-
return (h("ez-text-input", { ref: elem => this._textInput = elem,
|
|
114239
|
+
return (h("ez-text-input", { ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }));
|
|
113998
114240
|
}
|
|
113999
114241
|
get _elem() { return this; }
|
|
114000
114242
|
static get watchers() { return {
|
|
@@ -114216,6 +114458,11 @@ let EzSearch$1 = class extends HTMLElement$1 {
|
|
|
114216
114458
|
*/
|
|
114217
114459
|
this.mode = "regular";
|
|
114218
114460
|
}
|
|
114461
|
+
observeErrorMessage() {
|
|
114462
|
+
if (this._comboElement) {
|
|
114463
|
+
this._comboElement.errorMessage = this.errorMessage;
|
|
114464
|
+
}
|
|
114465
|
+
}
|
|
114219
114466
|
observeValue() {
|
|
114220
114467
|
if (this._comboElement) {
|
|
114221
114468
|
this._comboElement.value = this.value;
|
|
@@ -114233,20 +114480,30 @@ let EzSearch$1 = class extends HTMLElement$1 {
|
|
|
114233
114480
|
async setBlur() {
|
|
114234
114481
|
this._comboElement.setBlur();
|
|
114235
114482
|
}
|
|
114236
|
-
|
|
114237
|
-
|
|
114238
|
-
|
|
114239
|
-
|
|
114483
|
+
/**
|
|
114484
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
114485
|
+
*/
|
|
114486
|
+
async isInvalid() {
|
|
114487
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
114488
|
+
}
|
|
114489
|
+
onComboChange(event) {
|
|
114490
|
+
event.stopPropagation();
|
|
114491
|
+
this.value = event.detail;
|
|
114492
|
+
this.ezChange.emit(event.detail);
|
|
114493
|
+
if (this.errorMessage !== this._comboElement.errorMessage) {
|
|
114494
|
+
this.errorMessage = this._comboElement.errorMessage;
|
|
114495
|
+
}
|
|
114240
114496
|
}
|
|
114241
114497
|
componentDidLoad() {
|
|
114242
114498
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._comboElement);
|
|
114243
114499
|
}
|
|
114244
114500
|
render() {
|
|
114245
|
-
return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange:
|
|
114501
|
+
return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode }));
|
|
114246
114502
|
}
|
|
114247
114503
|
;
|
|
114248
114504
|
get _elem() { return this; }
|
|
114249
114505
|
static get watchers() { return {
|
|
114506
|
+
"errorMessage": ["observeErrorMessage"],
|
|
114250
114507
|
"value": ["observeValue"]
|
|
114251
114508
|
}; }
|
|
114252
114509
|
static get style() { return ezSearchCss; }
|
|
@@ -114445,7 +114702,7 @@ let EzTabselector$1 = class extends HTMLElement$1 {
|
|
|
114445
114702
|
static get style() { return ezTabselectorCss; }
|
|
114446
114703
|
};
|
|
114447
114704
|
|
|
114448
|
-
const ezTextAreaCss = ":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--medium, 400);--text-area--color:var(--title--primary, #000);--text-area__input--background-color:var(--background--medium, #e0e0e0);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--text-area__input--background-color);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-area__input--disabled--color:var(--text--disable, #AFB6C0);--text-area__input--error--border-color:#CC2936;--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color--error, #FF0000);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;margin-top:calc(var(--space--medium, 12px) + 4px);width:100%;font-weight:var(--text-weight
|
|
114705
|
+
const ezTextAreaCss = ":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--medium, 400);--text-area--color:var(--title--primary, #000);--text-area__input--background-color:var(--background--medium, #e0e0e0);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--text-area__input--background-color);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-area__input--disabled--color:var(--text--disable, #AFB6C0);--text-area__input--error--border-color:#CC2936;--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color--error, #FF0000);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;margin-top:calc(var(--space--medium, 12px) + 4px);width:100%;font-weight:var(--text-area--font-weight);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);padding:0;background:none}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color)}.textarea{width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color)}.textarea--slim{margin-top:var(--space--small, 6px)}.textarea--slim::-webkit-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-ms-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:disabled::-webkit-input-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled:-moz-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled::-moz-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled:-ms-input-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled::placeholder{color:var(--text-area__input--disabled--color)}";
|
|
114449
114706
|
|
|
114450
114707
|
let EzTextArea$1 = class extends HTMLElement$1 {
|
|
114451
114708
|
constructor() {
|
|
@@ -114525,6 +114782,12 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114525
114782
|
async setBlur() {
|
|
114526
114783
|
this._inputElem.blur();
|
|
114527
114784
|
}
|
|
114785
|
+
/**
|
|
114786
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
114787
|
+
*/
|
|
114788
|
+
async isInvalid() {
|
|
114789
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
114790
|
+
}
|
|
114528
114791
|
//---------------------------------------------
|
|
114529
114792
|
// Private methods
|
|
114530
114793
|
//---------------------------------------------
|
|
@@ -114583,7 +114846,7 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114583
114846
|
render() {
|
|
114584
114847
|
return (h(Host, null, h("div", { class: "textarea", ref: (el) => this._container = el }, this.label && this.mode != "slim" ?
|
|
114585
114848
|
h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "textarea__label" : "textarea__label textarea__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
114586
|
-
: null, h("textarea", { onFocus: () => this.handleFocus(), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, class: this.mode
|
|
114849
|
+
: null, h("textarea", { onFocus: () => this.handleFocus(), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, class: this.mode === "slim" ? "textarea--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, onKeyDown: event => event.stopPropagation(), rows: this.rows })), this.canShowError && this.mode != "slim" &&
|
|
114587
114850
|
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
114588
114851
|
}
|
|
114589
114852
|
get _hostElement() { return this; }
|
|
@@ -114596,7 +114859,7 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114596
114859
|
static get style() { return ezTextAreaCss; }
|
|
114597
114860
|
};
|
|
114598
114861
|
|
|
114599
|
-
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);
|
|
114862
|
+
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:read-only{cursor:default}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input--slim::-webkit-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-ms-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:disabled::-webkit-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-ms-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}";
|
|
114600
114863
|
|
|
114601
114864
|
let EzTextInput$1 = class extends HTMLElement$1 {
|
|
114602
114865
|
constructor() {
|
|
@@ -114616,23 +114879,20 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114616
114879
|
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
114617
114880
|
*/
|
|
114618
114881
|
this.mode = "regular";
|
|
114619
|
-
/**
|
|
114620
|
-
* Define se o controle de change do value será controlado por um componente pai.
|
|
114621
|
-
*/
|
|
114622
|
-
this.slaveMode = false;
|
|
114623
114882
|
}
|
|
114624
114883
|
observeErrorMessage() {
|
|
114625
|
-
var _a, _b;
|
|
114626
114884
|
if (this._inputElem) {
|
|
114627
|
-
|
|
114628
|
-
|
|
114629
|
-
|
|
114630
|
-
|
|
114631
|
-
|
|
114632
|
-
|
|
114633
|
-
|
|
114634
|
-
|
|
114635
|
-
|
|
114885
|
+
this.isInvalid().then((hasError) => {
|
|
114886
|
+
var _a, _b;
|
|
114887
|
+
if (hasError) {
|
|
114888
|
+
this._inputElem.classList.add("hasError");
|
|
114889
|
+
(_a = this._messageBoxElem) === null || _a === void 0 ? void 0 : _a.classList.add("hasError");
|
|
114890
|
+
}
|
|
114891
|
+
else {
|
|
114892
|
+
this._inputElem.classList.remove("hasError");
|
|
114893
|
+
(_b = this._messageBoxElem) === null || _b === void 0 ? void 0 : _b.classList.remove("hasError");
|
|
114894
|
+
}
|
|
114895
|
+
});
|
|
114636
114896
|
}
|
|
114637
114897
|
}
|
|
114638
114898
|
observeMask() {
|
|
@@ -114651,14 +114911,16 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114651
114911
|
this._inputElem.value = this.value || "";
|
|
114652
114912
|
this.handleChange();
|
|
114653
114913
|
this.adjustFloatingLabel();
|
|
114654
|
-
if (this.
|
|
114655
|
-
|
|
114914
|
+
if (!this.isSlaveMode()) {
|
|
114915
|
+
this.errorMessage = "";
|
|
114916
|
+
this.ezChange.emit(this.value);
|
|
114656
114917
|
}
|
|
114657
|
-
this.errorMessage = "";
|
|
114658
|
-
this.ezChange.emit(this.value);
|
|
114659
114918
|
}
|
|
114660
114919
|
}
|
|
114661
114920
|
}
|
|
114921
|
+
//---------------------------------------------
|
|
114922
|
+
// Private methods
|
|
114923
|
+
//---------------------------------------------
|
|
114662
114924
|
adjustFloatingLabel() {
|
|
114663
114925
|
if (this.label && this._labelElem) {
|
|
114664
114926
|
if (this._inputElem && !this._inputElem.classList.contains("input--with--label")) {
|
|
@@ -114681,6 +114943,10 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114681
114943
|
isFocused() {
|
|
114682
114944
|
return this._hostElement.shadowRoot.activeElement !== null;
|
|
114683
114945
|
}
|
|
114946
|
+
isSlaveMode() {
|
|
114947
|
+
var _a, _b;
|
|
114948
|
+
return ((_b = (_a = this._hostElement) === null || _a === void 0 ? void 0 : _a.dataset) === null || _b === void 0 ? void 0 : _b.slaveMode) === "true";
|
|
114949
|
+
}
|
|
114684
114950
|
adjustColorContentSlot(color = "") {
|
|
114685
114951
|
if (this._contentLeftSlot) {
|
|
114686
114952
|
this._contentLeftSlot.style.color = color;
|
|
@@ -114701,6 +114967,12 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114701
114967
|
async setBlur() {
|
|
114702
114968
|
this._inputElem.blur();
|
|
114703
114969
|
}
|
|
114970
|
+
/**
|
|
114971
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
114972
|
+
*/
|
|
114973
|
+
async isInvalid() {
|
|
114974
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
114975
|
+
}
|
|
114704
114976
|
//---------------------------------------------
|
|
114705
114977
|
// Event handlers
|
|
114706
114978
|
//---------------------------------------------
|
|
@@ -114725,7 +114997,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114725
114997
|
return true;
|
|
114726
114998
|
}
|
|
114727
114999
|
controlChangeValue() {
|
|
114728
|
-
if ((this.value || '') !== this._inputElem.value) {
|
|
115000
|
+
if (this._inputElem && (this.value || '') !== this._inputElem.value) {
|
|
114729
115001
|
this.value = this._inputElem.value;
|
|
114730
115002
|
}
|
|
114731
115003
|
}
|
|
@@ -114808,7 +115080,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114808
115080
|
render() {
|
|
114809
115081
|
return (h(Host, null, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
114810
115082
|
h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
114811
|
-
: null, h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode
|
|
115083
|
+
: null, h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
114812
115084
|
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
114813
115085
|
}
|
|
114814
115086
|
get _hostElement() { return this; }
|
|
@@ -114835,7 +115107,7 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114835
115107
|
*/
|
|
114836
115108
|
this.enabled = true;
|
|
114837
115109
|
/**
|
|
114838
|
-
* Define se o componente irá ou não considerar os segundos
|
|
115110
|
+
* Define se o componente irá ou não considerar os segundos.
|
|
114839
115111
|
*/
|
|
114840
115112
|
this.showSeconds = false;
|
|
114841
115113
|
/**
|
|
@@ -114843,6 +115115,18 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114843
115115
|
*/
|
|
114844
115116
|
this.mode = "regular";
|
|
114845
115117
|
}
|
|
115118
|
+
observeErrorMessage() {
|
|
115119
|
+
var _a;
|
|
115120
|
+
if (this._textInput) {
|
|
115121
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
115122
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
115123
|
+
this.prepareValue(this._viewValue);
|
|
115124
|
+
if ((this._textInput.value || '') !== this._viewValue) {
|
|
115125
|
+
this._textInput.value = this._viewValue;
|
|
115126
|
+
}
|
|
115127
|
+
}
|
|
115128
|
+
}
|
|
115129
|
+
}
|
|
114846
115130
|
observeShowSeconds() {
|
|
114847
115131
|
if (this.showSeconds) {
|
|
114848
115132
|
this.prepareMask("##:##:##");
|
|
@@ -114851,9 +115135,23 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114851
115135
|
this.prepareMask("##:##");
|
|
114852
115136
|
}
|
|
114853
115137
|
}
|
|
114854
|
-
observeValue() {
|
|
114855
|
-
if (
|
|
114856
|
-
|
|
115138
|
+
observeValue(newValue, oldValue) {
|
|
115139
|
+
if (this._textInput && newValue != oldValue) {
|
|
115140
|
+
let newValueValidated = this.validateValue(newValue);
|
|
115141
|
+
const oldValueValidated = this.validateValue(oldValue);
|
|
115142
|
+
if (newValueValidated != oldValueValidated) {
|
|
115143
|
+
this._viewValue = newValueValidated == undefined ? "" : newValueValidated.toString();
|
|
115144
|
+
this.prepareValue(this._viewValue);
|
|
115145
|
+
if (this._viewValue && !TimeFormatter.validateTime(this._viewValue, this.showSeconds)) {
|
|
115146
|
+
this.setError("Favor inserir um horário válido.");
|
|
115147
|
+
newValueValidated = undefined;
|
|
115148
|
+
}
|
|
115149
|
+
else {
|
|
115150
|
+
this.setError("");
|
|
115151
|
+
}
|
|
115152
|
+
const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
|
|
115153
|
+
this.ezChange.emit(valueEmitted);
|
|
115154
|
+
}
|
|
114857
115155
|
}
|
|
114858
115156
|
}
|
|
114859
115157
|
//---------------------------------------------
|
|
@@ -114867,79 +115165,88 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114867
115165
|
this._maskFormatter.mask = mask;
|
|
114868
115166
|
}
|
|
114869
115167
|
}
|
|
115168
|
+
validateValue(value) {
|
|
115169
|
+
return isNaN(value) || value === undefined ? null : value;
|
|
115170
|
+
}
|
|
115171
|
+
setError(msg) {
|
|
115172
|
+
this.errorMessage = msg;
|
|
115173
|
+
if (this._textInput && (msg === null || msg === void 0 ? void 0 : msg.trim())) {
|
|
115174
|
+
this.ezCancelWaitingChange.emit();
|
|
115175
|
+
}
|
|
115176
|
+
}
|
|
114870
115177
|
//---------------------------------------------
|
|
114871
115178
|
// Public methods
|
|
114872
115179
|
//---------------------------------------------
|
|
115180
|
+
getViewValue() {
|
|
115181
|
+
return this._viewValue;
|
|
115182
|
+
}
|
|
115183
|
+
prepareValue(value) {
|
|
115184
|
+
try {
|
|
115185
|
+
this._viewValue = TimeFormatter.prepareValue(value, this.showSeconds);
|
|
115186
|
+
if (this._textInput && this._textInput.value !== this._viewValue) {
|
|
115187
|
+
this._textInput.value = this._viewValue;
|
|
115188
|
+
}
|
|
115189
|
+
}
|
|
115190
|
+
catch (e) {
|
|
115191
|
+
this.setError(e.message);
|
|
115192
|
+
}
|
|
115193
|
+
}
|
|
114873
115194
|
/**
|
|
114874
115195
|
* Faz o foco no componente de input
|
|
114875
115196
|
*/
|
|
114876
115197
|
async setFocus() {
|
|
114877
|
-
this.
|
|
115198
|
+
this._textInput.setFocus();
|
|
114878
115199
|
}
|
|
114879
115200
|
/**
|
|
114880
115201
|
* Remove o foco no componente de input
|
|
114881
115202
|
*/
|
|
114882
115203
|
async setBlur() {
|
|
114883
|
-
this.
|
|
115204
|
+
this._textInput.setBlur();
|
|
115205
|
+
}
|
|
115206
|
+
/**
|
|
115207
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
115208
|
+
*/
|
|
115209
|
+
async isInvalid() {
|
|
115210
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
114884
115211
|
}
|
|
114885
115212
|
//---------------------------------------------
|
|
114886
115213
|
// Event handlers
|
|
114887
115214
|
//---------------------------------------------
|
|
114888
|
-
|
|
114889
|
-
this.
|
|
114890
|
-
|
|
114891
|
-
|
|
114892
|
-
this.
|
|
114893
|
-
this.ezCancelWaitingChange.emit();
|
|
114894
|
-
this.errorMessage = "Favor inserir um horário válido.";
|
|
114895
|
-
}
|
|
114896
|
-
else {
|
|
114897
|
-
if (this.viewValue === this._oldViewValue) {
|
|
114898
|
-
this.ezCancelWaitingChange.emit();
|
|
114899
|
-
return;
|
|
114900
|
-
}
|
|
114901
|
-
this._oldViewValue = this.viewValue;
|
|
114902
|
-
if (this.viewValue === "00:00" && this.value == undefined) {
|
|
114903
|
-
this.value = 0;
|
|
114904
|
-
}
|
|
114905
|
-
this.ezChange.emit(this.value);
|
|
115215
|
+
handleBlur() {
|
|
115216
|
+
if (this._textInput) {
|
|
115217
|
+
this._viewValue = this._textInput.value;
|
|
115218
|
+
this.prepareValue(this._viewValue);
|
|
115219
|
+
this.value = NumberUtils.stringToNumber(this._viewValue.replace(/\D/g, ""));
|
|
114906
115220
|
}
|
|
114907
115221
|
}
|
|
114908
|
-
|
|
114909
|
-
|
|
114910
|
-
|
|
114911
|
-
|
|
114912
|
-
catch (e) {
|
|
114913
|
-
this.errorMessage = e.message;
|
|
115222
|
+
handleInput() {
|
|
115223
|
+
const parsedNumber = NumberUtils.stringToNumber(this._textInput.value.replace(/\D/g, ""));
|
|
115224
|
+
if (parsedNumber !== this.value) {
|
|
115225
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
114914
115226
|
}
|
|
114915
115227
|
}
|
|
114916
|
-
handleChange() {
|
|
114917
|
-
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
114918
|
-
this.viewValue = this._inputElem.value;
|
|
114919
|
-
this.value = NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
|
|
114920
|
-
}
|
|
114921
115228
|
//---------------------------------------------
|
|
114922
115229
|
// Lifecycle web component
|
|
114923
115230
|
//---------------------------------------------
|
|
114924
115231
|
componentDidLoad() {
|
|
114925
|
-
this.
|
|
114926
|
-
CSSVarsUtils.applyVarsTextInput(this._elem, this._inputElem);
|
|
115232
|
+
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
114927
115233
|
}
|
|
114928
115234
|
componentWillLoad() {
|
|
114929
115235
|
this.observeShowSeconds();
|
|
114930
115236
|
if (this.value) {
|
|
114931
115237
|
this.prepareValue(this.value.toString());
|
|
114932
115238
|
}
|
|
114933
|
-
else if (this.
|
|
114934
|
-
this.prepareValue(this.
|
|
115239
|
+
else if (this._viewValue) {
|
|
115240
|
+
this.prepareValue(this._viewValue);
|
|
114935
115241
|
}
|
|
114936
115242
|
}
|
|
114937
115243
|
render() {
|
|
114938
|
-
return (h(Host, null, h("ez-text-input", { ref: (el) => this.
|
|
115244
|
+
return (h(Host, null, h("ez-text-input", { ref: (el) => this._textInput = el, "data-slave-mode": "true", value: this._viewValue, enabled: this.enabled, label: this.label, restrict: "0123456789:", onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), errorMessage: this.errorMessage, mode: this.mode }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
114939
115245
|
}
|
|
114940
115246
|
static get assetsDirs() { return ["../assets"]; }
|
|
114941
115247
|
get _elem() { return this; }
|
|
114942
115248
|
static get watchers() { return {
|
|
115249
|
+
"errorMessage": ["observeErrorMessage"],
|
|
114943
115250
|
"showSeconds": ["observeShowSeconds"],
|
|
114944
115251
|
"value": ["observeValue"]
|
|
114945
115252
|
}; }
|
|
@@ -116040,8 +116347,8 @@ const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size"
|
|
|
116040
116347
|
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]}]);
|
|
116041
116348
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]);
|
|
116042
116349
|
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]}]);
|
|
116043
|
-
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]
|
|
116044
|
-
const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"
|
|
116350
|
+
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]}]);
|
|
116351
|
+
const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513]}]);
|
|
116045
116352
|
const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"]}]);
|
|
116046
116353
|
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]}]);
|
|
116047
116354
|
const EzViewStack = /*@__PURE__*/proxyCustomElement(EzViewStack$1, [0,"ez-view-stack"]);
|