@sankhyalabs/sankhyablocks 9.2.0-dev.17 → 9.2.0-dev.19

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 (189) hide show
  1. package/dist/cjs/{ConfigStorage-0ebc800f.js → ConfigStorage-52c38bb9.js} +2 -2
  2. package/dist/cjs/{DataFetcher-602cdc72.js → DataFetcher-9af55840.js} +15 -0
  3. package/dist/cjs/{ISave-18205d86.js → ISave-c4918000.js} +1 -1
  4. package/dist/cjs/{SnkFormConfigManager-4b651537.js → SnkFormConfigManager-cef663d1.js} +2 -2
  5. package/dist/cjs/{ClientSideExporterProvider-bb0b2273.js → SnkMultiSelectionListDataSource-58ded10c.js} +78 -78
  6. package/dist/cjs/{auth-fetcher-82317d4d.js → auth-fetcher-a3a3bb16.js} +1 -1
  7. package/dist/cjs/{dataunit-fetcher-93077a2f.js → dataunit-fetcher-ae454648.js} +1 -1
  8. package/dist/cjs/filter-validate-6993f6f2.js +30 -0
  9. package/dist/cjs/{form-config-fetcher-05d210e7.js → form-config-fetcher-d7bb4f41.js} +1 -1
  10. package/dist/cjs/index-1cf293c1.js +8 -8
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
  13. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  14. package/dist/cjs/snk-actions-button_8.cjs.entry.js +5 -5
  15. package/dist/cjs/snk-application.cjs.entry.js +6 -6
  16. package/dist/cjs/snk-attach.cjs.entry.js +5 -5
  17. package/dist/cjs/snk-crud.cjs.entry.js +5 -5
  18. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
  19. package/dist/cjs/{snk-data-unit-28d629e4.js → snk-data-unit-a59a7ade.js} +2 -2
  20. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  21. package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
  22. package/dist/cjs/snk-entity-list.cjs.entry.js +10 -3
  23. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +164 -100
  24. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +23 -2
  25. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +20 -2
  26. package/dist/cjs/snk-filter-detail.cjs.entry.js +25 -8
  27. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +9 -14
  28. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +16 -3
  29. package/dist/cjs/snk-filter-number.cjs.entry.js +34 -3
  30. package/dist/cjs/snk-filter-period.cjs.entry.js +59 -14
  31. package/dist/cjs/snk-filter-search.cjs.entry.js +14 -3
  32. package/dist/cjs/snk-filter-text.cjs.entry.js +18 -1
  33. package/dist/cjs/snk-form_2.cjs.entry.js +4 -4
  34. package/dist/cjs/snk-grid.cjs.entry.js +38 -21
  35. package/dist/cjs/{snk-guides-viewer-73d40f42.js → snk-guides-viewer-e7c08c71.js} +5 -5
  36. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  37. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  38. package/dist/cjs/snk-pesquisa.cjs.entry.js +4 -4
  39. package/dist/cjs/snk-simple-crud.cjs.entry.js +13 -13
  40. package/dist/collection/components/snk-entity-list/snk-entity-list.js +28 -4
  41. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +72 -2
  42. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +73 -2
  43. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +51 -5
  44. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +83 -3
  45. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +118 -27
  46. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +49 -5
  47. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +71 -1
  48. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +62 -11
  49. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +70 -8
  50. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +0 -4
  51. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +112 -16
  52. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +8 -16
  53. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +106 -52
  54. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
  55. package/dist/collection/components/snk-filter-bar/utils/filter-validate.js +24 -0
  56. package/dist/collection/components/snk-grid/snk-grid.js +89 -11
  57. package/dist/collection/lib/message/resources/en-us/snk-filter-bar.msg.js +1 -0
  58. package/dist/collection/lib/message/resources/en-us/snk-grid.msg.js +4 -0
  59. package/dist/collection/lib/message/resources/es-es/snk-filter-bar.msg.js +1 -0
  60. package/dist/collection/lib/message/resources/es-es/snk-grid.msg.js +4 -0
  61. package/dist/collection/lib/message/resources/pt-br/snk-filter-bar.msg.js +1 -0
  62. package/dist/collection/lib/message/resources/pt-br/snk-grid.msg.js +4 -0
  63. package/dist/components/DataFetcher.js +15 -0
  64. package/dist/components/snk-crud.js +62 -44
  65. package/dist/components/snk-detail-view2.js +89 -56
  66. package/dist/components/snk-entity-list.js +11 -3
  67. package/dist/components/snk-filter-bar2.js +77 -93
  68. package/dist/components/snk-filter-binary-select.js +27 -3
  69. package/dist/components/snk-filter-checkbox-list.js +24 -3
  70. package/dist/components/snk-filter-detail2.js +28 -9
  71. package/dist/components/snk-filter-item2.js +70 -8
  72. package/dist/components/snk-filter-modal-item2.js +7 -12
  73. package/dist/components/snk-filter-modal.js +1 -325
  74. package/dist/components/snk-filter-modal2.js +391 -0
  75. package/dist/components/snk-filter-multi-select.js +19 -4
  76. package/dist/components/snk-filter-number.js +38 -4
  77. package/dist/components/snk-filter-period.js +64 -16
  78. package/dist/components/snk-filter-search.js +17 -4
  79. package/dist/components/snk-filter-text.js +22 -2
  80. package/dist/components/snk-grid2.js +65 -29
  81. package/dist/esm/{ConfigStorage-fc4e3a42.js → ConfigStorage-1e758486.js} +2 -2
  82. package/dist/esm/{DataFetcher-01ce1a4f.js → DataFetcher-2f7ba7ae.js} +15 -0
  83. package/dist/esm/{ISave-d36bade4.js → ISave-4c9742c1.js} +1 -1
  84. package/dist/esm/{SnkFormConfigManager-71dae34e.js → SnkFormConfigManager-d7031fcb.js} +2 -2
  85. package/dist/esm/{ClientSideExporterProvider-21a99af1.js → SnkMultiSelectionListDataSource-eace25fd.js} +83 -83
  86. package/dist/esm/{auth-fetcher-2e565c35.js → auth-fetcher-d8169b9c.js} +1 -1
  87. package/dist/esm/{dataunit-fetcher-14ba162b.js → dataunit-fetcher-1f7a73df.js} +1 -1
  88. package/dist/esm/filter-validate-d765d450.js +27 -0
  89. package/dist/esm/{form-config-fetcher-a1ccc944.js → form-config-fetcher-eb03ac08.js} +1 -1
  90. package/dist/esm/index-479e1293.js +8 -8
  91. package/dist/esm/loader.js +1 -1
  92. package/dist/esm/pesquisa-grid_2.entry.js +4 -4
  93. package/dist/esm/sankhyablocks.js +1 -1
  94. package/dist/esm/snk-actions-button_8.entry.js +5 -5
  95. package/dist/esm/snk-application.entry.js +6 -6
  96. package/dist/esm/snk-attach.entry.js +5 -5
  97. package/dist/esm/snk-crud.entry.js +5 -5
  98. package/dist/esm/snk-data-exporter.entry.js +5 -5
  99. package/dist/esm/{snk-data-unit-3977725e.js → snk-data-unit-a94dd52a.js} +2 -2
  100. package/dist/esm/snk-data-unit.entry.js +3 -3
  101. package/dist/esm/snk-detail-view.entry.js +7 -7
  102. package/dist/esm/snk-entity-list.entry.js +10 -3
  103. package/dist/esm/snk-filter-bar_4.entry.js +165 -101
  104. package/dist/esm/snk-filter-binary-select.entry.js +23 -2
  105. package/dist/esm/snk-filter-checkbox-list.entry.js +20 -2
  106. package/dist/esm/snk-filter-detail.entry.js +25 -8
  107. package/dist/esm/snk-filter-modal-item.entry.js +9 -14
  108. package/dist/esm/snk-filter-multi-select.entry.js +16 -3
  109. package/dist/esm/snk-filter-number.entry.js +34 -3
  110. package/dist/esm/snk-filter-period.entry.js +59 -14
  111. package/dist/esm/snk-filter-search.entry.js +14 -3
  112. package/dist/esm/snk-filter-text.entry.js +18 -1
  113. package/dist/esm/snk-form_2.entry.js +4 -4
  114. package/dist/esm/snk-grid.entry.js +31 -14
  115. package/dist/esm/{snk-guides-viewer-f800c9aa.js → snk-guides-viewer-e716659f.js} +5 -5
  116. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  117. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  118. package/dist/esm/snk-pesquisa.entry.js +4 -4
  119. package/dist/esm/snk-simple-crud.entry.js +8 -8
  120. package/dist/sankhyablocks/p-093f58fa.entry.js +1 -0
  121. package/dist/sankhyablocks/{p-e63cc25f.js → p-0dc071de.js} +1 -1
  122. package/dist/sankhyablocks/{p-f4bf0517.entry.js → p-0f6f2a84.entry.js} +1 -1
  123. package/dist/sankhyablocks/{p-2b2c2718.js → p-1129ded7.js} +1 -1
  124. package/dist/sankhyablocks/p-12cba660.entry.js +1 -0
  125. package/dist/sankhyablocks/{p-51209229.js → p-12db5588.js} +1 -1
  126. package/dist/sankhyablocks/{p-65517fcf.js → p-3d4a3965.js} +1 -1
  127. package/dist/sankhyablocks/p-3ed04f0d.entry.js +1 -0
  128. package/dist/sankhyablocks/{p-b6b42620.entry.js → p-4033a6e3.entry.js} +1 -1
  129. package/dist/sankhyablocks/p-49ddc27a.entry.js +1 -0
  130. package/dist/sankhyablocks/{p-c3eea705.entry.js → p-4a42d004.entry.js} +1 -1
  131. package/dist/sankhyablocks/p-4c763b10.entry.js +1 -0
  132. package/dist/sankhyablocks/p-4eeb06fc.js +1 -0
  133. package/dist/sankhyablocks/{p-dc8bb41f.js → p-552bdfdc.js} +1 -1
  134. package/dist/sankhyablocks/{p-3cdfd7fb.js → p-66e6569e.js} +1 -1
  135. package/dist/sankhyablocks/p-6909c146.entry.js +1 -0
  136. package/dist/sankhyablocks/p-69d0afa4.js +1 -0
  137. package/dist/sankhyablocks/{p-c3bab5f4.js → p-75b80a92.js} +1 -1
  138. package/dist/sankhyablocks/p-7f7fe6c4.entry.js +1 -0
  139. package/dist/sankhyablocks/{p-e5571279.entry.js → p-86009ea5.entry.js} +1 -1
  140. package/dist/sankhyablocks/{p-7b97f9af.entry.js → p-864066bb.entry.js} +1 -1
  141. package/dist/sankhyablocks/p-96d45943.entry.js +1 -0
  142. package/dist/sankhyablocks/{p-34222890.entry.js → p-a0b4c940.entry.js} +1 -1
  143. package/dist/sankhyablocks/{p-a60028f1.entry.js → p-a4be272f.entry.js} +1 -1
  144. package/dist/sankhyablocks/p-ab2ba522.entry.js +1 -0
  145. package/dist/sankhyablocks/p-ac9488fd.entry.js +1 -0
  146. package/dist/sankhyablocks/{p-7a1d3cb6.entry.js → p-b1d8cbf7.entry.js} +1 -1
  147. package/dist/sankhyablocks/{p-7535d592.js → p-b393f1df.js} +1 -1
  148. package/dist/sankhyablocks/{p-dfbe4d7f.entry.js → p-c5d281ad.entry.js} +1 -1
  149. package/dist/sankhyablocks/{p-41e5a485.entry.js → p-c6d8c86b.entry.js} +1 -1
  150. package/dist/sankhyablocks/p-cb4343c4.entry.js +1 -0
  151. package/dist/sankhyablocks/p-d235314c.entry.js +1 -0
  152. package/dist/sankhyablocks/{p-dde9da7a.entry.js → p-d76f1aa5.entry.js} +1 -1
  153. package/dist/sankhyablocks/{p-aba06047.entry.js → p-de58a26f.entry.js} +1 -1
  154. package/dist/sankhyablocks/p-e258de96.entry.js +1 -0
  155. package/dist/sankhyablocks/p-fd8047b8.js +1 -0
  156. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  157. package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +8 -4
  158. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +12 -0
  159. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.d.ts +12 -0
  160. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +12 -4
  161. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +16 -4
  162. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +17 -3
  163. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +10 -2
  164. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +12 -0
  165. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +8 -3
  166. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +27 -4
  167. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +17 -3
  168. package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +2 -3
  169. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +15 -2
  170. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +4 -2
  171. package/dist/types/components/snk-filter-bar/utils/filter-validate.d.ts +11 -0
  172. package/dist/types/components/snk-grid/snk-grid.d.ts +21 -8
  173. package/dist/types/components.d.ts +202 -17
  174. package/package.json +1 -1
  175. package/dist/sankhyablocks/p-07b14811.entry.js +0 -1
  176. package/dist/sankhyablocks/p-082e7ba8.entry.js +0 -1
  177. package/dist/sankhyablocks/p-25209340.entry.js +0 -1
  178. package/dist/sankhyablocks/p-295b83ae.entry.js +0 -1
  179. package/dist/sankhyablocks/p-3143bb44.entry.js +0 -1
  180. package/dist/sankhyablocks/p-353b4a74.js +0 -1
  181. package/dist/sankhyablocks/p-398cdd67.entry.js +0 -1
  182. package/dist/sankhyablocks/p-5bab470d.entry.js +0 -1
  183. package/dist/sankhyablocks/p-9fd87bfd.entry.js +0 -1
  184. package/dist/sankhyablocks/p-a76e6d51.entry.js +0 -1
  185. package/dist/sankhyablocks/p-ae2ebab7.js +0 -1
  186. package/dist/sankhyablocks/p-b21aa190.entry.js +0 -1
  187. package/dist/sankhyablocks/p-c6a8a8bc.entry.js +0 -1
  188. package/dist/sankhyablocks/p-c8932b14.entry.js +0 -1
  189. package/dist/sankhyablocks/p-dff65083.entry.js +0 -1
@@ -7,8 +7,24 @@ const SnkFilterCheckboxList = class {
7
7
  registerInstance(this, hostRef);
8
8
  this.valueChanged = createEvent(this, "valueChanged", 7);
9
9
  this.config = undefined;
10
+ this.errorMessage = undefined;
10
11
  this.optionsList = [];
11
12
  }
13
+ /**
14
+ * Define o foco no componente snk-filter-checkbox-list.
15
+ */
16
+ async setFocus() {
17
+ var _a, _b;
18
+ (_b = (_a = this._element) === null || _a === void 0 ? void 0 : _a.querySelector('ez-check')) === null || _b === void 0 ? void 0 : _b.setFocus();
19
+ }
20
+ /**
21
+ * Limpa o valor do componente restaurando o valor original da configuração.
22
+ */
23
+ async clearValue() {
24
+ var _a;
25
+ this.config = Object.assign(Object.assign({}, this.config), { value: this.config.value });
26
+ this.valueChanged.emit((_a = this.config) === null || _a === void 0 ? void 0 : _a.value);
27
+ }
12
28
  componentDidLoad() {
13
29
  if (this._element) {
14
30
  ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
@@ -16,13 +32,14 @@ const SnkFilterCheckboxList = class {
16
32
  }
17
33
  handleToggleCheck(itemChanged, checked) {
18
34
  var _a, _b;
35
+ this.errorMessage = undefined;
19
36
  let configValueMap = (_a = this.config.value) !== null && _a !== void 0 ? _a : {};
20
37
  configValueMap[itemChanged.name] = checked;
21
38
  this.config = Object.assign(Object.assign({}, this.config), { value: configValueMap });
22
39
  this.valueChanged.emit((_b = this.config) === null || _b === void 0 ? void 0 : _b.value);
23
40
  }
24
41
  renderOptions() {
25
- return this.optionsList.map(option => (h("ez-check", { label: option.label, onEzChange: (event) => this.handleToggleCheck(option, event.detail), value: !!this.isChecked(option.name) })));
42
+ return this.optionsList.map(option => (h("ez-check", { label: option.label, onEzChange: (event) => this.handleToggleCheck(option, event.detail), value: !!this.isChecked(option.name), enabled: this.config.enabled })));
26
43
  }
27
44
  isChecked(itemName) {
28
45
  var _a;
@@ -40,7 +57,8 @@ const SnkFilterCheckboxList = class {
40
57
  if (!this.config || this.config.type !== FilterItemType.CHECK_BOX_LIST) {
41
58
  return undefined;
42
59
  }
43
- return (h("div", { class: 'ez-flex ez-flex--column' }, this.renderOptions()));
60
+ return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("div", { class: 'ez-flex ez-flex--column' }, this.renderOptions(), this.errorMessage &&
61
+ h("span", { class: 'ez-text ez-text--small ez-text--error ez-margin--small' }, this.errorMessage))));
44
62
  }
45
63
  get _element() { return getElement(this); }
46
64
  };
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-479e1293.js';
2
- import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
3
- import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
4
2
  import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
5
- import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
3
+ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
6
4
  import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-2db38ff2.js';
5
+ import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
6
+ import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
7
7
  import './index-8acbae97.js';
8
8
 
9
9
  const SnkFilterDetail = class {
@@ -13,13 +13,30 @@ const SnkFilterDetail = class {
13
13
  this.config = undefined;
14
14
  this.getMessage = undefined;
15
15
  this.showHardFixed = true;
16
+ this.removalBlocked = false;
16
17
  }
17
18
  /**
18
- * Exibe o componente snk-filter-detail.
19
+ * Define o foco no campo do editor.
19
20
  */
20
- async show() {
21
- var _a, _b;
22
- (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a["show"]) === null || _b === void 0 ? void 0 : _b.call(_a);
21
+ async setFocusField() {
22
+ var _a, _b, _c, _d;
23
+ if (!this._editor) {
24
+ return;
25
+ }
26
+ if (this._editor["setFocus"]) {
27
+ (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a["setFocus"]) === null || _b === void 0 ? void 0 : _b.call(_a);
28
+ }
29
+ else if (this._editor["focus"]) {
30
+ (_d = (_c = this._editor) === null || _c === void 0 ? void 0 : _c["focus"]) === null || _d === void 0 ? void 0 : _d.call(_c);
31
+ }
32
+ }
33
+ async clearValue() {
34
+ if (!this._editor) {
35
+ return;
36
+ }
37
+ if (this._editor["clearValue"]) {
38
+ await this._editor["clearValue"]();
39
+ }
23
40
  }
24
41
  observeConfig(newValue) {
25
42
  var _a, _b;
@@ -91,7 +108,7 @@ const SnkFilterDetail = class {
91
108
  return Object.assign(Object.assign({}, item), { visible: false, fixed: false, value: undefined });
92
109
  }
93
110
  getPopUpHeaderButtons() {
94
- return (h(Fragment, null, !this.config.removalBlocked &&
111
+ return (h(Fragment, null, !this.removalBlocked && !this.config.removalBlocked &&
95
112
  this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), this.showHardFixed && !this.config.hardFixed &&
96
113
  this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))));
97
114
  }
@@ -1,11 +1,11 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-479e1293.js';
2
2
  import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
3
- import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
3
+ import { C as ConfigStorage } from './ConfigStorage-1e758486.js';
4
4
  import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
5
- import { C as ConfigStorage } from './ConfigStorage-fc4e3a42.js';
5
+ import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
6
6
  import { F as FilterType } from './filter-type.enum-f6a8fe23.js';
7
- import './form-config-fetcher-a1ccc944.js';
8
- import './DataFetcher-01ce1a4f.js';
7
+ import './form-config-fetcher-eb03ac08.js';
8
+ import './DataFetcher-2f7ba7ae.js';
9
9
  import './PrintUtils-3e4ff0f5.js';
10
10
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
11
11
 
@@ -21,12 +21,6 @@ const SnkFilterModalItem = class {
21
21
  this.configName = undefined;
22
22
  this.resourceID = undefined;
23
23
  }
24
- observeFilterItem(newValue) {
25
- var _a, _b;
26
- this._editor && (this._editor["config"] = newValue);
27
- (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a['reloadList']) === null || _b === void 0 ? void 0 : _b.call(_a);
28
- this.filterChange.emit(newValue);
29
- }
30
24
  getContentEditorConfig() {
31
25
  const props = { presentationMode: EPresentationMode.MODAL };
32
26
  switch (this.filterItem.type) {
@@ -61,6 +55,7 @@ const SnkFilterModalItem = class {
61
55
  return !this.filterItem.visible ? newValue !== undefined : true;
62
56
  }
63
57
  updateFilterValue(data) {
58
+ var _a, _b;
64
59
  const newValue = (data === null || data === void 0 ? void 0 : data.value) !== undefined ? data.value : data;
65
60
  if (this.filterItem.groupedItems != undefined) {
66
61
  this.filterItem = Object.assign(Object.assign({}, this.filterItem), { visible: newValue > 0, value: newValue, groupedItems: data.items });
@@ -68,6 +63,9 @@ const SnkFilterModalItem = class {
68
63
  else {
69
64
  this.filterItem = Object.assign(Object.assign({}, this.filterItem), { value: this.filterItem.type === (FilterItemType.SEARCH || FilterItemType.CHECK_BOX_LIST) ? data : newValue, visible: this.isVisible(newValue) });
70
65
  }
66
+ this._editor && (this._editor["config"] = this.filterItem);
67
+ (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a['reloadList']) === null || _b === void 0 ? void 0 : _b.call(_a);
68
+ this.filterChange.emit(this.filterItem);
71
69
  }
72
70
  handleDeleteFilter(filter, filterItemType) {
73
71
  if (filterItemType === FilterItemType.PERSONALIZED) {
@@ -97,12 +95,9 @@ const SnkFilterModalItem = class {
97
95
  }
98
96
  render() {
99
97
  const { tag: ContentEditor, props } = this.getContentEditorConfig();
100
- return (h(Host, null, h("div", { class: "ez-flex ez-flex--column grow" }, this.canShowDetailModal() && (h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, h("div", { class: "ez-title ez-title--small ez-title--primary grow" }, this.filterItem.detailModal))), h(ContentEditor, Object.assign({ ref: ref => this._editor = ref, config: this.filterItem, value: this.filterItem.value, onValueChanged: (event) => this.updateFilterValue(event.detail), "data-element-id": this._idContentEditor }, props)))));
98
+ return (h(Host, null, h("div", { class: "ez-flex ez-flex--column grow" }, this.canShowDetailModal() && (h("label", { class: "ez-text ez-text--medium ez-text--primary ez-margin-bottom--extra-small", htmlFor: `filter-item-${this.filterItem.id}` }, this.filterItem.detailModal)), h(ContentEditor, Object.assign({ ref: ref => this._editor = ref, id: `filter-item-${this.filterItem.id}`, config: this.filterItem, value: this.filterItem.value, onValueChanged: (event) => this.updateFilterValue(event.detail), "data-element-id": this._idContentEditor }, props)))));
101
99
  }
102
100
  get _element() { return getElement(this); }
103
- static get watchers() { return {
104
- "filterItem": ["observeFilterItem"]
105
- }; }
106
101
  };
107
102
  SnkFilterModalItem.style = snkFilterModalItemCss;
108
103
 
@@ -8,21 +8,32 @@ const SnkFilterMultiSelect = class {
8
8
  this.valueChanged = createEvent(this, "valueChanged", 7);
9
9
  this.value = undefined;
10
10
  this.config = undefined;
11
+ this.errorMessage = undefined;
11
12
  }
12
13
  /**
13
14
  * Emitido quando acontece a alteração de valor do componente snk-filter-multi-select
14
15
  */
15
16
  ezChangeListener(evt) {
16
17
  var _a;
18
+ this.errorMessage = undefined;
17
19
  this.value = (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value;
18
20
  this.valueChanged.emit(this.value);
19
21
  }
20
22
  /**
21
- * Exibe o componente snk-filter-multi-select
23
+ * Define o foco no componente snk-filter-multi-select.
22
24
  */
23
- async show() {
25
+ async setFocus() {
24
26
  this._comboElement.setFocus();
25
27
  }
28
+ /**
29
+ * Limpa o valor do componente restaurando o valor original da configuração.
30
+ */
31
+ async clearValue() {
32
+ this.value = this.config.value;
33
+ if (this._comboElement) {
34
+ this._comboElement.value = this.config.value;
35
+ }
36
+ }
26
37
  componentDidLoad() {
27
38
  if (this._element) {
28
39
  ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
@@ -32,7 +43,9 @@ const SnkFilterMultiSelect = class {
32
43
  if (!this.config || this.config.type !== FilterItemType.MULTI_SELECT) {
33
44
  return undefined;
34
45
  }
35
- return (h("ez-combo-box", { id: this.config.id, ref: ref => this._comboElement = ref, label: this.config.label, value: this.config.value, options: this.config.props.options }));
46
+ return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-combo-box", { id: this.config.id, ref: ref => this._comboElement = ref, label: this.config.label, value: this.config.value, options: this.config.props.options, enabled: this.config.enabled, errorMessage: this.errorMessage, onEzVisibilityChange: (event) => {
47
+ event.stopPropagation();
48
+ } })));
36
49
  }
37
50
  get _element() { return getElement(this); }
38
51
  };
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-479e1293.js';
2
2
  import { ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
4
- import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
5
4
  import { F as FilterNumberVariation } from './filterNumberVariation-8cee02ea.js';
5
+ import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
6
6
 
7
7
  const SnkFilterPeriod = class {
8
8
  constructor(hostRef) {
@@ -15,11 +15,13 @@ const SnkFilterPeriod = class {
15
15
  this.getMessage = undefined;
16
16
  this.value = undefined;
17
17
  this.presentationMode = EPresentationMode.CHIP;
18
+ this.errorMessage = undefined;
18
19
  }
19
20
  /**
20
21
  * Emitido quando acontece a alteração de valor do componente snk-filter-number
21
22
  */
22
23
  ezChangeListener(evt) {
24
+ this.errorMessage = undefined;
23
25
  if (this.getVariation() === FilterNumberVariation.INTERVAL) {
24
26
  const start = this._startInterval.value;
25
27
  const end = this._endInterval.value;
@@ -40,6 +42,35 @@ const SnkFilterPeriod = class {
40
42
  }
41
43
  this._numberElement.setFocus();
42
44
  }
45
+ /**
46
+ * Define o foco no componente snk-filter-number
47
+ */
48
+ async setFocus() {
49
+ if (this.getVariation() === FilterNumberVariation.INTERVAL) {
50
+ await this._startInterval.setFocus();
51
+ return;
52
+ }
53
+ await this._numberElement.setFocus();
54
+ }
55
+ /**
56
+ * Limpa o valor do componente restaurando o valor original da configuração.
57
+ */
58
+ async clearValue() {
59
+ var _a, _b;
60
+ this.value = this.config.value;
61
+ if (this.getVariation() === FilterNumberVariation.INTERVAL) {
62
+ const intervalValue = this.config.value;
63
+ if (this._startInterval) {
64
+ this._startInterval.value = (_a = intervalValue === null || intervalValue === void 0 ? void 0 : intervalValue.start) !== null && _a !== void 0 ? _a : null;
65
+ }
66
+ if (this._endInterval) {
67
+ this._endInterval.value = (_b = intervalValue === null || intervalValue === void 0 ? void 0 : intervalValue.end) !== null && _b !== void 0 ? _b : null;
68
+ }
69
+ }
70
+ else if (this._numberElement) {
71
+ this._numberElement.value = this.config.value;
72
+ }
73
+ }
43
74
  getIntervalValue(prop) {
44
75
  const objValue = this.value ? this.value[prop] : null;
45
76
  return objValue !== null && objValue !== void 0 ? objValue : null;
@@ -71,9 +102,9 @@ const SnkFilterPeriod = class {
71
102
  return undefined;
72
103
  }
73
104
  if (this.getVariation() === FilterNumberVariation.INTERVAL) {
74
- return (h("div", { class: "ez-col ez-col--nowrap" }, h("ez-number-input", { id: `${this.config.id}_start`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding--small' : '', label: this._startIntervalLabel, ref: ref => this._startInterval = ref, value: this.getIntervalValue("start"), precision: (_a = this.config.props) === null || _a === void 0 ? void 0 : _a.precision }), this.buildLabel(), h("ez-number-input", { id: `${this.config.id}_end`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding--small' : '', label: this._endIntervalLabel, ref: ref => this._endInterval = ref, value: this.getIntervalValue("end"), precision: (_b = this.config.props) === null || _b === void 0 ? void 0 : _b.precision })));
105
+ return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("div", { class: "ez-col ez-col--nowrap" }, h("ez-number-input", { id: `${this.config.id}_start`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding-right--medium' : '', label: this._startIntervalLabel, ref: ref => this._startInterval = ref, value: this.getIntervalValue("start"), enabled: this.config.enabled, precision: (_a = this.config.props) === null || _a === void 0 ? void 0 : _a.precision, errorMessage: this.errorMessage }), this.buildLabel(), h("ez-number-input", { id: `${this.config.id}_end`, label: this._endIntervalLabel, ref: ref => this._endInterval = ref, value: this.getIntervalValue("end"), enabled: this.config.enabled, precision: (_b = this.config.props) === null || _b === void 0 ? void 0 : _b.precision, errorMessage: this.errorMessage }))));
75
106
  }
76
- return (h("ez-number-input", { id: this.config.id, ref: ref => this._numberElement = ref, label: this.config.label, value: this.config.value, precision: (_c = this.config.props) === null || _c === void 0 ? void 0 : _c.precision }));
107
+ return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-number-input", { id: this.config.id, ref: ref => this._numberElement = ref, value: this.config.value, precision: (_c = this.config.props) === null || _c === void 0 ? void 0 : _c.precision, enabled: this.config.enabled, errorMessage: this.errorMessage })));
77
108
  }
78
109
  get _element() { return getElement(this); }
79
110
  };
@@ -10,37 +10,77 @@ const SnkFilterPeriod = class {
10
10
  this._startDateLabel = 'Inicial';
11
11
  this._endDateLabel = 'Final';
12
12
  this._toLabel = 'até';
13
+ this.internalChange = {
14
+ start: false,
15
+ end: false
16
+ };
13
17
  this.config = undefined;
14
18
  this.getMessage = undefined;
15
- this.value = undefined;
19
+ this.value = {
20
+ start: null,
21
+ end: null
22
+ };
16
23
  this.presentationMode = EPresentationMode.CHIP;
24
+ this.errorMessage = undefined;
25
+ }
26
+ configChanged(newValue, oldValue) {
27
+ if (this.internalChange.end) {
28
+ this.internalChange.end = false;
29
+ return;
30
+ }
31
+ if (this.internalChange.start) {
32
+ this.internalChange.start = false;
33
+ return;
34
+ }
35
+ if (newValue && (newValue.start !== (oldValue === null || oldValue === void 0 ? void 0 : oldValue.start) || newValue.end !== (oldValue === null || oldValue === void 0 ? void 0 : oldValue.end))) {
36
+ this.valueStart = this.parseDate(newValue.start);
37
+ this.valueEnd = this.parseDate(newValue.end);
38
+ }
39
+ }
40
+ ezChangeListener(event, field) {
41
+ this.errorMessage = undefined;
42
+ this.internalChange[field] = true;
43
+ this.value = Object.assign(Object.assign({}, (this.value || {})), { [field]: event.detail ? this.parseDate(event.detail) : null });
44
+ this.valueChanged.emit(this.value);
17
45
  }
18
46
  /**
19
- * Emitido quando acontece a alteração de valor do componente snk-filter-period
47
+ * Define o foco no componente snk-filter-period.
20
48
  */
21
- ezChangeListener() {
22
- const start = this._startDate.value;
23
- const end = this._endDate.value;
24
- this.value = (start || end ? { start, end } : undefined);
25
- this.valueChanged.emit(this.value);
49
+ async setFocus() {
50
+ this._startDate.setFocus();
51
+ }
52
+ /**
53
+ * Limpa o valor do componente restaurando o valor original da configuração.
54
+ */
55
+ async clearValue() {
56
+ this.value = this.config.value;
57
+ this.valueStart = this.getDate("start");
58
+ this.valueEnd = this.getDate("end");
26
59
  }
27
60
  componentDidLoad() {
28
61
  if (this._element) {
29
62
  ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
63
+ this._element.querySelectorAll('ez-date-input').forEach(input => {
64
+ const textInput = input.shadowRoot.querySelector('ez-text-input');
65
+ textInput.style.setProperty('--ez-text-input__min-width', '120px');
66
+ });
30
67
  }
31
68
  }
32
- getDate(prop) {
33
- const objValue = this.value ? this.value[prop] : null;
34
- if (objValue instanceof Date) {
35
- return objValue;
69
+ parseDate(date) {
70
+ if (date instanceof Date) {
71
+ return date;
36
72
  }
37
- if (typeof objValue === "string") {
38
- let date = new Date(objValue);
73
+ if (typeof date === "string") {
74
+ date = new Date(date);
39
75
  date.setMinutes(date.getMinutes() + date.getTimezoneOffset());
40
76
  return date;
41
77
  }
42
78
  return null;
43
79
  }
80
+ getDate(prop) {
81
+ const objValue = this.value ? this.value[prop] : null;
82
+ return this.parseDate(objValue);
83
+ }
44
84
  /**
45
85
  * Exibe o componente snk-filter-period
46
86
  */
@@ -58,14 +98,19 @@ const SnkFilterPeriod = class {
58
98
  this._endDateLabel = this.getMessage('snkFilterBar.labelEnd');
59
99
  this._toLabel = this.getMessage('snkFilterBar.labelTo');
60
100
  }
101
+ this.valueStart = this.getDate("start");
102
+ this.valueEnd = this.getDate("end");
61
103
  }
62
104
  render() {
63
105
  if (!this.config || this.config.type !== FilterItemType.PERIOD) {
64
106
  return undefined;
65
107
  }
66
- return (h("div", { class: "ez-col ez-col--nowrap" }, h("ez-date-input", { id: `${this.config.id}_start`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding--small' : '', label: this._startDateLabel, ref: ref => this._startDate = ref, value: this.getDate("start") }), this.buildLabel(), h("ez-date-input", { id: `${this.config.id}_end`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding--small' : '', label: this._endDateLabel, ref: ref => this._endDate = ref, value: this.getDate("end") })));
108
+ return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("div", { class: "ez-col ez-col--nowrap" }, h("ez-date-input", { id: `${this.config.id}_start`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding-right--medium' : '', label: this._startDateLabel, ref: ref => this._startDate = ref, enabled: this.config.enabled, value: this.valueStart, errorMessage: this.errorMessage, onEzChange: (event) => this.ezChangeListener(event, 'start') }), this.buildLabel(), h("ez-date-input", { id: `${this.config.id}_end`, label: this._endDateLabel, ref: ref => this._endDate = ref, enabled: this.config.enabled, value: this.valueEnd, errorMessage: this.errorMessage, onEzChange: (event) => this.ezChangeListener(event, 'end') }))));
67
109
  }
68
110
  get _element() { return getElement(this); }
111
+ static get watchers() { return {
112
+ "value": ["configChanged"]
113
+ }; }
69
114
  };
70
115
 
71
116
  export { SnkFilterPeriod as snk_filter_period };
@@ -9,11 +9,13 @@ const SnkFilterSearch = class {
9
9
  this._isSearchPlus = false;
10
10
  this.config = undefined;
11
11
  this.value = undefined;
12
+ this.errorMessage = undefined;
12
13
  }
13
14
  /**
14
15
  * Emitido quando acontece a alteração de valor do componente snk-filter-search
15
16
  */
16
17
  async ezChangeListener(_evt) {
18
+ this.errorMessage = undefined;
17
19
  if (this._isSearchPlus) {
18
20
  this.value = await this._searchInput.getValueAsync();
19
21
  }
@@ -40,16 +42,25 @@ const SnkFilterSearch = class {
40
42
  });
41
43
  }
42
44
  /**
43
- * Exibe o componente snk-filter-search
45
+ * Define o foco no componente snk-filter-search.
44
46
  */
45
- async show() {
47
+ async setFocus() {
46
48
  this._searchInput.setFocus();
47
49
  }
50
+ /**
51
+ * Limpa o valor do componente restaurando o valor original da configuração.
52
+ */
53
+ async clearValue() {
54
+ this.value = this.config.value;
55
+ if (this._searchInput) {
56
+ this._searchInput.value = this.config.value;
57
+ }
58
+ }
48
59
  getInputItem() {
49
60
  var _a;
50
61
  this._isSearchPlus = ((_a = this.config.props) === null || _a === void 0 ? void 0 : _a["useSearchPlus"]) == true;
51
62
  const TagName = this._isSearchPlus ? "ez-search-plus" : "ez-search";
52
- return (h(TagName, { id: this.config.id, suppressEmptyOption: true, value: this.config.value, label: this.config.label, ref: ref => this._searchInput = ref, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, this._isSearchPlus) }));
63
+ return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h(TagName, { id: this.config.id, suppressEmptyOption: true, value: this.config.value, label: this.config.label, enabled: this.config.enabled, ref: ref => this._searchInput = ref, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, this._isSearchPlus), errorMessage: this.errorMessage })));
53
64
  }
54
65
  render() {
55
66
  if (!this.config || this.config.type !== FilterItemType.SEARCH) {
@@ -7,14 +7,31 @@ const SnkFilterText = class {
7
7
  this.valueChanged = createEvent(this, "valueChanged", 7);
8
8
  this.config = undefined;
9
9
  this.value = undefined;
10
+ this.errorMessage = undefined;
10
11
  }
11
12
  /**
12
13
  * Emitido quando acontece a alteração de valor do componente snk-filter-text.
13
14
  */
14
15
  ezChangeListener(evt) {
16
+ this.errorMessage = undefined;
15
17
  this.value = evt.detail;
16
18
  this.valueChanged.emit(this.value);
17
19
  }
20
+ /**
21
+ * Define o foco no componente snk-filter-text.
22
+ */
23
+ async setFocus() {
24
+ this._textInputElement.setFocus();
25
+ }
26
+ /**
27
+ * Limpa o valor do componente restaurando o valor original da configuração.
28
+ */
29
+ async clearValue() {
30
+ this.value = this.config.value;
31
+ if (this._textInputElement) {
32
+ this._textInputElement.value = this.config.value;
33
+ }
34
+ }
18
35
  componentDidLoad() {
19
36
  if (this._element) {
20
37
  ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
@@ -25,7 +42,7 @@ const SnkFilterText = class {
25
42
  if (!this.config) {
26
43
  return undefined;
27
44
  }
28
- return (h("ez-text-input", { id: this.config.id, ref: ref => this._textInputElement = ref, label: this.config.label, value: this.config.value, mask: (_a = this.config) === null || _a === void 0 ? void 0 : _a.mask, cleanValueMask: true }));
45
+ return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-text-input", { id: this.config.id, ref: ref => this._textInputElement = ref, value: this.config.value, mask: (_a = this.config) === null || _a === void 0 ? void 0 : _a.mask, enabled: this.config.enabled, cleanValueMask: true, errorMessage: this.errorMessage })));
29
46
  }
30
47
  get _element() { return getElement(this); }
31
48
  };
@@ -1,14 +1,14 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-479e1293.js';
2
2
  import { ElementIDUtils, ObjectUtils, ApplicationContext } from '@sankhyalabs/core';
3
- import { S as SnkFormConfigManager } from './SnkFormConfigManager-71dae34e.js';
3
+ import { S as SnkFormConfigManager } from './SnkFormConfigManager-d7031fcb.js';
4
4
  import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
5
5
  import { buildFormConfigFromDataUnit } from '@sankhyalabs/ezui/dist/collection/utils/form';
6
6
  import { b as buildGuides, a as buildGuidesMap, g as getFieldsToSave, u as updateTabInFieldsFromGroupList, c as buildNewGuideName } from './FormConfigHelper-4e42f0b6.js';
7
7
  import { a as TAB_NAMES, G as GROUP_NAMES } from './constants-7b422de0.js';
8
8
  import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
9
- import { U as UserConfigType } from './form-config-fetcher-a1ccc944.js';
10
- import './ConfigStorage-fc4e3a42.js';
11
- import './DataFetcher-01ce1a4f.js';
9
+ import { U as UserConfigType } from './form-config-fetcher-eb03ac08.js';
10
+ import './ConfigStorage-1e758486.js';
11
+ import './DataFetcher-2f7ba7ae.js';
12
12
  import './PrintUtils-3e4ff0f5.js';
13
13
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
14
14
  import './filter-item-type.enum-d45e026f.js';
@@ -1,25 +1,26 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-479e1293.js';
2
2
  import { KeyboardManager, Action, ElementIDUtils, ApplicationContext, StringUtils } from '@sankhyalabs/core';
3
- import { T as TaskbarElement } from './taskbar-elements-faaf5d8f.js';
4
- import { C as ConfigStorage } from './ConfigStorage-fc4e3a42.js';
5
- import { P as PresentationMode, E as ExporterStrategy } from './index-b40568ff.js';
6
- import { T as TaskbarProcessor } from './taskbar-processor-3436124c.js';
7
- import { s as store } from './index-446f9341.js';
8
- import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, c as ClientSideExporterProvider } from './ClientSideExporterProvider-21a99af1.js';
9
3
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
10
- import './DataFetcher-01ce1a4f.js';
11
- import './ISave-d36bade4.js';
4
+ import { buildFieldSearch } from '@sankhyalabs/ezui/dist/collection/utils';
5
+ import './DataFetcher-2f7ba7ae.js';
6
+ import './ISave-4c9742c1.js';
7
+ import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, c as ClientSideExporterProvider } from './SnkMultiSelectionListDataSource-eace25fd.js';
8
+ import { P as PresentationMode, E as ExporterStrategy } from './index-b40568ff.js';
12
9
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
13
10
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
14
- import './dataunit-fetcher-14ba162b.js';
11
+ import './dataunit-fetcher-1f7a73df.js';
15
12
  import './filter-item-type.enum-d45e026f.js';
16
- import './form-config-fetcher-a1ccc944.js';
13
+ import './form-config-fetcher-eb03ac08.js';
17
14
  import './constants-7b422de0.js';
15
+ import { C as ConfigStorage } from './ConfigStorage-1e758486.js';
16
+ import { s as store } from './index-446f9341.js';
18
17
  import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
19
- import { buildFieldSearch } from '@sankhyalabs/ezui/dist/collection/utils';
20
- import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
21
- import './IFetchDataExporterParams-d73bed3d.js';
18
+ import { v as validateFilters } from './filter-validate-d765d450.js';
19
+ import { T as TaskbarElement } from './taskbar-elements-faaf5d8f.js';
20
+ import { T as TaskbarProcessor } from './taskbar-processor-3436124c.js';
22
21
  import './PrintUtils-3e4ff0f5.js';
22
+ import './IFetchDataExporterParams-d73bed3d.js';
23
+ import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
23
24
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
24
25
  import '@sankhyalabs/core/dist/utils/SortingUtils';
25
26
  import './ResourceIDUtils-a114189a.js';
@@ -113,6 +114,9 @@ const SnkGrid = class {
113
114
  if (action.type === Action.METADATA_LOADED) {
114
115
  return await this.interceptMetadataLoaded(action);
115
116
  }
117
+ if (action.type === Action.LOADING_DATA) {
118
+ return await this.interceptLoadData(action);
119
+ }
116
120
  return action;
117
121
  },
118
122
  };
@@ -157,6 +161,8 @@ const SnkGrid = class {
157
161
  this.suppressCheckboxColumn = undefined;
158
162
  this.suppressFilterColumn = false;
159
163
  this.compact = undefined;
164
+ this.filterCustomConfig = undefined;
165
+ this.filterCustomConfigInterceptor = undefined;
160
166
  }
161
167
  getGridHeaderSelectedBtns() {
162
168
  const btns = [
@@ -435,6 +441,17 @@ const SnkGrid = class {
435
441
  this.loadGridCustomFormatters(action.payload.fields);
436
442
  return action;
437
443
  }
444
+ async interceptLoadData(action) {
445
+ var _a;
446
+ const hasInvalidFilters = !validateFilters((_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig);
447
+ if (hasInvalidFilters) {
448
+ const errorTitle = this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.title", {});
449
+ const errorMessage = this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.message", {});
450
+ await this._application.error(errorTitle, errorMessage);
451
+ return;
452
+ }
453
+ return action;
454
+ }
438
455
  finishLoading() {
439
456
  this._dataUnit.addInterceptor(this.dataUnitInterceptor);
440
457
  CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
@@ -644,7 +661,7 @@ const SnkGrid = class {
644
661
  return undefined;
645
662
  }
646
663
  return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline", tabindex: "0" }, h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
647
- h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium ez-padding-top--extra-small", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none', actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? 'snk-grid-container__without-shadow ' : '') + 'snk-grid__table', "data-element-id": "embedded", dataUnit: this._dataUnit, key: 'grid-' + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => {
664
+ h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, filterCustomConfig: this.filterCustomConfig, filterCustomConfigInterceptor: this.filterCustomConfigInterceptor }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium ez-padding-top--extra-small", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none', actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? 'snk-grid-container__without-shadow ' : '') + 'snk-grid__table', "data-element-id": "embedded", dataUnit: this._dataUnit, key: 'grid-' + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => {
648
665
  this.gridConfigChangeHandler(evt);
649
666
  }, onEzColumnFilterChanged: async () => await this.dataExporterProviderStore(), onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, useSearchColumn: this.useSearchColumn, suppressHorizontalScroll: this.suppressHorizontalScroll, paginationCounterMode: this.paginationCounterMode, suppressCheckboxColumn: this.suppressCheckboxColumn, suppressFilterColumn: this.suppressFilterColumn, compact: this.compact }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId, actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, h("slot", { name: "SnkGridFooter" })), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._popUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
650
667
  }
@@ -1,18 +1,18 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-479e1293.js';
2
2
  import { ObjectUtils, StringUtils, Action, KeyboardManager, ElementIDUtils } from '@sankhyalabs/core';
3
- import { S as SnkFormConfigManager } from './SnkFormConfigManager-71dae34e.js';
3
+ import { S as SnkFormConfigManager } from './SnkFormConfigManager-d7031fcb.js';
4
4
  import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
5
5
  import { T as TaskbarProcessor } from './taskbar-processor-3436124c.js';
6
6
  import { T as TaskbarElement } from './taskbar-elements-faaf5d8f.js';
7
7
  import { V as VIEW_MODE } from './constants-7b422de0.js';
8
- import './DataFetcher-01ce1a4f.js';
9
- import './ISave-d36bade4.js';
8
+ import './DataFetcher-2f7ba7ae.js';
9
+ import './ISave-4c9742c1.js';
10
10
  import { P as PresentationMode } from './index-b40568ff.js';
11
11
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
12
12
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
13
- import './dataunit-fetcher-14ba162b.js';
13
+ import './dataunit-fetcher-1f7a73df.js';
14
14
  import './filter-item-type.enum-d45e026f.js';
15
- import './form-config-fetcher-a1ccc944.js';
15
+ import './form-config-fetcher-eb03ac08.js';
16
16
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
17
17
  import { buildFieldSearch, SHORTCUT_SEARCH_FIELD } from '@sankhyalabs/ezui/dist/collection/utils';
18
18