@sankhyalabs/ezui 1.1.99 → 1.1.102

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.
Files changed (53) hide show
  1. package/dist/cjs/{UnitMetadata-63c56042.js → UnitMetadata-4b90ead3.js} +43 -8
  2. package/dist/cjs/ez-button_3.cjs.entry.js +18 -6
  3. package/dist/cjs/ez-calendar_16.cjs.entry.js +88 -9
  4. package/dist/cjs/ez-grid.cjs.entry.js +14 -1
  5. package/dist/cjs/ez-modal_2.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  7. package/dist/cjs/ezui.cjs.js +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/collection/components/ez-button/ez-button.css +26 -2
  10. package/dist/collection/components/ez-button/ez-button.js +53 -7
  11. package/dist/collection/components/ez-calendar/ez-calendar.css +13 -4
  12. package/dist/collection/components/ez-calendar/ez-calendar.js +3 -3
  13. package/dist/collection/components/ez-combo-box/ez-combo-box.js +47 -1
  14. package/dist/collection/components/ez-date-input/ez-date-input.js +47 -1
  15. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +47 -1
  16. package/dist/collection/components/ez-form/DataBinder.js +1 -1
  17. package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +7 -0
  18. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +6 -0
  19. package/dist/collection/components/ez-number-input/ez-number-input.js +47 -1
  20. package/dist/collection/components/ez-search/ez-search.js +47 -1
  21. package/dist/collection/components/ez-upload/ez-upload.css +5 -0
  22. package/dist/collection/components/ez-upload/ez-upload.js +45 -1
  23. package/dist/collection/components/test-du/test-du.js +7 -0
  24. package/dist/custom-elements/index.js +161 -22
  25. package/dist/esm/{UnitMetadata-109880b0.js → UnitMetadata-8951d803.js} +43 -8
  26. package/dist/esm/ez-button_3.entry.js +18 -6
  27. package/dist/esm/ez-calendar_16.entry.js +88 -9
  28. package/dist/esm/ez-grid.entry.js +14 -1
  29. package/dist/esm/ez-modal_2.entry.js +1 -1
  30. package/dist/esm/ez-popover.entry.js +1 -1
  31. package/dist/esm/ezui.js +1 -1
  32. package/dist/esm/loader.js +1 -1
  33. package/dist/ezui/ezui.esm.js +1 -1
  34. package/dist/ezui/{p-afb820c1.entry.js → p-18c00d88.entry.js} +1 -1
  35. package/dist/ezui/p-6b257393.entry.js +1 -0
  36. package/dist/ezui/{p-a30309ce.entry.js → p-7294c815.entry.js} +1 -1
  37. package/dist/ezui/p-c6760545.js +1 -0
  38. package/dist/ezui/{p-18de871c.entry.js → p-da0f5393.entry.js} +2 -2
  39. package/dist/ezui/p-e75fa2ce.entry.js +1 -0
  40. package/dist/types/components/ez-button/ez-button.d.ts +10 -1
  41. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +8 -0
  42. package/dist/types/components/ez-date-input/ez-date-input.d.ts +8 -0
  43. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +8 -0
  44. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +4 -0
  45. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
  46. package/dist/types/components/ez-number-input/ez-number-input.d.ts +8 -0
  47. package/dist/types/components/ez-search/ez-search.d.ts +8 -0
  48. package/dist/types/components/ez-upload/ez-upload.d.ts +8 -0
  49. package/dist/types/components.d.ts +58 -2
  50. package/package.json +1 -1
  51. package/dist/ezui/p-90f6d8a0.entry.js +0 -1
  52. package/dist/ezui/p-9fab5606.js +0 -1
  53. package/dist/ezui/p-c3f30dff.entry.js +0 -1
@@ -1,4 +1,4 @@
1
- import { Component, h, Prop } from '@stencil/core';
1
+ import { Component, h, Prop, Method } from '@stencil/core';
2
2
  export class EzButton {
3
3
  constructor() {
4
4
  /**
@@ -10,10 +10,22 @@ export class EzButton {
10
10
  */
11
11
  this.mode = "regular";
12
12
  /**
13
- * Quando em modo "icon" pode-se escolher entre [small,medium,large] (somente para o modo "icon")
13
+ * É possível escolher entre [small,medium,large] (somente para os modos "icon" e "link")
14
14
  */
15
15
  this.size = "medium";
16
16
  }
17
+ /**
18
+ * Realiza o foco no botão
19
+ */
20
+ async setFocus() {
21
+ this._button.focus();
22
+ }
23
+ /**
24
+ * Remove o foco no botão
25
+ */
26
+ async setBlur() {
27
+ this._button.blur();
28
+ }
17
29
  getIconSize() {
18
30
  return this.size;
19
31
  }
@@ -35,25 +47,25 @@ export class EzButton {
35
47
  }
36
48
  render() {
37
49
  if (this.mode == "icon") {
38
- return (h("button", { class: "icon " + this.size, type: "button", disabled: !this.enabled },
50
+ return (h("button", { class: "icon " + this.size, type: "button", disabled: !this.enabled, ref: (el) => this._button = el },
39
51
  h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize(), onClick: evt => { if (!this.enabled)
40
52
  evt.stopPropagation(); } })));
41
53
  }
42
54
  else if (this.mode == "label-icon") {
43
55
  return (h("div", { class: "label-icon" },
44
- h("button", { class: "icon", type: "button", disabled: !this.enabled },
56
+ h("button", { class: "icon", type: "button", disabled: !this.enabled, ref: (el) => this._button = el },
45
57
  h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: "large", onClick: evt => { if (!this.enabled)
46
58
  evt.stopPropagation(); } })),
47
59
  h("label", { title: this.label }, this.label)));
48
60
  }
49
61
  else if (this.mode == "link") {
50
- return (h("a", null,
62
+ return (h("a", { class: this.size, ref: (el) => this._button = el },
51
63
  h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
52
64
  this.label,
53
65
  h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
54
66
  }
55
67
  else {
56
- return (h("button", { type: "button", disabled: !this.enabled },
68
+ return (h("button", { type: "button", disabled: !this.enabled, ref: (el) => this._button = el },
57
69
  h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
58
70
  this.label,
59
71
  h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
@@ -167,11 +179,45 @@ export class EzButton {
167
179
  "optional": false,
168
180
  "docs": {
169
181
  "tags": [],
170
- "text": "Quando em modo \"icon\" pode-se escolher entre [small,medium,large] (somente para o modo \"icon\")"
182
+ "text": "\u00C9 poss\u00EDvel escolher entre [small,medium,large] (somente para os modos \"icon\" e \"link\")"
171
183
  },
172
184
  "attribute": "size",
173
185
  "reflect": true,
174
186
  "defaultValue": "\"medium\""
175
187
  }
176
188
  }; }
189
+ static get methods() { return {
190
+ "setFocus": {
191
+ "complexType": {
192
+ "signature": "() => Promise<void>",
193
+ "parameters": [],
194
+ "references": {
195
+ "Promise": {
196
+ "location": "global"
197
+ }
198
+ },
199
+ "return": "Promise<void>"
200
+ },
201
+ "docs": {
202
+ "text": "Realiza o foco no bot\u00E3o",
203
+ "tags": []
204
+ }
205
+ },
206
+ "setBlur": {
207
+ "complexType": {
208
+ "signature": "() => Promise<void>",
209
+ "parameters": [],
210
+ "references": {
211
+ "Promise": {
212
+ "location": "global"
213
+ }
214
+ },
215
+ "return": "Promise<void>"
216
+ },
217
+ "docs": {
218
+ "text": "Remove o foco no bot\u00E3o",
219
+ "tags": []
220
+ }
221
+ }
222
+ }; }
177
223
  }
@@ -10,7 +10,7 @@
10
10
  /*@doc Define a cor de fundo do corpo do calendário.*/
11
11
  --ez-calendar__body--background-color: var(--background--xlight, #FFF);
12
12
  /*@doc Define a cor de fundo do corpo da hora do calendário.*/
13
- --ez-calendar__Time--background-color: var(--background--xlight, #FAFAFA);
13
+ --ez-calendar__time--background-color: var(--background--xlight, #FAFAFA);
14
14
  /*@doc Define o espaçamento do corpo do calendário.*/
15
15
  --ez-calendar__body--padding: var(--space--medium, 12px) var(--space--small, 6px) ;
16
16
  /*@doc Define o raio da borda do corpo do calendário.*/
@@ -18,6 +18,10 @@
18
18
  /*@doc Define a sombra do corpo do calendário.*/
19
19
  --ez-calendar__body--shadow: var(--shadow, 0px 0px 16px 0px #000);
20
20
 
21
+ /* cal__container*/
22
+ /*@doc Define a posição do container de calendario nas camadas da página .*/
23
+ --ez-container--z-index: var(--more-visible, 2);
24
+
21
25
  /* cal__header */
22
26
  /*@doc Define a espessura da borda inferior do header.*/
23
27
  --ez-calendar__header-line--stroke: 1px;
@@ -75,6 +79,11 @@
75
79
  user-select: none;
76
80
  }
77
81
 
82
+ .calendar__container{
83
+ display: flex;
84
+ z-index: var(--more-visible, 2);;
85
+ }
86
+
78
87
  .calendar {
79
88
  /*private*/
80
89
  z-index: var(--more-visible, 2);
@@ -242,7 +251,7 @@ section{
242
251
  display: flex;
243
252
  }
244
253
 
245
- .calendarTime {
254
+ .calendar-time {
246
255
  /*private*/
247
256
  margin-left: -10px;
248
257
  display: flex;
@@ -251,7 +260,7 @@ section{
251
260
 
252
261
  /*public*/
253
262
  /*TODO Criar variavel para color o calendar_time var(--ez-calendar__body-time--background-color)*/
254
- background-color: var(--ez-calendar__Time--background-color);
263
+ background-color: var(--ez-calendar__time--background-color);
255
264
  border-top-right-radius: var(--ez-calendar__body--border-radius);
256
265
  border-bottom-right-radius: var(--ez-calendar__body--border-radius);
257
266
  box-shadow: var(--ez-calendar__body--shadow);
@@ -270,7 +279,7 @@ section{
270
279
  min-width: 0px;
271
280
  }
272
281
 
273
- .calendarTime__header{
282
+ .calendar-time__header{
274
283
  /*private*/
275
284
  padding-left: var(--space--small, 6px);
276
285
  padding-right: var(--space--small, 6px);
@@ -167,7 +167,7 @@ export class EzCalendar {
167
167
  firstDate.setTime(this._currentPosition.getTime());
168
168
  firstDate.setDate(1 - firstDate.getDay());
169
169
  return (h("section", { ref: elem => this._container = elem },
170
- h("div", { ref: elem => this._box = elem, style: { display: 'flex' } },
170
+ h("div", { ref: elem => this._box = elem, class: "calendar__container" },
171
171
  h("div", { class: "calendar" },
172
172
  h("div", { class: "calendar__header" },
173
173
  h("button", { class: "calendar__btn-previous", onClick: () => this.changeMonth(-1) }),
@@ -191,8 +191,8 @@ export class EzCalendar {
191
191
  h("div", { class: "calendar__footer" },
192
192
  h("button", { class: "calendar__btn-today", onClick: () => this.selectDate(new Date()) }, this._todayLabel))),
193
193
  (this.time || this.showSeconds) &&
194
- h("div", { class: "calendarTime" },
195
- h("div", { class: "calendarTime__header" },
194
+ h("div", { class: "calendar-time" },
195
+ h("div", { class: "calendar-time__header" },
196
196
  h("div", null, "H"),
197
197
  h("div", { class: "separatorTime" }, ":"),
198
198
  h("div", null, "M"),
@@ -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,6 +19,18 @@ 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
  newValue = newValue == null ? null : DateUtils.clearTime(newValue);
24
36
  this._textInput.errorMessage = "";
@@ -165,6 +177,40 @@ export class EzDateInput {
165
177
  "references": {}
166
178
  }
167
179
  }]; }
180
+ static get methods() { return {
181
+ "setFocus": {
182
+ "complexType": {
183
+ "signature": "() => Promise<void>",
184
+ "parameters": [],
185
+ "references": {
186
+ "Promise": {
187
+ "location": "global"
188
+ }
189
+ },
190
+ "return": "Promise<void>"
191
+ },
192
+ "docs": {
193
+ "text": "Realiza o foco no componente de data",
194
+ "tags": []
195
+ }
196
+ },
197
+ "setBlur": {
198
+ "complexType": {
199
+ "signature": "() => Promise<void>",
200
+ "parameters": [],
201
+ "references": {
202
+ "Promise": {
203
+ "location": "global"
204
+ }
205
+ },
206
+ "return": "Promise<void>"
207
+ },
208
+ "docs": {
209
+ "text": "Remove o foco no componente de data",
210
+ "tags": []
211
+ }
212
+ }
213
+ }; }
168
214
  static get elementRef() { return "_elem"; }
169
215
  static get watchers() { return [{
170
216
  "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") {
@@ -229,6 +241,40 @@ export class EzDateTimeInput {
229
241
  "references": {}
230
242
  }
231
243
  }]; }
244
+ static get methods() { return {
245
+ "setFocus": {
246
+ "complexType": {
247
+ "signature": "() => Promise<void>",
248
+ "parameters": [],
249
+ "references": {
250
+ "Promise": {
251
+ "location": "global"
252
+ }
253
+ },
254
+ "return": "Promise<void>"
255
+ },
256
+ "docs": {
257
+ "text": "Realiza o foco no componente de datetime",
258
+ "tags": []
259
+ }
260
+ },
261
+ "setBlur": {
262
+ "complexType": {
263
+ "signature": "() => Promise<void>",
264
+ "parameters": [],
265
+ "references": {
266
+ "Promise": {
267
+ "location": "global"
268
+ }
269
+ },
270
+ "return": "Promise<void>"
271
+ },
272
+ "docs": {
273
+ "text": "Remove o foco no componente de datetime",
274
+ "tags": []
275
+ }
276
+ }
277
+ }; }
232
278
  static get elementRef() { return "_elem"; }
233
279
  static get watchers() { return [{
234
280
  "propName": "label",
@@ -39,7 +39,7 @@ export default class DataBinder {
39
39
  const loader = ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
40
40
  if (loader) {
41
41
  field["optionLoader"] = (arg) => {
42
- loader(arg, fieldName, this._dataUnit);
42
+ return loader(arg, fieldName, this._dataUnit);
43
43
  };
44
44
  }
45
45
  }
@@ -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",
@@ -284,6 +284,11 @@ progress[value]::-webkit-progress-value {
284
284
  cursor: unset;
285
285
  }
286
286
 
287
+ .appearanceNone{
288
+ width: 0px;
289
+ height: 0px;
290
+ }
291
+
287
292
 
288
293
  /* //////// GRID SYSTEM //////// */
289
294
 
@@ -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, hidden: 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 = {