@sankhyalabs/ezui 1.1.135 → 1.1.138

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 (127) hide show
  1. package/dist/cjs/ez-calendar.cjs.entry.js +2 -2
  2. package/dist/cjs/ez-check.cjs.entry.js +3 -3
  3. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-combo-box.cjs.entry.js +5 -5
  5. package/dist/cjs/ez-date-input.cjs.entry.js +10 -10
  6. package/dist/cjs/ez-date-time-input.cjs.entry.js +8 -8
  7. package/dist/cjs/ez-filter-input.cjs.entry.js +6 -6
  8. package/dist/cjs/ez-form.cjs.entry.js +36 -5
  9. package/dist/cjs/ez-grid.cjs.entry.js +4 -4
  10. package/dist/cjs/ez-modal.cjs.entry.js +3 -3
  11. package/dist/cjs/ez-number-input.cjs.entry.js +25 -18
  12. package/dist/cjs/ez-popover.cjs.entry.js +2 -2
  13. package/dist/cjs/ez-search.cjs.entry.js +2 -2
  14. package/dist/cjs/ez-text-area.cjs.entry.js +11 -11
  15. package/dist/cjs/ez-text-input.cjs.entry.js +22 -15
  16. package/dist/cjs/ez-time-input.cjs.entry.js +36 -30
  17. package/dist/cjs/ez-upload.cjs.entry.js +5 -5
  18. package/dist/cjs/ez-view-stack.cjs.entry.js +71 -0
  19. package/dist/cjs/ezui.cjs.js +1 -1
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/cjs/test-du.cjs.entry.js +43 -10
  22. package/dist/collection/collection-manifest.json +1 -0
  23. package/dist/collection/components/ez-calendar/ez-calendar.js +2 -2
  24. package/dist/collection/components/ez-check/ez-check.js +3 -3
  25. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +14 -2
  26. package/dist/collection/components/ez-combo-box/ez-combo-box.js +5 -5
  27. package/dist/collection/components/ez-date-input/ez-date-input.js +10 -10
  28. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +8 -8
  29. package/dist/collection/components/ez-filter-input/ez-filter-input.js +6 -6
  30. package/dist/collection/components/ez-form/ez-form.js +17 -2
  31. package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +19 -3
  32. package/dist/collection/components/ez-grid/ez-grid.js +4 -4
  33. package/dist/collection/components/ez-modal/ez-modal.js +3 -3
  34. package/dist/collection/components/ez-number-input/ez-number-input.js +26 -19
  35. package/dist/collection/components/ez-popover/ez-popover.js +2 -2
  36. package/dist/collection/components/ez-search/ez-search.js +2 -2
  37. package/dist/collection/components/ez-text-area/ez-text-area.js +11 -11
  38. package/dist/collection/components/ez-text-input/ez-text-input.js +40 -15
  39. package/dist/collection/components/ez-time-input/ez-time-input.js +52 -31
  40. package/dist/collection/components/ez-upload/ez-upload.css +1 -0
  41. package/dist/collection/components/ez-upload/ez-upload.js +4 -4
  42. package/dist/collection/components/ez-view-stack/ez-view-stack.css +9 -0
  43. package/dist/collection/components/ez-view-stack/ez-view-stack.js +87 -0
  44. package/dist/collection/components/test-du/test-du.js +44 -10
  45. package/dist/custom-elements/index.d.ts +6 -0
  46. package/dist/custom-elements/index.js +293 -142
  47. package/dist/esm/ez-calendar.entry.js +2 -2
  48. package/dist/esm/ez-check.entry.js +3 -3
  49. package/dist/esm/ez-collapsible-box.entry.js +1 -1
  50. package/dist/esm/ez-combo-box.entry.js +5 -5
  51. package/dist/esm/ez-date-input.entry.js +10 -10
  52. package/dist/esm/ez-date-time-input.entry.js +8 -8
  53. package/dist/esm/ez-filter-input.entry.js +6 -6
  54. package/dist/esm/ez-form.entry.js +36 -5
  55. package/dist/esm/ez-grid.entry.js +4 -4
  56. package/dist/esm/ez-modal.entry.js +3 -3
  57. package/dist/esm/ez-number-input.entry.js +25 -18
  58. package/dist/esm/ez-popover.entry.js +2 -2
  59. package/dist/esm/ez-search.entry.js +2 -2
  60. package/dist/esm/ez-text-area.entry.js +11 -11
  61. package/dist/esm/ez-text-input.entry.js +22 -15
  62. package/dist/esm/ez-time-input.entry.js +37 -31
  63. package/dist/esm/ez-upload.entry.js +5 -5
  64. package/dist/esm/ez-view-stack.entry.js +67 -0
  65. package/dist/esm/ezui.js +1 -1
  66. package/dist/esm/loader.js +1 -1
  67. package/dist/esm/test-du.entry.js +43 -10
  68. package/dist/ezui/ezui.esm.js +1 -1
  69. package/dist/ezui/p-248361f5.entry.js +1 -0
  70. package/dist/ezui/p-30e3793f.entry.js +1 -0
  71. package/dist/ezui/p-4c3cd534.entry.js +1 -0
  72. package/dist/ezui/p-517d7759.entry.js +1 -0
  73. package/dist/ezui/{p-5f2add6f.entry.js → p-51cdfa9e.entry.js} +1 -1
  74. package/dist/ezui/p-659df655.entry.js +1 -0
  75. package/dist/ezui/p-6d4b1628.entry.js +1 -0
  76. package/dist/ezui/p-8be1a4d6.entry.js +1 -0
  77. package/dist/ezui/p-b65e22a1.entry.js +1 -0
  78. package/dist/ezui/p-b8d64970.entry.js +1 -0
  79. package/dist/ezui/{p-c6c91589.entry.js → p-c246e251.entry.js} +1 -1
  80. package/dist/ezui/p-c2de757f.entry.js +1 -0
  81. package/dist/ezui/p-c620258b.entry.js +1 -0
  82. package/dist/ezui/p-cabe3671.entry.js +1 -0
  83. package/dist/ezui/p-cb73bee7.entry.js +1 -0
  84. package/dist/ezui/p-db0981c1.entry.js +1 -0
  85. package/dist/ezui/p-dd6f4872.entry.js +1 -0
  86. package/dist/ezui/p-ec8419f1.entry.js +1 -0
  87. package/dist/ezui/p-fc9b9487.entry.js +1 -0
  88. package/dist/types/components/ez-calendar/ez-calendar.d.ts +1 -1
  89. package/dist/types/components/ez-check/ez-check.d.ts +1 -1
  90. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -1
  91. package/dist/types/components/ez-date-input/ez-date-input.d.ts +3 -3
  92. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +3 -3
  93. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +3 -3
  94. package/dist/types/components/ez-form/ez-form.d.ts +1 -1
  95. package/dist/types/components/ez-form/structure/FormSheetMetadata.d.ts +3 -0
  96. package/dist/types/components/ez-grid/ez-grid.d.ts +1 -1
  97. package/dist/types/components/ez-modal/ez-modal.d.ts +1 -1
  98. package/dist/types/components/ez-number-input/ez-number-input.d.ts +3 -3
  99. package/dist/types/components/ez-popover/ez-popover.d.ts +1 -1
  100. package/dist/types/components/ez-search/ez-search.d.ts +1 -1
  101. package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -4
  102. package/dist/types/components/ez-text-input/ez-text-input.d.ts +8 -4
  103. package/dist/types/components/ez-time-input/ez-time-input.d.ts +9 -3
  104. package/dist/types/components/ez-upload/ez-upload.d.ts +2 -2
  105. package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +16 -0
  106. package/dist/types/components/test-du/test-du.d.ts +1 -0
  107. package/dist/types/components.d.ts +29 -0
  108. package/package.json +1 -1
  109. package/react/components.d.ts +1 -0
  110. package/react/components.js +1 -0
  111. package/react/components.js.map +1 -1
  112. package/dist/ezui/p-097d5dc6.entry.js +0 -1
  113. package/dist/ezui/p-0fd2624d.entry.js +0 -1
  114. package/dist/ezui/p-1587cbbc.entry.js +0 -1
  115. package/dist/ezui/p-18d67107.entry.js +0 -1
  116. package/dist/ezui/p-49f70be3.entry.js +0 -1
  117. package/dist/ezui/p-50038ae3.entry.js +0 -1
  118. package/dist/ezui/p-53110643.entry.js +0 -1
  119. package/dist/ezui/p-67d30ea7.entry.js +0 -1
  120. package/dist/ezui/p-685a35b3.entry.js +0 -1
  121. package/dist/ezui/p-699c31d1.entry.js +0 -1
  122. package/dist/ezui/p-6c22c9f9.entry.js +0 -1
  123. package/dist/ezui/p-a1304302.entry.js +0 -1
  124. package/dist/ezui/p-b2cc27e5.entry.js +0 -1
  125. package/dist/ezui/p-b71d454d.entry.js +0 -1
  126. package/dist/ezui/p-dcf5f013.entry.js +0 -1
  127. package/dist/ezui/p-e472517c.entry.js +0 -1
@@ -164,7 +164,7 @@ let EzCalendar$1 = class extends HTMLElement$1 {
164
164
  this._floatingID = undefined;
165
165
  }
166
166
  }
167
- valueChanged() {
167
+ observeValue() {
168
168
  if (this.value) {
169
169
  this._currentPosition.setTime(this.value.getTime());
170
170
  this._currentPosition.setDate(1);
@@ -307,7 +307,7 @@ let EzCalendar$1 = class extends HTMLElement$1 {
307
307
  })))))));
308
308
  }
309
309
  static get watchers() { return {
310
- "value": ["valueChanged"]
310
+ "value": ["observeValue"]
311
311
  }; }
312
312
  static get style() { return ezCalendarCss; }
313
313
  };
@@ -332,7 +332,7 @@ let EzCheck$1 = class extends HTMLElement$1 {
332
332
  */
333
333
  this.mode = "regular";
334
334
  }
335
- adjustMode() {
335
+ observeMode() {
336
336
  if (this.mode === "switch") {
337
337
  this._inputElem.classList.remove("regularMode");
338
338
  this._inputElem.classList.add("switchMode");
@@ -358,7 +358,7 @@ let EzCheck$1 = class extends HTMLElement$1 {
358
358
  this._inputElem.focus();
359
359
  }
360
360
  componentDidLoad() {
361
- this.adjustMode();
361
+ this.observeMode();
362
362
  }
363
363
  changeValue() {
364
364
  if (!this.enabled) {
@@ -378,7 +378,7 @@ let EzCheck$1 = class extends HTMLElement$1 {
378
378
  return (h(Host, null, h("input", { type: "checkbox", class: "regularMode", checked: this.value === true, onChange: () => { this.changeValue(); }, disabled: !this.enabled, ref: (el) => this._inputElem = el }), this.label ? h("label", { class: this.getLabelClasses(), onClick: () => { this.changeValue(); }, title: this.label }, this.label) : undefined));
379
379
  }
380
380
  static get watchers() { return {
381
- "mode": ["adjustMode"]
381
+ "mode": ["observeMode"]
382
382
  }; }
383
383
  static get style() { return ezCheckCss; }
384
384
  };
@@ -479,7 +479,7 @@ let EzChip$1 = class extends HTMLElement$1 {
479
479
  static get style() { return ezChipCss; }
480
480
  };
481
481
 
482
- const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;margin-bottom:var(--space--medium, 12px)}.collapsible-box__label{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition);--ez-icon--color:var(--ez-collapsible-box__icon--color, --ez-collapsible-box--color)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--stretched{width:100%;justify-content:space-between}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
482
+ const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--stretched{width:100%;justify-content:space-between}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
483
483
 
484
484
  let EzCollapsibleBox$1 = class extends HTMLElement$1 {
485
485
  constructor() {
@@ -589,7 +589,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
589
589
  */
590
590
  this.mode = "regular";
591
591
  }
592
- observerValue() {
592
+ observeValue() {
593
593
  if (this._inputElement) {
594
594
  this._inputElement.value = this.getText();
595
595
  }
@@ -705,7 +705,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
705
705
  this.ezChange.emit(adjustedOpt);
706
706
  }
707
707
  else {
708
- this.observerValue();
708
+ this.observeValue();
709
709
  }
710
710
  }
711
711
  updateSource(source) {
@@ -737,7 +737,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
737
737
  this.selectOption(undefined);
738
738
  }
739
739
  else {
740
- this.observerValue();
740
+ this.observeValue();
741
741
  }
742
742
  }
743
743
  //---------------------------------------------
@@ -827,11 +827,11 @@ let EzComboBox$1 = class extends HTMLElement$1 {
827
827
  this.cancelPreselection();
828
828
  }
829
829
  render() {
830
- return (h(Host, null, h("ez-text-input", { class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._inputElement = elem, enabled: this.enabled && !this.suppressSearch, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onEzChange: event => event.stopPropagation(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { slot: "icon", "icon-name": this.searchMode ? "search" : "chevron-down" }))), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "options-list", ref: elem => this._optionsList = elem }, this._visibleOptions.map((opt, index) => this.buildItem(opt, index))))));
830
+ return (h(Host, null, h("ez-text-input", { class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._inputElement = elem, enabled: this.enabled && !this.suppressSearch, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }, h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { slot: "icon", "icon-name": this.searchMode ? "search" : "chevron-down" }))), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "options-list", ref: elem => this._optionsList = elem }, this._visibleOptions.map((opt, index) => this.buildItem(opt, index))))));
831
831
  }
832
832
  get el() { return this; }
833
833
  static get watchers() { return {
834
- "value": ["observerValue"]
834
+ "value": ["observeValue"]
835
835
  }; }
836
836
  static get style() { return ezComboBoxCss; }
837
837
  };
@@ -853,13 +853,13 @@ let EzDateInput$1 = class extends HTMLElement$1 {
853
853
  */
854
854
  this.mode = "regular";
855
855
  }
856
- setLabel() {
856
+ observeLabel() {
857
857
  this._textInput.label = this.label;
858
858
  }
859
- setErrorMessage() {
859
+ observeErrorMessage() {
860
860
  this._textInput.errorMessage = this.errorMessage;
861
861
  }
862
- applyValueToInput() {
862
+ observeValue() {
863
863
  if (this._textInput) {
864
864
  this._textInput.value = this.getTextValue(this.value);
865
865
  }
@@ -878,8 +878,8 @@ let EzDateInput$1 = class extends HTMLElement$1 {
878
878
  }
879
879
  changeValue(newValue) {
880
880
  var _a;
881
- newValue = newValue instanceof Date ? DateUtils.clearTime(newValue) : null;
882
- this.value = this.value instanceof Date ? DateUtils.clearTime(this.value) : null;
881
+ newValue = newValue instanceof Date ? DateUtils.clearTime(newValue) : undefined;
882
+ this.value = this.value instanceof Date ? DateUtils.clearTime(this.value) : undefined;
883
883
  this._textInput.errorMessage = "";
884
884
  if ((newValue === null || newValue === void 0 ? void 0 : newValue.toString()) !== ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString())) {
885
885
  this.value = newValue;
@@ -915,7 +915,7 @@ let EzDateInput$1 = class extends HTMLElement$1 {
915
915
  }
916
916
  }
917
917
  getTextValue(d) {
918
- return d ? new Intl.DateTimeFormat("pt-BR").format(d) : null;
918
+ return d ? new Intl.DateTimeFormat("pt-BR").format(d) : undefined;
919
919
  }
920
920
  componentDidLoad() {
921
921
  CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
@@ -924,13 +924,13 @@ let EzDateInput$1 = class extends HTMLElement$1 {
924
924
  return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => {
925
925
  if (event.key === "H" || event.key === "h")
926
926
  this.changeValue(new Date());
927
- }, label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
927
+ }, label: this.label, value: this.getTextValue(this.value), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
928
928
  }
929
929
  get _elem() { return this; }
930
930
  static get watchers() { return {
931
- "label": ["setLabel"],
932
- "errorMessage": ["setErrorMessage"],
933
- "value": ["applyValueToInput"]
931
+ "label": ["observeLabel"],
932
+ "errorMessage": ["observeErrorMessage"],
933
+ "value": ["observeValue"]
934
934
  }; }
935
935
  static get style() { return ezDateInputCss; }
936
936
  };
@@ -956,13 +956,13 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
956
956
  */
957
957
  this.mode = "regular";
958
958
  }
959
- setLabel() {
959
+ observeLabel() {
960
960
  this._textInput.label = this.label;
961
961
  }
962
- setErrorMessage() {
962
+ observeErrorMessage() {
963
963
  this._textInput.errorMessage = this.errorMessage;
964
964
  }
965
- applyValueToInput() {
965
+ observeValue() {
966
966
  if (this._textInput) {
967
967
  this._textInput.value = this.getTextValue(this.value);
968
968
  }
@@ -1060,19 +1060,19 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
1060
1060
  year: 'numeric', month: 'numeric', day: 'numeric',
1061
1061
  hour: 'numeric', minute: 'numeric', second: 'numeric'
1062
1062
  };
1063
- return d ? (new Intl.DateTimeFormat('pt-BR', this.showSeconds ? optionsSecond : options).format(d)) : null;
1063
+ return d ? (new Intl.DateTimeFormat('pt-BR', this.showSeconds ? optionsSecond : options).format(d)) : undefined;
1064
1064
  }
1065
1065
  componentDidLoad() {
1066
1066
  CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
1067
1067
  }
1068
1068
  render() {
1069
- return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => { this.onChangeKeyDown(event); }, label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onFocus: () => this.onFocused(), onClick: () => this.onClicked() }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.changeValue(this._calendar.value); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
1069
+ return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => { this.onChangeKeyDown(event); }, label: this.label, value: this.getTextValue(this.value), restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onFocus: () => this.onFocused(), onClick: () => this.onClicked(), slaveMode: true }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.changeValue(this._calendar.value); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
1070
1070
  }
1071
1071
  get _elem() { return this; }
1072
1072
  static get watchers() { return {
1073
- "label": ["setLabel"],
1074
- "errorMessage": ["setErrorMessage"],
1075
- "value": ["applyValueToInput"]
1073
+ "label": ["observeLabel"],
1074
+ "errorMessage": ["observeErrorMessage"],
1075
+ "value": ["observeValue"]
1076
1076
  }; }
1077
1077
  static get style() { return ezDateTimeInputCss; }
1078
1078
  };
@@ -1182,17 +1182,17 @@ let EzFilterInput$1 = class extends HTMLElement$1 {
1182
1182
  */
1183
1183
  this.mode = "regular";
1184
1184
  }
1185
- setLabel() {
1185
+ observeLabel() {
1186
1186
  if (this._textInput) {
1187
1187
  this._textInput.label = this.label;
1188
1188
  }
1189
1189
  }
1190
- setErrorMessage() {
1190
+ observeErrorMessage() {
1191
1191
  if (this._textInput) {
1192
1192
  this._textInput.errorMessage = this.errorMessage;
1193
1193
  }
1194
1194
  }
1195
- applyValueToInput() {
1195
+ observeValue() {
1196
1196
  if (this._textInput) {
1197
1197
  this._textInput.value = this.value;
1198
1198
  }
@@ -1225,9 +1225,9 @@ let EzFilterInput$1 = class extends HTMLElement$1 {
1225
1225
  }
1226
1226
  get _elem() { return this; }
1227
1227
  static get watchers() { return {
1228
- "label": ["setLabel"],
1229
- "errorMessage": ["setErrorMessage"],
1230
- "value": ["applyValueToInput"]
1228
+ "label": ["observeLabel"],
1229
+ "errorMessage": ["observeErrorMessage"],
1230
+ "value": ["observeValue"]
1231
1231
  }; }
1232
1232
  static get style() { return ezFilterInputCss; }
1233
1233
  };
@@ -1365,6 +1365,7 @@ class FormMetadata {
1365
1365
  this._sheets = new Map();
1366
1366
  this._requiredFields = [];
1367
1367
  this._cleanOnCopyFields = [];
1368
+ this._defaultValues = {};
1368
1369
  }
1369
1370
  getSheet(name) {
1370
1371
  return this._sheets.get(name);
@@ -1376,6 +1377,7 @@ class FormMetadata {
1376
1377
  this._sheets.set(sheet.name, sheet);
1377
1378
  this._requiredFields = this._requiredFields.concat(sheet.requiredFields);
1378
1379
  this._cleanOnCopyFields = this._cleanOnCopyFields.concat(sheet.cleanOnCopyFields);
1380
+ this._defaultValues = sheet.defaultValues;
1379
1381
  }
1380
1382
  getRequiredFields() {
1381
1383
  return this._requiredFields;
@@ -1383,6 +1385,9 @@ class FormMetadata {
1383
1385
  getCleanOnCopyFields() {
1384
1386
  return this._cleanOnCopyFields;
1385
1387
  }
1388
+ getDefaultValues() {
1389
+ return this._defaultValues;
1390
+ }
1386
1391
  }
1387
1392
  const buildFromDataUnit = (dataUnit) => {
1388
1393
  var _a;
@@ -1390,6 +1395,10 @@ const buildFromDataUnit = (dataUnit) => {
1390
1395
  const metadata = new FormMetadata();
1391
1396
  if (unitMD) {
1392
1397
  const visibleFields = (_a = unitMD.fields) === null || _a === void 0 ? void 0 : _a.filter(descriptor => descriptor.visible !== false);
1398
+ let defaultValues = {};
1399
+ visibleFields
1400
+ .filter(descriptor => descriptor.defaultValue)
1401
+ .map((descriptor) => defaultValues[descriptor.name] = descriptor.defaultValue);
1393
1402
  metadata.addSheet({
1394
1403
  label: unitMD.label,
1395
1404
  name: unitMD.name,
@@ -1399,7 +1408,8 @@ const buildFromDataUnit = (dataUnit) => {
1399
1408
  .map(descriptor => descriptor.name),
1400
1409
  cleanOnCopyFields: visibleFields
1401
1410
  .filter(descriptor => { var _a; return (_a = descriptor.properties) === null || _a === void 0 ? void 0 : _a.cleanOnCopy; })
1402
- .map(descriptor => descriptor.name)
1411
+ .map(descriptor => descriptor.name),
1412
+ defaultValues
1403
1413
  });
1404
1414
  }
1405
1415
  return metadata;
@@ -1415,8 +1425,9 @@ const buildFromConfig = (fields, dataUnit) => {
1415
1425
  const sheets = new Map();
1416
1426
  const requiredFields = [];
1417
1427
  const cleanOnCopyFields = [];
1428
+ const defaultValues = {};
1418
1429
  fields.forEach(config => {
1419
- var _a;
1430
+ var _a, _b;
1420
1431
  if (config.visible !== false) {
1421
1432
  const tabConfig = getTabConfig(config.tab || "Geral", sheets);
1422
1433
  const descriptor = dataUnit.getField(config.name);
@@ -1433,6 +1444,10 @@ const buildFromConfig = (fields, dataUnit) => {
1433
1444
  if (clearOnCopy) {
1434
1445
  cleanOnCopyFields.push(config.name);
1435
1446
  }
1447
+ const defaultValue = config.defaultValue === undefined ? (_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.defaultValue : config.defaultValue;
1448
+ if (defaultValue) {
1449
+ defaultValues[config.name] = config.defaultValue;
1450
+ }
1436
1451
  const fieldMD = { config, descriptor };
1437
1452
  const group = config.group;
1438
1453
  if (group) {
@@ -1459,7 +1474,8 @@ const buildFromConfig = (fields, dataUnit) => {
1459
1474
  name: key.label,
1460
1475
  items: Array.from(value.values()),
1461
1476
  requiredFields,
1462
- cleanOnCopyFields
1477
+ cleanOnCopyFields,
1478
+ defaultValues
1463
1479
  });
1464
1480
  });
1465
1481
  return metadata;
@@ -2023,7 +2039,7 @@ let EzForm$1 = class extends HTMLElement$1 {
2023
2039
  accept();
2024
2040
  });
2025
2041
  }
2026
- configChanged() {
2042
+ observeConfig() {
2027
2043
  this.processMetadata();
2028
2044
  }
2029
2045
  validateRequired(requiredFields, record) {
@@ -2085,6 +2101,21 @@ let EzForm$1 = class extends HTMLElement$1 {
2085
2101
  }));
2086
2102
  }
2087
2103
  }
2104
+ if (action.type === Action.RECORDS_ADDED) {
2105
+ debugger;
2106
+ const metadata = selectFormMetadata(this._store.getState());
2107
+ const defaultValues = metadata.getDefaultValues();
2108
+ if (defaultValues) {
2109
+ const records = action.payload;
2110
+ return new DataUnitAction(Action.RECORDS_ADDED, records.map(record => {
2111
+ const newRecord = Object.assign({}, record);
2112
+ for (const field in defaultValues) {
2113
+ newRecord[field] = this.dataUnit.valueFromString(field, defaultValues[field]);
2114
+ }
2115
+ return newRecord;
2116
+ }));
2117
+ }
2118
+ }
2088
2119
  return action;
2089
2120
  }
2090
2121
  componentWillLoad() {
@@ -2113,7 +2144,7 @@ let EzForm$1 = class extends HTMLElement$1 {
2113
2144
  }
2114
2145
  get _element() { return this; }
2115
2146
  static get watchers() { return {
2116
- "config": ["configChanged"]
2147
+ "config": ["observeConfig"]
2117
2148
  }; }
2118
2149
  static get style() { return ezFormCss; }
2119
2150
  };
@@ -112927,7 +112958,7 @@ let EzGrid$1 = class extends HTMLElement$1 {
112927
112958
  this._gridController.setColumnsDef(this._dataUnitBridge.buildColumnDefs(), true);
112928
112959
  }
112929
112960
  if (this.config) {
112930
- this.applyConfig(this.config);
112961
+ this.observeConfig(this.config);
112931
112962
  }
112932
112963
  }
112933
112964
  disconnectedCallback() {
@@ -112945,7 +112976,7 @@ let EzGrid$1 = class extends HTMLElement$1 {
112945
112976
  h("ez-button", { size: "small", iconName: "chevron-right", class: "ez-margin-right--medium", mode: "icon", enabled: this._navigationHasNext, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })
112946
112977
  ];
112947
112978
  }
112948
- applyConfig(config) {
112979
+ observeConfig(config) {
112949
112980
  this._gridController.setColumnsState(config.columns);
112950
112981
  this.closeGridConfig();
112951
112982
  }
@@ -112958,11 +112989,11 @@ let EzGrid$1 = class extends HTMLElement$1 {
112958
112989
  this._popUpGridConfig = true;
112959
112990
  }
112960
112991
  render() {
112961
- return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container" }, this.getPaginationControl())), h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), h("div", { class: "grid__footer" }), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("grid-config", { ref: ref => this._gridConfig = ref, config: this.config, selectedTab: "Colunas", onConfigFinish: evt => { this.applyConfig(evt.detail); this.configChange.emit(evt.detail); }, onConfigCancel: _evt => this.closeGridConfig() }))));
112992
+ return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container" }, this.getPaginationControl())), h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), h("div", { class: "grid__footer" }), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, 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() }))));
112962
112993
  }
112963
112994
  static get assetsDirs() { return ["../assets"]; }
112964
112995
  static get watchers() { return {
112965
- "config": ["applyConfig"]
112996
+ "config": ["observeConfig"]
112966
112997
  }; }
112967
112998
  static get style() { return ezGridCss; }
112968
112999
  };
@@ -113542,7 +113573,7 @@ let EzModal$1 = class extends HTMLElement$1 {
113542
113573
  }
113543
113574
  };
113544
113575
  }
113545
- handleopenedChange() {
113576
+ observeOpened() {
113546
113577
  if (this.opened) {
113547
113578
  document.addEventListener("keydown", this.handleKeyboardEvent);
113548
113579
  }
@@ -113555,7 +113586,7 @@ let EzModal$1 = class extends HTMLElement$1 {
113555
113586
  this.ezCloseModal.emit(this.opened);
113556
113587
  }
113557
113588
  componentDidLoad() {
113558
- this.handleopenedChange();
113589
+ this.observeOpened();
113559
113590
  }
113560
113591
  componentDidRender() {
113561
113592
  if (this.opened) {
@@ -113576,7 +113607,7 @@ let EzModal$1 = class extends HTMLElement$1 {
113576
113607
  undefined));
113577
113608
  }
113578
113609
  static get watchers() { return {
113579
- "opened": ["handleopenedChange"]
113610
+ "opened": ["observeOpened"]
113580
113611
  }; }
113581
113612
  static get style() { return ezModalCss; }
113582
113613
  };
@@ -113598,17 +113629,6 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
113598
113629
  */
113599
113630
  this.mode = "regular";
113600
113631
  }
113601
- setLabel() {
113602
- this._textInput.label = this.label;
113603
- }
113604
- setErrorMessage() {
113605
- this._textInput.errorMessage = this.errorMessage;
113606
- }
113607
- applyValueToInput() {
113608
- if (this._textInput) {
113609
- this._textInput.value = this.getTextValue(this.value);
113610
- }
113611
- }
113612
113632
  /**
113613
113633
  * Realiza o foco no componente de input
113614
113634
  */
@@ -113621,16 +113641,34 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
113621
113641
  async setBlur() {
113622
113642
  this._textInput.setBlur();
113623
113643
  }
113644
+ observeLabel() {
113645
+ if (this._textInput) {
113646
+ this._textInput.label = this.label;
113647
+ }
113648
+ }
113649
+ observeErrorMessage() {
113650
+ if (this._textInput) {
113651
+ this._textInput.errorMessage = this.errorMessage;
113652
+ }
113653
+ }
113654
+ observeValue() {
113655
+ if (this._textInput) {
113656
+ this._textInput.value = this.getTextValue(this.value) || '';
113657
+ }
113658
+ }
113624
113659
  changeValue(newValue) {
113625
113660
  this.errorMessage = "";
113626
113661
  if (newValue !== this.value) {
113627
113662
  this.value = newValue;
113628
113663
  this.ezChange.emit(this.value);
113629
113664
  }
113665
+ else {
113666
+ this.observeValue();
113667
+ }
113630
113668
  }
113631
113669
  parseNumber() {
113632
- const parsedNumber = this._textInput.value ? NumberUtils.stringToNumber(this._textInput.value) : null;
113633
- if (parsedNumber != null && isNaN(parsedNumber)) {
113670
+ const parsedNumber = this._textInput.value ? NumberUtils.stringToNumber(this._textInput.value) : undefined;
113671
+ if (parsedNumber !== undefined && isNaN(parsedNumber)) {
113634
113672
  this.errorMessage = "O valor digitado não é um número válido";
113635
113673
  }
113636
113674
  else {
@@ -113647,19 +113685,19 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
113647
113685
  if (value) {
113648
113686
  return this.precision > 0 ? NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
113649
113687
  }
113650
- return null;
113688
+ return undefined;
113651
113689
  }
113652
113690
  componentDidLoad() {
113653
113691
  CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
113654
113692
  }
113655
113693
  render() {
113656
- return (h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }));
113694
+ return (h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label, value: this.getTextValue(this.value), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }));
113657
113695
  }
113658
113696
  get _elem() { return this; }
113659
113697
  static get watchers() { return {
113660
- "label": ["setLabel"],
113661
- "errorMessage": ["setErrorMessage"],
113662
- "value": ["applyValueToInput"]
113698
+ "label": ["observeLabel"],
113699
+ "errorMessage": ["observeErrorMessage"],
113700
+ "value": ["observeValue"]
113663
113701
  }; }
113664
113702
  static get style() { return ezNumberInputCss; }
113665
113703
  };
@@ -113735,7 +113773,7 @@ let EzPopover$1 = class extends HTMLElement$1 {
113735
113773
  this.ezVisibilityChange.emit(false);
113736
113774
  };
113737
113775
  }
113738
- dispatchVisibilityChange(newValue, oldValue) {
113776
+ observeOpened(newValue, oldValue) {
113739
113777
  if (newValue != oldValue) {
113740
113778
  this.ezVisibilityChange.emit(newValue);
113741
113779
  }
@@ -113792,7 +113830,7 @@ let EzPopover$1 = class extends HTMLElement$1 {
113792
113830
  }
113793
113831
  get _host() { return this; }
113794
113832
  static get watchers() { return {
113795
- "opened": ["dispatchVisibilityChange"]
113833
+ "opened": ["observeOpened"]
113796
113834
  }; }
113797
113835
  static get style() { return ezPopoverCss; }
113798
113836
  };
@@ -113870,7 +113908,7 @@ let EzSearch$1 = class extends HTMLElement$1 {
113870
113908
  */
113871
113909
  this.mode = "regular";
113872
113910
  }
113873
- updateValue() {
113911
+ observeValue() {
113874
113912
  if (this._comboElement) {
113875
113913
  this._comboElement.value = this.value;
113876
113914
  }
@@ -113901,7 +113939,7 @@ let EzSearch$1 = class extends HTMLElement$1 {
113901
113939
  ;
113902
113940
  get _elem() { return this; }
113903
113941
  static get watchers() { return {
113904
- "value": ["updateValue"]
113942
+ "value": ["observeValue"]
113905
113943
  }; }
113906
113944
  static get style() { return ezSearchCss; }
113907
113945
  };
@@ -114124,7 +114162,7 @@ let EzTextArea$1 = class extends HTMLElement$1 {
114124
114162
  */
114125
114163
  this.mode = "regular";
114126
114164
  }
114127
- showError() {
114165
+ observeErrorMessage() {
114128
114166
  var _a, _b;
114129
114167
  const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
114130
114168
  if (hasError) {
@@ -114136,13 +114174,13 @@ let EzTextArea$1 = class extends HTMLElement$1 {
114136
114174
  (_b = this._messageBoxElem) === null || _b === void 0 ? void 0 : _b.classList.remove('hasError');
114137
114175
  }
114138
114176
  }
114139
- updateInputValue() {
114140
- this._inputElem.value = this.value === undefined ? "" : this.value;
114177
+ observeValue() {
114178
+ this._inputElem.value = this.value == undefined ? "" : this.value;
114141
114179
  this.handleChange();
114142
114180
  this.adjustFloatingLabel();
114143
114181
  this.ezChange.emit(this.value);
114144
114182
  }
114145
- adjustRowsForMode() {
114183
+ observeMode() {
114146
114184
  if (this._initialRows == undefined) {
114147
114185
  this._initialRows = this.rows > 0 ? this.rows : undefined;
114148
114186
  }
@@ -114151,7 +114189,7 @@ let EzTextArea$1 = class extends HTMLElement$1 {
114151
114189
  this.rows = rows;
114152
114190
  }
114153
114191
  }
114154
- adjustRowsValue() {
114192
+ observeRows() {
114155
114193
  const rows = this.rows > 0 ? this.rows : this.mode != "slim" ? 4 : 2;
114156
114194
  if (rows !== this.rows) {
114157
114195
  this.rows = rows;
@@ -114217,9 +114255,9 @@ let EzTextArea$1 = class extends HTMLElement$1 {
114217
114255
  // Lifecycle web component
114218
114256
  //---------------------------------------------
114219
114257
  componentDidLoad() {
114220
- this.showError();
114258
+ this.observeErrorMessage();
114221
114259
  this.adjustFloatingLabel();
114222
- this.adjustRowsForMode();
114260
+ this.observeMode();
114223
114261
  }
114224
114262
  render() {
114225
114263
  return (h(Host, null, h("div", { class: "textarea", ref: (el) => this._container = el }, this.label && this.mode != "slim" ?
@@ -114229,10 +114267,10 @@ let EzTextArea$1 = class extends HTMLElement$1 {
114229
114267
  }
114230
114268
  get _hostElement() { return this; }
114231
114269
  static get watchers() { return {
114232
- "errorMessage": ["showError"],
114233
- "value": ["updateInputValue"],
114234
- "mode": ["adjustRowsForMode"],
114235
- "rows": ["adjustRowsValue"]
114270
+ "errorMessage": ["observeErrorMessage"],
114271
+ "value": ["observeValue"],
114272
+ "mode": ["observeMode"],
114273
+ "rows": ["observeRows"]
114236
114274
  }; }
114237
114275
  static get style() { return ezTextAreaCss; }
114238
114276
  };
@@ -114257,8 +114295,12 @@ let EzTextInput$1 = class extends HTMLElement$1 {
114257
114295
  * Define o modo do tamanho do campo; opções: slim e regular.
114258
114296
  */
114259
114297
  this.mode = "regular";
114298
+ /**
114299
+ * Define se o controle de change do value será controlado por um componente pai.
114300
+ */
114301
+ this.slaveMode = false;
114260
114302
  }
114261
- showError() {
114303
+ observeErrorMessage() {
114262
114304
  var _a, _b;
114263
114305
  if (this._inputElem) {
114264
114306
  const hasError = typeof this.errorMessage === "string" && this.errorMessage !== "";
@@ -114272,7 +114314,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
114272
114314
  }
114273
114315
  }
114274
114316
  }
114275
- prepareMask() {
114317
+ observeMask() {
114276
114318
  if (this.mask) {
114277
114319
  if (this._maskFormatter == undefined) {
114278
114320
  this._maskFormatter = new MaskFormatter(this.mask);
@@ -114282,14 +114324,17 @@ let EzTextInput$1 = class extends HTMLElement$1 {
114282
114324
  }
114283
114325
  }
114284
114326
  }
114285
- updateInputValue() {
114327
+ observeValue() {
114286
114328
  if (this._inputElem) {
114287
114329
  this._inputElem.value = this.value;
114288
114330
  }
114289
114331
  this.handleChange();
114332
+ this.adjustFloatingLabel();
114333
+ if (this.slaveMode) {
114334
+ return;
114335
+ }
114290
114336
  this.errorMessage = "";
114291
114337
  this.ezChange.emit(this.value);
114292
- this.adjustFloatingLabel();
114293
114338
  }
114294
114339
  adjustFloatingLabel() {
114295
114340
  if (this.label && this._labelElem) {
@@ -114341,7 +114386,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
114341
114386
  this.errorMessage = e.message;
114342
114387
  }
114343
114388
  }
114344
- this.canChangeValue();
114389
+ this.controlChangeValue();
114345
114390
  this.adjustFloatingLabel();
114346
114391
  }
114347
114392
  isValidValue(value) {
@@ -114350,7 +114395,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
114350
114395
  }
114351
114396
  return true;
114352
114397
  }
114353
- canChangeValue() {
114398
+ controlChangeValue() {
114354
114399
  if ((this.value || '') !== this._inputElem.value) {
114355
114400
  this.value = this._inputElem.value;
114356
114401
  }
@@ -114364,9 +114409,9 @@ let EzTextInput$1 = class extends HTMLElement$1 {
114364
114409
  this._lastValidValue = value;
114365
114410
  }
114366
114411
  else {
114367
- this._inputElem.value = this._lastValidValue === undefined ? "" : this._lastValidValue;
114412
+ this._inputElem.value = this._lastValidValue == undefined ? "" : this._lastValidValue;
114368
114413
  }
114369
- this.canChangeValue();
114414
+ this.controlChangeValue();
114370
114415
  }
114371
114416
  handleSlotChange(ev) {
114372
114417
  const slot = ev.target;
@@ -114397,7 +114442,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
114397
114442
  }
114398
114443
  }
114399
114444
  }
114400
- this.showError();
114445
+ this.observeErrorMessage();
114401
114446
  }
114402
114447
  doFocus() {
114403
114448
  if (this.label && this._labelElem && !this._labelElem.classList.contains("input__label--floated")) {
@@ -114408,12 +114453,12 @@ let EzTextInput$1 = class extends HTMLElement$1 {
114408
114453
  // Lifecycle web component
114409
114454
  //---------------------------------------------
114410
114455
  componentDidLoad() {
114411
- this.showError();
114412
- this.prepareMask();
114456
+ this.observeErrorMessage();
114457
+ this.observeMask();
114413
114458
  this.adjustFloatingLabel();
114414
114459
  }
114415
114460
  componentWillLoad() {
114416
- this.prepareMask();
114461
+ this.observeMask();
114417
114462
  if (this.value) {
114418
114463
  if (this._maskFormatter) {
114419
114464
  try {
@@ -114437,9 +114482,9 @@ let EzTextInput$1 = class extends HTMLElement$1 {
114437
114482
  }
114438
114483
  get _hostElement() { return this; }
114439
114484
  static get watchers() { return {
114440
- "errorMessage": ["showError"],
114441
- "mask": ["prepareMask"],
114442
- "value": ["updateInputValue"]
114485
+ "errorMessage": ["observeErrorMessage"],
114486
+ "mask": ["observeMask"],
114487
+ "value": ["observeValue"]
114443
114488
  }; }
114444
114489
  static get style() { return ezTextInputCss; }
114445
114490
  };
@@ -114451,6 +114496,7 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
114451
114496
  super();
114452
114497
  this.__registerHost();
114453
114498
  this.__attachShadow();
114499
+ this.ezChange = createEvent(this, "ezChange", 7);
114454
114500
  /**
114455
114501
  * Deixa o campo disponível ou não para digitação.
114456
114502
  */
@@ -114464,28 +114510,28 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
114464
114510
  */
114465
114511
  this.mode = "regular";
114466
114512
  }
114467
- prepareMask() {
114513
+ observeShowSeconds() {
114468
114514
  if (this.showSeconds) {
114469
- if (this._maskFormatter == undefined) {
114470
- this._maskFormatter = new MaskFormatter("##:##:##");
114471
- }
114472
- else {
114473
- this._maskFormatter.mask = "##:##:##";
114474
- }
114515
+ this.prepareMask("##:##:##");
114475
114516
  }
114476
114517
  else {
114477
- if (this._maskFormatter == undefined) {
114478
- this._maskFormatter = new MaskFormatter("##:##");
114479
- }
114480
- else {
114481
- this._maskFormatter.mask = "##:##";
114482
- }
114518
+ this.prepareMask("##:##");
114483
114519
  }
114484
114520
  }
114485
- onValueChanged() {
114486
- if (this.value === NaN) {
114521
+ observeValue() {
114522
+ if (isNaN(this.value)) {
114487
114523
  this.value = undefined;
114488
- this.handleFocusout();
114524
+ }
114525
+ }
114526
+ //---------------------------------------------
114527
+ // Private methods
114528
+ //---------------------------------------------
114529
+ prepareMask(mask) {
114530
+ if (this._maskFormatter == undefined) {
114531
+ this._maskFormatter = new MaskFormatter(mask);
114532
+ }
114533
+ else {
114534
+ this._maskFormatter.mask = mask;
114489
114535
  }
114490
114536
  }
114491
114537
  //---------------------------------------------
@@ -114495,13 +114541,13 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
114495
114541
  * Faz o foco no componente de input
114496
114542
  */
114497
114543
  async setFocus() {
114498
- this._inputElem.focus();
114544
+ this._inputElem.setFocus();
114499
114545
  }
114500
114546
  /**
114501
114547
  * Remove o foco no componente de input
114502
114548
  */
114503
114549
  async setBlur() {
114504
- this._inputElem.blur();
114550
+ this._inputElem.setBlur();
114505
114551
  }
114506
114552
  //---------------------------------------------
114507
114553
  // Event handlers
@@ -114509,24 +114555,29 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
114509
114555
  handleFocusout() {
114510
114556
  this.errorMessage = "";
114511
114557
  this.prepareValue(this.viewValue);
114512
- if (!TimeFormatter.validateTime(this.viewValue, this.showSeconds)) {
114513
- this.clearField();
114558
+ if (this.viewValue && !TimeFormatter.validateTime(this.viewValue, this.showSeconds)) {
114559
+ this._oldViewValue = this.viewValue;
114514
114560
  this.errorMessage = "Favor inserir um horário válido.";
114515
114561
  }
114562
+ else {
114563
+ if (this.viewValue === this._oldViewValue) {
114564
+ return;
114565
+ }
114566
+ this._oldViewValue = this.viewValue;
114567
+ if (this.viewValue === "00:00" && this.value == undefined) {
114568
+ this.value = 0;
114569
+ }
114570
+ this.ezChange.emit(this.value);
114571
+ }
114516
114572
  }
114517
114573
  prepareValue(value) {
114518
114574
  try {
114519
114575
  this.viewValue = TimeFormatter.prepareValue(value, this.showSeconds);
114520
114576
  }
114521
114577
  catch (e) {
114522
- this.clearField();
114523
114578
  this.errorMessage = e.message;
114524
114579
  }
114525
114580
  }
114526
- clearField() {
114527
- this.viewValue = '';
114528
- this.value = undefined;
114529
- }
114530
114581
  handleChange() {
114531
114582
  this.viewValue = this._inputElem.value;
114532
114583
  this.value = NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
@@ -114535,11 +114586,11 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
114535
114586
  // Lifecycle web component
114536
114587
  //---------------------------------------------
114537
114588
  componentDidLoad() {
114538
- this.onValueChanged();
114589
+ this.observeValue();
114539
114590
  CSSVarsUtils.applyVarsTextInput(this._elem, this._inputElem);
114540
114591
  }
114541
114592
  componentWillLoad() {
114542
- this.prepareMask();
114593
+ this.observeShowSeconds();
114543
114594
  if (this.value) {
114544
114595
  this.prepareValue(this.value.toString());
114545
114596
  }
@@ -114548,13 +114599,13 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
114548
114599
  }
114549
114600
  }
114550
114601
  render() {
114551
- return (h(Host, null, h("ez-text-input", { ref: (el) => this._inputElem = el, value: this.viewValue, enabled: this.enabled, label: this.label, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, errorMessage: this.errorMessage, mode: this.mode }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
114602
+ return (h(Host, null, h("ez-text-input", { ref: (el) => this._inputElem = el, value: this.viewValue, enabled: this.enabled, label: this.label, restrict: "0123456789:", onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
114552
114603
  }
114553
114604
  static get assetsDirs() { return ["../assets"]; }
114554
114605
  get _elem() { return this; }
114555
114606
  static get watchers() { return {
114556
- "showSeconds": ["prepareMask"],
114557
- "value": ["onValueChanged"]
114607
+ "showSeconds": ["observeShowSeconds"],
114608
+ "value": ["observeValue"]
114558
114609
  }; }
114559
114610
  static get style() { return ezTimeInputCss; }
114560
114611
  };
@@ -114732,7 +114783,7 @@ class RemoteFile {
114732
114783
  }
114733
114784
  }
114734
114785
 
114735
- 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%}}";
114786
+ 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;padding-bottom:16px;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%}}";
114736
114787
 
114737
114788
  let EzUpload$1 = class extends HTMLElement$1 {
114738
114789
  constructor() {
@@ -114747,7 +114798,7 @@ let EzUpload$1 = class extends HTMLElement$1 {
114747
114798
  */
114748
114799
  this.enabled = true;
114749
114800
  }
114750
- changeValue(newValue) {
114801
+ observeValue(newValue) {
114751
114802
  //Observamos o mundo externo, se um novo valor foi atribuído,
114752
114803
  //precisamos cancelar a alteração anterior, isso envolve, percorrer
114753
114804
  //a lista de ponteiros e cancelar todos os uploads em andamento.
@@ -114767,7 +114818,7 @@ let EzUpload$1 = class extends HTMLElement$1 {
114767
114818
  this.value.forEach(ezFile => this._filePointers.set(ezFile.name, ezFile));
114768
114819
  }
114769
114820
  }
114770
- normalizeRequestHeaders() {
114821
+ observeRequestHeaders() {
114771
114822
  this._requestHeaders = new Map();
114772
114823
  if (typeof this.requestHeaders == "string") {
114773
114824
  try {
@@ -114993,12 +115044,77 @@ let EzUpload$1 = class extends HTMLElement$1 {
114993
115044
  }
114994
115045
  get _host() { return this; }
114995
115046
  static get watchers() { return {
114996
- "value": ["changeValue"],
114997
- "requestHeaders": ["normalizeRequestHeaders"]
115047
+ "value": ["observeValue"],
115048
+ "requestHeaders": ["observeRequestHeaders"]
114998
115049
  }; }
114999
115050
  static get style() { return ezUploadCss; }
115000
115051
  };
115001
115052
 
115053
+ const ezViewStackCss = ":host{width:100%;height:100%}.ez-view-stack__container{width:100%;height:100%}";
115054
+
115055
+ let EzViewStack$1 = class extends HTMLElement$1 {
115056
+ constructor() {
115057
+ super();
115058
+ this.__registerHost();
115059
+ }
115060
+ /**
115061
+ * Exibe a aba desejada de acordo com o index passado na tela fazendo com a ativa atual seja removida ou oculta dependendo da hidePolicy.
115062
+ */
115063
+ async show(index) {
115064
+ if (index !== this._focusedIndex && 0 <= index && index < this._totalStackItems) {
115065
+ this.policyHideRemove();
115066
+ this.policyShowAppend(index);
115067
+ this._focusedIndex = index;
115068
+ }
115069
+ }
115070
+ policyHideRemove() {
115071
+ let element = this._hostElem.querySelector(`#el_${this._focusedIndex}`);
115072
+ this.checkElementVisibility(element);
115073
+ }
115074
+ policyShowAppend(index) {
115075
+ let selectedElement = this._hostElem.querySelector(`#el_${index}`);
115076
+ if (selectedElement) {
115077
+ selectedElement.removeAttribute("style");
115078
+ }
115079
+ else {
115080
+ this._hostElem.append(this._elemList[index]);
115081
+ }
115082
+ }
115083
+ checkElementVisibility(element) {
115084
+ if (element.getAttribute("hidePolicy") === "hide" || !element.getAttribute("hidePolicy")) {
115085
+ element.setAttribute("style", "display: none");
115086
+ }
115087
+ else if (element.getAttribute("hidePolicy") === "remove") {
115088
+ element.remove();
115089
+ }
115090
+ }
115091
+ componentWillRender() {
115092
+ if (!this._elemList) {
115093
+ this._elemList = [];
115094
+ this._focusedIndex = 0;
115095
+ this._totalStackItems = 0;
115096
+ this._hostElem.classList.add("ez-view-stack__container");
115097
+ this._hostElem.querySelectorAll("stack-item").forEach((element, index) => {
115098
+ element.setAttribute("id", `el_${index}`);
115099
+ if (index !== 0) {
115100
+ this.checkElementVisibility(element);
115101
+ }
115102
+ this._totalStackItems++;
115103
+ this._elemList.push(element);
115104
+ });
115105
+ }
115106
+ }
115107
+ disconectCallback() {
115108
+ this._hostElem = null;
115109
+ this._elemList = null;
115110
+ }
115111
+ render() {
115112
+ return (h(Host, null));
115113
+ }
115114
+ get _hostElem() { return this; }
115115
+ static get style() { return ezViewStackCss; }
115116
+ };
115117
+
115002
115118
  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)}";
115003
115119
 
115004
115120
  let GridConfig$1 = class extends HTMLElement$1 {
@@ -115458,17 +115574,50 @@ let TestDu$1 = class extends HTMLElement$1 {
115458
115574
  label: "Parceiro",
115459
115575
  fields: [
115460
115576
  {
115461
- name: "ANEXO",
115462
- label: "Anexo",
115463
- dataType: DataType.OBJECT,
115464
- userInterface: UserInterface.FILE,
115465
- properties: {
115466
- DESTINATION: "MULTIFILE",
115467
- MAX_FILES: "2"
115468
- }
115469
- }
115577
+ name: "CODPARC",
115578
+ label: "Parceiro",
115579
+ dataType: DataType.NUMBER,
115580
+ userInterface: UserInterface.INTEGERNUMBER,
115581
+ defaultValue: 666,
115582
+ required: false,
115583
+ properties: {}
115584
+ },
115585
+ {
115586
+ name: "RECDESP",
115587
+ label: "Receita/Despesa",
115588
+ dataType: DataType.TEXT,
115589
+ userInterface: UserInterface.OPTIONSELECTOR,
115590
+ required: true,
115591
+ properties: { options: `{"-1": "Despesa", "1": "Receita"}` }
115592
+ },
115593
+ {
115594
+ name: "P",
115595
+ label: "pera",
115596
+ dataType: DataType.TEXT,
115597
+ userInterface: UserInterface.OPTIONSELECTOR,
115598
+ properties: { options: `{"M": "Madura", "V": "Verde", "P": "Passada"}` }
115599
+ },
115470
115600
  ]
115471
115601
  };
115602
+ this.formConfig = [
115603
+ {
115604
+ name: "CODPARC",
115605
+ label: "Parceiro",
115606
+ dataType: DataType.NUMBER,
115607
+ userInterface: UserInterface.INTEGERNUMBER,
115608
+ defaultValue: 666,
115609
+ required: false,
115610
+ properties: {}
115611
+ },
115612
+ {
115613
+ name: "RECDESP",
115614
+ label: "Receita/Despesa",
115615
+ dataType: DataType.TEXT,
115616
+ userInterface: UserInterface.OPTIONSELECTOR,
115617
+ required: true,
115618
+ properties: { options: `{"-1": "Despesa", "1": "Receita"}` }
115619
+ }
115620
+ ];
115472
115621
  this.dataUnit.dataLoader = () => new Promise(accept => accept({
115473
115622
  records: [{
115474
115623
  __record__id__: "1321321321321321",
@@ -115499,7 +115648,7 @@ let TestDu$1 = class extends HTMLElement$1 {
115499
115648
  });
115500
115649
  }
115501
115650
  render() {
115502
- return (h("div", null, h("button", { onClick: () => this.dataUnit.loadData() }, "Carregar"), h("button", { onClick: () => this.save(), disabled: !this.isDirty }, "Salvar"), h("ez-form", { dataUnit: this.dataUnit })));
115651
+ return (h("div", null, h("button", { onClick: () => this.dataUnit.addRecord() }, "Novo"), h("button", { onClick: () => this.dataUnit.loadData() }, "Carregar"), h("button", { onClick: () => this.save(), disabled: !this.isDirty }, "Salvar"), h("ez-form", { dataUnit: this.dataUnit, config: this.formConfig })));
115503
115652
  }
115504
115653
  static get style() { return testDuCss; }
115505
115654
  };
@@ -115526,10 +115675,11 @@ const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size"
115526
115675
  const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513]}]);
115527
115676
  const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]);
115528
115677
  const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513]}]);
115529
- const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513]}]);
115678
+ const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"slaveMode":[516,"slave-mode"]}]);
115530
115679
  const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513]}]);
115531
115680
  const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"]}]);
115532
115681
  const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040]}]);
115682
+ const EzViewStack = /*@__PURE__*/proxyCustomElement(EzViewStack$1, [0,"ez-view-stack"]);
115533
115683
  const GridConfig = /*@__PURE__*/proxyCustomElement(GridConfig$1, [2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]);
115534
115684
  const SelectBox = /*@__PURE__*/proxyCustomElement(SelectBox$1, [1,"select-box",{"selectedOption":[1,"selected-option"]}]);
115535
115685
  const TestDu = /*@__PURE__*/proxyCustomElement(TestDu$1, [0,"test-du",{"isDirty":[32]}]);
@@ -115562,6 +115712,7 @@ const defineCustomElements = (opts) => {
115562
115712
  EzTimeInput,
115563
115713
  EzToast,
115564
115714
  EzUpload,
115715
+ EzViewStack,
115565
115716
  GridConfig,
115566
115717
  SelectBox,
115567
115718
  TestDu
@@ -115573,4 +115724,4 @@ const defineCustomElements = (opts) => {
115573
115724
  }
115574
115725
  };
115575
115726
 
115576
- export { EzApplication, EzButton, EzCalendar, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzFilterInput, EzForm, EzGrid, EzIcon, EzList, EzModal, EzNumberInput, EzPopover, EzPopup, EzSearch, EzTabselector, EzTextArea, EzTextInput, EzTimeInput, EzToast, EzUpload, GridConfig, SelectBox, TestDu, defineCustomElements };
115727
+ export { EzApplication, EzButton, EzCalendar, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzFilterInput, EzForm, EzGrid, EzIcon, EzList, EzModal, EzNumberInput, EzPopover, EzPopup, EzSearch, EzTabselector, EzTextArea, EzTextInput, EzTimeInput, EzToast, EzUpload, EzViewStack, GridConfig, SelectBox, TestDu, defineCustomElements };