@sankhyalabs/sankhyablocks 10.1.0-dev.2 → 10.1.0-dev.21

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 (318) hide show
  1. package/dist/cjs/{ConfigStorage-5a73e979.js → ConfigStorage-a4e1e518.js} +2 -2
  2. package/dist/cjs/{DataFetcher-eeb3b0b7.js → DataFetcher-0b6aa084.js} +34 -24
  3. package/dist/cjs/{FormConfigHelper-ebb77625.js → FormConfigHelper-28fe4668.js} +44 -0
  4. package/dist/cjs/{ISave-861e9d6d.js → ISave-2c455a77.js} +4 -4
  5. package/dist/cjs/{PersonalizedFilterUtils-7259cf65.js → PersonalizedFilterUtils-eccb267a.js} +13 -0
  6. package/dist/cjs/{SnkFormConfigManager-8d4fded8.js → SnkFormConfigManager-b8c81493.js} +7 -7
  7. package/dist/cjs/{SnkMultiSelectionListDataSource-3b93f6a6.js → SnkMultiSelectionListDataSource-03b58f5a.js} +5 -5
  8. package/dist/cjs/{auth-fetcher-8d8acd69.js → auth-fetcher-7e7796c9.js} +1 -1
  9. package/dist/cjs/config-header.cjs.entry.js +1 -1
  10. package/dist/cjs/configs-button.cjs.entry.js +1 -1
  11. package/dist/cjs/css-shim-a27d231b.js +6 -0
  12. package/dist/cjs/{dataunit-fetcher-1cea0695.js → dataunit-fetcher-8dffbcdf.js} +1 -1
  13. package/dist/cjs/dom-ff96a4bc.js +75 -0
  14. package/dist/cjs/field-config_2.cjs.entry.js +3 -3
  15. package/dist/cjs/fields-layout.cjs.entry.js +7 -4
  16. package/dist/cjs/fields-selector.cjs.entry.js +2 -2
  17. package/dist/cjs/{form-config-fetcher-f347f884.js → form-config-fetcher-5516d68a.js} +1 -1
  18. package/dist/cjs/guides-configurator.cjs.entry.js +6 -4
  19. package/dist/cjs/{index-1cf293c1.js → index-1894343a.js} +1515 -171
  20. package/dist/cjs/{index-13d05f03.js → index-f0fe7e6e.js} +90 -21
  21. package/dist/cjs/loader.cjs.js +16 -2
  22. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -5
  23. package/dist/cjs/sankhyablocks.cjs.js +132 -4
  24. package/dist/cjs/shadow-css-7e3e0ab1.js +389 -0
  25. package/dist/cjs/snk-actions-button_9.cjs.entry.js +6 -6
  26. package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
  27. package/dist/cjs/snk-application.cjs.entry.js +100 -70
  28. package/dist/cjs/snk-attach.cjs.entry.js +8 -8
  29. package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
  30. package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
  31. package/dist/cjs/snk-crud.cjs.entry.js +100 -9
  32. package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
  33. package/dist/cjs/snk-custom-slot-guide.cjs.entry.js +40 -0
  34. package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -6
  35. package/dist/cjs/{snk-data-unit-de248308.js → snk-data-unit-036ce58c.js} +12 -3
  36. package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
  37. package/dist/cjs/snk-default-filter.cjs.entry.js +1 -1
  38. package/dist/cjs/snk-detail-view.cjs.entry.js +10 -10
  39. package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
  40. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  41. package/dist/cjs/snk-expression-group_2.cjs.entry.js +2 -2
  42. package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +2 -2
  43. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +58 -25
  44. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
  45. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
  46. package/dist/cjs/snk-filter-detail.cjs.entry.js +2 -2
  47. package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +2 -2
  48. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +4 -4
  49. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
  50. package/dist/cjs/snk-filter-number.cjs.entry.js +2 -2
  51. package/dist/cjs/snk-filter-period.cjs.entry.js +11 -6
  52. package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
  53. package/dist/cjs/snk-filter-text.cjs.entry.js +2 -2
  54. package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
  55. package/dist/cjs/snk-form-view.cjs.entry.js +1 -1
  56. package/dist/cjs/snk-form_2.cjs.entry.js +33 -10
  57. package/dist/cjs/snk-grid.cjs.entry.js +28 -19
  58. package/dist/cjs/{snk-guides-viewer-4ec3e7e1.js → snk-guides-viewer-164c063e.js} +86 -40
  59. package/dist/cjs/snk-guides-viewer.cjs.entry.js +10 -10
  60. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
  61. package/dist/cjs/snk-personalized-filter.cjs.entry.js +6 -6
  62. package/dist/cjs/snk-pesquisa.cjs.entry.js +17 -6
  63. package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
  64. package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
  65. package/dist/cjs/snk-simple-crud.cjs.entry.js +14 -21
  66. package/dist/cjs/snk-taskbar.cjs.entry.js +67 -51
  67. package/dist/cjs/{taskbar-elements-fb5d1e08.js → taskbar-elements-8a80420e.js} +2 -2
  68. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  69. package/dist/collection/collection-manifest.json +2 -1
  70. package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.js +27 -0
  71. package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +5 -25
  72. package/dist/collection/components/snk-application/snk-application.js +105 -44
  73. package/dist/collection/components/snk-attach/snk-attach.js +1 -1
  74. package/dist/collection/components/snk-crud/snk-crud.js +151 -2
  75. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +133 -34
  76. package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.css +3 -0
  77. package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.js +95 -0
  78. package/dist/collection/components/snk-data-unit/snk-data-unit.js +9 -0
  79. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +2 -2
  80. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +11 -6
  81. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +1 -1
  82. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css +4 -0
  83. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +7 -1
  84. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +1 -0
  85. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +15 -4
  86. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +30 -13
  87. package/dist/collection/components/snk-form-config/FormConfigHelper.js +42 -0
  88. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -6
  89. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +1 -0
  90. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +16 -0
  91. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +6 -3
  92. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +3 -3
  93. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +5 -3
  94. package/dist/collection/components/snk-form-config/snk-form-config.js +53 -6
  95. package/dist/collection/components/snk-grid/snk-grid.css +12 -0
  96. package/dist/collection/components/snk-grid/snk-grid.js +39 -12
  97. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +13 -0
  98. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +5 -1
  99. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +43 -0
  100. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +23 -12
  101. package/dist/collection/components/snk-taskbar/snk-taskbar.js +87 -48
  102. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +3 -3
  103. package/dist/collection/lib/message/SnkMessageBuilder.js +11 -2
  104. package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +7 -0
  105. package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +7 -0
  106. package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +8 -1
  107. package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +1 -1
  108. package/dist/components/DataFetcher.js +34 -4
  109. package/dist/components/ISave.js +3 -3
  110. package/dist/components/PersonalizedFilterUtils.js +13 -0
  111. package/dist/components/SnkFormConfigManager.js +6 -6
  112. package/dist/components/field-config2.js +44 -2
  113. package/dist/components/fields-layout2.js +6 -3
  114. package/dist/components/guides-configurator2.js +5 -3
  115. package/dist/components/index.d.ts +1 -0
  116. package/dist/components/index.js +1 -0
  117. package/dist/components/index2.js +90 -21
  118. package/dist/components/snk-application2.js +94 -63
  119. package/dist/components/snk-attach2.js +1 -1
  120. package/dist/components/snk-crud.js +96 -1
  121. package/dist/components/snk-custom-slot-guide.d.ts +11 -0
  122. package/dist/components/snk-custom-slot-guide.js +55 -0
  123. package/dist/components/snk-data-unit2.js +9 -0
  124. package/dist/components/snk-detail-view2.js +81 -34
  125. package/dist/components/snk-filter-bar2.js +30 -13
  126. package/dist/components/snk-filter-item2.js +8 -2
  127. package/dist/components/snk-filter-modal2.js +16 -6
  128. package/dist/components/snk-filter-number.js +2 -2
  129. package/dist/components/snk-filter-period.js +10 -5
  130. package/dist/components/snk-filter-text.js +1 -1
  131. package/dist/components/snk-form-config2.js +29 -5
  132. package/dist/components/snk-grid2.js +22 -11
  133. package/dist/components/snk-pesquisa2.js +14 -2
  134. package/dist/components/snk-simple-crud2.js +6 -12
  135. package/dist/components/snk-taskbar2.js +66 -49
  136. package/dist/esm/{ConfigStorage-568dc227.js → ConfigStorage-39ac8fef.js} +2 -2
  137. package/dist/esm/{DataFetcher-743feb3b.js → DataFetcher-0b9da57d.js} +34 -4
  138. package/dist/esm/{FormConfigHelper-4e42f0b6.js → FormConfigHelper-d09669f3.js} +43 -1
  139. package/dist/esm/{ISave-345481c1.js → ISave-f1c9269b.js} +4 -4
  140. package/dist/esm/{PersonalizedFilterUtils-2db38ff2.js → PersonalizedFilterUtils-d2439a9a.js} +13 -0
  141. package/dist/esm/{SnkFormConfigManager-d61df0c8.js → SnkFormConfigManager-a87566c8.js} +7 -7
  142. package/dist/esm/{SnkMultiSelectionListDataSource-ca8d7a09.js → SnkMultiSelectionListDataSource-01b3744b.js} +5 -5
  143. package/dist/esm/{auth-fetcher-c353127d.js → auth-fetcher-acdc1cb4.js} +1 -1
  144. package/dist/esm/config-header.entry.js +1 -1
  145. package/dist/esm/configs-button.entry.js +1 -1
  146. package/dist/esm/css-shim-9f2d321e.js +4 -0
  147. package/dist/esm/{dataunit-fetcher-7f2c61ca.js → dataunit-fetcher-4c312b43.js} +1 -1
  148. package/dist/esm/dom-64053c71.js +73 -0
  149. package/dist/esm/field-config_2.entry.js +3 -3
  150. package/dist/esm/fields-layout.entry.js +7 -4
  151. package/dist/esm/fields-selector.entry.js +2 -2
  152. package/dist/esm/{form-config-fetcher-898d2dd1.js → form-config-fetcher-7cda6254.js} +1 -1
  153. package/dist/esm/guides-configurator.entry.js +6 -4
  154. package/dist/esm/{index-479e1293.js → index-04f73a26.js} +1507 -171
  155. package/dist/esm/{index-446f9341.js → index-ea250be6.js} +90 -21
  156. package/dist/esm/loader.js +17 -3
  157. package/dist/esm/pesquisa-grid_2.entry.js +5 -5
  158. package/dist/esm/sankhyablocks.js +133 -5
  159. package/dist/esm/shadow-css-98135883.js +387 -0
  160. package/dist/esm/snk-actions-button_9.entry.js +6 -6
  161. package/dist/esm/snk-actions-form.entry.js +1 -1
  162. package/dist/esm/snk-application.entry.js +100 -70
  163. package/dist/esm/snk-attach.entry.js +8 -8
  164. package/dist/esm/snk-client-confirm.entry.js +1 -1
  165. package/dist/esm/snk-configurator.entry.js +1 -1
  166. package/dist/esm/snk-crud.entry.js +100 -9
  167. package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
  168. package/dist/esm/snk-custom-slot-guide.entry.js +36 -0
  169. package/dist/esm/snk-data-exporter.entry.js +6 -6
  170. package/dist/esm/{snk-data-unit-60b338c5.js → snk-data-unit-130021b3.js} +12 -3
  171. package/dist/esm/snk-data-unit.entry.js +4 -4
  172. package/dist/esm/snk-default-filter.entry.js +1 -1
  173. package/dist/esm/snk-detail-view.entry.js +10 -10
  174. package/dist/esm/snk-entity-list.entry.js +1 -1
  175. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  176. package/dist/esm/snk-expression-group_2.entry.js +2 -2
  177. package/dist/esm/snk-filter-advanced-mode_2.entry.js +2 -2
  178. package/dist/esm/snk-filter-bar_4.entry.js +58 -25
  179. package/dist/esm/snk-filter-binary-select.entry.js +1 -1
  180. package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
  181. package/dist/esm/snk-filter-detail.entry.js +2 -2
  182. package/dist/esm/snk-filter-field-search_2.entry.js +2 -2
  183. package/dist/esm/snk-filter-modal-item.entry.js +4 -4
  184. package/dist/esm/snk-filter-multi-select.entry.js +1 -1
  185. package/dist/esm/snk-filter-number.entry.js +2 -2
  186. package/dist/esm/snk-filter-period.entry.js +11 -6
  187. package/dist/esm/snk-filter-search.entry.js +1 -1
  188. package/dist/esm/snk-filter-text.entry.js +2 -2
  189. package/dist/esm/snk-form-summary.entry.js +1 -1
  190. package/dist/esm/snk-form-view.entry.js +1 -1
  191. package/dist/esm/snk-form_2.entry.js +33 -10
  192. package/dist/esm/snk-grid.entry.js +28 -19
  193. package/dist/esm/{snk-guides-viewer-339e10b3.js → snk-guides-viewer-3fd18298.js} +86 -40
  194. package/dist/esm/snk-guides-viewer.entry.js +10 -10
  195. package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
  196. package/dist/esm/snk-personalized-filter.entry.js +6 -6
  197. package/dist/esm/snk-pesquisa.entry.js +17 -6
  198. package/dist/esm/snk-print-selector.entry.js +1 -1
  199. package/dist/esm/snk-simple-bar.entry.js +1 -1
  200. package/dist/esm/snk-simple-crud.entry.js +14 -21
  201. package/dist/esm/snk-taskbar.entry.js +68 -52
  202. package/dist/esm/{taskbar-elements-faaf5d8f.js → taskbar-elements-d1e63fb2.js} +2 -2
  203. package/dist/esm/teste-pesquisa.entry.js +1 -1
  204. package/dist/sankhyablocks/{p-7f7fe6c4.entry.js → p-0a160fb5.entry.js} +1 -1
  205. package/dist/sankhyablocks/{p-144da1d1.entry.js → p-12f595a6.entry.js} +1 -1
  206. package/dist/sankhyablocks/{p-162bddae.entry.js → p-175c9576.entry.js} +1 -1
  207. package/dist/sankhyablocks/p-18d66638.entry.js +1 -0
  208. package/dist/sankhyablocks/{p-1788d191.js → p-1f310bc6.js} +1 -1
  209. package/dist/sankhyablocks/{p-c4fcf1fb.entry.js → p-27e0cd68.entry.js} +1 -1
  210. package/dist/sankhyablocks/p-2a33d4cf.entry.js +1 -0
  211. package/dist/sankhyablocks/p-2ac55a5d.js +1 -0
  212. package/dist/sankhyablocks/{p-9a63f3f7.entry.js → p-2b882835.entry.js} +1 -1
  213. package/dist/sankhyablocks/{p-1f8cb438.entry.js → p-2c6be187.entry.js} +1 -1
  214. package/dist/sankhyablocks/p-2c9d0870.js +2 -0
  215. package/dist/sankhyablocks/{p-cb4343c4.entry.js → p-2cc2526e.entry.js} +1 -1
  216. package/dist/sankhyablocks/{p-75af335e.entry.js → p-2ebda226.entry.js} +1 -1
  217. package/dist/sankhyablocks/{p-093f58fa.entry.js → p-2f94cf87.entry.js} +1 -1
  218. package/dist/sankhyablocks/p-3a35917e.entry.js +1 -0
  219. package/dist/sankhyablocks/p-3a443150.entry.js +1 -0
  220. package/dist/sankhyablocks/{p-c90f337a.entry.js → p-3b6d8d33.entry.js} +1 -1
  221. package/dist/sankhyablocks/p-3db72758.entry.js +1 -0
  222. package/dist/sankhyablocks/{p-e8c49c12.js → p-48a5c311.js} +2 -2
  223. package/dist/sankhyablocks/p-52691b42.js +1 -0
  224. package/dist/sankhyablocks/{p-27482793.entry.js → p-5aae5c74.entry.js} +1 -1
  225. package/dist/sankhyablocks/p-6564180d.entry.js +1 -0
  226. package/dist/sankhyablocks/{p-6d241415.js → p-6768f176.js} +1 -1
  227. package/dist/sankhyablocks/p-68c1a093.js +1 -0
  228. package/dist/sankhyablocks/p-6d322b0a.js +1 -0
  229. package/dist/sankhyablocks/{p-7b3ca294.entry.js → p-7150eacf.entry.js} +1 -1
  230. package/dist/sankhyablocks/{p-825098c1.entry.js → p-752c57f4.entry.js} +1 -1
  231. package/dist/sankhyablocks/{p-49ddc27a.entry.js → p-752f4e29.entry.js} +1 -1
  232. package/dist/sankhyablocks/{p-e258de96.entry.js → p-76729994.entry.js} +1 -1
  233. package/dist/sankhyablocks/{p-7fc46290.js → p-7ee6b1bf.js} +1 -1
  234. package/dist/sankhyablocks/{p-27005fac.entry.js → p-877d9614.entry.js} +1 -1
  235. package/dist/sankhyablocks/p-8b4d6719.js +1 -0
  236. package/dist/sankhyablocks/{p-3d41f5a8.entry.js → p-8d946600.entry.js} +1 -1
  237. package/dist/sankhyablocks/{p-96d45943.entry.js → p-90ae6c2e.entry.js} +1 -1
  238. package/dist/sankhyablocks/p-94267a30.entry.js +1 -0
  239. package/dist/sankhyablocks/{p-59b8f277.js → p-998a9d6f.js} +1 -1
  240. package/dist/sankhyablocks/{p-21107f0d.entry.js → p-9c1ff75e.entry.js} +1 -1
  241. package/dist/sankhyablocks/{p-2fdac5e6.entry.js → p-9e109f5e.entry.js} +1 -1
  242. package/dist/sankhyablocks/{p-88ed2793.js → p-9e4555ab.js} +1 -1
  243. package/dist/sankhyablocks/p-a46ac091.js +1 -0
  244. package/dist/sankhyablocks/p-a73b6b00.js +1 -0
  245. package/dist/sankhyablocks/{p-164c822d.entry.js → p-acd2ba28.entry.js} +1 -1
  246. package/dist/sankhyablocks/{p-180716b2.entry.js → p-ae326d06.entry.js} +1 -1
  247. package/dist/sankhyablocks/p-b471bfab.entry.js +1 -0
  248. package/dist/sankhyablocks/p-b533edab.entry.js +1 -0
  249. package/dist/sankhyablocks/p-b555ce38.entry.js +1 -0
  250. package/dist/sankhyablocks/p-c2d33fc8.entry.js +1 -0
  251. package/dist/sankhyablocks/p-c3ec6642.js +19 -0
  252. package/dist/sankhyablocks/{p-91a9abb6.entry.js → p-c8043a53.entry.js} +1 -1
  253. package/dist/sankhyablocks/{p-c3dbf441.entry.js → p-cc64239c.entry.js} +1 -1
  254. package/dist/sankhyablocks/{p-b987e15d.js → p-cc9935af.js} +1 -1
  255. package/dist/sankhyablocks/{p-471b34f4.entry.js → p-cd00a3d1.entry.js} +1 -1
  256. package/dist/sankhyablocks/{p-b7e891cc.entry.js → p-cd40c8cf.entry.js} +1 -1
  257. package/dist/sankhyablocks/{p-bd203e8d.entry.js → p-cd412add.entry.js} +1 -1
  258. package/dist/sankhyablocks/{p-4c763b10.entry.js → p-d657f71f.entry.js} +1 -1
  259. package/dist/sankhyablocks/{p-e6b1c769.entry.js → p-d6dad5e4.entry.js} +1 -1
  260. package/dist/sankhyablocks/p-d714b6ca.js +1 -0
  261. package/dist/sankhyablocks/p-da455c82.js +12 -0
  262. package/dist/sankhyablocks/p-e30acdca.entry.js +1 -0
  263. package/dist/sankhyablocks/p-ec9027a7.entry.js +1 -0
  264. package/dist/sankhyablocks/p-ef9343c3.entry.js +1 -0
  265. package/dist/sankhyablocks/{p-667cab42.entry.js → p-f152ef98.entry.js} +1 -1
  266. package/dist/sankhyablocks/{p-7e250432.entry.js → p-f7170e10.entry.js} +1 -1
  267. package/dist/sankhyablocks/p-f8c5395a.entry.js +1 -0
  268. package/dist/sankhyablocks/{p-7345782c.entry.js → p-f921270b.entry.js} +1 -1
  269. package/dist/sankhyablocks/p-fa087ab2.entry.js +11 -0
  270. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  271. package/dist/types/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.d.ts +5 -0
  272. package/dist/types/components/snk-application/snk-application.d.ts +9 -0
  273. package/dist/types/components/snk-crud/snk-crud.d.ts +22 -0
  274. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +23 -0
  275. package/dist/types/components/snk-custom-slot-guide/snk-custom-slot-guide.d.ts +16 -0
  276. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +1 -0
  277. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
  278. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -1
  279. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +2 -1
  280. package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +6 -1
  281. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +1 -1
  282. package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +2 -2
  283. package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +1 -1
  284. package/dist/types/components/snk-form-config/snk-form-config.d.ts +9 -2
  285. package/dist/types/components/snk-grid/snk-grid.d.ts +6 -0
  286. package/dist/types/components/snk-personalized-filter/interfaces/IParameter.d.ts +1 -0
  287. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +8 -0
  288. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -1
  289. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +12 -4
  290. package/dist/types/components.d.ts +113 -0
  291. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
  292. package/package.json +1 -1
  293. package/react/components.d.ts +1 -0
  294. package/react/components.js +1 -0
  295. package/react/components.js.map +1 -1
  296. package/dist/sankhyablocks/p-0cf9aa38.js +0 -1
  297. package/dist/sankhyablocks/p-11346b8d.entry.js +0 -1
  298. package/dist/sankhyablocks/p-1649f51e.entry.js +0 -1
  299. package/dist/sankhyablocks/p-1d585081.js +0 -1
  300. package/dist/sankhyablocks/p-3ed04f0d.entry.js +0 -1
  301. package/dist/sankhyablocks/p-4759912d.entry.js +0 -1
  302. package/dist/sankhyablocks/p-55798617.js +0 -1
  303. package/dist/sankhyablocks/p-56948f00.entry.js +0 -11
  304. package/dist/sankhyablocks/p-60dd1d27.entry.js +0 -1
  305. package/dist/sankhyablocks/p-626b7a17.js +0 -1
  306. package/dist/sankhyablocks/p-8f73da95.js +0 -1
  307. package/dist/sankhyablocks/p-95c71f5e.entry.js +0 -1
  308. package/dist/sankhyablocks/p-988afe78.js +0 -1
  309. package/dist/sankhyablocks/p-9f2cdaab.entry.js +0 -1
  310. package/dist/sankhyablocks/p-9fe91526.js +0 -1
  311. package/dist/sankhyablocks/p-a5108625.entry.js +0 -1
  312. package/dist/sankhyablocks/p-aae4258d.entry.js +0 -1
  313. package/dist/sankhyablocks/p-af9d79e0.entry.js +0 -1
  314. package/dist/sankhyablocks/p-bb0de89c.entry.js +0 -1
  315. package/dist/sankhyablocks/p-d8d8169b.js +0 -2
  316. package/dist/sankhyablocks/p-e64958ba.entry.js +0 -1
  317. package/dist/sankhyablocks/p-f25c50f7.entry.js +0 -1
  318. package/dist/sankhyablocks/p-f8f29e1a.entry.js +0 -1
@@ -16,6 +16,38 @@ export class SnkCrud {
16
16
  this._viewHistory = [];
17
17
  this._customEditors = new Map();
18
18
  this._customRenders = new Map();
19
+ this.loadEntitySuggestions = async (argument) => {
20
+ var _a;
21
+ const value = (_a = argument === null || argument === void 0 ? void 0 : argument.argument) !== null && _a !== void 0 ? _a : '';
22
+ const mode = (argument === null || argument === void 0 ? void 0 : argument.mode) || "PREDICTIVE";
23
+ if (!value || value.trim().length === 0) {
24
+ return [];
25
+ }
26
+ try {
27
+ this._showMoreOnSearch = false;
28
+ const entityName = this._snkDataUnit.entityName;
29
+ if (mode === "PREDICTIVE") {
30
+ return await this.handlePredictiveSearch(value, entityName);
31
+ }
32
+ return await this._application.executePreparedSearch(mode, value, this.buildSearchOptions(entityName));
33
+ }
34
+ catch (error) {
35
+ console.error('Erro ao carregar sugestões de entidades:', error);
36
+ return [];
37
+ }
38
+ };
39
+ this.searchEntitySelect = async (item) => {
40
+ if (!this._entityPKField || !item) {
41
+ return;
42
+ }
43
+ try {
44
+ const pk = [{ name: this._entityPKField, value: item.value }];
45
+ await this.refreshDataUnitByPk(pk);
46
+ }
47
+ catch (error) {
48
+ console.error('Erro ao selecionar entidade:', error);
49
+ }
50
+ };
19
51
  this.dataUnitInterceptor = {
20
52
  interceptAction: (action) => {
21
53
  if (action.type === DUAction.DATA_SAVED) {
@@ -32,6 +64,8 @@ export class SnkCrud {
32
64
  this._resourceID = undefined;
33
65
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
34
66
  this.numberingConfig = undefined;
67
+ this._showMoreOnSearch = false;
68
+ this._entityPKField = undefined;
35
69
  this.enableLockManagerLoadingComp = false;
36
70
  this.enableLockManagerTaskbarClick = false;
37
71
  this.configName = undefined;
@@ -60,6 +94,8 @@ export class SnkCrud {
60
94
  this.layoutFormConfig = true;
61
95
  this.multipleEditionEnabled = true;
62
96
  this.paginationCounterMode = 'auto';
97
+ this.customGuidesConfig = [];
98
+ this.showEntitySearch = true;
63
99
  this.disableNumberingConfig = false;
64
100
  }
65
101
  /**
@@ -356,6 +392,49 @@ export class SnkCrud {
356
392
  var _a;
357
393
  (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
358
394
  }
395
+ async handlePredictiveSearch(argument, entityName) {
396
+ var _a, _b;
397
+ const response = await this._application.executePreparedSearchWithFullResponse(argument, this.buildSearchOptions(entityName, 5));
398
+ this._showMoreOnSearch = (_a = response === null || response === void 0 ? void 0 : response.hasMore) !== null && _a !== void 0 ? _a : false;
399
+ this._entityPKField = response === null || response === void 0 ? void 0 : response.pkField;
400
+ return (_b = response === null || response === void 0 ? void 0 : response.data) !== null && _b !== void 0 ? _b : [];
401
+ }
402
+ async refreshDataUnitByPk(pks) {
403
+ try {
404
+ const pkField = pks[0].name;
405
+ const pkValue = pks[0].value;
406
+ // Criar filtro para a busca específica
407
+ const quickFilter = {
408
+ term: '',
409
+ filter: {
410
+ name: '',
411
+ params: [],
412
+ expression: `(${pkField} = ${pkValue})`
413
+ }
414
+ };
415
+ // Carregar dados com o filtro aplicado diretamente
416
+ await this._dataUnit.loadData(quickFilter);
417
+ // Navegar para o formulário se houver apenas um registro
418
+ if (this._dataUnit.records.length === 1) {
419
+ this._dataUnit.selectFirst();
420
+ this.gridToForm(true);
421
+ }
422
+ }
423
+ catch (error) {
424
+ console.error('Erro ao atualizar dataset:', error);
425
+ }
426
+ }
427
+ buildSearchOptions(entityName, limit) {
428
+ return {
429
+ entity: entityName,
430
+ entityDescription: entityName,
431
+ executeOnOpen: true,
432
+ searchOptions: {
433
+ localEntityName: entityName,
434
+ limit,
435
+ }
436
+ };
437
+ }
359
438
  async toggleView() {
360
439
  const currentView = await this._viewStack.getSelectedIndex();
361
440
  this.setViewMode(VIEW_MODE.GRID === currentView ? VIEW_MODE.FORM : VIEW_MODE.GRID);
@@ -462,12 +541,23 @@ export class SnkCrud {
462
541
  }
463
542
  this.configuratorCancel.emit();
464
543
  }
544
+ renderCustomGuideSlots() {
545
+ if (!this.customGuidesConfig)
546
+ return;
547
+ return this.customGuidesConfig.map(g => h("slot", { name: g.id }));
548
+ }
549
+ renderDynamicSearch(slotName) {
550
+ var _a;
551
+ if (!this.showEntitySearch || ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.insertionMode) === true)
552
+ return;
553
+ return (h("div", { slot: slotName, class: "entity-search-container", style: { position: 'relative', display: 'inline-block', marginLeft: '10px', minWidth: '200px' } }, h("ez-search", { label: "Buscar registros", optionLoader: this.loadEntitySuggestions, onEzChange: (evt) => this.searchEntitySelect(evt.detail), mode: "slim", showMore: this._showMoreOnSearch, suppressEmptyOption: true, suppressInputPersist: true })));
554
+ }
465
555
  render() {
466
556
  if (this._resourceID == undefined) {
467
557
  return;
468
558
  }
469
559
  this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
470
- return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", { tabIndex: "0" }, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: this._snkDataUnit.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
560
+ return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }), this.renderDynamicSearch("GRID_HEADER_DYNAMIC_SEARCH"))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, customGuidesConfig: this.customGuidesConfig, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), this.renderCustomGuideSlots(), this.renderDynamicSearch("GUIDES_VIEWER_DYNAMIC_SEARCH"), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", { tabIndex: "0" }, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: this._snkDataUnit.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
471
561
  }
472
562
  static get is() { return "snk-crud"; }
473
563
  static get encapsulation() { return "scoped"; }
@@ -1004,6 +1094,48 @@ export class SnkCrud {
1004
1094
  "reflect": false,
1005
1095
  "defaultValue": "'auto'"
1006
1096
  },
1097
+ "customGuidesConfig": {
1098
+ "type": "unknown",
1099
+ "mutable": false,
1100
+ "complexType": {
1101
+ "original": "Array<CustomGuideItem>",
1102
+ "resolved": "CustomGuideItem[]",
1103
+ "references": {
1104
+ "Array": {
1105
+ "location": "global"
1106
+ },
1107
+ "CustomGuideItem": {
1108
+ "location": "import",
1109
+ "path": "./subcomponents/snk-guides-viewer"
1110
+ }
1111
+ }
1112
+ },
1113
+ "required": false,
1114
+ "optional": true,
1115
+ "docs": {
1116
+ "tags": [],
1117
+ "text": "Fornece as informa\u00E7\u00F5es das guias personalizadas."
1118
+ },
1119
+ "defaultValue": "[]"
1120
+ },
1121
+ "showEntitySearch": {
1122
+ "type": "boolean",
1123
+ "mutable": false,
1124
+ "complexType": {
1125
+ "original": "boolean",
1126
+ "resolved": "boolean",
1127
+ "references": {}
1128
+ },
1129
+ "required": false,
1130
+ "optional": true,
1131
+ "docs": {
1132
+ "tags": [],
1133
+ "text": "Define se o campo de busca de entidades ser\u00E1 exibido na barra superior."
1134
+ },
1135
+ "attribute": "show-entity-search",
1136
+ "reflect": false,
1137
+ "defaultValue": "true"
1138
+ },
1007
1139
  "disableNumberingConfig": {
1008
1140
  "type": "boolean",
1009
1141
  "mutable": false,
@@ -1033,11 +1165,28 @@ export class SnkCrud {
1033
1165
  "_canEdit": {},
1034
1166
  "_resourceID": {},
1035
1167
  "customContainerId": {},
1036
- "numberingConfig": {}
1168
+ "numberingConfig": {},
1169
+ "_showMoreOnSearch": {},
1170
+ "_entityPKField": {}
1037
1171
  };
1038
1172
  }
1039
1173
  static get events() {
1040
1174
  return [{
1175
+ "method": "snkShowGuide",
1176
+ "name": "snkShowGuide",
1177
+ "bubbles": true,
1178
+ "cancelable": true,
1179
+ "composed": true,
1180
+ "docs": {
1181
+ "tags": [],
1182
+ "text": "Emitido pelo guides-viewer sempre que houver mudan\u00E7a de guia."
1183
+ },
1184
+ "complexType": {
1185
+ "original": "string",
1186
+ "resolved": "string",
1187
+ "references": {}
1188
+ }
1189
+ }, {
1041
1190
  "method": "actionClick",
1042
1191
  "name": "actionClick",
1043
1192
  "bubbles": true,
@@ -30,6 +30,7 @@ export class SnkGuidesViewer {
30
30
  this.enableGridInsert = false;
31
31
  this.ignoreReadOnlyFormFields = undefined;
32
32
  this.getCustomTitle = undefined;
33
+ this.customGuidesConfig = [];
33
34
  this._hasToCreateFieldSearch = true;
34
35
  this._breadcrumbItems = [];
35
36
  this._guides = undefined;
@@ -44,6 +45,13 @@ export class SnkGuidesViewer {
44
45
  observeDataUnit() {
45
46
  this.loadGuides(true);
46
47
  }
48
+ async observeFormConfigManager(value) {
49
+ const showFormConfig = !!value;
50
+ await this._viewStack.show(showFormConfig ?
51
+ GUIDES_VIEWER_VIEW_MODE.CONFIG :
52
+ GUIDES_VIEWER_VIEW_MODE.GUIDES);
53
+ this.formConfigVisibilityChanged.emit(showFormConfig);
54
+ }
47
55
  observeDataState(newValue, oldValue) {
48
56
  var _a, _b, _c, _d, _e, _f;
49
57
  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__'];
@@ -92,7 +100,8 @@ export class SnkGuidesViewer {
92
100
  * Atribui o foco para o componente.
93
101
  */
94
102
  async setFocus() {
95
- this._container.focus();
103
+ var _a;
104
+ (_a = this._container) === null || _a === void 0 ? void 0 : _a.focus();
96
105
  }
97
106
  /**
98
107
  * Recarrega os guias baseada nos metadados atuais.
@@ -142,7 +151,7 @@ export class SnkGuidesViewer {
142
151
  if (!this._configManager.isLoaded) {
143
152
  return;
144
153
  }
145
- this._masterFormMetadata = buildFormMetadata(this.masterFormConfig, this.dataUnit, true);
154
+ this._masterFormMetadata = buildFormMetadata(this.masterFormConfig, this.dataUnit, true, this.customGuidesConfig);
146
155
  const allSheets = this._masterFormMetadata.getAllSheets();
147
156
  const currentRecord = this.dataUnit.getSelectedRecord();
148
157
  const disableDetails = this.hasToDisableDetails(currentRecord);
@@ -153,6 +162,13 @@ export class SnkGuidesViewer {
153
162
  item.tooltip = this.getMessage("snkCrud.detail.tooltip.needSingleSelection");
154
163
  item.disabled = true;
155
164
  }
165
+ if (sheet.isCustom && sheet.ctxProps) {
166
+ Object.entries(sheet.ctxProps).forEach(([key, value]) => {
167
+ if (value !== undefined) {
168
+ item[key] = value;
169
+ }
170
+ });
171
+ }
156
172
  guides.push(item);
157
173
  });
158
174
  this._guides = guides;
@@ -288,38 +304,52 @@ export class SnkGuidesViewer {
288
304
  return `${this.entityPath}/${entityName}`;
289
305
  }
290
306
  getContent() {
291
- var _a, _b, _c, _d, _e;
292
307
  if (!this.selectedGuide) {
308
+ this.snkShowGuide.emit(undefined);
293
309
  return;
294
310
  }
295
311
  const guideId = this.selectedGuide.id;
296
- let content;
312
+ this.snkShowGuide.emit(guideId);
313
+ if (this.isCustomGuide(guideId)) {
314
+ return h("slot", { name: guideId });
315
+ }
297
316
  const levels = guideId.split("::");
298
317
  const currentLevel = levels.pop();
299
318
  const childEntityName = FormMetadata.getDetailName(currentLevel);
300
319
  let detailId = guideId;
301
- if (childEntityName || levels.length > 0) {
302
- let formName;
303
- let detailBranch;
304
- if (guideId.includes(FORM_NAME_PREFIX)) {
305
- [detailId, formName] = guideId.split(FORM_NAME_PREFIX);
306
- const pathSize = ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) || 0;
307
- detailBranch = pathSize > 1 ? this._breadcrumbItems[pathSize - 2] : this.selectedGuide;
308
- }
309
- else {
310
- detailBranch = this.selectedGuide;
311
- }
312
- content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders, presentationMode: this.presentationMode }));
320
+ if (this.isDetailGuide(childEntityName, levels)) {
321
+ return this.buildDetailGuideContent(guideId, detailId, levels, childEntityName);
322
+ }
323
+ return this.buildFormViewGuideContent(guideId);
324
+ }
325
+ buildFormViewGuideContent(cardId) {
326
+ var _a, _b, _c, _d;
327
+ const sheet = this._masterFormMetadata.getSheet(cardId);
328
+ if (!sheet)
329
+ return;
330
+ const cardConfig = (_b = (_a = this.masterFormConfig) === null || _a === void 0 ? void 0 : _a.cardsState) === null || _b === void 0 ? void 0 : _b.get(cardId);
331
+ return (h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_d = (_c = this.masterFormConfig) === null || _c === void 0 ? void 0 : _c.summary) === null || _d === void 0 ? void 0 : _d.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: cardId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps, fieldSearch: this._fieldSearch }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar()));
332
+ }
333
+ isDetailGuide(childEntityName, levels) {
334
+ return childEntityName || levels.length > 0;
335
+ }
336
+ buildDetailGuideContent(guideId, detailId, levels, childEntityName) {
337
+ var _a;
338
+ let formName;
339
+ let detailBranch;
340
+ if (guideId.includes(FORM_NAME_PREFIX)) {
341
+ [detailId, formName] = guideId.split(FORM_NAME_PREFIX);
342
+ const pathSize = ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) || 0;
343
+ detailBranch = pathSize > 1 ? this._breadcrumbItems[pathSize - 2] : this.selectedGuide;
313
344
  }
314
345
  else {
315
- const cardId = this.selectedGuide.id;
316
- const sheet = this._masterFormMetadata.getSheet(cardId);
317
- if (sheet) {
318
- const cardConfig = (_c = (_b = this.masterFormConfig) === null || _b === void 0 ? void 0 : _b.cardsState) === null || _c === void 0 ? void 0 : _c.get(cardId);
319
- content = h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: guideId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps, fieldSearch: this._fieldSearch }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar());
320
- }
346
+ detailBranch = this.selectedGuide;
321
347
  }
322
- return content;
348
+ return this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders, presentationMode: this.presentationMode }));
349
+ }
350
+ isCustomGuide(guideId) {
351
+ var _a;
352
+ return (_a = this.customGuidesConfig) === null || _a === void 0 ? void 0 : _a.map(g => g.id).includes(guideId);
323
353
  }
324
354
  onBreadcrumbClickHandler(item) {
325
355
  if ((item === null || item === void 0 ? void 0 : item.id) == undefined) {
@@ -457,7 +487,7 @@ export class SnkGuidesViewer {
457
487
  }
458
488
  buildTaskBar() {
459
489
  var _a;
460
- return h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.getActionsList(), actionsSettingsList: this.getSettingsListForm(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? TaskbarElement.SAVE : TaskbarElement.INSERT, "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS", alignRigth: true }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
490
+ return h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.getActionsList(), actionsSettingsList: this.getSettingsListForm(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? TaskbarElement.SAVE : TaskbarElement.INSERT, "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS", additionalSlotId: "GUIDES_VIEWER_DYNAMIC_SEARCH", alignRigth: true }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GUIDES_VIEWER_DYNAMIC_SEARCH" })));
461
491
  }
462
492
  async dataUnitActionHandler(action) {
463
493
  var _a;
@@ -531,6 +561,9 @@ export class SnkGuidesViewer {
531
561
  const labels = selectedRecords.map(record => this.messagesBuilder.getMessage("snkCrud.title", record));
532
562
  return `[${labels.join(", ")}]`;
533
563
  }
564
+ getCustomGuidesConfig() {
565
+ return this._currentDetail ? [] : this.customGuidesConfig;
566
+ }
534
567
  componentDidLoad() {
535
568
  this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
536
569
  this.initKeyboardManager();
@@ -547,17 +580,14 @@ export class SnkGuidesViewer {
547
580
  await this._mainForm.showSearchField();
548
581
  }, { description: this.getMessage("snkSimpleCrud.findFields"), element: this._element });
549
582
  }
550
- render() {
551
- var _a, _b;
583
+ renderFormConfig() {
552
584
  if (this._formEditorConfigManager != undefined) {
553
- return (h("snk-form-config", { ref: ref => this._container = ref, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = null }));
585
+ return (h("snk-form-config", { ref: ref => this._container = ref, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = null, customGuidesConfig: this.getCustomGuidesConfig() }));
554
586
  }
555
- if (!this.dataUnit || !this._configManager.isLoaded) {
556
- return;
557
- }
558
- this.loadTaskbarProcessor();
559
- const showGuides = this._guides && (this._guides.length > 1);
560
- return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
587
+ }
588
+ renderGuidesNavigator(showGuides) {
589
+ var _a, _b;
590
+ return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabIndex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
561
591
  h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
562
592
  h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
563
593
  :
@@ -573,6 +603,14 @@ export class SnkGuidesViewer {
573
603
  fieldsProps: this._fieldsProps
574
604
  }), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
575
605
  }
606
+ render() {
607
+ if (!this.dataUnit || !this._configManager.isLoaded) {
608
+ return;
609
+ }
610
+ this.loadTaskbarProcessor();
611
+ const showGuides = this._guides && (this._guides.length > 1);
612
+ return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "guides-viewer-stack" }, h("stack-item", null, this.renderGuidesNavigator(showGuides)), h("stack-item", null, this.renderFormConfig())));
613
+ }
576
614
  static get is() { return "snk-guides-viewer"; }
577
615
  static get encapsulation() { return "scoped"; }
578
616
  static get originalStyleUrls() {
@@ -726,7 +764,7 @@ export class SnkGuidesViewer {
726
764
  },
727
765
  "selectedGuide": {
728
766
  "type": "unknown",
729
- "mutable": false,
767
+ "mutable": true,
730
768
  "complexType": {
731
769
  "original": "IGuideItem",
732
770
  "resolved": "IGuideItem",
@@ -924,6 +962,29 @@ export class SnkGuidesViewer {
924
962
  "tags": [],
925
963
  "text": "Fornece uma fun\u00E7\u00E3o para obter um t\u00EDtulo customizado do formul\u00E1rio."
926
964
  }
965
+ },
966
+ "customGuidesConfig": {
967
+ "type": "unknown",
968
+ "mutable": false,
969
+ "complexType": {
970
+ "original": "Array<CustomGuideItem>",
971
+ "resolved": "CustomGuideItem[]",
972
+ "references": {
973
+ "Array": {
974
+ "location": "global"
975
+ },
976
+ "CustomGuideItem": {
977
+ "location": "local"
978
+ }
979
+ }
980
+ },
981
+ "required": false,
982
+ "optional": true,
983
+ "docs": {
984
+ "tags": [],
985
+ "text": "Fornece as informa\u00E7\u00F5es das guias personalizadas."
986
+ },
987
+ "defaultValue": "[]"
927
988
  }
928
989
  };
929
990
  }
@@ -943,6 +1004,21 @@ export class SnkGuidesViewer {
943
1004
  }
944
1005
  static get events() {
945
1006
  return [{
1007
+ "method": "snkShowGuide",
1008
+ "name": "snkShowGuide",
1009
+ "bubbles": true,
1010
+ "cancelable": true,
1011
+ "composed": true,
1012
+ "docs": {
1013
+ "tags": [],
1014
+ "text": "Emitido quando a uma gua \u00E9 exibida no formul\u00E1rio."
1015
+ },
1016
+ "complexType": {
1017
+ "original": "string",
1018
+ "resolved": "string",
1019
+ "references": {}
1020
+ }
1021
+ }, {
946
1022
  "method": "snkMasterFormConfigChange",
947
1023
  "name": "snkMasterFormConfigChange",
948
1024
  "bubbles": true,
@@ -962,6 +1038,21 @@ export class SnkGuidesViewer {
962
1038
  }
963
1039
  }
964
1040
  }
1041
+ }, {
1042
+ "method": "formConfigVisibilityChanged",
1043
+ "name": "formConfigVisibilityChanged",
1044
+ "bubbles": true,
1045
+ "cancelable": true,
1046
+ "composed": true,
1047
+ "docs": {
1048
+ "tags": [],
1049
+ "text": "Emitido quando a visibilidade do configurador do formul\u00E1rio \u00E9 alterada."
1050
+ },
1051
+ "complexType": {
1052
+ "original": "boolean",
1053
+ "resolved": "boolean",
1054
+ "references": {}
1055
+ }
965
1056
  }, {
966
1057
  "method": "exit",
967
1058
  "name": "exit",
@@ -1159,6 +1250,9 @@ export class SnkGuidesViewer {
1159
1250
  return [{
1160
1251
  "propName": "dataUnit",
1161
1252
  "methodName": "observeDataUnit"
1253
+ }, {
1254
+ "propName": "_formEditorConfigManager",
1255
+ "methodName": "observeFormConfigManager"
1162
1256
  }, {
1163
1257
  "propName": "dataState",
1164
1258
  "methodName": "observeDataState"
@@ -1189,3 +1283,8 @@ var TASKBAR_ID;
1189
1283
  TASKBAR_ID["MUTIPLE_EDITION"] = "snkGuideViewer.multiple_edition";
1190
1284
  TASKBAR_ID["REGULAR"] = "snkGuideViewer.regular";
1191
1285
  })(TASKBAR_ID || (TASKBAR_ID = {}));
1286
+ var GUIDES_VIEWER_VIEW_MODE;
1287
+ (function (GUIDES_VIEWER_VIEW_MODE) {
1288
+ GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["GUIDES"] = 0] = "GUIDES";
1289
+ GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["CONFIG"] = 1] = "CONFIG";
1290
+ })(GUIDES_VIEWER_VIEW_MODE || (GUIDES_VIEWER_VIEW_MODE = {}));
@@ -0,0 +1,95 @@
1
+ import { h, Host } from '@stencil/core';
2
+ export class SnkCustomSlotGuide {
3
+ constructor() {
4
+ this.slotName = 'CUSTOM_SLOT_GUIDE';
5
+ }
6
+ onGuideChange(evt) {
7
+ const guideName = evt.detail;
8
+ if (guideName === this.slotName) {
9
+ this._element.style.setProperty('display', 'block');
10
+ }
11
+ else {
12
+ this._element.style.setProperty('display', 'none');
13
+ }
14
+ }
15
+ onFormConfigVisibilityChange(evt) {
16
+ const isFormConfigVisible = evt.detail;
17
+ if (isFormConfigVisible) {
18
+ this._element.style.setProperty('display', 'none');
19
+ }
20
+ }
21
+ componentDidLoad() {
22
+ this.snkCustomSlotGuideLoaded.emit(this.slotName);
23
+ }
24
+ render() {
25
+ return (h(Host, { slot: this.slotName, id: this.slotName, class: "custom-slot-guide-container" }, h("slot", null)));
26
+ }
27
+ static get is() { return "snk-custom-slot-guide"; }
28
+ static get encapsulation() { return "scoped"; }
29
+ static get originalStyleUrls() {
30
+ return {
31
+ "$": ["snk-custom-slot-guide.css"]
32
+ };
33
+ }
34
+ static get styleUrls() {
35
+ return {
36
+ "$": ["snk-custom-slot-guide.css"]
37
+ };
38
+ }
39
+ static get properties() {
40
+ return {
41
+ "slotName": {
42
+ "type": "string",
43
+ "mutable": false,
44
+ "complexType": {
45
+ "original": "string",
46
+ "resolved": "string",
47
+ "references": {}
48
+ },
49
+ "required": false,
50
+ "optional": false,
51
+ "docs": {
52
+ "tags": [],
53
+ "text": "Nome do slot onde os elementos customizados dever\u00E3o aparecer."
54
+ },
55
+ "attribute": "slot-name",
56
+ "reflect": false,
57
+ "defaultValue": "'CUSTOM_SLOT_GUIDE'"
58
+ }
59
+ };
60
+ }
61
+ static get events() {
62
+ return [{
63
+ "method": "snkCustomSlotGuideLoaded",
64
+ "name": "snkCustomSlotGuideLoaded",
65
+ "bubbles": true,
66
+ "cancelable": true,
67
+ "composed": true,
68
+ "docs": {
69
+ "tags": [],
70
+ "text": "Emitido quando elemento \u00E9 carregado na tela."
71
+ },
72
+ "complexType": {
73
+ "original": "string",
74
+ "resolved": "string",
75
+ "references": {}
76
+ }
77
+ }];
78
+ }
79
+ static get elementRef() { return "_element"; }
80
+ static get listeners() {
81
+ return [{
82
+ "name": "snkShowGuide",
83
+ "method": "onGuideChange",
84
+ "target": "window",
85
+ "capture": false,
86
+ "passive": false
87
+ }, {
88
+ "name": "formConfigVisibilityChanged",
89
+ "method": "onFormConfigVisibilityChange",
90
+ "target": "window",
91
+ "capture": false,
92
+ "passive": false
93
+ }];
94
+ }
95
+ }
@@ -16,6 +16,7 @@ export class SnkDataUnit {
16
16
  this._metadataByRow = new Map();
17
17
  this._rowMetadataCache = new Map();
18
18
  this._formFieldsConfig = [];
19
+ this._internalDataStateChange = false;
19
20
  this.REGEX_DATAUNIT_NAME = /dd:\/\/(.+?)\//;
20
21
  this._dataUnitObserver = async (action) => {
21
22
  const duState = await this.buildDataState(action.type);
@@ -272,11 +273,17 @@ export class SnkDataUnit {
272
273
  if (this.isAllowed("UPDATE") || this.dataUnit.isNewRecord(recordId)) {
273
274
  return action;
274
275
  }
276
+ if (this._internalDataStateChange) {
277
+ this._internalDataStateChange = false;
278
+ return;
279
+ }
275
280
  if (this._openedAlert) {
281
+ this._internalDataStateChange = true;
276
282
  await this.dataUnit.cancelEdition();
277
283
  return;
278
284
  }
279
285
  this._openedAlert = true;
286
+ this._internalDataStateChange = true;
280
287
  await this.dataUnit.cancelEdition();
281
288
  await ApplicationUtils.alert(this.getMessage("snkDataUnit.forbidden"), this.getMessage("snkDataUnit.forbiddenUpdate"));
282
289
  this._openedAlert = false;
@@ -479,6 +486,8 @@ export class SnkDataUnit {
479
486
  return records;
480
487
  const parentSelectedRecord = parentDataUnit.getSelectedRecord();
481
488
  const selfInfo = parentDataUnit === null || parentDataUnit === void 0 ? void 0 : parentDataUnit.getChildInfo(this.getCleanDataUnitName());
489
+ if (!selfInfo)
490
+ return records;
482
491
  const { links } = selfInfo;
483
492
  if (!links || links.length === 0)
484
493
  return records;