@sankhyalabs/ezui 1.1.100 → 1.1.101

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 (39) hide show
  1. package/dist/cjs/ez-button_3.cjs.entry.js +16 -4
  2. package/dist/cjs/ez-calendar_16.cjs.entry.js +81 -2
  3. package/dist/cjs/ez-grid.cjs.entry.js +13 -0
  4. package/dist/cjs/ezui.cjs.js +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/collection/components/ez-button/ez-button.js +51 -5
  7. package/dist/collection/components/ez-combo-box/ez-combo-box.js +47 -1
  8. package/dist/collection/components/ez-date-input/ez-date-input.js +47 -1
  9. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +47 -1
  10. package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +7 -0
  11. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +6 -0
  12. package/dist/collection/components/ez-number-input/ez-number-input.js +47 -1
  13. package/dist/collection/components/ez-search/ez-search.js +47 -1
  14. package/dist/collection/components/ez-upload/ez-upload.css +5 -0
  15. package/dist/collection/components/ez-upload/ez-upload.js +45 -1
  16. package/dist/collection/components/test-du/test-du.js +7 -0
  17. package/dist/custom-elements/index.js +110 -6
  18. package/dist/esm/ez-button_3.entry.js +16 -4
  19. package/dist/esm/ez-calendar_16.entry.js +81 -2
  20. package/dist/esm/ez-grid.entry.js +13 -0
  21. package/dist/esm/ezui.js +1 -1
  22. package/dist/esm/loader.js +1 -1
  23. package/dist/ezui/ezui.esm.js +1 -1
  24. package/dist/ezui/p-6b257393.entry.js +1 -0
  25. package/dist/ezui/p-b9982bf0.entry.js +1 -0
  26. package/dist/ezui/{p-18de871c.entry.js → p-cae8b8a2.entry.js} +1 -1
  27. package/dist/types/components/ez-button/ez-button.d.ts +9 -0
  28. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +8 -0
  29. package/dist/types/components/ez-date-input/ez-date-input.d.ts +8 -0
  30. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +8 -0
  31. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +4 -0
  32. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
  33. package/dist/types/components/ez-number-input/ez-number-input.d.ts +8 -0
  34. package/dist/types/components/ez-search/ez-search.d.ts +8 -0
  35. package/dist/types/components/ez-upload/ez-upload.d.ts +8 -0
  36. package/dist/types/components.d.ts +56 -0
  37. package/package.json +1 -1
  38. package/dist/ezui/p-3ea01b00.entry.js +0 -1
  39. package/dist/ezui/p-d7c80eac.entry.js +0 -1
@@ -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 = {
@@ -63,6 +63,18 @@ let EzButton$1 = class extends HTMLElement$1 {
63
63
  */
64
64
  this.size = "medium";
65
65
  }
66
+ /**
67
+ * Realiza o foco no botão
68
+ */
69
+ async setFocus() {
70
+ this._button.focus();
71
+ }
72
+ /**
73
+ * Remove o foco no botão
74
+ */
75
+ async setBlur() {
76
+ this._button.blur();
77
+ }
66
78
  getIconSize() {
67
79
  return this.size;
68
80
  }
@@ -84,22 +96,22 @@ let EzButton$1 = class extends HTMLElement$1 {
84
96
  }
85
97
  render() {
86
98
  if (this.mode == "icon") {
87
- return (h("button", { class: "icon " + this.size, type: "button", disabled: !this.enabled }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize(), onClick: evt => {
99
+ return (h("button", { class: "icon " + this.size, type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize(), onClick: evt => {
88
100
  if (!this.enabled)
89
101
  evt.stopPropagation();
90
102
  } })));
91
103
  }
92
104
  else if (this.mode == "label-icon") {
93
- return (h("div", { class: "label-icon" }, h("button", { class: "icon", type: "button", disabled: !this.enabled }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: "large", onClick: evt => {
105
+ return (h("div", { class: "label-icon" }, h("button", { class: "icon", type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: "large", onClick: evt => {
94
106
  if (!this.enabled)
95
107
  evt.stopPropagation();
96
108
  } })), h("label", { title: this.label }, this.label)));
97
109
  }
98
110
  else if (this.mode == "link") {
99
- return (h("a", { class: this.size }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
111
+ return (h("a", { class: this.size, ref: (el) => this._button = el }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
100
112
  }
101
113
  else {
102
- return (h("button", { type: "button", disabled: !this.enabled }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
114
+ return (h("button", { type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
103
115
  }
104
116
  }
105
117
  static get style() { return ezButtonCss; }
@@ -2027,6 +2039,18 @@ let EzComboBox$1 = class extends HTMLElement$1 {
2027
2039
  this._preSelection = undefined;
2028
2040
  this.updateVisibleOptions();
2029
2041
  }
2042
+ /**
2043
+ * Realiza o foco no componente de seleção
2044
+ */
2045
+ async setFocus() {
2046
+ this._inputElement.setFocus();
2047
+ }
2048
+ /**
2049
+ * Remove o foco no componente de seleção
2050
+ */
2051
+ async setBlur() {
2052
+ this._inputElement.setBlur();
2053
+ }
2030
2054
  getText() {
2031
2055
  let text = "";
2032
2056
  const selected = this.getSelectedOption();
@@ -2272,6 +2296,18 @@ let EzDateInput$1 = class extends HTMLElement$1 {
2272
2296
  this._textInput.value = this.getTextValue(this.value);
2273
2297
  }
2274
2298
  }
2299
+ /**
2300
+ * Realiza o foco no componente de data
2301
+ */
2302
+ async setFocus() {
2303
+ this._textInput.setFocus();
2304
+ }
2305
+ /**
2306
+ * Remove o foco no componente de data
2307
+ */
2308
+ async setBlur() {
2309
+ this._textInput.setBlur();
2310
+ }
2275
2311
  changeValue(newValue) {
2276
2312
  newValue = newValue == null ? null : DateUtils.clearTime(newValue);
2277
2313
  this._textInput.errorMessage = "";
@@ -2357,6 +2393,18 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
2357
2393
  this._textInput.value = this.getTextValue(this.value);
2358
2394
  }
2359
2395
  }
2396
+ /**
2397
+ * Realiza o foco no componente de datetime
2398
+ */
2399
+ async setFocus() {
2400
+ this._textInput.setFocus();
2401
+ }
2402
+ /**
2403
+ * Remove o foco no componente de datetime
2404
+ */
2405
+ async setBlur() {
2406
+ this._textInput.setBlur();
2407
+ }
2360
2408
  onChangeKeyDown(ev) {
2361
2409
  const input = this._textInput.shadowRoot.querySelector('input');
2362
2410
  if (ev.key === "H" || ev.key === "h") {
@@ -113474,6 +113522,12 @@ class AgGridController {
113474
113522
  }
113475
113523
  this._gridOptions.api.setRowData(data);
113476
113524
  }
113525
+ refresh() {
113526
+ if (this._grid === undefined) {
113527
+ throw new Error("Erro interno: Grid ainda não inicializado.");
113528
+ }
113529
+ this._gridOptions.api.refreshServerSideStore({ purge: false });
113530
+ }
113477
113531
  setColumnsDef(cols, showCheckSelection) {
113478
113532
  if (this._grid === undefined) {
113479
113533
  throw new Error("Erro interno: Grid ainda não inicializado.");
@@ -113667,6 +113721,13 @@ class DataUnitBridge {
113667
113721
  case Action.METADATA_LOADED:
113668
113722
  this._gridController.setColumnsDef(this.buildColumnDefs(), true);
113669
113723
  break;
113724
+ case Action.RECORDS_REMOVED:
113725
+ case Action.EDITION_CANCELED:
113726
+ case Action.RECORDS_ADDED:
113727
+ case Action.RECORDS_COPIED:
113728
+ case Action.DATA_SAVED:
113729
+ this._gridController.refresh();
113730
+ break;
113670
113731
  }
113671
113732
  }
113672
113733
  buildColumnDefs() {
@@ -114515,6 +114576,18 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
114515
114576
  this._textInput.value = this.getTextValue(this.value);
114516
114577
  }
114517
114578
  }
114579
+ /**
114580
+ * Realiza o foco no componente de input
114581
+ */
114582
+ async setFocus() {
114583
+ this._textInput.setFocus();
114584
+ }
114585
+ /**
114586
+ * Remove o foco no componente de input
114587
+ */
114588
+ async setBlur() {
114589
+ this._textInput.setBlur();
114590
+ }
114518
114591
  changeValue(newValue) {
114519
114592
  this.errorMessage = "";
114520
114593
  if (newValue && newValue !== this.value) {
@@ -114742,6 +114815,18 @@ let EzSearch$1 = class extends HTMLElement$1 {
114742
114815
  this._comboElement.value = this.value;
114743
114816
  }
114744
114817
  }
114818
+ /**
114819
+ * Realiza o foco no componente de pesquisa
114820
+ */
114821
+ async setFocus() {
114822
+ this._comboElement.setFocus();
114823
+ }
114824
+ /**
114825
+ * Remove o foco no componente de pesquisa
114826
+ */
114827
+ async setBlur() {
114828
+ this._comboElement.setBlur();
114829
+ }
114745
114830
  onComboChange(evt) {
114746
114831
  evt.stopPropagation();
114747
114832
  this.value = evt.detail;
@@ -115512,7 +115597,7 @@ class RemoteFile {
115512
115597
  }
115513
115598
  }
115514
115599
 
115515
- const ezUploadCss = ":host{--ez-upload--height:42px;--ez-upload--width:100%;--ez-upload__icon--width:48px;--ez-upload__container--background-color:var(--background--medium, #d2dce9);--ez-upload__color--primary:var(--color--primary, #008561);--ez-upload--padding--extra-small:var(--space--extra-small, 3px);--ez-upload--padding--small:var(--space--small, 6px);--ez-upload--padding--medium:var(--space--medium, 12px);--ez-upload--padding--large:var(--space--large, 24px);--ez-upload__border--color:var(--color-strokes, #DCE0E8);--ez-upload--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-upload--text--primary:var(--text-primary, #626e82);--ez-upload--font-size:var(--text--medium, 14px);--ez-upload--font-family:var(--font-pattern, Arial);--ez-upload--font-weight:var(--text-weight--large, 500);--ez-upload__btn__cancel-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"8x\" width=\"8px\"><path d=\"M 8,0.8 7.2,0 4,3.2 0.8,0 0,0.8 3.2,4 0,7.2 0.8,8 4,4.8 7.2,8 8,7.2 4.8,4 Z\"/></svg>');--ez-upload__file-icon-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"11x\" width=\"9px\"><path d=\"M 1.2272719,8.4999999 V 2.75 c 0,-1.1045695 1.4652499,-2 3.2727273,-2 1.8074777,0 3.2727281,0.8954305 3.2727281,2 V 8.9999999 C 7.7727273,9.690356 6.8569456,10.25 5.7272719,10.25 4.5975985,10.25 3.6818174,9.690356 3.6818174,8.9999999 V 3.75 c 0,-0.2761425 0.3663125,-0.5 0.8181818,-0.5 0.4518694,0 0.8181818,0.2238575 0.8181818,0.5 V 8.4999999 H 6.5454537 V 3.75 C 6.5454537,3.059644 5.6296725,2.5 4.4999992,2.5 3.3703258,2.5 2.4545446,3.059644 2.4545446,3.75 V 8.9999999 C 2.4545446,10.10457 3.9197945,11 5.7272719,11 7.5347496,11 9,10.10457 9,8.9999999 V 2.75 C 9,1.231217 6.9852809,0 4.4999992,0 2.0147181,5e-7 0,1.231217 0,2.75 v 5.7499999 z\"/></svg>');display:flex;flex-wrap:wrap;position:relative;font-family:var(--ez-upload--font-family);font-size:var(--ez-upload--font-size);width:var(--ez-upload--width);font-weight:var(--ez-upload--font-weight)}.iu{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:var(--ez-upload--padding--small);width:100%;border-radius:12px;box-sizing:border-box}.iu__container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.iu__footer{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%;padding:0 var(--ez-upload--padding--medium) var(--ez-upload--padding--medium) var(--ez-upload--padding--medium);box-sizing:border-box}.iu__item{display:flex;width:100%;justify-content:flex-start;align-items:center;align-self:center;padding-bottom:var(--ez-upload--padding--extra-small);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.iu__item-label{display:flex;max-width:80%;align-self:stretch;align-items:center}.file__name{font-weight:200}.box__content{width:100%;justify-content:center;align-items:center;height:100%;border:1px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.box__container{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:6px;width:100%;border-radius:12px}a:-webkit-any-link{color:#008561;fill:#008561;cursor:pointer;text-decoration:none}progress[value]{display:flex;width:100%;appearance:none;border:1px solid var(--ez-upload__border--color);height:12px;justify-content:flex-start;align-items:center;border-radius:3px;position:relative}progress[value]::-webkit-progress-bar{display:flex;-webkit-appearance:none;width:100%;background-color:rgb(255, 255, 255);border-radius:2px;padding:2px}progress[value]::-webkit-progress-value{display:flex;width:100%;background-color:var(--ez-upload__color--primary)}.text--center{text-align:center}.align--middle{align-self:center;align-items:center}.text{font-family:\"Sora\", \"Algerian\";text-shadow:0 0 0 #353535, 0 0 1px transparent}.text--primary{color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text--medium{font-size:14px}.text--small{font-size:12px}.btn-cancel{outline:none;border:none;background-color:unset;cursor:pointer}.btn-cancel::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:8px;height:8px;-webkit-mask-image:var(--ez-upload__btn__cancel-image);mask-image:var(--ez-upload__btn__cancel-image)}.iu_header{display:flex;flex-direction:column;width:100%}.iu__label{padding:var(--space--small);box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-upload--font-family);font-size:var(--text--extra-small);font-weight:var(--ez-upload--font-weight);color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.iu__file-icon{outline:none;border:none;background-color:unset;cursor:pointer}.iu__file-icon:disabled{cursor:unset}.iu__file-icon::after{content:'';display:flex;background-color:var(--text--primary, #626e82);width:9px;height:11px;-webkit-mask-image:var(--ez-upload__file-icon-image);mask-image:var(--ez-upload__file-icon-image)}.iu__file-icon:disabled::after{background-color:var(--text--disable, #AFB6C0)}.iu__icon-label{justify-content:center;display:flex;cursor:pointer;padding:var(--ez-upload--padding--large) 0px;box-sizing:border-box}.background--disabled{background-color:var(--color--disable-secondary, #F2F5F8)}.text--disabled{color:var(--text--disable, #AFB6C0)}.mouse-pointer--disabled{cursor:unset}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
115600
+ const ezUploadCss = ":host{--ez-upload--height:42px;--ez-upload--width:100%;--ez-upload__icon--width:48px;--ez-upload__container--background-color:var(--background--medium, #d2dce9);--ez-upload__color--primary:var(--color--primary, #008561);--ez-upload--padding--extra-small:var(--space--extra-small, 3px);--ez-upload--padding--small:var(--space--small, 6px);--ez-upload--padding--medium:var(--space--medium, 12px);--ez-upload--padding--large:var(--space--large, 24px);--ez-upload__border--color:var(--color-strokes, #DCE0E8);--ez-upload--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-upload--text--primary:var(--text-primary, #626e82);--ez-upload--font-size:var(--text--medium, 14px);--ez-upload--font-family:var(--font-pattern, Arial);--ez-upload--font-weight:var(--text-weight--large, 500);--ez-upload__btn__cancel-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"8x\" width=\"8px\"><path d=\"M 8,0.8 7.2,0 4,3.2 0.8,0 0,0.8 3.2,4 0,7.2 0.8,8 4,4.8 7.2,8 8,7.2 4.8,4 Z\"/></svg>');--ez-upload__file-icon-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"11x\" width=\"9px\"><path d=\"M 1.2272719,8.4999999 V 2.75 c 0,-1.1045695 1.4652499,-2 3.2727273,-2 1.8074777,0 3.2727281,0.8954305 3.2727281,2 V 8.9999999 C 7.7727273,9.690356 6.8569456,10.25 5.7272719,10.25 4.5975985,10.25 3.6818174,9.690356 3.6818174,8.9999999 V 3.75 c 0,-0.2761425 0.3663125,-0.5 0.8181818,-0.5 0.4518694,0 0.8181818,0.2238575 0.8181818,0.5 V 8.4999999 H 6.5454537 V 3.75 C 6.5454537,3.059644 5.6296725,2.5 4.4999992,2.5 3.3703258,2.5 2.4545446,3.059644 2.4545446,3.75 V 8.9999999 C 2.4545446,10.10457 3.9197945,11 5.7272719,11 7.5347496,11 9,10.10457 9,8.9999999 V 2.75 C 9,1.231217 6.9852809,0 4.4999992,0 2.0147181,5e-7 0,1.231217 0,2.75 v 5.7499999 z\"/></svg>');display:flex;flex-wrap:wrap;position:relative;font-family:var(--ez-upload--font-family);font-size:var(--ez-upload--font-size);width:var(--ez-upload--width);font-weight:var(--ez-upload--font-weight)}.iu{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:var(--ez-upload--padding--small);width:100%;border-radius:12px;box-sizing:border-box}.iu__container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.iu__footer{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%;padding:0 var(--ez-upload--padding--medium) var(--ez-upload--padding--medium) var(--ez-upload--padding--medium);box-sizing:border-box}.iu__item{display:flex;width:100%;justify-content:flex-start;align-items:center;align-self:center;padding-bottom:var(--ez-upload--padding--extra-small);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.iu__item-label{display:flex;max-width:80%;align-self:stretch;align-items:center}.file__name{font-weight:200}.box__content{width:100%;justify-content:center;align-items:center;height:100%;border:1px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.box__container{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:6px;width:100%;border-radius:12px}a:-webkit-any-link{color:#008561;fill:#008561;cursor:pointer;text-decoration:none}progress[value]{display:flex;width:100%;appearance:none;border:1px solid var(--ez-upload__border--color);height:12px;justify-content:flex-start;align-items:center;border-radius:3px;position:relative}progress[value]::-webkit-progress-bar{display:flex;-webkit-appearance:none;width:100%;background-color:rgb(255, 255, 255);border-radius:2px;padding:2px}progress[value]::-webkit-progress-value{display:flex;width:100%;background-color:var(--ez-upload__color--primary)}.text--center{text-align:center}.align--middle{align-self:center;align-items:center}.text{font-family:\"Sora\", \"Algerian\";text-shadow:0 0 0 #353535, 0 0 1px transparent}.text--primary{color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text--medium{font-size:14px}.text--small{font-size:12px}.btn-cancel{outline:none;border:none;background-color:unset;cursor:pointer}.btn-cancel::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:8px;height:8px;-webkit-mask-image:var(--ez-upload__btn__cancel-image);mask-image:var(--ez-upload__btn__cancel-image)}.iu_header{display:flex;flex-direction:column;width:100%}.iu__label{padding:var(--space--small);box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-upload--font-family);font-size:var(--text--extra-small);font-weight:var(--ez-upload--font-weight);color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.iu__file-icon{outline:none;border:none;background-color:unset;cursor:pointer}.iu__file-icon:disabled{cursor:unset}.iu__file-icon::after{content:'';display:flex;background-color:var(--text--primary, #626e82);width:9px;height:11px;-webkit-mask-image:var(--ez-upload__file-icon-image);mask-image:var(--ez-upload__file-icon-image)}.iu__file-icon:disabled::after{background-color:var(--text--disable, #AFB6C0)}.iu__icon-label{justify-content:center;display:flex;cursor:pointer;padding:var(--ez-upload--padding--large) 0px;box-sizing:border-box}.background--disabled{background-color:var(--color--disable-secondary, #F2F5F8)}.text--disabled{color:var(--text--disable, #AFB6C0)}.mouse-pointer--disabled{cursor:unset}.appearanceNone{width:0px;height:0px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
115516
115601
 
115517
115602
  let EzUpload$1 = class extends HTMLElement$1 {
115518
115603
  constructor() {
@@ -115575,6 +115660,18 @@ let EzUpload$1 = class extends HTMLElement$1 {
115575
115660
  }
115576
115661
  Array.prototype.forEach.call(files, this.addFile.bind(this));
115577
115662
  }
115663
+ /**
115664
+ * Realiza o foco no componente de upload
115665
+ */
115666
+ async setFocus() {
115667
+ this._fileInput.focus();
115668
+ }
115669
+ /**
115670
+ * Remove o foco no componente de upload
115671
+ */
115672
+ async setBlur() {
115673
+ this._fileInput.blur();
115674
+ }
115578
115675
  async addFile(file) {
115579
115676
  const oldFile = this._filePointers.get(file.name);
115580
115677
  if (oldFile) {
@@ -115724,7 +115821,7 @@ let EzUpload$1 = class extends HTMLElement$1 {
115724
115821
  }
115725
115822
  }
115726
115823
  render() {
115727
- return (h("div", { ref: (el) => this._dropZone = el, class: this.evalDisabledClass("iu", "background--disabled") }, h("div", { class: "iu__container", onClick: () => this.openFilesDialog() }, h("div", { class: "iu_header" }, this.label ? h("label", { class: this.evalDisabledClass("iu__label", "text--disabled"), title: this.label }, this.label) : null, h("div", { class: this.evalDisabledClass("iu__icon-label", "mouse-pointer--disabled") }, h("button", { class: "iu__file-icon", disabled: !this.enabled }), 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"))), this.buildFooter()), h("input", { ref: (el) => this._fileInput = el, onChange: (ev) => this.onFileInputChange(ev), type: "file", multiple: true, hidden: true })));
115824
+ return (h("div", { ref: (el) => this._dropZone = el, class: this.evalDisabledClass("iu", "background--disabled") }, h("div", { class: "iu__container", onClick: () => this.openFilesDialog() }, h("div", { class: "iu_header" }, this.label ? h("label", { class: this.evalDisabledClass("iu__label", "text--disabled"), title: this.label }, this.label) : null, h("div", { class: this.evalDisabledClass("iu__icon-label", "mouse-pointer--disabled") }, h("button", { class: "iu__file-icon", disabled: !this.enabled }), 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"))), this.buildFooter()), h("input", { ref: (el) => this._fileInput = el, onChange: (ev) => this.onFileInputChange(ev), type: "file", multiple: true, class: "appearanceNone" })));
115728
115825
  }
115729
115826
  buildFooter() {
115730
115827
  if (this._filePointers.size === 0) {
@@ -116033,6 +116130,13 @@ let TestDu$1 = class extends HTMLElement$1 {
116033
116130
  super();
116034
116131
  this.__registerHost();
116035
116132
  }
116133
+ /*private _ezButton// : HTMLEzButton;
116134
+ private _ezComboBox// : HTMLEzComboBox;
116135
+ private _ezDateInput// : HTMLEzDateInput;
116136
+ private _ezDateTimeInput// : HTMLEzDateTimeInput;
116137
+ private _ezNumberInput// : HTMLEzNumberInput
116138
+ private _ezSearch// : HTMLEzSearch
116139
+ private _ezUpload// : HTMLEzUpload*/
116036
116140
  componentWillLoad() {
116037
116141
  this.dataUnit = new DataUnit("testes_com_formulario");
116038
116142
  this.dataUnit.metadata = {
@@ -18,6 +18,18 @@ let EzButton = class {
18
18
  */
19
19
  this.size = "medium";
20
20
  }
21
+ /**
22
+ * Realiza o foco no botão
23
+ */
24
+ async setFocus() {
25
+ this._button.focus();
26
+ }
27
+ /**
28
+ * Remove o foco no botão
29
+ */
30
+ async setBlur() {
31
+ this._button.blur();
32
+ }
21
33
  getIconSize() {
22
34
  return this.size;
23
35
  }
@@ -39,22 +51,22 @@ let EzButton = class {
39
51
  }
40
52
  render() {
41
53
  if (this.mode == "icon") {
42
- return (h("button", { class: "icon " + this.size, type: "button", disabled: !this.enabled }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize(), onClick: evt => {
54
+ return (h("button", { class: "icon " + this.size, type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize(), onClick: evt => {
43
55
  if (!this.enabled)
44
56
  evt.stopPropagation();
45
57
  } })));
46
58
  }
47
59
  else if (this.mode == "label-icon") {
48
- return (h("div", { class: "label-icon" }, h("button", { class: "icon", type: "button", disabled: !this.enabled }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: "large", onClick: evt => {
60
+ return (h("div", { class: "label-icon" }, h("button", { class: "icon", type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: "large", onClick: evt => {
49
61
  if (!this.enabled)
50
62
  evt.stopPropagation();
51
63
  } })), h("label", { title: this.label }, this.label)));
52
64
  }
53
65
  else if (this.mode == "link") {
54
- return (h("a", { class: this.size }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
66
+ return (h("a", { class: this.size, ref: (el) => this._button = el }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
55
67
  }
56
68
  else {
57
- return (h("button", { type: "button", disabled: !this.enabled }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
69
+ return (h("button", { type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
58
70
  }
59
71
  }
60
72
  };