@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-50898.1 → 0.0.0-bugfix-dev-59880.0

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 (148) hide show
  1. package/dist/cjs/ICustomRender-6fafffce.js +13 -0
  2. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -0
  3. package/dist/cjs/ez-alert-list.cjs.entry.js +11 -1
  4. package/dist/cjs/ez-button.cjs.entry.js +2 -2
  5. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -0
  6. package/dist/cjs/ez-combo-box.cjs.entry.js +1 -0
  7. package/dist/cjs/{ez-text-edit.cjs.entry.js → ez-custom-form-input_2.cjs.entry.js} +86 -0
  8. package/dist/cjs/ez-date-input.cjs.entry.js +1 -0
  9. package/dist/cjs/ez-form-view.cjs.entry.js +36 -4
  10. package/dist/cjs/ez-form.cjs.entry.js +51 -2
  11. package/dist/cjs/ez-grid.cjs.entry.js +322 -19
  12. package/dist/cjs/ez-list.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-modal-container.cjs.entry.js +15 -4
  14. package/dist/cjs/ez-modal.cjs.entry.js +7 -8
  15. package/dist/cjs/ez-number-input.cjs.entry.js +9 -2
  16. package/dist/cjs/ez-popup.cjs.entry.js +14 -8
  17. package/dist/cjs/ez-search.cjs.entry.js +6 -2
  18. package/dist/cjs/ez-split-item.cjs.entry.js +3 -2
  19. package/dist/cjs/ezui.cjs.js +1 -1
  20. package/dist/cjs/index-a7b0c73d.js +4 -4
  21. package/dist/cjs/loader.cjs.js +1 -1
  22. package/dist/collection/collection-manifest.json +1 -0
  23. package/dist/collection/components/ez-alert-list/ez-alert-list.js +11 -1
  24. package/dist/collection/components/ez-button/ez-button.css +7 -0
  25. package/dist/collection/components/ez-button/ez-button.js +1 -1
  26. package/dist/collection/components/ez-date-input/ez-date-input.js +1 -0
  27. package/dist/collection/components/ez-form/ez-form.js +130 -4
  28. package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +245 -0
  29. package/dist/collection/components/ez-form-view/ez-form-view.js +92 -2
  30. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +3 -2
  31. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +62 -4
  32. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +35 -1
  33. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +58 -0
  34. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.js +40 -0
  35. package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.js +11 -0
  36. package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.js +11 -0
  37. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +6 -3
  38. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellRender.js +40 -0
  39. package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellRender.js +1 -0
  40. package/dist/collection/components/ez-grid/ez-grid.js +206 -2
  41. package/dist/collection/components/ez-grid/interfaces/ICustomFormatter.js +1 -0
  42. package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
  43. package/dist/collection/components/ez-grid/subcomponents/selection-counter.js +3 -11
  44. package/dist/collection/components/ez-grid/subcomponents/utils/selectionCounterUtils.js +22 -0
  45. package/dist/collection/components/ez-grid/test/resources/gridDataUnit.js +19 -0
  46. package/dist/collection/components/ez-list/ez-list.css +6 -2
  47. package/dist/collection/components/ez-modal/ez-modal.js +22 -9
  48. package/dist/collection/components/ez-modal-container/ez-modal-container.css +4 -0
  49. package/dist/collection/components/ez-modal-container/ez-modal-container.js +23 -3
  50. package/dist/collection/components/ez-number-input/ez-number-input.js +12 -1
  51. package/dist/collection/components/ez-popup/ez-popup.js +14 -8
  52. package/dist/collection/components/ez-search/ez-search.js +5 -2
  53. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +0 -7
  54. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +1 -1
  55. package/dist/collection/utils/customEditor/interfaces/ICustomEditor.js +5 -0
  56. package/dist/collection/utils/customEditor/interfaces/ICustomEditorInfo.js +1 -0
  57. package/dist/collection/utils/customRender/interfaces/ICustomRender.js +5 -0
  58. package/dist/collection/utils/customRender/interfaces/ICustomRenderInfo.js +1 -0
  59. package/dist/collection/utils/index.js +2 -0
  60. package/dist/custom-elements/index.d.ts +6 -0
  61. package/dist/custom-elements/index.js +580 -61
  62. package/dist/esm/ICustomRender-875b5a40.js +13 -0
  63. package/dist/esm/ez-actions-button.entry.js +1 -0
  64. package/dist/esm/ez-alert-list.entry.js +11 -1
  65. package/dist/esm/ez-button.entry.js +2 -2
  66. package/dist/esm/ez-collapsible-box.entry.js +1 -0
  67. package/dist/esm/ez-combo-box.entry.js +1 -0
  68. package/dist/esm/{ez-text-edit.entry.js → ez-custom-form-input_2.entry.js} +88 -3
  69. package/dist/esm/ez-date-input.entry.js +1 -0
  70. package/dist/esm/ez-form-view.entry.js +36 -4
  71. package/dist/esm/ez-form.entry.js +51 -2
  72. package/dist/esm/ez-grid.entry.js +322 -19
  73. package/dist/esm/ez-list.entry.js +1 -1
  74. package/dist/esm/ez-modal-container.entry.js +16 -5
  75. package/dist/esm/ez-modal.entry.js +9 -10
  76. package/dist/esm/ez-number-input.entry.js +9 -2
  77. package/dist/esm/ez-popup.entry.js +15 -9
  78. package/dist/esm/ez-search.entry.js +6 -2
  79. package/dist/esm/ez-split-item.entry.js +3 -2
  80. package/dist/esm/ezui.js +1 -1
  81. package/dist/esm/index-baa5e267.js +4 -4
  82. package/dist/esm/loader.js +1 -1
  83. package/dist/ezui/ezui.esm.js +1 -1
  84. package/dist/ezui/p-09de35a2.entry.js +1 -0
  85. package/dist/ezui/p-13d2fe2d.entry.js +1 -0
  86. package/dist/ezui/{p-384247cd.entry.js → p-1f96ba9a.entry.js} +2 -2
  87. package/dist/ezui/p-204b1439.entry.js +1 -0
  88. package/dist/ezui/p-2b8da3a4.entry.js +1 -0
  89. package/dist/ezui/p-30775e7f.entry.js +1 -0
  90. package/dist/ezui/p-4607fb89.js +1 -0
  91. package/dist/ezui/{p-2a1a0e04.entry.js → p-77362d3a.entry.js} +1 -1
  92. package/dist/ezui/{p-8defa6d3.entry.js → p-786559c5.entry.js} +1 -1
  93. package/dist/ezui/p-7922142b.entry.js +1 -0
  94. package/dist/ezui/p-84e439b9.entry.js +1 -0
  95. package/dist/ezui/p-922ac38b.entry.js +1 -0
  96. package/dist/ezui/p-bae4e180.entry.js +1 -0
  97. package/dist/ezui/p-bcb53f27.entry.js +1 -0
  98. package/dist/ezui/p-c942e4a7.entry.js +1 -0
  99. package/dist/ezui/p-d9401ea0.entry.js +1 -0
  100. package/dist/ezui/p-e90dd4eb.entry.js +1 -0
  101. package/dist/ezui/p-f3c526cc.entry.js +1 -0
  102. package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +5 -0
  103. package/dist/types/components/ez-form/ez-form.d.ts +20 -1
  104. package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +41 -0
  105. package/dist/types/components/ez-form-view/ez-form-view.d.ts +11 -0
  106. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +29 -0
  107. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +11 -0
  108. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +7 -1
  109. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +19 -0
  110. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +14 -0
  111. package/dist/types/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.d.ts +11 -0
  112. package/dist/types/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.d.ts +11 -0
  113. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +3 -0
  114. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +15 -0
  115. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellRender.d.ts +10 -0
  116. package/dist/types/components/ez-grid/ez-grid.d.ts +30 -1
  117. package/dist/types/components/ez-grid/interfaces/ICustomFormatter.d.ts +5 -0
  118. package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
  119. package/dist/types/components/ez-grid/subcomponents/utils/selectionCounterUtils.d.ts +4 -0
  120. package/dist/types/components/ez-grid/test/resources/gridDataUnit.d.ts +2 -0
  121. package/dist/types/components/ez-modal/ez-modal.d.ts +9 -1
  122. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +3 -0
  123. package/dist/types/components/ez-number-input/ez-number-input.d.ts +1 -0
  124. package/dist/types/components/ez-popup/ez-popup.d.ts +3 -3
  125. package/dist/types/components.d.ts +124 -4
  126. package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +29 -0
  127. package/dist/types/utils/customEditor/interfaces/ICustomEditorInfo.d.ts +5 -0
  128. package/dist/types/utils/customRender/interfaces/ICustomRender.d.ts +29 -0
  129. package/dist/types/utils/customRender/interfaces/ICustomRenderInfo.d.ts +5 -0
  130. package/dist/types/utils/index.d.ts +2 -0
  131. package/package.json +1 -1
  132. package/react/components.d.ts +1 -0
  133. package/react/components.js +1 -0
  134. package/react/components.js.map +1 -1
  135. package/dist/ezui/p-0447d17c.entry.js +0 -1
  136. package/dist/ezui/p-20ec22c0.entry.js +0 -1
  137. package/dist/ezui/p-5e1d036e.entry.js +0 -1
  138. package/dist/ezui/p-701231f0.entry.js +0 -1
  139. package/dist/ezui/p-7a636dfc.entry.js +0 -1
  140. package/dist/ezui/p-99ead599.entry.js +0 -1
  141. package/dist/ezui/p-9aefaa52.entry.js +0 -1
  142. package/dist/ezui/p-9f1e89c9.entry.js +0 -1
  143. package/dist/ezui/p-a1ec32ef.entry.js +0 -1
  144. package/dist/ezui/p-b041333c.entry.js +0 -1
  145. package/dist/ezui/p-b567fa8c.entry.js +0 -1
  146. package/dist/ezui/p-bae3d0aa.entry.js +0 -1
  147. package/dist/ezui/p-db77a984.entry.js +0 -1
  148. package/dist/ezui/p-e228ccb9.entry.js +0 -1
@@ -0,0 +1,22 @@
1
+ export function enableSelectAll(total) {
2
+ return total !== undefined;
3
+ }
4
+ export function buildSelectAllLabel(allRecordSelected, count, total) {
5
+ if (allRecordSelected)
6
+ return 'Selecionar apenas a página atual';
7
+ if (total === undefined)
8
+ return `Carregando todos os ${count} registros`;
9
+ return `Selecionar todos os ${total} registros`;
10
+ }
11
+ export function buildSelectAllTitle(total) {
12
+ if (enableSelectAll(total))
13
+ return '';
14
+ return 'Aguarde o carregamento para selecionar o registro de todas as páginas';
15
+ }
16
+ export function getText(selectionCount, allSelectedRecords) {
17
+ if (allSelectedRecords) {
18
+ return `Todos os <strong>${selectionCount} registros</strong> da grade estão selecionados.`;
19
+ }
20
+ const pluralCharacter = selectionCount > 1 ? "s" : "";
21
+ return `Há <strong>${selectionCount} registro${pluralCharacter}</strong> selecionado${pluralCharacter} na grade.`;
22
+ }
@@ -0,0 +1,19 @@
1
+ import { DataType, DataUnit, StringUtils } from "@sankhyalabs/core";
2
+ export function getDataUnit() {
3
+ const dataUnit = new DataUnit('EzGridDU');
4
+ dataUnit.pageSize = 3;
5
+ dataUnit.metadata = {
6
+ name: "exemplo.datagrid",
7
+ label: "Exemplo data grid",
8
+ fields: [
9
+ { name: "PRODUTO", label: "Produto", dataType: DataType.TEXT },
10
+ { name: "QUANTIDADE", label: "Quantidade", dataType: DataType.NUMBER }
11
+ ]
12
+ };
13
+ dataUnit.records = [
14
+ { __record__id__: StringUtils.generateUUID(), "PRODUTO": "Mamão", "QUANTIDADE": 1 },
15
+ { __record__id__: StringUtils.generateUUID(), "PRODUTO": "Mexerica", "QUANTIDADE": 2 }
16
+ ];
17
+ dataUnit.selectFirst();
18
+ return dataUnit;
19
+ }
@@ -168,14 +168,18 @@ p {
168
168
  display: flex;
169
169
 
170
170
  /*public*/
171
- padding: var(--space--2xs, 8px) var(--space--3xs, 4px);
172
- margin: var(--ez-list__item--margin);
173
171
  font-family: var(--ez-list__item--font-family);
174
172
  font-size: var(--ez-list__item--font-size);
175
173
  color: var(--ez-list__item--color);
176
174
  border-bottom: var(--ez-list__item--border-bottom, none) var(--ez-list__item--border-bottom-color);
177
175
  }
178
176
 
177
+ .draggable-list li > div {
178
+ /*public*/
179
+ padding: var(--space--2xs, 8px) var(--space--3xs, 4px);
180
+ margin: var(--ez-list__item--margin);
181
+ }
182
+
179
183
  .over {
180
184
  /*public*/
181
185
  border-top: 1px dashed var(--ez-list__over--border--color);
@@ -1,12 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { FloatingManager } from '@sankhyalabs/core';
2
+ import { FloatingManager, KeyboardManager } from '@sankhyalabs/core';
3
3
  export class EzModal {
4
4
  constructor() {
5
- this.handleKeyboardEvent = (ev) => {
6
- if ((ev === null || ev === void 0 ? void 0 : ev.key) === "Escape" && this.closeEsc) {
7
- this.closeModal();
8
- }
9
- };
10
5
  this.modalSize = undefined;
11
6
  this.align = undefined;
12
7
  this.heightMode = "regular";
@@ -18,11 +13,9 @@ export class EzModal {
18
13
  observeOpened() {
19
14
  if (this.opened) {
20
15
  this._overlayId = FloatingManager.subscribeOverlayControl(this._modalRef);
21
- document.addEventListener("keydown", this.handleKeyboardEvent);
22
16
  }
23
17
  else {
24
18
  FloatingManager.unsubscribeOverlayControl(this._modalRef || this._overlayId);
25
- document.removeEventListener("keydown", this.handleKeyboardEvent);
26
19
  }
27
20
  }
28
21
  closeModal() {
@@ -31,6 +24,10 @@ export class EzModal {
31
24
  }
32
25
  componentDidLoad() {
33
26
  this.observeOpened();
27
+ new KeyboardManager({ propagate: false, element: this._element })
28
+ .bind("Enter", this.ezModalAction.emit.bind("OK"))
29
+ .bind("Escape", () => this.closeModal())
30
+ .bind("Esc", () => this.closeModal());
34
31
  }
35
32
  componentDidRender() {
36
33
  if (this.opened) {
@@ -49,7 +46,7 @@ export class EzModal {
49
46
  const scrimType = `modal__screen-${this.scrim}`;
50
47
  return (h(Host, null, this.opened
51
48
  ?
52
- h("div", { ref: ref => this._modalRef = ref, class: `modal ${scrimType} ${regularVerticalPaddingClass}`, onMouseDown: evt => this.onMouseDownHandler(evt) }, h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, h("div", { class: `modal__content ${modalContentHeightMode} ${this.modalSize}` }, h("slot", null))))
49
+ h("div", { ref: ref => this._modalRef = ref, class: `modal ${scrimType} ${regularVerticalPaddingClass}`, onMouseDown: evt => this.onMouseDownHandler(evt), tabIndex: -1 }, h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, h("div", { class: `modal__content ${modalContentHeightMode} ${this.modalSize}` }, h("slot", null))))
53
50
  :
54
51
  undefined));
55
52
  }
@@ -228,8 +225,24 @@ export class EzModal {
228
225
  "resolved": "any",
229
226
  "references": {}
230
227
  }
228
+ }, {
229
+ "method": "ezModalAction",
230
+ "name": "ezModalAction",
231
+ "bubbles": true,
232
+ "cancelable": true,
233
+ "composed": true,
234
+ "docs": {
235
+ "tags": [],
236
+ "text": "Representa a intera\u00E7\u00E3o com o usu\u00E1rio.\nOK - Quando o bot\u00E3o \u00E9 acionado\nCANCEL - Quando o bot\u00E3o de cancelar \u00E9 acionado\nCLOSE - Quando o bot\u00E3o de fechar \u00E9 acionado.\nLOAD - Quando o modal \u00E9 carregado (eventualmente pode ser usado para dar foco a um elemento espec\u00EDfico)"
237
+ },
238
+ "complexType": {
239
+ "original": "string",
240
+ "resolved": "string",
241
+ "references": {}
242
+ }
231
243
  }];
232
244
  }
245
+ static get elementRef() { return "_element"; }
233
246
  static get watchers() {
234
247
  return [{
235
248
  "propName": "opened",
@@ -7,6 +7,10 @@
7
7
  height: 100%;
8
8
  }
9
9
 
10
+ .ez-modal-container__header-container{
11
+ outline: none;
12
+ }
13
+
10
14
  .ez-modal-container__header {
11
15
  display: flex;
12
16
  flex-wrap: nowrap;
@@ -12,6 +12,12 @@ export class EzModalContainer {
12
12
  this.cancelButtonStatus = undefined;
13
13
  this.okButtonStatus = undefined;
14
14
  }
15
+ async handleEzModalAction(event) {
16
+ var _a;
17
+ if ((event === null || event === void 0 ? void 0 : event.target) && (event === null || event === void 0 ? void 0 : event.target) === ((_a = this._element) === null || _a === void 0 ? void 0 : _a.parentElement)) {
18
+ this.closeModal();
19
+ }
20
+ }
15
21
  cancelIsVisible() {
16
22
  return (this.cancelButtonStatus !== ModalButtonStatus.HIDDEN && this.cancelButtonLabel != undefined);
17
23
  }
@@ -21,11 +27,15 @@ export class EzModalContainer {
21
27
  componentDidLoad() {
22
28
  window.requestAnimationFrame(() => {
23
29
  this.ezModalAction.emit(ModalAction.LOAD);
30
+ this._modalRef.focus();
24
31
  });
25
32
  new KeyboardManager({ propagate: false, element: this._element })
26
33
  .bind("Enter", this.ezModalAction.emit.bind(ModalAction.OK))
27
- .bind("Escape", this.ezModalAction.emit.bind(ModalAction.CANCEL))
28
- .bind("Esc", this.ezModalAction.emit.bind(ModalAction.CANCEL));
34
+ .bind("Escape", () => this.closeModal())
35
+ .bind("Esc", () => this.closeModal());
36
+ }
37
+ closeModal() {
38
+ this.ezModalAction.emit("CLOSE");
29
39
  }
30
40
  focusLast() {
31
41
  if (this._okButton == undefined) {
@@ -37,7 +47,7 @@ export class EzModalContainer {
37
47
  this._closeButton.focus();
38
48
  }
39
49
  render() {
40
- return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), h("div", null, this.showTitleBar && (h("div", { class: "ez-modal-container__header ez-margin-bottom--large" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle && (h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle))), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))))), h("div", { class: "ez-modal-container__content" }, h("slot", null)), h("div", { class: "ez-modal-container__footer" }, this.cancelIsVisible() && (h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction.CANCEL) })), this.okIsVisible() && (h("ez-button", { ref: ref => this._okButton = ref, class: "ez-button--primary", label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction.OK) }))), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
50
+ return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), h("div", { ref: ref => this._modalRef = ref, tabIndex: -1, class: "ez-modal-container__header-container" }, this.showTitleBar && (h("div", { class: "ez-modal-container__header ez-margin-bottom--large" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle && (h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle))), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))))), h("div", { class: "ez-modal-container__content" }, h("slot", null)), h("div", { class: "ez-modal-container__footer" }, this.cancelIsVisible() && (h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction.CANCEL) })), this.okIsVisible() && (h("ez-button", { ref: ref => this._okButton = ref, class: "ez-button--primary", label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction.OK) }))), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
41
51
  }
42
52
  static get is() { return "ez-modal-container"; }
43
53
  static get encapsulation() { return "scoped"; }
@@ -193,4 +203,14 @@ export class EzModalContainer {
193
203
  }
194
204
  }];
195
205
  }
206
+ static get elementRef() { return "_element"; }
207
+ static get listeners() {
208
+ return [{
209
+ "name": "ezCloseModal",
210
+ "method": "handleEzModalAction",
211
+ "target": "document",
212
+ "capture": false,
213
+ "passive": false
214
+ }];
215
+ }
196
216
  }
@@ -82,12 +82,17 @@ export class EzNumberInput {
82
82
  }
83
83
  this._changePending = false;
84
84
  }
85
+ observePrecision() {
86
+ if (this._textInput) {
87
+ this.setInputValue();
88
+ }
89
+ }
85
90
  validateValue(value) {
86
91
  return isNaN(value) || value === undefined ? null : value;
87
92
  }
88
93
  getTextValue(value) {
89
94
  if (value != undefined) {
90
- return this.precision > 0 ? NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
95
+ return this.precision >= 0 ? NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
91
96
  }
92
97
  return undefined;
93
98
  }
@@ -455,6 +460,12 @@ export class EzNumberInput {
455
460
  }, {
456
461
  "propName": "value",
457
462
  "methodName": "observeValue"
463
+ }, {
464
+ "propName": "precision",
465
+ "methodName": "observePrecision"
466
+ }, {
467
+ "propName": "prettyPrecision",
468
+ "methodName": "observePrecision"
458
469
  }];
459
470
  }
460
471
  }
@@ -20,10 +20,18 @@ export class EzPopup {
20
20
  this.manageOverflow();
21
21
  }
22
22
  componentDidLoad() {
23
+ if (this.opened && this._popupRef) {
24
+ this._popupRef.focus();
25
+ }
23
26
  new KeyboardManager({ propagate: false, element: this._element })
24
27
  .bind("Enter", this.ezPopupAction.emit.bind("OK"))
25
- .bind("Escape", () => this.opened = false)
26
- .bind("Esc", () => this.opened = false);
28
+ .bind("Escape", () => this.closePopup())
29
+ .bind("Esc", () => this.closePopup());
30
+ }
31
+ closePopup() {
32
+ this.opened = false;
33
+ this.manageOverflow();
34
+ this.ezClosePopup.emit();
27
35
  }
28
36
  manageOverflow() {
29
37
  if (this.opened) {
@@ -35,23 +43,20 @@ export class EzPopup {
35
43
  }
36
44
  manageOverlay() {
37
45
  if (this.opened) {
38
- this._overlayId = FloatingManager.subscribeOverlayControl(this._modalRef);
46
+ this._overlayId = FloatingManager.subscribeOverlayControl(this._popupRef);
39
47
  }
40
48
  else {
41
- FloatingManager.unsubscribeOverlayControl(this._modalRef || this._overlayId);
49
+ FloatingManager.unsubscribeOverlayControl(this._popupRef || this._overlayId);
42
50
  }
43
51
  }
44
52
  getGridSize() {
45
53
  return this._sizeClasses[this.size] || this._sizeClasses["medium"];
46
54
  }
47
55
  componentDidRender() {
48
- if (this._container) {
49
- this._container.focus();
50
- }
51
56
  this.manageOverlay();
52
57
  }
53
58
  render() {
54
- return (h(Host, null, this.opened ? (h("div", { class: "overlay", ref: ref => this._modalRef = ref }, h("div", { class: "popup col " + this.getGridSize() }, h("div", { class: "popup__container " + (this.heightMode === "auto" ? "popup__container--auto" : ""), ref: elem => this._container = elem, tabIndex: -1 }, h("div", { class: "popup__content" }, h("div", { class: "popup__header " + (this.useHeader ? "popup__header--padding" : "") }, this.useHeader &&
59
+ return (h(Host, null, this.opened ? (h("div", { class: "overlay", ref: ref => this._popupRef = ref, tabIndex: -1 }, h("div", { class: "popup col " + this.getGridSize() }, h("div", { class: "popup__container " + (this.heightMode === "auto" ? "popup__container--auto" : "") }, h("div", { class: "popup__content" }, h("div", { class: "popup__header " + (this.useHeader ? "popup__header--padding" : "") }, this.useHeader &&
55
60
  h(Fragment, null, !!this.ezTitle && h("div", { class: "popup__title" }, this.ezTitle), h("button", { class: this.ezTitle ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.opened = false; this.ezClosePopup.emit(); } }))), h("div", { class: "popup__expandable-content" }, h("slot", null))))))) : undefined));
56
61
  }
57
62
  static get is() { return "ez-popup"; }
@@ -192,6 +197,7 @@ export class EzPopup {
192
197
  }
193
198
  }];
194
199
  }
200
+ static get elementRef() { return "_element"; }
195
201
  static get watchers() {
196
202
  return [{
197
203
  "propName": "opened",
@@ -308,9 +308,12 @@ export class EzSearch {
308
308
  }
309
309
  scrollToOption(opt) {
310
310
  window.requestAnimationFrame(() => {
311
- const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`div#item_${this.replaceHighlight(opt.value).replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
312
- if (liElem)
311
+ const liElem = (opt === null || opt === void 0 ? void 0 : opt.value)
312
+ ? this._optionsList.querySelector(`div#item_${opt.value.replace(/([ #;&,.+*~':"!^$[\]()=<>|/\\])/g, '\\$1')}`)
313
+ : undefined;
314
+ if (liElem) {
313
315
  liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
316
+ }
314
317
  });
315
318
  }
316
319
  selectCurrentOption() {
@@ -1,10 +1,3 @@
1
- ez-split-item {
2
- /*@doc Define altura mínima da snk-grid */
3
- --snk-grid-min-height: 0;
4
- /*@doc Define altura mínima da grid */
5
- --ez-grid--min-height: 0;
6
- }
7
-
8
1
  .box_split-item {
9
2
  background-color: var(--background--xlight);
10
3
  width: 100%;
@@ -17,7 +17,7 @@ export class SplitItem {
17
17
  CSSVarsUtils.applyVarsGrid(this._element, this._slot.children[0]);
18
18
  }
19
19
  render() {
20
- return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("slot", { name: "leftButtons" }), h("div", { class: "ez-split-item--header-title" }, this.label && (h("h3", { class: "ez-text ez-text--primary ez-title ez-title--small ez-margin--small", title: this.label }, this.label))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "small", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content", ref: el => (this._slot = el) }, h("slot", null))));
20
+ return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("slot", { name: "leftButtons" }), h("div", { class: "ez-split-item--header-title" }, this.label && (h("h3", { class: "ez-text ez-text--primary ez-title ez-title--small ez-margin--small", title: this.label }, this.label))), h("div", { class: "ez-split-item--header-buttons" }, h("slot", { name: "rightButtons" }), this.enableExpand && (h("ez-button", { size: "small", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })))), h("div", { class: "ez-split-item--content grid_height-0", ref: el => (this._slot = el) }, h("slot", null))));
21
21
  }
22
22
  static get is() { return "ez-split-item"; }
23
23
  static get originalStyleUrls() {
@@ -0,0 +1,5 @@
1
+ export var CustomEditorSource;
2
+ (function (CustomEditorSource) {
3
+ CustomEditorSource["GRID"] = "GRID";
4
+ CustomEditorSource["FORM"] = "FORM";
5
+ })(CustomEditorSource || (CustomEditorSource = {}));
@@ -0,0 +1,5 @@
1
+ export var CustomRenderSource;
2
+ (function (CustomRenderSource) {
3
+ CustomRenderSource["GRID"] = "GRID";
4
+ CustomRenderSource["FORM"] = "FORM";
5
+ })(CustomRenderSource || (CustomRenderSource = {}));
@@ -4,3 +4,5 @@ export { DialogType } from '../components/ez-dialog/DialogType';
4
4
  export { CheckMode } from '../components/ez-check/CheckMode';
5
5
  export { FormMetadata } from './form/FormMetadata';
6
6
  export { default as DataBinder } from './form/DataBinder';
7
+ export { CustomEditorSource } from './customEditor/interfaces/ICustomEditor';
8
+ export { CustomRenderSource } from './customRender/interfaces/ICustomRender';
@@ -80,6 +80,12 @@ export const EzComboBox: {
80
80
  new (): EzComboBox;
81
81
  };
82
82
 
83
+ interface EzCustomFormInput extends Components.EzCustomFormInput, HTMLElement {}
84
+ export const EzCustomFormInput: {
85
+ prototype: EzCustomFormInput;
86
+ new (): EzCustomFormInput;
87
+ };
88
+
83
89
  interface EzDateInput extends Components.EzDateInput, HTMLElement {}
84
90
  export const EzDateInput: {
85
91
  prototype: EzDateInput;