@sankhyalabs/ezui 1.1.159 → 1.1.161
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 +63 -28
- 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/{grid-config.cjs.entry.js → ez-grid-config.cjs.entry.js} +6 -6
- package/dist/cjs/ez-grid.cjs.entry.js +16 -9
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +69 -25
- package/dist/cjs/ez-search.cjs.entry.js +20 -5
- package/dist/cjs/{select-box.cjs.entry.js → ez-select-box.cjs.entry.js} +3 -3
- 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/collection-manifest.json +2 -2
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +10 -4
- 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 +7 -3
- package/dist/collection/components/ez-grid/ez-grid.css +4 -0
- package/dist/collection/components/ez-grid/ez-grid.js +21 -14
- package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.css → ez-grid-config/ez-grid-config.css} +46 -20
- package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.js → ez-grid-config/ez-grid-config.js} +12 -12
- package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.css → ez-select-box/ez-select-box.css} +3 -4
- package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.js → ez-select-box/ez-select-box.js} +3 -3
- package/dist/collection/components/ez-list/ez-list.css +84 -46
- package/dist/collection/components/ez-modal/ez-modal.css +2 -2
- 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.d.ts +12 -12
- package/dist/custom-elements/index.js +1121 -810
- package/dist/esm/ez-combo-box.entry.js +63 -28
- 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/{grid-config.entry.js → ez-grid-config.entry.js} +6 -6
- package/dist/esm/ez-grid.entry.js +16 -9
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +69 -25
- package/dist/esm/ez-search.entry.js +20 -5
- package/dist/esm/{select-box.entry.js → ez-select-box.entry.js} +3 -3
- 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-1fecaeb8.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-8c1b9fe0.entry.js +1 -0
- package/dist/ezui/{p-be87ac5e.entry.js → p-8d73594f.entry.js} +1 -1
- package/dist/ezui/p-988ff301.entry.js +1 -0
- package/dist/ezui/p-cf56d3e8.entry.js +1 -0
- package/dist/ezui/{p-727a39e5.entry.js → p-fd6f3bf9.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/controller/EzGridController.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +9 -6
- package/dist/types/components/ez-grid/subcomponents/{gridconfig/grid-config.d.ts → ez-grid-config/ez-grid-config.d.ts} +4 -4
- package/dist/types/components/ez-grid/subcomponents/{select-box/select-box.d.ts → ez-select-box/ez-select-box.d.ts} +0 -0
- 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 +84 -61
- package/package.json +1 -1
- package/react/components.d.ts +2 -2
- package/react/components.js +2 -2
- package/react/components.js.map +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-bea6f8a6.entry.js +0 -1
- package/dist/ezui/p-c2de757f.entry.js +0 -1
- package/dist/ezui/p-ec21ecce.entry.js +0 -1
- package/dist/ezui/p-ecee9d8d.entry.js +0 -1
- package/dist/ezui/p-fc9b9487.entry.js +0 -1
|
@@ -14,23 +14,20 @@ export class EzTextInput {
|
|
|
14
14
|
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
15
15
|
*/
|
|
16
16
|
this.mode = "regular";
|
|
17
|
-
/**
|
|
18
|
-
* Define se o controle de change do value será controlado por um componente pai.
|
|
19
|
-
*/
|
|
20
|
-
this.slaveMode = false;
|
|
21
17
|
}
|
|
22
18
|
observeErrorMessage() {
|
|
23
|
-
var _a, _b;
|
|
24
19
|
if (this._inputElem) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
this.isInvalid().then((hasError) => {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
if (hasError) {
|
|
23
|
+
this._inputElem.classList.add("hasError");
|
|
24
|
+
(_a = this._messageBoxElem) === null || _a === void 0 ? void 0 : _a.classList.add("hasError");
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
this._inputElem.classList.remove("hasError");
|
|
28
|
+
(_b = this._messageBoxElem) === null || _b === void 0 ? void 0 : _b.classList.remove("hasError");
|
|
29
|
+
}
|
|
30
|
+
});
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
33
|
observeMask() {
|
|
@@ -49,14 +46,16 @@ export class EzTextInput {
|
|
|
49
46
|
this._inputElem.value = this.value || "";
|
|
50
47
|
this.handleChange();
|
|
51
48
|
this.adjustFloatingLabel();
|
|
52
|
-
if (this.
|
|
53
|
-
|
|
49
|
+
if (!this.isSlaveMode()) {
|
|
50
|
+
this.errorMessage = "";
|
|
51
|
+
this.ezChange.emit(this.value);
|
|
54
52
|
}
|
|
55
|
-
this.errorMessage = "";
|
|
56
|
-
this.ezChange.emit(this.value);
|
|
57
53
|
}
|
|
58
54
|
}
|
|
59
55
|
}
|
|
56
|
+
//---------------------------------------------
|
|
57
|
+
// Private methods
|
|
58
|
+
//---------------------------------------------
|
|
60
59
|
adjustFloatingLabel() {
|
|
61
60
|
if (this.label && this._labelElem) {
|
|
62
61
|
if (this._inputElem && !this._inputElem.classList.contains("input--with--label")) {
|
|
@@ -79,6 +78,10 @@ export class EzTextInput {
|
|
|
79
78
|
isFocused() {
|
|
80
79
|
return this._hostElement.shadowRoot.activeElement !== null;
|
|
81
80
|
}
|
|
81
|
+
isSlaveMode() {
|
|
82
|
+
var _a, _b;
|
|
83
|
+
return ((_b = (_a = this._hostElement) === null || _a === void 0 ? void 0 : _a.dataset) === null || _b === void 0 ? void 0 : _b.slaveMode) === "true";
|
|
84
|
+
}
|
|
82
85
|
adjustColorContentSlot(color = "") {
|
|
83
86
|
if (this._contentLeftSlot) {
|
|
84
87
|
this._contentLeftSlot.style.color = color;
|
|
@@ -99,6 +102,12 @@ export class EzTextInput {
|
|
|
99
102
|
async setBlur() {
|
|
100
103
|
this._inputElem.blur();
|
|
101
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
107
|
+
*/
|
|
108
|
+
async isInvalid() {
|
|
109
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
110
|
+
}
|
|
102
111
|
//---------------------------------------------
|
|
103
112
|
// Event handlers
|
|
104
113
|
//---------------------------------------------
|
|
@@ -123,7 +132,7 @@ export class EzTextInput {
|
|
|
123
132
|
return true;
|
|
124
133
|
}
|
|
125
134
|
controlChangeValue() {
|
|
126
|
-
if ((this.value || '') !== this._inputElem.value) {
|
|
135
|
+
if (this._inputElem && (this.value || '') !== this._inputElem.value) {
|
|
127
136
|
this.value = this._inputElem.value;
|
|
128
137
|
}
|
|
129
138
|
}
|
|
@@ -209,7 +218,7 @@ export class EzTextInput {
|
|
|
209
218
|
this.label && this.mode != "slim" ?
|
|
210
219
|
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)
|
|
211
220
|
: null,
|
|
212
|
-
h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode
|
|
221
|
+
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(); } }),
|
|
213
222
|
h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
|
|
214
223
|
this.canShowError && this.mode != "slim" &&
|
|
215
224
|
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
@@ -378,24 +387,6 @@ export class EzTextInput {
|
|
|
378
387
|
"attribute": "mode",
|
|
379
388
|
"reflect": true,
|
|
380
389
|
"defaultValue": "\"regular\""
|
|
381
|
-
},
|
|
382
|
-
"slaveMode": {
|
|
383
|
-
"type": "boolean",
|
|
384
|
-
"mutable": false,
|
|
385
|
-
"complexType": {
|
|
386
|
-
"original": "boolean",
|
|
387
|
-
"resolved": "boolean",
|
|
388
|
-
"references": {}
|
|
389
|
-
},
|
|
390
|
-
"required": false,
|
|
391
|
-
"optional": false,
|
|
392
|
-
"docs": {
|
|
393
|
-
"tags": [],
|
|
394
|
-
"text": "Define se o controle de change do value ser\u00E1 controlado por um componente pai."
|
|
395
|
-
},
|
|
396
|
-
"attribute": "slave-mode",
|
|
397
|
-
"reflect": true,
|
|
398
|
-
"defaultValue": "false"
|
|
399
390
|
}
|
|
400
391
|
}; }
|
|
401
392
|
static get events() { return [{
|
|
@@ -446,6 +437,22 @@ export class EzTextInput {
|
|
|
446
437
|
"text": "Remove o foco no componente de input",
|
|
447
438
|
"tags": []
|
|
448
439
|
}
|
|
440
|
+
},
|
|
441
|
+
"isInvalid": {
|
|
442
|
+
"complexType": {
|
|
443
|
+
"signature": "() => Promise<boolean>",
|
|
444
|
+
"parameters": [],
|
|
445
|
+
"references": {
|
|
446
|
+
"Promise": {
|
|
447
|
+
"location": "global"
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
"return": "Promise<boolean>"
|
|
451
|
+
},
|
|
452
|
+
"docs": {
|
|
453
|
+
"text": "Retorna informando se o campo est\u00E1 inv\u00E1lido (true | false)",
|
|
454
|
+
"tags": []
|
|
455
|
+
}
|
|
449
456
|
}
|
|
450
457
|
}; }
|
|
451
458
|
static get elementRef() { return "_hostElement"; }
|
|
@@ -8,7 +8,7 @@ export class EzTimeInput {
|
|
|
8
8
|
*/
|
|
9
9
|
this.enabled = true;
|
|
10
10
|
/**
|
|
11
|
-
* Define se o componente irá ou não considerar os segundos
|
|
11
|
+
* Define se o componente irá ou não considerar os segundos.
|
|
12
12
|
*/
|
|
13
13
|
this.showSeconds = false;
|
|
14
14
|
/**
|
|
@@ -16,6 +16,18 @@ export class EzTimeInput {
|
|
|
16
16
|
*/
|
|
17
17
|
this.mode = "regular";
|
|
18
18
|
}
|
|
19
|
+
observeErrorMessage() {
|
|
20
|
+
var _a;
|
|
21
|
+
if (this._textInput) {
|
|
22
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
23
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
24
|
+
this.prepareValue(this._viewValue);
|
|
25
|
+
if ((this._textInput.value || '') !== this._viewValue) {
|
|
26
|
+
this._textInput.value = this._viewValue;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
19
31
|
observeShowSeconds() {
|
|
20
32
|
if (this.showSeconds) {
|
|
21
33
|
this.prepareMask("##:##:##");
|
|
@@ -24,9 +36,23 @@ export class EzTimeInput {
|
|
|
24
36
|
this.prepareMask("##:##");
|
|
25
37
|
}
|
|
26
38
|
}
|
|
27
|
-
observeValue() {
|
|
28
|
-
if (
|
|
29
|
-
|
|
39
|
+
observeValue(newValue, oldValue) {
|
|
40
|
+
if (this._textInput && newValue != oldValue) {
|
|
41
|
+
let newValueValidated = this.validateValue(newValue);
|
|
42
|
+
const oldValueValidated = this.validateValue(oldValue);
|
|
43
|
+
if (newValueValidated != oldValueValidated) {
|
|
44
|
+
this._viewValue = newValueValidated == undefined ? "" : newValueValidated.toString();
|
|
45
|
+
this.prepareValue(this._viewValue);
|
|
46
|
+
if (this._viewValue && !TimeFormatter.validateTime(this._viewValue, this.showSeconds)) {
|
|
47
|
+
this.setError("Favor inserir um horário válido.");
|
|
48
|
+
newValueValidated = undefined;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
this.setError("");
|
|
52
|
+
}
|
|
53
|
+
const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
|
|
54
|
+
this.ezChange.emit(valueEmitted);
|
|
55
|
+
}
|
|
30
56
|
}
|
|
31
57
|
}
|
|
32
58
|
//---------------------------------------------
|
|
@@ -40,76 +66,84 @@ export class EzTimeInput {
|
|
|
40
66
|
this._maskFormatter.mask = mask;
|
|
41
67
|
}
|
|
42
68
|
}
|
|
69
|
+
validateValue(value) {
|
|
70
|
+
return isNaN(value) || value === undefined ? null : value;
|
|
71
|
+
}
|
|
72
|
+
setError(msg) {
|
|
73
|
+
this.errorMessage = msg;
|
|
74
|
+
if (this._textInput && (msg === null || msg === void 0 ? void 0 : msg.trim())) {
|
|
75
|
+
this.ezCancelWaitingChange.emit();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
43
78
|
//---------------------------------------------
|
|
44
79
|
// Public methods
|
|
45
80
|
//---------------------------------------------
|
|
81
|
+
getViewValue() {
|
|
82
|
+
return this._viewValue;
|
|
83
|
+
}
|
|
84
|
+
prepareValue(value) {
|
|
85
|
+
try {
|
|
86
|
+
this._viewValue = TimeFormatter.prepareValue(value, this.showSeconds);
|
|
87
|
+
if (this._textInput && this._textInput.value !== this._viewValue) {
|
|
88
|
+
this._textInput.value = this._viewValue;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (e) {
|
|
92
|
+
this.setError(e.message);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
46
95
|
/**
|
|
47
96
|
* Faz o foco no componente de input
|
|
48
97
|
*/
|
|
49
98
|
async setFocus() {
|
|
50
|
-
this.
|
|
99
|
+
this._textInput.setFocus();
|
|
51
100
|
}
|
|
52
101
|
/**
|
|
53
102
|
* Remove o foco no componente de input
|
|
54
103
|
*/
|
|
55
104
|
async setBlur() {
|
|
56
|
-
this.
|
|
105
|
+
this._textInput.setBlur();
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
109
|
+
*/
|
|
110
|
+
async isInvalid() {
|
|
111
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
57
112
|
}
|
|
58
113
|
//---------------------------------------------
|
|
59
114
|
// Event handlers
|
|
60
115
|
//---------------------------------------------
|
|
61
|
-
|
|
62
|
-
this.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
this.
|
|
66
|
-
this.ezCancelWaitingChange.emit();
|
|
67
|
-
this.errorMessage = "Favor inserir um horário válido.";
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
if (this.viewValue === this._oldViewValue) {
|
|
71
|
-
this.ezCancelWaitingChange.emit();
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
this._oldViewValue = this.viewValue;
|
|
75
|
-
if (this.viewValue === "00:00" && this.value == undefined) {
|
|
76
|
-
this.value = 0;
|
|
77
|
-
}
|
|
78
|
-
this.ezChange.emit(this.value);
|
|
116
|
+
handleBlur() {
|
|
117
|
+
if (this._textInput) {
|
|
118
|
+
this._viewValue = this._textInput.value;
|
|
119
|
+
this.prepareValue(this._viewValue);
|
|
120
|
+
this.value = NumberUtils.stringToNumber(this._viewValue.replace(/\D/g, ""));
|
|
79
121
|
}
|
|
80
122
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
123
|
+
handleInput() {
|
|
124
|
+
const parsedNumber = NumberUtils.stringToNumber(this._textInput.value.replace(/\D/g, ""));
|
|
125
|
+
if (parsedNumber !== this.value) {
|
|
126
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
84
127
|
}
|
|
85
|
-
catch (e) {
|
|
86
|
-
this.errorMessage = e.message;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
handleChange() {
|
|
90
|
-
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
91
|
-
this.viewValue = this._inputElem.value;
|
|
92
|
-
this.value = NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
|
|
93
128
|
}
|
|
94
129
|
//---------------------------------------------
|
|
95
130
|
// Lifecycle web component
|
|
96
131
|
//---------------------------------------------
|
|
97
132
|
componentDidLoad() {
|
|
98
|
-
this.
|
|
99
|
-
CSSVarsUtils.applyVarsTextInput(this._elem, this._inputElem);
|
|
133
|
+
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
100
134
|
}
|
|
101
135
|
componentWillLoad() {
|
|
102
136
|
this.observeShowSeconds();
|
|
103
137
|
if (this.value) {
|
|
104
138
|
this.prepareValue(this.value.toString());
|
|
105
139
|
}
|
|
106
|
-
else if (this.
|
|
107
|
-
this.prepareValue(this.
|
|
140
|
+
else if (this._viewValue) {
|
|
141
|
+
this.prepareValue(this._viewValue);
|
|
108
142
|
}
|
|
109
143
|
}
|
|
110
144
|
render() {
|
|
111
145
|
return (h(Host, null,
|
|
112
|
-
h("ez-text-input", { ref: (el) => this.
|
|
146
|
+
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 },
|
|
113
147
|
h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
114
148
|
}
|
|
115
149
|
static get is() { return "ez-time-input"; }
|
|
@@ -139,23 +173,6 @@ export class EzTimeInput {
|
|
|
139
173
|
"attribute": "label",
|
|
140
174
|
"reflect": true
|
|
141
175
|
},
|
|
142
|
-
"viewValue": {
|
|
143
|
-
"type": "string",
|
|
144
|
-
"mutable": true,
|
|
145
|
-
"complexType": {
|
|
146
|
-
"original": "string",
|
|
147
|
-
"resolved": "string",
|
|
148
|
-
"references": {}
|
|
149
|
-
},
|
|
150
|
-
"required": false,
|
|
151
|
-
"optional": false,
|
|
152
|
-
"docs": {
|
|
153
|
-
"tags": [],
|
|
154
|
-
"text": "Valor digitado pelo usu\u00E1rio. Este valor \u00E9 o que fica vis\u00EDvel no campo."
|
|
155
|
-
},
|
|
156
|
-
"attribute": "view-value",
|
|
157
|
-
"reflect": true
|
|
158
|
-
},
|
|
159
176
|
"value": {
|
|
160
177
|
"type": "number",
|
|
161
178
|
"mutable": true,
|
|
@@ -203,7 +220,7 @@ export class EzTimeInput {
|
|
|
203
220
|
"optional": false,
|
|
204
221
|
"docs": {
|
|
205
222
|
"tags": [],
|
|
206
|
-
"text": "Quando h\u00E1 um problema de valida\u00E7\u00E3o, serve como orienta\u00E7\u00E3o ao usu\u00E1rio"
|
|
223
|
+
"text": "Quando h\u00E1 um problema de valida\u00E7\u00E3o, serve como orienta\u00E7\u00E3o ao usu\u00E1rio."
|
|
207
224
|
},
|
|
208
225
|
"attribute": "error-message",
|
|
209
226
|
"reflect": true
|
|
@@ -220,7 +237,7 @@ export class EzTimeInput {
|
|
|
220
237
|
"optional": false,
|
|
221
238
|
"docs": {
|
|
222
239
|
"tags": [],
|
|
223
|
-
"text": "Define se o componente ir\u00E1 ou n\u00E3o considerar os segundos"
|
|
240
|
+
"text": "Define se o componente ir\u00E1 ou n\u00E3o considerar os segundos."
|
|
224
241
|
},
|
|
225
242
|
"attribute": "show-seconds",
|
|
226
243
|
"reflect": true,
|
|
@@ -328,10 +345,29 @@ export class EzTimeInput {
|
|
|
328
345
|
"text": "Remove o foco no componente de input",
|
|
329
346
|
"tags": []
|
|
330
347
|
}
|
|
348
|
+
},
|
|
349
|
+
"isInvalid": {
|
|
350
|
+
"complexType": {
|
|
351
|
+
"signature": "() => Promise<boolean>",
|
|
352
|
+
"parameters": [],
|
|
353
|
+
"references": {
|
|
354
|
+
"Promise": {
|
|
355
|
+
"location": "global"
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"return": "Promise<boolean>"
|
|
359
|
+
},
|
|
360
|
+
"docs": {
|
|
361
|
+
"text": "Retorna informando se o campo est\u00E1 inv\u00E1lido (true | false)",
|
|
362
|
+
"tags": []
|
|
363
|
+
}
|
|
331
364
|
}
|
|
332
365
|
}; }
|
|
333
366
|
static get elementRef() { return "_elem"; }
|
|
334
367
|
static get watchers() { return [{
|
|
368
|
+
"propName": "errorMessage",
|
|
369
|
+
"methodName": "observeErrorMessage"
|
|
370
|
+
}, {
|
|
335
371
|
"propName": "showSeconds",
|
|
336
372
|
"methodName": "observeShowSeconds"
|
|
337
373
|
}, {
|
|
@@ -86,6 +86,12 @@ export const EzGrid: {
|
|
|
86
86
|
new (): EzGrid;
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
+
interface EzGridConfig extends Components.EzGridConfig, HTMLElement {}
|
|
90
|
+
export const EzGridConfig: {
|
|
91
|
+
prototype: EzGridConfig;
|
|
92
|
+
new (): EzGridConfig;
|
|
93
|
+
};
|
|
94
|
+
|
|
89
95
|
interface EzIcon extends Components.EzIcon, HTMLElement {}
|
|
90
96
|
export const EzIcon: {
|
|
91
97
|
prototype: EzIcon;
|
|
@@ -134,6 +140,12 @@ export const EzSearch: {
|
|
|
134
140
|
new (): EzSearch;
|
|
135
141
|
};
|
|
136
142
|
|
|
143
|
+
interface EzSelectBox extends Components.EzSelectBox, HTMLElement {}
|
|
144
|
+
export const EzSelectBox: {
|
|
145
|
+
prototype: EzSelectBox;
|
|
146
|
+
new (): EzSelectBox;
|
|
147
|
+
};
|
|
148
|
+
|
|
137
149
|
interface EzTabselector extends Components.EzTabselector, HTMLElement {}
|
|
138
150
|
export const EzTabselector: {
|
|
139
151
|
prototype: EzTabselector;
|
|
@@ -176,18 +188,6 @@ export const EzViewStack: {
|
|
|
176
188
|
new (): EzViewStack;
|
|
177
189
|
};
|
|
178
190
|
|
|
179
|
-
interface GridConfig extends Components.GridConfig, HTMLElement {}
|
|
180
|
-
export const GridConfig: {
|
|
181
|
-
prototype: GridConfig;
|
|
182
|
-
new (): GridConfig;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
interface SelectBox extends Components.SelectBox, HTMLElement {}
|
|
186
|
-
export const SelectBox: {
|
|
187
|
-
prototype: SelectBox;
|
|
188
|
-
new (): SelectBox;
|
|
189
|
-
};
|
|
190
|
-
|
|
191
191
|
interface TestDu extends Components.TestDu, HTMLElement {}
|
|
192
192
|
export const TestDu: {
|
|
193
193
|
prototype: TestDu;
|