@sankhyalabs/sankhyablocks 9.2.0-dev.2 → 9.2.0-dev.20

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 (236) hide show
  1. package/dist/cjs/{ConfigStorage-1931defc.js → ConfigStorage-8b6def32.js} +2 -2
  2. package/dist/cjs/{DataFetcher-ad9fb3bb.js → DataFetcher-2c37b6a1.js} +52 -1
  3. package/dist/cjs/{ISave-18ffb73e.js → ISave-b22b3cf0.js} +1 -1
  4. package/dist/cjs/{SnkFormConfigManager-65e5288e.js → SnkFormConfigManager-477a27de.js} +2 -2
  5. package/dist/cjs/{ClientSideExporterProvider-994f6e26.js → SnkMultiSelectionListDataSource-b7ab26ba.js} +82 -79
  6. package/dist/cjs/{auth-fetcher-afbe69ab.js → auth-fetcher-78a90b36.js} +1 -1
  7. package/dist/cjs/{dataunit-fetcher-c7253b02.js → dataunit-fetcher-877944a9.js} +1 -1
  8. package/dist/cjs/filter-validate-6993f6f2.js +30 -0
  9. package/dist/cjs/{form-config-fetcher-f6e66d64.js → form-config-fetcher-dee08eb4.js} +1 -1
  10. package/dist/cjs/{index-0ad2baeb.js → index-13d05f03.js} +21 -5
  11. package/dist/cjs/index-1cf293c1.js +8 -8
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
  14. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  15. package/dist/cjs/snk-actions-button_8.cjs.entry.js +5 -5
  16. package/dist/cjs/snk-application.cjs.entry.js +6 -9
  17. package/dist/cjs/snk-attach.cjs.entry.js +7 -7
  18. package/dist/cjs/snk-crud.cjs.entry.js +7 -7
  19. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
  20. package/dist/cjs/{snk-data-unit-448fce74.js → snk-data-unit-6b0101fe.js} +13 -3
  21. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  22. package/dist/cjs/snk-detail-view.cjs.entry.js +9 -9
  23. package/dist/cjs/snk-entity-list.cjs.entry.js +10 -3
  24. package/dist/cjs/snk-expression-group_2.cjs.entry.js +1 -1
  25. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +189 -115
  26. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +23 -2
  27. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +20 -2
  28. package/dist/cjs/snk-filter-detail.cjs.entry.js +25 -8
  29. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +9 -14
  30. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +16 -3
  31. package/dist/cjs/snk-filter-number.cjs.entry.js +34 -3
  32. package/dist/cjs/snk-filter-period.cjs.entry.js +59 -14
  33. package/dist/cjs/snk-filter-search.cjs.entry.js +14 -3
  34. package/dist/cjs/snk-filter-text.cjs.entry.js +18 -1
  35. package/dist/cjs/snk-form_2.cjs.entry.js +31 -5
  36. package/dist/cjs/snk-grid.cjs.entry.js +158 -66
  37. package/dist/cjs/{snk-guides-viewer-c23ed218.js → snk-guides-viewer-38277265.js} +6 -6
  38. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
  39. package/dist/cjs/snk-personalized-filter.cjs.entry.js +14 -6
  40. package/dist/cjs/snk-pesquisa.cjs.entry.js +4 -4
  41. package/dist/cjs/snk-simple-bar.cjs.entry.js +5 -5
  42. package/dist/cjs/snk-simple-crud.cjs.entry.js +60 -23
  43. package/dist/cjs/snk-taskbar.cjs.entry.js +2 -2
  44. package/dist/cjs/{taskbar-elements-3b74cd21.js → taskbar-elements-fb5d1e08.js} +1 -1
  45. package/dist/collection/components/snk-application/snk-application.js +0 -2
  46. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +4 -1
  47. package/dist/collection/components/snk-data-unit/snk-data-unit.js +173 -28
  48. package/dist/collection/components/snk-entity-list/snk-entity-list.js +28 -4
  49. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +72 -2
  50. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +73 -2
  51. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +51 -5
  52. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +83 -3
  53. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +118 -27
  54. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +49 -5
  55. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +71 -1
  56. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +62 -11
  57. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +70 -8
  58. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +0 -4
  59. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +112 -16
  60. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +8 -16
  61. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +315 -114
  62. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
  63. package/dist/collection/components/snk-filter-bar/utils/filter-validate.js +24 -0
  64. package/dist/collection/components/snk-form/snk-form.js +133 -22
  65. package/dist/collection/components/snk-grid/snk-grid.js +488 -133
  66. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +83 -21
  67. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +80 -14
  68. package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +9 -9
  69. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +414 -119
  70. package/dist/collection/components/snk-taskbar/snk-taskbar.js +102 -36
  71. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +1 -0
  72. package/dist/collection/lib/http/data-fetcher/custom-xhr-override.js +39 -0
  73. package/dist/collection/lib/message/resources/en-us/snk-filter-bar.msg.js +1 -0
  74. package/dist/collection/lib/message/resources/en-us/snk-grid.msg.js +4 -0
  75. package/dist/collection/lib/message/resources/es-es/snk-filter-bar.msg.js +1 -0
  76. package/dist/collection/lib/message/resources/es-es/snk-grid.msg.js +4 -0
  77. package/dist/collection/lib/message/resources/pt-br/snk-filter-bar.msg.js +1 -0
  78. package/dist/collection/lib/message/resources/pt-br/snk-grid.msg.js +4 -0
  79. package/dist/components/ContinuousInsertUtils.js +4 -1
  80. package/dist/components/DataFetcher.js +52 -1
  81. package/dist/components/index2.js +21 -5
  82. package/dist/components/snk-application2.js +0 -3
  83. package/dist/components/snk-crud.js +62 -44
  84. package/dist/components/snk-data-unit2.js +11 -1
  85. package/dist/components/snk-detail-view2.js +89 -56
  86. package/dist/components/snk-entity-list.js +11 -3
  87. package/dist/components/snk-filter-bar2.js +103 -108
  88. package/dist/components/snk-filter-binary-select.js +27 -3
  89. package/dist/components/snk-filter-checkbox-list.js +24 -3
  90. package/dist/components/snk-filter-detail2.js +28 -9
  91. package/dist/components/snk-filter-item2.js +70 -8
  92. package/dist/components/snk-filter-modal-item2.js +7 -12
  93. package/dist/components/snk-filter-modal.js +1 -325
  94. package/dist/components/snk-filter-modal2.js +391 -0
  95. package/dist/components/snk-filter-multi-select.js +19 -4
  96. package/dist/components/snk-filter-number.js +38 -4
  97. package/dist/components/snk-filter-period.js +64 -16
  98. package/dist/components/snk-filter-search.js +17 -4
  99. package/dist/components/snk-filter-text.js +22 -2
  100. package/dist/components/snk-form.js +29 -2
  101. package/dist/components/snk-grid2.js +188 -75
  102. package/dist/components/snk-personalized-filter2.js +10 -2
  103. package/dist/components/snk-simple-bar2.js +5 -5
  104. package/dist/components/snk-simple-crud2.js +45 -8
  105. package/dist/esm/{ConfigStorage-b5a1dba3.js → ConfigStorage-22eace3a.js} +2 -2
  106. package/dist/esm/{DataFetcher-6f6de657.js → DataFetcher-f6b2961a.js} +52 -1
  107. package/dist/esm/{ISave-7ecdca20.js → ISave-6b7b0423.js} +1 -1
  108. package/dist/esm/{SnkFormConfigManager-34fc1dc7.js → SnkFormConfigManager-968b97e7.js} +2 -2
  109. package/dist/esm/{ClientSideExporterProvider-7c2781f4.js → SnkMultiSelectionListDataSource-1136c4e7.js} +87 -84
  110. package/dist/esm/{auth-fetcher-7332a9a9.js → auth-fetcher-cf39e42b.js} +1 -1
  111. package/dist/esm/{dataunit-fetcher-f21cbad0.js → dataunit-fetcher-6314b19d.js} +1 -1
  112. package/dist/esm/filter-validate-d765d450.js +27 -0
  113. package/dist/esm/{form-config-fetcher-6ab4e805.js → form-config-fetcher-bc6f0f1f.js} +1 -1
  114. package/dist/esm/{index-b72af127.js → index-446f9341.js} +21 -5
  115. package/dist/esm/index-479e1293.js +8 -8
  116. package/dist/esm/loader.js +1 -1
  117. package/dist/esm/pesquisa-grid_2.entry.js +4 -4
  118. package/dist/esm/sankhyablocks.js +1 -1
  119. package/dist/esm/snk-actions-button_8.entry.js +5 -5
  120. package/dist/esm/snk-application.entry.js +6 -9
  121. package/dist/esm/snk-attach.entry.js +7 -7
  122. package/dist/esm/snk-crud.entry.js +7 -7
  123. package/dist/esm/snk-data-exporter.entry.js +5 -5
  124. package/dist/esm/{snk-data-unit-b7e6e7a6.js → snk-data-unit-d4a42b59.js} +13 -3
  125. package/dist/esm/snk-data-unit.entry.js +3 -3
  126. package/dist/esm/snk-detail-view.entry.js +9 -9
  127. package/dist/esm/snk-entity-list.entry.js +10 -3
  128. package/dist/esm/snk-expression-group_2.entry.js +1 -1
  129. package/dist/esm/snk-filter-bar_4.entry.js +190 -116
  130. package/dist/esm/snk-filter-binary-select.entry.js +23 -2
  131. package/dist/esm/snk-filter-checkbox-list.entry.js +20 -2
  132. package/dist/esm/snk-filter-detail.entry.js +25 -8
  133. package/dist/esm/snk-filter-modal-item.entry.js +9 -14
  134. package/dist/esm/snk-filter-multi-select.entry.js +16 -3
  135. package/dist/esm/snk-filter-number.entry.js +34 -3
  136. package/dist/esm/snk-filter-period.entry.js +59 -14
  137. package/dist/esm/snk-filter-search.entry.js +14 -3
  138. package/dist/esm/snk-filter-text.entry.js +18 -1
  139. package/dist/esm/snk-form_2.entry.js +31 -5
  140. package/dist/esm/snk-grid.entry.js +152 -60
  141. package/dist/esm/{snk-guides-viewer-fbfece85.js → snk-guides-viewer-19cb7f1f.js} +6 -6
  142. package/dist/esm/snk-guides-viewer.entry.js +9 -9
  143. package/dist/esm/snk-personalized-filter.entry.js +14 -6
  144. package/dist/esm/snk-pesquisa.entry.js +4 -4
  145. package/dist/esm/snk-simple-bar.entry.js +5 -5
  146. package/dist/esm/snk-simple-crud.entry.js +55 -18
  147. package/dist/esm/snk-taskbar.entry.js +2 -2
  148. package/dist/esm/{taskbar-elements-171476d4.js → taskbar-elements-faaf5d8f.js} +1 -1
  149. package/dist/sankhyablocks/{p-0e495575.js → p-0237c565.js} +1 -1
  150. package/dist/sankhyablocks/p-093f58fa.entry.js +1 -0
  151. package/dist/sankhyablocks/{p-8d1508aa.entry.js → p-0affc07a.entry.js} +1 -1
  152. package/dist/sankhyablocks/{p-ad2ae575.entry.js → p-0e1f0344.entry.js} +1 -1
  153. package/dist/sankhyablocks/p-29cacaf3.entry.js +1 -0
  154. package/dist/sankhyablocks/{p-eb0616d3.entry.js → p-32450ea2.entry.js} +1 -1
  155. package/dist/sankhyablocks/{p-b49281be.entry.js → p-3c29939c.entry.js} +1 -1
  156. package/dist/sankhyablocks/p-3ed04f0d.entry.js +1 -0
  157. package/dist/sankhyablocks/{p-4872dc3a.entry.js → p-44c5ec49.entry.js} +1 -1
  158. package/dist/sankhyablocks/p-49ddc27a.entry.js +1 -0
  159. package/dist/sankhyablocks/p-4c763b10.entry.js +1 -0
  160. package/dist/sankhyablocks/p-4eeb06fc.js +1 -0
  161. package/dist/sankhyablocks/p-505172c8.entry.js +1 -0
  162. package/dist/sankhyablocks/p-55798617.js +1 -0
  163. package/dist/sankhyablocks/{p-158adf33.entry.js → p-605ef7b2.entry.js} +1 -1
  164. package/dist/sankhyablocks/p-658f67a5.js +1 -0
  165. package/dist/sankhyablocks/p-72a9285d.entry.js +1 -0
  166. package/dist/sankhyablocks/p-7f7fe6c4.entry.js +1 -0
  167. package/dist/sankhyablocks/p-88b7bc09.js +1 -0
  168. package/dist/sankhyablocks/{p-c6331595.js → p-8d256def.js} +1 -1
  169. package/dist/sankhyablocks/p-8f37b75b.entry.js +1 -0
  170. package/dist/sankhyablocks/{p-b35574b5.js → p-9062d640.js} +1 -1
  171. package/dist/sankhyablocks/{p-72c8c847.entry.js → p-95c71f5e.entry.js} +1 -1
  172. package/dist/sankhyablocks/p-96d45943.entry.js +1 -0
  173. package/dist/sankhyablocks/{p-eacff4b7.entry.js → p-b2d7f4cd.entry.js} +1 -1
  174. package/dist/sankhyablocks/{p-6a015ba2.js → p-b7f5caf6.js} +1 -1
  175. package/dist/sankhyablocks/p-b9200e77.entry.js +11 -0
  176. package/dist/sankhyablocks/{p-7de79adf.js → p-b987e15d.js} +1 -1
  177. package/dist/sankhyablocks/{p-ba4979b4.js → p-bf017a1f.js} +1 -1
  178. package/dist/sankhyablocks/{p-735a1175.entry.js → p-c3dbf441.entry.js} +1 -1
  179. package/dist/sankhyablocks/{p-3dba3468.js → p-c71dcb2d.js} +1 -1
  180. package/dist/sankhyablocks/{p-5e282b33.entry.js → p-c95f20d9.entry.js} +1 -1
  181. package/dist/sankhyablocks/p-c98e2085.js +1 -0
  182. package/dist/sankhyablocks/p-cb4343c4.entry.js +1 -0
  183. package/dist/sankhyablocks/p-d03ae54e.entry.js +1 -0
  184. package/dist/sankhyablocks/p-d235314c.entry.js +1 -0
  185. package/dist/sankhyablocks/p-d75a732c.js +1 -0
  186. package/dist/sankhyablocks/{p-f39b0ebe.entry.js → p-df7979fd.entry.js} +1 -1
  187. package/dist/sankhyablocks/p-e258de96.entry.js +1 -0
  188. package/dist/sankhyablocks/{p-d377aa7a.entry.js → p-f8e87cf1.entry.js} +1 -1
  189. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  190. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +46 -3
  191. package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +8 -4
  192. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +12 -0
  193. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.d.ts +12 -0
  194. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +12 -4
  195. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +16 -4
  196. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +17 -3
  197. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +10 -2
  198. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +12 -0
  199. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +8 -3
  200. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +27 -4
  201. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +17 -3
  202. package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +2 -3
  203. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +60 -30
  204. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +4 -2
  205. package/dist/types/components/snk-filter-bar/utils/filter-validate.d.ts +11 -0
  206. package/dist/types/components/snk-form/snk-form.d.ts +29 -4
  207. package/dist/types/components/snk-grid/snk-grid.d.ts +132 -58
  208. package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +53 -5
  209. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +44 -6
  210. package/dist/types/components/snk-simple-bar/snk-simple-bar.d.ts +15 -15
  211. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +100 -43
  212. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +23 -21
  213. package/dist/types/components.d.ts +771 -255
  214. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
  215. package/package.json +4 -3
  216. package/dist/collection/lib/licenses/sankhyalicense.module.js +0 -1
  217. package/dist/sankhyablocks/p-012208e0.entry.js +0 -1
  218. package/dist/sankhyablocks/p-07b14811.entry.js +0 -1
  219. package/dist/sankhyablocks/p-0dac8fef.js +0 -1
  220. package/dist/sankhyablocks/p-1210500e.js +0 -1
  221. package/dist/sankhyablocks/p-16fc4acd.js +0 -1
  222. package/dist/sankhyablocks/p-25209340.entry.js +0 -1
  223. package/dist/sankhyablocks/p-295b83ae.entry.js +0 -1
  224. package/dist/sankhyablocks/p-398cdd67.entry.js +0 -1
  225. package/dist/sankhyablocks/p-4e63ffed.entry.js +0 -1
  226. package/dist/sankhyablocks/p-5bab470d.entry.js +0 -1
  227. package/dist/sankhyablocks/p-5c7af8a9.entry.js +0 -1
  228. package/dist/sankhyablocks/p-81769310.entry.js +0 -11
  229. package/dist/sankhyablocks/p-9fd87bfd.entry.js +0 -1
  230. package/dist/sankhyablocks/p-a349689a.js +0 -1
  231. package/dist/sankhyablocks/p-a76e6d51.entry.js +0 -1
  232. package/dist/sankhyablocks/p-a86eee47.entry.js +0 -1
  233. package/dist/sankhyablocks/p-c6a8a8bc.entry.js +0 -1
  234. package/dist/sankhyablocks/p-c9e6d720.js +0 -1
  235. package/dist/sankhyablocks/p-dff65083.entry.js +0 -1
  236. package/dist/sankhyablocks/p-fa18530e.entry.js +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const formConfigFetcher = require('./form-config-fetcher-f6e66d64.js');
4
- const DataFetcher = require('./DataFetcher-ad9fb3bb.js');
3
+ const formConfigFetcher = require('./form-config-fetcher-dee08eb4.js');
4
+ const DataFetcher = require('./DataFetcher-2c37b6a1.js');
5
5
  const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
 
@@ -5625,7 +5625,7 @@ var _public = {
5625
5625
  };
5626
5626
 
5627
5627
  /* eslint-env browser */
5628
- var browser = typeof self == 'object' ? self.FormData : window.FormData;
5628
+ var browser = typeof self === 'object' ? self.FormData : window.FormData;
5629
5629
 
5630
5630
  var defaultJsonSerializer = createCommonjsModule(function (module, exports) {
5631
5631
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -6580,6 +6580,42 @@ Object.defineProperty(exports, "GraphQLWebSocketClient", { enumerable: true, get
6580
6580
  //# sourceMappingURL=index.js.map
6581
6581
  });
6582
6582
 
6583
+ (function () {
6584
+ const OriginalXHR = window.XMLHttpRequest;
6585
+
6586
+ function CustomXHR() {
6587
+ const xhr = new OriginalXHR();
6588
+ let oldContent;
6589
+
6590
+ const originalOpen = xhr.open;
6591
+ xhr.open = function (_method, _url, ...args) {
6592
+ originalOpen.call(xhr, _method, _url, ...args);
6593
+ };
6594
+
6595
+ const originalSend = xhr.send;
6596
+ xhr.send = function (body) {
6597
+ if (top.charcleaner && typeof top.charcleaner.a === 'function') {
6598
+ try {
6599
+ oldContent = typeof body === 'string' ? JSON.parse(body) : body;
6600
+
6601
+ var c = JSON.stringify(oldContent);
6602
+
6603
+ var sktk = top.charcleaner.a(c);
6604
+
6605
+ xhr.setRequestHeader("sktk", sktk);
6606
+ } catch (e) {
6607
+ }
6608
+ }
6609
+
6610
+ originalSend.call(xhr, body);
6611
+ };
6612
+
6613
+ return xhr;
6614
+ }
6615
+
6616
+ window.XMLHttpRequest = CustomXHR;
6617
+ })();
6618
+
6583
6619
  class UrlUtils {
6584
6620
  static getQueryParams(queryString) {
6585
6621
  const params = new Map();
@@ -6783,6 +6819,7 @@ const snkFilterBarMessages$2 = {
6783
6819
  create: "Criar filtro padrão",
6784
6820
  },
6785
6821
  validations: {
6822
+ requiredFilter: "Filtro obrigatório",
6786
6823
  notFullFilled: {
6787
6824
  title: "Filtro parcialmente preenchido",
6788
6825
  message: "Favor completar todas as informações do filtro."
@@ -7336,6 +7373,10 @@ const snkGridMessages$2 = {
7336
7373
  title: 'Aviso',
7337
7374
  message: 'As alterações realizadas serão descartadas<br/><br/><b>Você realmente gostaria de cancelar?</b>',
7338
7375
  },
7376
+ requiredFiltersNotFilled: {
7377
+ title: 'Erro',
7378
+ message: 'Existem filtros obrigatórios não preenchidos.',
7379
+ },
7339
7380
  };
7340
7381
  const snkGridConfigMessages$2 = {
7341
7382
  gridConfiguration: 'Configuração da Grade',
@@ -7628,6 +7669,7 @@ const snkFilterBarMessages$1 = {
7628
7669
  create: "Create default filter",
7629
7670
  },
7630
7671
  validations: {
7672
+ requiredFilter: "Required filter",
7631
7673
  notFullFilled: {
7632
7674
  title: "Partially filled filter",
7633
7675
  message: "Please complete all filter information."
@@ -8182,6 +8224,10 @@ const snkGridMessages$1 = {
8182
8224
  title: 'Warning',
8183
8225
  message: 'The changes made will be discarded<br/><br/><b>Do you really want to cancel?</b>',
8184
8226
  },
8227
+ requiredFiltersNotFilled: {
8228
+ title: 'Error',
8229
+ message: 'There are required filters that are not filled.',
8230
+ },
8185
8231
  };
8186
8232
  const snkGridConfigMessages$1 = {
8187
8233
  gridConfiguration: 'Grid Configuration',
@@ -8474,6 +8520,7 @@ const snkFilterBarMessages = {
8474
8520
  create: "Crear filtro predeterminado",
8475
8521
  },
8476
8522
  validations: {
8523
+ requiredFilter: "Filtro obligatorio",
8477
8524
  notFullFilled: {
8478
8525
  title: "Filtro parcialmente completado",
8479
8526
  message: "Por favor complete toda la información del filtro."
@@ -9028,6 +9075,10 @@ const snkGridMessages = {
9028
9075
  title: 'Aviso',
9029
9076
  message: 'Los cambios realizados serán descartados<br/><br/><b>¿Realmente desea cancelar?</b>',
9030
9077
  },
9078
+ requiredFiltersNotFilled: {
9079
+ title: 'Error',
9080
+ message: 'Existen filtros obligatorios que no están completados.',
9081
+ },
9031
9082
  };
9032
9083
  const snkGridConfigMessages = {
9033
9084
  gridConfiguration: 'Configuración de la Cuadrícula',
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const core = require('@sankhyalabs/core');
4
- const DataFetcher = require('./DataFetcher-ad9fb3bb.js');
4
+ const DataFetcher = require('./DataFetcher-2c37b6a1.js');
5
5
 
6
6
  function buildGridMetadata(rawValue) {
7
7
  const fieldsMetadata = buildFieldsMetadata(rawValue.fieldsMetadata);
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const ConfigStorage = require('./ConfigStorage-1931defc.js');
3
+ const ConfigStorage = require('./ConfigStorage-8b6def32.js');
4
4
  const core = require('@sankhyalabs/core');
5
- const formConfigFetcher = require('./form-config-fetcher-f6e66d64.js');
5
+ const formConfigFetcher = require('./form-config-fetcher-dee08eb4.js');
6
6
  const constants = require('./constants-6d82e405.js');
7
7
 
8
8
  class SnkFormConfigManager {
@@ -1,19 +1,19 @@
1
1
  'use strict';
2
2
 
3
- const DataFetcher = require('./DataFetcher-ad9fb3bb.js');
4
- require('./ISave-18ffb73e.js');
3
+ const DataFetcher = require('./DataFetcher-2c37b6a1.js');
4
+ require('./ISave-b22b3cf0.js');
5
5
  const core = require('@sankhyalabs/core');
6
6
  const index$1 = require('./index-e3e39724.js');
7
7
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
8
8
  const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
9
- const dataunitFetcher = require('./dataunit-fetcher-c7253b02.js');
9
+ const dataunitFetcher = require('./dataunit-fetcher-877944a9.js');
10
10
  require('./filter-item-type.enum-a7ffdaa6.js');
11
- require('./form-config-fetcher-f6e66d64.js');
11
+ require('./form-config-fetcher-dee08eb4.js');
12
12
  require('./constants-6d82e405.js');
13
- const InMemoryFilterColumnDataSource = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
14
13
  const index = require('./index-1cf293c1.js');
15
14
  const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
16
15
  const IFetchDataExporterParams = require('./IFetchDataExporterParams-e78ec415.js');
16
+ const InMemoryFilterColumnDataSource = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
17
17
 
18
18
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
19
19
 
@@ -111,44 +111,6 @@ class CrudUtils {
111
111
  }
112
112
  }
113
113
 
114
- class SnkMultiSelectionListDataSource {
115
- setDataUnit(dataUnit) {
116
- this._dataUnit = dataUnit;
117
- }
118
- setApplication(application) {
119
- this._application = application;
120
- }
121
- formatLabel(fieldName, value) {
122
- const { userInterface } = this._dataUnit.getField(fieldName);
123
- if (userInterface === core.UserInterface.DATETIME) {
124
- return core.DateUtils.formatDate(this._dataUnit.valueFromString(fieldName, value));
125
- }
126
- return String(this._dataUnit.getFormattedValue(fieldName, value));
127
- }
128
- async getStaticOptions(fieldName, options) {
129
- if (fieldName == undefined) {
130
- return Promise.resolve(undefined);
131
- }
132
- return Promise.resolve(await dataunitFetcher.PreloadManager.getDistinct(this._dataUnit, fieldName, options === null || options === void 0 ? void 0 : options.onlyLabel));
133
- }
134
- fetchData(filterTerm, fieldName) {
135
- return new Promise(resolve => {
136
- this._application.executeSelectDistinct(this._dataUnit, fieldName, filterTerm).then(result => {
137
- resolve(result.map(item => {
138
- const field = this._dataUnit.getField(fieldName);
139
- if (field.userInterface === core.UserInterface.SEARCH) {
140
- return Object.assign(Object.assign({}, JSON.parse(item)), { check: true });
141
- }
142
- return { value: item, label: this.formatLabel(fieldName, item), check: true };
143
- }));
144
- });
145
- });
146
- }
147
- sortItems(fieldName, items) {
148
- return InMemoryFilterColumnDataSource__default['default'].defaultSorterMultSelectionOption(this._dataUnit, fieldName, items);
149
- }
150
- }
151
-
152
114
  class RmPrecisionCustomValueFormatter {
153
115
  setGrid(grid) {
154
116
  if (this._grid) {
@@ -190,6 +152,41 @@ class RmPrecisionCustomValueFormatter {
190
152
  }
191
153
  }
192
154
 
155
+ class ContinuousInsertUtils {
156
+ constructor(snkApplication, resourceID, configName) {
157
+ this.snkApplication = snkApplication;
158
+ this.keyConfigEnableContinuousInsert = `${resourceID}enableContinuousInsert${configName ? configName : ''}`;
159
+ }
160
+ handleSaveConfig(enableContinuousInsert) {
161
+ return this.snkApplication.saveConfig(this.keyConfigEnableContinuousInsert, enableContinuousInsert);
162
+ }
163
+ getConfig() {
164
+ return this.snkApplication.getConfig(this.keyConfigEnableContinuousInsert).then(value => {
165
+ if (value) {
166
+ return value == "true" ? true : false;
167
+ }
168
+ return false;
169
+ }).catch(() => {
170
+ return false;
171
+ });
172
+ }
173
+ getMessage(key, params) {
174
+ var _a, _b;
175
+ return (_b = (_a = this.snkApplication) === null || _a === void 0 ? void 0 : _a.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage(key, params);
176
+ }
177
+ actionContinuousInsert(enableContinuousInsert, handleEnableContinuousInsert) {
178
+ return {
179
+ value: core.StringUtils.generateUUID(),
180
+ label: enableContinuousInsert ? this.getMessage('continuousInsertUtils.actions.disable') : this.getMessage('continuousInsertUtils.actions.enable'),
181
+ enabled: true,
182
+ itemBuilder: () => {
183
+ return (index.h("div", { class: "ez-dropdown__item-wrapper", onClick: handleEnableContinuousInsert },
184
+ index.h("span", { class: "ez-dropdown__item-label" }, enableContinuousInsert ? this.getMessage('continuousInsertUtils.actions.disable') : this.getMessage('continuousInsertUtils.actions.enable'))));
185
+ },
186
+ };
187
+ }
188
+ }
189
+
193
190
  class CommonsExporter {
194
191
  constructor(dataUnit, grid) {
195
192
  this.MAX_WIDTH_COD = 60;
@@ -273,41 +270,6 @@ class CommonsExporter {
273
270
  }
274
271
  }
275
272
 
276
- class ContinuousInsertUtils {
277
- constructor(snkApplication, resourceID, configName) {
278
- this.snkApplication = snkApplication;
279
- this.keyConfigEnableContinuousInsert = `${resourceID}enableContinuousInsert${configName ? configName : ''}`;
280
- }
281
- handleSaveConfig(enableContinuousInsert) {
282
- return this.snkApplication.saveConfig(this.keyConfigEnableContinuousInsert, enableContinuousInsert);
283
- }
284
- getConfig() {
285
- return this.snkApplication.getConfig(this.keyConfigEnableContinuousInsert).then(value => {
286
- if (value) {
287
- return value == "true" ? true : false;
288
- }
289
- return false;
290
- }).catch(() => {
291
- return false;
292
- });
293
- }
294
- getMessage(key, params) {
295
- var _a, _b;
296
- return (_b = (_a = this.snkApplication) === null || _a === void 0 ? void 0 : _a.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage(key, params);
297
- }
298
- actionContinuousInsert(enableContinuousInsert, handleEnableContinuousInsert) {
299
- return {
300
- value: core.StringUtils.generateUUID(),
301
- label: enableContinuousInsert ? this.getMessage('continuousInsertUtils.actions.disable') : this.getMessage('continuousInsertUtils.actions.enable'),
302
- enabled: true,
303
- itemBuilder: () => {
304
- return (index.h("div", { class: "ez-dropdown__item-wrapper", onClick: handleEnableContinuousInsert },
305
- index.h("span", { class: "ez-dropdown__item-label" }, enableContinuousInsert ? this.getMessage('continuousInsertUtils.actions.disable') : this.getMessage('continuousInsertUtils.actions.enable'))));
306
- },
307
- };
308
- }
309
- }
310
-
311
273
  class ClientSideExporterProvider extends CommonsExporter {
312
274
  getSelectedNumber() {
313
275
  return this.dataUnit.getSelectionInfo().length;
@@ -340,7 +302,10 @@ class ClientSideExporterProvider extends CommonsExporter {
340
302
  }
341
303
  resolveRecordsFromSelection() {
342
304
  const selectionInfo = this.dataUnit.getSelectionInfo();
343
- const selectionRecords = selectionInfo.isEmpty() || selectionInfo.isAllRecords() ? selectionInfo.getAllRecords() : selectionInfo.records;
305
+ if (selectionInfo.isEmpty()) {
306
+ return this.dataUnit.records;
307
+ }
308
+ const selectionRecords = selectionInfo.isAllRecords() ? selectionInfo.getAllRecords() : selectionInfo.records;
344
309
  return selectionRecords.length ? selectionRecords : this.dataUnit.records;
345
310
  }
346
311
  getHiddenOptions() {
@@ -374,6 +339,44 @@ class ClientSideExporterProvider extends CommonsExporter {
374
339
  }
375
340
  }
376
341
 
342
+ class SnkMultiSelectionListDataSource {
343
+ setDataUnit(dataUnit) {
344
+ this._dataUnit = dataUnit;
345
+ }
346
+ setApplication(application) {
347
+ this._application = application;
348
+ }
349
+ formatLabel(fieldName, value) {
350
+ const { userInterface } = this._dataUnit.getField(fieldName);
351
+ if (userInterface === core.UserInterface.DATETIME) {
352
+ return core.DateUtils.formatDate(this._dataUnit.valueFromString(fieldName, value));
353
+ }
354
+ return String(this._dataUnit.getFormattedValue(fieldName, value));
355
+ }
356
+ async getStaticOptions(fieldName, options) {
357
+ if (fieldName == undefined) {
358
+ return Promise.resolve(undefined);
359
+ }
360
+ return Promise.resolve(await dataunitFetcher.PreloadManager.getDistinct(this._dataUnit, fieldName, options === null || options === void 0 ? void 0 : options.onlyLabel));
361
+ }
362
+ fetchData(filterTerm, fieldName) {
363
+ return new Promise(resolve => {
364
+ this._application.executeSelectDistinct(this._dataUnit, fieldName, filterTerm).then(result => {
365
+ resolve(result.map(item => {
366
+ const field = this._dataUnit.getField(fieldName);
367
+ if (field.userInterface === core.UserInterface.SEARCH) {
368
+ return Object.assign(Object.assign({}, JSON.parse(item)), { check: true });
369
+ }
370
+ return { value: item, label: this.formatLabel(fieldName, item), check: true };
371
+ }));
372
+ });
373
+ });
374
+ }
375
+ sortItems(fieldName, items) {
376
+ return InMemoryFilterColumnDataSource__default['default'].defaultSorterMultSelectionOption(this._dataUnit, fieldName, items);
377
+ }
378
+ }
379
+
377
380
  exports.ClientSideExporterProvider = ClientSideExporterProvider;
378
381
  exports.CommonsExporter = CommonsExporter;
379
382
  exports.ContinuousInsertUtils = ContinuousInsertUtils;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const core = require('@sankhyalabs/core');
4
- const formConfigFetcher = require('./form-config-fetcher-f6e66d64.js');
4
+ const formConfigFetcher = require('./form-config-fetcher-dee08eb4.js');
5
5
 
6
6
  class AuthFetcher extends formConfigFetcher.ResourceFetcher {
7
7
  getData(resourceID) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const core = require('@sankhyalabs/core');
4
- const DataFetcher = require('./DataFetcher-ad9fb3bb.js');
4
+ const DataFetcher = require('./DataFetcher-2c37b6a1.js');
5
5
  const constants = require('@sankhyalabs/ezui/dist/collection/utils/constants');
6
6
  const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
4
+
5
+ function hasActiveElements(value) {
6
+ var _a;
7
+ const list = Array.isArray(value) ? value : value === null || value === void 0 ? void 0 : value.elements;
8
+ return ((_a = list === null || list === void 0 ? void 0 : list.filter((val) => val === null || val === void 0 ? void 0 : val.check)) === null || _a === void 0 ? void 0 : _a.length) > 0;
9
+ }
10
+ function getInvalidFilters(filters) {
11
+ return filters.filter(item => {
12
+ if (!item.required) {
13
+ return false;
14
+ }
15
+ if (item.type === filterItemType_enum.FilterItemType.MULTI_LIST) {
16
+ return !hasActiveElements(item.value);
17
+ }
18
+ return !item.value;
19
+ });
20
+ }
21
+ function validateFilters(filters) {
22
+ const notValidFilters = getInvalidFilters(filters);
23
+ if (notValidFilters.length === 0) {
24
+ return true;
25
+ }
26
+ return false;
27
+ }
28
+
29
+ exports.getInvalidFilters = getInvalidFilters;
30
+ exports.validateFilters = validateFilters;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const DataFetcher = require('./DataFetcher-ad9fb3bb.js');
3
+ const DataFetcher = require('./DataFetcher-2c37b6a1.js');
4
4
  const core = require('@sankhyalabs/core');
5
5
 
6
6
  class ResourceFetcher {
@@ -78,6 +78,8 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
78
78
  set: [],
79
79
  reset: [],
80
80
  };
81
+ // Track onChange listeners to enable removeListener functionality
82
+ const changeListeners = new Map();
81
83
  const reset = () => {
82
84
  // When resetting the state, the default state may be a function - unwrap it to invoke it.
83
85
  // otherwise, the state won't be properly reset
@@ -131,17 +133,21 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
131
133
  };
132
134
  };
133
135
  const onChange = (propName, cb) => {
134
- const unSet = on('set', (key, newValue) => {
136
+ const setHandler = (key, newValue) => {
135
137
  if (key === propName) {
136
138
  cb(newValue);
137
139
  }
138
- });
139
- // We need to unwrap the defaultState because it might be a function.
140
- // Otherwise we might not be sending the right reset value.
141
- const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
140
+ };
141
+ const resetHandler = () => cb(unwrap(defaultState)[propName]);
142
+ // Register the handlers
143
+ const unSet = on('set', setHandler);
144
+ const unReset = on('reset', resetHandler);
145
+ // Track the relationship between the user callback and internal handlers
146
+ changeListeners.set(cb, { setHandler, resetHandler, propName });
142
147
  return () => {
143
148
  unSet();
144
149
  unReset();
150
+ changeListeners.delete(cb);
145
151
  };
146
152
  };
147
153
  const use = (...subscriptions) => {
@@ -166,6 +172,15 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
166
172
  const oldValue = states.get(key);
167
173
  handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
168
174
  };
175
+ const removeListener = (propName, listener) => {
176
+ const listenerInfo = changeListeners.get(listener);
177
+ if (listenerInfo && listenerInfo.propName === propName) {
178
+ // Remove the specific handlers that were created for this listener
179
+ removeFromArray(handlers.set, listenerInfo.setHandler);
180
+ removeFromArray(handlers.reset, listenerInfo.resetHandler);
181
+ changeListeners.delete(listener);
182
+ }
183
+ };
169
184
  return {
170
185
  state,
171
186
  get,
@@ -176,6 +191,7 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
176
191
  dispose,
177
192
  reset,
178
193
  forceUpdate,
194
+ removeListener,
179
195
  };
180
196
  };
181
197
  const removeFromArray = (array, item) => {
@@ -2170,14 +2170,6 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2170
2170
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2171
2171
  /* webpackMode: "lazy" */
2172
2172
  './teste-pesquisa.cjs.entry.js')); }).then(processMod, consoleError);
2173
- case 'snk-default-filter.cjs':
2174
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2175
- /* webpackMode: "lazy" */
2176
- './snk-default-filter.cjs.entry.js')); }).then(processMod, consoleError);
2177
- case 'snk-filter-modal-item.cjs':
2178
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2179
- /* webpackMode: "lazy" */
2180
- './snk-filter-modal-item.cjs.entry.js')); }).then(processMod, consoleError);
2181
2173
  case 'pesquisa-grid_2.cjs':
2182
2174
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2183
2175
  /* webpackMode: "lazy" */
@@ -2222,6 +2214,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2222
2214
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2223
2215
  /* webpackMode: "lazy" */
2224
2216
  './field-config_2.cjs.entry.js')); }).then(processMod, consoleError);
2217
+ case 'snk-default-filter.cjs':
2218
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2219
+ /* webpackMode: "lazy" */
2220
+ './snk-default-filter.cjs.entry.js')); }).then(processMod, consoleError);
2225
2221
  case 'snk-filter-advanced-mode_2.cjs':
2226
2222
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2227
2223
  /* webpackMode: "lazy" */
@@ -2230,6 +2226,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2230
2226
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2231
2227
  /* webpackMode: "lazy" */
2232
2228
  './snk-filter-detail.cjs.entry.js')); }).then(processMod, consoleError);
2229
+ case 'snk-filter-modal-item.cjs':
2230
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2231
+ /* webpackMode: "lazy" */
2232
+ './snk-filter-modal-item.cjs.entry.js')); }).then(processMod, consoleError);
2233
2233
  case 'snk-simple-bar.cjs':
2234
2234
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2235
2235
  /* webpackMode: "lazy" */