@sankhyalabs/ezui 1.1.115 → 1.1.116
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 +6 -2
- package/dist/cjs/ez-date-input.cjs.entry.js +6 -2
- package/dist/cjs/ez-date-time-input.cjs.entry.js +6 -2
- package/dist/cjs/ez-filter-input.cjs.entry.js +73 -0
- package/dist/cjs/ez-number-input.cjs.entry.js +5 -1
- package/dist/cjs/ez-search.cjs.entry.js +17 -13
- package/dist/cjs/ez-text-area.cjs.entry.js +28 -9
- package/dist/cjs/ez-text-input.cjs.entry.js +11 -6
- package/dist/cjs/ez-time-input.cjs.entry.js +7 -2
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/test-du.cjs.entry.js +2 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +24 -2
- package/dist/collection/components/ez-date-input/ez-date-input.js +24 -2
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +24 -2
- package/dist/collection/components/ez-filter-input/ez-filter-input.css +4 -0
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +248 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js +23 -1
- package/dist/collection/components/ez-search/ez-search.js +35 -13
- package/dist/collection/components/ez-text-area/ez-text-area.css +71 -1
- package/dist/collection/components/ez-text-area/ez-text-area.js +67 -9
- package/dist/collection/components/ez-text-input/ez-text-input.css +78 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js +29 -6
- package/dist/collection/components/ez-time-input/ez-time-input.js +25 -2
- package/dist/collection/components/test-du/test-du.js +2 -1
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +166 -47
- package/dist/esm/ez-combo-box.entry.js +6 -2
- package/dist/esm/ez-date-input.entry.js +6 -2
- package/dist/esm/ez-date-time-input.entry.js +6 -2
- package/dist/esm/ez-filter-input.entry.js +69 -0
- package/dist/esm/ez-number-input.entry.js +5 -1
- package/dist/esm/ez-search.entry.js +17 -13
- package/dist/esm/ez-text-area.entry.js +28 -9
- package/dist/esm/ez-text-input.entry.js +11 -6
- package/dist/esm/ez-time-input.entry.js +7 -2
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/test-du.entry.js +2 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-01169201.entry.js +1 -0
- package/dist/ezui/p-055f1b6a.entry.js +1 -0
- package/dist/ezui/p-2f14fe3d.entry.js +1 -0
- package/dist/ezui/p-43feac7d.entry.js +1 -0
- package/dist/ezui/p-6f39077b.entry.js +1 -0
- package/dist/ezui/p-83d5f1ca.entry.js +1 -0
- package/dist/ezui/p-8c447785.entry.js +1 -0
- package/dist/ezui/p-8f2d46f8.entry.js +1 -0
- package/dist/ezui/p-d3d3e2ac.entry.js +1 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +4 -0
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +4 -0
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +4 -0
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +52 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +4 -0
- package/dist/types/components/ez-search/ez-search.d.ts +24 -20
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +11 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -0
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
- package/dist/types/components.d.ts +153 -0
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-25e87823.entry.js +0 -1
- package/dist/ezui/p-3a8bf0a8.entry.js +0 -1
- package/dist/ezui/p-44d4f8d6.entry.js +0 -1
- package/dist/ezui/p-8248690a.entry.js +0 -1
- package/dist/ezui/p-9aecc079.entry.js +0 -1
- package/dist/ezui/p-bc2834fa.entry.js +0 -1
- package/dist/ezui/p-c27495d9.entry.js +0 -1
- package/dist/ezui/p-fb73f557.entry.js +0 -1
|
@@ -32,6 +32,10 @@ let EzComboBox = class {
|
|
|
32
32
|
* Permite exibir a mensagem de erro.
|
|
33
33
|
*/
|
|
34
34
|
this.canShowError = true;
|
|
35
|
+
/**
|
|
36
|
+
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
37
|
+
*/
|
|
38
|
+
this.mode = "regular";
|
|
35
39
|
}
|
|
36
40
|
internalUpdate() {
|
|
37
41
|
if (this._inputElement) {
|
|
@@ -91,7 +95,7 @@ let EzComboBox = class {
|
|
|
91
95
|
//FIXME: Provavelmente isso fará com que o popup abra em uma
|
|
92
96
|
//posição errada no futuro. Preferi fazer simples no começo,
|
|
93
97
|
//porque não quis onerar o text input com essa funcionalidade...
|
|
94
|
-
const top = (this.errorMessage || !this.canShowError) ? "0px" : "-
|
|
98
|
+
const top = (this.errorMessage || !this.canShowError || this.mode == "slim") ? "0px" : "-19px";
|
|
95
99
|
this._floatingID = core.FloatingManager.float(this._optionsList, this._listContainer, { autoClose: true, top });
|
|
96
100
|
window.requestAnimationFrame(() => {
|
|
97
101
|
this._optionsList.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
@@ -268,7 +272,7 @@ let EzComboBox = class {
|
|
|
268
272
|
this.cancelPreselection();
|
|
269
273
|
}
|
|
270
274
|
render() {
|
|
271
|
-
return (index.h(index.Host, null, index.h("ez-text-input", { ref: elem => this._inputElement = elem, enabled: this.enabled, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onEzChange: event => event.stopPropagation(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage }, this.searchMode ?
|
|
275
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { ref: elem => this._inputElement = elem, enabled: this.enabled, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onEzChange: event => event.stopPropagation(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, this.searchMode ?
|
|
272
276
|
index.h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-search", onClick: () => { this.loadOptions("ADVANCED"); }, slot: "leftIcon" })
|
|
273
277
|
:
|
|
274
278
|
index.h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-options", slot: "rightIcon", onClick: () => this.showOptions() })), index.h("section", { class: "list-container", ref: elem => this._listContainer = elem }, index.h("div", { class: "options-list", ref: elem => this._optionsList = elem }, this._visibleOptions.map((opt, index) => this.buildItem(opt, index))))));
|
|
@@ -16,6 +16,10 @@ let EzDateInput = class {
|
|
|
16
16
|
* Deixa o campo disponível ou não para uso.
|
|
17
17
|
*/
|
|
18
18
|
this.enabled = true;
|
|
19
|
+
/**
|
|
20
|
+
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
21
|
+
*/
|
|
22
|
+
this.mode = "regular";
|
|
19
23
|
}
|
|
20
24
|
setLabel() {
|
|
21
25
|
this._textInput.label = this.label;
|
|
@@ -56,7 +60,7 @@ let EzDateInput = class {
|
|
|
56
60
|
//FIXME: Provavelmente isso fará com que o popup abra em uma
|
|
57
61
|
//posição errada no futuro. Preferi fazer simples no começo,
|
|
58
62
|
//porque não quis onerar o text input com essa funcionalidade...
|
|
59
|
-
const top = this._textInput.errorMessage ? 0 : -
|
|
63
|
+
const top = this._textInput.errorMessage || this.mode == "slim" ? 0 : -19;
|
|
60
64
|
this._calendar.fitVertical(top, this._elem.clientHeight);
|
|
61
65
|
}
|
|
62
66
|
hideCalendar() {
|
|
@@ -88,7 +92,7 @@ let EzDateInput = class {
|
|
|
88
92
|
return (index.h(index.Host, null, index.h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => {
|
|
89
93
|
if (event.key === "H" || event.key === "h")
|
|
90
94
|
this.changeValue(new Date());
|
|
91
|
-
}, label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage }, index.h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), index.h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
95
|
+
}, label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }, index.h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), index.h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
92
96
|
}
|
|
93
97
|
get _elem() { return index.getElement(this); }
|
|
94
98
|
static get watchers() { return {
|
|
@@ -20,6 +20,10 @@ let EzDateTimeInput = class {
|
|
|
20
20
|
* Exibe ou não os segundos no input
|
|
21
21
|
*/
|
|
22
22
|
this.showSeconds = false;
|
|
23
|
+
/**
|
|
24
|
+
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
25
|
+
*/
|
|
26
|
+
this.mode = "regular";
|
|
23
27
|
}
|
|
24
28
|
setLabel() {
|
|
25
29
|
this._textInput.label = this.label;
|
|
@@ -92,7 +96,7 @@ let EzDateTimeInput = class {
|
|
|
92
96
|
}
|
|
93
97
|
}
|
|
94
98
|
showCalendar() {
|
|
95
|
-
const top = this._textInput.errorMessage ? 0 : -
|
|
99
|
+
const top = this._textInput.errorMessage || this.mode == "slim" ? 0 : -19;
|
|
96
100
|
this._calendar.fitVertical(top, this._elem.clientHeight);
|
|
97
101
|
this._calendar.style.visibility = 'inherit';
|
|
98
102
|
}
|
|
@@ -131,7 +135,7 @@ let EzDateTimeInput = class {
|
|
|
131
135
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
132
136
|
}
|
|
133
137
|
render() {
|
|
134
|
-
return (index.h(index.Host, null, index.h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => { this.onChangeKeyDown(event); }, label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, onFocus: () => this.onFocused(), onClick: () => this.onClicked() }, index.h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), index.h("ez-calendar", { onEzChange: (event) => { this.changeValue(this._calendar.value); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
|
|
138
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => { this.onChangeKeyDown(event); }, label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onFocus: () => this.onFocused(), onClick: () => this.onClicked() }, index.h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), index.h("ez-calendar", { onEzChange: (event) => { this.changeValue(this._calendar.value); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
|
|
135
139
|
}
|
|
136
140
|
get _elem() { return index.getElement(this); }
|
|
137
141
|
static get watchers() { return {
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-88286449.js');
|
|
6
|
+
const CSSVarsUtils = require('./CSSVarsUtils-8fbdf2e0.js');
|
|
7
|
+
|
|
8
|
+
const ezFilterInputCss = ":host{display:block;width:100%}";
|
|
9
|
+
|
|
10
|
+
let EzFilterInput = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
14
|
+
/**
|
|
15
|
+
* Deixa o campo disponível ou não para uso.
|
|
16
|
+
*/
|
|
17
|
+
this.enabled = true;
|
|
18
|
+
/**
|
|
19
|
+
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
20
|
+
*/
|
|
21
|
+
this.mode = "regular";
|
|
22
|
+
}
|
|
23
|
+
setLabel() {
|
|
24
|
+
if (this._textInput) {
|
|
25
|
+
this._textInput.label = this.label;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
setErrorMessage() {
|
|
29
|
+
if (this._textInput) {
|
|
30
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
applyValueToInput() {
|
|
34
|
+
if (this._textInput) {
|
|
35
|
+
this._textInput.value = this.value;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Realiza o foco no componente de input
|
|
40
|
+
*/
|
|
41
|
+
async setFocus() {
|
|
42
|
+
this._textInput.setFocus();
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Remove o foco no componente de input
|
|
46
|
+
*/
|
|
47
|
+
async setBlur() {
|
|
48
|
+
this._textInput.setBlur();
|
|
49
|
+
}
|
|
50
|
+
changeValue(evt) {
|
|
51
|
+
const newValue = evt.detail;
|
|
52
|
+
this.errorMessage = "";
|
|
53
|
+
if (newValue !== this.value) {
|
|
54
|
+
this.value = newValue;
|
|
55
|
+
this.ezChange.emit(this.value);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
componentDidLoad() {
|
|
59
|
+
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
return (index.h("ez-text-input", { ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.changeValue(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, loading: this.loading, mode: this.mode }, index.h("ez-icon", { slot: "leftIcon", iconName: "search" })));
|
|
63
|
+
}
|
|
64
|
+
get _elem() { return index.getElement(this); }
|
|
65
|
+
static get watchers() { return {
|
|
66
|
+
"label": ["setLabel"],
|
|
67
|
+
"errorMessage": ["setErrorMessage"],
|
|
68
|
+
"value": ["applyValueToInput"]
|
|
69
|
+
}; }
|
|
70
|
+
};
|
|
71
|
+
EzFilterInput.style = ezFilterInputCss;
|
|
72
|
+
|
|
73
|
+
exports.ez_filter_input = EzFilterInput;
|
|
@@ -16,6 +16,10 @@ let EzNumberInput = class {
|
|
|
16
16
|
* Deixa o campo disponível ou não para uso.
|
|
17
17
|
*/
|
|
18
18
|
this.enabled = true;
|
|
19
|
+
/**
|
|
20
|
+
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
21
|
+
*/
|
|
22
|
+
this.mode = "regular";
|
|
19
23
|
}
|
|
20
24
|
setLabel() {
|
|
21
25
|
this._textInput.label = this.label;
|
|
@@ -72,7 +76,7 @@ let EzNumberInput = class {
|
|
|
72
76
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
73
77
|
}
|
|
74
78
|
render() {
|
|
75
|
-
return (index.h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage }));
|
|
79
|
+
return (index.h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }));
|
|
76
80
|
}
|
|
77
81
|
get _elem() { return index.getElement(this); }
|
|
78
82
|
static get watchers() { return {
|
|
@@ -13,21 +13,25 @@ let EzSearch = class {
|
|
|
13
13
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
14
14
|
this.showPopup = index.createEvent(this, "showPopup", 7);
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
* Deixa o campo disponível ou não.
|
|
17
|
+
*/
|
|
18
18
|
this.enabled = true;
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
* Ajusta a opção de mostrar o "value" ao selecionar uma opção.
|
|
21
|
+
*/
|
|
22
22
|
this.showSelectedValue = true;
|
|
23
23
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
* Ajusta a opção de mostrar o "value" para cada opção.
|
|
25
|
+
*/
|
|
26
26
|
this.showOptionValue = true;
|
|
27
27
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
* Remove a opção vazia da lista de opções
|
|
29
|
+
*/
|
|
30
30
|
this.suppressEmptyOption = false;
|
|
31
|
+
/**
|
|
32
|
+
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
33
|
+
*/
|
|
34
|
+
this.mode = "regular";
|
|
31
35
|
}
|
|
32
36
|
updateValue() {
|
|
33
37
|
if (this._comboElement) {
|
|
@@ -35,14 +39,14 @@ let EzSearch = class {
|
|
|
35
39
|
}
|
|
36
40
|
}
|
|
37
41
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
* Realiza o foco no componente de pesquisa
|
|
43
|
+
*/
|
|
40
44
|
async setFocus() {
|
|
41
45
|
this._comboElement.setFocus();
|
|
42
46
|
}
|
|
43
47
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
* Remove o foco no componente de pesquisa
|
|
49
|
+
*/
|
|
46
50
|
async setBlur() {
|
|
47
51
|
this._comboElement.setBlur();
|
|
48
52
|
}
|
|
@@ -55,7 +59,7 @@ let EzSearch = class {
|
|
|
55
59
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._comboElement);
|
|
56
60
|
}
|
|
57
61
|
render() {
|
|
58
|
-
return (index.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: evt => this.onComboChange(evt), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption }));
|
|
62
|
+
return (index.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: evt => this.onComboChange(evt), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode }));
|
|
59
63
|
}
|
|
60
64
|
;
|
|
61
65
|
get _elem() { return index.getElement(this); }
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
6
|
|
|
7
|
-
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--
|
|
7
|
+
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--large, 600);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)}";
|
|
8
8
|
|
|
9
9
|
let EzTextArea = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -15,19 +15,24 @@ let EzTextArea = class {
|
|
|
15
15
|
*/
|
|
16
16
|
this.enabled = true;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Permite exibir a mensagem de erro.
|
|
19
19
|
*/
|
|
20
|
-
this.
|
|
20
|
+
this.canShowError = true;
|
|
21
|
+
/**
|
|
22
|
+
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
23
|
+
*/
|
|
24
|
+
this.mode = "regular";
|
|
21
25
|
}
|
|
22
26
|
showError() {
|
|
27
|
+
var _a, _b;
|
|
23
28
|
const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
|
|
24
29
|
if (hasError) {
|
|
25
30
|
this._container.classList.add('hasError');
|
|
26
|
-
this._messageBoxElem.classList.add('hasError');
|
|
31
|
+
(_a = this._messageBoxElem) === null || _a === void 0 ? void 0 : _a.classList.add('hasError');
|
|
27
32
|
}
|
|
28
33
|
else {
|
|
29
34
|
this._container.classList.remove('hasError');
|
|
30
|
-
this._messageBoxElem.classList.remove('hasError');
|
|
35
|
+
(_b = this._messageBoxElem) === null || _b === void 0 ? void 0 : _b.classList.remove('hasError');
|
|
31
36
|
}
|
|
32
37
|
}
|
|
33
38
|
updateInputValue() {
|
|
@@ -36,8 +41,18 @@ let EzTextArea = class {
|
|
|
36
41
|
this.adjustFloatingLabel();
|
|
37
42
|
this.ezChange.emit(this.value);
|
|
38
43
|
}
|
|
44
|
+
adjustRowsForMode() {
|
|
45
|
+
if (this._initialRows == undefined) {
|
|
46
|
+
this._initialRows = this.rows > 0 ? this.rows : undefined;
|
|
47
|
+
}
|
|
48
|
+
this.rows = this._initialRows > 0 ? this._initialRows : this.mode != "slim" ? 4 : 2;
|
|
49
|
+
}
|
|
50
|
+
adjustRowsValue() {
|
|
51
|
+
this.rows = this.rows > 0 ? this.rows : this.mode != "slim" ? 4 : 2;
|
|
52
|
+
this._initialRows = this.rows;
|
|
53
|
+
}
|
|
39
54
|
adjustFloatingLabel() {
|
|
40
|
-
if (this.label) {
|
|
55
|
+
if (this.label && this._labelElem) {
|
|
41
56
|
const hasValue = this.value && this.value.toString().length > 0;
|
|
42
57
|
const containsFloatedClass = this._labelElem.classList.contains("textarea__label--floated");
|
|
43
58
|
if (hasValue || this.isFocused()) {
|
|
@@ -97,16 +112,20 @@ let EzTextArea = class {
|
|
|
97
112
|
componentDidLoad() {
|
|
98
113
|
this.showError();
|
|
99
114
|
this.adjustFloatingLabel();
|
|
115
|
+
this.adjustRowsForMode();
|
|
100
116
|
}
|
|
101
117
|
render() {
|
|
102
|
-
return (index.h(index.Host, null, index.h("div", { class: "textarea", ref: (el) => this._container = el }, this.label ?
|
|
118
|
+
return (index.h(index.Host, null, index.h("div", { class: "textarea", ref: (el) => this._container = el }, this.label && this.mode != "slim" ?
|
|
103
119
|
index.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)
|
|
104
|
-
: null, index.h("textarea", { onFocus: () => this.handleFocus(), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, onKeyDown: event => event.stopPropagation(), rows: this.rows })),
|
|
120
|
+
: null, index.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" &&
|
|
121
|
+
index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
105
122
|
}
|
|
106
123
|
get _hostElement() { return index.getElement(this); }
|
|
107
124
|
static get watchers() { return {
|
|
108
125
|
"errorMessage": ["showError"],
|
|
109
|
-
"value": ["updateInputValue"]
|
|
126
|
+
"value": ["updateInputValue"],
|
|
127
|
+
"mode": ["adjustRowsForMode"],
|
|
128
|
+
"rows": ["adjustRowsValue"]
|
|
110
129
|
}; }
|
|
111
130
|
};
|
|
112
131
|
EzTextArea.style = ezTextAreaCss;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--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, #000);--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);font-weight:var(--text-weight--large, 600);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)}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.text--right{text-align:right}.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}";
|
|
8
|
+
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, #000);--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);font-weight:var(--text-weight--large, 600);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)}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}.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)}";
|
|
9
9
|
|
|
10
10
|
let EzTextInput = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -19,16 +19,21 @@ let EzTextInput = class {
|
|
|
19
19
|
* Permite exibir a mensagem de erro.
|
|
20
20
|
*/
|
|
21
21
|
this.canShowError = true;
|
|
22
|
+
/**
|
|
23
|
+
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
24
|
+
*/
|
|
25
|
+
this.mode = "regular";
|
|
22
26
|
}
|
|
23
27
|
showError() {
|
|
28
|
+
var _a, _b;
|
|
24
29
|
const hasError = typeof this.errorMessage === "string" && this.errorMessage !== "";
|
|
25
30
|
if (hasError) {
|
|
26
31
|
this._inputElem.classList.add("hasError");
|
|
27
|
-
this._messageBoxElem.classList.add("hasError");
|
|
32
|
+
(_a = this._messageBoxElem) === null || _a === void 0 ? void 0 : _a.classList.add("hasError");
|
|
28
33
|
}
|
|
29
34
|
else {
|
|
30
35
|
this._inputElem.classList.remove("hasError");
|
|
31
|
-
this._messageBoxElem.classList.remove("hasError");
|
|
36
|
+
(_b = this._messageBoxElem) === null || _b === void 0 ? void 0 : _b.classList.remove("hasError");
|
|
32
37
|
}
|
|
33
38
|
}
|
|
34
39
|
prepareMask() {
|
|
@@ -133,7 +138,7 @@ let EzTextInput = class {
|
|
|
133
138
|
content.style.overflow = "hidden";
|
|
134
139
|
content.style.top = "0px";
|
|
135
140
|
content.style.width = "var(--ez-text-input__icon--width)";
|
|
136
|
-
content.style.height = "var(--ez-text-input--height)";
|
|
141
|
+
content.style.height = this.mode != "slim" ? "var(--ez-text-input--height)" : "var(--ez-text-input--height--slim)";
|
|
137
142
|
if (slot.name == "leftIcon") {
|
|
138
143
|
content.style.left = "0px";
|
|
139
144
|
content.style.borderRadius = "var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)";
|
|
@@ -184,9 +189,9 @@ let EzTextInput = class {
|
|
|
184
189
|
}
|
|
185
190
|
}
|
|
186
191
|
render() {
|
|
187
|
-
return (index.h(index.Host, null, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label ?
|
|
192
|
+
return (index.h(index.Host, null, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
188
193
|
index.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)
|
|
189
|
-
: null, index.h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError &&
|
|
194
|
+
: null, index.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(); } }), index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
190
195
|
index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
191
196
|
}
|
|
192
197
|
get _hostElement() { return index.getElement(this); }
|
|
@@ -20,6 +20,10 @@ let EzTimeInput = class {
|
|
|
20
20
|
* Define se o componente irá ou não considerar os segundos
|
|
21
21
|
*/
|
|
22
22
|
this.showSeconds = false;
|
|
23
|
+
/**
|
|
24
|
+
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
25
|
+
*/
|
|
26
|
+
this.mode = "regular";
|
|
23
27
|
}
|
|
24
28
|
prepareMask() {
|
|
25
29
|
if (this.showSeconds) {
|
|
@@ -81,7 +85,8 @@ let EzTimeInput = class {
|
|
|
81
85
|
}
|
|
82
86
|
}
|
|
83
87
|
clearField() {
|
|
84
|
-
this.viewValue =
|
|
88
|
+
this.viewValue = '';
|
|
89
|
+
this.value = undefined;
|
|
85
90
|
}
|
|
86
91
|
handleChange() {
|
|
87
92
|
this.viewValue = this._inputElem.value;
|
|
@@ -104,7 +109,7 @@ let EzTimeInput = class {
|
|
|
104
109
|
}
|
|
105
110
|
}
|
|
106
111
|
render() {
|
|
107
|
-
return (index.h(index.Host, null, index.h("ez-text-input", { ref: (el) => this._inputElem = el, value: this.viewValue, enabled: this.enabled, label: this.label, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, errorMessage: this.errorMessage }, index.h("ez-icon", { slot: "leftIcon", href: AssetsUtils.getSpritePath("timer-outline") }))));
|
|
112
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { ref: (el) => this._inputElem = el, value: this.viewValue, enabled: this.enabled, label: this.label, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, errorMessage: this.errorMessage, mode: this.mode }, index.h("ez-icon", { slot: "leftIcon", href: AssetsUtils.getSpritePath("timer-outline") }))));
|
|
108
113
|
}
|
|
109
114
|
static get assetsDirs() { return ["../assets"]; }
|
|
110
115
|
get _elem() { return index.getElement(this); }
|
package/dist/cjs/ezui.cjs.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"
|
|
18
|
+
return index.bootstrapLazy([["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}]]],["test-du.cjs",[[0,"test-du"]]],["select-box.cjs",[[1,"select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"setFocus":[64],"setBlur":[64]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]]], options);
|
|
19
19
|
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"
|
|
17
|
+
return index.bootstrapLazy([["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}]]],["test-du.cjs",[[0,"test-du"]]],["select-box.cjs",[[1,"select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"setFocus":[64],"setBlur":[64]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -17,7 +17,8 @@ let TestDu = class {
|
|
|
17
17
|
private _ezDateTimeInput// : HTMLEzDateTimeInput;
|
|
18
18
|
private _ezNumberInput// : HTMLEzNumberInput
|
|
19
19
|
private _ezSearch// : HTMLEzSearch
|
|
20
|
-
private _ezUpload// : HTMLEzUpload
|
|
20
|
+
private _ezUpload// : HTMLEzUpload
|
|
21
|
+
private _ezFilterInput// : HTMLEzFilterInput*/
|
|
21
22
|
componentWillLoad() {
|
|
22
23
|
this.dataUnit = new core.DataUnit("testes_com_formulario");
|
|
23
24
|
this.dataUnit.metadata = {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"./components/ez-date-input/ez-date-input.js",
|
|
15
15
|
"./components/ez-date-time-input/ez-date-time-input.js",
|
|
16
16
|
"./components/ez-dialog/ez-dialog.js",
|
|
17
|
+
"./components/ez-filter-input/ez-filter-input.js",
|
|
17
18
|
"./components/ez-grid/ez-grid.js",
|
|
18
19
|
"./components/ez-grid/subcomponents/gridconfig/grid-config.js",
|
|
19
20
|
"./components/ez-grid/subcomponents/select-box/select-box.js",
|
|
@@ -23,6 +23,10 @@ export class EzComboBox {
|
|
|
23
23
|
* Permite exibir a mensagem de erro.
|
|
24
24
|
*/
|
|
25
25
|
this.canShowError = true;
|
|
26
|
+
/**
|
|
27
|
+
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
28
|
+
*/
|
|
29
|
+
this.mode = "regular";
|
|
26
30
|
}
|
|
27
31
|
internalUpdate() {
|
|
28
32
|
if (this._inputElement) {
|
|
@@ -84,7 +88,7 @@ export class EzComboBox {
|
|
|
84
88
|
//FIXME: Provavelmente isso fará com que o popup abra em uma
|
|
85
89
|
//posição errada no futuro. Preferi fazer simples no começo,
|
|
86
90
|
//porque não quis onerar o text input com essa funcionalidade...
|
|
87
|
-
const top = (this.errorMessage || !this.canShowError) ? "0px" : "-
|
|
91
|
+
const top = (this.errorMessage || !this.canShowError || this.mode == "slim") ? "0px" : "-19px";
|
|
88
92
|
this._floatingID = FloatingManager.float(this._optionsList, this._listContainer, { autoClose: true, top });
|
|
89
93
|
window.requestAnimationFrame(() => {
|
|
90
94
|
this._optionsList.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
@@ -262,7 +266,7 @@ export class EzComboBox {
|
|
|
262
266
|
}
|
|
263
267
|
render() {
|
|
264
268
|
return (h(Host, null,
|
|
265
|
-
h("ez-text-input", { ref: elem => this._inputElement = elem, enabled: this.enabled, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onEzChange: event => event.stopPropagation(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage }, this.searchMode ?
|
|
269
|
+
h("ez-text-input", { ref: elem => this._inputElement = elem, enabled: this.enabled, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onEzChange: event => event.stopPropagation(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, this.searchMode ?
|
|
266
270
|
h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-search", onClick: () => { this.loadOptions("ADVANCED"); }, slot: "leftIcon" })
|
|
267
271
|
:
|
|
268
272
|
h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-options", slot: "rightIcon", onClick: () => this.showOptions() })),
|
|
@@ -480,6 +484,24 @@ export class EzComboBox {
|
|
|
480
484
|
"attribute": "can-show-error",
|
|
481
485
|
"reflect": true,
|
|
482
486
|
"defaultValue": "true"
|
|
487
|
+
},
|
|
488
|
+
"mode": {
|
|
489
|
+
"type": "string",
|
|
490
|
+
"mutable": false,
|
|
491
|
+
"complexType": {
|
|
492
|
+
"original": "string",
|
|
493
|
+
"resolved": "string",
|
|
494
|
+
"references": {}
|
|
495
|
+
},
|
|
496
|
+
"required": false,
|
|
497
|
+
"optional": false,
|
|
498
|
+
"docs": {
|
|
499
|
+
"tags": [],
|
|
500
|
+
"text": "Define o modo do tamanho do campo; op\u00E7\u00F5es: slim e regular."
|
|
501
|
+
},
|
|
502
|
+
"attribute": "mode",
|
|
503
|
+
"reflect": true,
|
|
504
|
+
"defaultValue": "\"regular\""
|
|
483
505
|
}
|
|
484
506
|
}; }
|
|
485
507
|
static get states() { return {
|