@sankhyalabs/sankhyablocks 10.1.0-dev.52 → 10.1.0-dev.53

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 (263) hide show
  1. package/dist/cjs/{ConfigStorage-a1fab5ca.js → ConfigStorage-4201dd3d.js} +2 -2
  2. package/dist/cjs/{DataFetcher-384d2ce8.js → DataFetcher-b3a8075d.js} +2830 -2
  3. package/dist/cjs/FormConfigHelper-c5f5473a.js +342 -0
  4. package/dist/cjs/{ISave-ecbe9336.js → ISave-4674c283.js} +1 -1
  5. package/dist/cjs/{PersonalizedFilterUtils-eccb267a.js → PersonalizedFilterUtils-263e4d24.js} +52 -5
  6. package/dist/cjs/{SnkFormConfigManager-44386305.js → SnkFormConfigManager-c3a49038.js} +2 -2
  7. package/dist/cjs/{SnkMultiSelectionListDataSource-d341dd02.js → SnkMultiSelectionListDataSource-0bc94d36.js} +4 -4
  8. package/dist/cjs/{auth-fetcher-6b134ec4.js → auth-fetcher-0ecc53ff.js} +1 -1
  9. package/dist/cjs/{dataunit-fetcher-b9822794.js → dataunit-fetcher-bcbc38c0.js} +2 -3
  10. package/dist/cjs/{filter-type.enum-2bb46d2a.js → filter-type.enum-b3b388af.js} +7 -0
  11. package/dist/cjs/{form-config-fetcher-45d1964c.js → form-config-fetcher-f80dbc3b.js} +23 -5
  12. package/dist/cjs/index-1894343a.js +24 -36
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -5
  15. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  16. package/dist/cjs/snk-actions-button_9.cjs.entry.js +5 -6
  17. package/dist/cjs/snk-application.cjs.entry.js +7 -8
  18. package/dist/cjs/snk-attach_11.cjs.entry.js +2950 -0
  19. package/dist/cjs/snk-crud.cjs.entry.js +31 -243
  20. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -6
  21. package/dist/cjs/{snk-data-unit-4b6dc396.js → snk-data-unit-3b94547d.js} +11 -11
  22. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -4
  23. package/dist/cjs/snk-detail-view.cjs.entry.js +9 -10
  24. package/dist/cjs/snk-dynaform-config-header_5.cjs.entry.js +739 -0
  25. package/dist/cjs/snk-dynaform-detail-view_2.cjs.entry.js +938 -0
  26. package/dist/cjs/snk-dynaform-field-config_2.cjs.entry.js +327 -0
  27. package/dist/cjs/snk-dynaform-guides-view-e98f7f3a.js +747 -0
  28. package/dist/cjs/snk-dynaform-guides-view.cjs.entry.js +23 -0
  29. package/dist/cjs/snk-dynaform.cjs.entry.js +675 -0
  30. package/dist/cjs/{snk-expression-group_2.cjs.entry.js → snk-expression-group_4.cjs.entry.js} +421 -18
  31. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +41 -44
  32. package/dist/cjs/snk-form_2.cjs.entry.js +4 -5
  33. package/dist/cjs/snk-grid.cjs.entry.js +7 -8
  34. package/dist/cjs/{snk-guides-viewer-8e7a503b.js → snk-guides-viewer-3054d541.js} +1 -1
  35. package/dist/cjs/snk-guides-viewer.cjs.entry.js +5 -6
  36. package/dist/cjs/snk-layout-form-config.cjs.entry.js +4 -5
  37. package/dist/cjs/snk-pesquisa.cjs.entry.js +4 -5
  38. package/dist/cjs/taskbarUtils-38748460.js +231 -0
  39. package/dist/collection/collection-manifest.json +17 -0
  40. package/dist/collection/components/snk-dynaform/interfaces/PropsCustomEditor.js +1 -0
  41. package/dist/collection/components/snk-dynaform/interfaces/PropsCustomRender.js +1 -0
  42. package/dist/collection/components/snk-dynaform/snk-dynaform.css +64 -0
  43. package/dist/collection/components/snk-dynaform/snk-dynaform.js +1657 -0
  44. package/dist/collection/components/snk-dynaform/subcomponents/CardFormResizeObserver.js +26 -0
  45. package/dist/collection/components/snk-dynaform/subcomponents/GuideBuilder.js +51 -0
  46. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.css +112 -0
  47. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.js +992 -0
  48. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.css +64 -0
  49. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.js +588 -0
  50. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.css +98 -0
  51. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.js +1167 -0
  52. package/dist/collection/components/snk-dynaform-form-config/FormConfigHelper.js +325 -0
  53. package/dist/collection/components/snk-dynaform-form-config/SnkFormConfigManager.js +212 -0
  54. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.css +17 -0
  55. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.js +236 -0
  56. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.css +41 -0
  57. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.js +170 -0
  58. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.css +22 -0
  59. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.js +408 -0
  60. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-item.css +88 -0
  61. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-item.js +209 -0
  62. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.css +167 -0
  63. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.js +655 -0
  64. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.css +42 -0
  65. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.js +171 -0
  66. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-form-config.css +66 -0
  67. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-form-config.js +557 -0
  68. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.css +80 -0
  69. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.js +326 -0
  70. package/dist/collection/components/snk-grid/snk-grid.css +4 -2
  71. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +22 -4
  72. package/dist/components/form-config-fetcher.js +22 -4
  73. package/dist/components/index.d.ts +12 -0
  74. package/dist/components/index.js +12 -0
  75. package/dist/components/snk-crud.js +1 -212
  76. package/dist/components/snk-dynaform-config-header.d.ts +11 -0
  77. package/dist/components/snk-dynaform-config-header.js +6 -0
  78. package/dist/components/snk-dynaform-config-header2.js +103 -0
  79. package/dist/components/snk-dynaform-configs-button.d.ts +11 -0
  80. package/dist/components/snk-dynaform-configs-button.js +6 -0
  81. package/dist/components/snk-dynaform-configs-button2.js +76 -0
  82. package/dist/components/snk-dynaform-detail-view.d.ts +11 -0
  83. package/dist/components/snk-dynaform-detail-view.js +6 -0
  84. package/dist/components/snk-dynaform-detail-view2.js +1835 -0
  85. package/dist/components/snk-dynaform-field-config.d.ts +11 -0
  86. package/dist/components/snk-dynaform-field-config.js +6 -0
  87. package/dist/components/snk-dynaform-field-config2.js +605 -0
  88. package/dist/components/snk-dynaform-field-item.d.ts +11 -0
  89. package/dist/components/snk-dynaform-field-item.js +6 -0
  90. package/dist/components/snk-dynaform-field-item2.js +96 -0
  91. package/dist/components/snk-dynaform-fields-layout.d.ts +11 -0
  92. package/dist/components/snk-dynaform-fields-layout.js +6 -0
  93. package/dist/components/snk-dynaform-fields-layout2.js +428 -0
  94. package/dist/components/snk-dynaform-fields-selector.d.ts +11 -0
  95. package/dist/components/snk-dynaform-fields-selector.js +6 -0
  96. package/dist/components/snk-dynaform-fields-selector2.js +104 -0
  97. package/dist/components/snk-dynaform-form-config.d.ts +11 -0
  98. package/dist/components/snk-dynaform-form-config.js +6 -0
  99. package/dist/components/snk-dynaform-form-config2.js +430 -0
  100. package/dist/components/snk-dynaform-form-view.d.ts +11 -0
  101. package/dist/components/snk-dynaform-form-view.js +6 -0
  102. package/dist/components/snk-dynaform-form-view2.js +270 -0
  103. package/dist/components/snk-dynaform-guides-configurator.d.ts +11 -0
  104. package/dist/components/snk-dynaform-guides-configurator.js +6 -0
  105. package/dist/components/snk-dynaform-guides-configurator2.js +173 -0
  106. package/dist/components/snk-dynaform-guides-view.d.ts +11 -0
  107. package/dist/components/snk-dynaform-guides-view.js +6 -0
  108. package/dist/components/snk-dynaform.d.ts +11 -0
  109. package/dist/components/snk-dynaform.js +1003 -0
  110. package/dist/components/snk-grid2.js +1 -1
  111. package/dist/components/taskbarUtils.js +224 -0
  112. package/dist/esm/{ConfigStorage-76872695.js → ConfigStorage-e834d1ea.js} +2 -2
  113. package/dist/esm/{DataFetcher-e60f8d53.js → DataFetcher-5ed0a377.js} +2830 -3
  114. package/dist/esm/FormConfigHelper-efc29480.js +328 -0
  115. package/dist/esm/{ISave-4929c071.js → ISave-5b46d691.js} +1 -1
  116. package/dist/esm/{PersonalizedFilterUtils-d2439a9a.js → PersonalizedFilterUtils-45b5803c.js} +49 -2
  117. package/dist/esm/{SnkFormConfigManager-83f6b22f.js → SnkFormConfigManager-bfd575c2.js} +2 -2
  118. package/dist/esm/{SnkMultiSelectionListDataSource-18abafb1.js → SnkMultiSelectionListDataSource-9e9166ae.js} +4 -4
  119. package/dist/esm/{auth-fetcher-1a31c1e4.js → auth-fetcher-5283045d.js} +1 -1
  120. package/dist/esm/{dataunit-fetcher-c176e002.js → dataunit-fetcher-3b1ca96e.js} +1 -2
  121. package/dist/esm/{filter-type.enum-f6a8fe23.js → filter-type.enum-62b7fe88.js} +8 -1
  122. package/dist/esm/{form-config-fetcher-b44b2727.js → form-config-fetcher-db1bf140.js} +23 -5
  123. package/dist/esm/index-04f73a26.js +24 -36
  124. package/dist/esm/loader.js +1 -1
  125. package/dist/esm/pesquisa-grid_2.entry.js +4 -5
  126. package/dist/esm/sankhyablocks.js +1 -1
  127. package/dist/esm/snk-actions-button_9.entry.js +5 -6
  128. package/dist/esm/snk-application.entry.js +6 -7
  129. package/dist/esm/snk-attach_11.entry.js +2936 -0
  130. package/dist/esm/snk-crud.entry.js +6 -218
  131. package/dist/esm/snk-data-exporter.entry.js +5 -6
  132. package/dist/esm/{snk-data-unit-d8cfa950.js → snk-data-unit-dfde62cb.js} +2 -2
  133. package/dist/esm/snk-data-unit.entry.js +3 -4
  134. package/dist/esm/snk-detail-view.entry.js +7 -8
  135. package/dist/esm/snk-dynaform-config-header_5.entry.js +731 -0
  136. package/dist/esm/snk-dynaform-detail-view_2.entry.js +933 -0
  137. package/dist/esm/snk-dynaform-field-config_2.entry.js +322 -0
  138. package/dist/esm/snk-dynaform-guides-view-1f1455d6.js +744 -0
  139. package/dist/esm/snk-dynaform-guides-view.entry.js +15 -0
  140. package/dist/esm/snk-dynaform.entry.js +671 -0
  141. package/dist/esm/{snk-expression-group_2.entry.js → snk-expression-group_4.entry.js} +405 -4
  142. package/dist/esm/snk-filter-bar_4.entry.js +5 -8
  143. package/dist/esm/snk-form_2.entry.js +4 -5
  144. package/dist/esm/snk-grid.entry.js +7 -8
  145. package/dist/esm/{snk-guides-viewer-adf39ea2.js → snk-guides-viewer-95fefcaa.js} +1 -1
  146. package/dist/esm/snk-guides-viewer.entry.js +5 -6
  147. package/dist/esm/snk-layout-form-config.entry.js +4 -5
  148. package/dist/esm/snk-pesquisa.entry.js +4 -5
  149. package/dist/esm/taskbarUtils-8501d09e.js +225 -0
  150. package/dist/sankhyablocks/p-0dbd53d9.js +1 -0
  151. package/dist/sankhyablocks/{p-f5ad0720.js → p-19d1ca14.js} +1 -1
  152. package/dist/sankhyablocks/{p-ab5e12fa.js → p-1cc4cf61.js} +1 -1
  153. package/dist/sankhyablocks/p-1edd6be6.entry.js +1 -0
  154. package/dist/sankhyablocks/p-22ddc1a5.entry.js +1 -0
  155. package/dist/sankhyablocks/p-24b059ee.entry.js +1 -0
  156. package/dist/sankhyablocks/{p-5c250661.js → p-2c00b93d.js} +1 -1
  157. package/dist/sankhyablocks/p-3623fddf.entry.js +1 -0
  158. package/dist/sankhyablocks/p-43c94ba5.entry.js +1 -0
  159. package/dist/sankhyablocks/p-449dfe55.entry.js +1 -0
  160. package/dist/sankhyablocks/p-451b5bcc.entry.js +1 -0
  161. package/dist/sankhyablocks/p-46d7e2de.js +1 -0
  162. package/dist/sankhyablocks/{p-3c990841.js → p-51e853f2.js} +1 -1
  163. package/dist/sankhyablocks/p-58709cf9.js +1 -0
  164. package/dist/sankhyablocks/p-589016e2.entry.js +1 -0
  165. package/dist/sankhyablocks/p-5d02c032.js +1 -0
  166. package/dist/sankhyablocks/p-5d50f59a.entry.js +1 -0
  167. package/dist/sankhyablocks/p-61776b68.entry.js +1 -0
  168. package/dist/sankhyablocks/p-6b8a1ec3.js +1 -0
  169. package/dist/sankhyablocks/p-7038cf62.entry.js +1 -0
  170. package/dist/sankhyablocks/{p-b1bb4cf1.js → p-70c2ee5c.js} +1 -1
  171. package/dist/sankhyablocks/p-7628e04f.entry.js +1 -0
  172. package/dist/sankhyablocks/p-7798788b.entry.js +1 -0
  173. package/dist/sankhyablocks/p-77c26de0.js +1 -0
  174. package/dist/sankhyablocks/p-7c34a0f7.entry.js +1 -0
  175. package/dist/sankhyablocks/p-a4a0d9b7.entry.js +1 -0
  176. package/dist/sankhyablocks/{p-4f7adf97.js → p-b1bf9564.js} +1 -1
  177. package/dist/sankhyablocks/p-b4c2a99c.entry.js +1 -0
  178. package/dist/sankhyablocks/p-b75af274.entry.js +1 -0
  179. package/dist/sankhyablocks/p-c538bd6c.entry.js +1 -0
  180. package/dist/sankhyablocks/{p-3704bf1b.js → p-d5810110.js} +1 -1
  181. package/dist/sankhyablocks/p-d7fd447e.entry.js +1 -0
  182. package/dist/sankhyablocks/p-d88278f8.js +28 -0
  183. package/dist/sankhyablocks/p-f076d742.js +60 -0
  184. package/dist/sankhyablocks/{p-8fe740b7.entry.js → p-f1ef090f.entry.js} +2 -2
  185. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  186. package/dist/types/components/snk-dynaform/interfaces/PropsCustomEditor.d.ts +4 -0
  187. package/dist/types/components/snk-dynaform/interfaces/PropsCustomRender.d.ts +4 -0
  188. package/dist/types/components/snk-dynaform/subcomponents/CardFormResizeObserver.d.ts +1 -0
  189. package/dist/types/components/snk-dynaform/subcomponents/GuideBuilder.d.ts +14 -0
  190. package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.d.ts +158 -0
  191. package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.d.ts +107 -0
  192. package/dist/types/components/snk-dynaform-form-config/FormConfigHelper.d.ts +36 -0
  193. package/dist/types/components/snk-dynaform-form-config/SnkFormConfigManager.d.ts +35 -0
  194. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.d.ts +23 -0
  195. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.d.ts +19 -0
  196. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.d.ts +56 -0
  197. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.d.ts +74 -0
  198. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.d.ts +21 -0
  199. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-form-config.d.ts +95 -0
  200. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.d.ts +35 -0
  201. package/dist/types/components.d.ts +2403 -1322
  202. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +1 -0
  203. package/package.json +1 -1
  204. package/react/components.d.ts +12 -0
  205. package/react/components.js +12 -0
  206. package/react/components.js.map +1 -1
  207. package/dist/cjs/SnkMessageBuilder-a9300ebe.js +0 -2833
  208. package/dist/cjs/default-filters-a09bf82b.js +0 -8
  209. package/dist/cjs/index-62760a9c.js +0 -49
  210. package/dist/cjs/index-8d94b7e0.js +0 -7
  211. package/dist/cjs/snk-attach.cjs.entry.js +0 -948
  212. package/dist/cjs/snk-default-filter.cjs.entry.js +0 -77
  213. package/dist/cjs/snk-filter-advanced-mode_3.cjs.entry.js +0 -99
  214. package/dist/cjs/snk-filter-detail.cjs.entry.js +0 -198
  215. package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +0 -408
  216. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +0 -109
  217. package/dist/cjs/snk-image-input.cjs.entry.js +0 -160
  218. package/dist/cjs/snk-personalized-filter.cjs.entry.js +0 -358
  219. package/dist/cjs/snk-simple-crud.cjs.entry.js +0 -865
  220. package/dist/esm/SnkMessageBuilder-1eb7a1af.js +0 -2831
  221. package/dist/esm/default-filters-50105e43.js +0 -8
  222. package/dist/esm/index-620ac460.js +0 -7
  223. package/dist/esm/index-8acbae97.js +0 -49
  224. package/dist/esm/snk-attach.entry.js +0 -944
  225. package/dist/esm/snk-default-filter.entry.js +0 -73
  226. package/dist/esm/snk-filter-advanced-mode_3.entry.js +0 -93
  227. package/dist/esm/snk-filter-detail.entry.js +0 -194
  228. package/dist/esm/snk-filter-field-search_2.entry.js +0 -403
  229. package/dist/esm/snk-filter-modal-item.entry.js +0 -105
  230. package/dist/esm/snk-image-input.entry.js +0 -156
  231. package/dist/esm/snk-personalized-filter.entry.js +0 -354
  232. package/dist/esm/snk-simple-crud.entry.js +0 -861
  233. package/dist/sankhyablocks/p-0a4cdcde.entry.js +0 -1
  234. package/dist/sankhyablocks/p-0afc64df.entry.js +0 -1
  235. package/dist/sankhyablocks/p-10f27dc6.entry.js +0 -1
  236. package/dist/sankhyablocks/p-20f03230.entry.js +0 -1
  237. package/dist/sankhyablocks/p-2af8aca3.js +0 -1
  238. package/dist/sankhyablocks/p-3870748a.js +0 -28
  239. package/dist/sankhyablocks/p-3d294185.entry.js +0 -1
  240. package/dist/sankhyablocks/p-438a225f.entry.js +0 -1
  241. package/dist/sankhyablocks/p-4d04bc75.entry.js +0 -1
  242. package/dist/sankhyablocks/p-554c0e54.js +0 -1
  243. package/dist/sankhyablocks/p-57c184a2.entry.js +0 -1
  244. package/dist/sankhyablocks/p-68c1a093.js +0 -1
  245. package/dist/sankhyablocks/p-6a4b21dd.js +0 -1
  246. package/dist/sankhyablocks/p-6ae7543b.entry.js +0 -1
  247. package/dist/sankhyablocks/p-6e278003.js +0 -60
  248. package/dist/sankhyablocks/p-82bcb4cf.entry.js +0 -1
  249. package/dist/sankhyablocks/p-84345e7a.js +0 -1
  250. package/dist/sankhyablocks/p-95af0bb1.entry.js +0 -1
  251. package/dist/sankhyablocks/p-a905712a.entry.js +0 -1
  252. package/dist/sankhyablocks/p-aff2d081.entry.js +0 -1
  253. package/dist/sankhyablocks/p-b0a357b4.entry.js +0 -1
  254. package/dist/sankhyablocks/p-b568c1d4.js +0 -1
  255. package/dist/sankhyablocks/p-bab4cde4.entry.js +0 -1
  256. package/dist/sankhyablocks/p-bd3c1aaa.entry.js +0 -1
  257. package/dist/sankhyablocks/p-cc64239c.entry.js +0 -1
  258. package/dist/sankhyablocks/p-cd00a3d1.entry.js +0 -1
  259. package/dist/sankhyablocks/p-d9ec8c4b.entry.js +0 -1
  260. package/dist/sankhyablocks/p-dbdbb77a.entry.js +0 -1
  261. package/dist/sankhyablocks/p-e8df1dea.entry.js +0 -1
  262. package/dist/sankhyablocks/p-ef9343c3.entry.js +0 -1
  263. package/dist/sankhyablocks/p-f4184ce7.js +0 -1
@@ -0,0 +1,1835 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, forceUpdate, Host } from '@stencil/core/internal/client';
2
+ import { ObjectUtils, StringUtils, Action, KeyboardManager, ElementIDUtils } from '@sankhyalabs/core';
3
+ import { C as ConfigStorage } from './ConfigStorage.js';
4
+ import { F as FormConfigFetcher } from './form-config-fetcher.js';
5
+ import { T as TAB_NAMES, V as VIEW_MODE } from './constants.js';
6
+ import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
7
+ import './DataFetcher.js';
8
+ import { P as PresentationMode } from './ISave.js';
9
+ import '@sankhyalabs/ezui/dist/collection/utils/constants';
10
+ import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
11
+ import './dataunit-fetcher.js';
12
+ import './filter-item-type.enum.js';
13
+ import { T as TaskbarElement, d as defineCustomElement$6 } from './snk-taskbar2.js';
14
+ import { buildFieldSearch, SHORTCUT_SEARCH_FIELD } from '@sankhyalabs/ezui/dist/collection/utils';
15
+ import { d as defineCustomElement$H } from './snk-actions-button2.js';
16
+ import { d as defineCustomElement$G } from './snk-attach2.js';
17
+ import { d as defineCustomElement$F } from './snk-configurator2.js';
18
+ import { d as defineCustomElement$E } from './snk-data-exporter2.js';
19
+ import { d as defineCustomElement$D } from './snk-data-unit2.js';
20
+ import { d as defineCustomElement$C } from './snk-default-filter2.js';
21
+ import { d as defineCustomElement$B } from './snk-dynaform-config-header2.js';
22
+ import { d as defineCustomElement$A } from './snk-dynaform-configs-button2.js';
23
+ import { S as SnkMessageBuilder } from './SnkMessageBuilder.js';
24
+ import { S as SimpleTaskbarProcessor, D as DEFAULT_TASKBAR_BUTTONS, g as getTopTaskBarId } from './taskbarUtils.js';
25
+ import { d as defineCustomElement$u } from './snk-dynaform-form-view2.js';
26
+ import { d as defineCustomElement$s } from './snk-exporter-email-sender2.js';
27
+ import { d as defineCustomElement$r } from './snk-expression-group2.js';
28
+ import { d as defineCustomElement$q } from './snk-expression-item2.js';
29
+ import { d as defineCustomElement$p } from './snk-filter-advanced-mode2.js';
30
+ import { d as defineCustomElement$o } from './snk-filter-assistent-mode2.js';
31
+ import { d as defineCustomElement$n } from './snk-filter-bar2.js';
32
+ import { d as defineCustomElement$m } from './snk-filter-detail2.js';
33
+ import { d as defineCustomElement$l } from './snk-filter-field-search2.js';
34
+ import { d as defineCustomElement$k } from './snk-filter-item2.js';
35
+ import { d as defineCustomElement$j } from './snk-filter-modal2.js';
36
+ import { d as defineCustomElement$i } from './snk-filter-modal-item2.js';
37
+ import { d as defineCustomElement$h } from './snk-filter-param-config2.js';
38
+ import { d as defineCustomElement$g } from './snk-grid2.js';
39
+ import { d as defineCustomElement$f } from './snk-grid-config2.js';
40
+ import { d as defineCustomElement$e } from './snk-image-input2.js';
41
+ import { d as defineCustomElement$d } from './snk-layout-form-config2.js';
42
+ import { d as defineCustomElement$c } from './snk-numbering-config2.js';
43
+ import { d as defineCustomElement$b } from './snk-personalized-filter2.js';
44
+ import { d as defineCustomElement$a } from './snk-select-box2.js';
45
+ import { d as defineCustomElement$9 } from './snk-simple-bar2.js';
46
+ import { d as defineCustomElement$8 } from './snk-simple-crud2.js';
47
+ import { d as defineCustomElement$7 } from './snk-simple-form-config2.js';
48
+ import { d as defineCustomElement$5 } from './snk-taskbar-skeleton2.js';
49
+ import { d as defineCustomElement$4 } from './snk-view-representation2.js';
50
+ import { d as defineCustomElement$3 } from './taskbar-actions-button2.js';
51
+ import { d as defineCustomElement$2 } from './taskbar-split-button2.js';
52
+ import { d as defineCustomElement$z } from './snk-dynaform-field-config2.js';
53
+ import { d as defineCustomElement$y } from './snk-dynaform-field-item2.js';
54
+ import { d as defineCustomElement$x } from './snk-dynaform-fields-layout2.js';
55
+ import { d as defineCustomElement$w } from './snk-dynaform-fields-selector2.js';
56
+ import { d as defineCustomElement$v } from './snk-dynaform-form-config2.js';
57
+ import { d as defineCustomElement$t } from './snk-dynaform-guides-configurator2.js';
58
+
59
+ class SnkFormConfigManager {
60
+ constructor(configName, resourceID, onConfigChange, dataUnit) {
61
+ this._resourceID = resourceID;
62
+ this._configName = configName;
63
+ this._onConfigChange = onConfigChange;
64
+ this._dataUnit = dataUnit;
65
+ }
66
+ addFormLegacyConfig(legacyConfigName) {
67
+ if (this._configName) {
68
+ ConfigStorage.addFormLegacyConfig(this._configName, legacyConfigName);
69
+ }
70
+ }
71
+ async loadConfig() {
72
+ return new Promise(resolve => {
73
+ ConfigStorage.loadFormConfig(this._configName, this._resourceID)
74
+ .then((config) => {
75
+ config = this.buildFormMetadataUITabs(config);
76
+ this.setConfig(config);
77
+ resolve(config);
78
+ })
79
+ .catch((error) => {
80
+ console.warn(error);
81
+ });
82
+ });
83
+ }
84
+ getEmptyConfig() {
85
+ return this.buildFormMetadataUITabs({ fields: [], emptyConfig: true }, true);
86
+ }
87
+ saveConfig(config) {
88
+ const configToSave = ObjectUtils.copy(config);
89
+ return new Promise(accept => {
90
+ ConfigStorage.saveFormConfig(config, this._configName, this._resourceID)
91
+ .then((response) => {
92
+ this.setConfig(Object.assign(Object.assign({}, configToSave), response));
93
+ accept(Object.assign(Object.assign({}, configToSave), response));
94
+ });
95
+ });
96
+ }
97
+ saveCardState(cardId, cardConfig, propertyChanged) {
98
+ return new Promise(resolve => {
99
+ var _a;
100
+ const cardsState = ((_a = this._config) === null || _a === void 0 ? void 0 : _a.cardsState) || new Map;
101
+ const currentConfig = cardsState.get(cardId);
102
+ cardsState.set(cardId, propertyChanged === "fixed" ?
103
+ this.updateFixSequence(Object.assign(Object.assign({}, currentConfig), { fixed: cardConfig.fixed }), cardsState)
104
+ : Object.assign(Object.assign({}, currentConfig), { [propertyChanged]: cardConfig[propertyChanged] }));
105
+ ConfigStorage.saveCardState(cardsState, this._configName, this._resourceID)
106
+ .then(savedCardConfig => {
107
+ this._config = Object.assign(Object.assign({}, this._config), { cardsState });
108
+ resolve(savedCardConfig);
109
+ });
110
+ });
111
+ }
112
+ updateFixSequence(updatingCardConfig, cardsState) {
113
+ let maxSequence = -1;
114
+ Array.from(cardsState.values()).forEach(cardConfig => {
115
+ if (!cardConfig.fixed) {
116
+ delete updatingCardConfig.fixSequence;
117
+ }
118
+ if (cardConfig.fixSequence != undefined) {
119
+ maxSequence = Math.max(maxSequence, cardConfig.fixSequence);
120
+ }
121
+ });
122
+ if (updatingCardConfig.fixed) {
123
+ updatingCardConfig.fixSequence = maxSequence + 1;
124
+ }
125
+ else {
126
+ delete updatingCardConfig.fixSequence;
127
+ }
128
+ return updatingCardConfig;
129
+ }
130
+ hasConfig(config) {
131
+ var _a;
132
+ const currentConfig = config !== null && config !== void 0 ? config : this._config;
133
+ if (currentConfig && ((_a = currentConfig.fields) === null || _a === void 0 ? void 0 : _a.length)) {
134
+ return true;
135
+ }
136
+ return false;
137
+ }
138
+ getFieldsList(descriptionFilter, forceEmptyConfig = false) {
139
+ var _a, _b;
140
+ const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
141
+ const hasConfig = this.hasConfig();
142
+ if (hasConfig && !forceEmptyConfig) {
143
+ return fields.map(({ label, name, readOnly, visible, required, tab, group }) => {
144
+ var _a;
145
+ if (label == undefined) {
146
+ const currentField = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(name);
147
+ if (!currentField)
148
+ return;
149
+ return Object.assign(Object.assign({}, currentField), { name: name !== null && name !== void 0 ? name : currentField.name, readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : currentField.readOnly, visible: visible !== null && visible !== void 0 ? visible : currentField.visible, required: required !== null && required !== void 0 ? required : currentField.required, tab: tab, group: group });
150
+ }
151
+ return { name, label, readOnly, visible, required, tab, group };
152
+ })
153
+ .filter(field => this.isFieldVisible(field, descriptionFilter));
154
+ }
155
+ if (!this._dataUnit || !((_b = this._dataUnit.metadata) === null || _b === void 0 ? void 0 : _b.fields)) {
156
+ return [];
157
+ }
158
+ const filteredFields = this._dataUnit.metadata.fields
159
+ .filter(field => this.isFieldVisible(field, descriptionFilter))
160
+ .map(({ label, name, readOnly, visible, required, properties }) => ({ label, name, readOnly, visible, required, tab: properties === null || properties === void 0 ? void 0 : properties.UITabName }));
161
+ return filteredFields;
162
+ }
163
+ isFieldVisible(field, descriptionFilter) {
164
+ if (field === undefined || field.visible === false) {
165
+ return false;
166
+ }
167
+ if (descriptionFilter == undefined) {
168
+ return true;
169
+ }
170
+ const normalizedText = StringUtils.replaceAccentuatedCharsLower((field.label || field.name).toLocaleLowerCase());
171
+ const normalizedFilter = StringUtils.replaceAccentuatedCharsLower(descriptionFilter.toLocaleLowerCase());
172
+ return normalizedText.includes(normalizedFilter);
173
+ }
174
+ getFormConfig(dataUnit, ignoreReadOnlyFormFields, forceEmptyConfig = false) {
175
+ let fields = this.getFieldsList(undefined, forceEmptyConfig);
176
+ if (ignoreReadOnlyFormFields) {
177
+ fields = fields.filter(field => {
178
+ if (dataUnit) {
179
+ const def = dataUnit.getField(field.name);
180
+ if (def && def.readOnly) {
181
+ return false;
182
+ }
183
+ }
184
+ return !field.readOnly;
185
+ });
186
+ }
187
+ return Object.assign(Object.assign({}, this._config), { fields });
188
+ }
189
+ setConfig(config) {
190
+ this.isLoaded = true;
191
+ const { cardsState, summary, defaultVars } = this._config || {};
192
+ this._config = Object.assign({}, config);
193
+ if (cardsState) {
194
+ this._config.cardsState = cardsState;
195
+ }
196
+ if (summary) {
197
+ this._config.summary = summary;
198
+ }
199
+ if (defaultVars) {
200
+ this._config.defaultVars = defaultVars;
201
+ }
202
+ if (this._onConfigChange) {
203
+ this._onConfigChange(Object.assign({}, this._config));
204
+ }
205
+ }
206
+ getConfig(dataUnit, ignoreReadOnlyFormFields) {
207
+ return this.getFormConfig(dataUnit, ignoreReadOnlyFormFields);
208
+ }
209
+ getFormConfigFetcher() {
210
+ if (this._formConfigFetcher == undefined) {
211
+ this._formConfigFetcher = new FormConfigFetcher();
212
+ }
213
+ return this._formConfigFetcher;
214
+ }
215
+ async fetchUserAvailableConfigs() {
216
+ if (this._configName != undefined) {
217
+ //FIXME: Precisamos preparar o backend para retornar as configurações disponíveis para details;
218
+ return Promise.resolve(undefined);
219
+ }
220
+ return this.getFormConfigFetcher().fetchUserAvailableConfigs(this._configName, this._resourceID);
221
+ }
222
+ async fetchLegacyConfig() {
223
+ return this.getFormConfigFetcher().fetchLegacyConfig(this._configName, this._resourceID);
224
+ }
225
+ async fetchDefaultConfig() {
226
+ return this.getFormConfigFetcher().fetchDefaultConfig(this._configName, this._resourceID);
227
+ }
228
+ parseObjectList(object) {
229
+ if (!object) {
230
+ return [];
231
+ }
232
+ return Array.isArray(object) ? object : [object];
233
+ }
234
+ buildFormMetadataUITabs(config, forceEmptyConfig = false) {
235
+ var _a, _b, _c;
236
+ const hasConfig = this.hasConfig(config);
237
+ if (!forceEmptyConfig && (!this._dataUnit || hasConfig)) {
238
+ return config;
239
+ }
240
+ config = this.getFormConfig(this._dataUnit, false, true);
241
+ config.tabs = this.parseObjectList(config.tabs);
242
+ config.emptyConfig = false;
243
+ config.defaultConfiguration = true;
244
+ const fields = (_b = (_a = this._dataUnit.metadata) === null || _a === void 0 ? void 0 : _a.fields) !== null && _b !== void 0 ? _b : [];
245
+ for (const currentField of fields) {
246
+ const field = config.fields.find(field => field.name === currentField.name);
247
+ const uiTabName = (_c = currentField.properties) === null || _c === void 0 ? void 0 : _c.UITabName;
248
+ if (!uiTabName || uiTabName === TAB_NAMES.main) {
249
+ continue;
250
+ }
251
+ const haveTab = config.tabs.some((tab) => tab.label === uiTabName);
252
+ if (!haveTab) {
253
+ config.tabs.push({
254
+ label: uiTabName,
255
+ name: uiTabName,
256
+ order: 0,
257
+ visible: true,
258
+ });
259
+ }
260
+ if (field) {
261
+ field.tab = uiTabName;
262
+ }
263
+ }
264
+ return config;
265
+ }
266
+ }
267
+
268
+ const snkDynaformGuidesViewCss = ".sc-snk-dynaform-guides-view-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-small:var(--space--2xs, 8px);--snk-guides-viewer__header--min-height:68px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);display:block;height:100%;min-width:0;overflow-x:hidden}snk-dynaform-form-view.sc-snk-dynaform-guides-view{width:100%}.snk-guides-viewer.sc-snk-dynaform-guides-view{position:relative;display:flex;flex-direction:column;height:100%;overflow:hidden;padding:0px}.snk-guides-viewer__detail-container.sc-snk-dynaform-guides-view{display:flex;row-gap:24px;flex-direction:column;flex:1;max-height:none;min-height:0;overflow:hidden;margin-bottom:var(--space--12, 12px)}.snk-guides-viewer__container.sc-snk-dynaform-guides-view>snk-dynaform-form-view.sc-snk-dynaform-guides-view{max-height:300px;min-height:0;overflow-y:auto}.snk-guides-viewer__detail-container.sc-snk-dynaform-guides-view>snk-dynaform-form-view.sc-snk-dynaform-guides-view,.snk-guides-viewer__detail-container.sc-snk-dynaform-guides-view>snk-dynaform-detail-view.sc-snk-dynaform-guides-view{flex:1;min-height:0;overflow-y:auto}.snk-guides-viewer__header.sc-snk-dynaform-guides-view{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);padding:var(--snk-guides-viewer--space-small)}.snk-guides-viewer__header-breadcrumb.sc-snk-dynaform-guides-view{width:25%;display:flex}.snk-guides-viewer__header-taskbar.sc-snk-dynaform-guides-view{width:75%}.snk-guides-viewer__container.sc-snk-dynaform-guides-view{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;overflow:hidden}.snk-guides-viewer__tabselector.sc-snk-dynaform-guides-view{width:100%;min-width:0;box-sizing:border-box;padding:0 var(--space--12, 12px);flex-shrink:0}";
269
+
270
+ const SnkDynaformGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
271
+ constructor() {
272
+ super();
273
+ this.__registerHost();
274
+ this.snkMasterFormConfigChange = createEvent(this, "snkMasterFormConfigChange", 7);
275
+ this.formConfigVisibilityChanged = createEvent(this, "formConfigVisibilityChanged", 7);
276
+ this.exit = createEvent(this, "exit", 7);
277
+ this.actionClick = createEvent(this, "actionClick", 7);
278
+ this.formItemsReady = createEvent(this, "formItemsReady", 7);
279
+ this.dataUnit = undefined;
280
+ this.dataState = undefined;
281
+ this.configName = undefined;
282
+ this.entityPath = undefined;
283
+ this.actionsList = undefined;
284
+ this.recordsValidator = undefined;
285
+ this.masterFormConfig = undefined;
286
+ this.selectedGuide = undefined;
287
+ this.taskbarManager = undefined;
288
+ this.messagesBuilder = undefined;
289
+ this.canEdit = true;
290
+ this.presentationMode = undefined;
291
+ this.resourceID = undefined;
292
+ this.detailTaskbarCustomContainerId = undefined;
293
+ this.formLegacyConfigName = undefined;
294
+ this.enableGridInsert = false;
295
+ this.ignoreReadOnlyFormFields = undefined;
296
+ this.getCustomTitle = undefined;
297
+ this.customGuidesConfig = [];
298
+ this._guides = [];
299
+ this._formEditorConfigManager = undefined;
300
+ this._formEditorDataUnit = undefined;
301
+ this._fieldToGetFocus = undefined;
302
+ this._customEditors = {};
303
+ this._customRenders = {};
304
+ this._fieldsProps = {};
305
+ this._mainForm = undefined;
306
+ this._mainFormName = undefined;
307
+ this._errorTabs = new Set();
308
+ this._hasToCreateFieldSearch = true;
309
+ }
310
+ observeDataUnit() {
311
+ this.loadGuides(true);
312
+ }
313
+ async observeFormConfigManager(value) {
314
+ var _a, _b;
315
+ const showFormConfig = !!value;
316
+ await ((_a = this._viewStack) === null || _a === void 0 ? void 0 : _a.show(showFormConfig ?
317
+ GUIDES_VIEWER_VIEW_MODE.CONFIG :
318
+ GUIDES_VIEWER_VIEW_MODE.GUIDES));
319
+ (_b = this.formConfigVisibilityChanged) === null || _b === void 0 ? void 0 : _b.emit(showFormConfig);
320
+ }
321
+ observeDataState(newValue, oldValue) {
322
+ var _a, _b, _c, _d, _e, _f;
323
+ const newRecordsIds = (_b = (_a = newValue === null || newValue === void 0 ? void 0 : newValue.selectionInfo) === null || _a === void 0 ? void 0 : _a.recordIds) !== null && _b !== void 0 ? _b : (_c = newValue === null || newValue === void 0 ? void 0 : newValue.selectedRecord) === null || _c === void 0 ? void 0 : _c['__record__id__'];
324
+ const oldRecordsIds = (_e = (_d = oldValue === null || oldValue === void 0 ? void 0 : oldValue.selectionInfo) === null || _d === void 0 ? void 0 : _d.recordIds) !== null && _e !== void 0 ? _e : (_f = oldValue === null || oldValue === void 0 ? void 0 : oldValue.selectedRecord) === null || _f === void 0 ? void 0 : _f['__record__id__'];
325
+ if (!ObjectUtils.equals(newRecordsIds, oldRecordsIds)) {
326
+ this.loadGuides((oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) != (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode));
327
+ }
328
+ }
329
+ observeMasterFormConfig() {
330
+ var _a;
331
+ this.loadGuides(this.noGuideSelected());
332
+ (_a = this.snkMasterFormConfigChange) === null || _a === void 0 ? void 0 : _a.emit(this.masterFormConfig);
333
+ }
334
+ /**
335
+ * Abre o configurador do formulário
336
+ * @param detail - Define se a configuração que está sendo carregada é
337
+ * referente a um form detail.
338
+ */
339
+ async showFormConfig(detail = false) {
340
+ var _a, _b;
341
+ const masterConfig = !detail || this._currentDetail == undefined;
342
+ this._formEditorConfigManager = masterConfig ? this._configManager : (_a = this._currentDetail) === null || _a === void 0 ? void 0 : _a.formConfigManager;
343
+ this._formEditorDataUnit = masterConfig ? this.dataUnit : (_b = this._currentDetail) === null || _b === void 0 ? void 0 : _b.dataUnit;
344
+ }
345
+ /**
346
+ * Registra um editor customizado para campos da grade e formulário
347
+ */
348
+ async addCustomEditor(fieldName, customEditor) {
349
+ this._customEditors = Object.assign(Object.assign({}, this._customEditors), { [fieldName]: customEditor });
350
+ }
351
+ /**
352
+ * Registra um render customizado para colunas da grid.
353
+ */
354
+ async addGridCustomRender(fieldName, customRender) {
355
+ this._customRenders = Object.assign(Object.assign({}, this._customRenders), { [fieldName]: customRender });
356
+ }
357
+ ;
358
+ /**
359
+ * Altera/adiciona uma propriedade nos metadados do campo.
360
+ */
361
+ async setFieldProp(fieldName, propName, value) {
362
+ const newFieldsProps = {
363
+ [fieldName]: Object.assign(Object.assign({}, this._fieldsProps[fieldName]), { [propName]: value })
364
+ };
365
+ this._fieldsProps = Object.assign(Object.assign({}, this._fieldsProps), newFieldsProps);
366
+ }
367
+ /**
368
+ * Atribui o foco para o componente.
369
+ */
370
+ async setFocus() {
371
+ var _a;
372
+ (_a = this._container) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true });
373
+ }
374
+ /**
375
+ * Recarrega os guias baseada nos metadados atuais.
376
+ */
377
+ async reloadGuides() {
378
+ this.loadGuides(false);
379
+ }
380
+ exitViewer() {
381
+ var _a, _b;
382
+ if (!this.enableGridInsert && ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.isDirty())) {
383
+ this.dataUnit.cancelEdition({ after: () => { var _a; return (_a = this.exit) === null || _a === void 0 ? void 0 : _a.emit(); } });
384
+ }
385
+ else {
386
+ (_b = this.exit) === null || _b === void 0 ? void 0 : _b.emit();
387
+ }
388
+ }
389
+ onActionClick(evt) {
390
+ var _a;
391
+ if (evt.detail === TaskbarElement.CONFIGURATOR) {
392
+ if (evt.target.dataset.taskbarOwner != "master") {
393
+ (_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.open();
394
+ evt.stopImmediatePropagation();
395
+ evt.stopPropagation();
396
+ }
397
+ }
398
+ }
399
+ onContentCardChanged(evt) {
400
+ if (!this._configManager || !this.dataUnit) {
401
+ return;
402
+ }
403
+ SnkDynaformGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this._configManager)
404
+ .then(() => { var _a; return this.masterFormConfig = (_a = this._configManager) === null || _a === void 0 ? void 0 : _a.getConfig(this.dataUnit); });
405
+ }
406
+ /**
407
+ * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
408
+ * através de um pequeno modulo na estrutura da aplicação:
409
+ * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
410
+ * Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-crud.msg.ts"
411
+ */
412
+ getMessage(key) {
413
+ var _a, _b, _c, _d, _e, _f;
414
+ if ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.isMultipleEdition) {
415
+ const selectedRecords = (_c = (_b = this.dataUnit.getSelectionInfo()) === null || _b === void 0 ? void 0 : _b.records) !== null && _c !== void 0 ? _c : [];
416
+ return (_d = this.messagesBuilder) === null || _d === void 0 ? void 0 : _d.getMessage("snkCrud.multipleEdition.editing", { COUNT: selectedRecords.length });
417
+ }
418
+ return (_e = this.messagesBuilder) === null || _e === void 0 ? void 0 : _e.getMessage(key, (_f = this.dataUnit) === null || _f === void 0 ? void 0 : _f.getSelectedRecord());
419
+ }
420
+ loadGuides(changeSelection) {
421
+ var _a;
422
+ if (!this.dataUnit || !this._configManager) {
423
+ return;
424
+ }
425
+ if (!this._configManager.isLoaded) {
426
+ return;
427
+ }
428
+ this._masterFormMetadata = buildFormMetadata(this.masterFormConfig, this.dataUnit, true, this.customGuidesConfig);
429
+ const allSheets = (_a = this._masterFormMetadata) === null || _a === void 0 ? void 0 : _a.getAllSheets();
430
+ if (!allSheets) {
431
+ return;
432
+ }
433
+ const currentRecord = this.dataUnit.getSelectedRecord();
434
+ const disableDetails = this.hasToDisableDetails(currentRecord);
435
+ const guides = [];
436
+ let mainFormName;
437
+ const listSheetsValues = Array.from(allSheets.values());
438
+ listSheetsValues.forEach((sheet) => {
439
+ if ((sheet === null || sheet === void 0 ? void 0 : sheet.name) === TAB_NAMES.main) {
440
+ mainFormName = sheet === null || sheet === void 0 ? void 0 : sheet.name;
441
+ return;
442
+ }
443
+ const item = { id: sheet === null || sheet === void 0 ? void 0 : sheet.name, label: sheet === null || sheet === void 0 ? void 0 : sheet.label };
444
+ if (this.isDetail(sheet === null || sheet === void 0 ? void 0 : sheet.name) && disableDetails) {
445
+ item.tooltip = this.getMessage("snkCrud.detail.tooltip.needSingleSelection");
446
+ item.disabled = true;
447
+ }
448
+ if (sheet.isCustom && sheet.ctxProps) {
449
+ Object.entries(sheet.ctxProps).forEach(([key, value]) => {
450
+ if (value !== undefined) {
451
+ item[key] = value;
452
+ }
453
+ });
454
+ }
455
+ if (!item.props) {
456
+ item.props = {};
457
+ }
458
+ item.props.isAdditional = sheet.name.includes("AD_");
459
+ item.props.isCustom = !!sheet.isCustom;
460
+ guides.push(item);
461
+ });
462
+ this._mainFormName = mainFormName;
463
+ this._guides = guides;
464
+ const currentStillExists = this.selectedGuide
465
+ && this._guides.some(g => g.id === this.selectedGuide.id);
466
+ if (changeSelection || !currentStillExists) {
467
+ this.selectedGuide = this._guides && this._guides.length > 0 ? this._guides[0] : undefined;
468
+ }
469
+ }
470
+ hasToDisableDetails(currentRecord) {
471
+ return !currentRecord
472
+ || !this.dataUnit
473
+ || this.dataUnit.isNewRecord(currentRecord.__record__id__)
474
+ || this.dataUnit.isMultipleEdition;
475
+ }
476
+ isDetail(formId) {
477
+ return FormMetadata.getDetailName(formId) != undefined;
478
+ }
479
+ buildTabItems() {
480
+ return this._guides.map((guide, index) => ({
481
+ tabKey: guide.id,
482
+ label: guide.label,
483
+ index,
484
+ disabled: guide.disabled,
485
+ rightIcon: this._errorTabs.has(guide.id) ? 'alert-circle-inverted' : undefined,
486
+ leftIcon: this.getTabLeftIcon(guide),
487
+ }));
488
+ }
489
+ getTabLeftIcon(guide) {
490
+ var _a, _b;
491
+ if (guide.icon) {
492
+ return guide.icon;
493
+ }
494
+ if ((_a = guide.props) === null || _a === void 0 ? void 0 : _a.isCustom) {
495
+ return 'puzzle-piece';
496
+ }
497
+ if ((_b = guide.props) === null || _b === void 0 ? void 0 : _b.isAdditional) {
498
+ return 'puzzle-piece';
499
+ }
500
+ return undefined;
501
+ }
502
+ isCustomGuide(guideId) {
503
+ var _a;
504
+ if (!guideId) {
505
+ return false;
506
+ }
507
+ return !!((_a = this.customGuidesConfig) === null || _a === void 0 ? void 0 : _a.some(g => g.id === guideId));
508
+ }
509
+ onTabChange(tab) {
510
+ const targetGuide = this._guides.find(g => g.id === tab.tabKey);
511
+ if (!targetGuide || targetGuide.disabled) {
512
+ return;
513
+ }
514
+ this.selectedGuide = targetGuide;
515
+ }
516
+ static updateContentCard(formName, cardConfig, propertyChanged, configManager) {
517
+ return configManager.saveCardState(formName, cardConfig, propertyChanged);
518
+ }
519
+ static buildMainForm(params) {
520
+ if (params.formMetadata == undefined || params.mainFormName == undefined) {
521
+ return undefined;
522
+ }
523
+ const mainSheet = params.formMetadata.getSheet(params.mainFormName);
524
+ if (mainSheet == undefined) {
525
+ return undefined;
526
+ }
527
+ return (h("snk-dynaform-form-view", { ref: (ref) => { var _a; return (_a = params.onMainFormRef) === null || _a === void 0 ? void 0 : _a.call(params, ref); }, label: mainSheet.label, name: params.mainFormName, fields: mainSheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, fieldToFocus: params.fieldToFocus, key: params.mainFormName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); }, customEditors: params.propsCustomEditor, fieldsProps: params.fieldsProps, entityPath: params.entityPath, fieldSearch: params.fieldSearch }));
528
+ }
529
+ static buildFixedForms(params) {
530
+ var _a;
531
+ const cardsState = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.cardsState;
532
+ if (cardsState == undefined || params.formMetadata == undefined) {
533
+ return undefined;
534
+ }
535
+ const fixedEntries = Array.from(cardsState.entries())
536
+ .filter(([formName, cardConfig]) => (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed) && formName != params.selectedForm && formName != params.mainFormName)
537
+ .sort(([, cardConfigA], [, cardConfigB]) => {
538
+ const indexA = (cardConfigA === null || cardConfigA === void 0 ? void 0 : cardConfigA.fixSequence) || 0;
539
+ const indexB = (cardConfigB === null || cardConfigB === void 0 ? void 0 : cardConfigB.fixSequence) || 0;
540
+ return indexA - indexB;
541
+ });
542
+ if (fixedEntries.length === 0) {
543
+ return undefined;
544
+ }
545
+ return (h(Fragment, null, fixedEntries.map(([formName]) => {
546
+ const sheet = params.formMetadata.getSheet(formName);
547
+ if (sheet == undefined) {
548
+ return undefined;
549
+ }
550
+ return h("snk-dynaform-form-view", { label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, 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, entityPath: params.entityPath });
551
+ })));
552
+ }
553
+ getContent() {
554
+ var _a;
555
+ if (!this.selectedGuide) {
556
+ return undefined;
557
+ }
558
+ const guideId = this.selectedGuide.id;
559
+ if (this.isCustomGuide(guideId)) {
560
+ return h("slot", { name: guideId });
561
+ }
562
+ const childEntityName = FormMetadata.getDetailName(guideId);
563
+ if (childEntityName) {
564
+ return (h("snk-dynaform-detail-view", { ref: (ref) => {
565
+ if (ref)
566
+ this._currentDetail = ref;
567
+ }, dataUnitName: `${this.entityPath}/${childEntityName}`, entityName: childEntityName, label: this.selectedGuide.label, key: `detail_${guideId}`, canEdit: this.canEdit, resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders, presentationMode: this.presentationMode, messagesBuilder: this.messagesBuilder }));
568
+ }
569
+ if (guideId === this._mainFormName) {
570
+ return undefined;
571
+ }
572
+ const sheet = (_a = this._masterFormMetadata) === null || _a === void 0 ? void 0 : _a.getSheet(guideId);
573
+ if (!sheet) {
574
+ return undefined;
575
+ }
576
+ return (h("snk-dynaform-form-view", { name: guideId, 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, fieldSearch: this._fieldSearch, entityPath: this.entityPath }));
577
+ }
578
+ clearFieldToFocusHandler() {
579
+ this._fieldToGetFocus = undefined;
580
+ }
581
+ getConfigViewMode() {
582
+ return VIEW_MODE.GRID;
583
+ }
584
+ changeConfigViewMode(mode) {
585
+ var _a, _b;
586
+ if (this._currentDetail) {
587
+ (_b = (_a = this._currentDetail).changeViewMode) === null || _b === void 0 ? void 0 : _b.call(_a, mode);
588
+ }
589
+ }
590
+ openConfig(mode) {
591
+ var _a, _b, _c, _d;
592
+ (_b = (_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close) === null || _b === void 0 ? void 0 : _b.call(_a);
593
+ if (this._currentDetail) {
594
+ if (mode === VIEW_MODE.FORM) {
595
+ this.showFormConfig(true);
596
+ }
597
+ else {
598
+ (_d = (_c = this._currentDetail).configGrid) === null || _d === void 0 ? void 0 : _d.call(_c);
599
+ }
600
+ }
601
+ }
602
+ noGuideSelected() {
603
+ var _a;
604
+ return this.selectedGuide === undefined || TAB_NAMES.main === ((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id);
605
+ }
606
+ addFormLegacyConfigName() {
607
+ var _a;
608
+ if (this.formLegacyConfigName) {
609
+ (_a = this._configManager) === null || _a === void 0 ? void 0 : _a.addFormLegacyConfig(this.formLegacyConfigName);
610
+ }
611
+ }
612
+ setMasterFormConfig(config) {
613
+ this.masterFormConfig = config;
614
+ }
615
+ componentWillLoad() {
616
+ var _a;
617
+ if (this.resourceID == undefined) {
618
+ throw new Error((_a = this.getMessage("snkCrud.errors.resourceIDNotProvided")) !== null && _a !== void 0 ? _a : "");
619
+ }
620
+ this._configManager = new SnkFormConfigManager(this.configName, this.resourceID, this.setMasterFormConfig.bind(this), this.dataUnit);
621
+ this.addFormLegacyConfigName();
622
+ this._configManager.loadConfig();
623
+ }
624
+ async dataUnitActionHandler(action) {
625
+ var _a, _b;
626
+ switch (action.type) {
627
+ case Action.EDITION_CANCELED:
628
+ case Action.DATA_SAVED:
629
+ if ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.isMultipleEdition) {
630
+ this.exitViewer();
631
+ if (this.dataUnit) {
632
+ this.dataUnit.isMultipleEdition = false;
633
+ }
634
+ }
635
+ break;
636
+ case Action.FIELD_INVALIDATED:
637
+ const guideName = this.getGuideName((_b = action.payload) === null || _b === void 0 ? void 0 : _b.fieldName);
638
+ if (guideName) {
639
+ this._errorTabs = new Set([...this._errorTabs, guideName]);
640
+ }
641
+ break;
642
+ case Action.METADATA_LOADED:
643
+ case Action.MULTIPLE_EDITION_CHANGED:
644
+ this.loadGuides(this.noGuideSelected());
645
+ break;
646
+ }
647
+ }
648
+ getGuideName(fieldName) {
649
+ var _a, _b;
650
+ const sheets = (_a = this._masterFormMetadata) === null || _a === void 0 ? void 0 : _a.getAllSheets();
651
+ if (!sheets) {
652
+ return "";
653
+ }
654
+ for (const sheet of sheets) {
655
+ const formFields = (_b = sheet[1]) === null || _b === void 0 ? void 0 : _b.fields;
656
+ if (!formFields)
657
+ continue;
658
+ for (const field of formFields) {
659
+ if (field.name === fieldName) {
660
+ return sheet[0];
661
+ }
662
+ }
663
+ }
664
+ return "";
665
+ }
666
+ getTitle() {
667
+ var _a, _b, _c;
668
+ return (_c = (_b = (_a = this.getCustomTitle) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : this.getMessage("snkCrud.title")) !== null && _c !== void 0 ? _c : "";
669
+ }
670
+ getTitleTooltip() {
671
+ var _a;
672
+ if (!((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.isMultipleEdition))
673
+ return undefined;
674
+ return this.buildRecordIdsArray();
675
+ }
676
+ buildRecordIdsArray() {
677
+ var _a, _b, _c;
678
+ const selectedRecords = (_c = (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectionInfo()) === null || _b === void 0 ? void 0 : _b.records) !== null && _c !== void 0 ? _c : [];
679
+ if (selectedRecords.length === 0) {
680
+ return "[]";
681
+ }
682
+ const labels = selectedRecords.map(record => { var _a; return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkCrud.title", record); });
683
+ return `[${labels.join(", ")}]`;
684
+ }
685
+ getFieldsSearch() {
686
+ var _a;
687
+ if (this._fieldSearch == undefined || this._hasToCreateFieldSearch) {
688
+ this._hasToCreateFieldSearch = false;
689
+ const item = {
690
+ label: (_a = this.getMessage("snkSimpleCrud.findFields")) !== null && _a !== void 0 ? _a : "Busca de campos",
691
+ value: "findFields",
692
+ };
693
+ this._fieldSearch = buildFieldSearch(item, ({ argument }) => this.fieldsOptionLoader(argument), (option) => this.onSelectField(option));
694
+ }
695
+ return this._fieldSearch;
696
+ }
697
+ fieldsOptionLoader(argument) {
698
+ var _a, _b;
699
+ return Promise.resolve((_b = (_a = this._configManager) === null || _a === void 0 ? void 0 : _a.getFieldsList(argument).map(field => ({ value: field.name, label: field.label }))) !== null && _b !== void 0 ? _b : []);
700
+ }
701
+ onSelectField(option) {
702
+ var _a, _b, _c;
703
+ if (option == undefined) {
704
+ return;
705
+ }
706
+ this._fieldToGetFocus = option.value;
707
+ const fieldGuideName = this.getGuideName(option.value);
708
+ if (!fieldGuideName) {
709
+ return;
710
+ }
711
+ if (fieldGuideName === this._mainFormName) {
712
+ (_b = (_a = this._mainForm) === null || _a === void 0 ? void 0 : _a.showUp) === null || _b === void 0 ? void 0 : _b.call(_a);
713
+ return;
714
+ }
715
+ if (fieldGuideName !== ((_c = this.selectedGuide) === null || _c === void 0 ? void 0 : _c.id)) {
716
+ const targetGuide = this._guides.find(g => g.id === fieldGuideName);
717
+ if (targetGuide && !targetGuide.disabled) {
718
+ this.selectedGuide = targetGuide;
719
+ }
720
+ }
721
+ }
722
+ componentDidLoad() {
723
+ var _a;
724
+ (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.subscribe(this.dataUnitActionHandler.bind(this));
725
+ this.initKeyboardManager();
726
+ this.getFieldsSearch();
727
+ }
728
+ disconnectedCallback() {
729
+ var _a;
730
+ (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
731
+ }
732
+ async initKeyboardManager() {
733
+ this._keyboardManager = new KeyboardManager({ propagate: false, element: this._element });
734
+ if (this._keyboardManager) {
735
+ this._keyboardManager.bind(SHORTCUT_SEARCH_FIELD, async () => {
736
+ var _a, _b;
737
+ if (!this._mainForm)
738
+ return;
739
+ await ((_b = (_a = this._mainForm).showSearchField) === null || _b === void 0 ? void 0 : _b.call(_a));
740
+ }, { description: this.getMessage("snkSimpleCrud.findFields"), element: this._element });
741
+ }
742
+ }
743
+ render() {
744
+ var _a, _b, _c;
745
+ if (this._formEditorConfigManager != undefined) {
746
+ return (h("snk-dynaform-form-config", { ref: (ref) => {
747
+ if (ref)
748
+ this._container = ref;
749
+ }, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = undefined }));
750
+ }
751
+ if (!this.dataUnit || !((_a = this._configManager) === null || _a === void 0 ? void 0 : _a.isLoaded)) {
752
+ return undefined;
753
+ }
754
+ const showTabs = this._guides && this._guides.length > 0;
755
+ const fixedFormsParams = {
756
+ formConfig: this.masterFormConfig,
757
+ formMetadata: this._masterFormMetadata,
758
+ selectedForm: (_b = this.selectedGuide) === null || _b === void 0 ? void 0 : _b.id,
759
+ mainFormName: this._mainFormName,
760
+ dataUnit: this.dataUnit,
761
+ recordsValidator: this.recordsValidator,
762
+ fieldToFocus: this._fieldToGetFocus,
763
+ onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this),
764
+ propsCustomEditor: this._customEditors,
765
+ fieldsProps: this._fieldsProps,
766
+ entityPath: this.entityPath,
767
+ fieldSearch: this._fieldSearch,
768
+ onMainFormRef: (ref) => { this._mainForm = ref; }
769
+ };
770
+ return (h("section", { class: "snk-guides-viewer", ref: (ref) => {
771
+ if (ref)
772
+ this._container = ref;
773
+ }, tabindex: -1 }, this.getTitle() && (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", key: "header" }, h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()))))), h("div", { class: "snk-guides-viewer__container" }, SnkDynaformGuidesViewer.buildMainForm(fixedFormsParams), showTabs &&
774
+ h("ez-tabselector", Object.assign({ class: "snk-guides-viewer__tabselector", tabs: this.buildTabItems(), selectedTab: (_c = this.selectedGuide) === null || _c === void 0 ? void 0 : _c.id, onEzChange: (evt) => this.onTabChange(evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("tabselector")}` })), h("div", { class: "snk-guides-viewer__detail-container" }, SnkDynaformGuidesViewer.buildFixedForms(fixedFormsParams), this.getContent())), h("snk-configurator", { ref: (ref) => {
775
+ if (ref)
776
+ this._snkConfigurator = ref;
777
+ }, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
778
+ }
779
+ get _element() { return this; }
780
+ static get watchers() { return {
781
+ "dataUnit": ["observeDataUnit"],
782
+ "_formEditorConfigManager": ["observeFormConfigManager"],
783
+ "dataState": ["observeDataState"],
784
+ "masterFormConfig": ["observeMasterFormConfig"]
785
+ }; }
786
+ static get style() { return snkDynaformGuidesViewCss; }
787
+ }, [6, "snk-dynaform-guides-view", {
788
+ "dataUnit": [16],
789
+ "dataState": [16],
790
+ "configName": [1, "config-name"],
791
+ "entityPath": [1, "entity-path"],
792
+ "actionsList": [16],
793
+ "recordsValidator": [16],
794
+ "masterFormConfig": [1040],
795
+ "selectedGuide": [1040],
796
+ "taskbarManager": [16],
797
+ "messagesBuilder": [1040],
798
+ "canEdit": [4, "can-edit"],
799
+ "presentationMode": [1, "presentation-mode"],
800
+ "resourceID": [1, "resource-i-d"],
801
+ "detailTaskbarCustomContainerId": [1, "detail-taskbar-custom-container-id"],
802
+ "formLegacyConfigName": [1, "form-legacy-config-name"],
803
+ "enableGridInsert": [4, "enable-grid-insert"],
804
+ "ignoreReadOnlyFormFields": [4, "ignore-read-only-form-fields"],
805
+ "getCustomTitle": [16],
806
+ "customGuidesConfig": [16],
807
+ "_guides": [32],
808
+ "_formEditorConfigManager": [32],
809
+ "_formEditorDataUnit": [32],
810
+ "_fieldToGetFocus": [32],
811
+ "_customEditors": [32],
812
+ "_customRenders": [32],
813
+ "_fieldsProps": [32],
814
+ "_mainForm": [32],
815
+ "_mainFormName": [32],
816
+ "_errorTabs": [32],
817
+ "_hasToCreateFieldSearch": [32],
818
+ "showFormConfig": [64],
819
+ "addCustomEditor": [64],
820
+ "addGridCustomRender": [64],
821
+ "setFieldProp": [64],
822
+ "setFocus": [64],
823
+ "reloadGuides": [64]
824
+ }, [[2, "actionClick", "onActionClick"], [0, "snkContentCardChanged", "onContentCardChanged"]]]);
825
+ var GUIDES_VIEWER_VIEW_MODE;
826
+ (function (GUIDES_VIEWER_VIEW_MODE) {
827
+ GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["GUIDES"] = 0] = "GUIDES";
828
+ GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["CONFIG"] = 1] = "CONFIG";
829
+ })(GUIDES_VIEWER_VIEW_MODE || (GUIDES_VIEWER_VIEW_MODE = {}));
830
+ function defineCustomElement$1() {
831
+ if (typeof customElements === "undefined") {
832
+ return;
833
+ }
834
+ const components = ["snk-dynaform-guides-view", "snk-actions-button", "snk-attach", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-default-filter", "snk-dynaform-config-header", "snk-dynaform-configs-button", "snk-dynaform-detail-view", "snk-dynaform-field-config", "snk-dynaform-field-item", "snk-dynaform-fields-layout", "snk-dynaform-fields-selector", "snk-dynaform-form-config", "snk-dynaform-form-view", "snk-dynaform-guides-configurator", "snk-exporter-email-sender", "snk-expression-group", "snk-expression-item", "snk-filter-advanced-mode", "snk-filter-assistent-mode", "snk-filter-bar", "snk-filter-detail", "snk-filter-field-search", "snk-filter-item", "snk-filter-modal", "snk-filter-modal-item", "snk-filter-param-config", "snk-grid", "snk-grid-config", "snk-image-input", "snk-layout-form-config", "snk-numbering-config", "snk-personalized-filter", "snk-select-box", "snk-simple-bar", "snk-simple-crud", "snk-simple-form-config", "snk-taskbar", "snk-taskbar-skeleton", "snk-view-representation", "taskbar-actions-button", "taskbar-split-button"];
835
+ components.forEach(tagName => { switch (tagName) {
836
+ case "snk-dynaform-guides-view":
837
+ if (!customElements.get(tagName)) {
838
+ customElements.define(tagName, SnkDynaformGuidesViewer);
839
+ }
840
+ break;
841
+ case "snk-actions-button":
842
+ if (!customElements.get(tagName)) {
843
+ defineCustomElement$H();
844
+ }
845
+ break;
846
+ case "snk-attach":
847
+ if (!customElements.get(tagName)) {
848
+ defineCustomElement$G();
849
+ }
850
+ break;
851
+ case "snk-configurator":
852
+ if (!customElements.get(tagName)) {
853
+ defineCustomElement$F();
854
+ }
855
+ break;
856
+ case "snk-data-exporter":
857
+ if (!customElements.get(tagName)) {
858
+ defineCustomElement$E();
859
+ }
860
+ break;
861
+ case "snk-data-unit":
862
+ if (!customElements.get(tagName)) {
863
+ defineCustomElement$D();
864
+ }
865
+ break;
866
+ case "snk-default-filter":
867
+ if (!customElements.get(tagName)) {
868
+ defineCustomElement$C();
869
+ }
870
+ break;
871
+ case "snk-dynaform-config-header":
872
+ if (!customElements.get(tagName)) {
873
+ defineCustomElement$B();
874
+ }
875
+ break;
876
+ case "snk-dynaform-configs-button":
877
+ if (!customElements.get(tagName)) {
878
+ defineCustomElement$A();
879
+ }
880
+ break;
881
+ case "snk-dynaform-detail-view":
882
+ if (!customElements.get(tagName)) {
883
+ defineCustomElement();
884
+ }
885
+ break;
886
+ case "snk-dynaform-field-config":
887
+ if (!customElements.get(tagName)) {
888
+ defineCustomElement$z();
889
+ }
890
+ break;
891
+ case "snk-dynaform-field-item":
892
+ if (!customElements.get(tagName)) {
893
+ defineCustomElement$y();
894
+ }
895
+ break;
896
+ case "snk-dynaform-fields-layout":
897
+ if (!customElements.get(tagName)) {
898
+ defineCustomElement$x();
899
+ }
900
+ break;
901
+ case "snk-dynaform-fields-selector":
902
+ if (!customElements.get(tagName)) {
903
+ defineCustomElement$w();
904
+ }
905
+ break;
906
+ case "snk-dynaform-form-config":
907
+ if (!customElements.get(tagName)) {
908
+ defineCustomElement$v();
909
+ }
910
+ break;
911
+ case "snk-dynaform-form-view":
912
+ if (!customElements.get(tagName)) {
913
+ defineCustomElement$u();
914
+ }
915
+ break;
916
+ case "snk-dynaform-guides-configurator":
917
+ if (!customElements.get(tagName)) {
918
+ defineCustomElement$t();
919
+ }
920
+ break;
921
+ case "snk-exporter-email-sender":
922
+ if (!customElements.get(tagName)) {
923
+ defineCustomElement$s();
924
+ }
925
+ break;
926
+ case "snk-expression-group":
927
+ if (!customElements.get(tagName)) {
928
+ defineCustomElement$r();
929
+ }
930
+ break;
931
+ case "snk-expression-item":
932
+ if (!customElements.get(tagName)) {
933
+ defineCustomElement$q();
934
+ }
935
+ break;
936
+ case "snk-filter-advanced-mode":
937
+ if (!customElements.get(tagName)) {
938
+ defineCustomElement$p();
939
+ }
940
+ break;
941
+ case "snk-filter-assistent-mode":
942
+ if (!customElements.get(tagName)) {
943
+ defineCustomElement$o();
944
+ }
945
+ break;
946
+ case "snk-filter-bar":
947
+ if (!customElements.get(tagName)) {
948
+ defineCustomElement$n();
949
+ }
950
+ break;
951
+ case "snk-filter-detail":
952
+ if (!customElements.get(tagName)) {
953
+ defineCustomElement$m();
954
+ }
955
+ break;
956
+ case "snk-filter-field-search":
957
+ if (!customElements.get(tagName)) {
958
+ defineCustomElement$l();
959
+ }
960
+ break;
961
+ case "snk-filter-item":
962
+ if (!customElements.get(tagName)) {
963
+ defineCustomElement$k();
964
+ }
965
+ break;
966
+ case "snk-filter-modal":
967
+ if (!customElements.get(tagName)) {
968
+ defineCustomElement$j();
969
+ }
970
+ break;
971
+ case "snk-filter-modal-item":
972
+ if (!customElements.get(tagName)) {
973
+ defineCustomElement$i();
974
+ }
975
+ break;
976
+ case "snk-filter-param-config":
977
+ if (!customElements.get(tagName)) {
978
+ defineCustomElement$h();
979
+ }
980
+ break;
981
+ case "snk-grid":
982
+ if (!customElements.get(tagName)) {
983
+ defineCustomElement$g();
984
+ }
985
+ break;
986
+ case "snk-grid-config":
987
+ if (!customElements.get(tagName)) {
988
+ defineCustomElement$f();
989
+ }
990
+ break;
991
+ case "snk-image-input":
992
+ if (!customElements.get(tagName)) {
993
+ defineCustomElement$e();
994
+ }
995
+ break;
996
+ case "snk-layout-form-config":
997
+ if (!customElements.get(tagName)) {
998
+ defineCustomElement$d();
999
+ }
1000
+ break;
1001
+ case "snk-numbering-config":
1002
+ if (!customElements.get(tagName)) {
1003
+ defineCustomElement$c();
1004
+ }
1005
+ break;
1006
+ case "snk-personalized-filter":
1007
+ if (!customElements.get(tagName)) {
1008
+ defineCustomElement$b();
1009
+ }
1010
+ break;
1011
+ case "snk-select-box":
1012
+ if (!customElements.get(tagName)) {
1013
+ defineCustomElement$a();
1014
+ }
1015
+ break;
1016
+ case "snk-simple-bar":
1017
+ if (!customElements.get(tagName)) {
1018
+ defineCustomElement$9();
1019
+ }
1020
+ break;
1021
+ case "snk-simple-crud":
1022
+ if (!customElements.get(tagName)) {
1023
+ defineCustomElement$8();
1024
+ }
1025
+ break;
1026
+ case "snk-simple-form-config":
1027
+ if (!customElements.get(tagName)) {
1028
+ defineCustomElement$7();
1029
+ }
1030
+ break;
1031
+ case "snk-taskbar":
1032
+ if (!customElements.get(tagName)) {
1033
+ defineCustomElement$6();
1034
+ }
1035
+ break;
1036
+ case "snk-taskbar-skeleton":
1037
+ if (!customElements.get(tagName)) {
1038
+ defineCustomElement$5();
1039
+ }
1040
+ break;
1041
+ case "snk-view-representation":
1042
+ if (!customElements.get(tagName)) {
1043
+ defineCustomElement$4();
1044
+ }
1045
+ break;
1046
+ case "taskbar-actions-button":
1047
+ if (!customElements.get(tagName)) {
1048
+ defineCustomElement$3();
1049
+ }
1050
+ break;
1051
+ case "taskbar-split-button":
1052
+ if (!customElements.get(tagName)) {
1053
+ defineCustomElement$2();
1054
+ }
1055
+ break;
1056
+ } });
1057
+ }
1058
+
1059
+ const snkDynaformDetailViewCss = ".sc-snk-dynaform-detail-view-h{display:flex;row-gap:24px;flex-direction:column;width:100%;height:100%;overflow:hidden}.level-path.sc-snk-dynaform-detail-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.grid-container.sc-snk-dynaform-detail-view{min-height:100px;height:100%;width:100%;display:flex;flex-wrap:wrap;text-decoration:none;border-radius:var(--border--radius-medium);background-color:var(--color--gray-70, #FFFFFF);border:1px solid var(--color--petroleum-100, #C8CCD3)}.detail-header.sc-snk-dynaform-detail-view{padding-bottom:0}snk-data-unit.sc-snk-dynaform-detail-view{flex:1;gap:var(--space--12, 12px);display:flex;flex-direction:column}snk-grid.sc-snk-dynaform-detail-view{height:100%;--snk-grid-margin:0px;--snk-grid-box-shadow:none}.form-and-detail-container.sc-snk-dynaform-detail-view{display:flex;flex-direction:column;height:100%;width:100%;overflow:auto;padding:var(--space--12, 12px)}.ez-tabselector-internal.sc-snk-dynaform-detail-view{margin:var(--space--8, 8px) 0}.selected-record-header.sc-snk-dynaform-detail-view{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space--8, 8px) var(--space--12, 12px);padding:var(--space--12, 12px) var(--space--16, 16px);margin-bottom:var(--space--12, 12px);background:var(--color--gray-80, #F9F9F9);border-radius:var(--border--radius-12, 12px);font-family:var(--font--pattern);border:1px solid var(--color--petroleum-100, #C8CCD3);border-left:4px solid var(--color--ocean-green-500, #00B07E)}.selected-record-header--message.sc-snk-dynaform-detail-view{border-left-color:var(--color--primary, #007EFF)}.selected-record-header__message.sc-snk-dynaform-detail-view{font-size:var(--font-size--default, 14px);font-weight:var(--font-weight--medium, 500);color:var(--color--title-primary, #2B3A54)}.selected-record-header__chip.sc-snk-dynaform-detail-view{display:inline-flex;flex-direction:row;align-items:center;gap:var(--space--4, 4px);min-width:0}.selected-record-header__label.sc-snk-dynaform-detail-view{font-size:var(--font-size--xs, 11px);font-weight:var(--font-weight--medium, 500);text-transform:uppercase;letter-spacing:0.04em;color:var(--color--text-secondary, #6E7A8A)}.selected-record-header__value.sc-snk-dynaform-detail-view{font-size:var(--font-size--md, 15px);font-weight:var(--font-weight--semibold, 600);color:var(--color--ocean-green-1000, #00281D);line-height:1.2;word-break:break-word}.selected-record-header__separator.sc-snk-dynaform-detail-view{display:inline-block;align-self:stretch;width:1px;background:var(--color--petroleum-100, #C8CCD3);margin:0 var(--space--4, 4px)}";
1060
+
1061
+ const SnkDynaformDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
1062
+ constructor() {
1063
+ super();
1064
+ this.__registerHost();
1065
+ this._taskbarProcessor = new SimpleTaskbarProcessor(DEFAULT_TASKBAR_BUTTONS);
1066
+ this._currentView = 0;
1067
+ this.attachmentRegisterKey = undefined;
1068
+ this._fieldToGetFocus = undefined;
1069
+ this._hasToCreateFieldSearch = true;
1070
+ this._selectedSheet = undefined;
1071
+ this._internalErrorTabs = new Set();
1072
+ this._selectedRecordPKDisplay = undefined;
1073
+ this.formConfigManager = undefined;
1074
+ this.dataUnitName = undefined;
1075
+ this.resourceID = undefined;
1076
+ this.entityName = undefined;
1077
+ this.label = undefined;
1078
+ this.dataUnit = undefined;
1079
+ this.selectedForm = undefined;
1080
+ this.dataState = undefined;
1081
+ this.messagesBuilder = undefined;
1082
+ this.canEdit = true;
1083
+ this.taskbarCustomContainerId = undefined;
1084
+ this.customEditors = undefined;
1085
+ this.customRenders = undefined;
1086
+ this.presentationMode = PresentationMode.SECONDARY;
1087
+ }
1088
+ observeDataUnit(newDataUnit, oldDataUnit) {
1089
+ newDataUnit === null || newDataUnit === void 0 ? void 0 : newDataUnit.subscribe(this.dataUnitActionHandler.bind(this));
1090
+ oldDataUnit === null || oldDataUnit === void 0 ? void 0 : oldDataUnit.unsubscribe(this.dataUnitActionHandler);
1091
+ }
1092
+ observerDataState(newValue, oldValue) {
1093
+ const openInsertion = !(oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) && (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode);
1094
+ const closeInsertion = (oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) && !(newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode);
1095
+ if (openInsertion || closeInsertion) {
1096
+ this.loadMetadata();
1097
+ }
1098
+ if (this._formMetadata == undefined) {
1099
+ return;
1100
+ }
1101
+ if (!this.selectedSheetIsDetail()) {
1102
+ if (openInsertion) {
1103
+ setTimeout(() => {
1104
+ this.changeViewMode(VIEW_MODE.FORM);
1105
+ }, 0);
1106
+ }
1107
+ if (closeInsertion) {
1108
+ this.changeViewMode(VIEW_MODE.GRID);
1109
+ }
1110
+ }
1111
+ }
1112
+ /**
1113
+ * Muda o modo de visualização do componente entre VIEW_MODE.GRID e VIEW_MODE.FORM
1114
+ * @param mode - Novo modo que o componente deve ser apresentado.
1115
+ */
1116
+ async changeViewMode(mode) {
1117
+ if (!this._viewStack) {
1118
+ return;
1119
+ }
1120
+ this._viewStack.show(mode);
1121
+ this._currentView = mode;
1122
+ }
1123
+ /**
1124
+ * Abre o configurador de grid.
1125
+ */
1126
+ async configGrid() {
1127
+ if (this._snkGrid) {
1128
+ this._snkGrid.showConfig();
1129
+ }
1130
+ }
1131
+ async showUp() {
1132
+ if (this._snkFormView) {
1133
+ this._snkFormView.showUp();
1134
+ }
1135
+ if (this._snkGrid) {
1136
+ this._snkGrid.scrollIntoView({ behavior: "smooth", block: "start" });
1137
+ }
1138
+ }
1139
+ /**
1140
+ * Registra um editor customizado para campos da grade e formulário.
1141
+ */
1142
+ async addCustomEditor(fieldName, customEditor) {
1143
+ var _a, _b;
1144
+ const detailContext = this.normalizeDataUnitName();
1145
+ (_a = this._snkGrid) === null || _a === void 0 ? void 0 : _a.addCustomEditor(fieldName, customEditor, detailContext);
1146
+ (_b = this._snkFormView) === null || _b === void 0 ? void 0 : _b.addCustomEditor(fieldName, customEditor, detailContext);
1147
+ }
1148
+ async observerPropsCustomEditor(newValue) {
1149
+ for (const fieldName in newValue) {
1150
+ await this.addCustomEditor(fieldName, newValue[fieldName]);
1151
+ }
1152
+ }
1153
+ /**
1154
+ * Registra um render customizado para colunas da grid.
1155
+ */
1156
+ async addGridCustomRender(fieldName, customRender) {
1157
+ var _a;
1158
+ const detailContext = this.normalizeDataUnitName();
1159
+ await ((_a = this._snkGrid) === null || _a === void 0 ? void 0 : _a.addGridCustomRender(fieldName, customRender, detailContext));
1160
+ }
1161
+ onContentCardChanged(evt) {
1162
+ SnkDynaformGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this.formConfigManager).then(() => forceUpdate(this));
1163
+ evt.stopPropagation();
1164
+ }
1165
+ async observeCustomRenders(newValue) {
1166
+ for (const field in newValue) {
1167
+ const customRender = newValue[field];
1168
+ await this.addGridCustomRender(field, customRender);
1169
+ }
1170
+ }
1171
+ loadMetadata() {
1172
+ if (!this.dataUnit || !this.formConfigManager) {
1173
+ return;
1174
+ }
1175
+ if (!this.formConfigManager.isLoaded) {
1176
+ return;
1177
+ }
1178
+ const formConfig = this.formConfigManager.getConfig(this.dataUnit);
1179
+ this._formMetadata = buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
1180
+ this.initSelectedSheet();
1181
+ }
1182
+ initSelectedSheet() {
1183
+ if (!this._formMetadata) {
1184
+ this._selectedSheet = undefined;
1185
+ return;
1186
+ }
1187
+ const sheets = this._formMetadata.getAllSheets();
1188
+ if (!sheets || sheets.size === 0) {
1189
+ this._selectedSheet = undefined;
1190
+ return;
1191
+ }
1192
+ // Mantém a aba atual caso ela ainda exista e não seja a área principal.
1193
+ if (this._selectedSheet && this._selectedSheet.name !== SnkDynaformDetailView.MAIN_TAB) {
1194
+ const current = sheets.get(this._selectedSheet.name);
1195
+ if (current) {
1196
+ this._selectedSheet = current;
1197
+ return;
1198
+ }
1199
+ }
1200
+ // Caso contrário, seleciona o primeiro sheet que não seja a área principal (primeira aba).
1201
+ this._selectedSheet = this.getFirstNonMainSheet(sheets);
1202
+ }
1203
+ getFirstNonMainSheet(sheets) {
1204
+ for (const [name, sheet] of sheets) {
1205
+ if (name !== SnkDynaformDetailView.MAIN_TAB) {
1206
+ return sheet;
1207
+ }
1208
+ }
1209
+ return undefined;
1210
+ }
1211
+ dataUnitReadyHandler(evt) {
1212
+ this.dataUnit = evt.detail;
1213
+ this.loadMetadata();
1214
+ }
1215
+ getFormFields() {
1216
+ var _a, _b, _c;
1217
+ const mainSheet = (_b = (_a = this._formMetadata) === null || _a === void 0 ? void 0 : _a.getAllSheets()) === null || _b === void 0 ? void 0 : _b.get(SnkDynaformDetailView.MAIN_TAB);
1218
+ return (_c = mainSheet === null || mainSheet === void 0 ? void 0 : mainSheet.fields) !== null && _c !== void 0 ? _c : [];
1219
+ }
1220
+ hasNonMainSheets() {
1221
+ if (!this._formMetadata) {
1222
+ return false;
1223
+ }
1224
+ for (const name of this._formMetadata.getAllSheets().keys()) {
1225
+ if (name !== SnkDynaformDetailView.MAIN_TAB) {
1226
+ return true;
1227
+ }
1228
+ }
1229
+ return false;
1230
+ }
1231
+ selectedSheetIsDetail() {
1232
+ return !!this._selectedSheet && FormMetadata.getDetailName(this._selectedSheet.name) != undefined;
1233
+ }
1234
+ isSheetDisabled(sheet) {
1235
+ var _a;
1236
+ if (FormMetadata.getDetailName(sheet.name) == undefined) {
1237
+ return false;
1238
+ }
1239
+ const currentRecord = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectedRecord();
1240
+ if (!currentRecord || !this.dataUnit) {
1241
+ return true;
1242
+ }
1243
+ return this.dataUnit.isNewRecord(currentRecord.__record__id__) || this.dataUnit.isMultipleEdition;
1244
+ }
1245
+ buildInternalTabItems() {
1246
+ if (!this._formMetadata) {
1247
+ return [];
1248
+ }
1249
+ const sheets = Array.from(this._formMetadata.getAllSheets().values());
1250
+ const nonMainSheets = sheets.filter((sheet) => sheet.name !== SnkDynaformDetailView.MAIN_TAB);
1251
+ return nonMainSheets.map((sheet, index) => ({
1252
+ tabKey: sheet.name,
1253
+ label: sheet.label,
1254
+ index,
1255
+ disabled: this.isSheetDisabled(sheet),
1256
+ rightIcon: this._internalErrorTabs.has(sheet.name) ? 'alert-circle-inverted' : undefined,
1257
+ }));
1258
+ }
1259
+ onInternalTabChange(tab) {
1260
+ var _a, _b;
1261
+ // A área principal (__main) é sempre visível e não é uma aba selecionável.
1262
+ if (tab.tabKey === SnkDynaformDetailView.MAIN_TAB) {
1263
+ return;
1264
+ }
1265
+ const matchedSheet = (_b = (_a = this._formMetadata) === null || _a === void 0 ? void 0 : _a.getAllSheets()) === null || _b === void 0 ? void 0 : _b.get(tab.tabKey);
1266
+ if (!matchedSheet || this.isSheetDisabled(matchedSheet)) {
1267
+ return;
1268
+ }
1269
+ this._selectedSheet = matchedSheet;
1270
+ }
1271
+ executeActionHandler(evt) {
1272
+ var _a;
1273
+ if (evt.detail === TaskbarElement.GRID_MODE) {
1274
+ this.changeViewMode(VIEW_MODE.GRID);
1275
+ evt.stopPropagation();
1276
+ }
1277
+ if (evt.detail === TaskbarElement.UPDATE_MULTIPLE && this.dataUnit) {
1278
+ this.dataUnit.isMultipleEdition = true;
1279
+ this.changeViewMode(VIEW_MODE.FORM);
1280
+ evt.stopPropagation();
1281
+ }
1282
+ if (evt.detail === TaskbarElement.FORM_MODE || evt.detail === TaskbarElement.UPDATE || evt.detail === TaskbarElement.INSERT) {
1283
+ this.changeViewMode(VIEW_MODE.FORM);
1284
+ evt.stopPropagation();
1285
+ }
1286
+ if (evt.detail === TaskbarElement.ATTACH) {
1287
+ (_a = this._snkAttach) === null || _a === void 0 ? void 0 : _a.open();
1288
+ evt.stopPropagation();
1289
+ }
1290
+ }
1291
+ async getAttachmentRegisterKey() {
1292
+ if (!this._snkDataUnit) {
1293
+ return;
1294
+ }
1295
+ const recordCriteria = await this._snkDataUnit.getSelectedRecordsIDsInfo();
1296
+ const joinedPrimaryKeys = recordCriteria.map(({ value }) => value).join('_');
1297
+ return joinedPrimaryKeys;
1298
+ }
1299
+ async handleDataStateChange({ detail: dataState }) {
1300
+ var _a;
1301
+ this.dataState = dataState;
1302
+ if (dataState.selectedRecord !== undefined && this._snkDataUnit) {
1303
+ this.attachmentRegisterKey = (_a = await this.getAttachmentRegisterKey()) !== null && _a !== void 0 ? _a : undefined;
1304
+ }
1305
+ this._selectedRecordPKDisplay = this.buildSelectedRecordPKDisplay();
1306
+ }
1307
+ buildSelectedRecordPKDisplay() {
1308
+ var _a, _b, _c, _d, _e, _f, _g;
1309
+ if (!this.dataUnit) {
1310
+ return undefined;
1311
+ }
1312
+ if ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode) {
1313
+ const message = (_b = this.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage("snkCrud.newRecord");
1314
+ return message ? { message } : undefined;
1315
+ }
1316
+ const selectedRecord = this.dataUnit.getSelectedRecord();
1317
+ if (!selectedRecord) {
1318
+ return undefined;
1319
+ }
1320
+ const items = [];
1321
+ const fields = (_d = (_c = this.dataUnit.metadata) === null || _c === void 0 ? void 0 : _c.fields) !== null && _d !== void 0 ? _d : [];
1322
+ for (const field of fields) {
1323
+ if (((_e = field.properties) === null || _e === void 0 ? void 0 : _e.isPrimaryKey) !== "true") {
1324
+ continue;
1325
+ }
1326
+ const rawValue = selectedRecord[field.name];
1327
+ const value = (_f = rawValue === null || rawValue === void 0 ? void 0 : rawValue.value) !== null && _f !== void 0 ? _f : rawValue;
1328
+ if (value === undefined || value === null || value === "") {
1329
+ continue;
1330
+ }
1331
+ items.push({ label: (_g = field.label) !== null && _g !== void 0 ? _g : field.name, value: String(value) });
1332
+ }
1333
+ return items.length ? { items } : undefined;
1334
+ }
1335
+ renderSelectedRecordHeader() {
1336
+ var _a;
1337
+ if (!this.label && !this._selectedRecordPKDisplay) {
1338
+ return undefined;
1339
+ }
1340
+ const display = this._selectedRecordPKDisplay;
1341
+ if (!display) {
1342
+ return undefined;
1343
+ }
1344
+ if (display.message) {
1345
+ return (h("div", { class: "selected-record-header selected-record-header--message" }, h("span", { class: "selected-record-header__message" }, display.message)));
1346
+ }
1347
+ if (!((_a = display.items) === null || _a === void 0 ? void 0 : _a.length)) {
1348
+ return undefined;
1349
+ }
1350
+ return (h("div", { class: "selected-record-header", role: "group" }, display.items.map((item, index) => [
1351
+ index > 0 && h("span", { class: "selected-record-header__separator", "aria-hidden": "true" }),
1352
+ h("div", { class: "selected-record-header__chip" }, h("span", { class: "selected-record-header__label" }, item.label, ":"), h("span", { class: "selected-record-header__value" }, item.value))
1353
+ ])));
1354
+ }
1355
+ componentWillLoad() {
1356
+ var _a;
1357
+ this._configName = `dynaform.${this.entityName}`;
1358
+ this.formConfigManager = new SnkFormConfigManager(this._configName, (_a = this.resourceID) !== null && _a !== void 0 ? _a : '', () => this.loadMetadata(), this.dataUnit);
1359
+ this.formConfigManager.loadConfig();
1360
+ if (this.messagesBuilder == undefined) {
1361
+ this.messagesBuilder = new SnkMessageBuilder(this.entityName);
1362
+ }
1363
+ }
1364
+ componentWillRender() {
1365
+ this.initializeTaskbarProcessor();
1366
+ }
1367
+ initializeTaskbarProcessor() {
1368
+ if (!this.dataState) {
1369
+ return;
1370
+ }
1371
+ const detailTaskbarManager = this.buildDetailTaskbarManager();
1372
+ const topTaskbarId = getTopTaskBarId(this.dataState, this.presentationMode);
1373
+ this._taskbarProcessor.process(topTaskbarId, detailTaskbarManager, this.dataState, [], []);
1374
+ }
1375
+ buildDetailTaskbarManager() {
1376
+ const EDITION_MODE_BUTTONS = [
1377
+ TaskbarElement.CANCEL,
1378
+ TaskbarElement.SAVE,
1379
+ ];
1380
+ const currentView = this._currentView;
1381
+ return {
1382
+ getButtons: (taskbarID, dataState, defaultButtons) => {
1383
+ var _a, _b, _c;
1384
+ if (!taskbarID) {
1385
+ return [];
1386
+ }
1387
+ const isInEditionMode = (dataState === null || dataState === void 0 ? void 0 : dataState.insertionMode) || (dataState === null || dataState === void 0 ? void 0 : dataState.isDirty);
1388
+ if (isInEditionMode) {
1389
+ return EDITION_MODE_BUTTONS;
1390
+ }
1391
+ let buttons = [...defaultButtons];
1392
+ if (currentView === VIEW_MODE.FORM) {
1393
+ const indexFormMode = buttons.indexOf(TaskbarElement.FORM_MODE);
1394
+ if (indexFormMode > -1) {
1395
+ buttons = [
1396
+ ...buttons.slice(0, indexFormMode),
1397
+ TaskbarElement.GRID_MODE,
1398
+ ...buttons.slice(indexFormMode + 1),
1399
+ ];
1400
+ }
1401
+ }
1402
+ if (((_c = (_b = (_a = dataState === null || dataState === void 0 ? void 0 : dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0) > 1) {
1403
+ const indexUpdate = buttons.indexOf(TaskbarElement.UPDATE);
1404
+ if (indexUpdate > -1) {
1405
+ buttons = [
1406
+ ...buttons.slice(0, indexUpdate),
1407
+ TaskbarElement.UPDATE_MULTIPLE,
1408
+ ...buttons.slice(indexUpdate + 1),
1409
+ ];
1410
+ }
1411
+ }
1412
+ return buttons;
1413
+ },
1414
+ isEnabled: (_, dataState, buttonName, originalValue) => {
1415
+ if (!dataState) {
1416
+ return originalValue;
1417
+ }
1418
+ const hasSelectedRecord = dataState.selectedRecord !== undefined;
1419
+ const buttonsRequiringSelection = [
1420
+ TaskbarElement.UPDATE,
1421
+ TaskbarElement.REMOVE,
1422
+ TaskbarElement.ATTACH,
1423
+ TaskbarElement.CLONE,
1424
+ ];
1425
+ if (!hasSelectedRecord && buttonsRequiringSelection.includes(buttonName)) {
1426
+ return false;
1427
+ }
1428
+ if (buttonName === TaskbarElement.PREVIOUS && !dataState.hasPrevious) {
1429
+ return false;
1430
+ }
1431
+ if (buttonName === TaskbarElement.NEXT && !dataState.hasNext) {
1432
+ return false;
1433
+ }
1434
+ if (buttonName === TaskbarElement.INSERT && dataState.insertionMode) {
1435
+ return false;
1436
+ }
1437
+ return originalValue;
1438
+ },
1439
+ };
1440
+ }
1441
+ async componentDidLoad() {
1442
+ if (this.customEditors) {
1443
+ await this.observerPropsCustomEditor(this.customEditors);
1444
+ }
1445
+ if (this.customRenders) {
1446
+ await this.observeCustomRenders(this.customRenders);
1447
+ }
1448
+ this.initKeyboardManager();
1449
+ }
1450
+ disconnectedCallback() {
1451
+ var _a;
1452
+ (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
1453
+ }
1454
+ async dataUnitActionHandler(action) {
1455
+ var _a;
1456
+ if (action.type === Action.FIELD_INVALIDATED) {
1457
+ const sheetName = this.findSheetOfField((_a = action.payload) === null || _a === void 0 ? void 0 : _a.fieldName);
1458
+ if (sheetName) {
1459
+ this._internalErrorTabs = new Set([...this._internalErrorTabs, sheetName]);
1460
+ }
1461
+ }
1462
+ }
1463
+ findSheetOfField(fieldName) {
1464
+ var _a;
1465
+ if (!fieldName || !this._formMetadata) {
1466
+ return undefined;
1467
+ }
1468
+ const sheets = this._formMetadata.getAllSheets();
1469
+ for (const [sheetName, sheet] of sheets) {
1470
+ if ((_a = sheet.fields) === null || _a === void 0 ? void 0 : _a.some((f) => f.name === fieldName)) {
1471
+ return sheetName;
1472
+ }
1473
+ }
1474
+ return undefined;
1475
+ }
1476
+ normalizeDataUnitName() {
1477
+ var _a, _b;
1478
+ return (_b = (_a = this.dataUnitName) === null || _a === void 0 ? void 0 : _a.replace(/\//g, '>')) !== null && _b !== void 0 ? _b : '';
1479
+ }
1480
+ getSettingsListForm() {
1481
+ var _a, _b;
1482
+ const hardList = [{
1483
+ value: StringUtils.generateUUID(),
1484
+ label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkCrud.findColumn", undefined)) !== null && _b !== void 0 ? _b : "",
1485
+ disableCloseOnSelect: true,
1486
+ eagerInitialize: true,
1487
+ itemBuilder: (_, item) => this.getFieldsSearch(item)
1488
+ }];
1489
+ return hardList;
1490
+ }
1491
+ getFieldsSearch(item) {
1492
+ var _a;
1493
+ if (this._fieldSearch === undefined || this._hasToCreateFieldSearch) {
1494
+ this._hasToCreateFieldSearch = false;
1495
+ this._fieldSearch = buildFieldSearch(item, ({ argument }) => this.fieldsOptionLoader(argument), (option) => this.onSelectField(option));
1496
+ }
1497
+ return (_a = this._fieldSearch) !== null && _a !== void 0 ? _a : document.createElement('div');
1498
+ }
1499
+ fieldsOptionLoader(argument) {
1500
+ const searchTerm = argument === null || argument === void 0 ? void 0 : argument.toLowerCase();
1501
+ const allFields = this.getFormFields().map(field => { var _a; return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(field.name); });
1502
+ const filteredFields = allFields.filter(field => {
1503
+ var _a, _b;
1504
+ if (!field) {
1505
+ return;
1506
+ }
1507
+ return ((_a = field.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTerm)) ||
1508
+ ((_b = field.label) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(searchTerm));
1509
+ });
1510
+ const options = filteredFields.map((field) => {
1511
+ if (!field) {
1512
+ return;
1513
+ }
1514
+ return ({ value: field.name, label: field.label });
1515
+ });
1516
+ return Promise.resolve(options);
1517
+ }
1518
+ onSelectField(option) {
1519
+ if (option == undefined) {
1520
+ return;
1521
+ }
1522
+ this._fieldToGetFocus = option.value;
1523
+ }
1524
+ clearFieldToFocusHandler() {
1525
+ this._fieldToGetFocus = undefined;
1526
+ }
1527
+ getColumnSearch(item) {
1528
+ var _a;
1529
+ if (this._columnSearch !== undefined) {
1530
+ return this._columnSearch;
1531
+ }
1532
+ this._columnSearch = buildFieldSearch(item, ({ argument }) => new Promise(accept => {
1533
+ var _a;
1534
+ (_a = this._snkGrid) === null || _a === void 0 ? void 0 : _a.filterColumns(argument).then((columns) => {
1535
+ accept(columns
1536
+ .filter(column => !column.hidden)
1537
+ .map(column => ({ label: column.label, value: column.name })));
1538
+ });
1539
+ }), (option) => {
1540
+ var _a;
1541
+ if (option != undefined) {
1542
+ (_a = this._snkGrid) === null || _a === void 0 ? void 0 : _a.locateColumn(option.value);
1543
+ }
1544
+ });
1545
+ return (_a = this._columnSearch) !== null && _a !== void 0 ? _a : document.createElement('div');
1546
+ }
1547
+ buildTaskbarCustomActionsList() {
1548
+ return [this.buildSearchColumnTaskbarAction()];
1549
+ }
1550
+ buildSearchColumnTaskbarAction() {
1551
+ var _a, _b;
1552
+ return {
1553
+ value: StringUtils.generateUUID(),
1554
+ label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage('snkGrid.findColumn', {})) !== null && _b !== void 0 ? _b : "",
1555
+ disableCloseOnSelect: true,
1556
+ eagerInitialize: true,
1557
+ itemBuilder: (_, item) => { var _a; return (_a = this.getColumnSearch(item)) !== null && _a !== void 0 ? _a : document.createElement('div'); },
1558
+ };
1559
+ }
1560
+ async initKeyboardManager() {
1561
+ var _a;
1562
+ this._keyboardManager = new KeyboardManager({ propagate: false, element: this._element });
1563
+ this._keyboardManager.bind(SHORTCUT_SEARCH_FIELD, async () => {
1564
+ var _a;
1565
+ await ((_a = this._snkFormView) === null || _a === void 0 ? void 0 : _a.showSearchField());
1566
+ }, { description: (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findFields"), element: this._element });
1567
+ }
1568
+ renderTabSelector() {
1569
+ if (!this.hasNonMainSheets()) {
1570
+ return undefined;
1571
+ }
1572
+ const selectedKey = this._selectedSheet && this._selectedSheet.name !== SnkDynaformDetailView.MAIN_TAB
1573
+ ? this._selectedSheet.name
1574
+ : undefined;
1575
+ return (h("ez-tabselector", { class: "ez-tabselector-internal", tabs: this.buildInternalTabItems(), selectedTab: selectedKey, onEzChange: (evt) => this.onInternalTabChange(evt.detail) }));
1576
+ }
1577
+ /**
1578
+ * Renderiza o conteúdo da aba selecionada, seguindo as mesmas regras do
1579
+ * formulário master (snk-dynaform-guides-view.getContent):
1580
+ * - Sheet de detalhe (child[...]) → snk-dynaform-detail-view aninhado.
1581
+ * - Sheet de formulário (ex.: "Geral") → snk-dynaform-form-view com os campos do sheet.
1582
+ */
1583
+ renderSelectedSheetContent() {
1584
+ if (!this._selectedSheet || this._selectedSheet.name === SnkDynaformDetailView.MAIN_TAB) {
1585
+ return undefined;
1586
+ }
1587
+ const childEntityName = FormMetadata.getDetailName(this._selectedSheet.name);
1588
+ if (childEntityName) {
1589
+ return (h("snk-dynaform-detail-view", { key: `sub_${this.dataUnitName}_${this._selectedSheet.name}`, dataUnitName: `${this.dataUnitName}/${childEntityName}`, entityName: childEntityName, label: this._selectedSheet.label, resourceID: this.resourceID, canEdit: this.canEdit, messagesBuilder: this.messagesBuilder, customEditors: this.customEditors, customRenders: this.customRenders, presentationMode: this.presentationMode, taskbarCustomContainerId: this.taskbarCustomContainerId }));
1590
+ }
1591
+ return (h("snk-dynaform-form-view", { key: `sheet_${this._selectedSheet.name}`, name: this._selectedSheet.name, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this._selectedSheet.fields, fieldToFocus: this._fieldToGetFocus, label: this._selectedSheet.label, onSnkRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), fieldSearch: this._fieldSearch }));
1592
+ }
1593
+ renderViewStack() {
1594
+ var _a, _b;
1595
+ return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref }, h("stack-item", { class: "ez-size-width--full ez-size-height--full" }, h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => {
1596
+ if (ref)
1597
+ this._snkGrid = ref;
1598
+ }, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.changeViewMode(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: this.presentationMode, canEdit: this.canEdit, isDetail: true, taskbarCustomContainerId: this.taskbarCustomContainerId, gridHeaderCustomSlotId: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS", topTaskbarCustomSlotId: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS", outlineMode: true, enableGridInsert: true, autoLoad: true, multipleEditionEnabled: true, multipleSelection: true, hideHeader: true, hideGridTaskbar: true })), h("stack-item", { class: "ez-size-width--full ez-size-height--full grid-container" }, h("div", { class: "form-and-detail-container" }, h("snk-dynaform-form-view", { ref: (ref) => {
1599
+ if (ref)
1600
+ this._snkFormView = ref;
1601
+ }, name: SnkDynaformDetailView.MAIN_TAB, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), fieldToFocus: this._fieldToGetFocus, label: this.label, onSnkRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), fieldSearch: this._fieldSearch }, this.renderSelectedRecordHeader()), this.renderTabSelector(), this.renderSelectedSheetContent())), h("snk-attach", { ref: (ref) => this._snkAttach = ref, registerKey: (_a = this.attachmentRegisterKey) !== null && _a !== void 0 ? _a : '', messagesBuilder: this.messagesBuilder, entityName: (_b = this.entityName) !== null && _b !== void 0 ? _b : '' })));
1602
+ }
1603
+ render() {
1604
+ return (h(Host, null, h("snk-data-unit", { ref: (el) => {
1605
+ if (el)
1606
+ this._snkDataUnit = el;
1607
+ }, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("snk-taskbar", { key: "detailViewTaskbar", class: "form-taskbar", "data-element-id": "detail_top", configName: this._configName, messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, primaryButton: "INSERT", overflowStrategy: "hiddenItems", alignRigth: true, sizeButtons: 'small', presentationMode: this.presentationMode, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: "DETAIL_TASKBAR_CUSTOM_ELEMENTS", actionsSettingsList: this.getSettingsListForm(), customActionsList: this.buildTaskbarCustomActionsList() }, h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" })), this.renderViewStack())));
1608
+ }
1609
+ get _element() { return this; }
1610
+ static get watchers() { return {
1611
+ "dataUnit": ["observeDataUnit"],
1612
+ "dataState": ["observerDataState"],
1613
+ "customEditors": ["observerPropsCustomEditor"],
1614
+ "customRenders": ["observeCustomRenders"]
1615
+ }; }
1616
+ static get style() { return snkDynaformDetailViewCss; }
1617
+ }, [6, "snk-dynaform-detail-view", {
1618
+ "formConfigManager": [1040],
1619
+ "dataUnitName": [1, "data-unit-name"],
1620
+ "resourceID": [1, "resource-i-d"],
1621
+ "entityName": [1, "entity-name"],
1622
+ "label": [1],
1623
+ "dataUnit": [1040],
1624
+ "selectedForm": [1025, "selected-form"],
1625
+ "dataState": [1040],
1626
+ "messagesBuilder": [1040],
1627
+ "canEdit": [4, "can-edit"],
1628
+ "taskbarCustomContainerId": [1, "taskbar-custom-container-id"],
1629
+ "customEditors": [16],
1630
+ "customRenders": [16],
1631
+ "presentationMode": [1, "presentation-mode"],
1632
+ "_currentView": [32],
1633
+ "attachmentRegisterKey": [32],
1634
+ "_fieldToGetFocus": [32],
1635
+ "_hasToCreateFieldSearch": [32],
1636
+ "_selectedSheet": [32],
1637
+ "_internalErrorTabs": [32],
1638
+ "_selectedRecordPKDisplay": [32],
1639
+ "changeViewMode": [64],
1640
+ "configGrid": [64],
1641
+ "showUp": [64],
1642
+ "addCustomEditor": [64],
1643
+ "addGridCustomRender": [64]
1644
+ }, [[0, "snkContentCardChanged", "onContentCardChanged"]]]);
1645
+ SnkDynaformDetailView.MAIN_TAB = "__main";
1646
+ function defineCustomElement() {
1647
+ if (typeof customElements === "undefined") {
1648
+ return;
1649
+ }
1650
+ const components = ["snk-dynaform-detail-view", "snk-actions-button", "snk-attach", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-default-filter", "snk-dynaform-detail-view", "snk-dynaform-form-view", "snk-exporter-email-sender", "snk-expression-group", "snk-expression-item", "snk-filter-advanced-mode", "snk-filter-assistent-mode", "snk-filter-bar", "snk-filter-detail", "snk-filter-field-search", "snk-filter-item", "snk-filter-modal", "snk-filter-modal-item", "snk-filter-param-config", "snk-grid", "snk-grid-config", "snk-image-input", "snk-layout-form-config", "snk-numbering-config", "snk-personalized-filter", "snk-select-box", "snk-simple-bar", "snk-simple-crud", "snk-simple-form-config", "snk-taskbar", "snk-taskbar-skeleton", "snk-view-representation", "taskbar-actions-button", "taskbar-split-button"];
1651
+ components.forEach(tagName => { switch (tagName) {
1652
+ case "snk-dynaform-detail-view":
1653
+ if (!customElements.get(tagName)) {
1654
+ customElements.define(tagName, SnkDynaformDetailView);
1655
+ }
1656
+ break;
1657
+ case "snk-actions-button":
1658
+ if (!customElements.get(tagName)) {
1659
+ defineCustomElement$H();
1660
+ }
1661
+ break;
1662
+ case "snk-attach":
1663
+ if (!customElements.get(tagName)) {
1664
+ defineCustomElement$G();
1665
+ }
1666
+ break;
1667
+ case "snk-configurator":
1668
+ if (!customElements.get(tagName)) {
1669
+ defineCustomElement$F();
1670
+ }
1671
+ break;
1672
+ case "snk-data-exporter":
1673
+ if (!customElements.get(tagName)) {
1674
+ defineCustomElement$E();
1675
+ }
1676
+ break;
1677
+ case "snk-data-unit":
1678
+ if (!customElements.get(tagName)) {
1679
+ defineCustomElement$D();
1680
+ }
1681
+ break;
1682
+ case "snk-default-filter":
1683
+ if (!customElements.get(tagName)) {
1684
+ defineCustomElement$C();
1685
+ }
1686
+ break;
1687
+ case "snk-dynaform-detail-view":
1688
+ if (!customElements.get(tagName)) {
1689
+ defineCustomElement();
1690
+ }
1691
+ break;
1692
+ case "snk-dynaform-form-view":
1693
+ if (!customElements.get(tagName)) {
1694
+ defineCustomElement$u();
1695
+ }
1696
+ break;
1697
+ case "snk-exporter-email-sender":
1698
+ if (!customElements.get(tagName)) {
1699
+ defineCustomElement$s();
1700
+ }
1701
+ break;
1702
+ case "snk-expression-group":
1703
+ if (!customElements.get(tagName)) {
1704
+ defineCustomElement$r();
1705
+ }
1706
+ break;
1707
+ case "snk-expression-item":
1708
+ if (!customElements.get(tagName)) {
1709
+ defineCustomElement$q();
1710
+ }
1711
+ break;
1712
+ case "snk-filter-advanced-mode":
1713
+ if (!customElements.get(tagName)) {
1714
+ defineCustomElement$p();
1715
+ }
1716
+ break;
1717
+ case "snk-filter-assistent-mode":
1718
+ if (!customElements.get(tagName)) {
1719
+ defineCustomElement$o();
1720
+ }
1721
+ break;
1722
+ case "snk-filter-bar":
1723
+ if (!customElements.get(tagName)) {
1724
+ defineCustomElement$n();
1725
+ }
1726
+ break;
1727
+ case "snk-filter-detail":
1728
+ if (!customElements.get(tagName)) {
1729
+ defineCustomElement$m();
1730
+ }
1731
+ break;
1732
+ case "snk-filter-field-search":
1733
+ if (!customElements.get(tagName)) {
1734
+ defineCustomElement$l();
1735
+ }
1736
+ break;
1737
+ case "snk-filter-item":
1738
+ if (!customElements.get(tagName)) {
1739
+ defineCustomElement$k();
1740
+ }
1741
+ break;
1742
+ case "snk-filter-modal":
1743
+ if (!customElements.get(tagName)) {
1744
+ defineCustomElement$j();
1745
+ }
1746
+ break;
1747
+ case "snk-filter-modal-item":
1748
+ if (!customElements.get(tagName)) {
1749
+ defineCustomElement$i();
1750
+ }
1751
+ break;
1752
+ case "snk-filter-param-config":
1753
+ if (!customElements.get(tagName)) {
1754
+ defineCustomElement$h();
1755
+ }
1756
+ break;
1757
+ case "snk-grid":
1758
+ if (!customElements.get(tagName)) {
1759
+ defineCustomElement$g();
1760
+ }
1761
+ break;
1762
+ case "snk-grid-config":
1763
+ if (!customElements.get(tagName)) {
1764
+ defineCustomElement$f();
1765
+ }
1766
+ break;
1767
+ case "snk-image-input":
1768
+ if (!customElements.get(tagName)) {
1769
+ defineCustomElement$e();
1770
+ }
1771
+ break;
1772
+ case "snk-layout-form-config":
1773
+ if (!customElements.get(tagName)) {
1774
+ defineCustomElement$d();
1775
+ }
1776
+ break;
1777
+ case "snk-numbering-config":
1778
+ if (!customElements.get(tagName)) {
1779
+ defineCustomElement$c();
1780
+ }
1781
+ break;
1782
+ case "snk-personalized-filter":
1783
+ if (!customElements.get(tagName)) {
1784
+ defineCustomElement$b();
1785
+ }
1786
+ break;
1787
+ case "snk-select-box":
1788
+ if (!customElements.get(tagName)) {
1789
+ defineCustomElement$a();
1790
+ }
1791
+ break;
1792
+ case "snk-simple-bar":
1793
+ if (!customElements.get(tagName)) {
1794
+ defineCustomElement$9();
1795
+ }
1796
+ break;
1797
+ case "snk-simple-crud":
1798
+ if (!customElements.get(tagName)) {
1799
+ defineCustomElement$8();
1800
+ }
1801
+ break;
1802
+ case "snk-simple-form-config":
1803
+ if (!customElements.get(tagName)) {
1804
+ defineCustomElement$7();
1805
+ }
1806
+ break;
1807
+ case "snk-taskbar":
1808
+ if (!customElements.get(tagName)) {
1809
+ defineCustomElement$6();
1810
+ }
1811
+ break;
1812
+ case "snk-taskbar-skeleton":
1813
+ if (!customElements.get(tagName)) {
1814
+ defineCustomElement$5();
1815
+ }
1816
+ break;
1817
+ case "snk-view-representation":
1818
+ if (!customElements.get(tagName)) {
1819
+ defineCustomElement$4();
1820
+ }
1821
+ break;
1822
+ case "taskbar-actions-button":
1823
+ if (!customElements.get(tagName)) {
1824
+ defineCustomElement$3();
1825
+ }
1826
+ break;
1827
+ case "taskbar-split-button":
1828
+ if (!customElements.get(tagName)) {
1829
+ defineCustomElement$2();
1830
+ }
1831
+ break;
1832
+ } });
1833
+ }
1834
+
1835
+ export { SnkDynaformDetailView as S, defineCustomElement as a, SnkDynaformGuidesViewer as b, defineCustomElement$1 as d };