@sankhyalabs/ezui 1.1.159 → 1.1.161

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/cjs/ez-combo-box.cjs.entry.js +63 -28
  2. package/dist/cjs/ez-date-input.cjs.entry.js +71 -25
  3. package/dist/cjs/ez-date-time-input.cjs.entry.js +94 -31
  4. package/dist/cjs/ez-filter-input.cjs.entry.js +10 -4
  5. package/dist/cjs/ez-form.cjs.entry.js +54 -9
  6. package/dist/cjs/{grid-config.cjs.entry.js → ez-grid-config.cjs.entry.js} +6 -6
  7. package/dist/cjs/ez-grid.cjs.entry.js +16 -9
  8. package/dist/cjs/ez-list.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-number-input.cjs.entry.js +69 -25
  11. package/dist/cjs/ez-search.cjs.entry.js +20 -5
  12. package/dist/cjs/{select-box.cjs.entry.js → ez-select-box.cjs.entry.js} +3 -3
  13. package/dist/cjs/ez-text-area.cjs.entry.js +8 -2
  14. package/dist/cjs/ez-text-input.cjs.entry.js +30 -21
  15. package/dist/cjs/ez-time-input.cjs.entry.js +75 -40
  16. package/dist/cjs/ezui.cjs.js +1 -1
  17. package/dist/cjs/loader.cjs.js +1 -1
  18. package/dist/collection/collection-manifest.json +2 -2
  19. package/dist/collection/components/ez-combo-box/ez-combo-box.css +10 -4
  20. package/dist/collection/components/ez-combo-box/ez-combo-box.js +81 -28
  21. package/dist/collection/components/ez-date-input/ez-date-input.js +87 -25
  22. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +108 -31
  23. package/dist/collection/components/ez-filter-input/ez-filter-input.js +26 -4
  24. package/dist/collection/components/ez-form/DataBinder.js +12 -3
  25. package/dist/collection/components/ez-form/ez-form.js +43 -6
  26. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +7 -3
  27. package/dist/collection/components/ez-grid/ez-grid.css +4 -0
  28. package/dist/collection/components/ez-grid/ez-grid.js +21 -14
  29. package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.css → ez-grid-config/ez-grid-config.css} +46 -20
  30. package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.js → ez-grid-config/ez-grid-config.js} +12 -12
  31. package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.css → ez-select-box/ez-select-box.css} +3 -4
  32. package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.js → ez-select-box/ez-select-box.js} +3 -3
  33. package/dist/collection/components/ez-list/ez-list.css +84 -46
  34. package/dist/collection/components/ez-modal/ez-modal.css +2 -2
  35. package/dist/collection/components/ez-number-input/ez-number-input.js +83 -25
  36. package/dist/collection/components/ez-search/ez-search.js +38 -5
  37. package/dist/collection/components/ez-text-area/ez-text-area.css +1 -1
  38. package/dist/collection/components/ez-text-area/ez-text-area.js +23 -1
  39. package/dist/collection/components/ez-text-input/ez-text-input.css +1 -1
  40. package/dist/collection/components/ez-text-input/ez-text-input.js +45 -38
  41. package/dist/collection/components/ez-time-input/ez-time-input.js +95 -59
  42. package/dist/custom-elements/index.d.ts +12 -12
  43. package/dist/custom-elements/index.js +1121 -810
  44. package/dist/esm/ez-combo-box.entry.js +63 -28
  45. package/dist/esm/ez-date-input.entry.js +71 -25
  46. package/dist/esm/ez-date-time-input.entry.js +94 -31
  47. package/dist/esm/ez-filter-input.entry.js +10 -4
  48. package/dist/esm/ez-form.entry.js +54 -9
  49. package/dist/esm/{grid-config.entry.js → ez-grid-config.entry.js} +6 -6
  50. package/dist/esm/ez-grid.entry.js +16 -9
  51. package/dist/esm/ez-list.entry.js +1 -1
  52. package/dist/esm/ez-modal.entry.js +1 -1
  53. package/dist/esm/ez-number-input.entry.js +69 -25
  54. package/dist/esm/ez-search.entry.js +20 -5
  55. package/dist/esm/{select-box.entry.js → ez-select-box.entry.js} +3 -3
  56. package/dist/esm/ez-text-area.entry.js +8 -2
  57. package/dist/esm/ez-text-input.entry.js +30 -21
  58. package/dist/esm/ez-time-input.entry.js +76 -41
  59. package/dist/esm/ezui.js +1 -1
  60. package/dist/esm/loader.js +1 -1
  61. package/dist/ezui/ezui.esm.js +1 -1
  62. package/dist/ezui/p-003d53b1.entry.js +1 -0
  63. package/dist/ezui/p-1fecaeb8.entry.js +1 -0
  64. package/dist/ezui/p-267fa515.entry.js +1 -0
  65. package/dist/ezui/p-2acf7d59.entry.js +1 -0
  66. package/dist/ezui/p-403de0a4.entry.js +1 -0
  67. package/dist/ezui/p-4c3d136c.entry.js +1 -0
  68. package/dist/ezui/p-53bbba8e.entry.js +1 -0
  69. package/dist/ezui/p-6668c3b0.entry.js +1 -0
  70. package/dist/ezui/p-7fd6deec.entry.js +1 -0
  71. package/dist/ezui/p-8c1b9fe0.entry.js +1 -0
  72. package/dist/ezui/{p-be87ac5e.entry.js → p-8d73594f.entry.js} +1 -1
  73. package/dist/ezui/p-988ff301.entry.js +1 -0
  74. package/dist/ezui/p-cf56d3e8.entry.js +1 -0
  75. package/dist/ezui/{p-727a39e5.entry.js → p-fd6f3bf9.entry.js} +1 -1
  76. package/dist/ezui/p-ff7b4b13.entry.js +1 -0
  77. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +13 -7
  78. package/dist/types/components/ez-date-input/ez-date-input.d.ts +10 -3
  79. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +15 -7
  80. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +5 -1
  81. package/dist/types/components/ez-form/DataBinder.d.ts +1 -1
  82. package/dist/types/components/ez-form/ez-form.d.ts +1 -0
  83. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -1
  84. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
  85. package/dist/types/components/ez-grid/ez-grid.d.ts +9 -6
  86. package/dist/types/components/ez-grid/subcomponents/{gridconfig/grid-config.d.ts → ez-grid-config/ez-grid-config.d.ts} +4 -4
  87. package/dist/types/components/ez-grid/subcomponents/{select-box/select-box.d.ts → ez-select-box/ez-select-box.d.ts} +0 -0
  88. package/dist/types/components/ez-number-input/ez-number-input.d.ts +14 -5
  89. package/dist/types/components/ez-search/ez-search.d.ts +6 -1
  90. package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -0
  91. package/dist/types/components/ez-text-input/ez-text-input.d.ts +7 -6
  92. package/dist/types/components/ez-time-input/ez-time-input.d.ts +17 -13
  93. package/dist/types/components.d.ts +84 -61
  94. package/package.json +1 -1
  95. package/react/components.d.ts +2 -2
  96. package/react/components.js +2 -2
  97. package/react/components.js.map +1 -1
  98. package/dist/ezui/p-1859a3d8.entry.js +0 -1
  99. package/dist/ezui/p-49fdfa4b.entry.js +0 -1
  100. package/dist/ezui/p-4fdceb7d.entry.js +0 -1
  101. package/dist/ezui/p-6d4b1628.entry.js +0 -1
  102. package/dist/ezui/p-8f4fac31.entry.js +0 -1
  103. package/dist/ezui/p-91377c65.entry.js +0 -1
  104. package/dist/ezui/p-b524dfca.entry.js +0 -1
  105. package/dist/ezui/p-bc8aa27f.entry.js +0 -1
  106. package/dist/ezui/p-bea6f8a6.entry.js +0 -1
  107. package/dist/ezui/p-c2de757f.entry.js +0 -1
  108. package/dist/ezui/p-ec21ecce.entry.js +0 -1
  109. package/dist/ezui/p-ecee9d8d.entry.js +0 -1
  110. package/dist/ezui/p-fc9b9487.entry.js +0 -1
@@ -635,7 +635,7 @@ class DataBinder {
635
635
  case core.Action.NEXT_SELECTED:
636
636
  case core.Action.PREVIOUS_SELECTED:
637
637
  (_a = this._fields) === null || _a === void 0 ? void 0 : _a.forEach(field => {
638
- this.updateValue(field.fieldName, field.field);
638
+ this.updateValue(field.fieldName, field.field, action.type === core.Action.EDITION_CANCELED);
639
639
  });
640
640
  break;
641
641
  }
@@ -653,15 +653,24 @@ class DataBinder {
653
653
  onDisconnectedCallback() {
654
654
  this._dataUnit.unsubscribe(this.onDataUnitEvent);
655
655
  }
656
- updateValue(fieldName, field) {
656
+ updateValue(fieldName, field, actionCanceled = false) {
657
+ var _a;
657
658
  field["value"] = this._dataUnit.getFieldValue(fieldName);
659
+ /**
660
+ * FIXME: Campo já salvo com undefined, ao inserir valor inválido e cancelar,
661
+ * o campo não é limpo e atualizado automaticamente, pois o value não mudou,
662
+ * assim, não dispara o Watch do value, que é o responsável por limpar o errorMessage.
663
+ */
664
+ if (actionCanceled && ((_a = field["errorMessage"]) === null || _a === void 0 ? void 0 : _a.trim())) {
665
+ field["errorMessage"] = "";
666
+ }
658
667
  }
659
668
  updateBind(fieldName, field) {
660
669
  const oldBind = this._fields.get(fieldName);
661
670
  if (oldBind) {
662
671
  oldBind.destroy();
663
672
  }
664
- field["value"] = this._dataUnit.getFieldValue(fieldName);
673
+ this.updateValue(fieldName, field);
665
674
  this._fields.set(fieldName, Bind.create(fieldName, field, (fieldName, waitingChange) => this.changeStarted(fieldName, waitingChange), (fieldName) => this.cancelWaitingChange(fieldName), (fieldName, newValue) => this.setFieldValue(fieldName, newValue)));
666
675
  this.bindSearchOptionsLoader(fieldName, field);
667
676
  this.applyEzUploadContext(fieldName, field);
@@ -792,25 +801,58 @@ let EzForm = class {
792
801
  return Promise.resolve();
793
802
  }
794
803
  validate() {
795
- return new Promise((accept, reject) => {
804
+ return new Promise(async (accept, reject) => {
796
805
  const metadata = selectFormMetadata(this._store.getState());
797
806
  const requiredFields = this._staticFields
798
807
  .filter(f => f.dataset.required)
799
808
  .map(f => f.dataset.fieldName)
800
809
  .concat(metadata.getRequiredFields());
810
+ let isReject = false;
801
811
  const records = this.dataUnit.getModifiedRecords();
802
812
  for (let i = 0; i < records.length; i++) {
803
813
  if (!this.validateRequired(requiredFields, records[i])) {
804
- reject();
814
+ isReject = true;
805
815
  break;
806
816
  }
807
817
  }
808
- accept();
818
+ if (!isReject) {
819
+ const validateError = await this.validateError();
820
+ if (!validateError) {
821
+ isReject = true;
822
+ }
823
+ }
824
+ if (isReject) {
825
+ reject();
826
+ }
827
+ else {
828
+ accept();
829
+ }
809
830
  });
810
831
  }
811
832
  observeConfig() {
812
833
  this.processMetadata();
813
834
  }
835
+ async validateError() {
836
+ var _a;
837
+ const invalidFields = [];
838
+ const dataFields = (_a = this._element) === null || _a === void 0 ? void 0 : _a.querySelectorAll("[data-field-name]");
839
+ if (dataFields && dataFields.length > 0) {
840
+ for (let i = 0; i < dataFields.length; i++) {
841
+ const fieldElem = dataFields[i];
842
+ if (fieldElem && fieldElem['isInvalid']) {
843
+ const hasError = await fieldElem['isInvalid']();
844
+ if (hasError && fieldElem['dataset']) {
845
+ invalidFields.push(fieldElem['dataset'].fieldName);
846
+ }
847
+ }
848
+ }
849
+ }
850
+ const isValid = invalidFields.length === 0;
851
+ if (!isValid) {
852
+ ApplicationUtils.ApplicationUtils.info("Há pelo menos um campo com conteúdo inválido.");
853
+ }
854
+ return isValid;
855
+ }
814
856
  validateRequired(requiredFields, record) {
815
857
  const invalidFields = [];
816
858
  requiredFields.forEach(field => {
@@ -823,13 +865,16 @@ let EzForm = class {
823
865
  * na aba, isso será tratado no card: https://sankhya.atlassian.net/browse/SKA-44182
824
866
  */
825
867
  if (fieldElem) {
868
+ /**
869
+ * Devido o StencilJS não possuir Getter e Setter, para casos que o Watch não for chamado,
870
+ * é necessário limpar a propriedade antes de setar o valor novamente, para que o Watch seja disparado novamente,
871
+ * solução necessária para controlar componentes com herança (Exemplo: EzSearch -> EzComboBox -> EzTextInput).
872
+ */
873
+ fieldElem["errorMessage"] = "";
826
874
  if (value === null || value === undefined || value === "") {
827
875
  invalidFields.push(field);
828
876
  fieldElem["errorMessage"] = "Essa informação é obrigatória";
829
877
  }
830
- else {
831
- fieldElem["errorMessage"] = "";
832
- }
833
878
  }
834
879
  });
835
880
  const isValid = invalidFields.length === 0;
@@ -6,9 +6,9 @@ const index = require('./index-c15a9551.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const ApplicationUtils = require('./ApplicationUtils-4a223c7a.js');
8
8
 
9
- const gridConfigCss = ".sc-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__main__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__main__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid__group--font-family:var(--font-pattern, \"Sora\");--ez-grid__group--font-size:var(--text--medium, 14px);--ez-grid__group--font-weight:var(--text-weight--large, 600);--ez-grid__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.padding-right--medium.sc-grid-config{padding-right:var(--space--medium)}ez-list.sc-grid-config{height:100%}.heigth-calc.sc-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-grid-config{padding-top:var(--ez-grid-config__footer--padding-top);display:flex;justify-content:flex-end;width:100%}.hidden.sc-grid-config{display:none}.grid-config__main.sc-grid-config{padding-right:var(--ez-grid-config__main--padding-right);overflow-y:auto}.tabselector-container.sc-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-grid-config{display:flex;justify-content:space-between;align-items:center;width:359px}.subtitle.sc-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-grid-config{display:flex;margin:0;font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight);line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary)}.grid-config__main.sc-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__main__scrollbar--background-color);border-radius:var(--ez-grid-config__main__scrollbar--border-radius)}.grid-config__main.sc-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-grid-config{font-family:var(--ez-grid__group--font-family);font-size:var(--ez-grid__group--font-size);font-weight:var(--ez-grid__group--font-weight);padding-bottom:var(--ez-grid__group--padding-bottom)}";
9
+ const ezGridConfigCss = ".sc-ez-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid-config__group--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__group--font-size:var(--text--medium, 14px);--ez-grid-config__group--font-weight:var(--text-weight--large, 600);--ez-grid-config__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}@media screen and (min-width: 480px){.sc-ez-grid-config-h{width:359px;max-width:359px}}.padding-right--medium.sc-ez-grid-config{padding-right:var(--space--medium)}ez-list.sc-ez-grid-config{height:100%}.height-calc.sc-ez-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-ez-grid-config{display:flex;justify-content:flex-end;width:100%;padding-top:var(--ez-grid-config__footer--padding-top)}.hidden.sc-ez-grid-config{display:none}.grid-config__main.sc-ez-grid-config{overflow-y:auto;padding-right:var(--ez-grid-config__main--padding-right)}.tabselector-container.sc-ez-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-ez-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-ez-grid-config{display:flex;justify-content:space-between;align-items:center;width:100%}.subtitle.sc-ez-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-ez-grid-config{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary);font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight)}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__scrollbar--background-color);border-radius:var(--ez-grid-config__scrollbar--border-radius)}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-ez-grid-config{font-family:var(--ez-grid-config__group--font-family);font-size:var(--ez-grid-config__group--font-size);font-weight:var(--ez-grid-config__group--font-weight);padding-bottom:var(--ez-grid-config__group--padding-bottom)}";
10
10
 
11
- let GridConfig = class {
11
+ let EzGridConfig = class {
12
12
  constructor(hostRef) {
13
13
  index.registerInstance(this, hostRef);
14
14
  this.configFinish = index.createEvent(this, "configFinish", 7);
@@ -90,7 +90,7 @@ let GridConfig = class {
90
90
  if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
91
91
  selectedOption = item.ascending == true ? 'asc' : 'desc';
92
92
  }
93
- return (index.h("div", null, index.h("select-box", { selectedOption: selectedOption, key: 'select-box-' + this._componenteInternalKey + '-' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item.label); } })));
93
+ return (index.h("div", null, index.h("ez-select-box", { selectedOption: selectedOption, key: 'ez-select-box-' + this._componenteInternalKey + '-' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item.label); } })));
94
94
  }
95
95
  updateOrder(sortOrder, updatedItemLabel) {
96
96
  var _a;
@@ -427,10 +427,10 @@ let GridConfig = class {
427
427
  }
428
428
  }
429
429
  render() {
430
- return (index.h(index.Host, null, index.h("div", { class: "grid-config__header" }, index.h("div", { class: "title-container" }, index.h("div", { class: "" }, index.h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), index.h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), index.h("div", { class: "button-close" }, index.h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))), index.h("div", { class: "tabselector-container" }, index.h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o das linhas' })), index.h("div", null, index.h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, index.h("ez-icon", { slot: "leftIcon", size: "medium", iconName: "search" })))), index.h("div", { class: "grid-config__main" }, index.h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), index.h("div", { class: this.selectedTab === "Ordenação das linhas" ? "group-name" : "hidden" }, "Sequ\u00EAncia da ordena\u00E7\u00E3o"), index.h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação das linhas" ? "heigth-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: ev => this.handleOrderListChange(ev), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), index.h("div", { class: "grid-config__footer" }, index.h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), index.h("ez-button", { label: "Concluir", class: "ez-button--primary", onClick: () => this.finish() }))));
430
+ return (index.h(index.Host, null, index.h("div", { class: "grid-config__header" }, index.h("div", { class: "title-container" }, index.h("div", { class: "" }, index.h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), index.h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), index.h("div", { class: "button-close" }, index.h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))), index.h("div", { class: "tabselector-container" }, index.h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o das linhas' })), index.h("div", null, index.h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, index.h("ez-icon", { slot: "leftIcon", size: "medium", iconName: "search" })))), index.h("div", { class: "grid-config__main" }, index.h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), index.h("div", { class: this.selectedTab === "Ordenação das linhas" ? "group-name" : "hidden" }, "Sequ\u00EAncia da ordena\u00E7\u00E3o"), index.h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação das linhas" ? "height-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: ev => this.handleOrderListChange(ev), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), index.h("div", { class: "grid-config__footer" }, index.h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), index.h("ez-button", { label: "Concluir", class: "ez-button--primary", onClick: () => this.finish() }))));
431
431
  }
432
432
  static get assetsDirs() { return ["../assets"]; }
433
433
  };
434
- GridConfig.style = gridConfigCss;
434
+ EzGridConfig.style = ezGridConfigCss;
435
435
 
436
- exports.grid_config = GridConfig;
436
+ exports.ez_grid_config = EzGridConfig;
@@ -110079,7 +110079,7 @@ class DataSource {
110079
110079
 
110080
110080
  class AgGridController {
110081
110081
  constructor(enterprise) {
110082
- this.DEFAULT_ROW_HEIGHT = 25;
110082
+ this.DEFAULT_ROW_HEIGHT = 30;
110083
110083
  this.CHECK_BOX_COL_ID = "checkBoxColumn";
110084
110084
  this.RECORD_ARCHIVE_COL_ID = "__RECORD_ARCHIVE__";
110085
110085
  this.BLOCK_LOAD_DEBOUNCE = 400;
@@ -110142,7 +110142,7 @@ class AgGridController {
110142
110142
  //dos blocos, então, quando removemos uma linha, a altura do bloco não é recalculada.
110143
110143
  //Descobri que setando manualmente a altura das linhas, apesar do bloco ficar com
110144
110144
  //tamanho errado, isso afeta menos o componente.
110145
- rowHeight: this.DEFAULT_ROW_HEIGHT
110145
+ getRowHeight: this.getRowHeight.bind(this)
110146
110146
  };
110147
110147
  this.setOptionsEvents(this._gridOptions);
110148
110148
  this.setOptionsPagination(this._gridOptions);
@@ -110156,8 +110156,12 @@ class AgGridController {
110156
110156
  this._lastPageStatus = this.getPaginationStatus();
110157
110157
  //Atualiza estado da seleção inicial
110158
110158
  this.onSelectionChange();
110159
+ this._gridOptions.api.setHeaderHeight(this.getRowHeight());
110159
110160
  }
110160
110161
  }
110162
+ getRowHeight() {
110163
+ return this.DEFAULT_ROW_HEIGHT;
110164
+ }
110161
110165
  setOptionsEvents(opt) {
110162
110166
  opt.onSortChanged = e => this.onCallStateChange("sort", e);
110163
110167
  opt.onColumnResized = e => this.onCallStateChange("columnResize", e);
@@ -110285,7 +110289,7 @@ class AgGridController {
110285
110289
  throw new Error("Erro interno: Grid ainda não inicializado.");
110286
110290
  }
110287
110291
  const colDef = this._gridOptions.columnApi.getAllColumns();
110288
- return colDef.map(c => {
110292
+ return colDef.filter(c => c.getColId() !== "checkBoxColumn").map(c => {
110289
110293
  const def = c.getColDef();
110290
110294
  const colDef = { name: def.field, label: def.headerName };
110291
110295
  this.conditionalSet(colDef, "sortable", def.sortable);
@@ -110781,6 +110785,14 @@ let EzGrid = class {
110781
110785
  async hasPreviousRecord() {
110782
110786
  return Promise.resolve(this._gridController.hasPreviousRecord());
110783
110787
  }
110788
+ /**
110789
+ * Método para abrir a configuração da grid.
110790
+ */
110791
+ async openGridConfig() {
110792
+ this._gridConfig.columns = this._gridController.getColumnsState().filter(c => c.name);
110793
+ this._gridConfig.selectedTab = "Colunas";
110794
+ this._popUpGridConfig = true;
110795
+ }
110784
110796
  componentWillLoad() {
110785
110797
  if (this.dataUnit) {
110786
110798
  this._dataUnitBridge = new DataUnitBridge(this._gridController, this.dataUnit);
@@ -110898,13 +110910,8 @@ let EzGrid = class {
110898
110910
  closeGridConfig() {
110899
110911
  this._popUpGridConfig = false;
110900
110912
  }
110901
- openGridConfig() {
110902
- this._gridConfig.columns = this._gridController.getColumnsState().filter(c => c.name);
110903
- this._gridConfig.selectedTab = "Colunas";
110904
- this._popUpGridConfig = true;
110905
- }
110906
110913
  render() {
110907
- return (index.h(index.Host, null, index.h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, index.h("div", { class: "grid-header__container" }, index.h("slot", { name: "leftButtons" })), index.h("div", { class: "grid-header__container" }, this.getPaginationControl())), index.h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), index.h("div", { class: "grid__footer" }), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("grid-config", { ref: ref => this._gridConfig = ref, config: this.config, selectedTab: "Colunas", onConfigFinish: evt => { this.observeConfig(evt.detail); this.configChange.emit(evt.detail); }, onConfigCancel: _evt => this.closeGridConfig() }))));
110914
+ return (index.h(index.Host, null, index.h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, index.h("div", { class: "grid-header__container" }, index.h("slot", { name: "leftButtons" })), index.h("div", { class: "grid-header__container" }, this.getPaginationControl())), index.h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), index.h("div", { class: "grid__footer" }), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("ez-grid-config", { ref: ref => this._gridConfig = ref, config: this.config, selectedTab: "Colunas", onConfigFinish: evt => { this.observeConfig(evt.detail); this.configChange.emit(evt.detail); }, onConfigCancel: _evt => this.closeGridConfig() }))));
110908
110915
  }
110909
110916
  static get assetsDirs() { return ["../assets"]; }
110910
110917
  static get watchers() { return {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-c15a9551.js');
6
6
 
7
- const ezListCss = ":host{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon__padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item__margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, \"Sora\");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item__border-radius:var(--border--radius-small, 6px);--ez-list__selected-item__background:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, \"Sora\");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group__overlay--font-family:var(--font-pattern, \"Sora\");--ez-list__group__overlay--font-size:var(--text--medium, 14px);--ez-list__group-container__scrollbar--border-radius:var(--border--radius-large, 24px);--ez-list__group-container__scrollbar--width:var(--space--medium, 12px);--ez-list__group-container__scrollbar--background-color:var(--text--primary, #626e82);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__draggable__list--padding-bottom:var(--space--small, 6px);--ez-list__last-droppable-space--height:var(--space--small, 6px);--ez-list__draggable__scrollbar--border-radius:var(--border--radius-large, 24px);--ez-list__draggable__scrollbar--width:var(--space--medium, 12px);--ez-list__draggable__scrollbar--background-color:var(--text--primary, #626e82);--ez-list__draggable__icon--image:url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}p{margin:0}.draggable{display:flex;align-items:center;border-top:1px dashed #fff;justify-content:space-between;background-color:#fff;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);flex:1}.dragging{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.item-content{display:flex;justify-content:center;align-items:center}.draggable-list{color:var(--text-color);padding:0;margin:0;width:100%;max-height:100%}.draggable-list li{background-color:#fff;display:flex;margin:var(--ez-list__item__margin);font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color);height:32px}.over{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space{height:var(--ez-list__last-droppable-space--height)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-list::-webkit-scrollbar-track{background-color:#f0f2f5}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable__scrollbar--background-color);border-radius:var(--ez-list__draggable__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__draggable__scrollbar--width);max-width:var(--ez-list__draggable__scrollbar--width);min-width:var(--ez-list__draggable__scrollbar--width)}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;background-color:var(--ez-list__icon--color);width:18px;height:18px;-webkit-mask-image:var(--ez-list__draggable__icon--image);mask-image:var(--ez-list__draggable__icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.group-container{display:flex;flex-direction:column;max-height:100%;overflow-y:auto;outline:none;width:100%}.group-name{font-family:var(--ez-list__group--font-family);font-size:var(--ez-list__group--font-size);font-weight:var(--ez-list__group--font-weight);padding-bottom:var(--ez-list__group--padding-bottom);-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.group{display:flex;flex-direction:column}.group-container::-webkit-scrollbar-track{background-color:#f0f2f5}.group-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__group-container__scrollbar--background-color);border-radius:var(--ez-list__group-container__scrollbar--border-radius)}.group-container::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__group-container__scrollbar--width);max-width:var(--ez-list__group-container__scrollbar--width);min-width:var(--ez-list__group-container__scrollbar--width)}.section-container{display:flex;position:relative;height:100%}.items-container{width:100%;max-height:100%;overflow-y:auto;outline:none}.group-items-container{width:100%;max-height:100%;height:100%;outline:none}.items-container::-webkit-scrollbar-track{background-color:#f0f2f5}.items-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable__scrollbar--background-color);border-radius:var(--ez-list__draggable__scrollbar--border-radius)}.items-container::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__draggable__scrollbar--width);max-width:var(--ez-list__draggable__scrollbar--width);min-width:var(--ez-list__draggable__scrollbar--width)}.group-overlay{font-family:var(--ez-list__group__overlay--font-family);font-size:var(--ez-list__group__overlay--font-size);background:rgba(226, 244, 239, 0.8);border:1px solid #008561;border-radius:8px;position:absolute;display:none;place-items:center;top:0;bottom:0;left:0;right:0;z-index:2;margin:0;cursor:pointer}.presetedHeight{min-height:100px}.overlay-text{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item{background:var(--ez-list__selected-item__background);border-radius:var(--ez-list__selected-item__border-radius)}.slot-item{align-items:flex-end}.overGroup{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}";
7
+ const ezListCss = ":host{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon--padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item--margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, \"Sora\");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, \"Sora\");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group-overlay--font-family:var(--font-pattern, \"Sora\");--ez-list__group-overlay--font-size:var(--text--medium, 14px);--ez-list__group-container-scrollbar--border-radius:var(--border--radius-small, 6px);--ez-list__group-container-scrollbar--width:var(--space--medium, 12px);--ez-list__group-container-scrollbar--background-color-primary:var(--scrollbar--primary, #2B3A54);--ez-list__group-container-scrollbar--background-color-secondary:var(--scrollbar--secondary, #E5EAF0);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__last-droppable-space--height:var(--space--small, 6px);--ez-list__draggable-scrollbar--border-radius:var(--border--radius-small, 6px);--ez-list__draggable-scrollbar--width:var(--space--medium, 12px);--ez-list__draggable-scrollbar--background-color-primary:var(--scrollbar--primary, #2B3A54);--ez-list__draggable-scrollbar--background-color-secondary:var(--scrollbar--secondary, #E5EAF0);--ez-list__draggable-list--padding-bottom:var(--space--small, 6px);--ez-list__draggable-icon--image:url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}p{margin:0}.draggable{display:flex;align-items:center;border-top:1px dashed #fff;justify-content:space-between;background-color:#fff;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);flex:1;width:100%}.dragging{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.item-content{display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 41px)}.draggable-list{color:var(--text-color);padding:0;margin:0;width:100%;max-height:100%;scrollbar-width:thin;scrollbar-color:var(--ez-list__draggable-scrollbar--background-color-primary) var(--ez-list__draggable-scrollbar--background-color-secondary)}.draggable-list li{background-color:#fff;display:flex;margin:var(--ez-list__item--margin);font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color);height:32px}.over{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space{height:var(--ez-list__last-droppable-space--height)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-list::-webkit-scrollbar-track{background-color:var(--ez-list__draggable-scrollbar--background-color-secondary)}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable-scrollbar--background-color-primary);border-radius:var(--ez-list__draggable-scrollbar--border-radius)}.draggable-list::-webkit-scrollbar{background-color:var(--ez-list__draggable-scrollbar--background-color-secondary);width:var(--ez-list__draggable-scrollbar--width);max-width:var(--ez-list__draggable-scrollbar--width);min-width:var(--ez-list__draggable-scrollbar--width)}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;background-color:var(--ez-list__icon--color);width:18px;height:18px;-webkit-mask-image:var(--ez-list__draggable-icon--image);mask-image:var(--ez-list__draggable-icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.group-container{display:flex;flex-direction:column;max-height:100%;overflow-y:auto;outline:none;width:100%;scrollbar-width:thin;scrollbar-color:var(--ez-list__group-container-scrollbar--background-color-primary) var(--ez-list__group-container-scrollbar--background-color-secondary)}.group-name{font-family:var(--ez-list__group--font-family);font-size:var(--ez-list__group--font-size);font-weight:var(--ez-list__group--font-weight);padding-bottom:var(--ez-list__group--padding-bottom);-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.group{display:flex;flex-direction:column}.group-container::-webkit-scrollbar-track{background-color:var(--ez-list__group-container-scrollbar--background-color-secondary)}.group-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__group-container-scrollbar--background-color-primary);border-radius:var(--ez-list__group-container-scrollbar--border-radius)}.group-container::-webkit-scrollbar{background-color:var(--ez-list__group-container-scrollbar--background-color-secondary);width:var(--ez-list__group-container-scrollbar--width);max-width:var(--ez-list__group-container-scrollbar--width);min-width:var(--ez-list__group-container-scrollbar--width)}.section-container{display:flex;position:relative;height:100%}.items-container{width:100%;max-height:100%;overflow-y:auto;outline:none;scrollbar-width:thin;scrollbar-color:var(--ez-list__draggable-scrollbar--background-color-primary) var(--ez-list__draggable-scrollbar--background-color-secondary)}.group-items-container{width:100%;max-height:100%;height:100%;outline:none}.items-container::-webkit-scrollbar-track{background-color:var(--ez-list__draggable-scrollbar--background-color-secondary)}.items-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable-scrollbar--background-color-primary);border-radius:var(--ez-list__draggable-scrollbar--border-radius)}.items-container::-webkit-scrollbar{background-color:var(--ez-list__draggable-scrollbar--background-color-secondary);width:var(--ez-list__draggable-scrollbar--width);max-width:var(--ez-list__draggable-scrollbar--width);min-width:var(--ez-list__draggable-scrollbar--width)}.group-overlay{font-family:var(--ez-list__group-overlay--font-family);font-size:var(--ez-list__group-overlay--font-size);background:rgba(226, 244, 239, 0.8);border:1px solid #008561;border-radius:8px;position:absolute;display:none;place-items:center;top:0;bottom:0;left:0;right:0;z-index:2;margin:0;cursor:pointer}.presetedHeight{min-height:100px}.overlay-text{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item{background:var(--ez-list__selected-item--background-color);border-radius:var(--ez-list__selected-item--border-radius)}.slot-item{align-items:flex-end}.overGroup{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}";
8
8
 
9
9
  let EzList = class {
10
10
  constructor(hostRef) {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-c15a9551.js');
6
6
 
7
- const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:calc(100% - 48px);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.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%}}";
7
+ const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.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%}}";
8
8
 
9
9
  let EzModal = class {
10
10
  constructor(hostRef) {
@@ -14,6 +14,7 @@ let EzNumberInput = class {
14
14
  this.ezChange = index.createEvent(this, "ezChange", 7);
15
15
  this.ezStartChange = index.createEvent(this, "ezStartChange", 7);
16
16
  this.ezCancelWaitingChange = index.createEvent(this, "ezCancelWaitingChange", 7);
17
+ this._focused = false;
17
18
  /**
18
19
  * Deixa o campo disponível ou não para uso.
19
20
  */
@@ -35,66 +36,109 @@ let EzNumberInput = class {
35
36
  async setBlur() {
36
37
  this._textInput.setBlur();
37
38
  }
39
+ /**
40
+ * Retorna informando se o campo está inválido (true | false)
41
+ */
42
+ async isInvalid() {
43
+ return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
44
+ }
38
45
  observeLabel() {
39
46
  if (this._textInput) {
40
47
  this._textInput.label = this.label;
41
48
  }
42
49
  }
43
50
  observeErrorMessage() {
51
+ var _a;
44
52
  if (this._textInput) {
45
53
  this._textInput.errorMessage = this.errorMessage;
54
+ if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
55
+ this.setInputValue();
56
+ }
46
57
  }
47
58
  }
48
- observeValue() {
49
- if (this._textInput) {
50
- this._textInput.value = this.getTextValue(this.value) || '';
59
+ observeValue(newValue, oldValue) {
60
+ if (this._textInput && newValue != oldValue) {
61
+ const newValueValidated = this.validateValue(newValue);
62
+ const oldValueValidated = this.validateValue(oldValue);
63
+ if (newValueValidated != oldValueValidated) {
64
+ const textValue = this.getTextValue(newValueValidated) || '';
65
+ if ((this._textInput.value || '') !== textValue) {
66
+ const parsedNumber = this.getParsedNumber(textValue);
67
+ if (parsedNumber !== undefined || !this._focused) {
68
+ this._textInput.value = textValue;
69
+ this._focused = false;
70
+ this.errorMessage = "";
71
+ }
72
+ }
73
+ const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
74
+ this.ezChange.emit(valueEmitted);
75
+ }
51
76
  }
52
77
  }
78
+ validateValue(value) {
79
+ return isNaN(value) || value === undefined ? null : value;
80
+ }
81
+ getTextValue(value) {
82
+ if (value != undefined) {
83
+ return this.precision > 0 ? core.NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
84
+ }
85
+ return undefined;
86
+ }
53
87
  changeValue(newValue) {
54
88
  this.errorMessage = "";
55
- if (newValue !== this.value) {
56
- this.value = newValue;
57
- this.ezChange.emit(this.value);
58
- return true;
89
+ if (this.value != newValue) {
90
+ this.value = newValue === undefined ? null : newValue;
59
91
  }
60
92
  else {
61
- this.observeValue();
93
+ this.ezCancelWaitingChange.emit();
62
94
  }
63
- return false;
64
95
  }
65
- parseNumber() {
66
- const parsedNumber = this._textInput.value ? core.NumberUtils.stringToNumber(this._textInput.value) : undefined;
96
+ setError(msg) {
97
+ this.value = null;
98
+ this.errorMessage = msg;
99
+ this.ezCancelWaitingChange.emit();
100
+ }
101
+ handleBlur() {
102
+ const parsedNumber = this.getParsedNumber();
67
103
  if (parsedNumber !== undefined && isNaN(parsedNumber)) {
68
- this.ezCancelWaitingChange.emit();
69
- this.errorMessage = "O valor digitado não é um número válido";
104
+ this.setError("O valor digitado não é um número válido");
70
105
  }
71
106
  else {
72
107
  try {
73
- if (!this.changeValue(parsedNumber)) {
74
- this.ezCancelWaitingChange.emit();
75
- }
108
+ this.changeValue(parsedNumber);
76
109
  }
77
110
  catch (e) {
78
- this.ezCancelWaitingChange.emit();
79
- this.errorMessage = e.message;
111
+ this.setError(e.message);
80
112
  return;
81
113
  }
82
114
  }
83
115
  }
84
- getTextValue(value) {
85
- if (value) {
86
- return this.precision > 0 ? core.NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
116
+ handleInput() {
117
+ const parsedNumber = this.getParsedNumber();
118
+ if (parsedNumber !== this.value) {
119
+ this._focused = true;
120
+ this.ezStartChange.emit({ waitmessage: "", blocking: false });
87
121
  }
88
- return undefined;
89
122
  }
90
- startChange() {
91
- this.ezStartChange.emit({ waitmessage: "", blocking: false });
123
+ getParsedNumber(value) {
124
+ var _a;
125
+ if (value === void 0) {
126
+ value = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value;
127
+ }
128
+ return (value === null || value === void 0 ? void 0 : value.trim()) ? core.NumberUtils.stringToNumber(value) : undefined;
129
+ }
130
+ setInputValue() {
131
+ const textValue = this.getTextValue(this.value) || '';
132
+ if ((this._textInput.value || '') !== textValue) {
133
+ this._textInput.value = textValue;
134
+ }
92
135
  }
93
136
  componentDidLoad() {
94
137
  CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
138
+ this.setInputValue();
95
139
  }
96
140
  render() {
97
- return (index.h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label, onInput: () => this.startChange(), value: this.getTextValue(this.value), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }));
141
+ return (index.h("ez-text-input", { ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }));
98
142
  }
99
143
  get _elem() { return index.getElement(this); }
100
144
  static get watchers() { return {
@@ -33,6 +33,11 @@ let EzSearch = class {
33
33
  */
34
34
  this.mode = "regular";
35
35
  }
36
+ observeErrorMessage() {
37
+ if (this._comboElement) {
38
+ this._comboElement.errorMessage = this.errorMessage;
39
+ }
40
+ }
36
41
  observeValue() {
37
42
  if (this._comboElement) {
38
43
  this._comboElement.value = this.value;
@@ -50,20 +55,30 @@ let EzSearch = class {
50
55
  async setBlur() {
51
56
  this._comboElement.setBlur();
52
57
  }
53
- onComboChange(evt) {
54
- evt.stopPropagation();
55
- this.value = evt.detail;
56
- this.ezChange.emit(evt.detail);
58
+ /**
59
+ * Retorna informando se o campo está inválido (true | false)
60
+ */
61
+ async isInvalid() {
62
+ return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
63
+ }
64
+ onComboChange(event) {
65
+ event.stopPropagation();
66
+ this.value = event.detail;
67
+ this.ezChange.emit(event.detail);
68
+ if (this.errorMessage !== this._comboElement.errorMessage) {
69
+ this.errorMessage = this._comboElement.errorMessage;
70
+ }
57
71
  }
58
72
  componentDidLoad() {
59
73
  CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._comboElement);
60
74
  }
61
75
  render() {
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 }));
76
+ 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: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode }));
63
77
  }
64
78
  ;
65
79
  get _elem() { return index.getElement(this); }
66
80
  static get watchers() { return {
81
+ "errorMessage": ["observeErrorMessage"],
67
82
  "value": ["observeValue"]
68
83
  }; }
69
84
  };
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-c15a9551.js');
6
6
 
7
- const selectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
7
+ const ezSelectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
8
8
 
9
9
  let SelectBox = class {
10
10
  constructor(hostRef) {
@@ -17,6 +17,6 @@ let SelectBox = class {
17
17
  }
18
18
  static get assetsDirs() { return ["../assets"]; }
19
19
  };
20
- SelectBox.style = selectBoxCss;
20
+ SelectBox.style = ezSelectBoxCss;
21
21
 
22
- exports.select_box = SelectBox;
22
+ exports.ez_select_box = SelectBox;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-c15a9551.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--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)}";
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-area--font-weight);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) {
@@ -82,6 +82,12 @@ let EzTextArea = class {
82
82
  async setBlur() {
83
83
  this._inputElem.blur();
84
84
  }
85
+ /**
86
+ * Retorna informando se o campo está inválido (true | false)
87
+ */
88
+ async isInvalid() {
89
+ return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
90
+ }
85
91
  //---------------------------------------------
86
92
  // Private methods
87
93
  //---------------------------------------------
@@ -140,7 +146,7 @@ let EzTextArea = class {
140
146
  render() {
141
147
  return (index.h(index.Host, null, index.h("div", { class: "textarea", ref: (el) => this._container = el }, this.label && this.mode != "slim" ?
142
148
  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)
143
- : 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" &&
149
+ : 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" &&
144
150
  index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
145
151
  }
146
152
  get _hostElement() { return index.getElement(this); }