@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-65214.0 → 0.0.0-bugfix-dev-kb-67792.0

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 (235) hide show
  1. package/dist/cjs/{ConfigStorage-e49214c6.js → ConfigStorage-0a690675.js} +0 -1
  2. package/dist/cjs/{SnkFormConfigManager-beebf47a.js → SnkFormConfigManager-d6d5db6d.js} +7 -8
  3. package/dist/cjs/{SnkMessageBuilder-cceebbae.js → SnkMessageBuilder-96b0f549.js} +13 -9
  4. package/dist/cjs/{IExporterProvider-10b7fed5.js → SnkMultiSelectionListDataSource-f79d220c.js} +4 -94
  5. package/dist/cjs/{index-1dfc7a6e.js → index-0922807b.js} +0 -5
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{dataunit-fetcher-d4873076.js → pesquisa-fetcher-cba1b3d0.js} +180 -87
  8. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  9. package/dist/cjs/snk-actions-button_4.cjs.entry.js +3 -5
  10. package/dist/cjs/snk-application.cjs.entry.js +12 -35
  11. package/dist/cjs/snk-attach.cjs.entry.js +46 -71
  12. package/dist/cjs/snk-crud.cjs.entry.js +10 -101
  13. package/dist/cjs/snk-data-exporter.cjs.entry.js +85 -315
  14. package/dist/cjs/snk-data-unit-559ac55c.js +462 -0
  15. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -12
  16. package/dist/cjs/snk-detail-view.cjs.entry.js +10 -50
  17. package/dist/cjs/snk-filter-bar.cjs.entry.js +12 -7
  18. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
  19. package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
  20. package/dist/cjs/snk-form-view.cjs.entry.js +0 -67
  21. package/dist/cjs/snk-form.cjs.entry.js +7 -52
  22. package/dist/cjs/snk-grid.cjs.entry.js +110 -167
  23. package/dist/cjs/{snk-guides-viewer-aafc3073.js → snk-guides-viewer-bfcad2d6.js} +10 -43
  24. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -9
  25. package/dist/cjs/snk-personalized-filter.cjs.entry.js +1 -1
  26. package/dist/cjs/snk-simple-crud.cjs.entry.js +40 -268
  27. package/dist/cjs/snk-taskbar.cjs.entry.js +3 -4
  28. package/dist/cjs/{taskbar-elements-9ad1f9c0.js → taskbar-elements-3ecd1278.js} +3 -3
  29. package/dist/collection/collection-manifest.json +1 -1
  30. package/dist/collection/components/snk-application/snk-application.js +11 -35
  31. package/dist/collection/components/snk-attach/snk-attach.js +44 -67
  32. package/dist/collection/components/snk-crud/snk-crud.js +7 -305
  33. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -136
  34. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +0 -161
  35. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +7 -134
  36. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -54
  37. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +52 -59
  38. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +0 -62
  39. package/dist/collection/components/snk-data-unit/snk-data-unit.js +219 -540
  40. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +11 -23
  41. package/dist/collection/components/snk-form/snk-form.js +5 -102
  42. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -7
  43. package/dist/collection/components/snk-form-config/snk-form-config.js +1 -1
  44. package/dist/collection/components/snk-grid/snk-grid.css +0 -2
  45. package/dist/collection/components/snk-grid/snk-grid.js +102 -241
  46. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +20 -406
  47. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +2 -2
  48. package/dist/collection/components/snk-taskbar/snk-taskbar.js +1 -2
  49. package/dist/collection/lib/@types/index.js +0 -5
  50. package/dist/collection/lib/configs/ConfigStorage.js +0 -1
  51. package/dist/collection/lib/dataUnit/InMemoryLoader.js +3 -7
  52. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +0 -3
  53. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +0 -4
  54. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +13 -11
  55. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +0 -1
  56. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +4 -53
  57. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +34 -0
  58. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -4
  59. package/dist/collection/lib/message/SnkMessageBuilder.js +12 -5
  60. package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +0 -2
  61. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -2
  62. package/dist/components/ConfigStorage.js +0 -1
  63. package/dist/components/SnkFormConfigManager.js +6 -7
  64. package/dist/components/SnkMessageBuilder.js +13 -9
  65. package/dist/components/dataunit-fetcher.js +182 -84
  66. package/dist/components/{IExporterProvider.js → field-search.js} +6 -93
  67. package/dist/components/index2.js +33 -198
  68. package/dist/components/index3.js +199 -0
  69. package/dist/components/snk-actions-button2.js +11 -4
  70. package/dist/components/snk-application2.js +9 -31
  71. package/dist/components/snk-attach2.js +41 -65
  72. package/dist/components/snk-crud.js +11 -110
  73. package/dist/components/snk-data-exporter2.js +85 -309
  74. package/dist/components/snk-data-unit2.js +217 -487
  75. package/dist/components/snk-detail-view2.js +14 -96
  76. package/dist/components/snk-expression-item2.js +1 -1
  77. package/dist/components/snk-filter-bar2.js +11 -7
  78. package/dist/components/snk-form-config2.js +1 -1
  79. package/dist/components/snk-form-view2.js +1 -72
  80. package/dist/components/snk-form.js +6 -53
  81. package/dist/components/snk-grid2.js +108 -170
  82. package/dist/components/snk-personalized-filter2.js +1 -1
  83. package/dist/components/snk-simple-crud2.js +25 -263
  84. package/dist/components/snk-taskbar2.js +5 -6
  85. package/dist/esm/{ConfigStorage-e476378d.js → ConfigStorage-8c2ddac8.js} +0 -1
  86. package/dist/esm/{SnkFormConfigManager-298cd647.js → SnkFormConfigManager-c01b9d9d.js} +7 -8
  87. package/dist/esm/{SnkMessageBuilder-ae87b754.js → SnkMessageBuilder-72423074.js} +13 -9
  88. package/dist/esm/{IExporterProvider-d597f27d.js → SnkMultiSelectionListDataSource-a4805051.js} +5 -93
  89. package/dist/esm/{index-3aa4977a.js → index-0ece87a6.js} +1 -6
  90. package/dist/esm/loader.js +1 -1
  91. package/dist/esm/{dataunit-fetcher-3d2ec959.js → pesquisa-fetcher-34a8b8be.js} +181 -83
  92. package/dist/esm/sankhyablocks.js +1 -1
  93. package/dist/esm/snk-actions-button_4.entry.js +3 -5
  94. package/dist/esm/snk-application.entry.js +11 -34
  95. package/dist/esm/snk-attach.entry.js +41 -66
  96. package/dist/esm/snk-crud.entry.js +10 -101
  97. package/dist/esm/snk-data-exporter.entry.js +86 -316
  98. package/dist/esm/snk-data-unit-44215df7.js +460 -0
  99. package/dist/esm/snk-data-unit.entry.js +2 -12
  100. package/dist/esm/snk-detail-view.entry.js +10 -50
  101. package/dist/esm/snk-filter-bar.entry.js +12 -7
  102. package/dist/esm/snk-filter-modal-item.entry.js +1 -1
  103. package/dist/esm/snk-form-config.entry.js +1 -1
  104. package/dist/esm/snk-form-view.entry.js +0 -67
  105. package/dist/esm/snk-form.entry.js +7 -52
  106. package/dist/esm/snk-grid.entry.js +108 -165
  107. package/dist/esm/{snk-guides-viewer-62124f3d.js → snk-guides-viewer-edeac29f.js} +10 -43
  108. package/dist/esm/snk-guides-viewer.entry.js +7 -9
  109. package/dist/esm/snk-personalized-filter.entry.js +1 -1
  110. package/dist/esm/snk-simple-crud.entry.js +28 -256
  111. package/dist/esm/snk-taskbar.entry.js +3 -4
  112. package/dist/esm/{taskbar-elements-d59867f1.js → taskbar-elements-2473c8ac.js} +3 -3
  113. package/dist/sankhyablocks/p-03dcc5ff.entry.js +1 -0
  114. package/dist/sankhyablocks/p-176c3491.entry.js +1 -0
  115. package/dist/sankhyablocks/p-37e5d563.js +65 -0
  116. package/dist/sankhyablocks/p-38289a55.js +1 -0
  117. package/dist/sankhyablocks/{p-9dfda04a.entry.js → p-41c2c191.entry.js} +1 -1
  118. package/dist/sankhyablocks/p-46e55a95.entry.js +1 -0
  119. package/dist/sankhyablocks/p-4e728357.entry.js +1 -0
  120. package/dist/sankhyablocks/p-5571bdfe.js +1 -0
  121. package/dist/sankhyablocks/p-5630574e.js +1 -0
  122. package/dist/sankhyablocks/p-5f8c0426.entry.js +1 -0
  123. package/dist/sankhyablocks/p-80c64add.entry.js +1 -0
  124. package/dist/sankhyablocks/p-86af4cc2.js +1 -0
  125. package/dist/sankhyablocks/p-8b690717.js +1 -0
  126. package/dist/sankhyablocks/{p-3287a6cc.js → p-96621231.js} +1 -1
  127. package/dist/sankhyablocks/p-a1832166.entry.js +1 -0
  128. package/dist/sankhyablocks/p-a809d944.entry.js +1 -0
  129. package/dist/sankhyablocks/p-a97226f6.entry.js +1 -0
  130. package/dist/sankhyablocks/p-add17f6a.entry.js +1 -0
  131. package/dist/sankhyablocks/{p-7e7a7473.js → p-ae4fc9a9.js} +1 -1
  132. package/dist/sankhyablocks/{p-bd008859.entry.js → p-c2ae0fab.entry.js} +1 -1
  133. package/dist/sankhyablocks/p-c5a9a5d9.entry.js +1 -0
  134. package/dist/sankhyablocks/p-c5aa7d70.entry.js +11 -0
  135. package/dist/sankhyablocks/p-cb0147ab.entry.js +1 -0
  136. package/dist/sankhyablocks/p-f0145e3b.js +1 -0
  137. package/dist/sankhyablocks/p-f03e4199.entry.js +1 -0
  138. package/dist/sankhyablocks/p-f607db63.entry.js +1 -0
  139. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  140. package/dist/types/components/snk-application/snk-application.d.ts +3 -7
  141. package/dist/types/components/snk-attach/snk-attach.d.ts +9 -11
  142. package/dist/types/components/snk-crud/snk-crud.d.ts +1 -45
  143. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +0 -23
  144. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +3 -28
  145. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +0 -24
  146. package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +4 -24
  147. package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +1 -4
  148. package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +0 -21
  149. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +3 -67
  150. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +1 -4
  151. package/dist/types/components/snk-form/snk-form.d.ts +0 -14
  152. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +2 -2
  153. package/dist/types/components/snk-grid/snk-grid.d.ts +6 -46
  154. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -62
  155. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
  156. package/dist/types/components.d.ts +4 -261
  157. package/dist/types/lib/@types/index.d.ts +0 -5
  158. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +1 -2
  159. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +1 -2
  160. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +0 -1
  161. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +0 -1
  162. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +0 -6
  163. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +3 -0
  164. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +0 -3
  165. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +1 -2
  166. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +0 -1
  167. package/package.json +1 -1
  168. package/dist/cjs/RecordIDUtils-3735135c.js +0 -43
  169. package/dist/cjs/pesquisa-fetcher-a1d0353f.js +0 -166
  170. package/dist/cjs/snk-data-unit-f0221097.js +0 -690
  171. package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js +0 -1
  172. package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js +0 -1
  173. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +0 -97
  174. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +0 -74
  175. package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +0 -1
  176. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +0 -58
  177. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +0 -55
  178. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +0 -88
  179. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +0 -20
  180. package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +0 -38
  181. package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +0 -24
  182. package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js +0 -18
  183. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +0 -35
  184. package/dist/collection/lib/dataUnit/ValueFormatter.js +0 -4
  185. package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js +0 -1
  186. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js +0 -1
  187. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js +0 -1
  188. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js +0 -22
  189. package/dist/components/ISave.js +0 -47
  190. package/dist/components/pesquisa-fetcher.js +0 -164
  191. package/dist/esm/RecordIDUtils-87d02110.js +0 -41
  192. package/dist/esm/pesquisa-fetcher-a87445a0.js +0 -164
  193. package/dist/esm/snk-data-unit-1ef94aef.js +0 -688
  194. package/dist/sankhyablocks/p-091ce761.js +0 -60
  195. package/dist/sankhyablocks/p-0c68f40f.entry.js +0 -1
  196. package/dist/sankhyablocks/p-162b9a59.entry.js +0 -11
  197. package/dist/sankhyablocks/p-1db45d26.entry.js +0 -1
  198. package/dist/sankhyablocks/p-25f1fc39.js +0 -6
  199. package/dist/sankhyablocks/p-2e9c764c.entry.js +0 -1
  200. package/dist/sankhyablocks/p-30cf616e.js +0 -1
  201. package/dist/sankhyablocks/p-421bec84.entry.js +0 -1
  202. package/dist/sankhyablocks/p-42f7b05d.entry.js +0 -1
  203. package/dist/sankhyablocks/p-51999ab5.entry.js +0 -1
  204. package/dist/sankhyablocks/p-52a6a293.entry.js +0 -1
  205. package/dist/sankhyablocks/p-5f016aed.js +0 -1
  206. package/dist/sankhyablocks/p-62f34e6f.entry.js +0 -1
  207. package/dist/sankhyablocks/p-684a2590.entry.js +0 -1
  208. package/dist/sankhyablocks/p-70001ac1.js +0 -1
  209. package/dist/sankhyablocks/p-74c665d5.entry.js +0 -1
  210. package/dist/sankhyablocks/p-76a65660.js +0 -1
  211. package/dist/sankhyablocks/p-7c4aabe2.js +0 -1
  212. package/dist/sankhyablocks/p-8c1ff936.entry.js +0 -1
  213. package/dist/sankhyablocks/p-939e15d3.entry.js +0 -1
  214. package/dist/sankhyablocks/p-9863d682.js +0 -1
  215. package/dist/sankhyablocks/p-c273d6ee.js +0 -1
  216. package/dist/sankhyablocks/p-d65d98ed.entry.js +0 -1
  217. package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
  218. package/dist/types/components/snk-crud/interfaces/PropsCustomEditor.d.ts +0 -4
  219. package/dist/types/components/snk-crud/interfaces/PropsCustomRender.d.ts +0 -4
  220. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +0 -14
  221. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +0 -12
  222. package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +0 -5
  223. package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +0 -17
  224. package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +0 -17
  225. package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +0 -77
  226. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +0 -4
  227. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
  228. package/dist/types/components/snk-data-unit/test/resources/metadataMock.d.ts +0 -3
  229. package/dist/types/components/snk-data-unit/test/resources/parentMetadataMock.d.ts +0 -3
  230. package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +0 -11
  231. package/dist/types/lib/dataUnit/ValueFormatter.d.ts +0 -2
  232. package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +0 -3
  233. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.d.ts +0 -10
  234. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.d.ts +0 -7
  235. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.d.ts +0 -20
@@ -30,7 +30,6 @@ export class SnkApplication {
30
30
  this._duPromises = new Map();
31
31
  this._requestListener = new RequestListenerLoadingBar();
32
32
  this._pendingActions = new Map;
33
- this._loadPkParameter = null;
34
33
  this._isLoadedByPk = false;
35
34
  this.messagesBuilder = undefined;
36
35
  this.configName = undefined;
@@ -88,12 +87,6 @@ export class SnkApplication {
88
87
  });
89
88
  }
90
89
  }
91
- watchPropHandler(newValue, _) {
92
- if (newValue && this._loadPkParameter) {
93
- this.loadByPK(this._loadPkParameter.pk, this._loadPkParameter.redirect);
94
- this._loadPkParameter = null;
95
- }
96
- }
97
90
  /**
98
91
  * Obtém o controlador de teclado.
99
92
  *
@@ -368,7 +361,12 @@ export class SnkApplication {
368
361
  if (!waitingDu) {
369
362
  const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, resourceID, parentDataUnit, configName);
370
363
  dataUnit.loadMetadata().then(() => {
371
- this.processResolveDataUnit(dataUnit, dataUnitName, duPromisses);
364
+ if (dataUnitName) {
365
+ this.updateDataunitCache(undefined, dataUnitName, dataUnit);
366
+ }
367
+ while (duPromisses.length > 0) {
368
+ duPromisses.pop().resolve(dataUnit);
369
+ }
372
370
  }).catch(reason => {
373
371
  while (duPromisses.length > 0) {
374
372
  duPromisses.pop().reject(reason);
@@ -377,14 +375,6 @@ export class SnkApplication {
377
375
  }
378
376
  });
379
377
  }
380
- processResolveDataUnit(dataUnit, dataUnitName, duPromisses) {
381
- if (dataUnitName) {
382
- this.updateDataunitCache(undefined, dataUnitName, dataUnit);
383
- }
384
- while (duPromisses.length > 0) {
385
- duPromisses.pop().resolve(dataUnit);
386
- }
387
- }
388
378
  /**
389
379
  * Atualiza o cache de dataunits da aplicação.
390
380
  * @param oldName - Nome do dataunit que está em cache.
@@ -800,23 +790,15 @@ export class SnkApplication {
800
790
  return;
801
791
  const resourceIDfromUrl = this.getResourceIdFromToken();
802
792
  const pkObject = UrlUtils.getPkObjectFromUrlToken(top.window.location.hash);
803
- const redirectFrom = window["redirectFrom"];
804
- if (pkObject === undefined) {
793
+ if (pkObject == undefined || resourceIDfromUrl !== this.applicationResourceID)
805
794
  return;
806
- }
807
- if (!redirectFrom || redirectFrom.split("_")[0].indexOf(resourceIDfromUrl.split("_")[0]) === -1) {
808
- if (resourceIDfromUrl !== this.applicationResourceID) {
809
- return;
810
- }
811
- }
812
795
  const pkParam = { pk: pkObject };
813
796
  this._isLoadedByPk = true;
814
797
  if (this.loadByPK) {
815
- this.loadByPK(pkParam, redirectFrom);
798
+ this.loadByPK(pkParam);
816
799
  this._currentPkParameter = pkHash;
817
800
  return;
818
801
  }
819
- this._loadPkParameter = { pk: pkParam, redirect: redirectFrom };
820
802
  this.defaultLoadByPK(pkParam, pkHash);
821
803
  }
822
804
  getResourceIdFromToken() {
@@ -1095,10 +1077,10 @@ export class SnkApplication {
1095
1077
  "type": "unknown",
1096
1078
  "mutable": false,
1097
1079
  "complexType": {
1098
- "original": "LoadByPkHandler",
1099
- "resolved": "(objPK: { pk: Record<string, any>; }, redirectFrom?: string) => void",
1080
+ "original": "(objPK :{pk: Record<string, any>}) => void",
1081
+ "resolved": "(objPK: { pk: Record<string, any>; }) => void",
1100
1082
  "references": {
1101
- "LoadByPkHandler": {
1083
+ "Record": {
1102
1084
  "location": "global"
1103
1085
  }
1104
1086
  }
@@ -2506,12 +2488,6 @@ export class SnkApplication {
2506
2488
  };
2507
2489
  }
2508
2490
  static get elementRef() { return "_element"; }
2509
- static get watchers() {
2510
- return [{
2511
- "propName": "loadByPK",
2512
- "methodName": "watchPropHandler"
2513
- }];
2514
- }
2515
2491
  }
2516
2492
  class RequestListenerLoadingBar {
2517
2493
  constructor() {
@@ -1,9 +1,9 @@
1
- import { h } from '@stencil/core';
2
- import { Action, ApplicationContext, DataUnit } from '@sankhyalabs/core';
3
- import { AnexoSistemaFetcher, AttachFetcher, DataUnitFetcher } from '../../lib';
4
- import { VIEW_MODE } from '../../lib/utils/constants';
5
- import { anexoSistemaCrudConfig, AnexoSistemaDataUnitFactory, attachCrudConfig, AttachFetcherDataUnitFactory, buildTaskBarManager, } from './structure';
6
- import InMemoryLoader from '../../lib/dataUnit/InMemoryLoader';
1
+ import { h } from "@stencil/core";
2
+ import { DataUnit, ApplicationContext, Action } from "@sankhyalabs/core";
3
+ import { AnexoSistemaFetcher, AttachFetcher, DataUnitFetcher } from "../../lib";
4
+ import { VIEW_MODE } from "../../lib/utils/constants";
5
+ import { AnexoSistemaDataUnitFactory, AttachFetcherDataUnitFactory, buildTaskBarManager, anexoSistemaCrudConfig, attachCrudConfig } from "./structure";
6
+ import InMemoryLoader from "../../lib/dataUnit/InMemoryLoader";
7
7
  const RESOURCE_ID = 'AnexoSistema';
8
8
  const DATA_UNIT_NAME = 'br.com.sankhya.core.v3.anexoSistema';
9
9
  export class SnkAttach {
@@ -40,36 +40,25 @@ export class SnkAttach {
40
40
  this._currentDataUnit = undefined;
41
41
  this.crudConfig = undefined;
42
42
  }
43
- async registerKeyWatcher(newRegisterKey, oldRegisterKey) {
44
- var _a;
45
- if (this._currentDataUnit == null) {
43
+ registerKeyWatcher(newRegisterKey, oldRegisterKey) {
44
+ var _a, _b, _c, _d, _e, _f;
45
+ if (!this._currentDataUnit) {
46
46
  this.loadAttachmentDataUnit();
47
47
  }
48
48
  if (oldRegisterKey !== newRegisterKey) {
49
- await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData());
50
- }
51
- }
52
- async initAttach() {
53
- var _a, _b, _c, _d, _e, _f;
54
- if (!this.fetcherType && !this.registerKey)
55
- return;
56
- if (!this.fetcherType) {
57
- this.fetcherType = "AnexoSistema";
58
- }
59
- this.returnToGridMode();
60
- if (this.fetcherType === "AnexoSistema") {
61
- this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
62
- (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
63
- await ((_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData());
64
- return;
65
- }
66
- if (this.fetcherType === "Attach") {
67
- const hasMoreOneItem = ((_d = this.registerKey) === null || _d === void 0 ? void 0 : _d.split("_").length) > 1;
68
- if (hasMoreOneItem)
69
- return;
49
+ this.returnToGridMode();
50
+ if (this.fetcherType === "AnexoSistema") {
51
+ this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
52
+ (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
53
+ return (_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData();
54
+ }
55
+ if (this.fetcherType === "Attach") {
56
+ const hasMoreOneItem = ((_d = this.registerKey) === null || _d === void 0 ? void 0 : _d.split("_").length) > 1;
57
+ if (hasMoreOneItem)
58
+ return;
59
+ }
60
+ return (_f = (_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadMetadata()) === null || _f === void 0 ? void 0 : _f.then(this._currentDataUnit.loadData.bind(undefined, undefined, true, this.registerKey));
70
61
  }
71
- await ((_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadMetadata());
72
- await ((_f = this._currentDataUnit) === null || _f === void 0 ? void 0 : _f.loadData(undefined, undefined, true, this.registerKey));
73
62
  }
74
63
  /**
75
64
  * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
@@ -108,14 +97,14 @@ export class SnkAttach {
108
97
  if (this._crudElement)
109
98
  this._crudElement.goToView(VIEW_MODE.GRID);
110
99
  }
111
- async loadAttachmentDataUnit() {
100
+ loadAttachmentDataUnit() {
112
101
  try {
113
102
  switch (this.fetcherType) {
114
103
  case "AnexoSistema":
115
- await this.loadAnexoSistema();
104
+ this.loadAnexoSistema();
116
105
  break;
117
106
  case "Attach":
118
- await this.loadAttach();
107
+ this.loadAttach();
119
108
  break;
120
109
  default:
121
110
  this._currentFetcher = this.fetcher;
@@ -127,29 +116,28 @@ export class SnkAttach {
127
116
  throw new Error('There was an error while creating the data unit');
128
117
  }
129
118
  }
130
- async loadAnexoSistema() {
131
- var _a, _b, _c;
132
- this._currentDataUnit = new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
119
+ loadAnexoSistema() {
120
+ var _a;
121
+ this._currentDataUnit = this._currentDataUnit || new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
133
122
  this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
134
123
  if (!this._currentDataUnit.metadata) {
135
- await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata());
136
- this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
124
+ this._currentDataUnit
125
+ .loadMetadata()
126
+ .then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
137
127
  }
138
- this.initDataUnitLoaders();
128
+ this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
139
129
  this._currentDataUnit.addFilterProvider({
140
130
  getFilter: () => this._currentDataUnitBuilder.getFilters(this.registerKey)
141
131
  });
142
132
  this._currentDataUnit.addInterceptor({
143
133
  interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
144
134
  });
145
- await ((_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData());
146
- this.disableEditFieldsNotInForm();
135
+ this._currentDataUnit.loadData().then(this.disableEditFieldsNotInForm.bind(this));
147
136
  }
148
- async loadAttach() {
149
- var _a, _b;
137
+ loadAttach() {
138
+ var _a, _b, _c;
150
139
  this._currentFetcher = new AttachFetcher();
151
140
  this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
152
- this.initDataUnitLoaders();
153
141
  this._currentDataUnit.addInterceptor({
154
142
  interceptAction: (action) => {
155
143
  var _a;
@@ -160,26 +148,16 @@ export class SnkAttach {
160
148
  return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
161
149
  }
162
150
  });
151
+ this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
152
+ (_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
153
+ this.returnToGridMode();
154
+ await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
155
+ });
163
156
  if (!this._currentDataUnit.metadata) {
164
- await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
165
- this.crudConfig = Object.assign({}, attachCrudConfig);
166
- await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData(undefined, undefined, true, this.registerKey));
167
- this.disableEditFieldsNotInForm();
168
- }
169
- }
170
- initDataUnitLoaders() {
171
- var _a, _b, _c;
172
- if (this.fetcherType === "AnexoSistema") {
173
- this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
174
- this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
175
- (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
176
- }
177
- if (this.fetcherType === "Attach") {
178
- this._currentFetcher = new AttachFetcher();
179
- this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
180
- (_c = this._currentDataUnitBuilder) === null || _c === void 0 ? void 0 : _c.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
181
- this.returnToGridMode();
182
- await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
157
+ (_c = (_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata()) === null || _c === void 0 ? void 0 : _c.then(() => {
158
+ var _a, _b;
159
+ this.crudConfig = Object.assign({}, attachCrudConfig);
160
+ (_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData(undefined, undefined, true, this.registerKey)) === null || _b === void 0 ? void 0 : _b.then(this.disableEditFieldsNotInForm.bind(this));
183
161
  });
184
162
  }
185
163
  }
@@ -193,9 +171,8 @@ export class SnkAttach {
193
171
  }
194
172
  });
195
173
  }
196
- async componentWillLoad() {
174
+ componentWillLoad() {
197
175
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
198
- await this.initAttach();
199
176
  }
200
177
  componentWillRender() {
201
178
  if (!this.fetcherType) {
@@ -13,8 +13,6 @@ export class SnkCrud {
13
13
  constructor() {
14
14
  this._keyDownHandler = async (event) => this.keyDownListener(event);
15
15
  this._viewHistory = [];
16
- this._customEditors = new Map();
17
- this._customRenders = new Map();
18
16
  this._dataUnit = undefined;
19
17
  this._dataState = undefined;
20
18
  this.attachmentRegisterKey = undefined;
@@ -37,10 +35,6 @@ export class SnkCrud {
37
35
  this.filterBarLegacyConfigName = undefined;
38
36
  this.formLegacyConfigName = undefined;
39
37
  this.disablePersonalizedFilter = undefined;
40
- this.autoLoad = undefined;
41
- this.autoFocus = true;
42
- this.domainMessagesBuilder = undefined;
43
- this.setCustomFormTitle = undefined;
44
38
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
45
39
  }
46
40
  /**
@@ -76,49 +70,6 @@ export class SnkCrud {
76
70
  async getFilterBar() {
77
71
  return await this._snkGrid.getFilterBar();
78
72
  }
79
- /**
80
- * Registra um editor customizado para campos da grade e formulário.
81
- */
82
- async addCustomEditor(fieldName, customEditor) {
83
- if (this._guidesViewer && this._snkGrid) {
84
- this._guidesViewer.addCustomEditor(fieldName, customEditor);
85
- this._snkGrid.addCustomEditor(fieldName, customEditor);
86
- return;
87
- }
88
- const newCustomEditors = new Map(this._customEditors);
89
- newCustomEditors.set(fieldName, customEditor);
90
- this._customEditors = newCustomEditors;
91
- }
92
- /**
93
- * Registra um render customizado para colunas da grid.
94
- */
95
- async addGridCustomRender(fieldName, customRender) {
96
- if (this._snkGrid) {
97
- this._snkGrid.addGridCustomRender(fieldName, customRender);
98
- return;
99
- }
100
- const newCustomRenders = new Map(this._customRenders);
101
- newCustomRenders.set(fieldName, customRender);
102
- this._customRenders = newCustomRenders;
103
- }
104
- /**
105
- * Registra um formatador de valores para uma coluna da grid.
106
- */
107
- async addCustomValueFormatter(columnName, customFormatter) {
108
- this._snkGrid.addCustomValueFormatter(columnName, customFormatter);
109
- }
110
- /**
111
- * Remove o formatador de valores de uma coluna da grid.
112
- */
113
- async removeCustomValueFormatter(columnName) {
114
- this._snkGrid.removeCustomValueFormatter(columnName);
115
- }
116
- /**
117
- * Altera/adiciona uma propriedade nos metadados do campo.
118
- */
119
- async setFieldProp(fieldName, propName, value) {
120
- await this._guidesViewer.setFieldProp(fieldName, propName, value);
121
- }
122
73
  currentViewModeWatcher(currentView) {
123
74
  this._viewHistory = [...this._viewHistory.slice(-1), currentView];
124
75
  }
@@ -149,7 +100,6 @@ export class SnkCrud {
149
100
  else if (viewMode === VIEW_MODE.FORM) {
150
101
  this._guidesViewer.setFocus();
151
102
  }
152
- this.viewModeChanged.emit(viewMode);
153
103
  }
154
104
  openConfig(viewMode) {
155
105
  this._snkConfigurator.close();
@@ -179,29 +129,6 @@ export class SnkCrud {
179
129
  const joinedPrimaryKeys = recordCriteria.map(({ value }) => value).join('_');
180
130
  return joinedPrimaryKeys;
181
131
  }
182
- setCustomRenders() {
183
- if (!this._snkGrid) {
184
- return;
185
- }
186
- for (const [fieldName, customRender] of this._customRenders) {
187
- this._snkGrid.addGridCustomRender(fieldName, customRender);
188
- this._customRenders.delete(fieldName);
189
- }
190
- }
191
- setCustomEditors() {
192
- if (!this._snkGrid || !this._guidesViewer) {
193
- return;
194
- }
195
- for (const [fieldName, customEditor] of this._customEditors) {
196
- this._guidesViewer.addCustomEditor(fieldName, customEditor);
197
- this._snkGrid.addCustomEditor(fieldName, customEditor);
198
- this._customEditors.delete(fieldName);
199
- }
200
- }
201
- componentDidRender() {
202
- this.setCustomRenders();
203
- this.setCustomEditors();
204
- }
205
132
  componentWillLoad() {
206
133
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
207
134
  let parent = this._element.parentElement;
@@ -213,7 +140,6 @@ export class SnkCrud {
213
140
  this._snkDataUnit = parent;
214
141
  this._snkDataUnit.addEventListener("insertionMode", () => this.insertionModeHandler());
215
142
  this._snkDataUnit.addEventListener("cancelEdition", () => this.cancelHandler());
216
- this._snkDataUnit.domainMessagesBuilder = this.domainMessagesBuilder;
217
143
  this._dataUnit = this._snkDataUnit.dataUnit;
218
144
  this._dataState = this._snkDataUnit.dataState;
219
145
  if (!this._dataUnit) {
@@ -225,7 +151,12 @@ export class SnkCrud {
225
151
  else {
226
152
  this.initDataUnit();
227
153
  }
228
- this._snkDataUnit.addEventListener("dataStateChange", this.handleDataStateChange.bind(this));
154
+ this._snkDataUnit.addEventListener("dataStateChange", async ({ detail: dataState }) => {
155
+ this._dataState = dataState;
156
+ if (dataState.selectedRecord !== undefined) {
157
+ this.attachmentRegisterKey = await this.getAttachmentRegisterKey();
158
+ }
159
+ });
229
160
  break;
230
161
  }
231
162
  parent = parent.parentElement;
@@ -241,26 +172,6 @@ export class SnkCrud {
241
172
  this.removeShortcuts();
242
173
  window.removeEventListener("keydown", this._keyDownHandler);
243
174
  }
244
- async handleDataStateChange(evt) {
245
- var _a;
246
- this._dataState = evt.detail;
247
- if (this._dataState.selectedRecord !== undefined) {
248
- this.attachmentRegisterKey = await this.getAttachmentRegisterKey();
249
- }
250
- const fieldsWithRmPrecision = await this._snkDataUnit.getFieldsWithRmPrecision();
251
- for (const field of fieldsWithRmPrecision || []) {
252
- if (!field) {
253
- continue;
254
- }
255
- const rmPrecision = (_a = this._dataState.rowMetadata) === null || _a === void 0 ? void 0 : _a.getProp('rm_precision', field);
256
- if (!rmPrecision && rmPrecision !== 0) {
257
- continue;
258
- }
259
- await this.setFieldProp(field, 'precision', rmPrecision);
260
- await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
261
- }
262
- ;
263
- }
264
175
  async initKeyboardManager() {
265
176
  var _a;
266
177
  const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
@@ -380,7 +291,7 @@ export class SnkCrud {
380
291
  return;
381
292
  }
382
293
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
383
- return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, getCustomTitle: this.setCustomFormTitle }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
294
+ return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
384
295
  }
385
296
  static get is() { return "snk-crud"; }
386
297
  static get encapsulation() { return "scoped"; }
@@ -701,73 +612,6 @@ export class SnkCrud {
701
612
  },
702
613
  "attribute": "disable-personalized-filter",
703
614
  "reflect": false
704
- },
705
- "autoLoad": {
706
- "type": "boolean",
707
- "mutable": false,
708
- "complexType": {
709
- "original": "boolean",
710
- "resolved": "boolean",
711
- "references": {}
712
- },
713
- "required": false,
714
- "optional": true,
715
- "docs": {
716
- "tags": [],
717
- "text": "Define se a carga dos dados ser\u00E1 feita assim que o componente for carregado."
718
- },
719
- "attribute": "auto-load",
720
- "reflect": false
721
- },
722
- "autoFocus": {
723
- "type": "boolean",
724
- "mutable": false,
725
- "complexType": {
726
- "original": "boolean",
727
- "resolved": "boolean",
728
- "references": {}
729
- },
730
- "required": false,
731
- "optional": true,
732
- "docs": {
733
- "tags": [],
734
- "text": "Define se a grid ser\u00E1 focada ao ser carregada."
735
- },
736
- "attribute": "auto-focus",
737
- "reflect": false,
738
- "defaultValue": "true"
739
- },
740
- "domainMessagesBuilder": {
741
- "type": "string",
742
- "mutable": false,
743
- "complexType": {
744
- "original": "string",
745
- "resolved": "string",
746
- "references": {}
747
- },
748
- "required": false,
749
- "optional": false,
750
- "docs": {
751
- "tags": [],
752
- "text": "Define a chave customizada para sobrescrever as mensagens (N\u00E3o pegando pela entidade)"
753
- },
754
- "attribute": "domain-messages-builder",
755
- "reflect": false
756
- },
757
- "setCustomFormTitle": {
758
- "type": "unknown",
759
- "mutable": false,
760
- "complexType": {
761
- "original": "() => string",
762
- "resolved": "() => string",
763
- "references": {}
764
- },
765
- "required": false,
766
- "optional": false,
767
- "docs": {
768
- "tags": [],
769
- "text": "Define uma fun\u00E7\u00E3o para configurar um t\u00EDtulo cusotmizado no modo formul\u00E1rio."
770
- }
771
615
  }
772
616
  };
773
617
  }
@@ -850,26 +694,6 @@ export class SnkCrud {
850
694
  }
851
695
  }
852
696
  }
853
- }, {
854
- "method": "viewModeChanged",
855
- "name": "viewModeChanged",
856
- "bubbles": true,
857
- "cancelable": true,
858
- "composed": true,
859
- "docs": {
860
- "tags": [],
861
- "text": ""
862
- },
863
- "complexType": {
864
- "original": "VIEW_MODE",
865
- "resolved": "VIEW_MODE.ATTACHMENT | VIEW_MODE.FORM | VIEW_MODE.GRID",
866
- "references": {
867
- "VIEW_MODE": {
868
- "location": "import",
869
- "path": "../../lib/utils/constants"
870
- }
871
- }
872
- }
873
697
  }];
874
698
  }
875
699
  static get methods() {
@@ -959,128 +783,6 @@ export class SnkCrud {
959
783
  "text": "Retorna o elemento da filter-bar da grade.",
960
784
  "tags": []
961
785
  }
962
- },
963
- "addCustomEditor": {
964
- "complexType": {
965
- "signature": "(fieldName: string, customEditor: ICustomEditor) => Promise<void>",
966
- "parameters": [{
967
- "tags": [],
968
- "text": ""
969
- }, {
970
- "tags": [],
971
- "text": ""
972
- }],
973
- "references": {
974
- "Promise": {
975
- "location": "global"
976
- },
977
- "ICustomEditor": {
978
- "location": "import",
979
- "path": "@sankhyalabs/ezui/dist/types/utils"
980
- }
981
- },
982
- "return": "Promise<void>"
983
- },
984
- "docs": {
985
- "text": "Registra um editor customizado para campos da grade e formul\u00E1rio.",
986
- "tags": []
987
- }
988
- },
989
- "addGridCustomRender": {
990
- "complexType": {
991
- "signature": "(fieldName: string, customRender: ICustomRender) => Promise<void>",
992
- "parameters": [{
993
- "tags": [],
994
- "text": ""
995
- }, {
996
- "tags": [],
997
- "text": ""
998
- }],
999
- "references": {
1000
- "Promise": {
1001
- "location": "global"
1002
- },
1003
- "ICustomRender": {
1004
- "location": "import",
1005
- "path": "@sankhyalabs/ezui/dist/types/utils"
1006
- }
1007
- },
1008
- "return": "Promise<void>"
1009
- },
1010
- "docs": {
1011
- "text": "Registra um render customizado para colunas da grid.",
1012
- "tags": []
1013
- }
1014
- },
1015
- "addCustomValueFormatter": {
1016
- "complexType": {
1017
- "signature": "(columnName: string, customFormatter: ICustomFormatter) => Promise<void>",
1018
- "parameters": [{
1019
- "tags": [],
1020
- "text": ""
1021
- }, {
1022
- "tags": [],
1023
- "text": ""
1024
- }],
1025
- "references": {
1026
- "Promise": {
1027
- "location": "global"
1028
- },
1029
- "ICustomFormatter": {
1030
- "location": "import",
1031
- "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/interfaces"
1032
- }
1033
- },
1034
- "return": "Promise<void>"
1035
- },
1036
- "docs": {
1037
- "text": "Registra um formatador de valores para uma coluna da grid.",
1038
- "tags": []
1039
- }
1040
- },
1041
- "removeCustomValueFormatter": {
1042
- "complexType": {
1043
- "signature": "(columnName: string) => Promise<void>",
1044
- "parameters": [{
1045
- "tags": [],
1046
- "text": ""
1047
- }],
1048
- "references": {
1049
- "Promise": {
1050
- "location": "global"
1051
- }
1052
- },
1053
- "return": "Promise<void>"
1054
- },
1055
- "docs": {
1056
- "text": "Remove o formatador de valores de uma coluna da grid.",
1057
- "tags": []
1058
- }
1059
- },
1060
- "setFieldProp": {
1061
- "complexType": {
1062
- "signature": "(fieldName: string, propName: string, value: any) => Promise<void>",
1063
- "parameters": [{
1064
- "tags": [],
1065
- "text": ""
1066
- }, {
1067
- "tags": [],
1068
- "text": ""
1069
- }, {
1070
- "tags": [],
1071
- "text": ""
1072
- }],
1073
- "references": {
1074
- "Promise": {
1075
- "location": "global"
1076
- }
1077
- },
1078
- "return": "Promise<void>"
1079
- },
1080
- "docs": {
1081
- "text": "Altera/adiciona uma propriedade nos metadados do campo.",
1082
- "tags": []
1083
- }
1084
786
  }
1085
787
  };
1086
788
  }