@sankhyalabs/sankhyablocks 8.15.3 → 8.16.0-dev.10

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 (234) hide show
  1. package/dist/cjs/{ConfigStorage-942ce74b.js → ConfigStorage-a343e418.js} +1 -0
  2. package/dist/cjs/{SnkMultiSelectionListDataSource-3c08d25c.js → IExporterProvider-597949f9.js} +94 -4
  3. package/dist/cjs/RecordIDUtils-3735135c.js +43 -0
  4. package/dist/cjs/{SnkFormConfigManager-f9dc0d28.js → SnkFormConfigManager-166cbd1f.js} +8 -7
  5. package/dist/cjs/{SnkMessageBuilder-66aa2557.js → SnkMessageBuilder-897ffd08.js} +9 -13
  6. package/dist/cjs/{pesquisa-fetcher-562d281f.js → dataunit-fetcher-688d3f05.js} +87 -180
  7. package/dist/cjs/{index-0922807b.js → index-1dfc7a6e.js} +5 -0
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/pesquisa-fetcher-680e198f.js +166 -0
  10. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  11. package/dist/cjs/snk-actions-button_4.cjs.entry.js +5 -3
  12. package/dist/cjs/snk-application.cjs.entry.js +35 -12
  13. package/dist/cjs/snk-attach.cjs.entry.js +71 -46
  14. package/dist/cjs/snk-crud.cjs.entry.js +101 -10
  15. package/dist/cjs/snk-data-exporter.cjs.entry.js +315 -85
  16. package/dist/cjs/snk-data-unit-8fa7917a.js +689 -0
  17. package/dist/cjs/snk-data-unit.cjs.entry.js +12 -2
  18. package/dist/cjs/snk-detail-view.cjs.entry.js +50 -10
  19. package/dist/cjs/snk-filter-bar.cjs.entry.js +6 -2
  20. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
  21. package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
  22. package/dist/cjs/snk-form-view.cjs.entry.js +67 -0
  23. package/dist/cjs/snk-form.cjs.entry.js +52 -7
  24. package/dist/cjs/snk-grid.cjs.entry.js +165 -108
  25. package/dist/cjs/{snk-guides-viewer-bb6087cd.js → snk-guides-viewer-9c682034.js} +43 -10
  26. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -7
  27. package/dist/cjs/snk-personalized-filter.cjs.entry.js +1 -1
  28. package/dist/cjs/snk-simple-crud.cjs.entry.js +268 -40
  29. package/dist/cjs/snk-taskbar.cjs.entry.js +4 -3
  30. package/dist/cjs/{taskbar-elements-3ecd1278.js → taskbar-elements-9ad1f9c0.js} +3 -3
  31. package/dist/collection/collection-manifest.json +1 -1
  32. package/dist/collection/components/snk-application/snk-application.js +35 -11
  33. package/dist/collection/components/snk-attach/snk-attach.js +67 -44
  34. package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js +1 -0
  35. package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js +1 -0
  36. package/dist/collection/components/snk-crud/snk-crud.js +305 -7
  37. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +136 -2
  38. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +161 -0
  39. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +134 -7
  40. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +97 -0
  41. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +74 -0
  42. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +54 -1
  43. package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +1 -0
  44. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +58 -0
  45. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +55 -0
  46. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +59 -52
  47. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +62 -0
  48. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +88 -0
  49. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +20 -0
  50. package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +38 -0
  51. package/dist/collection/components/snk-data-unit/snk-data-unit.js +538 -218
  52. package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +24 -0
  53. package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js +18 -0
  54. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +22 -1
  55. package/dist/collection/components/snk-form/snk-form.js +102 -5
  56. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +7 -6
  57. package/dist/collection/components/snk-form-config/snk-form-config.js +1 -1
  58. package/dist/collection/components/snk-grid/snk-grid.js +240 -101
  59. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +406 -20
  60. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +2 -2
  61. package/dist/collection/components/snk-taskbar/snk-taskbar.js +2 -1
  62. package/dist/collection/lib/@types/index.js +5 -0
  63. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +35 -0
  64. package/dist/collection/lib/configs/ConfigStorage.js +1 -0
  65. package/dist/collection/lib/dataUnit/InMemoryLoader.js +7 -3
  66. package/dist/collection/lib/dataUnit/ValueFormatter.js +4 -0
  67. package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js +1 -0
  68. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +3 -0
  69. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +4 -0
  70. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +11 -13
  71. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +1 -0
  72. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js +1 -0
  73. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js +1 -0
  74. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +53 -4
  75. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js +22 -0
  76. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -4
  77. package/dist/collection/lib/message/SnkMessageBuilder.js +5 -12
  78. package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -0
  79. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +2 -1
  80. package/dist/components/ConfigStorage.js +1 -0
  81. package/dist/components/{field-search.js → IExporterProvider.js} +93 -6
  82. package/dist/components/ISave.js +47 -0
  83. package/dist/components/SnkFormConfigManager.js +7 -6
  84. package/dist/components/SnkMessageBuilder.js +9 -13
  85. package/dist/components/dataunit-fetcher.js +84 -182
  86. package/dist/components/index2.js +198 -33
  87. package/dist/components/pesquisa-fetcher.js +164 -0
  88. package/dist/components/snk-actions-button2.js +4 -11
  89. package/dist/components/snk-application2.js +31 -9
  90. package/dist/components/snk-attach2.js +65 -41
  91. package/dist/components/snk-crud.js +110 -11
  92. package/dist/components/snk-data-exporter2.js +309 -85
  93. package/dist/components/snk-data-unit2.js +485 -216
  94. package/dist/components/snk-detail-view2.js +96 -14
  95. package/dist/components/snk-expression-item2.js +1 -1
  96. package/dist/components/snk-filter-bar2.js +6 -1
  97. package/dist/components/snk-form-config2.js +1 -1
  98. package/dist/components/snk-form-view2.js +72 -1
  99. package/dist/components/snk-form.js +53 -6
  100. package/dist/components/snk-grid2.js +168 -106
  101. package/dist/components/snk-personalized-filter2.js +1 -1
  102. package/dist/components/snk-simple-crud2.js +263 -25
  103. package/dist/components/snk-taskbar2.js +6 -5
  104. package/dist/esm/{ConfigStorage-86187da3.js → ConfigStorage-3806514e.js} +1 -0
  105. package/dist/esm/{SnkMultiSelectionListDataSource-6a879955.js → IExporterProvider-63a188b6.js} +93 -5
  106. package/dist/esm/RecordIDUtils-87d02110.js +41 -0
  107. package/dist/esm/{SnkFormConfigManager-f53f9f87.js → SnkFormConfigManager-31b24066.js} +8 -7
  108. package/dist/esm/{SnkMessageBuilder-0a4becdd.js → SnkMessageBuilder-571462fb.js} +9 -13
  109. package/dist/esm/{pesquisa-fetcher-c7ce8ee7.js → dataunit-fetcher-264191b2.js} +83 -181
  110. package/dist/esm/{index-0ece87a6.js → index-3aa4977a.js} +6 -1
  111. package/dist/esm/loader.js +1 -1
  112. package/dist/esm/pesquisa-fetcher-03c8f919.js +164 -0
  113. package/dist/esm/sankhyablocks.js +1 -1
  114. package/dist/esm/snk-actions-button_4.entry.js +5 -3
  115. package/dist/esm/snk-application.entry.js +34 -11
  116. package/dist/esm/snk-attach.entry.js +66 -41
  117. package/dist/esm/snk-crud.entry.js +101 -10
  118. package/dist/esm/snk-data-exporter.entry.js +316 -86
  119. package/dist/esm/snk-data-unit-f5cbe64b.js +687 -0
  120. package/dist/esm/snk-data-unit.entry.js +12 -2
  121. package/dist/esm/snk-detail-view.entry.js +50 -10
  122. package/dist/esm/snk-filter-bar.entry.js +6 -2
  123. package/dist/esm/snk-filter-modal-item.entry.js +1 -1
  124. package/dist/esm/snk-form-config.entry.js +1 -1
  125. package/dist/esm/snk-form-view.entry.js +67 -0
  126. package/dist/esm/snk-form.entry.js +52 -7
  127. package/dist/esm/snk-grid.entry.js +163 -106
  128. package/dist/esm/{snk-guides-viewer-1d95ebf2.js → snk-guides-viewer-8f6960a2.js} +43 -10
  129. package/dist/esm/snk-guides-viewer.entry.js +9 -7
  130. package/dist/esm/snk-personalized-filter.entry.js +1 -1
  131. package/dist/esm/snk-simple-crud.entry.js +256 -28
  132. package/dist/esm/snk-taskbar.entry.js +4 -3
  133. package/dist/esm/{taskbar-elements-2473c8ac.js → taskbar-elements-d59867f1.js} +3 -3
  134. package/dist/sankhyablocks/p-17def7cd.js +1 -0
  135. package/dist/sankhyablocks/p-1db45d26.entry.js +1 -0
  136. package/dist/sankhyablocks/p-28ee0972.js +1 -0
  137. package/dist/sankhyablocks/p-2a408684.js +1 -0
  138. package/dist/sankhyablocks/{p-eae7a817.entry.js → p-2c68b3ae.entry.js} +1 -1
  139. package/dist/sankhyablocks/p-30cf616e.js +1 -0
  140. package/dist/sankhyablocks/p-3a212712.js +1 -0
  141. package/dist/sankhyablocks/p-450c60e4.entry.js +1 -0
  142. package/dist/sankhyablocks/{p-a1d72395.entry.js → p-47db7e88.entry.js} +1 -1
  143. package/dist/sankhyablocks/p-4e5e1313.entry.js +1 -0
  144. package/dist/sankhyablocks/{p-aff76a53.js → p-52920496.js} +1 -1
  145. package/dist/sankhyablocks/p-62ba211a.entry.js +1 -0
  146. package/dist/sankhyablocks/p-6bb2f3e9.entry.js +1 -0
  147. package/dist/sankhyablocks/p-7505da04.entry.js +1 -0
  148. package/dist/sankhyablocks/p-7619bdb1.entry.js +11 -0
  149. package/dist/sankhyablocks/p-7a85fd49.entry.js +1 -0
  150. package/dist/sankhyablocks/{p-ae4fc9a9.js → p-7e7a7473.js} +1 -1
  151. package/dist/sankhyablocks/p-7ef9c55c.js +1 -0
  152. package/dist/sankhyablocks/p-80042dc6.entry.js +1 -0
  153. package/dist/sankhyablocks/p-8c59edd7.entry.js +1 -0
  154. package/dist/sankhyablocks/p-9606509c.entry.js +1 -0
  155. package/dist/sankhyablocks/p-9863d682.js +1 -0
  156. package/dist/sankhyablocks/p-ae93d46a.entry.js +1 -0
  157. package/dist/sankhyablocks/p-af8efd95.js +6 -0
  158. package/dist/sankhyablocks/p-d6e26ea8.entry.js +1 -0
  159. package/dist/sankhyablocks/p-f2809746.entry.js +1 -0
  160. package/dist/sankhyablocks/p-f4450320.entry.js +1 -0
  161. package/dist/sankhyablocks/p-fe79f83a.js +60 -0
  162. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  163. package/dist/types/components/snk-application/snk-application.d.ts +7 -3
  164. package/dist/types/components/snk-attach/snk-attach.d.ts +11 -9
  165. package/dist/types/components/snk-crud/interfaces/PropsCustomEditor.d.ts +4 -0
  166. package/dist/types/components/snk-crud/interfaces/PropsCustomRender.d.ts +4 -0
  167. package/dist/types/components/snk-crud/snk-crud.d.ts +45 -1
  168. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +23 -0
  169. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +28 -3
  170. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +24 -0
  171. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +14 -0
  172. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +12 -0
  173. package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +24 -4
  174. package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +5 -0
  175. package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +17 -0
  176. package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +17 -0
  177. package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +4 -1
  178. package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +21 -0
  179. package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +77 -0
  180. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +4 -0
  181. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +3 -0
  182. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +66 -2
  183. package/dist/types/components/snk-data-unit/test/resources/metadataMock.d.ts +3 -0
  184. package/dist/types/components/snk-data-unit/test/resources/parentMetadataMock.d.ts +3 -0
  185. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -0
  186. package/dist/types/components/snk-form/snk-form.d.ts +14 -0
  187. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +2 -2
  188. package/dist/types/components/snk-grid/snk-grid.d.ts +46 -6
  189. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +62 -4
  190. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
  191. package/dist/types/components.d.ts +261 -4
  192. package/dist/types/lib/@types/index.d.ts +5 -0
  193. package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +11 -0
  194. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +2 -1
  195. package/dist/types/lib/dataUnit/ValueFormatter.d.ts +2 -0
  196. package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +3 -0
  197. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +2 -1
  198. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +1 -0
  199. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -0
  200. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.d.ts +10 -0
  201. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.d.ts +7 -0
  202. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +6 -0
  203. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.d.ts +20 -0
  204. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +3 -0
  205. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +2 -1
  206. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
  207. package/package.json +1 -1
  208. package/dist/cjs/snk-data-unit-41c29713.js +0 -462
  209. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +0 -34
  210. package/dist/components/index3.js +0 -199
  211. package/dist/esm/snk-data-unit-de1d140d.js +0 -460
  212. package/dist/sankhyablocks/p-032fe52e.js +0 -1
  213. package/dist/sankhyablocks/p-03dcc5ff.entry.js +0 -1
  214. package/dist/sankhyablocks/p-0594db5a.entry.js +0 -1
  215. package/dist/sankhyablocks/p-06e13db2.js +0 -1
  216. package/dist/sankhyablocks/p-07a61550.entry.js +0 -1
  217. package/dist/sankhyablocks/p-1403a4b6.entry.js +0 -1
  218. package/dist/sankhyablocks/p-14a08904.entry.js +0 -1
  219. package/dist/sankhyablocks/p-15802c59.entry.js +0 -1
  220. package/dist/sankhyablocks/p-235dc7b1.js +0 -65
  221. package/dist/sankhyablocks/p-32556aa6.js +0 -1
  222. package/dist/sankhyablocks/p-38289a55.js +0 -1
  223. package/dist/sankhyablocks/p-3c632d48.js +0 -1
  224. package/dist/sankhyablocks/p-3f833983.entry.js +0 -1
  225. package/dist/sankhyablocks/p-52c8e589.js +0 -1
  226. package/dist/sankhyablocks/p-5e1502b6.entry.js +0 -11
  227. package/dist/sankhyablocks/p-74d349c3.entry.js +0 -1
  228. package/dist/sankhyablocks/p-93167e28.entry.js +0 -1
  229. package/dist/sankhyablocks/p-add17f6a.entry.js +0 -1
  230. package/dist/sankhyablocks/p-bd47dd16.entry.js +0 -1
  231. package/dist/sankhyablocks/p-c1f88236.entry.js +0 -1
  232. package/dist/sankhyablocks/p-ccdd5332.entry.js +0 -1
  233. package/dist/sankhyablocks/p-ee9536bc.entry.js +0 -1
  234. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +0 -3
@@ -26,6 +26,8 @@ export class SnkDetailView {
26
26
  this.branchGuide = undefined;
27
27
  this.canEdit = true;
28
28
  this.taskbarCustomContainerId = undefined;
29
+ this.customEditors = undefined;
30
+ this.customRenders = undefined;
29
31
  }
30
32
  observeDataUnit(newDataUnit, oldDataUnit) {
31
33
  newDataUnit === null || newDataUnit === void 0 ? void 0 : newDataUnit.subscribe(this.dataUnitActionHandler.bind(this));
@@ -93,10 +95,38 @@ export class SnkDetailView {
93
95
  this._snkGrid.scrollIntoView({ behavior: "smooth", block: "start" });
94
96
  }
95
97
  }
98
+ /**
99
+ * Registra um editor customizado para campos da grade e formulário.
100
+ */
101
+ async addCustomEditor(fieldName, customEditor) {
102
+ var _a;
103
+ const detailContext = this.normalizeBranchGuideId((_a = this.branchGuide) === null || _a === void 0 ? void 0 : _a.id);
104
+ this._snkGrid.addCustomEditor(fieldName, customEditor, detailContext);
105
+ this._snkFormView.addCustomEditor(fieldName, customEditor, detailContext);
106
+ }
107
+ async observerPropsCustomEditor(newValue) {
108
+ for (const fieldName in newValue) {
109
+ await this.addCustomEditor(fieldName, newValue[fieldName]);
110
+ }
111
+ }
112
+ /**
113
+ * Registra um render customizado para colunas da grid.
114
+ */
115
+ async addGridCustomRender(fieldName, customRender) {
116
+ var _a;
117
+ const detailContext = this.normalizeBranchGuideId((_a = this.branchGuide) === null || _a === void 0 ? void 0 : _a.id);
118
+ await this._snkGrid.addGridCustomRender(fieldName, customRender, detailContext);
119
+ }
96
120
  onContentCardChanged(evt) {
97
121
  SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this.formConfigManager).then(() => forceUpdate(this));
98
122
  evt.stopPropagation();
99
123
  }
124
+ async observeCustomRenders(newValue) {
125
+ for (const field in newValue) {
126
+ const customRender = newValue[field];
127
+ await this.addGridCustomRender(field, customRender);
128
+ }
129
+ }
100
130
  updateLabel() {
101
131
  const guideItemPathSize = this.guideItemPath ? this.guideItemPath.length : 0;
102
132
  if (guideItemPathSize > 0) {
@@ -128,14 +158,13 @@ export class SnkDetailView {
128
158
  return guideId.replace(SnkDetailView.REGEX_FORM_ID, "");
129
159
  }
130
160
  loadMetadata() {
131
- var _a;
132
161
  if (!this.dataUnit) {
133
162
  return;
134
163
  }
135
164
  if (!this.formConfigManager.isLoaded) {
136
165
  return;
137
166
  }
138
- const formConfig = this.formConfigManager.getConfig((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode, this.dataUnit);
167
+ const formConfig = this.formConfigManager.getConfig(this.dataUnit);
139
168
  //this._cardsState = formConfig?.cardsState;
140
169
  this._formMetadata = buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
141
170
  }
@@ -199,6 +228,10 @@ export class SnkDetailView {
199
228
  this.messagesBuilder = new SnkMessageBuilder(this.entityName);
200
229
  }
201
230
  }
231
+ async componentDidLoad() {
232
+ await this.observerPropsCustomEditor(this.customEditors);
233
+ await this.observeCustomRenders(this.customRenders);
234
+ }
202
235
  async dataUnitActionHandler(action) {
203
236
  if (action.type === Action.FIELD_INVALIDATED) {
204
237
  this.addErrorBadgeToBranchGuide();
@@ -208,6 +241,9 @@ export class SnkDetailView {
208
241
  this.branchGuide = Object.assign(Object.assign({}, this.branchGuide), { badge: 'error' });
209
242
  this.snkDetailGuidesChange.emit(new GuideBuilder(this.branchGuide, this._formMetadata, this.dataUnit));
210
243
  }
244
+ normalizeBranchGuideId(id) {
245
+ return id === null || id === void 0 ? void 0 : id.replace(/child\[(.*?)\]/g, '$1').replace(/::/g, '>');
246
+ }
211
247
  render() {
212
248
  this.updateLabel();
213
249
  //const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
@@ -469,6 +505,46 @@ export class SnkDetailView {
469
505
  },
470
506
  "attribute": "taskbar-custom-container-id",
471
507
  "reflect": false
508
+ },
509
+ "customEditors": {
510
+ "type": "unknown",
511
+ "mutable": false,
512
+ "complexType": {
513
+ "original": "PropsCustomEditor",
514
+ "resolved": "PropsCustomEditor",
515
+ "references": {
516
+ "PropsCustomEditor": {
517
+ "location": "import",
518
+ "path": "../../interfaces/PropsCustomEditor"
519
+ }
520
+ }
521
+ },
522
+ "required": false,
523
+ "optional": false,
524
+ "docs": {
525
+ "tags": [],
526
+ "text": "Registra um editor customizado para campos da grade e formul\u00E1rio."
527
+ }
528
+ },
529
+ "customRenders": {
530
+ "type": "unknown",
531
+ "mutable": false,
532
+ "complexType": {
533
+ "original": "PropsCustomRender",
534
+ "resolved": "PropsCustomRender",
535
+ "references": {
536
+ "PropsCustomRender": {
537
+ "location": "import",
538
+ "path": "../../interfaces/PropsCustomRender"
539
+ }
540
+ }
541
+ },
542
+ "required": false,
543
+ "optional": false,
544
+ "docs": {
545
+ "tags": [],
546
+ "text": "Render customizados da grade."
547
+ }
472
548
  }
473
549
  };
474
550
  }
@@ -601,6 +677,58 @@ export class SnkDetailView {
601
677
  "text": "",
602
678
  "tags": []
603
679
  }
680
+ },
681
+ "addCustomEditor": {
682
+ "complexType": {
683
+ "signature": "(fieldName: string, customEditor: ICustomEditor) => Promise<void>",
684
+ "parameters": [{
685
+ "tags": [],
686
+ "text": ""
687
+ }, {
688
+ "tags": [],
689
+ "text": ""
690
+ }],
691
+ "references": {
692
+ "Promise": {
693
+ "location": "global"
694
+ },
695
+ "ICustomEditor": {
696
+ "location": "import",
697
+ "path": "@sankhyalabs/ezui/dist/types/utils"
698
+ }
699
+ },
700
+ "return": "Promise<void>"
701
+ },
702
+ "docs": {
703
+ "text": "Registra um editor customizado para campos da grade e formul\u00E1rio.",
704
+ "tags": []
705
+ }
706
+ },
707
+ "addGridCustomRender": {
708
+ "complexType": {
709
+ "signature": "(fieldName: string, customRender: ICustomRender) => Promise<void>",
710
+ "parameters": [{
711
+ "tags": [],
712
+ "text": ""
713
+ }, {
714
+ "tags": [],
715
+ "text": ""
716
+ }],
717
+ "references": {
718
+ "Promise": {
719
+ "location": "global"
720
+ },
721
+ "ICustomRender": {
722
+ "location": "import",
723
+ "path": "@sankhyalabs/ezui/dist/types/utils"
724
+ }
725
+ },
726
+ "return": "Promise<void>"
727
+ },
728
+ "docs": {
729
+ "text": "Registra um render customizado para colunas da grid.",
730
+ "tags": []
731
+ }
604
732
  }
605
733
  };
606
734
  }
@@ -611,6 +739,12 @@ export class SnkDetailView {
611
739
  }, {
612
740
  "propName": "dataState",
613
741
  "methodName": "observerDataState"
742
+ }, {
743
+ "propName": "customEditors",
744
+ "methodName": "observerPropsCustomEditor"
745
+ }, {
746
+ "propName": "customRenders",
747
+ "methodName": "observeCustomRenders"
614
748
  }];
615
749
  }
616
750
  static get listeners() {
@@ -3,6 +3,8 @@ import { Host, h } from "@stencil/core";
3
3
  import { DataBinder } from "@sankhyalabs/ezui/dist/collection/utils/form";
4
4
  export class SnkFormView {
5
5
  constructor() {
6
+ this._customEditors = new Map();
7
+ this._fieldProps = new Map();
6
8
  this.levelPath = undefined;
7
9
  this.label = undefined;
8
10
  this.name = undefined;
@@ -16,12 +18,47 @@ export class SnkFormView {
16
18
  this.canFix = true;
17
19
  this.recordsValidator = undefined;
18
20
  this.fieldToFocus = undefined;
21
+ this.customEditors = undefined;
22
+ this.fieldsProps = undefined;
19
23
  }
20
24
  async showUp() {
21
25
  if (this._formView) {
22
26
  this._formView.showUp();
23
27
  }
24
28
  }
29
+ /**
30
+ * Registra um editor customizado para campos da grade e formulário
31
+ */
32
+ async addCustomEditor(fieldName, customEditor, detailContext) {
33
+ if (this._formView) {
34
+ this._formView.addCustomEditor(fieldName, customEditor, detailContext);
35
+ return;
36
+ }
37
+ const newCustomEditors = new Map(this._customEditors);
38
+ newCustomEditors.set(fieldName, { customEditor, detailContext });
39
+ this._customEditors = newCustomEditors;
40
+ }
41
+ observePropsCustomEditor(newValue) {
42
+ for (const fieldName in newValue) {
43
+ this.addCustomEditor(fieldName, newValue[fieldName]);
44
+ }
45
+ }
46
+ /**
47
+ * Altera/adiciona uma propriedade nos metadados do campo.
48
+ */
49
+ async setFieldProp(fieldName, propName, value) {
50
+ const props = this._fieldProps.get(fieldName) || [];
51
+ this._fieldProps.set(fieldName, [...props, { propName, value }]);
52
+ }
53
+ async observeFieldsProps(newValue) {
54
+ for (const field in newValue) {
55
+ const fieldProps = newValue[field];
56
+ const propNames = Object.keys(fieldProps);
57
+ for (const propName of propNames) {
58
+ await this.setFieldProp(field, propName, fieldProps[propName]);
59
+ }
60
+ }
61
+ }
25
62
  changeFix() {
26
63
  this.fixed = !this.fixed;
27
64
  this.emitEvent("fixed");
@@ -80,7 +117,13 @@ export class SnkFormView {
80
117
  this._dataBinder.onDisconnectedCallback();
81
118
  }
82
119
  }
120
+ componentDidLoad() {
121
+ this.observePropsCustomEditor(this.customEditors);
122
+ this.observeFieldsProps(this.fieldsProps);
123
+ }
83
124
  componentDidRender() {
125
+ this.setCustomEditors();
126
+ this.setFieldProps();
84
127
  if (this.fieldToFocus == undefined) {
85
128
  return;
86
129
  }
@@ -92,6 +135,26 @@ export class SnkFormView {
92
135
  this.snkRequestClearFieldToFocus.emit();
93
136
  });
94
137
  }
138
+ setCustomEditors() {
139
+ if (!this._formView) {
140
+ return;
141
+ }
142
+ for (const [fieldName, customEditorProps] of this._customEditors) {
143
+ this._formView.addCustomEditor(fieldName, customEditorProps.customEditor, customEditorProps.detailContext);
144
+ this._customEditors.delete(fieldName);
145
+ }
146
+ }
147
+ setFieldProps() {
148
+ if (!this._formView) {
149
+ return;
150
+ }
151
+ for (const [fieldName, propsToChange] of this._fieldProps) {
152
+ propsToChange.forEach(prop => {
153
+ this._formView.setFieldProp(fieldName, prop.propName, prop.value);
154
+ this._fieldProps.delete(fieldName);
155
+ });
156
+ }
157
+ }
95
158
  render() {
96
159
  return (h(Host, { class: "ez-box__container" }, h("div", { class: "summary-header ez-flex ez-size-width--full" }, h("div", { class: "ez-flex ez-text ez-title--primary ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9" }, this.levelPath ? h("span", { class: "level-path" }, this.levelPath + " /") : undefined, this.label), h("div", { class: "ez-flex ez-flex--justify-end ez-col--sd-3" }, this.canFix &&
97
160
  h("ez-button", { class: "ez-padding-left--medium", mode: "icon", size: "small", iconName: this.fixed ? "un-pin" : "push-pin", "data-element-id": ElementIDUtils.getInternalIDInfo("toggleFixed_ezFormCard"), onClick: () => this.changeFix(), title: this.fixed ? "Desafixar" : "Fixar" }), this.canExpand &&
@@ -361,6 +424,41 @@ export class SnkFormView {
361
424
  },
362
425
  "attribute": "field-to-focus",
363
426
  "reflect": false
427
+ },
428
+ "customEditors": {
429
+ "type": "unknown",
430
+ "mutable": false,
431
+ "complexType": {
432
+ "original": "PropsCustomEditor",
433
+ "resolved": "PropsCustomEditor",
434
+ "references": {
435
+ "PropsCustomEditor": {
436
+ "location": "import",
437
+ "path": "../interfaces/PropsCustomEditor"
438
+ }
439
+ }
440
+ },
441
+ "required": false,
442
+ "optional": false,
443
+ "docs": {
444
+ "tags": [],
445
+ "text": "Registra um editor customizado para campos da grade e formul\u00E1rio."
446
+ }
447
+ },
448
+ "fieldsProps": {
449
+ "type": "unknown",
450
+ "mutable": false,
451
+ "complexType": {
452
+ "original": "object",
453
+ "resolved": "object",
454
+ "references": {}
455
+ },
456
+ "required": false,
457
+ "optional": false,
458
+ "docs": {
459
+ "tags": [],
460
+ "text": "Lista de propriedades que ser\u00E3o alteradas/adicionadas por coluna."
461
+ }
364
462
  }
365
463
  };
366
464
  }
@@ -441,7 +539,70 @@ export class SnkFormView {
441
539
  "text": "",
442
540
  "tags": []
443
541
  }
542
+ },
543
+ "addCustomEditor": {
544
+ "complexType": {
545
+ "signature": "(fieldName: string, customEditor: ICustomEditor, detailContext?: string) => Promise<void>",
546
+ "parameters": [{
547
+ "tags": [],
548
+ "text": ""
549
+ }, {
550
+ "tags": [],
551
+ "text": ""
552
+ }, {
553
+ "tags": [],
554
+ "text": ""
555
+ }],
556
+ "references": {
557
+ "Promise": {
558
+ "location": "global"
559
+ },
560
+ "ICustomEditor": {
561
+ "location": "import",
562
+ "path": "@sankhyalabs/ezui/dist/types/utils/customEditor/interfaces/ICustomEditor"
563
+ }
564
+ },
565
+ "return": "Promise<void>"
566
+ },
567
+ "docs": {
568
+ "text": "Registra um editor customizado para campos da grade e formul\u00E1rio",
569
+ "tags": []
570
+ }
571
+ },
572
+ "setFieldProp": {
573
+ "complexType": {
574
+ "signature": "(fieldName: string, propName: string, value: any) => Promise<void>",
575
+ "parameters": [{
576
+ "tags": [],
577
+ "text": ""
578
+ }, {
579
+ "tags": [],
580
+ "text": ""
581
+ }, {
582
+ "tags": [],
583
+ "text": ""
584
+ }],
585
+ "references": {
586
+ "Promise": {
587
+ "location": "global"
588
+ }
589
+ },
590
+ "return": "Promise<void>"
591
+ },
592
+ "docs": {
593
+ "text": "Altera/adiciona uma propriedade nos metadados do campo.",
594
+ "tags": []
595
+ }
444
596
  }
445
597
  };
446
598
  }
599
+ static get watchers() {
600
+ return [{
601
+ "propName": "customEditors",
602
+ "methodName": "observePropsCustomEditor"
603
+ }, {
604
+ "propName": "fieldsProps",
605
+ "methodName": "observeFieldsProps"
606
+ }];
607
+ }
447
608
  }
@@ -27,12 +27,16 @@ export class SnkGuidesViewer {
27
27
  this.resourceID = undefined;
28
28
  this.detailTaskbarCustomContainerId = undefined;
29
29
  this.formLegacyConfigName = undefined;
30
+ this.getCustomTitle = undefined;
30
31
  this._hasToCreateFieldSearch = true;
31
32
  this._breadcrumbItems = [];
32
33
  this._guides = undefined;
33
34
  this._formEditorConfigManager = undefined;
34
35
  this._formEditorDataUnit = undefined;
35
36
  this._fieldToGetFocus = undefined;
37
+ this._customEditors = undefined;
38
+ this._customRenders = undefined;
39
+ this._fieldsProps = {};
36
40
  }
37
41
  observeDataUnit() {
38
42
  this.loadGuides(true);
@@ -63,6 +67,28 @@ export class SnkGuidesViewer {
63
67
  async findField() {
64
68
  await openFieldSearch(this._moreOptions, this._fieldSearch);
65
69
  }
70
+ /**
71
+ * Registra um editor customizado para campos da grade e formulário
72
+ */
73
+ async addCustomEditor(fieldName, customEditor) {
74
+ this._customEditors = Object.assign(Object.assign({}, this._customEditors), { [fieldName]: customEditor });
75
+ }
76
+ /**
77
+ * Registra um render customizado para colunas da grid.
78
+ */
79
+ async addGridCustomRender(fieldName, customRender) {
80
+ this._customRenders = Object.assign(Object.assign({}, this._customRenders), { [fieldName]: customRender });
81
+ }
82
+ ;
83
+ /**
84
+ * Altera/adiciona uma propriedade nos metadados do campo.
85
+ */
86
+ async setFieldProp(fieldName, propName, value) {
87
+ const newFieldsProps = {
88
+ [fieldName]: Object.assign(Object.assign({}, this._fieldsProps[fieldName]), { [propName]: value })
89
+ };
90
+ this._fieldsProps = Object.assign(Object.assign({}, this._fieldsProps), newFieldsProps);
91
+ }
66
92
  /**
67
93
  * Atribui o foco para o componente.
68
94
  */
@@ -88,7 +114,7 @@ export class SnkGuidesViewer {
88
114
  }
89
115
  onContentCardChanged(evt) {
90
116
  SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this._configManager)
91
- .then(() => this.masterFormConfig = this._configManager.getConfig(this.dataState.insertionMode, this.dataUnit));
117
+ .then(() => this.masterFormConfig = this._configManager.getConfig(this.dataUnit));
92
118
  }
93
119
  /**
94
120
  * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
@@ -211,7 +237,7 @@ export class SnkGuidesViewer {
211
237
  if (sheet == undefined) {
212
238
  return;
213
239
  }
214
- return h("snk-form-view", { levelPath: params.levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_b = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.summary) === null || _b === void 0 ? void 0 : _b.get(formName), fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); } });
240
+ return h("snk-form-view", { levelPath: params.levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_b = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.summary) === null || _b === void 0 ? void 0 : _b.get(formName), fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); }, customEditors: params.propsCustomEditor, fieldsProps: params.fieldsProps });
215
241
  })));
216
242
  }
217
243
  wrapDetail(levels, content) {
@@ -253,14 +279,14 @@ export class SnkGuidesViewer {
253
279
  else {
254
280
  detailBranch = this.selectedGuide;
255
281
  }
256
- content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId }));
282
+ content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders }));
257
283
  }
258
284
  else {
259
285
  const cardId = this.selectedGuide.id;
260
286
  const sheet = this._masterFormMetadata.getSheet(cardId);
261
287
  if (sheet) {
262
288
  const cardConfig = (_c = (_b = this.masterFormConfig) === null || _b === void 0 ? void 0 : _b.cardsState) === null || _c === void 0 ? void 0 : _c.get(cardId);
263
- content = h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: guideId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler() }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar());
289
+ content = h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: guideId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar());
264
290
  }
265
291
  }
266
292
  return content;
@@ -439,6 +465,10 @@ export class SnkGuidesViewer {
439
465
  }
440
466
  return "";
441
467
  }
468
+ getTitle() {
469
+ var _a, _b;
470
+ return (_b = (_a = this.getCustomTitle) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : this.getMessage("snkCrud.title");
471
+ }
442
472
  componentDidLoad() {
443
473
  this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
444
474
  }
@@ -452,7 +482,7 @@ export class SnkGuidesViewer {
452
482
  }
453
483
  this.loadTaskbarProcessor();
454
484
  const showGuides = this._guides && (this._guides.length > 1);
455
- return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.getMessage("snkCrud.title")), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
485
+ return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
456
486
  h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
457
487
  h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
458
488
  :
@@ -463,7 +493,9 @@ export class SnkGuidesViewer {
463
493
  dataUnit: this.dataUnit,
464
494
  recordsValidator: this.recordsValidator,
465
495
  fieldToFocus: this._fieldToGetFocus,
466
- onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this)
496
+ onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this),
497
+ propsCustomEditor: this._customEditors,
498
+ fieldsProps: this._fieldsProps
467
499
  }), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
468
500
  }
469
501
  static get is() { return "snk-guides-viewer"; }
@@ -767,6 +799,21 @@ export class SnkGuidesViewer {
767
799
  },
768
800
  "attribute": "form-legacy-config-name",
769
801
  "reflect": false
802
+ },
803
+ "getCustomTitle": {
804
+ "type": "unknown",
805
+ "mutable": false,
806
+ "complexType": {
807
+ "original": "() => string",
808
+ "resolved": "() => string",
809
+ "references": {}
810
+ },
811
+ "required": false,
812
+ "optional": false,
813
+ "docs": {
814
+ "tags": [],
815
+ "text": "Fornece uma fun\u00E7\u00E3o para obter um t\u00EDtulo customizado do formul\u00E1rio."
816
+ }
770
817
  }
771
818
  };
772
819
  }
@@ -777,7 +824,10 @@ export class SnkGuidesViewer {
777
824
  "_guides": {},
778
825
  "_formEditorConfigManager": {},
779
826
  "_formEditorDataUnit": {},
780
- "_fieldToGetFocus": {}
827
+ "_fieldToGetFocus": {},
828
+ "_customEditors": {},
829
+ "_customRenders": {},
830
+ "_fieldsProps": {}
781
831
  };
782
832
  }
783
833
  static get events() {
@@ -878,6 +928,83 @@ export class SnkGuidesViewer {
878
928
  "tags": []
879
929
  }
880
930
  },
931
+ "addCustomEditor": {
932
+ "complexType": {
933
+ "signature": "(fieldName: string, customEditor: ICustomEditor) => Promise<void>",
934
+ "parameters": [{
935
+ "tags": [],
936
+ "text": ""
937
+ }, {
938
+ "tags": [],
939
+ "text": ""
940
+ }],
941
+ "references": {
942
+ "Promise": {
943
+ "location": "global"
944
+ },
945
+ "ICustomEditor": {
946
+ "location": "import",
947
+ "path": "@sankhyalabs/ezui/dist/types/utils"
948
+ }
949
+ },
950
+ "return": "Promise<void>"
951
+ },
952
+ "docs": {
953
+ "text": "Registra um editor customizado para campos da grade e formul\u00E1rio",
954
+ "tags": []
955
+ }
956
+ },
957
+ "addGridCustomRender": {
958
+ "complexType": {
959
+ "signature": "(fieldName: string, customRender: ICustomRender) => Promise<void>",
960
+ "parameters": [{
961
+ "tags": [],
962
+ "text": ""
963
+ }, {
964
+ "tags": [],
965
+ "text": ""
966
+ }],
967
+ "references": {
968
+ "Promise": {
969
+ "location": "global"
970
+ },
971
+ "ICustomRender": {
972
+ "location": "import",
973
+ "path": "@sankhyalabs/ezui/dist/types/utils"
974
+ }
975
+ },
976
+ "return": "Promise<void>"
977
+ },
978
+ "docs": {
979
+ "text": "Registra um render customizado para colunas da grid.",
980
+ "tags": []
981
+ }
982
+ },
983
+ "setFieldProp": {
984
+ "complexType": {
985
+ "signature": "(fieldName: string, propName: string, value: any) => Promise<void>",
986
+ "parameters": [{
987
+ "tags": [],
988
+ "text": ""
989
+ }, {
990
+ "tags": [],
991
+ "text": ""
992
+ }, {
993
+ "tags": [],
994
+ "text": ""
995
+ }],
996
+ "references": {
997
+ "Promise": {
998
+ "location": "global"
999
+ }
1000
+ },
1001
+ "return": "Promise<void>"
1002
+ },
1003
+ "docs": {
1004
+ "text": "Altera/adiciona uma propriedade nos metadados do campo.",
1005
+ "tags": []
1006
+ }
1007
+ },
881
1008
  "setFocus": {
882
1009
  "complexType": {
883
1010
  "signature": "() => Promise<void>",