@sankhyalabs/ezui 1.1.100 → 1.1.103
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/{UnitMetadata-63c56042.js → UnitMetadata-4b90ead3.js} +43 -8
- package/dist/cjs/ez-button_3.cjs.entry.js +16 -4
- package/dist/cjs/ez-calendar_16.cjs.entry.js +97 -15
- package/dist/cjs/ez-grid.cjs.entry.js +14 -1
- package/dist/cjs/ez-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-button/ez-button.js +51 -5
- package/dist/collection/components/ez-calendar/ez-calendar.js +11 -7
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +3 -3
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +47 -1
- package/dist/collection/components/ez-date-input/ez-date-input.js +59 -7
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +57 -6
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +7 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +6 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js +47 -1
- package/dist/collection/components/ez-search/ez-search.js +47 -1
- package/dist/collection/components/ez-upload/ez-upload.css +5 -0
- package/dist/collection/components/ez-upload/ez-upload.js +45 -1
- package/dist/collection/components/test-du/test-du.js +7 -0
- package/dist/custom-elements/index.js +168 -26
- package/dist/esm/{UnitMetadata-109880b0.js → UnitMetadata-8951d803.js} +43 -8
- package/dist/esm/ez-button_3.entry.js +16 -4
- package/dist/esm/ez-calendar_16.entry.js +97 -15
- package/dist/esm/ez-grid.entry.js +14 -1
- package/dist/esm/ez-modal_2.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- 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-afb820c1.entry.js → p-18c00d88.entry.js} +1 -1
- package/dist/ezui/p-2259c926.entry.js +1 -0
- package/dist/ezui/p-6b257393.entry.js +1 -0
- package/dist/ezui/{p-a30309ce.entry.js → p-7294c815.entry.js} +1 -1
- package/dist/ezui/p-c6760545.js +1 -0
- package/dist/ezui/{p-18de871c.entry.js → p-da0f5393.entry.js} +2 -2
- package/dist/types/components/ez-button/ez-button.d.ts +9 -0
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +1 -1
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +1 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +8 -0
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +9 -1
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +9 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +8 -0
- package/dist/types/components/ez-search/ez-search.d.ts +8 -0
- package/dist/types/components/ez-upload/ez-upload.d.ts +8 -0
- package/dist/types/components.d.ts +60 -4
- package/package.json +1 -1
- package/dist/ezui/p-3ea01b00.entry.js +0 -1
- package/dist/ezui/p-9fab5606.js +0 -1
- package/dist/ezui/p-d7c80eac.entry.js +0 -1
|
@@ -95,28 +95,28 @@ export class EzCalendar {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
this.value = newDate;
|
|
98
|
-
this.ezChange.emit();
|
|
98
|
+
this.ezChange.emit(this.value);
|
|
99
99
|
}
|
|
100
100
|
selectHours(hour) {
|
|
101
101
|
if (!this.value) {
|
|
102
102
|
this.value = new Date();
|
|
103
103
|
}
|
|
104
104
|
this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), hour, this.value.getMinutes(), this.value.getSeconds());
|
|
105
|
-
this.ezChange.emit();
|
|
105
|
+
this.ezChange.emit(this.value);
|
|
106
106
|
}
|
|
107
107
|
selectMinutes(minute) {
|
|
108
108
|
if (!this.value) {
|
|
109
109
|
this.value = new Date();
|
|
110
110
|
}
|
|
111
111
|
this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), this.value.getHours(), minute, this.value.getSeconds());
|
|
112
|
-
this.ezChange.emit();
|
|
112
|
+
this.ezChange.emit(this.value);
|
|
113
113
|
}
|
|
114
114
|
selectSeconds(second) {
|
|
115
115
|
if (!this.value) {
|
|
116
116
|
this.value = new Date();
|
|
117
117
|
}
|
|
118
118
|
this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), this.value.getHours(), this.value.getMinutes(), second);
|
|
119
|
-
this.ezChange.emit();
|
|
119
|
+
this.ezChange.emit(this.value);
|
|
120
120
|
}
|
|
121
121
|
updateScroll(element) {
|
|
122
122
|
if (element) {
|
|
@@ -330,9 +330,13 @@ export class EzCalendar {
|
|
|
330
330
|
"text": "Quando o usu\u00E1rio escolhe uma data, esse evento \u00E9 emitido."
|
|
331
331
|
},
|
|
332
332
|
"complexType": {
|
|
333
|
-
"original": "
|
|
334
|
-
"resolved": "
|
|
335
|
-
"references": {
|
|
333
|
+
"original": "Date",
|
|
334
|
+
"resolved": "Date",
|
|
335
|
+
"references": {
|
|
336
|
+
"Date": {
|
|
337
|
+
"location": "global"
|
|
338
|
+
}
|
|
339
|
+
}
|
|
336
340
|
}
|
|
337
341
|
}]; }
|
|
338
342
|
static get methods() { return {
|
|
@@ -15,7 +15,7 @@ export class EzCollapsibleBox {
|
|
|
15
15
|
this.iconPlacement = "left";
|
|
16
16
|
}
|
|
17
17
|
observeValue() {
|
|
18
|
-
this.ezChange.emit();
|
|
18
|
+
this.ezChange.emit(this.value);
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Esconde ou revela o conteúdo do componente
|
|
@@ -127,8 +127,8 @@ export class EzCollapsibleBox {
|
|
|
127
127
|
"text": "Evento disparado ao mudar o estado do componente (onEzChange)."
|
|
128
128
|
},
|
|
129
129
|
"complexType": {
|
|
130
|
-
"original": "
|
|
131
|
-
"resolved": "
|
|
130
|
+
"original": "boolean",
|
|
131
|
+
"resolved": "boolean",
|
|
132
132
|
"references": {}
|
|
133
133
|
}
|
|
134
134
|
}]; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FloatingManager } from "@sankhyalabs/core";
|
|
2
|
-
import { Component, h, Host, Prop, State, Event, Element, Watch } from "@stencil/core";
|
|
2
|
+
import { Component, h, Host, Prop, State, Event, Element, Watch, Method } from "@stencil/core";
|
|
3
3
|
import CSSVarsUtils from "../../utils/CSSVarsUtils";
|
|
4
4
|
export class EzComboBox {
|
|
5
5
|
constructor() {
|
|
@@ -33,6 +33,18 @@ export class EzComboBox {
|
|
|
33
33
|
this._preSelection = undefined;
|
|
34
34
|
this.updateVisibleOptions();
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Realiza o foco no componente de seleção
|
|
38
|
+
*/
|
|
39
|
+
async setFocus() {
|
|
40
|
+
this._inputElement.setFocus();
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Remove o foco no componente de seleção
|
|
44
|
+
*/
|
|
45
|
+
async setBlur() {
|
|
46
|
+
this._inputElement.setBlur();
|
|
47
|
+
}
|
|
36
48
|
getText() {
|
|
37
49
|
let text = "";
|
|
38
50
|
const selected = this.getSelectedOption();
|
|
@@ -489,6 +501,40 @@ export class EzComboBox {
|
|
|
489
501
|
}
|
|
490
502
|
}
|
|
491
503
|
}]; }
|
|
504
|
+
static get methods() { return {
|
|
505
|
+
"setFocus": {
|
|
506
|
+
"complexType": {
|
|
507
|
+
"signature": "() => Promise<void>",
|
|
508
|
+
"parameters": [],
|
|
509
|
+
"references": {
|
|
510
|
+
"Promise": {
|
|
511
|
+
"location": "global"
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
"return": "Promise<void>"
|
|
515
|
+
},
|
|
516
|
+
"docs": {
|
|
517
|
+
"text": "Realiza o foco no componente de sele\u00E7\u00E3o",
|
|
518
|
+
"tags": []
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
"setBlur": {
|
|
522
|
+
"complexType": {
|
|
523
|
+
"signature": "() => Promise<void>",
|
|
524
|
+
"parameters": [],
|
|
525
|
+
"references": {
|
|
526
|
+
"Promise": {
|
|
527
|
+
"location": "global"
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
"return": "Promise<void>"
|
|
531
|
+
},
|
|
532
|
+
"docs": {
|
|
533
|
+
"text": "Remove o foco no componente de sele\u00E7\u00E3o",
|
|
534
|
+
"tags": []
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}; }
|
|
492
538
|
static get elementRef() { return "el"; }
|
|
493
539
|
static get watchers() { return [{
|
|
494
540
|
"propName": "value",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Element, Host, h, Prop, Watch, Event } from '@stencil/core';
|
|
1
|
+
import { Component, Element, Host, h, Prop, Watch, Event, Method } from '@stencil/core';
|
|
2
2
|
import { DateUtils } from '@sankhyalabs/core';
|
|
3
3
|
import CSSVarsUtils from '../../utils/CSSVarsUtils';
|
|
4
4
|
export class EzDateInput {
|
|
@@ -19,12 +19,26 @@ export class EzDateInput {
|
|
|
19
19
|
this._textInput.value = this.getTextValue(this.value);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Realiza o foco no componente de data
|
|
24
|
+
*/
|
|
25
|
+
async setFocus() {
|
|
26
|
+
this._textInput.setFocus();
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Remove o foco no componente de data
|
|
30
|
+
*/
|
|
31
|
+
async setBlur() {
|
|
32
|
+
this._textInput.setBlur();
|
|
33
|
+
}
|
|
22
34
|
changeValue(newValue) {
|
|
23
|
-
|
|
35
|
+
var _a;
|
|
36
|
+
newValue = newValue instanceof Date ? DateUtils.clearTime(newValue) : null;
|
|
37
|
+
this.value = this.value instanceof Date ? DateUtils.clearTime(this.value) : null;
|
|
24
38
|
this._textInput.errorMessage = "";
|
|
25
|
-
if (newValue !== this.value) {
|
|
39
|
+
if ((newValue === null || newValue === void 0 ? void 0 : newValue.toString()) !== ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString())) {
|
|
26
40
|
this.value = newValue;
|
|
27
|
-
this.ezChange.emit();
|
|
41
|
+
this.ezChange.emit(this.value);
|
|
28
42
|
}
|
|
29
43
|
}
|
|
30
44
|
showCalendar() {
|
|
@@ -160,11 +174,49 @@ export class EzDateInput {
|
|
|
160
174
|
"text": "Evento disparado ao mudar o estado do componente(onEzChange)."
|
|
161
175
|
},
|
|
162
176
|
"complexType": {
|
|
163
|
-
"original": "
|
|
164
|
-
"resolved": "
|
|
165
|
-
"references": {
|
|
177
|
+
"original": "Date",
|
|
178
|
+
"resolved": "Date",
|
|
179
|
+
"references": {
|
|
180
|
+
"Date": {
|
|
181
|
+
"location": "global"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
166
184
|
}
|
|
167
185
|
}]; }
|
|
186
|
+
static get methods() { return {
|
|
187
|
+
"setFocus": {
|
|
188
|
+
"complexType": {
|
|
189
|
+
"signature": "() => Promise<void>",
|
|
190
|
+
"parameters": [],
|
|
191
|
+
"references": {
|
|
192
|
+
"Promise": {
|
|
193
|
+
"location": "global"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"return": "Promise<void>"
|
|
197
|
+
},
|
|
198
|
+
"docs": {
|
|
199
|
+
"text": "Realiza o foco no componente de data",
|
|
200
|
+
"tags": []
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"setBlur": {
|
|
204
|
+
"complexType": {
|
|
205
|
+
"signature": "() => Promise<void>",
|
|
206
|
+
"parameters": [],
|
|
207
|
+
"references": {
|
|
208
|
+
"Promise": {
|
|
209
|
+
"location": "global"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"return": "Promise<void>"
|
|
213
|
+
},
|
|
214
|
+
"docs": {
|
|
215
|
+
"text": "Remove o foco no componente de data",
|
|
216
|
+
"tags": []
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}; }
|
|
168
220
|
static get elementRef() { return "_elem"; }
|
|
169
221
|
static get watchers() { return [{
|
|
170
222
|
"propName": "label",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Element, Host, h, Prop, Watch, Event } from '@stencil/core';
|
|
1
|
+
import { Component, Element, Host, h, Prop, Watch, Event, Method } from '@stencil/core';
|
|
2
2
|
import { DateUtils, TimeFormatter } from '@sankhyalabs/core';
|
|
3
3
|
import CSSVarsUtils from '../../utils/CSSVarsUtils';
|
|
4
4
|
export class EzDateTimeInput {
|
|
@@ -23,6 +23,18 @@ export class EzDateTimeInput {
|
|
|
23
23
|
this._textInput.value = this.getTextValue(this.value);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Realiza o foco no componente de datetime
|
|
28
|
+
*/
|
|
29
|
+
async setFocus() {
|
|
30
|
+
this._textInput.setFocus();
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Remove o foco no componente de datetime
|
|
34
|
+
*/
|
|
35
|
+
async setBlur() {
|
|
36
|
+
this._textInput.setBlur();
|
|
37
|
+
}
|
|
26
38
|
onChangeKeyDown(ev) {
|
|
27
39
|
const input = this._textInput.shadowRoot.querySelector('input');
|
|
28
40
|
if (ev.key === "H" || ev.key === "h") {
|
|
@@ -63,10 +75,11 @@ export class EzDateTimeInput {
|
|
|
63
75
|
input.setSelectionRange(selectIni, selectFin);
|
|
64
76
|
}
|
|
65
77
|
changeValue(newValue) {
|
|
78
|
+
var _a;
|
|
66
79
|
this._textInput.errorMessage = "";
|
|
67
|
-
if (newValue !== this.value) {
|
|
80
|
+
if ((newValue === null || newValue === void 0 ? void 0 : newValue.toString()) !== ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString())) {
|
|
68
81
|
this.value = newValue;
|
|
69
|
-
this.ezChange.emit();
|
|
82
|
+
this.ezChange.emit(this.value);
|
|
70
83
|
}
|
|
71
84
|
}
|
|
72
85
|
showCalendar() {
|
|
@@ -224,11 +237,49 @@ export class EzDateTimeInput {
|
|
|
224
237
|
"text": "Evento disparado ao mudar o estado do componente(onEzChange)."
|
|
225
238
|
},
|
|
226
239
|
"complexType": {
|
|
227
|
-
"original": "
|
|
228
|
-
"resolved": "
|
|
229
|
-
"references": {
|
|
240
|
+
"original": "Date",
|
|
241
|
+
"resolved": "Date",
|
|
242
|
+
"references": {
|
|
243
|
+
"Date": {
|
|
244
|
+
"location": "global"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
230
247
|
}
|
|
231
248
|
}]; }
|
|
249
|
+
static get methods() { return {
|
|
250
|
+
"setFocus": {
|
|
251
|
+
"complexType": {
|
|
252
|
+
"signature": "() => Promise<void>",
|
|
253
|
+
"parameters": [],
|
|
254
|
+
"references": {
|
|
255
|
+
"Promise": {
|
|
256
|
+
"location": "global"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"return": "Promise<void>"
|
|
260
|
+
},
|
|
261
|
+
"docs": {
|
|
262
|
+
"text": "Realiza o foco no componente de datetime",
|
|
263
|
+
"tags": []
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"setBlur": {
|
|
267
|
+
"complexType": {
|
|
268
|
+
"signature": "() => Promise<void>",
|
|
269
|
+
"parameters": [],
|
|
270
|
+
"references": {
|
|
271
|
+
"Promise": {
|
|
272
|
+
"location": "global"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"return": "Promise<void>"
|
|
276
|
+
},
|
|
277
|
+
"docs": {
|
|
278
|
+
"text": "Remove o foco no componente de datetime",
|
|
279
|
+
"tags": []
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}; }
|
|
232
283
|
static get elementRef() { return "_elem"; }
|
|
233
284
|
static get watchers() { return [{
|
|
234
285
|
"propName": "label",
|
|
@@ -10,6 +10,13 @@ export default class DataUnitBridge {
|
|
|
10
10
|
case Action.METADATA_LOADED:
|
|
11
11
|
this._gridController.setColumnsDef(this.buildColumnDefs(), true);
|
|
12
12
|
break;
|
|
13
|
+
case Action.RECORDS_REMOVED:
|
|
14
|
+
case Action.EDITION_CANCELED:
|
|
15
|
+
case Action.RECORDS_ADDED:
|
|
16
|
+
case Action.RECORDS_COPIED:
|
|
17
|
+
case Action.DATA_SAVED:
|
|
18
|
+
this._gridController.refresh();
|
|
19
|
+
break;
|
|
13
20
|
}
|
|
14
21
|
}
|
|
15
22
|
buildColumnDefs() {
|
|
@@ -87,6 +87,12 @@ export default class AgGridController {
|
|
|
87
87
|
}
|
|
88
88
|
this._gridOptions.api.setRowData(data);
|
|
89
89
|
}
|
|
90
|
+
refresh() {
|
|
91
|
+
if (this._grid === undefined) {
|
|
92
|
+
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
93
|
+
}
|
|
94
|
+
this._gridOptions.api.refreshServerSideStore({ purge: false });
|
|
95
|
+
}
|
|
90
96
|
setColumnsDef(cols, showCheckSelection) {
|
|
91
97
|
if (this._grid === undefined) {
|
|
92
98
|
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NumberUtils } from "@sankhyalabs/core";
|
|
2
|
-
import { Component, h, Event, Prop, Watch, Element } from "@stencil/core";
|
|
2
|
+
import { Component, h, Event, Prop, Watch, Element, Method } from "@stencil/core";
|
|
3
3
|
import CSSVarsUtils from "../../utils/CSSVarsUtils";
|
|
4
4
|
export class EzNumberInput {
|
|
5
5
|
constructor() {
|
|
@@ -19,6 +19,18 @@ export class EzNumberInput {
|
|
|
19
19
|
this._textInput.value = this.getTextValue(this.value);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Realiza o foco no componente de input
|
|
24
|
+
*/
|
|
25
|
+
async setFocus() {
|
|
26
|
+
this._textInput.setFocus();
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Remove o foco no componente de input
|
|
30
|
+
*/
|
|
31
|
+
async setBlur() {
|
|
32
|
+
this._textInput.setBlur();
|
|
33
|
+
}
|
|
22
34
|
changeValue(newValue) {
|
|
23
35
|
this.errorMessage = "";
|
|
24
36
|
if (newValue && newValue !== this.value) {
|
|
@@ -182,6 +194,40 @@ export class EzNumberInput {
|
|
|
182
194
|
"references": {}
|
|
183
195
|
}
|
|
184
196
|
}]; }
|
|
197
|
+
static get methods() { return {
|
|
198
|
+
"setFocus": {
|
|
199
|
+
"complexType": {
|
|
200
|
+
"signature": "() => Promise<void>",
|
|
201
|
+
"parameters": [],
|
|
202
|
+
"references": {
|
|
203
|
+
"Promise": {
|
|
204
|
+
"location": "global"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"return": "Promise<void>"
|
|
208
|
+
},
|
|
209
|
+
"docs": {
|
|
210
|
+
"text": "Realiza o foco no componente de input",
|
|
211
|
+
"tags": []
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"setBlur": {
|
|
215
|
+
"complexType": {
|
|
216
|
+
"signature": "() => Promise<void>",
|
|
217
|
+
"parameters": [],
|
|
218
|
+
"references": {
|
|
219
|
+
"Promise": {
|
|
220
|
+
"location": "global"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"return": "Promise<void>"
|
|
224
|
+
},
|
|
225
|
+
"docs": {
|
|
226
|
+
"text": "Remove o foco no componente de input",
|
|
227
|
+
"tags": []
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}; }
|
|
185
231
|
static get elementRef() { return "_elem"; }
|
|
186
232
|
static get watchers() { return [{
|
|
187
233
|
"propName": "label",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Event, h, Prop, Watch, Element } from "@stencil/core";
|
|
1
|
+
import { Component, Event, h, Prop, Watch, Element, Method } from "@stencil/core";
|
|
2
2
|
import CSSVarsUtils from "../../utils/CSSVarsUtils";
|
|
3
3
|
export class EzSearch {
|
|
4
4
|
constructor() {
|
|
@@ -20,6 +20,18 @@ export class EzSearch {
|
|
|
20
20
|
this._comboElement.value = this.value;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Realiza o foco no componente de pesquisa
|
|
25
|
+
*/
|
|
26
|
+
async setFocus() {
|
|
27
|
+
this._comboElement.setFocus();
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Remove o foco no componente de pesquisa
|
|
31
|
+
*/
|
|
32
|
+
async setBlur() {
|
|
33
|
+
this._comboElement.setBlur();
|
|
34
|
+
}
|
|
23
35
|
onComboChange(evt) {
|
|
24
36
|
evt.stopPropagation();
|
|
25
37
|
this.value = evt.detail;
|
|
@@ -207,6 +219,40 @@ export class EzSearch {
|
|
|
207
219
|
"references": {}
|
|
208
220
|
}
|
|
209
221
|
}]; }
|
|
222
|
+
static get methods() { return {
|
|
223
|
+
"setFocus": {
|
|
224
|
+
"complexType": {
|
|
225
|
+
"signature": "() => Promise<void>",
|
|
226
|
+
"parameters": [],
|
|
227
|
+
"references": {
|
|
228
|
+
"Promise": {
|
|
229
|
+
"location": "global"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"return": "Promise<void>"
|
|
233
|
+
},
|
|
234
|
+
"docs": {
|
|
235
|
+
"text": "Realiza o foco no componente de pesquisa",
|
|
236
|
+
"tags": []
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"setBlur": {
|
|
240
|
+
"complexType": {
|
|
241
|
+
"signature": "() => Promise<void>",
|
|
242
|
+
"parameters": [],
|
|
243
|
+
"references": {
|
|
244
|
+
"Promise": {
|
|
245
|
+
"location": "global"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"return": "Promise<void>"
|
|
249
|
+
},
|
|
250
|
+
"docs": {
|
|
251
|
+
"text": "Remove o foco no componente de pesquisa",
|
|
252
|
+
"tags": []
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}; }
|
|
210
256
|
static get elementRef() { return "_elem"; }
|
|
211
257
|
static get watchers() { return [{
|
|
212
258
|
"propName": "value",
|
|
@@ -58,6 +58,18 @@ export class EzUpload {
|
|
|
58
58
|
}
|
|
59
59
|
Array.prototype.forEach.call(files, this.addFile.bind(this));
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Realiza o foco no componente de upload
|
|
63
|
+
*/
|
|
64
|
+
async setFocus() {
|
|
65
|
+
this._fileInput.focus();
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Remove o foco no componente de upload
|
|
69
|
+
*/
|
|
70
|
+
async setBlur() {
|
|
71
|
+
this._fileInput.blur();
|
|
72
|
+
}
|
|
61
73
|
async addFile(file) {
|
|
62
74
|
const oldFile = this._filePointers.get(file.name);
|
|
63
75
|
if (oldFile) {
|
|
@@ -215,7 +227,7 @@ export class EzUpload {
|
|
|
215
227
|
h("button", { class: "iu__file-icon", disabled: !this.enabled }),
|
|
216
228
|
h("div", { class: this.evalDisabledClass("text text--center text--medium text--primary", "text--disabled") }, this.enabled ? "Arraste e solte ou clique para adicionar arquivos" : "Somente leitura"))),
|
|
217
229
|
this.buildFooter()),
|
|
218
|
-
h("input", { ref: (el) => this._fileInput = el, onChange: (ev) => this.onFileInputChange(ev), type: "file", multiple: true,
|
|
230
|
+
h("input", { ref: (el) => this._fileInput = el, onChange: (ev) => this.onFileInputChange(ev), type: "file", multiple: true, class: "appearanceNone" })));
|
|
219
231
|
}
|
|
220
232
|
buildFooter() {
|
|
221
233
|
if (this._filePointers.size === 0) {
|
|
@@ -449,6 +461,38 @@ export class EzUpload {
|
|
|
449
461
|
"text": "M\u00E9todo respons\u00E1vel por adicionar um ou mais arquivos ao componente.",
|
|
450
462
|
"tags": []
|
|
451
463
|
}
|
|
464
|
+
},
|
|
465
|
+
"setFocus": {
|
|
466
|
+
"complexType": {
|
|
467
|
+
"signature": "() => Promise<void>",
|
|
468
|
+
"parameters": [],
|
|
469
|
+
"references": {
|
|
470
|
+
"Promise": {
|
|
471
|
+
"location": "global"
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"return": "Promise<void>"
|
|
475
|
+
},
|
|
476
|
+
"docs": {
|
|
477
|
+
"text": "Realiza o foco no componente de upload",
|
|
478
|
+
"tags": []
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
"setBlur": {
|
|
482
|
+
"complexType": {
|
|
483
|
+
"signature": "() => Promise<void>",
|
|
484
|
+
"parameters": [],
|
|
485
|
+
"references": {
|
|
486
|
+
"Promise": {
|
|
487
|
+
"location": "global"
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
"return": "Promise<void>"
|
|
491
|
+
},
|
|
492
|
+
"docs": {
|
|
493
|
+
"text": "Remove o foco no componente de upload",
|
|
494
|
+
"tags": []
|
|
495
|
+
}
|
|
452
496
|
}
|
|
453
497
|
}; }
|
|
454
498
|
static get elementRef() { return "_host"; }
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { Component, h } from '@stencil/core';
|
|
2
2
|
import { DataUnit, DataType, UserInterface } from '@sankhyalabs/core';
|
|
3
3
|
export class TestDu {
|
|
4
|
+
/*private _ezButton// : HTMLEzButton;
|
|
5
|
+
private _ezComboBox// : HTMLEzComboBox;
|
|
6
|
+
private _ezDateInput// : HTMLEzDateInput;
|
|
7
|
+
private _ezDateTimeInput// : HTMLEzDateTimeInput;
|
|
8
|
+
private _ezNumberInput// : HTMLEzNumberInput
|
|
9
|
+
private _ezSearch// : HTMLEzSearch
|
|
10
|
+
private _ezUpload// : HTMLEzUpload*/
|
|
4
11
|
componentWillLoad() {
|
|
5
12
|
this.dataUnit = new DataUnit("testes_com_formulario");
|
|
6
13
|
this.dataUnit.metadata = {
|