@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
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1cf293c1.js');
6
- const utils = require('@sankhyalabs/ezui/dist/collection/utils');
7
- const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
8
6
  const core = require('@sankhyalabs/core');
9
- const presentationMode = require('./presentationMode-52ec3bdd.js');
7
+ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
10
8
  const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-7259cf65.js');
9
+ const presentationMode = require('./presentationMode-52ec3bdd.js');
10
+ const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
11
11
  require('./index-62760a9c.js');
12
12
 
13
13
  const SnkFilterDetail = class {
@@ -17,13 +17,30 @@ const SnkFilterDetail = class {
17
17
  this.config = undefined;
18
18
  this.getMessage = undefined;
19
19
  this.showHardFixed = true;
20
+ this.removalBlocked = false;
20
21
  }
21
22
  /**
22
- * Exibe o componente snk-filter-detail.
23
+ * Define o foco no campo do editor.
23
24
  */
24
- async show() {
25
- var _a, _b;
26
- (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a["show"]) === null || _b === void 0 ? void 0 : _b.call(_a);
25
+ async setFocusField() {
26
+ var _a, _b, _c, _d;
27
+ if (!this._editor) {
28
+ return;
29
+ }
30
+ if (this._editor["setFocus"]) {
31
+ (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a["setFocus"]) === null || _b === void 0 ? void 0 : _b.call(_a);
32
+ }
33
+ else if (this._editor["focus"]) {
34
+ (_d = (_c = this._editor) === null || _c === void 0 ? void 0 : _c["focus"]) === null || _d === void 0 ? void 0 : _d.call(_c);
35
+ }
36
+ }
37
+ async clearValue() {
38
+ if (!this._editor) {
39
+ return;
40
+ }
41
+ if (this._editor["clearValue"]) {
42
+ await this._editor["clearValue"]();
43
+ }
27
44
  }
28
45
  observeConfig(newValue) {
29
46
  var _a, _b;
@@ -95,7 +112,7 @@ const SnkFilterDetail = class {
95
112
  return Object.assign(Object.assign({}, item), { visible: false, fixed: false, value: undefined });
96
113
  }
97
114
  getPopUpHeaderButtons() {
98
- return (index.h(index.Fragment, null, !this.config.removalBlocked &&
115
+ return (index.h(index.Fragment, null, !this.removalBlocked && !this.config.removalBlocked &&
99
116
  this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), this.showHardFixed && !this.config.hardFixed &&
100
117
  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 })))));
101
118
  }
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1cf293c1.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
7
+ const ConfigStorage = require('./ConfigStorage-52c38bb9.js');
8
8
  const presentationMode = require('./presentationMode-52ec3bdd.js');
9
- const ConfigStorage = require('./ConfigStorage-0ebc800f.js');
9
+ const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
10
10
  const filterType_enum = require('./filter-type.enum-2bb46d2a.js');
11
- require('./form-config-fetcher-05d210e7.js');
12
- require('./DataFetcher-602cdc72.js');
11
+ require('./form-config-fetcher-d7bb4f41.js');
12
+ require('./DataFetcher-9af55840.js');
13
13
  require('./PrintUtils-bcaeb82f.js');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
15
 
@@ -25,12 +25,6 @@ const SnkFilterModalItem = class {
25
25
  this.configName = undefined;
26
26
  this.resourceID = undefined;
27
27
  }
28
- observeFilterItem(newValue) {
29
- var _a, _b;
30
- this._editor && (this._editor["config"] = newValue);
31
- (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a['reloadList']) === null || _b === void 0 ? void 0 : _b.call(_a);
32
- this.filterChange.emit(newValue);
33
- }
34
28
  getContentEditorConfig() {
35
29
  const props = { presentationMode: presentationMode.EPresentationMode.MODAL };
36
30
  switch (this.filterItem.type) {
@@ -65,6 +59,7 @@ const SnkFilterModalItem = class {
65
59
  return !this.filterItem.visible ? newValue !== undefined : true;
66
60
  }
67
61
  updateFilterValue(data) {
62
+ var _a, _b;
68
63
  const newValue = (data === null || data === void 0 ? void 0 : data.value) !== undefined ? data.value : data;
69
64
  if (this.filterItem.groupedItems != undefined) {
70
65
  this.filterItem = Object.assign(Object.assign({}, this.filterItem), { visible: newValue > 0, value: newValue, groupedItems: data.items });
@@ -72,6 +67,9 @@ const SnkFilterModalItem = class {
72
67
  else {
73
68
  this.filterItem = Object.assign(Object.assign({}, this.filterItem), { value: this.filterItem.type === (filterItemType_enum.FilterItemType.SEARCH || filterItemType_enum.FilterItemType.CHECK_BOX_LIST) ? data : newValue, visible: this.isVisible(newValue) });
74
69
  }
70
+ this._editor && (this._editor["config"] = this.filterItem);
71
+ (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a['reloadList']) === null || _b === void 0 ? void 0 : _b.call(_a);
72
+ this.filterChange.emit(this.filterItem);
75
73
  }
76
74
  handleDeleteFilter(filter, filterItemType) {
77
75
  if (filterItemType === filterItemType_enum.FilterItemType.PERSONALIZED) {
@@ -101,12 +99,9 @@ const SnkFilterModalItem = class {
101
99
  }
102
100
  render() {
103
101
  const { tag: ContentEditor, props } = this.getContentEditorConfig();
104
- return (index.h(index.Host, null, index.h("div", { class: "ez-flex ez-flex--column grow" }, this.canShowDetailModal() && (index.h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, index.h("div", { class: "ez-title ez-title--small ez-title--primary grow" }, this.filterItem.detailModal))), index.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)))));
102
+ return (index.h(index.Host, null, index.h("div", { class: "ez-flex ez-flex--column grow" }, this.canShowDetailModal() && (index.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)), index.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)))));
105
103
  }
106
104
  get _element() { return index.getElement(this); }
107
- static get watchers() { return {
108
- "filterItem": ["observeFilterItem"]
109
- }; }
110
105
  };
111
106
  SnkFilterModalItem.style = snkFilterModalItemCss;
112
107
 
@@ -12,21 +12,32 @@ const SnkFilterMultiSelect = class {
12
12
  this.valueChanged = index.createEvent(this, "valueChanged", 7);
13
13
  this.value = undefined;
14
14
  this.config = undefined;
15
+ this.errorMessage = undefined;
15
16
  }
16
17
  /**
17
18
  * Emitido quando acontece a alteração de valor do componente snk-filter-multi-select
18
19
  */
19
20
  ezChangeListener(evt) {
20
21
  var _a;
22
+ this.errorMessage = undefined;
21
23
  this.value = (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value;
22
24
  this.valueChanged.emit(this.value);
23
25
  }
24
26
  /**
25
- * Exibe o componente snk-filter-multi-select
27
+ * Define o foco no componente snk-filter-multi-select.
26
28
  */
27
- async show() {
29
+ async setFocus() {
28
30
  this._comboElement.setFocus();
29
31
  }
32
+ /**
33
+ * Limpa o valor do componente restaurando o valor original da configuração.
34
+ */
35
+ async clearValue() {
36
+ this.value = this.config.value;
37
+ if (this._comboElement) {
38
+ this._comboElement.value = this.config.value;
39
+ }
40
+ }
30
41
  componentDidLoad() {
31
42
  if (this._element) {
32
43
  core.ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
@@ -36,7 +47,9 @@ const SnkFilterMultiSelect = class {
36
47
  if (!this.config || this.config.type !== filterItemType_enum.FilterItemType.MULTI_SELECT) {
37
48
  return undefined;
38
49
  }
39
- return (index.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 }));
50
+ return (index.h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, index.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) => {
51
+ event.stopPropagation();
52
+ } })));
40
53
  }
41
54
  get _element() { return index.getElement(this); }
42
55
  };
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-1cf293c1.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
8
- const presentationMode = require('./presentationMode-52ec3bdd.js');
9
8
  const filterNumberVariation = require('./filterNumberVariation-d65332da.js');
9
+ const presentationMode = require('./presentationMode-52ec3bdd.js');
10
10
 
11
11
  const SnkFilterPeriod = class {
12
12
  constructor(hostRef) {
@@ -19,11 +19,13 @@ const SnkFilterPeriod = class {
19
19
  this.getMessage = undefined;
20
20
  this.value = undefined;
21
21
  this.presentationMode = presentationMode.EPresentationMode.CHIP;
22
+ this.errorMessage = undefined;
22
23
  }
23
24
  /**
24
25
  * Emitido quando acontece a alteração de valor do componente snk-filter-number
25
26
  */
26
27
  ezChangeListener(evt) {
28
+ this.errorMessage = undefined;
27
29
  if (this.getVariation() === filterNumberVariation.FilterNumberVariation.INTERVAL) {
28
30
  const start = this._startInterval.value;
29
31
  const end = this._endInterval.value;
@@ -44,6 +46,35 @@ const SnkFilterPeriod = class {
44
46
  }
45
47
  this._numberElement.setFocus();
46
48
  }
49
+ /**
50
+ * Define o foco no componente snk-filter-number
51
+ */
52
+ async setFocus() {
53
+ if (this.getVariation() === filterNumberVariation.FilterNumberVariation.INTERVAL) {
54
+ await this._startInterval.setFocus();
55
+ return;
56
+ }
57
+ await this._numberElement.setFocus();
58
+ }
59
+ /**
60
+ * Limpa o valor do componente restaurando o valor original da configuração.
61
+ */
62
+ async clearValue() {
63
+ var _a, _b;
64
+ this.value = this.config.value;
65
+ if (this.getVariation() === filterNumberVariation.FilterNumberVariation.INTERVAL) {
66
+ const intervalValue = this.config.value;
67
+ if (this._startInterval) {
68
+ this._startInterval.value = (_a = intervalValue === null || intervalValue === void 0 ? void 0 : intervalValue.start) !== null && _a !== void 0 ? _a : null;
69
+ }
70
+ if (this._endInterval) {
71
+ this._endInterval.value = (_b = intervalValue === null || intervalValue === void 0 ? void 0 : intervalValue.end) !== null && _b !== void 0 ? _b : null;
72
+ }
73
+ }
74
+ else if (this._numberElement) {
75
+ this._numberElement.value = this.config.value;
76
+ }
77
+ }
47
78
  getIntervalValue(prop) {
48
79
  const objValue = this.value ? this.value[prop] : null;
49
80
  return objValue !== null && objValue !== void 0 ? objValue : null;
@@ -75,9 +106,9 @@ const SnkFilterPeriod = class {
75
106
  return undefined;
76
107
  }
77
108
  if (this.getVariation() === filterNumberVariation.FilterNumberVariation.INTERVAL) {
78
- return (index.h("div", { class: "ez-col ez-col--nowrap" }, index.h("ez-number-input", { id: `${this.config.id}_start`, class: this.presentationMode === 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(), index.h("ez-number-input", { id: `${this.config.id}_end`, class: this.presentationMode === 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 })));
109
+ return (index.h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, index.h("div", { class: "ez-col ez-col--nowrap" }, index.h("ez-number-input", { id: `${this.config.id}_start`, class: this.presentationMode === 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(), index.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 }))));
79
110
  }
80
- return (index.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 }));
111
+ return (index.h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, index.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 })));
81
112
  }
82
113
  get _element() { return index.getElement(this); }
83
114
  };
@@ -14,37 +14,77 @@ const SnkFilterPeriod = class {
14
14
  this._startDateLabel = 'Inicial';
15
15
  this._endDateLabel = 'Final';
16
16
  this._toLabel = 'até';
17
+ this.internalChange = {
18
+ start: false,
19
+ end: false
20
+ };
17
21
  this.config = undefined;
18
22
  this.getMessage = undefined;
19
- this.value = undefined;
23
+ this.value = {
24
+ start: null,
25
+ end: null
26
+ };
20
27
  this.presentationMode = presentationMode.EPresentationMode.CHIP;
28
+ this.errorMessage = undefined;
29
+ }
30
+ configChanged(newValue, oldValue) {
31
+ if (this.internalChange.end) {
32
+ this.internalChange.end = false;
33
+ return;
34
+ }
35
+ if (this.internalChange.start) {
36
+ this.internalChange.start = false;
37
+ return;
38
+ }
39
+ if (newValue && (newValue.start !== (oldValue === null || oldValue === void 0 ? void 0 : oldValue.start) || newValue.end !== (oldValue === null || oldValue === void 0 ? void 0 : oldValue.end))) {
40
+ this.valueStart = this.parseDate(newValue.start);
41
+ this.valueEnd = this.parseDate(newValue.end);
42
+ }
43
+ }
44
+ ezChangeListener(event, field) {
45
+ this.errorMessage = undefined;
46
+ this.internalChange[field] = true;
47
+ this.value = Object.assign(Object.assign({}, (this.value || {})), { [field]: event.detail ? this.parseDate(event.detail) : null });
48
+ this.valueChanged.emit(this.value);
21
49
  }
22
50
  /**
23
- * Emitido quando acontece a alteração de valor do componente snk-filter-period
51
+ * Define o foco no componente snk-filter-period.
24
52
  */
25
- ezChangeListener() {
26
- const start = this._startDate.value;
27
- const end = this._endDate.value;
28
- this.value = (start || end ? { start, end } : undefined);
29
- this.valueChanged.emit(this.value);
53
+ async setFocus() {
54
+ this._startDate.setFocus();
55
+ }
56
+ /**
57
+ * Limpa o valor do componente restaurando o valor original da configuração.
58
+ */
59
+ async clearValue() {
60
+ this.value = this.config.value;
61
+ this.valueStart = this.getDate("start");
62
+ this.valueEnd = this.getDate("end");
30
63
  }
31
64
  componentDidLoad() {
32
65
  if (this._element) {
33
66
  core.ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
67
+ this._element.querySelectorAll('ez-date-input').forEach(input => {
68
+ const textInput = input.shadowRoot.querySelector('ez-text-input');
69
+ textInput.style.setProperty('--ez-text-input__min-width', '120px');
70
+ });
34
71
  }
35
72
  }
36
- getDate(prop) {
37
- const objValue = this.value ? this.value[prop] : null;
38
- if (objValue instanceof Date) {
39
- return objValue;
73
+ parseDate(date) {
74
+ if (date instanceof Date) {
75
+ return date;
40
76
  }
41
- if (typeof objValue === "string") {
42
- let date = new Date(objValue);
77
+ if (typeof date === "string") {
78
+ date = new Date(date);
43
79
  date.setMinutes(date.getMinutes() + date.getTimezoneOffset());
44
80
  return date;
45
81
  }
46
82
  return null;
47
83
  }
84
+ getDate(prop) {
85
+ const objValue = this.value ? this.value[prop] : null;
86
+ return this.parseDate(objValue);
87
+ }
48
88
  /**
49
89
  * Exibe o componente snk-filter-period
50
90
  */
@@ -62,14 +102,19 @@ const SnkFilterPeriod = class {
62
102
  this._endDateLabel = this.getMessage('snkFilterBar.labelEnd');
63
103
  this._toLabel = this.getMessage('snkFilterBar.labelTo');
64
104
  }
105
+ this.valueStart = this.getDate("start");
106
+ this.valueEnd = this.getDate("end");
65
107
  }
66
108
  render() {
67
109
  if (!this.config || this.config.type !== filterItemType_enum.FilterItemType.PERIOD) {
68
110
  return undefined;
69
111
  }
70
- return (index.h("div", { class: "ez-col ez-col--nowrap" }, index.h("ez-date-input", { id: `${this.config.id}_start`, class: this.presentationMode === presentationMode.EPresentationMode.MODAL ? 'ez-padding--small' : '', label: this._startDateLabel, ref: ref => this._startDate = ref, value: this.getDate("start") }), this.buildLabel(), index.h("ez-date-input", { id: `${this.config.id}_end`, class: this.presentationMode === presentationMode.EPresentationMode.MODAL ? 'ez-padding--small' : '', label: this._endDateLabel, ref: ref => this._endDate = ref, value: this.getDate("end") })));
112
+ return (index.h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, index.h("div", { class: "ez-col ez-col--nowrap" }, index.h("ez-date-input", { id: `${this.config.id}_start`, class: this.presentationMode === 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(), index.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') }))));
71
113
  }
72
114
  get _element() { return index.getElement(this); }
115
+ static get watchers() { return {
116
+ "value": ["configChanged"]
117
+ }; }
73
118
  };
74
119
 
75
120
  exports.snk_filter_period = SnkFilterPeriod;
@@ -13,11 +13,13 @@ const SnkFilterSearch = class {
13
13
  this._isSearchPlus = false;
14
14
  this.config = undefined;
15
15
  this.value = undefined;
16
+ this.errorMessage = undefined;
16
17
  }
17
18
  /**
18
19
  * Emitido quando acontece a alteração de valor do componente snk-filter-search
19
20
  */
20
21
  async ezChangeListener(_evt) {
22
+ this.errorMessage = undefined;
21
23
  if (this._isSearchPlus) {
22
24
  this.value = await this._searchInput.getValueAsync();
23
25
  }
@@ -44,16 +46,25 @@ const SnkFilterSearch = class {
44
46
  });
45
47
  }
46
48
  /**
47
- * Exibe o componente snk-filter-search
49
+ * Define o foco no componente snk-filter-search.
48
50
  */
49
- async show() {
51
+ async setFocus() {
50
52
  this._searchInput.setFocus();
51
53
  }
54
+ /**
55
+ * Limpa o valor do componente restaurando o valor original da configuração.
56
+ */
57
+ async clearValue() {
58
+ this.value = this.config.value;
59
+ if (this._searchInput) {
60
+ this._searchInput.value = this.config.value;
61
+ }
62
+ }
52
63
  getInputItem() {
53
64
  var _a;
54
65
  this._isSearchPlus = ((_a = this.config.props) === null || _a === void 0 ? void 0 : _a["useSearchPlus"]) == true;
55
66
  const TagName = this._isSearchPlus ? "ez-search-plus" : "ez-search";
56
- return (index.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) }));
67
+ return (index.h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, index.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 })));
57
68
  }
58
69
  render() {
59
70
  if (!this.config || this.config.type !== filterItemType_enum.FilterItemType.SEARCH) {
@@ -11,14 +11,31 @@ const SnkFilterText = class {
11
11
  this.valueChanged = index.createEvent(this, "valueChanged", 7);
12
12
  this.config = undefined;
13
13
  this.value = undefined;
14
+ this.errorMessage = undefined;
14
15
  }
15
16
  /**
16
17
  * Emitido quando acontece a alteração de valor do componente snk-filter-text.
17
18
  */
18
19
  ezChangeListener(evt) {
20
+ this.errorMessage = undefined;
19
21
  this.value = evt.detail;
20
22
  this.valueChanged.emit(this.value);
21
23
  }
24
+ /**
25
+ * Define o foco no componente snk-filter-text.
26
+ */
27
+ async setFocus() {
28
+ this._textInputElement.setFocus();
29
+ }
30
+ /**
31
+ * Limpa o valor do componente restaurando o valor original da configuração.
32
+ */
33
+ async clearValue() {
34
+ this.value = this.config.value;
35
+ if (this._textInputElement) {
36
+ this._textInputElement.value = this.config.value;
37
+ }
38
+ }
22
39
  componentDidLoad() {
23
40
  if (this._element) {
24
41
  core.ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
@@ -29,7 +46,7 @@ const SnkFilterText = class {
29
46
  if (!this.config) {
30
47
  return undefined;
31
48
  }
32
- return (index.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 }));
49
+ return (index.h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, index.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 })));
33
50
  }
34
51
  get _element() { return index.getElement(this); }
35
52
  };
@@ -4,15 +4,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1cf293c1.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const SnkFormConfigManager = require('./SnkFormConfigManager-4b651537.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-cef663d1.js');
8
8
  const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
9
9
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
10
10
  const FormConfigHelper = require('./FormConfigHelper-ebb77625.js');
11
11
  const constants = require('./constants-6d82e405.js');
12
12
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
13
- const formConfigFetcher = require('./form-config-fetcher-05d210e7.js');
14
- require('./ConfigStorage-0ebc800f.js');
15
- require('./DataFetcher-602cdc72.js');
13
+ const formConfigFetcher = require('./form-config-fetcher-d7bb4f41.js');
14
+ require('./ConfigStorage-52c38bb9.js');
15
+ require('./DataFetcher-9af55840.js');
16
16
  require('./PrintUtils-bcaeb82f.js');
17
17
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
18
18
  require('./filter-item-type.enum-a7ffdaa6.js');
@@ -4,31 +4,32 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1cf293c1.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const taskbarElements = require('./taskbar-elements-fb5d1e08.js');
8
- const ConfigStorage = require('./ConfigStorage-0ebc800f.js');
9
- const index$1 = require('./index-e3e39724.js');
10
- const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
11
- const index$2 = require('./index-13d05f03.js');
12
- const ClientSideExporterProvider = require('./ClientSideExporterProvider-bb0b2273.js');
13
7
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
14
- require('./DataFetcher-602cdc72.js');
15
- require('./ISave-18205d86.js');
8
+ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
9
+ require('./DataFetcher-9af55840.js');
10
+ require('./ISave-c4918000.js');
11
+ const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-58ded10c.js');
12
+ const index$1 = require('./index-e3e39724.js');
16
13
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
17
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
18
- require('./dataunit-fetcher-93077a2f.js');
15
+ require('./dataunit-fetcher-ae454648.js');
19
16
  require('./filter-item-type.enum-a7ffdaa6.js');
20
- require('./form-config-fetcher-05d210e7.js');
17
+ require('./form-config-fetcher-d7bb4f41.js');
21
18
  require('./constants-6d82e405.js');
19
+ const ConfigStorage = require('./ConfigStorage-52c38bb9.js');
20
+ const index$2 = require('./index-13d05f03.js');
22
21
  const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
23
- const utils = require('@sankhyalabs/ezui/dist/collection/utils');
24
- require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
25
- require('./IFetchDataExporterParams-e78ec415.js');
22
+ const filterValidate = require('./filter-validate-6993f6f2.js');
23
+ const taskbarElements = require('./taskbar-elements-fb5d1e08.js');
24
+ const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
26
25
  require('./PrintUtils-bcaeb82f.js');
26
+ require('./IFetchDataExporterParams-e78ec415.js');
27
+ require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
27
28
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
28
29
  require('@sankhyalabs/core/dist/utils/SortingUtils');
29
30
  require('./ResourceIDUtils-5ff86aa7.js');
30
31
 
31
- class ServerSideExporterProvider extends ClientSideExporterProvider.CommonsExporter {
32
+ class ServerSideExporterProvider extends SnkMultiSelectionListDataSource.CommonsExporter {
32
33
  getFilters() {
33
34
  var _a;
34
35
  return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getAppliedFilters();
@@ -117,6 +118,9 @@ const SnkGrid = class {
117
118
  if (action.type === core.Action.METADATA_LOADED) {
118
119
  return await this.interceptMetadataLoaded(action);
119
120
  }
121
+ if (action.type === core.Action.LOADING_DATA) {
122
+ return await this.interceptLoadData(action);
123
+ }
120
124
  return action;
121
125
  },
122
126
  };
@@ -126,7 +130,7 @@ const SnkGrid = class {
126
130
  this._popUpGridConfig = false;
127
131
  this._showSnkFilterBar = true;
128
132
  this._enableContinuousInsert = false;
129
- this.columnFilterDataSource = new ClientSideExporterProvider.SnkMultiSelectionListDataSource();
133
+ this.columnFilterDataSource = new SnkMultiSelectionListDataSource.SnkMultiSelectionListDataSource();
130
134
  this.enableLockManagerLoadingComp = false;
131
135
  this.enableLockManagerTaskbarClick = false;
132
136
  this.configName = undefined;
@@ -161,6 +165,8 @@ const SnkGrid = class {
161
165
  this.suppressCheckboxColumn = undefined;
162
166
  this.suppressFilterColumn = false;
163
167
  this.compact = undefined;
168
+ this.filterCustomConfig = undefined;
169
+ this.filterCustomConfigInterceptor = undefined;
164
170
  }
165
171
  getGridHeaderSelectedBtns() {
166
172
  const btns = [
@@ -344,7 +350,7 @@ const SnkGrid = class {
344
350
  }
345
351
  setGridConfig(config) {
346
352
  this._gridConfig = config;
347
- ClientSideExporterProvider.CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
353
+ SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
348
354
  }
349
355
  fixColumNameCharset(columnName) {
350
356
  try {
@@ -416,7 +422,7 @@ const SnkGrid = class {
416
422
  */
417
423
  const forceClientSide = await this.hasToForceClientSideExporter();
418
424
  const dataExporterProvider = (forceClientSide || this.strategyExporter === index$1.ExporterStrategy.CLIENT_SIDE)
419
- ? new ClientSideExporterProvider.ClientSideExporterProvider(this._dataUnit, this._grid)
425
+ ? new SnkMultiSelectionListDataSource.ClientSideExporterProvider(this._dataUnit, this._grid)
420
426
  : new ServerSideExporterProvider(this._dataUnit, this._grid);
421
427
  index$2.store.set('exporterProviders', Object.assign(Object.assign({}, index$2.store.get('exporterProviders')), { [this.configName]: dataExporterProvider }));
422
428
  }
@@ -439,9 +445,20 @@ const SnkGrid = class {
439
445
  this.loadGridCustomFormatters(action.payload.fields);
440
446
  return action;
441
447
  }
448
+ async interceptLoadData(action) {
449
+ var _a;
450
+ const hasInvalidFilters = !filterValidate.validateFilters((_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig);
451
+ if (hasInvalidFilters) {
452
+ const errorTitle = this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.title", {});
453
+ const errorMessage = this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.message", {});
454
+ await this._application.error(errorTitle, errorMessage);
455
+ return;
456
+ }
457
+ return action;
458
+ }
442
459
  finishLoading() {
443
460
  this._dataUnit.addInterceptor(this.dataUnitInterceptor);
444
- ClientSideExporterProvider.CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
461
+ SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
445
462
  this.addElementID();
446
463
  if (this.columnFilterDataSource != undefined) {
447
464
  this.columnFilterDataSource.setApplication(this._application);
@@ -496,10 +513,10 @@ const SnkGrid = class {
496
513
  }
497
514
  parent = parent.parentElement;
498
515
  }
499
- this._rmPrecisionCustomValueFormatter = new ClientSideExporterProvider.RmPrecisionCustomValueFormatter();
516
+ this._rmPrecisionCustomValueFormatter = new SnkMultiSelectionListDataSource.RmPrecisionCustomValueFormatter();
500
517
  this.addGridLegacyConfigName();
501
518
  this.loadConfig();
502
- this._continuousInsertUtils = new ClientSideExporterProvider.ContinuousInsertUtils(this._application, this.resourceID, this.configName);
519
+ this._continuousInsertUtils = new SnkMultiSelectionListDataSource.ContinuousInsertUtils(this._application, this.resourceID, this.configName);
503
520
  if (this.enableGridInsert) {
504
521
  this._continuousInsertUtils.getConfig().then(value => this._enableContinuousInsert = value);
505
522
  }
@@ -648,7 +665,7 @@ const SnkGrid = class {
648
665
  return undefined;
649
666
  }
650
667
  return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline", tabindex: "0" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
651
- index.h(index.Fragment, null, index.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 }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.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() }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.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) => {
668
+ index.h(index.Fragment, null, index.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 }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.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() }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.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) => {
652
669
  this.gridConfigChangeHandler(evt);
653
670
  }, 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 }, index.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() }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._popUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
654
671
  }
@@ -2,19 +2,19 @@
2
2
 
3
3
  const index = require('./index-1cf293c1.js');
4
4
  const core = require('@sankhyalabs/core');
5
- const SnkFormConfigManager = require('./SnkFormConfigManager-4b651537.js');
5
+ const SnkFormConfigManager = require('./SnkFormConfigManager-cef663d1.js');
6
6
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
7
7
  const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
8
8
  const taskbarElements = require('./taskbar-elements-fb5d1e08.js');
9
9
  const constants = require('./constants-6d82e405.js');
10
- require('./DataFetcher-602cdc72.js');
11
- require('./ISave-18205d86.js');
10
+ require('./DataFetcher-9af55840.js');
11
+ require('./ISave-c4918000.js');
12
12
  const index$1 = require('./index-e3e39724.js');
13
13
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
- require('./dataunit-fetcher-93077a2f.js');
15
+ require('./dataunit-fetcher-ae454648.js');
16
16
  require('./filter-item-type.enum-a7ffdaa6.js');
17
- require('./form-config-fetcher-05d210e7.js');
17
+ require('./form-config-fetcher-d7bb4f41.js');
18
18
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
19
19
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
20
20