@sankhyalabs/sankhyablocks 9.1.0-ms.5 → 9.1.0-ms.6

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 (227) hide show
  1. package/dist/cjs/{ConfigStorage-34aa43d8.js → ConfigStorage-bb8c0edf.js} +11 -1
  2. package/dist/cjs/{SnkFormConfigManager-61bf3266.js → SnkFormConfigManager-a23df43c.js} +1 -1
  3. package/dist/cjs/SnkMessageBuilder-acd9ec62.js +1937 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  6. package/dist/cjs/snk-actions-button_8.cjs.entry.js +76 -37
  7. package/dist/cjs/snk-application.cjs.entry.js +2 -2
  8. package/dist/cjs/snk-attach.cjs.entry.js +28 -11
  9. package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
  10. package/dist/cjs/{snk-data-unit-a4f9287b.js → snk-data-unit-47c6d16b.js} +1 -1
  11. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  12. package/dist/cjs/snk-detail-view.cjs.entry.js +4 -4
  13. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +1 -1
  14. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
  15. package/dist/cjs/snk-form_2.cjs.entry.js +3 -3
  16. package/dist/cjs/snk-grid.cjs.entry.js +1 -1
  17. package/dist/cjs/{snk-guides-viewer-29298823.js → snk-guides-viewer-1689e877.js} +1 -1
  18. package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -3
  19. package/dist/cjs/snk-personalized-filter.cjs.entry.js +1 -1
  20. package/dist/cjs/snk-simple-crud.cjs.entry.js +9 -9
  21. package/dist/collection/components/snk-attach/snk-attach.js +45 -11
  22. package/dist/collection/components/snk-grid-config/snk-grid-config.js +74 -36
  23. package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.js +20 -1
  24. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +8 -8
  25. package/dist/collection/lib/configs/ConfigStorage.js +3 -0
  26. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +9 -1
  27. package/dist/collection/lib/message/SnkMessageBuilder.js +25 -52
  28. package/dist/collection/lib/message/messageResourceEnUSUtils.js +91 -0
  29. package/dist/collection/lib/message/messageResourceEsESUtils.js +91 -0
  30. package/dist/collection/lib/message/messageResourcePtBRUtils.js +91 -0
  31. package/dist/collection/lib/message/resources/en-us/crud-utils.msg.js +3 -0
  32. package/dist/collection/lib/message/resources/en-us/file-viewer.msg.js +9 -0
  33. package/dist/collection/lib/message/resources/en-us/snk-actions-button.msg.js +27 -0
  34. package/dist/collection/lib/message/resources/en-us/snk-application.msg.js +8 -0
  35. package/dist/collection/lib/message/resources/en-us/snk-attach.msg.js +39 -0
  36. package/dist/collection/lib/message/resources/en-us/snk-configurator.msg.js +8 -0
  37. package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +10 -0
  38. package/dist/collection/lib/message/resources/en-us/snk-data-exporter.msg.js +35 -0
  39. package/dist/collection/lib/message/resources/en-us/snk-data-unit.msg.js +36 -0
  40. package/dist/collection/lib/message/resources/en-us/snk-entity-list.msg.js +3 -0
  41. package/dist/collection/lib/message/resources/en-us/snk-exporter.msg.js +20 -0
  42. package/dist/collection/lib/message/resources/en-us/snk-filter-bar.msg.js +64 -0
  43. package/dist/collection/lib/message/resources/en-us/snk-filter-field-search.msg.js +7 -0
  44. package/dist/collection/lib/message/resources/en-us/snk-filter-param-config.msg.js +18 -0
  45. package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +76 -0
  46. package/dist/collection/lib/message/resources/en-us/snk-grid.msg.js +41 -0
  47. package/dist/collection/lib/message/resources/en-us/snk-personalized-filter.msg.js +88 -0
  48. package/dist/collection/lib/message/resources/en-us/snk-print-selector.msg.js +23 -0
  49. package/dist/collection/lib/message/resources/en-us/snk-simple-bar.msg.js +3 -0
  50. package/dist/collection/lib/message/resources/en-us/snk-simple-crud.msg.js +8 -0
  51. package/dist/collection/lib/message/resources/en-us/snk-taskbar.msg.js +18 -0
  52. package/dist/collection/lib/message/resources/es-es/crud-utils.msg.js +3 -0
  53. package/dist/collection/lib/message/resources/es-es/file-viewer.msg.js +9 -0
  54. package/dist/collection/lib/message/resources/es-es/snk-actions-button.msg.js +27 -0
  55. package/dist/collection/lib/message/resources/es-es/snk-application.msg.js +8 -0
  56. package/dist/collection/lib/message/resources/es-es/snk-attach.msg.js +39 -0
  57. package/dist/collection/lib/message/resources/es-es/snk-configurator.msg.js +8 -0
  58. package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +10 -0
  59. package/dist/collection/lib/message/resources/es-es/snk-data-exporter.msg.js +35 -0
  60. package/dist/collection/lib/message/resources/es-es/snk-data-unit.msg.js +36 -0
  61. package/dist/collection/lib/message/resources/es-es/snk-entity-list.msg.js +3 -0
  62. package/dist/collection/lib/message/resources/es-es/snk-exporter.msg.js +20 -0
  63. package/dist/collection/lib/message/resources/es-es/snk-filter-bar.msg.js +64 -0
  64. package/dist/collection/lib/message/resources/es-es/snk-filter-field-search.msg.js +7 -0
  65. package/dist/collection/lib/message/resources/es-es/snk-filter-param-config.msg.js +18 -0
  66. package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +76 -0
  67. package/dist/collection/lib/message/resources/es-es/snk-grid.msg.js +41 -0
  68. package/dist/collection/lib/message/resources/es-es/snk-personalized-filter.msg.js +88 -0
  69. package/dist/collection/lib/message/resources/es-es/snk-print-selector.msg.js +23 -0
  70. package/dist/collection/lib/message/resources/es-es/snk-simple-bar.msg.js +3 -0
  71. package/dist/collection/lib/message/resources/es-es/snk-simple-crud.msg.js +8 -0
  72. package/dist/collection/lib/message/resources/es-es/snk-taskbar.msg.js +18 -0
  73. package/dist/collection/lib/message/resources/{crud-utils.msg.js → pt-br/crud-utils.msg.js} +1 -2
  74. package/dist/collection/lib/message/resources/{file-viewer.msg.js → pt-br/file-viewer.msg.js} +1 -2
  75. package/dist/collection/lib/message/resources/{snk-application.msg.js → pt-br/snk-application.msg.js} +1 -2
  76. package/dist/collection/lib/message/resources/{snk-attach.msg.js → pt-br/snk-attach.msg.js} +0 -1
  77. package/dist/collection/lib/message/resources/{snk-crud.msg.js → pt-br/snk-crud.msg.js} +0 -1
  78. package/dist/collection/lib/message/resources/{snk-data-unit.msg.js → pt-br/snk-data-unit.msg.js} +1 -2
  79. package/dist/collection/lib/message/resources/{snk-exporter.msg.js → pt-br/snk-exporter.msg.js} +1 -2
  80. package/dist/collection/lib/message/resources/pt-br/snk-filter-bar.msg.js +64 -0
  81. package/dist/collection/lib/message/resources/pt-br/snk-grid.msg.js +41 -0
  82. package/dist/collection/lib/message/resources/{snk-simple-crud.msg.js → pt-br/snk-simple-crud.msg.js} +0 -1
  83. package/dist/collection/lib/message/resources/{snk-taskbar.msg.js → pt-br/snk-taskbar.msg.js} +1 -2
  84. package/dist/components/ConfigStorage.js +11 -1
  85. package/dist/components/SnkMessageBuilder.js +1345 -139
  86. package/dist/components/snk-attach2.js +29 -11
  87. package/dist/components/snk-grid-config2.js +73 -35
  88. package/dist/components/snk-select-box2.js +4 -2
  89. package/dist/components/snk-simple-crud2.js +7 -7
  90. package/dist/esm/{ConfigStorage-89154c4e.js → ConfigStorage-cf578768.js} +11 -1
  91. package/dist/esm/{SnkFormConfigManager-d64d62d6.js → SnkFormConfigManager-c1cd9dcd.js} +1 -1
  92. package/dist/esm/SnkMessageBuilder-c8b452b6.js +1915 -0
  93. package/dist/esm/loader.js +1 -1
  94. package/dist/esm/sankhyablocks.js +1 -1
  95. package/dist/esm/snk-actions-button_8.entry.js +76 -37
  96. package/dist/esm/snk-application.entry.js +2 -2
  97. package/dist/esm/snk-attach.entry.js +28 -11
  98. package/dist/esm/snk-data-exporter.entry.js +2 -2
  99. package/dist/esm/{snk-data-unit-330db397.js → snk-data-unit-c12986b7.js} +1 -1
  100. package/dist/esm/snk-data-unit.entry.js +2 -2
  101. package/dist/esm/snk-detail-view.entry.js +4 -4
  102. package/dist/esm/snk-filter-bar_4.entry.js +1 -1
  103. package/dist/esm/snk-filter-modal-item.entry.js +1 -1
  104. package/dist/esm/snk-form_2.entry.js +3 -3
  105. package/dist/esm/snk-grid.entry.js +1 -1
  106. package/dist/esm/{snk-guides-viewer-9335318d.js → snk-guides-viewer-defa2629.js} +1 -1
  107. package/dist/esm/snk-guides-viewer.entry.js +3 -3
  108. package/dist/esm/snk-personalized-filter.entry.js +1 -1
  109. package/dist/esm/snk-simple-crud.entry.js +9 -9
  110. package/dist/sankhyablocks/{p-5b31b239.entry.js → p-09ba8326.entry.js} +1 -1
  111. package/dist/sankhyablocks/p-224fa6f9.js +1 -0
  112. package/dist/sankhyablocks/{p-a2c6944d.entry.js → p-2628f34e.entry.js} +1 -1
  113. package/dist/sankhyablocks/{p-1079e61b.entry.js → p-34cfb5ad.entry.js} +2 -2
  114. package/dist/sankhyablocks/p-360f0b74.js +1 -0
  115. package/dist/sankhyablocks/p-405edf96.js +56 -0
  116. package/dist/sankhyablocks/{p-fc87708a.js → p-4b8691b6.js} +1 -1
  117. package/dist/sankhyablocks/{p-3b1d73f9.js → p-4eb731b3.js} +1 -1
  118. package/dist/sankhyablocks/{p-2ebd3bfd.entry.js → p-60d3abf6.entry.js} +1 -1
  119. package/dist/sankhyablocks/{p-31193a60.entry.js → p-6bc7c7ee.entry.js} +1 -1
  120. package/dist/sankhyablocks/{p-e56eb36b.entry.js → p-81820bf8.entry.js} +1 -1
  121. package/dist/sankhyablocks/{p-2d58f98e.entry.js → p-86c8f7f2.entry.js} +1 -1
  122. package/dist/sankhyablocks/{p-b2946adb.entry.js → p-90ee1990.entry.js} +1 -1
  123. package/dist/sankhyablocks/{p-0750661e.entry.js → p-aef68e58.entry.js} +1 -1
  124. package/dist/sankhyablocks/p-b033bf30.entry.js +1 -0
  125. package/dist/sankhyablocks/{p-9a6fbf3d.entry.js → p-b1ea8c6d.entry.js} +1 -1
  126. package/dist/sankhyablocks/{p-5126b34e.entry.js → p-cfa8cac2.entry.js} +1 -1
  127. package/dist/sankhyablocks/{p-7c9815ea.entry.js → p-f65421cd.entry.js} +1 -1
  128. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  129. package/dist/types/components/snk-attach/interfaces/ICrudConfig.d.ts +1 -1
  130. package/dist/types/components/snk-attach/snk-attach.d.ts +5 -0
  131. package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +7 -0
  132. package/dist/types/components/snk-grid-config/snk-select-box/snk-select-box.d.ts +4 -0
  133. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +1 -1
  134. package/dist/types/components.d.ts +16 -0
  135. package/dist/types/lib/configs/ConfigStorage.d.ts +1 -0
  136. package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +3 -2
  137. package/dist/types/lib/message/SnkMessageBuilder.d.ts +4 -0
  138. package/dist/types/lib/message/resources/en-us/crud-utils.msg.d.ts +1 -0
  139. package/dist/types/lib/message/resources/en-us/file-viewer.msg.d.ts +1 -0
  140. package/dist/types/lib/message/resources/en-us/snk-application.msg.d.ts +1 -0
  141. package/dist/types/lib/message/resources/{snk-attach.msg.d.ts → en-us/snk-attach.msg.d.ts} +0 -1
  142. package/dist/types/lib/message/resources/{snk-crud.msg.d.ts → en-us/snk-crud.msg.d.ts} +0 -1
  143. package/dist/types/lib/message/resources/en-us/snk-data-unit.msg.d.ts +1 -0
  144. package/dist/types/lib/message/resources/en-us/snk-exporter.msg.d.ts +1 -0
  145. package/dist/types/lib/message/resources/en-us/snk-filter-bar.msg.d.ts +1 -0
  146. package/dist/types/lib/message/resources/{snk-simple-crud.msg.d.ts → en-us/snk-simple-crud.msg.d.ts} +0 -1
  147. package/dist/types/lib/message/resources/en-us/snk-taskbar.msg.d.ts +1 -0
  148. package/dist/types/lib/message/resources/es-es/crud-utils.msg.d.ts +1 -0
  149. package/dist/types/lib/message/resources/es-es/file-viewer.msg.d.ts +1 -0
  150. package/dist/types/lib/message/resources/es-es/snk-actions-button.msg.d.ts +1 -0
  151. package/dist/types/lib/message/resources/es-es/snk-application.msg.d.ts +1 -0
  152. package/dist/types/lib/message/resources/{snk-application.msg.d.ts → es-es/snk-attach.msg.d.ts} +0 -1
  153. package/dist/types/lib/message/resources/es-es/snk-configurator.msg.d.ts +1 -0
  154. package/dist/types/lib/message/resources/es-es/snk-crud.msg.d.ts +1 -0
  155. package/dist/types/lib/message/resources/es-es/snk-data-exporter.msg.d.ts +1 -0
  156. package/dist/types/lib/message/resources/es-es/snk-data-unit.msg.d.ts +1 -0
  157. package/dist/types/lib/message/resources/es-es/snk-entity-list.msg.d.ts +1 -0
  158. package/dist/types/lib/message/resources/es-es/snk-exporter.msg.d.ts +1 -0
  159. package/dist/types/lib/message/resources/es-es/snk-filter-bar.msg.d.ts +1 -0
  160. package/dist/types/lib/message/resources/es-es/snk-filter-field-search.msg.d.ts +1 -0
  161. package/dist/types/lib/message/resources/es-es/snk-filter-param-config.msg.d.ts +1 -0
  162. package/dist/types/lib/message/resources/es-es/snk-form.msg.d.ts +4 -0
  163. package/dist/types/lib/message/resources/es-es/snk-grid.msg.d.ts +2 -0
  164. package/dist/types/lib/message/resources/es-es/snk-personalized-filter.msg.d.ts +1 -0
  165. package/dist/types/lib/message/resources/es-es/snk-print-selector.msg.d.ts +1 -0
  166. package/dist/types/lib/message/resources/es-es/snk-simple-bar.msg.d.ts +1 -0
  167. package/dist/types/lib/message/resources/es-es/snk-simple-crud.msg.d.ts +1 -0
  168. package/dist/types/lib/message/resources/es-es/snk-taskbar.msg.d.ts +1 -0
  169. package/dist/types/lib/message/resources/pt-br/crud-utils.msg.d.ts +1 -0
  170. package/dist/types/lib/message/resources/pt-br/file-viewer.msg.d.ts +1 -0
  171. package/dist/types/lib/message/resources/pt-br/snk-actions-button.msg.d.ts +1 -0
  172. package/dist/types/lib/message/resources/pt-br/snk-application.msg.d.ts +1 -0
  173. package/dist/types/lib/message/resources/pt-br/snk-attach.msg.d.ts +1 -0
  174. package/dist/types/lib/message/resources/pt-br/snk-configurator.msg.d.ts +1 -0
  175. package/dist/types/lib/message/resources/pt-br/snk-crud.msg.d.ts +1 -0
  176. package/dist/types/lib/message/resources/pt-br/snk-data-exporter.msg.d.ts +1 -0
  177. package/dist/types/lib/message/resources/pt-br/snk-data-unit.msg.d.ts +1 -0
  178. package/dist/types/lib/message/resources/pt-br/snk-entity-list.msg.d.ts +1 -0
  179. package/dist/types/lib/message/resources/pt-br/snk-exporter.msg.d.ts +1 -0
  180. package/dist/types/lib/message/resources/pt-br/snk-filter-bar.msg.d.ts +1 -0
  181. package/dist/types/lib/message/resources/pt-br/snk-filter-field-search.msg.d.ts +1 -0
  182. package/dist/types/lib/message/resources/pt-br/snk-filter-param-config.msg.d.ts +1 -0
  183. package/dist/types/lib/message/resources/pt-br/snk-form.msg.d.ts +4 -0
  184. package/dist/types/lib/message/resources/pt-br/snk-grid.msg.d.ts +2 -0
  185. package/dist/types/lib/message/resources/pt-br/snk-personalized-filter.msg.d.ts +1 -0
  186. package/dist/types/lib/message/resources/pt-br/snk-print-selector.msg.d.ts +1 -0
  187. package/dist/types/lib/message/resources/pt-br/snk-simple-bar.msg.d.ts +1 -0
  188. package/dist/types/lib/message/resources/pt-br/snk-simple-crud.msg.d.ts +1 -0
  189. package/dist/types/lib/message/resources/pt-br/snk-taskbar.msg.d.ts +1 -0
  190. package/package.json +1 -1
  191. package/dist/cjs/SnkMessageBuilder-221cc88d.js +0 -731
  192. package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +0 -65
  193. package/dist/collection/lib/message/resources/snk-grid.msg.js +0 -40
  194. package/dist/esm/SnkMessageBuilder-da87a821.js +0 -709
  195. package/dist/sankhyablocks/p-412e06e9.js +0 -1
  196. package/dist/sankhyablocks/p-8758404f.js +0 -56
  197. package/dist/sankhyablocks/p-c99293d5.entry.js +0 -1
  198. package/dist/sankhyablocks/p-fc4eac32.js +0 -1
  199. package/dist/types/lib/message/resources/crud-utils.msg.d.ts +0 -2
  200. package/dist/types/lib/message/resources/file-viewer.msg.d.ts +0 -2
  201. package/dist/types/lib/message/resources/snk-data-unit.msg.d.ts +0 -2
  202. package/dist/types/lib/message/resources/snk-exporter.msg.d.ts +0 -2
  203. package/dist/types/lib/message/resources/snk-filter-bar.msg.d.ts +0 -2
  204. package/dist/types/lib/message/resources/snk-taskbar.msg.d.ts +0 -2
  205. /package/dist/collection/components/snk-simple-crud/{regular-buttons.js → snk-simple-crud.constants.js} +0 -0
  206. /package/dist/collection/lib/message/resources/{snk-actions-button.msg.js → pt-br/snk-actions-button.msg.js} +0 -0
  207. /package/dist/collection/lib/message/resources/{snk-configurator.msg.js → pt-br/snk-configurator.msg.js} +0 -0
  208. /package/dist/collection/lib/message/resources/{snk-data-exporter.msg.js → pt-br/snk-data-exporter.msg.js} +0 -0
  209. /package/dist/collection/lib/message/resources/{snk-entity-list.msg.js → pt-br/snk-entity-list.msg.js} +0 -0
  210. /package/dist/collection/lib/message/resources/{snk-filter-field-search.msg.js → pt-br/snk-filter-field-search.msg.js} +0 -0
  211. /package/dist/collection/lib/message/resources/{snk-filter-param-config.msg.js → pt-br/snk-filter-param-config.msg.js} +0 -0
  212. /package/dist/collection/lib/message/resources/{snk-form.msg.js → pt-br/snk-form.msg.js} +0 -0
  213. /package/dist/collection/lib/message/resources/{snk-personalized-filter.msg.js → pt-br/snk-personalized-filter.msg.js} +0 -0
  214. /package/dist/collection/lib/message/resources/{snk-print-selector.msg.js → pt-br/snk-print-selector.msg.js} +0 -0
  215. /package/dist/collection/lib/message/resources/{snk-simple-bar.msg.js → pt-br/snk-simple-bar.msg.js} +0 -0
  216. /package/dist/types/components/snk-simple-crud/{regular-buttons.d.ts → snk-simple-crud.constants.d.ts} +0 -0
  217. /package/dist/types/lib/message/resources/{snk-actions-button.msg.d.ts → en-us/snk-actions-button.msg.d.ts} +0 -0
  218. /package/dist/types/lib/message/resources/{snk-configurator.msg.d.ts → en-us/snk-configurator.msg.d.ts} +0 -0
  219. /package/dist/types/lib/message/resources/{snk-data-exporter.msg.d.ts → en-us/snk-data-exporter.msg.d.ts} +0 -0
  220. /package/dist/types/lib/message/resources/{snk-entity-list.msg.d.ts → en-us/snk-entity-list.msg.d.ts} +0 -0
  221. /package/dist/types/lib/message/resources/{snk-filter-field-search.msg.d.ts → en-us/snk-filter-field-search.msg.d.ts} +0 -0
  222. /package/dist/types/lib/message/resources/{snk-filter-param-config.msg.d.ts → en-us/snk-filter-param-config.msg.d.ts} +0 -0
  223. /package/dist/types/lib/message/resources/{snk-form.msg.d.ts → en-us/snk-form.msg.d.ts} +0 -0
  224. /package/dist/types/lib/message/resources/{snk-grid.msg.d.ts → en-us/snk-grid.msg.d.ts} +0 -0
  225. /package/dist/types/lib/message/resources/{snk-personalized-filter.msg.d.ts → en-us/snk-personalized-filter.msg.d.ts} +0 -0
  226. /package/dist/types/lib/message/resources/{snk-print-selector.msg.d.ts → en-us/snk-print-selector.msg.d.ts} +0 -0
  227. /package/dist/types/lib/message/resources/{snk-simple-bar.msg.d.ts → en-us/snk-simple-bar.msg.d.ts} +0 -0
@@ -627,6 +627,8 @@ const snkAttachCss = ".snk-attach__header.sc-snk-attach,.snk-attach__crud-sectio
627
627
 
628
628
  const RESOURCE_ID = 'AnexoSistema';
629
629
  const DATA_UNIT_NAME = 'br.com.sankhya.core.v3.anexoSistema';
630
+ const GRID_LEGACY_CONFIG_NAME = 'GrdCfgHtml5:grdcfg.dynaform.anexo';
631
+ const LINKORFILE_COLUMN_NAME = "ARQUIVOOULINK";
630
632
  const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
631
633
  constructor() {
632
634
  super();
@@ -656,6 +658,7 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
656
658
  this.back.emit();
657
659
  });
658
660
  };
661
+ this.gridLegacyConfigName = undefined;
659
662
  this.fetcherType = undefined;
660
663
  this.fetcher = undefined;
661
664
  this.dataUnit = undefined;
@@ -767,9 +770,11 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
767
770
  var _a, _b;
768
771
  this._currentDataUnit = new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
769
772
  this._currentFetcher = this.getAnexoSistemaFetcherInstance();
773
+ let gridValidateForm;
770
774
  if (!this._currentDataUnit.metadata) {
771
775
  await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
772
- this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
776
+ this.crudConfig = this.entityName ? { form: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.form } : Object.assign({}, anexoSistemaCrudConfig);
777
+ gridValidateForm = { grid: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.grid };
773
778
  }
774
779
  this.initDataUnitLoaders();
775
780
  this._currentDataUnit.addFilterProvider({
@@ -779,19 +784,21 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
779
784
  interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
780
785
  });
781
786
  await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
782
- this.disableEditFieldsNotInForm();
787
+ this.disableEditFieldsNotInForm(gridValidateForm);
783
788
  }
784
789
  async loadAttach() {
785
790
  var _a, _b;
786
791
  this._currentFetcher = new AttachFetcher();
787
792
  this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
788
793
  this._currentDataUnit.pageSize = 150;
794
+ let gridValidateForm;
789
795
  this.initDataUnitLoaders();
790
796
  this._currentDataUnit.addInterceptor({
791
797
  interceptAction: (action) => {
792
798
  var _a;
793
799
  if (action.type === Action.METADATA_LOADED) {
794
- this.crudConfig = Object.assign({}, attachCrudConfig);
800
+ this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
801
+ gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
795
802
  (_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.updateConfig();
796
803
  }
797
804
  return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
@@ -799,9 +806,10 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
799
806
  });
800
807
  if (!this._currentDataUnit.metadata) {
801
808
  await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
802
- this.crudConfig = Object.assign({}, attachCrudConfig);
809
+ this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
810
+ gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
803
811
  await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData(undefined, undefined, true, this.registerKey));
804
- this.disableEditFieldsNotInForm();
812
+ this.disableEditFieldsNotInForm(gridValidateForm);
805
813
  }
806
814
  }
807
815
  initDataUnitLoaders() {
@@ -820,12 +828,16 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
820
828
  });
821
829
  }
822
830
  }
823
- disableEditFieldsNotInForm() {
824
- var _a;
825
- (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid.columns.forEach(column => {
826
- var _a;
831
+ disableEditFieldsNotInForm(gridValidateForm) {
832
+ var _a, _b, _c, _d, _e;
833
+ const gridColumns = ((_b = (_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.gridConfig) === null || _b === void 0 ? void 0 : _b.columns) || ((_c = gridValidateForm === null || gridValidateForm === void 0 ? void 0 : gridValidateForm.grid) === null || _c === void 0 ? void 0 : _c.columns) || ((_e = (_d = this.crudConfig) === null || _d === void 0 ? void 0 : _d.grid) === null || _e === void 0 ? void 0 : _e.columns);
834
+ if (!!this.getGridLegacyConfigName()) {
835
+ this._currentDataUnit.disableField(LINKORFILE_COLUMN_NAME);
836
+ }
837
+ gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach(column => {
838
+ var _a, _b;
827
839
  const fieldName = column.name;
828
- if (!((_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form.fields.some(field => field.name === fieldName))) {
840
+ if (!((_b = (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.fields.some(field => (field === null || field === void 0 ? void 0 : field.name) === fieldName))) {
829
841
  this._currentDataUnit.disableField(fieldName);
830
842
  }
831
843
  });
@@ -875,17 +887,23 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
875
887
  await this._currentDataUnit.loadMetadata();
876
888
  }
877
889
  ;
890
+ getGridLegacyConfigName() {
891
+ if (this.gridLegacyConfigName)
892
+ return this.gridLegacyConfigName;
893
+ return this.entityName ? GRID_LEGACY_CONFIG_NAME + "." + this.entityName : this.entityName;
894
+ }
878
895
  render() {
879
896
  var _a, _b;
880
897
  if (!this._currentDataUnit)
881
898
  return null;
882
- return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
899
+ return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true, configName: this.entityName, ignoreReadOnlyFormFields: this.entityName ? true : false, gridLegacyConfigName: this.getGridLegacyConfigName() }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
883
900
  }
884
901
  static get watchers() { return {
885
902
  "registerKey": ["registerKeyWatcher"]
886
903
  }; }
887
904
  static get style() { return snkAttachCss; }
888
905
  }, [2, "snk-attach", {
906
+ "gridLegacyConfigName": [1, "grid-legacy-config-name"],
889
907
  "fetcherType": [1, "fetcher-type"],
890
908
  "fetcher": [16],
891
909
  "dataUnit": [16],
@@ -83,23 +83,10 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
83
83
  this._orderListItems = newSortableList;
84
84
  }
85
85
  createColumnList() {
86
- let visibleGroup = {
87
- group: this.getMessage('snkGridConfig.group.visible'),
88
- items: [],
89
- };
90
- let hiddenGroup = {
91
- group: this.getMessage('snkGridConfig.group.hidden'),
92
- items: [],
93
- sort: ORDER_VALUES.asc.value,
94
- };
95
- this.columns.forEach((column) => {
96
- var _a;
97
- let item = {
98
- label: column.label,
99
- selected: false,
100
- sort: (_a = column === null || column === void 0 ? void 0 : column.sort) !== null && _a !== void 0 ? _a : ORDER_VALUES.asc.value,
101
- id: column.name,
102
- };
86
+ const visibleGroup = this.buildVisibleGroup();
87
+ const hiddenGroup = this.buildHiddenGroup();
88
+ this.columns.forEach(column => {
89
+ const item = this.buildListItemFromColumn(column);
103
90
  if (column.hidden) {
104
91
  hiddenGroup.items.push(item);
105
92
  }
@@ -112,6 +99,19 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
112
99
  this._hiddenList = hiddenGroup.items;
113
100
  this.createOrderList();
114
101
  }
102
+ buildVisibleGroup() {
103
+ return {
104
+ group: this.getMessage('snkGridConfig.group.visible'),
105
+ items: [],
106
+ };
107
+ }
108
+ buildHiddenGroup() {
109
+ return {
110
+ group: this.getMessage('snkGridConfig.group.hidden'),
111
+ items: [],
112
+ sort: ORDER_VALUES.asc.value,
113
+ };
114
+ }
115
115
  createOrderListSlotDataElementId(item) {
116
116
  return `${this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_configItem_${StringUtils.toCamelCase(item.label)}`;
117
117
  }
@@ -124,7 +124,7 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
124
124
  return (h("snk-select-box", { selectedOption: selectedOption, key: 'snk-select-box-' + this._componenteInternalKey + '-' + item, "data-element-id": dataElementId, onEzChange: (evt) => {
125
125
  evt.stopPropagation();
126
126
  this.updateOrder(evt.detail, item.label);
127
- } }));
127
+ }, preventAutoFocus: true }));
128
128
  }
129
129
  updateOrder(sortOrder, updatedItemLabel) {
130
130
  var _a;
@@ -159,25 +159,21 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
159
159
  this.closeConfig();
160
160
  return;
161
161
  }
162
- let newColumnList = [];
163
- this._columListItems.forEach((group) => {
164
- group.items.forEach((item) => {
165
- const baseColumn = this.columns.find((column) => column.label === item.label);
166
- let newColumnItem = Object.assign({}, baseColumn);
167
- if (group.group === this.getMessage('snkGridConfig.group.hidden')) {
168
- newColumnItem.hidden = true;
169
- }
170
- else {
171
- newColumnItem.hidden = false;
172
- }
173
- newColumnList.push(newColumnItem);
174
- });
175
- });
176
- this.columns = newColumnList;
162
+ this.updateColumns();
177
163
  this._dataChanged = false;
178
164
  this.closeConfig();
179
165
  this.save();
180
166
  }
167
+ updateColumns() {
168
+ this.columns = this._columListItems.flatMap((group) => group.items.map((item) => this.buildColumnFromListItem(item, group)));
169
+ }
170
+ buildColumnFromListItem(item, group) {
171
+ const baseColumn = this.columns.find((column) => column.label === item.label);
172
+ if (!baseColumn) {
173
+ throw new Error(`Column with label "${item.label}" not found.`);
174
+ }
175
+ return Object.assign(Object.assign({}, baseColumn), { hidden: group.group === this.getMessage('snkGridConfig.group.hidden') });
176
+ }
181
177
  saveGridConfigOnStorage(_newConfig) {
182
178
  ConfigStorage.saveGridConfig(_newConfig, this.configName, this.resourceID)
183
179
  .then((savedConfig) => {
@@ -347,13 +343,55 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
347
343
  },
348
344
  };
349
345
  }
346
+ renderResetConfigBtn() {
347
+ if (!this.resourceID)
348
+ return;
349
+ return h("ez-button", { class: "padding-right--medium", label: this.getMessage('snkGridConfig.reset'), onClick: () => this.setDefaultConfig() });
350
+ }
351
+ async setDefaultConfig() {
352
+ var _a;
353
+ if (!this.resourceID)
354
+ return;
355
+ this._dataChanged = true;
356
+ const config = await ConfigStorage.getDefaultGridConfig(this.resourceID);
357
+ const defaultVisibleCols = (_a = config === null || config === void 0 ? void 0 : config.columns.map(col => col.name)) !== null && _a !== void 0 ? _a : [];
358
+ const visibleGroup = this.buildVisibleGroup();
359
+ const hiddenGroup = this.buildHiddenGroup();
360
+ const visibleItemsMap = new Map();
361
+ this.columns.forEach(column => {
362
+ const item = this.buildListItemFromColumn(column);
363
+ if (defaultVisibleCols.includes(column.name)) {
364
+ visibleItemsMap.set(column.name, item);
365
+ }
366
+ else {
367
+ hiddenGroup.items.push(item);
368
+ }
369
+ });
370
+ visibleGroup.items = defaultVisibleCols
371
+ .map(name => visibleItemsMap.get(name))
372
+ .filter(item => item);
373
+ this._columListItems = [visibleGroup, hiddenGroup];
374
+ this._visibleList = visibleGroup.items;
375
+ this._hiddenList = hiddenGroup.items;
376
+ this.updateColumns();
377
+ this.createOrderList();
378
+ }
379
+ buildListItemFromColumn(column) {
380
+ var _a;
381
+ return {
382
+ label: column.label,
383
+ selected: false,
384
+ sort: (_a = column === null || column === void 0 ? void 0 : column.sort) !== null && _a !== void 0 ? _a : ORDER_VALUES.asc.value,
385
+ id: column.name,
386
+ };
387
+ }
350
388
  render() {
351
- return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "ez-margin-bottom--medium" }, h("label", { class: "title" }, this.getMessage('snkGridConfig.gridConfiguration')), h("label", { class: "subtitle" }, this.getMessage('snkGridConfig.columnVisibilityOrder'))), h("div", { class: "button-close" }, h("ez-button", { mode: "icon", iconName: "close", size: "medium", class: "ez-button--tertiary", onClick: () => this.closeConfig() })))), h("div", { class: "grid-config__body" }, h("ez-collapsible-box", { id: 'group-select-columns', label: this.getMessage('snkGridConfig.columnsSelection'), "header-size": "medium", key: 'key_group-select-columns', value: this._collapsibleBoxListSelect, onEzChange: ({ detail }) => this._collapsibleBoxListOrder = !detail }, h("div", { class: "grid-config__main" }, h("ez-double-list", { leftList: this._hiddenList, leftTitle: this.getMessage('snkGridConfig.availableColumns'), rightList: this._visibleList, rightTitle: this.getMessage('snkGridConfig.selectedColumns'), onEzRightListChanged: ({ detail }) => this.handleRightListChange(detail), emptyMessage: {
389
+ return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "ez-margin-bottom--medium" }, h("label", { class: "title" }, this.getMessage('snkGridConfig.gridConfiguration')), h("label", { class: "subtitle" }, this.getMessage('snkGridConfig.columnVisibilityOrder'))), h("div", { class: "button-close" }, h("ez-button", { mode: "icon", iconName: "close", size: "medium", class: "ez-button--tertiary", onClick: () => this.closeConfig() })))), h("div", { class: 'grid-config__body' }, h("ez-collapsible-box", { id: 'group-select-columns', label: this.getMessage('snkGridConfig.columnsSelection'), "header-size": "medium", key: 'key_group-select-columns', value: this._collapsibleBoxListSelect, onEzChange: ({ detail }) => this._collapsibleBoxListOrder = !detail }, h("div", { class: "grid-config__main" }, h("ez-double-list", { leftList: this._hiddenList, leftTitle: this.getMessage('snkGridConfig.availableColumns'), rightList: this._visibleList, rightTitle: this.getMessage('snkGridConfig.selectedColumns'), onEzRightListChanged: ({ detail }) => this.handleRightListChange(detail), emptyMessage: {
352
390
  LEFT_LIST: this.getMessage('snkGridConfig.emptyMensage.left'),
353
391
  RIGHT_LIST: this.getMessage('snkGridConfig.emptyMensage.right'),
354
392
  }, entityLabel: 'coluna', entityLabelPlural: 'colunas' }))), h("ez-collapsible-box", { id: 'ID_group-order-columns', label: this.getMessage('snkGridConfig.dataOrdering'), "header-size": "medium", key: 'KEY_group-order-columns', value: this._collapsibleBoxListOrder, onEzChange: ({ detail }) => this._collapsibleBoxListSelect = !detail }, h("div", { class: "grid-config__main" }, h("ez-double-list", { rightList: this._orderListItems, rightTitle: this.getMessage('snkGridConfig.selectedColumns'), useOnlyRightList: true, slotsListBuilder: this.getListSlots(), emptyMessage: {
355
393
  RIGHT_LIST: this.getMessage('snkGridConfig.emptyMensage.right'),
356
- }, entityLabel: 'coluna', entityLabelPlural: 'colunas' })))), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: this.getMessage('snkGridConfig.cancel'), onClick: () => this.closeConfig() }), h("ez-button", { label: this.getMessage('snkGridConfig.complete'), class: "ez-button--primary", onClick: () => this.finish() }))));
394
+ }, entityLabel: 'coluna', entityLabelPlural: 'colunas' })))), h("div", { class: "grid-config__footer" }, this.renderResetConfigBtn(), h("ez-button", { class: "padding-right--medium", label: this.getMessage('snkGridConfig.cancel'), onClick: () => this.closeConfig() }), h("ez-button", { label: this.getMessage('snkGridConfig.complete'), class: "ez-button--primary", onClick: () => this.finish() }))));
357
395
  }
358
396
  static get assetsDirs() { return ["../assets"]; }
359
397
  get _element() { return this; }
@@ -10,16 +10,18 @@ const SelectBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
10
10
  this.__attachShadow();
11
11
  this.ezChange = createEvent(this, "ezChange", 7);
12
12
  this.selectedOption = ORDER_VALUES.none;
13
+ this.preventAutoFocus = false;
13
14
  }
14
15
  render() {
15
- return (h("ez-combo-box", { class: "grid-config-combo ez-input--inverted", label: "", suppressSearch: true, value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, Object.keys(ORDER_VALUES).map((key) => {
16
+ return (h("ez-combo-box", { class: "grid-config-combo ez-input--inverted", label: "", suppressSearch: true, value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true, preventAutoFocus: this.preventAutoFocus }, Object.keys(ORDER_VALUES).map((key) => {
16
17
  return h("option", { value: ORDER_VALUES[key].value }, ORDER_VALUES[key].label);
17
18
  })));
18
19
  }
19
20
  static get assetsDirs() { return ["../assets"]; }
20
21
  static get style() { return snkSelectBoxCss; }
21
22
  }, [1, "snk-select-box", {
22
- "selectedOption": [1, "selected-option"]
23
+ "selectedOption": [1, "selected-option"],
24
+ "preventAutoFocus": [4, "prevent-auto-focus"]
23
25
  }]);
24
26
  function defineCustomElement() {
25
27
  if (typeof customElements === "undefined") {
@@ -110,15 +110,15 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
110
110
  newCustomRenders.set(fieldName, customRender);
111
111
  this._customRenders = newCustomRenders;
112
112
  }
113
- handleResourceIDChanged(newValue, oldValue) {
113
+ async handleResourceIDChanged(newValue, oldValue) {
114
114
  if (StringUtils.isEmpty(newValue)) {
115
115
  return;
116
116
  }
117
117
  if (newValue === oldValue) {
118
118
  return;
119
119
  }
120
- this.loadFormConfig(true);
121
- this.loadGridConfig(true);
120
+ await this.loadFormConfig(true);
121
+ await this.loadGridConfig(true);
122
122
  }
123
123
  /**
124
124
  * Registra um formatador de valores para uma coluna da grid.
@@ -174,7 +174,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
174
174
  .concat(extraButtons));
175
175
  }
176
176
  addConfigButton(buttons) {
177
- if (this.configName === undefined) {
177
+ if (this.configName === undefined || (this.configName && this.gridLegacyConfigName)) {
178
178
  return buttons;
179
179
  }
180
180
  return buttons.concat(TaskbarElement.CONFIGURATOR);
@@ -285,7 +285,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
285
285
  if (!this._formConfigAlreadyLoaded) {
286
286
  return;
287
287
  }
288
- this.loadFormConfig(true);
288
+ await this.loadFormConfig(true);
289
289
  }
290
290
  openConfig(viewMode) {
291
291
  this._snkConfigurator.close();
@@ -370,8 +370,8 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
370
370
  return;
371
371
  }
372
372
  await this.addGridLegacyConfigName();
373
- this.loadGridConfig();
374
- this.loadFormConfig();
373
+ await this.loadGridConfig();
374
+ await this.loadFormConfig();
375
375
  }
376
376
  componentDidRender() {
377
377
  this._rmPrecisionCustomValueFormatter.setGrid(this._grid);
@@ -1,13 +1,20 @@
1
1
  import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-e623539b.js';
2
+ import { D as DataFetcher, d as dist } from './DataFetcher-db08cad0.js';
2
3
  import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
3
4
  import { ObjectUtils } from '@sankhyalabs/core';
4
- import { d as dist, D as DataFetcher } from './DataFetcher-db08cad0.js';
5
5
 
6
6
  class GridConfigFetcher extends ResourceFetcher {
7
7
  constructor() {
8
8
  super(...arguments);
9
9
  this.GRID_CONFIG_VERSION = "V3:";
10
10
  }
11
+ async getDefaultConfig(resourceId) {
12
+ var _a, _b;
13
+ const payload = { 'requestBody': { 'gridConfig': { 'configName': `GrdCfgHtml5:${resourceId}` } } };
14
+ const response = await DataFetcher.get().callServiceBroker('GridConfig.restoreGridConfigFromJson', JSON.stringify(payload));
15
+ const columns = (_b = (_a = response === null || response === void 0 ? void 0 : response.gridConfig) === null || _a === void 0 ? void 0 : _a.field) !== null && _b !== void 0 ? _b : [];
16
+ return { columns };
17
+ }
11
18
  getConfig(gridName, resourceID) {
12
19
  const completePath = this.getPath(resourceID, gridName);
13
20
  return new Promise((resolve, reject) => {
@@ -439,6 +446,9 @@ class ConfigStorage {
439
446
  static async saveCardState(config, name, resourceID) {
440
447
  return this.formConfigFetcher.saveCardState(config, name, resourceID);
441
448
  }
449
+ static async getDefaultGridConfig(resourceId) {
450
+ return await this.gridConfigFetcher.getDefaultConfig(resourceId);
451
+ }
442
452
  static async saveGridConfig(config, name, resourceID) {
443
453
  if (config == undefined) {
444
454
  return;
@@ -1,4 +1,4 @@
1
- import { C as ConfigStorage } from './ConfigStorage-89154c4e.js';
1
+ import { C as ConfigStorage } from './ConfigStorage-cf578768.js';
2
2
  import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
3
3
  import { F as FormConfigFetcher } from './form-config-fetcher-e623539b.js';
4
4
  import { a as TAB_NAMES } from './constants-7b422de0.js';