@sankhyalabs/sankhyablocks 8.15.0-rc.9 → 8.15.1-rc.1

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 (231) hide show
  1. package/dist/cjs/{ConfigStorage-d4c99a5e.js → ConfigStorage-942ce74b.js} +70 -7
  2. package/dist/cjs/{DataFetcher-99f0f6ed.js → DataFetcher-313debd8.js} +13 -5
  3. package/dist/cjs/{SnkFormConfigManager-3621bfc4.js → SnkFormConfigManager-f9dc0d28.js} +21 -13
  4. package/dist/cjs/{SnkMessageBuilder-141aa18d.js → SnkMessageBuilder-66aa2557.js} +4 -0
  5. package/dist/cjs/SnkMultiSelectionListDataSource-303e85d1.js +140 -0
  6. package/dist/cjs/{auth-fetcher-5161d082.js → auth-fetcher-54f5ff9d.js} +1 -1
  7. package/dist/cjs/{form-config-fetcher-9f1a13ca.js → form-config-fetcher-2dd00e5b.js} +13 -1
  8. package/dist/cjs/index-f9e81701.js +2 -10
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{pesquisa-fetcher-8bbee432.js → pesquisa-fetcher-213797ec.js} +273 -50
  11. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  12. package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +519 -4
  13. package/dist/cjs/snk-application.cjs.entry.js +19 -11
  14. package/dist/cjs/snk-attach.cjs.entry.js +66 -46
  15. package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
  16. package/dist/cjs/snk-crud.cjs.entry.js +25 -17
  17. package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +6 -2
  18. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
  19. package/dist/cjs/{snk-data-unit-6026a9f7.js → snk-data-unit-41c29713.js} +1 -1
  20. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  21. package/dist/cjs/snk-detail-view.cjs.entry.js +8 -9
  22. package/dist/cjs/snk-filter-bar.cjs.entry.js +31 -7
  23. package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
  24. package/dist/cjs/snk-filter-item.cjs.entry.js +10 -6
  25. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  26. package/dist/cjs/snk-form-config.cjs.entry.js +8 -2
  27. package/dist/cjs/snk-form.cjs.entry.js +11 -4
  28. package/dist/cjs/snk-grid.cjs.entry.js +40 -21
  29. package/dist/cjs/{snk-guides-viewer-e87f01b9.js → snk-guides-viewer-4b6ecda8.js} +20 -11
  30. package/dist/cjs/snk-guides-viewer.cjs.entry.js +6 -7
  31. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  32. package/dist/cjs/snk-simple-crud.cjs.entry.js +255 -21
  33. package/dist/cjs/snk-taskbar.cjs.entry.js +69 -8
  34. package/dist/collection/collection-manifest.json +6 -6
  35. package/dist/collection/components/snk-application/snk-application.js +55 -6
  36. package/dist/collection/components/snk-attach/snk-attach.js +39 -24
  37. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +1 -1
  38. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +29 -22
  39. package/dist/collection/components/snk-configurator/snk-configurator.js +1 -1
  40. package/dist/collection/components/snk-crud/snk-crud.js +71 -11
  41. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
  42. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +50 -7
  43. package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.css +1 -1
  44. package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.js +22 -1
  45. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +2 -2
  46. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +22 -1
  47. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +28 -6
  48. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +2 -1
  49. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +44 -3
  50. package/dist/collection/components/snk-form/snk-form.js +25 -1
  51. package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +20 -12
  52. package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +11 -5
  53. package/dist/collection/components/snk-grid/snk-grid.js +86 -16
  54. package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
  55. package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
  56. package/dist/collection/components/snk-simple-crud/regular-buttons.js +3 -0
  57. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +10 -2
  58. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +421 -17
  59. package/dist/collection/components/snk-taskbar/snk-taskbar.js +86 -8
  60. package/dist/collection/lib/configs/ConfigStorage.js +63 -3
  61. package/dist/collection/lib/dataUnit/InMemoryLoader.js +9 -40
  62. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +33 -0
  63. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +13 -5
  64. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +12 -0
  65. package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +6 -3
  66. package/dist/collection/lib/message/SnkMessageBuilder.js +20 -20
  67. package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +4 -0
  68. package/dist/collection/lib/utils/CrudUtils.js +13 -1
  69. package/dist/components/ConfigStorage.js +68 -5
  70. package/dist/components/DataFetcher.js +13 -5
  71. package/dist/components/SnkFormConfigManager.js +19 -11
  72. package/dist/components/SnkMessageBuilder.js +4 -0
  73. package/dist/components/dataunit-fetcher.js +41 -39
  74. package/dist/components/field-search.js +93 -3
  75. package/dist/components/form-config-fetcher.js +12 -0
  76. package/dist/components/index.d.ts +6 -6
  77. package/dist/components/snk-application2.js +15 -4
  78. package/dist/components/snk-attach2.js +115 -52
  79. package/dist/components/snk-configurator2.js +1 -1
  80. package/dist/components/snk-crud.js +23 -11
  81. package/dist/components/snk-custom-slot-elements.js +7 -3
  82. package/dist/components/snk-data-exporter2.js +2 -2
  83. package/dist/components/snk-detail-view2.js +48 -11
  84. package/dist/components/snk-filter-bar2.js +29 -4
  85. package/dist/components/snk-filter-detail2.js +5 -1
  86. package/dist/components/snk-filter-item2.js +11 -6
  87. package/dist/components/snk-form-config2.js +7 -1
  88. package/dist/components/snk-form.js +8 -0
  89. package/dist/components/snk-grid-config2.js +128 -102
  90. package/dist/components/snk-grid2.js +42 -18
  91. package/dist/components/snk-simple-crud2.js +317 -29
  92. package/dist/components/snk-taskbar2.js +75 -11
  93. package/dist/esm/{ConfigStorage-39ed8aeb.js → ConfigStorage-86187da3.js} +70 -7
  94. package/dist/esm/{DataFetcher-a650ae58.js → DataFetcher-c1baf61d.js} +13 -5
  95. package/dist/esm/{SnkFormConfigManager-692e20c7.js → SnkFormConfigManager-f53f9f87.js} +21 -13
  96. package/dist/esm/{SnkMessageBuilder-9747ddd2.js → SnkMessageBuilder-0a4becdd.js} +4 -0
  97. package/dist/esm/SnkMultiSelectionListDataSource-36918dbf.js +133 -0
  98. package/dist/esm/{auth-fetcher-17dc5b5e.js → auth-fetcher-039abba3.js} +1 -1
  99. package/dist/esm/{form-config-fetcher-f121f880.js → form-config-fetcher-30fb808f.js} +13 -1
  100. package/dist/esm/index-a7d3d3f1.js +2 -10
  101. package/dist/esm/loader.js +1 -1
  102. package/dist/esm/{pesquisa-fetcher-5a8cae10.js → pesquisa-fetcher-fe6f3826.js} +262 -43
  103. package/dist/esm/sankhyablocks.js +1 -1
  104. package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +518 -5
  105. package/dist/esm/snk-application.entry.js +19 -11
  106. package/dist/esm/snk-attach.entry.js +65 -45
  107. package/dist/esm/snk-configurator.entry.js +1 -1
  108. package/dist/esm/snk-crud.entry.js +25 -17
  109. package/dist/esm/snk-custom-slot-elements.entry.js +7 -3
  110. package/dist/esm/snk-data-exporter.entry.js +5 -5
  111. package/dist/esm/{snk-data-unit-4c343635.js → snk-data-unit-de1d140d.js} +1 -1
  112. package/dist/esm/snk-data-unit.entry.js +2 -2
  113. package/dist/esm/snk-detail-view.entry.js +8 -9
  114. package/dist/esm/snk-filter-bar.entry.js +31 -7
  115. package/dist/esm/snk-filter-detail.entry.js +4 -1
  116. package/dist/esm/snk-filter-item.entry.js +10 -6
  117. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  118. package/dist/esm/snk-form-config.entry.js +9 -3
  119. package/dist/esm/snk-form.entry.js +11 -4
  120. package/dist/esm/snk-grid.entry.js +41 -22
  121. package/dist/esm/{snk-guides-viewer-ba8ce538.js → snk-guides-viewer-113be3fd.js} +20 -11
  122. package/dist/esm/snk-guides-viewer.entry.js +6 -7
  123. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  124. package/dist/esm/snk-simple-crud.entry.js +256 -22
  125. package/dist/esm/snk-taskbar.entry.js +70 -9
  126. package/dist/sankhyablocks/p-032fe52e.js +1 -0
  127. package/dist/sankhyablocks/p-07a61550.entry.js +1 -0
  128. package/dist/sankhyablocks/p-0899e0b5.entry.js +1 -0
  129. package/dist/sankhyablocks/p-14a08904.entry.js +1 -0
  130. package/dist/sankhyablocks/p-154a7f33.entry.js +1 -0
  131. package/dist/sankhyablocks/p-15802c59.entry.js +1 -0
  132. package/dist/sankhyablocks/p-164666b1.js +65 -0
  133. package/dist/sankhyablocks/p-21a81901.entry.js +1 -0
  134. package/dist/sankhyablocks/p-32556aa6.js +1 -0
  135. package/dist/sankhyablocks/p-328585d0.entry.js +1 -0
  136. package/dist/sankhyablocks/{p-9a5d1b39.js → p-52c8e589.js} +1 -1
  137. package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
  138. package/dist/sankhyablocks/p-5cb07080.js +1 -0
  139. package/dist/sankhyablocks/p-74d349c3.entry.js +1 -0
  140. package/dist/sankhyablocks/p-7663f597.entry.js +1 -0
  141. package/dist/sankhyablocks/p-7fe120b8.entry.js +11 -0
  142. package/dist/sankhyablocks/{p-50783a8b.js → p-913a9979.js} +1 -1
  143. package/dist/sankhyablocks/{p-827e4b01.entry.js → p-a1d72395.entry.js} +1 -1
  144. package/dist/sankhyablocks/p-add17f6a.entry.js +1 -0
  145. package/dist/sankhyablocks/p-af1ac81f.entry.js +1 -0
  146. package/dist/sankhyablocks/p-aff76a53.js +56 -0
  147. package/dist/sankhyablocks/p-b4525fc0.entry.js +1 -0
  148. package/dist/sankhyablocks/p-cce0865d.js +1 -0
  149. package/dist/sankhyablocks/{p-be75153c.js → p-dc7c9047.js} +1 -1
  150. package/dist/sankhyablocks/p-dec65f6c.entry.js +1 -0
  151. package/dist/sankhyablocks/p-df5451c7.js +26 -0
  152. package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
  153. package/dist/sankhyablocks/{p-9d608b62.entry.js → p-eae7a817.entry.js} +1 -1
  154. package/dist/sankhyablocks/{p-20b46647.entry.js → p-ee9536bc.entry.js} +1 -1
  155. package/dist/sankhyablocks/p-f13f7616.entry.js +1 -0
  156. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  157. package/dist/types/components/snk-application/snk-application.d.ts +9 -1
  158. package/dist/types/components/snk-attach/snk-attach.d.ts +2 -1
  159. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +10 -1
  160. package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +5 -4
  161. package/dist/types/components/snk-crud/snk-crud.d.ts +12 -0
  162. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
  163. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +11 -1
  164. package/dist/types/components/snk-custom-slot-elements/snk-custom-slot-elements.d.ts +6 -0
  165. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
  166. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +6 -2
  167. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +8 -0
  168. package/dist/types/components/snk-form/snk-form.d.ts +6 -1
  169. package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +2 -1
  170. package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +4 -3
  171. package/dist/types/components/snk-grid/snk-grid.d.ts +14 -1
  172. package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
  173. package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
  174. package/dist/types/components/snk-simple-crud/regular-buttons.d.ts +3 -0
  175. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +76 -3
  176. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -0
  177. package/dist/types/components.d.ts +172 -11
  178. package/dist/types/lib/configs/ConfigStorage.d.ts +21 -1
  179. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +0 -2
  180. package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +4 -0
  181. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +2 -0
  182. package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +2 -1
  183. package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
  184. package/package.json +1 -1
  185. package/dist/cjs/PreloadManager-84466da6.js +0 -224
  186. package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
  187. package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
  188. package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
  189. package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
  190. package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
  191. package/dist/esm/snk-grid-config.entry.js +0 -479
  192. package/dist/esm/snk-select-box.entry.js +0 -21
  193. package/dist/sankhyablocks/p-094c30cb.js +0 -1
  194. package/dist/sankhyablocks/p-1c55becf.entry.js +0 -1
  195. package/dist/sankhyablocks/p-230f5148.entry.js +0 -1
  196. package/dist/sankhyablocks/p-2936303b.js +0 -1
  197. package/dist/sankhyablocks/p-2e4eb644.entry.js +0 -1
  198. package/dist/sankhyablocks/p-3e2e2424.entry.js +0 -1
  199. package/dist/sankhyablocks/p-3e91d5ea.entry.js +0 -1
  200. package/dist/sankhyablocks/p-43de1258.entry.js +0 -1
  201. package/dist/sankhyablocks/p-4ce6cb02.entry.js +0 -11
  202. package/dist/sankhyablocks/p-5e681b7b.js +0 -65
  203. package/dist/sankhyablocks/p-5f74c859.entry.js +0 -1
  204. package/dist/sankhyablocks/p-67aedbe0.js +0 -56
  205. package/dist/sankhyablocks/p-69754d94.entry.js +0 -1
  206. package/dist/sankhyablocks/p-725d04ba.js +0 -1
  207. package/dist/sankhyablocks/p-86801b08.entry.js +0 -1
  208. package/dist/sankhyablocks/p-8a3a2631.entry.js +0 -1
  209. package/dist/sankhyablocks/p-965b79a9.js +0 -1
  210. package/dist/sankhyablocks/p-98674137.entry.js +0 -1
  211. package/dist/sankhyablocks/p-a13ccb86.js +0 -26
  212. package/dist/sankhyablocks/p-aba0e87f.entry.js +0 -1
  213. package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
  214. package/dist/sankhyablocks/p-d26e0a02.entry.js +0 -1
  215. package/dist/sankhyablocks/p-d6317851.entry.js +0 -1
  216. package/dist/sankhyablocks/p-d7d85fa9.entry.js +0 -1
  217. package/dist/sankhyablocks/p-e3bd000e.entry.js +0 -1
  218. package/dist/sankhyablocks/p-e7dbe53a.entry.js +0 -1
  219. package/dist/sankhyablocks/p-fcdcb0e2.entry.js +0 -1
  220. /package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
  221. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
  222. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
  223. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
  224. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
  225. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
  226. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
  227. /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
  228. /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
  229. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
  230. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
  231. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
@@ -232,7 +232,7 @@ class PersonalizedFilterFetcher {
232
232
  assistent
233
233
  }
234
234
  }`);
235
- this.templateByQuery.set("savePersonalizedFilter", dist.gql `
235
+ this.templateByQuery.set("savePersonalizedFilter", dist.gql `
236
236
  mutation($name: String!, $filterAssistent: InputFilterAssistent!) {
237
237
  $queryAlias$: savePersonalizedFilter(name: $name, filterAssistent: $filterAssistent) {
238
238
  id
@@ -254,11 +254,11 @@ class PersonalizedFilterFetcher {
254
254
  }
255
255
  }`);
256
256
  }
257
- async loadPersonalizedFilter(resourceID, filterID, configName) {
257
+ async loadPersonalizedFilter(resourceID, filterID, configName, legacyConfigName) {
258
258
  return new Promise((resolve, reject) => {
259
259
  DataFetcher.get()
260
260
  .callGraphQL({
261
- values: { name: this.resolveURI(resourceID, configName) + "/" + filterID },
261
+ values: { name: this.resolveURI(resourceID, configName) + "/" + filterID + this.resolveLegacyConfigName(legacyConfigName) },
262
262
  query: this.templateByQuery.get("fetchFilterAssistent"),
263
263
  })
264
264
  .then((resp) => {
@@ -270,6 +270,9 @@ class PersonalizedFilterFetcher {
270
270
  });
271
271
  });
272
272
  }
273
+ resolveLegacyConfigName(legacyConfigName) {
274
+ return legacyConfigName ? `?legacyResourceID=${legacyConfigName}` : '';
275
+ }
273
276
  async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
274
277
  if (!personalizedFilter || Object.keys(personalizedFilter).length == 0) {
275
278
  return Promise.reject(new Error("personalizedFilter não pode ser vazio"));
@@ -358,11 +361,30 @@ var CONFIG_SOURCE;
358
361
  CONFIG_SOURCE["filterBar"] = "filterBar";
359
362
  })(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
360
363
  class ConfigStorage {
361
- static preload(resourceID, configName) {
364
+ static addFilterBarLegacyConfig(configName, legacyConfigName) {
365
+ this.validateConfigName(configName, legacyConfigName);
366
+ this.filterBarLegacyConfig.set(configName, legacyConfigName);
367
+ }
368
+ static addFormLegacyConfig(configName, legacyConfigName) {
369
+ this.validateConfigName(configName, legacyConfigName);
370
+ this.formLegacyConfig.set(configName, legacyConfigName);
371
+ }
372
+ static addGridLegacyConfig(configName, legacyConfigName) {
373
+ this.validateConfigName(configName, legacyConfigName);
374
+ this.gridLegacyConfig.set(configName, legacyConfigName);
375
+ }
376
+ static preload(resourceID, configName, legacyConfigs) {
377
+ if (configName && (legacyConfigs === null || legacyConfigs === void 0 ? void 0 : legacyConfigs.gridLegacyConfig)) {
378
+ ConfigStorage.addGridLegacyConfig(configName, legacyConfigs.gridLegacyConfig);
379
+ }
380
+ if (configName && (legacyConfigs === null || legacyConfigs === void 0 ? void 0 : legacyConfigs.formLegacyConfig)) {
381
+ ConfigStorage.addFormLegacyConfig(configName, legacyConfigs.formLegacyConfig);
382
+ }
362
383
  ConfigStorage.loadFormConfig(configName, resourceID);
363
384
  ConfigStorage.loadGridConfig(configName, resourceID);
364
385
  }
365
386
  static async loadFilterBarConfig(name, resourceID, urlParams) {
387
+ urlParams = this.handleLegacyConfig(name, CONFIG_SOURCE.filterBar, urlParams);
366
388
  const cacheID = ConfigStorage.buildCacheID(name, CONFIG_SOURCE.filterBar, resourceID);
367
389
  if (!ConfigStorage.configById.has(cacheID)) {
368
390
  ConfigStorage.configById.set(cacheID, ConfigStorage.filterBarConfigFetcher.getConfig(resourceID, name, urlParams));
@@ -370,6 +392,7 @@ class ConfigStorage {
370
392
  return ConfigStorage.configById.get(cacheID);
371
393
  }
372
394
  static async loadFormConfig(name, resourceID) {
395
+ name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.form);
373
396
  const cacheID = ConfigStorage.buildCacheID(name, CONFIG_SOURCE.form, resourceID);
374
397
  if (!ConfigStorage.configById.has(cacheID)) {
375
398
  ConfigStorage.configById.set(cacheID, ConfigStorage.formConfigFetcher.loadFormConfig(name, resourceID));
@@ -377,6 +400,7 @@ class ConfigStorage {
377
400
  return ConfigStorage.configById.get(cacheID);
378
401
  }
379
402
  static async loadGridConfig(name, resourceID) {
403
+ name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.grid);
380
404
  const cacheID = ConfigStorage.buildCacheID(name, CONFIG_SOURCE.grid, resourceID);
381
405
  if (!ConfigStorage.configById.has(cacheID)) {
382
406
  ConfigStorage.configById.set(cacheID, ConfigStorage.gridConfigFetcher.getConfig(name, resourceID));
@@ -388,6 +412,7 @@ class ConfigStorage {
388
412
  return this.filterBarConfigFetcher.saveConfig(config, resourceID, name);
389
413
  }
390
414
  static async saveFormConfig(config, name, resourceID) {
415
+ name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.form);
391
416
  await this.deleteFormConfigCache(name, resourceID);
392
417
  return this.formConfigFetcher.saveConfig(config, name, resourceID);
393
418
  }
@@ -402,7 +427,8 @@ class ConfigStorage {
402
427
  return this.gridConfigFetcher.saveConfig(config, name, resourceID);
403
428
  }
404
429
  static async loadPersonalizedFilter(filterId, resourceID, configName) {
405
- return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName);
430
+ const legacyConfigName = this.filterBarLegacyConfig.get(configName);
431
+ return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName, legacyConfigName);
406
432
  }
407
433
  static async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
408
434
  //Ao criar ou alterar um filtro personalizado,
@@ -425,6 +451,38 @@ class ConfigStorage {
425
451
  static async deleteFilterBarConfigCache(name, resourceID) {
426
452
  await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
427
453
  }
454
+ static validateConfigName(configName, legacyConfigName) {
455
+ if (!configName)
456
+ throw Error(this.CONFIG_NAME_ERROR_MESSAGE);
457
+ if (!legacyConfigName)
458
+ throw Error(this.LEGACY_CONFIG_NAME_ERROR_MESSAGE);
459
+ }
460
+ static handleLegacyConfig(configName, configSource, urlParams) {
461
+ let legacyConfigName;
462
+ switch (configSource) {
463
+ case CONFIG_SOURCE.filterBar:
464
+ legacyConfigName = this.filterBarLegacyConfig.get(configName);
465
+ break;
466
+ case CONFIG_SOURCE.grid:
467
+ legacyConfigName = this.gridLegacyConfig.get(configName);
468
+ break;
469
+ case CONFIG_SOURCE.form:
470
+ legacyConfigName = this.formLegacyConfig.get(configName);
471
+ }
472
+ const params = urlParams ? Object.assign({}, urlParams) : {};
473
+ if (legacyConfigName) {
474
+ params['legacyResourceID'] = legacyConfigName;
475
+ }
476
+ return params;
477
+ }
478
+ static handleLegacyConfigAsString(name, source) {
479
+ const params = this.handleLegacyConfig(name, source);
480
+ const legacyResourceID = params['legacyResourceID'];
481
+ if (legacyResourceID) {
482
+ name = name + `?legacyResourceID=${legacyResourceID}`;
483
+ }
484
+ return name;
485
+ }
428
486
  static async deleteConfigCache(name, resourceID, source) {
429
487
  const cacheID = ConfigStorage.buildCacheID(name, source, resourceID);
430
488
  this.configById.delete(cacheID);
@@ -436,6 +494,11 @@ class ConfigStorage {
436
494
  return `req_${source}_${name}_${resourceID}`;
437
495
  }
438
496
  }
497
+ ConfigStorage.CONFIG_NAME_ERROR_MESSAGE = "ConfigName precisa ser informado.";
498
+ ConfigStorage.LEGACY_CONFIG_NAME_ERROR_MESSAGE = "LegacyConfigName precisa ser informado.";
499
+ ConfigStorage.filterBarLegacyConfig = new Map();
500
+ ConfigStorage.formLegacyConfig = new Map();
501
+ ConfigStorage.gridLegacyConfig = new Map();
439
502
  ConfigStorage.configById = new Map();
440
503
  ConfigStorage.filterBarConfigFetcher = new FilterBarConfigFetcher();
441
504
  ConfigStorage.formConfigFetcher = new FormConfigFetcher();
@@ -6875,12 +6875,19 @@ class DataFetcher {
6875
6875
  //Reject promises with errors from query
6876
6876
  errorsResponse.forEach((errorResponse) => {
6877
6877
  Object.entries(errorResponse).forEach(async ([key, val]) => {
6878
- var _a;
6879
6878
  const waitingRequest = watingRequestsById.get(val.request.variables[val.index].queryID);
6880
6879
  const hasClientEvent = await this.proccesGraphQLClientEvents(extensions, waitingRequest.request, waitingRequest.resolve, waitingRequest.reject);
6881
- if (!hasClientEvent) {
6882
- (((_a = watingRequestsById.get(val.request.variables[val.index].queryID)) === null || _a === void 0 ? void 0 : _a.reject) || Promise.reject)(new ErrorException("Falha detectada", val.message));
6883
- }
6880
+ Promise.race([
6881
+ waitingRequest.promise,
6882
+ new Promise((resolve) => {
6883
+ resolve(false);
6884
+ })
6885
+ ]).then((data) => {
6886
+ var _a;
6887
+ if (!hasClientEvent || data === false) {
6888
+ (((_a = watingRequestsById.get(val.request.variables[val.index].queryID)) === null || _a === void 0 ? void 0 : _a.reject) || Promise.reject)(new ErrorException("Falha detectada", val.message));
6889
+ }
6890
+ });
6884
6891
  });
6885
6892
  });
6886
6893
  //Resolve promises with data from query
@@ -6893,7 +6900,8 @@ class DataFetcher {
6893
6900
  });
6894
6901
  }
6895
6902
  buildGraphQlURL(quietMode) {
6896
- const mgeSession = window["mgeSession"];
6903
+ const urlParams = UrlUtils.getQueryParams(location.search);
6904
+ const mgeSession = `${window['mgeSession'] || urlParams.get("mgeSession")}`;
6897
6905
  let url = `${this.resolveURL() + DataFetcher.getGraphQLPath()}`;
6898
6906
  if (mgeSession) {
6899
6907
  url += `?mgeSession=${mgeSession}`;
@@ -8,6 +8,11 @@ class SnkFormConfigManager {
8
8
  this._configName = configName;
9
9
  this._onConfigChange = onConfigChange;
10
10
  }
11
+ addFormLegacyConfig(legacyConfigName) {
12
+ if (this._configName) {
13
+ ConfigStorage.addFormLegacyConfig(this._configName, legacyConfigName);
14
+ }
15
+ }
11
16
  async loadConfig() {
12
17
  return new Promise(resolve => {
13
18
  ConfigStorage.loadFormConfig(this._configName, this._resourceID)
@@ -93,16 +98,19 @@ class SnkFormConfigManager {
93
98
  const normalizedFilter = StringUtils.replaceAccentuatedCharsLower(descriptionFilter.toLocaleLowerCase());
94
99
  return normalizedText.includes(normalizedFilter);
95
100
  }
96
- getInsertionConfig(dataUnit) {
97
- const fields = this.getFieldsList(dataUnit).filter(field => {
98
- if (dataUnit) {
99
- const def = dataUnit.getField(field.name);
100
- if (def && def.readOnly) {
101
- return false;
101
+ getInsertionConfig(dataUnit, ignoreReadOnlyFormFields) {
102
+ let fields = this.getFieldsList(dataUnit);
103
+ if (ignoreReadOnlyFormFields) {
104
+ fields = fields.filter(field => {
105
+ if (dataUnit) {
106
+ const def = dataUnit.getField(field.name);
107
+ if (def && def.readOnly) {
108
+ return false;
109
+ }
102
110
  }
103
- }
104
- return !field.readOnly;
105
- });
111
+ return !field.readOnly;
112
+ });
113
+ }
106
114
  return Object.assign(Object.assign({}, this._config), { fields });
107
115
  }
108
116
  setConfig(config) {
@@ -122,8 +130,8 @@ class SnkFormConfigManager {
122
130
  this._onConfigChange(Object.assign({}, this._config));
123
131
  }
124
132
  }
125
- getConfig(insertionMode, dataUnit) {
126
- return insertionMode ? this.getInsertionConfig(dataUnit) : Object.assign({}, this._config);
133
+ getConfig(insertionMode, dataUnit, ignoreReadOnlyFormFields) {
134
+ return insertionMode ? this.getInsertionConfig(dataUnit, ignoreReadOnlyFormFields !== null && ignoreReadOnlyFormFields !== void 0 ? ignoreReadOnlyFormFields : true) : Object.assign({}, this._config);
127
135
  }
128
136
  getFormConfigFetcher() {
129
137
  if (this._formConfigFetcher == undefined) {
@@ -146,6 +146,10 @@ const snkCrudMessages = {
146
146
 
147
147
  const snkSimpleCrudMessages = {
148
148
  findColumn: "Busca de colunas",
149
+ formConfigUnavaliable: {
150
+ title: "Aviso",
151
+ message: 'A opção "Configurar formulário" será disponibilizada em breve. Enquanto isso, acesse a configuração do fomulário através dos layouts anteriores, HTML5 ou Flex.'
152
+ }
149
153
  };
150
154
 
151
155
  const fileViewerMessages = {
@@ -383,6 +383,38 @@ class PreloadManager {
383
383
  PreloadManager._repositories = new Map();
384
384
  PreloadManager._loadingStatus = new Map();
385
385
 
386
+ function applyFilter(records, dataUnit, filters) {
387
+ const columnFilters = ColumnFilterManager.getColumnFilters(filters, "");
388
+ if (!(columnFilters === null || columnFilters === void 0 ? void 0 : columnFilters.size)) {
389
+ return records;
390
+ }
391
+ const filterFunction = ColumnFilterManager.getFilterFunction(dataUnit, Array.from(columnFilters.values()));
392
+ if (filterFunction == undefined) {
393
+ return records;
394
+ }
395
+ return records.filter(filterFunction);
396
+ }
397
+ function applySorting(records, dataUnit, sorting) {
398
+ if (sorting == undefined || sorting.length == 0) {
399
+ return records;
400
+ }
401
+ const sortingFunction = PreloadManager.getSortingFunction(dataUnit, sorting);
402
+ if (sortingFunction == undefined) {
403
+ return records;
404
+ }
405
+ return records.sort(sortingFunction);
406
+ }
407
+ function buildPaginationInfo(records, offset = 0, limit = 0) {
408
+ const lastRecord = Math.min(offset + limit, records === null || records === void 0 ? void 0 : records.length);
409
+ return {
410
+ currentPage: limit === 0 ? 0 : Math.ceil(offset / limit),
411
+ firstRecord: offset,
412
+ lastRecord: lastRecord,
413
+ total: records === null || records === void 0 ? void 0 : records.length,
414
+ hasMore: !!((records === null || records === void 0 ? void 0 : records.length) - lastRecord),
415
+ };
416
+ }
417
+
386
418
  class InMemoryLoader {
387
419
  constructor(metadata, records) {
388
420
  this.metadata = metadata;
@@ -395,9 +427,13 @@ class InMemoryLoader {
395
427
  this.dataUnit.loadMetadata().then(() => this.dataUnit.loadData());
396
428
  }
397
429
  getRecordsToLoad() {
398
- if (this._initialRecords == undefined || this.dataUnit.records.length > 0) {
430
+ if (this._initialRecords == undefined && this.dataUnit.records.length > 0) {
399
431
  this._initialRecords = this.dataUnit.records;
400
432
  }
433
+ const addedRecords = this.dataUnit.getAddedRecords();
434
+ if (addedRecords) {
435
+ return [...this._initialRecords, ...addedRecords];
436
+ }
401
437
  return this._initialRecords;
402
438
  }
403
439
  get dataUnit() {
@@ -456,30 +492,9 @@ class InMemoryLoader {
456
492
  return StringUtils.generateUUID();
457
493
  }
458
494
  inMemoryLoader(dataUnit, request, recordsIn) {
459
- let records = this.applyFilter(recordsIn, dataUnit, request.filters);
460
- records = this.applySorting(records, dataUnit, request.sort);
461
- return Promise.resolve({ records, paginationInfo: buildPaginationInfo(request, records) });
462
- }
463
- applyFilter(records, dataUnit, filters) {
464
- const columnFilters = ColumnFilterManager.getColumnFilters(filters, "");
465
- if (columnFilters == undefined || columnFilters.size == 0) {
466
- return records;
467
- }
468
- const filterFunciton = ColumnFilterManager.getFilterFunction(dataUnit, Array.from(columnFilters.values()));
469
- if (filterFunciton == undefined) {
470
- return records;
471
- }
472
- return records.filter(filterFunciton);
473
- }
474
- applySorting(records, dataUnit, sorting) {
475
- if (sorting == undefined || sorting.length == 0) {
476
- return records;
477
- }
478
- const sortingFunction = PreloadManager.getSortingFunction(dataUnit, sorting);
479
- if (sortingFunction == undefined) {
480
- return records;
481
- }
482
- return records.sort(sortingFunction);
495
+ let records = applyFilter(recordsIn, dataUnit, request.filters);
496
+ records = applySorting(records, dataUnit, request.sort);
497
+ return Promise.resolve({ records, paginationInfo: buildPaginationInfo(records, request.offset, request.limit) });
483
498
  }
484
499
  metadaLoader() {
485
500
  return Promise.resolve(this._metadata);
@@ -512,19 +527,6 @@ class InMemoryLoader {
512
527
  }
513
528
  }
514
529
  InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME = "InMemoryDataUnit";
515
- function buildPaginationInfo({ offset, limit }, records) {
516
- if (offset === undefined || limit === undefined) {
517
- return undefined;
518
- }
519
- const lastRecord = Math.min(offset + limit, records.length);
520
- return {
521
- currentPage: Math.ceil(offset / limit),
522
- firstRecord: offset,
523
- lastRecord: lastRecord,
524
- total: records.length,
525
- hasMore: !!(records.length - lastRecord),
526
- };
527
- }
528
530
 
529
531
  class DatasetStrategy {
530
532
  canSlice() {
@@ -1143,4 +1145,4 @@ class DataUnitFetcher {
1143
1145
  }
1144
1146
  }
1145
1147
 
1146
- export { DataUnitFetcher as D, InMemoryLoader as I, PesquisaFetcher as P, PreloadManager as a };
1148
+ export { DataUnitFetcher as D, InMemoryLoader as I, PesquisaFetcher as P, PreloadManager as a, applyFilter as b, applySorting as c, buildPaginationInfo as d };
@@ -1,8 +1,98 @@
1
- import { UserInterface, DateUtils } from '@sankhyalabs/core';
2
- import InMemoryFilterColumnDataSource from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
1
+ import { D as DataFetcher } from './DataFetcher.js';
3
2
  import { a as PreloadManager } from './dataunit-fetcher.js';
3
+ import { SortMode, ApplicationContext, UserInterface, DateUtils } from '@sankhyalabs/core';
4
+ import './index2.js';
5
+ import './snk-actions-button2.js';
6
+ import '@sankhyalabs/ezui/dist/collection/utils/constants';
7
+ import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
8
+ import './filter-item-type.enum.js';
9
+ import './form-config-fetcher.js';
10
+ import InMemoryFilterColumnDataSource from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
4
11
  import { h } from '@stencil/core/internal/client';
5
12
 
13
+ class CrudUtils {
14
+ static assertDefaultSorting(gridConfig, dataUnit) {
15
+ if (gridConfig && dataUnit) {
16
+ dataUnit.defaultSorting = gridConfig
17
+ .columns
18
+ .filter(col => col.ascending != undefined)
19
+ .sort((colA, colB) => colA.orderIndex - colB.orderIndex)
20
+ .map(({ name: field, ascending }) => {
21
+ const { dataType } = dataUnit.getField(field);
22
+ return { field, dataType, mode: ascending ? SortMode.ASC : SortMode.DESC };
23
+ });
24
+ }
25
+ }
26
+ static find(entityName, fields, criteria, onlyFirst = true, criteriaExpression, orderBy) {
27
+ const SERVICE_CRUD_FIND = "mge@crud.find";
28
+ let parsedFields = [];
29
+ let parsedCriteria = [];
30
+ let literalCriteria = {};
31
+ let application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
32
+ if (fields) {
33
+ if (!Array.isArray(fields)) {
34
+ throw new Error(application.messagesBuilder.getMessage("crudUtils.errorArray", null));
35
+ }
36
+ fields.forEach((fieldName) => {
37
+ parsedFields.push({
38
+ name: fieldName
39
+ });
40
+ });
41
+ }
42
+ if (criteria) {
43
+ for (const key in criteria) {
44
+ if (criteria.hasOwnProperty(key)) {
45
+ parsedCriteria.push({ nome: key, valor: criteria[key] });
46
+ }
47
+ }
48
+ }
49
+ if (criteriaExpression) {
50
+ literalCriteria = {
51
+ expression: {
52
+ $: criteriaExpression
53
+ }
54
+ };
55
+ }
56
+ let request = {
57
+ requestBody: {
58
+ entity: {
59
+ name: entityName,
60
+ criterio: parsedCriteria,
61
+ fields: {
62
+ field: parsedFields
63
+ },
64
+ literalCriteria: literalCriteria,
65
+ orderby: orderBy
66
+ }
67
+ }
68
+ };
69
+ return new Promise((resolve) => {
70
+ DataFetcher.get().callServiceBroker(SERVICE_CRUD_FIND, JSON.stringify(request)).then((result) => {
71
+ var _a;
72
+ let entities = (_a = result.entidades) === null || _a === void 0 ? void 0 : _a.entidade;
73
+ if (entities != undefined) {
74
+ let crudFindResult = {
75
+ fields: new Map()
76
+ };
77
+ for (let key in entities) {
78
+ let fieldValue = entities[key];
79
+ if (fieldValue.hasOwnProperty('$')) {
80
+ crudFindResult.fields.set(key, fieldValue.$);
81
+ }
82
+ if (onlyFirst) {
83
+ break;
84
+ }
85
+ }
86
+ resolve(crudFindResult);
87
+ }
88
+ else {
89
+ resolve(null);
90
+ }
91
+ });
92
+ });
93
+ }
94
+ }
95
+
6
96
  class TaskbarProcessor {
7
97
  constructor(defaultButtons) {
8
98
  this._defaultButtons = defaultButtons;
@@ -118,4 +208,4 @@ const openFieldSearch = async (moreOptions, field) => {
118
208
  await moreOptions.showActions();
119
209
  };
120
210
 
121
- export { SnkMultiSelectionListDataSource as S, TaskbarProcessor as T, buildFieldSearch as b, openFieldSearch as o };
211
+ export { CrudUtils as C, SnkMultiSelectionListDataSource as S, TaskbarProcessor as T, buildFieldSearch as b, openFieldSearch as o };
@@ -230,6 +230,18 @@ class FormConfigFetcher extends ResourceFetcher {
230
230
  }
231
231
  return `cfg://${authority}/${resourceID}`;
232
232
  }
233
+ async fetchLegacyConfigurableForm(configName) {
234
+ const payload = { 'requestBody': { 'config': { 'chave': configName, 'tipo': 'T' } } };
235
+ const response = await DataFetcher.get().callServiceBroker('SystemUtilsSP.getConf', JSON.stringify(payload));
236
+ if (ObjectUtils.isEmpty(response))
237
+ return undefined;
238
+ return this.buildLegacyConfigurableForm(response);
239
+ }
240
+ buildLegacyConfigurableForm(config) {
241
+ var _a, _b, _c;
242
+ const rawFields = (_c = (_b = (_a = config === null || config === void 0 ? void 0 : config.formConfig) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.field) !== null && _c !== void 0 ? _c : [];
243
+ return { emptyConfig: false, fields: Array.isArray(rawFields) ? rawFields : [rawFields] };
244
+ }
233
245
  }
234
246
  var UserConfigType;
235
247
  (function (UserConfigType) {
@@ -4,7 +4,7 @@ export { SnkActionsForm as SnkActionsForm } from '../types/components/snk-action
4
4
  export { SnkApplication as SnkApplication } from '../types/components/snk-application/snk-application';
5
5
  export { SnkAttach as SnkAttach } from '../types/components/snk-attach/snk-attach';
6
6
  export { SnkActionsForm as SnkClientConfirm } from '../types/components/snk-actions-button/subcomponents/snk-client-confirm';
7
- export { SnkConfigOptions as SnkConfigOptions } from '../types/components/snk-form/subcomponents/snk-config-options/snk-config-options';
7
+ export { SnkConfigOptions as SnkConfigOptions } from '../types/components/snk-form-config/subcomponents/snk-config-options/snk-config-options';
8
8
  export { SnkConfigurator as SnkConfigurator } from '../types/components/snk-configurator/snk-configurator';
9
9
  export { SnkCrud as SnkCrud } from '../types/components/snk-crud/snk-crud';
10
10
  export { SnkCustomSlotElements as SnkCustomSlotElements } from '../types/components/snk-custom-slot-elements/snk-custom-slot-elements';
@@ -15,7 +15,7 @@ export { SnkEntityList as SnkEntityList } from '../types/components/snk-entity-l
15
15
  export { SnkExporterEmailSender as SnkExporterEmailSender } from '../types/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender';
16
16
  export { SnkExpressionGroup as SnkExpressionGroup } from '../types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group';
17
17
  export { SnkExpressionItem as SnkExpressionItem } from '../types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item';
18
- export { SnkFieldConfig as SnkFieldConfig } from '../types/components/snk-form/subcomponents/snk-field-config/snk-field-config';
18
+ export { SnkFieldConfig as SnkFieldConfig } from '../types/components/snk-form-config/subcomponents/snk-field-config/snk-field-config';
19
19
  export { SnkFilterAdvancedMode as SnkFilterAdvancedMode } from '../types/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode';
20
20
  export { SnkFilterAssistentMode as SnkFilterAssistentMode } from '../types/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode';
21
21
  export { SnkFilterBar as SnkFilterBar } from '../types/components/snk-filter-bar/snk-filter-bar';
@@ -34,20 +34,20 @@ export { SnkFilterPeriod as SnkFilterPeriod } from '../types/components/snk-filt
34
34
  export { SnkFilterSearch as SnkFilterSearch } from '../types/components/snk-filter-bar/filter-item/editors/snk-filter-search';
35
35
  export { SnkFilterText as SnkFilterText } from '../types/components/snk-filter-bar/filter-item/editors/snk-filter-text';
36
36
  export { SnkForm as SnkForm } from '../types/components/snk-form/snk-form';
37
- export { SnkFormConfig as SnkFormConfig } from '../types/components/snk-form/subcomponents/snk-form-config/snk-form-config';
37
+ export { SnkFormConfig as SnkFormConfig } from '../types/components/snk-form-config/snk-form-config';
38
38
  export { SnkFormSummary as SnkFormSummary } from '../types/components/snk-crud/subcomponents/snk-form-summary';
39
39
  export { SnkFormView as SnkFormView } from '../types/components/snk-crud/subcomponents/snk-form-view';
40
40
  export { SnkGrid as SnkGrid } from '../types/components/snk-grid/snk-grid';
41
- export { SnkGridConfig as SnkGridConfig } from '../types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config';
41
+ export { SnkGridConfig as SnkGridConfig } from '../types/components/snk-grid-config/snk-grid-config';
42
42
  export { SnkGuidesViewer as SnkGuidesViewer } from '../types/components/snk-crud/subcomponents/snk-guides-viewer';
43
43
  export { SnkPersonalizedFilter as SnkPersonalizedFilter } from '../types/components/snk-personalized-filter/snk-personalized-filter';
44
44
  export { SnkFilterPersonalized as SnkPersonalizedFilterEditor } from '../types/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor';
45
45
  export { SnkPesquisa as SnkPesquisa } from '../types/components/snk-pesquisa/snk-pesquisa';
46
46
  export { SnkPrintSelector as SnkPrintSelector } from '../types/components/snk-print-selector/snk-print-selector';
47
- export { SelectBox as SnkSelectBox } from '../types/components/snk-grid/subcomponents/snk-select-box/snk-select-box';
47
+ export { SelectBox as SnkSelectBox } from '../types/components/snk-grid-config/snk-select-box/snk-select-box';
48
48
  export { SnkSimpleBar as SnkSimpleBar } from '../types/components/snk-simple-bar/snk-simple-bar';
49
49
  export { SnkSimpleCrud as SnkSimpleCrud } from '../types/components/snk-simple-crud/snk-simple-crud';
50
- export { SnkTabConfig as SnkTabConfig } from '../types/components/snk-form/subcomponents/snk-tab-config/snk-tab-config';
50
+ export { SnkTabConfig as SnkTabConfig } from '../types/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config';
51
51
  export { SnkTaskbar as SnkTaskbar } from '../types/components/snk-taskbar/snk-taskbar';
52
52
  export { TaskbarActionsButton as TaskbarActionsButton } from '../types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button';
53
53
  export { TestePesquisa as TestePesquisa } from '../types/components/teste-pesquisa/teste-pesquisa';
@@ -292,6 +292,8 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
292
292
  this._isLoadedByPk = false;
293
293
  this.messagesBuilder = undefined;
294
294
  this.configName = undefined;
295
+ this.gridLegacyConfigName = undefined;
296
+ this.formLegacyConfigName = undefined;
295
297
  this.loadByPK = undefined;
296
298
  }
297
299
  async processPendingActions(actionsLocker) {
@@ -457,8 +459,11 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
457
459
  /**
458
460
  * Exibe o conteúdo passado em um Popup.
459
461
  */
460
- async showPopUp(content, size = "full", useHeader = true) {
462
+ async showPopUp(content, size = "full", useHeader = true, onCloseCallback) {
461
463
  this.clearContent(this._popUp);
464
+ this._popUp.addEventListener("ezClosePopup", () => {
465
+ onCloseCallback();
466
+ }, { once: true });
462
467
  this._popUp.appendChild(content);
463
468
  this._popUp.opened = true;
464
469
  this._popUp.heightMode = size;
@@ -888,7 +893,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
888
893
  const mdByName = {};
889
894
  const { entity, entityDescription, criteria, searchOptions } = options;
890
895
  if (mode === "ADVANCED") {
891
- return new Promise(accept => {
896
+ return new Promise((accept, reject) => {
892
897
  const pesquisaContent = document.createElement("snk-pesquisa");
893
898
  pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
894
899
  pesquisaContent.argument = argument;
@@ -899,7 +904,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
899
904
  this.closePopUp();
900
905
  };
901
906
  this.setPopUpTitle(entityDescription);
902
- this.showPopUp(pesquisaContent);
907
+ this.showPopUp(pesquisaContent, undefined, undefined, reject);
903
908
  });
904
909
  }
905
910
  else {
@@ -1198,7 +1203,11 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1198
1203
  ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
1199
1204
  this.registerPkChangeListener();
1200
1205
  ErrorTracking.init();
1201
- ConfigStorage.preload(this.applicationResourceID, this.configName);
1206
+ let legacyConfig = {
1207
+ gridLegacyConfig: this.gridLegacyConfigName,
1208
+ formLegacyConfig: this.formLegacyConfigName
1209
+ };
1210
+ ConfigStorage.preload(this.applicationResourceID, this.configName, legacyConfig);
1202
1211
  document.addEventListener("click", () => Workspace.applicationClick());
1203
1212
  this._waitingAppReady.forEach(resolve => resolve());
1204
1213
  }
@@ -1241,6 +1250,8 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1241
1250
  }, [2, "snk-application", {
1242
1251
  "messagesBuilder": [1040],
1243
1252
  "configName": [1, "config-name"],
1253
+ "gridLegacyConfigName": [1, "grid-legacy-config-name"],
1254
+ "formLegacyConfigName": [1, "form-legacy-config-name"],
1244
1255
  "loadByPK": [16],
1245
1256
  "getKeyboardManager": [64],
1246
1257
  "isUserSup": [64],