@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
@@ -101,7 +101,7 @@ export class SnkFilterPeriod {
101
101
  if (this.getVariation() === FilterNumberVariation.INTERVAL) {
102
102
  return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("div", { class: "ez-col ez-col--nowrap" }, h("ez-number-input", { id: `${this.config.id}_start`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding-right--medium' : '', label: this._startIntervalLabel, ref: ref => this._startInterval = ref, value: this.getIntervalValue("start"), enabled: this.config.enabled, precision: (_a = this.config.props) === null || _a === void 0 ? void 0 : _a.precision, errorMessage: this.errorMessage }), this.buildLabel(), h("ez-number-input", { id: `${this.config.id}_end`, label: this._endIntervalLabel, ref: ref => this._endInterval = ref, value: this.getIntervalValue("end"), enabled: this.config.enabled, precision: (_b = this.config.props) === null || _b === void 0 ? void 0 : _b.precision, errorMessage: this.errorMessage }))));
103
103
  }
104
- return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-number-input", { id: this.config.id, ref: ref => this._numberElement = ref, value: this.config.value, precision: (_c = this.config.props) === null || _c === void 0 ? void 0 : _c.precision, enabled: this.config.enabled, errorMessage: this.errorMessage })));
104
+ return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-number-input", { id: this.config.id, label: this.config.label, ref: ref => this._numberElement = ref, value: this.config.value, precision: (_c = this.config.props) === null || _c === void 0 ? void 0 : _c.precision, enabled: this.config.enabled, errorMessage: this.errorMessage })));
105
105
  }
106
106
  static get is() { return "snk-filter-number"; }
107
107
  static get properties() {
@@ -143,7 +143,7 @@ export class SnkFilterPeriod {
143
143
  },
144
144
  "value": {
145
145
  "type": "number",
146
- "mutable": false,
146
+ "mutable": true,
147
147
  "complexType": {
148
148
  "original": "FilterNumberValueType",
149
149
  "resolved": "number | { start: number; end: number; }",
@@ -7,16 +7,17 @@ export class SnkFilterPeriod {
7
7
  this._startDateLabel = 'Inicial';
8
8
  this._endDateLabel = 'Final';
9
9
  this._toLabel = 'até';
10
+ this._defaultEmptyValue = {
11
+ start: null,
12
+ end: null
13
+ };
10
14
  this.internalChange = {
11
15
  start: false,
12
16
  end: false
13
17
  };
14
18
  this.config = undefined;
15
19
  this.getMessage = undefined;
16
- this.value = {
17
- start: null,
18
- end: null
19
- };
20
+ this.value = this._defaultEmptyValue;
20
21
  this.presentationMode = EPresentationMode.CHIP;
21
22
  this.errorMessage = undefined;
22
23
  }
@@ -29,6 +30,10 @@ export class SnkFilterPeriod {
29
30
  this.internalChange.start = false;
30
31
  return;
31
32
  }
33
+ if ((!newValue && oldValue) || (!(newValue === null || newValue === void 0 ? void 0 : newValue.start) && !(newValue === null || newValue === void 0 ? void 0 : newValue.end))) {
34
+ this.clearValue();
35
+ return;
36
+ }
32
37
  if (newValue && (newValue.start !== (oldValue === null || oldValue === void 0 ? void 0 : oldValue.start) || newValue.end !== (oldValue === null || oldValue === void 0 ? void 0 : oldValue.end))) {
33
38
  this.valueStart = this.parseDate(newValue.start);
34
39
  this.valueEnd = this.parseDate(newValue.end);
@@ -50,7 +55,7 @@ export class SnkFilterPeriod {
50
55
  * Limpa o valor do componente restaurando o valor original da configuração.
51
56
  */
52
57
  async clearValue() {
53
- this.value = this.config.value;
58
+ this.value = this.config.value || this._defaultEmptyValue;
54
59
  this.valueStart = this.getDate("start");
55
60
  this.valueEnd = this.getDate("end");
56
61
  }
@@ -160,7 +165,7 @@ export class SnkFilterPeriod {
160
165
  "tags": [],
161
166
  "text": "Define o valor do componente snk-filter-period"
162
167
  },
163
- "defaultValue": "{\n start: null,\n end: null\n }"
168
+ "defaultValue": "this._defaultEmptyValue"
164
169
  },
165
170
  "presentationMode": {
166
171
  "type": "number",
@@ -39,7 +39,7 @@ export class SnkFilterText {
39
39
  if (!this.config) {
40
40
  return undefined;
41
41
  }
42
- return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-text-input", { id: this.config.id, ref: ref => this._textInputElement = ref, value: this.config.value, mask: (_a = this.config) === null || _a === void 0 ? void 0 : _a.mask, enabled: this.config.enabled, cleanValueMask: true, errorMessage: this.errorMessage })));
42
+ return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-text-input", { id: this.config.id, label: this.config.label, ref: ref => this._textInputElement = ref, value: this.config.value, mask: (_a = this.config) === null || _a === void 0 ? void 0 : _a.mask, enabled: this.config.enabled, cleanValueMask: true, errorMessage: this.errorMessage })));
43
43
  }
44
44
  static get is() { return "snk-filter-text"; }
45
45
  static get properties() {
@@ -1,4 +1,8 @@
1
1
  ez-popover-core {
2
2
  --ez-popover__box--z-index: var(--elevation--20, 20);
3
3
  --ez-popover__box--overlay-z-index: var(--elevation--16, 16);
4
+ }
5
+
6
+ ez-chip {
7
+ --ez-label-chip__label__container--margin: var(--space--2, 2px);
4
8
  }
@@ -16,8 +16,10 @@ export class SnkFilterItem {
16
16
  /**
17
17
  * Emitido quando o estado do filtro é alterado.
18
18
  */
19
- filterChangeListener() {
19
+ filterChangeListener(event) {
20
20
  this.hideDetail();
21
+ // Re-emite o evento para o pai (snk-filter-bar)
22
+ this.filterChange.emit(event.detail);
21
23
  }
22
24
  /**
23
25
  * Exibe os detalhes de um item da lista.
@@ -218,6 +220,10 @@ export class SnkFilterItem {
218
220
  return ((_a = list === null || list === void 0 ? void 0 : list.filter((val) => val === null || val === void 0 ? void 0 : val.check)) === null || _a === void 0 ? void 0 : _a.length) > 0;
219
221
  }
220
222
  hasActiveValue(config) {
223
+ var _a, _b;
224
+ if (config.type === FilterItemType.PERIOD) {
225
+ return (!!((_a = config.value) === null || _a === void 0 ? void 0 : _a.start) || !!((_b = config.value) === null || _b === void 0 ? void 0 : _b.end));
226
+ }
221
227
  return (config.type !== FilterItemType.MULTI_LIST && config.value !== undefined) || this.hasActiveElements(config.value);
222
228
  }
223
229
  getEnabledChip() {
@@ -1,5 +1,6 @@
1
1
  ez-modal {
2
2
  --ez-modal-content-padding: 24px 12px;
3
+ --ez-modal-content-min-width: 370px;
3
4
  }
4
5
 
5
6
  .snk-filter-modal__container {
@@ -9,8 +9,10 @@ import FilterItemType from '../filter-item/filter-item-type.enum';
9
9
  import { ActionDefaultFilter } from '../types/default-filters';
10
10
  import FilterType from '../types/filter-type.enum';
11
11
  import { getInvalidFilters } from '../utils/filter-validate';
12
+ import { forceUpdate } from '@stencil/core';
12
13
  export class SnkFilterModal {
13
14
  constructor() {
15
+ this._isUserSup = false;
14
16
  this.filters = [];
15
17
  this.filtersWithError = [];
16
18
  this.getMessage = undefined;
@@ -66,6 +68,7 @@ export class SnkFilterModal {
66
68
  this.handleClearCustomFilters(customFilters);
67
69
  this.handleClearOthersFilters(otherFilters);
68
70
  multiListFilters.forEach(multiListFilter => this.handleClearSigleFilter(multiListFilter));
71
+ forceUpdate(this);
69
72
  }
70
73
  handleClearOthersFilters(otherFilters) {
71
74
  this.filters = this.filters.map(filter => otherFilters.includes(filter) ? (Object.assign(Object.assign({}, filter), { value: undefined })) : filter);
@@ -239,7 +242,7 @@ export class SnkFilterModal {
239
242
  getIformedFiltersCount(listItems) {
240
243
  let countInformedItens = 0;
241
244
  listItems.forEach(localItem => {
242
- var _a, _b, _c, _d, _e, _f;
245
+ var _a, _b, _c, _d, _e, _f, _g, _h;
243
246
  const item = this.filterConfig.find(filter => filter.id === localItem.id);
244
247
  if (FilterItemType.MULTI_LIST === item.type) {
245
248
  countInformedItens += (_e = (_d = (_c = ((_b = (_a = item.value) === null || _a === void 0 ? void 0 : _a.elements) !== null && _b !== void 0 ? _b : item.value)) === null || _c === void 0 ? void 0 : _c.filter(value => value === null || value === void 0 ? void 0 : value.check)) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0;
@@ -251,6 +254,12 @@ export class SnkFilterModal {
251
254
  .map(([key, _]) => key).length;
252
255
  return;
253
256
  }
257
+ if (FilterItemType.PERIOD === item.type) {
258
+ if (!!((_g = item.value) === null || _g === void 0 ? void 0 : _g.start) || !!((_h = item.value) === null || _h === void 0 ? void 0 : _h.end)) {
259
+ countInformedItens++;
260
+ }
261
+ return;
262
+ }
254
263
  if (item.groupedItems != undefined) {
255
264
  countInformedItens = item.groupedItems.filter(item => item.visible).length;
256
265
  return;
@@ -301,8 +310,9 @@ export class SnkFilterModal {
301
310
  const defaultFilter = filters.find((item) => item.id === DefaultFilter.id);
302
311
  return defaultFilter;
303
312
  }
304
- componentWillLoad() {
313
+ async componentWillLoad() {
305
314
  this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
315
+ this._isUserSup = await this._application.isUserSup();
306
316
  this.filters = ObjectUtils.copy(this.filterConfig);
307
317
  }
308
318
  componentWillRender() {
@@ -314,11 +324,12 @@ export class SnkFilterModal {
314
324
  this.validateFilters();
315
325
  }
316
326
  render() {
317
- this._defaultFilter = this.getDefaultFilter(this.filters);
327
+ this._defaultFilter = this._isUserSup ? this.getDefaultFilter(this.filters) : undefined;
318
328
  const customFilters = this.getCustomFilter(this.filters);
319
329
  const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
320
330
  const otherFilters = this.filters.filter(filter => filter.filterType === FilterType.OTHER_FILTERS);
321
- return (h("ez-modal", { opened: this.opened, modalSize: "col--sd-3", align: "right", heightMode: "full", closeEsc: true }, h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" }, h("snk-default-filter", { getMessage: this.getCustomMessage.bind(this), hasDefaultFilter: !!this._defaultFilter, onActionSelected: this.handleActionSelectedDefaultFilter.bind(this) }), !this.disablePersonalizedFilter && this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true))))));
331
+ return (h("ez-modal", { opened: this.opened, modalSize: "col--sd-3", align: "right", heightMode: "full", closeEsc: true }, h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" }, this._isUserSup &&
332
+ h("snk-default-filter", { getMessage: this.getCustomMessage.bind(this), hasDefaultFilter: !!this._defaultFilter, onActionSelected: this.handleActionSelectedDefaultFilter.bind(this) }), !this.disablePersonalizedFilter && this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true))))));
322
333
  }
323
334
  static get is() { return "snk-filter-modal"; }
324
335
  static get originalStyleUrls() {
@@ -50,10 +50,19 @@ export class SnkFilterBar {
50
50
  this.isFilterModalOpen = false;
51
51
  }
52
52
  hasValidValue(item) {
53
- if (item.value === undefined || item.value === null)
53
+ var _a, _b;
54
+ if (item.value === undefined || item.value === null) {
54
55
  return false;
55
- if (!Array.isArray(item.value))
56
+ }
57
+ if (item.type === FilterItemType.PERIOD) {
58
+ return (!!((_a = item.value) === null || _a === void 0 ? void 0 : _a.start) || !!((_b = item.value) === null || _b === void 0 ? void 0 : _b.end));
59
+ }
60
+ if (item.groupedItems) {
56
61
  return true;
62
+ }
63
+ if (!Array.isArray(item.value)) {
64
+ return true;
65
+ }
57
66
  return item.value.some(filterItem => filterItem.check === true);
58
67
  }
59
68
  observeFilterConfig(newValue, oldValue) {
@@ -255,7 +264,7 @@ export class SnkFilterBar {
255
264
  if (item.type === FilterItemType.DEFAULT_FILTER) {
256
265
  return true;
257
266
  }
258
- return this.filterActiveFilter(item) && (item.groupedItems || item.value != undefined);
267
+ return this.filterActiveFilter(item) && this.hasValidValue(item);
259
268
  }
260
269
  async registryFilterProvider() {
261
270
  this.dataUnit.addFilterProvider(this);
@@ -322,27 +331,35 @@ export class SnkFilterBar {
322
331
  }
323
332
  normalizeItem(item) {
324
333
  const normalized = Object.assign({}, item);
334
+ const isPersonalizedFilter = item.type === FilterItemType.PERSONALIZED;
335
+ const hasNormalizedGroupedItems = (normalized.value === undefined && normalized.groupedItems);
336
+ if (isPersonalizedFilter && hasNormalizedGroupedItems) {
337
+ normalized.value = normalized.groupedItems.filter(groupItem => !!groupItem.visible).length;
338
+ }
325
339
  const optionals = ["props", "value", "hardFixed", "fixed"];
326
340
  optionals.forEach(prop => {
341
+ if (prop === "value" && isPersonalizedFilter) {
342
+ return;
343
+ }
327
344
  if (normalized[prop] == undefined) {
328
345
  delete normalized[prop];
329
346
  }
330
347
  });
331
- if (item.value === "") {
332
- delete item.value;
348
+ if (normalized.value === "" && !isPersonalizedFilter) {
349
+ delete normalized.value;
333
350
  }
334
351
  return normalized;
335
352
  }
336
353
  updateFilter(newItem) {
354
+ const normalizedNewItem = this.normalizeItem(newItem);
337
355
  let config = this.filterConfig.map(item => {
338
- newItem = this.normalizeItem(newItem);
339
- if (item.id === newItem.id) {
340
- if (ObjectUtils.objectToString(item) != ObjectUtils.objectToString(newItem)) {
341
- this.calculateUpdateSequence(newItem);
342
- }
343
- return newItem;
356
+ if (item.id !== normalizedNewItem.id) {
357
+ return item;
358
+ }
359
+ if (ObjectUtils.objectToString(item) == ObjectUtils.objectToString(normalizedNewItem)) {
360
+ this.calculateUpdateSequence(normalizedNewItem);
344
361
  }
345
- return item;
362
+ return normalizedNewItem;
346
363
  }).sort((a, b) => this._filtersComparator(a, b));
347
364
  if (this.filterCustomConfigInterceptor) {
348
365
  config = this.filterCustomConfigInterceptor(config);
@@ -508,7 +525,7 @@ export class SnkFilterBar {
508
525
  return itemA.originOrder - itemB.originOrder;
509
526
  });
510
527
  if (this.mode !== "regular") {
511
- return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) })), h("snk-filter-modal", { opened: this.isFilterModalOpen, filterConfig: this.filterConfig, configName: this.configName, disablePersonalizedFilter: this.disablePersonalizedFilter, getMessage: (key, props) => this.getMessage(key, props), applyFilters: (filters) => this.applyFiltersFromModal(filters), closeModal: () => this.closeFilterModal(), addPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault), editPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault), deletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName, isDefault), filterCustomConfigInterceptor: this.filterCustomConfigInterceptor })));
528
+ return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium ez-margin-top--extra-small", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) })), h("snk-filter-modal", { opened: this.isFilterModalOpen, filterConfig: this.filterConfig, configName: this.configName, disablePersonalizedFilter: this.disablePersonalizedFilter, getMessage: (key, props) => this.getMessage(key, props), applyFilters: (filters) => this.applyFiltersFromModal(filters), closeModal: () => this.closeFilterModal(), addPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault), editPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault), deletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName, isDefault), filterCustomConfigInterceptor: this.filterCustomConfigInterceptor })));
512
529
  }
513
530
  return (h(Host, null, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium ez-margin-top--extra-small", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" })), h("snk-filter-modal", { opened: this.isFilterModalOpen, filterConfig: this.filterConfig, configName: this.configName, disablePersonalizedFilter: this.disablePersonalizedFilter, getMessage: (key, props) => this.getMessage(key, props), applyFilters: (filters) => this.applyFiltersFromModal(filters), closeModal: () => this.closeFilterModal(), addPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault), editPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault), deletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName, isDefault), filterCustomConfigInterceptor: this.filterCustomConfigInterceptor })));
514
531
  }
@@ -108,6 +108,48 @@ export function buildGuides(config, mainArea) {
108
108
  tabs = initializeTabsNames(tabs);
109
109
  return handleMainTab(tabs, mainArea);
110
110
  }
111
+ export function buildChildrenGuides(dataUnit, initialOrderIndex = 0, guidesList) {
112
+ var _a;
113
+ if (!dataUnit || !dataUnit.metadata) {
114
+ return [];
115
+ }
116
+ const children = ((_a = dataUnit.metadata) === null || _a === void 0 ? void 0 : _a.children) || [];
117
+ const childrenWithNoGuide = [];
118
+ for (const child of children) {
119
+ const guideOnConfig = guidesList.find(guide => child.label === guide.label);
120
+ if (guideOnConfig) {
121
+ guideOnConfig.isCustom = true;
122
+ continue;
123
+ }
124
+ childrenWithNoGuide.push({
125
+ label: child.label,
126
+ name: child.name,
127
+ visible: true,
128
+ isCustom: true,
129
+ order: initialOrderIndex++
130
+ });
131
+ }
132
+ return childrenWithNoGuide;
133
+ }
134
+ export function buildCustomGuides(customGuidesList, guidesList) {
135
+ let initialOrderIndex = guidesList.length;
136
+ const customGuidesToAdd = getCustomGuidesNotIncludedInList(customGuidesList, guidesList);
137
+ return customGuidesToAdd.map(guide => {
138
+ return {
139
+ name: guide.id,
140
+ label: guide.label,
141
+ visible: true,
142
+ isCustom: true,
143
+ order: initialOrderIndex++
144
+ };
145
+ });
146
+ }
147
+ function isCustomGuideIncludedInList(guidesList, guide) {
148
+ return guidesList.some(fromList => fromList.name === guide.id || fromList.label === guide.label);
149
+ }
150
+ function getCustomGuidesNotIncludedInList(customGuidesList, guidesList) {
151
+ return customGuidesList.filter(guide => !isCustomGuideIncludedInList(guidesList, guide));
152
+ }
111
153
  function handleFieldsTabNames(allFields) {
112
154
  // Campos que não fazem parte de nenhuma aba ou da aba "Geral", devem ser movidos para a aba __main.
113
155
  return allFields.map(field => {
@@ -1,5 +1,5 @@
1
- import { ConfigStorage } from '../../lib/configs/ConfigStorage';
2
1
  import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
2
+ import { ConfigStorage } from '../../lib/configs/ConfigStorage';
3
3
  import { FormConfigFetcher } from '../../lib/http/data-fetcher/fetchers/form-config-fetcher';
4
4
  import { TAB_NAMES } from '../../lib/utils/constants';
5
5
  export class SnkFormConfigManager {
@@ -82,7 +82,7 @@ export class SnkFormConfigManager {
82
82
  return false;
83
83
  }
84
84
  getFieldsList(descriptionFilter, forceEmptyConfig = false) {
85
- var _a;
85
+ var _a, _b;
86
86
  const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
87
87
  const hasConfig = this.hasConfig();
88
88
  if (hasConfig && !forceEmptyConfig) {
@@ -98,7 +98,7 @@ export class SnkFormConfigManager {
98
98
  })
99
99
  .filter(field => this.isFieldVisible(field, descriptionFilter));
100
100
  }
101
- if (!this._dataUnit) {
101
+ if (!this._dataUnit || !((_b = this._dataUnit.metadata) === null || _b === void 0 ? void 0 : _b.fields)) {
102
102
  return [];
103
103
  }
104
104
  const filteredFields = this._dataUnit.metadata.fields
@@ -178,7 +178,7 @@ export class SnkFormConfigManager {
178
178
  return Array.isArray(object) ? object : [object];
179
179
  }
180
180
  buildFormMetadataUITabs(config, forceEmptyConfig = false) {
181
- var _a;
181
+ var _a, _b, _c;
182
182
  const hasConfig = this.hasConfig(config);
183
183
  if (!forceEmptyConfig && (!this._dataUnit || hasConfig)) {
184
184
  return config;
@@ -187,10 +187,10 @@ export class SnkFormConfigManager {
187
187
  config.tabs = this.parseObjectList(config.tabs);
188
188
  config.emptyConfig = false;
189
189
  config.defaultConfiguration = true;
190
- const fields = this._dataUnit.metadata.fields;
190
+ const fields = (_b = (_a = this._dataUnit.metadata) === null || _a === void 0 ? void 0 : _a.fields) !== null && _b !== void 0 ? _b : [];
191
191
  for (const currentField of fields) {
192
192
  const field = config.fields.find(field => field.name === currentField.name);
193
- const uiTabName = (_a = currentField.properties) === null || _a === void 0 ? void 0 : _a.UITabName;
193
+ const uiTabName = (_c = currentField.properties) === null || _c === void 0 ? void 0 : _c.UITabName;
194
194
  if (!uiTabName || uiTabName === TAB_NAMES.main) {
195
195
  continue;
196
196
  }
@@ -17,5 +17,6 @@
17
17
  .actions {
18
18
  display: flex;
19
19
  align-items: flex-end;
20
+ justify-content: flex-end;
20
21
  gap: 12px;
21
22
  }
@@ -119,6 +119,22 @@
119
119
  font-weight: 500;
120
120
  }
121
121
 
122
+ .message-container {
123
+ margin: auto;
124
+ display: flex;
125
+ flex-direction: column;
126
+ justify-content: center;
127
+ align-items: center;
128
+ }
129
+
130
+ .message-config-detail {
131
+ display: block;
132
+ margin: auto;
133
+ font-size: var(--font-size--medium, 16px);
134
+ color: #AFB6C0;
135
+ font-weight: var(--font-weight--medium, 500);
136
+ }
137
+
122
138
  .ghost {
123
139
  opacity: .5;
124
140
  background: #c8fbe2;
@@ -1,9 +1,9 @@
1
- import { forceUpdate, h, Host, } from '@stencil/core';
2
1
  import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
2
+ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
3
+ import { forceUpdate, h, Host, } from '@stencil/core';
3
4
  import Sortable from 'sortablejs';
4
- import { getFieldsStructure, ID_AVAILABLE_FIELDS, SORTABLE_PATH, } from '../FormConfigHelper';
5
5
  import { GROUP_NAMES, TAB_NAMES } from '../../../lib/utils/constants';
6
- import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
6
+ import { getFieldsStructure, ID_AVAILABLE_FIELDS, SORTABLE_PATH, } from '../FormConfigHelper';
7
7
  export class FieldLayoutComponent {
8
8
  constructor() {
9
9
  this.ID_GROUPS = 'container-groups';
@@ -320,6 +320,9 @@ export class FieldLayoutComponent {
320
320
  if (!this.selectedGuide) {
321
321
  return (h(Host, { class: 'ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container' }, h("span", { class: 'no-guide-selected' }, this.getMessage('snkFormConfig.form.noGuideSelected'))));
322
322
  }
323
+ if (this.selectedGuide.isCustom || this.selectedGuide.isDetail) {
324
+ return (h(Host, { class: 'ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container' }, h("div", { class: 'message-container' }, h("h1", { class: 'no-guide-selected' }, this.getMessage('snkFormConfig.form.canNotEditCustomGuide')), h("span", { class: 'message-config-detail' }, this.getMessage('snkFormConfig.form.canNotEditDetailGuide')))));
325
+ }
323
326
  return (h(Host, { class: 'ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container' }, this.renderGuideName(), h("div", { class: 'layout-container' }, h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { class: 'no-group-container' }, h("div", { id: GROUP_NAMES.noGroup, class: 'group-content', "data-group-name": GROUP_NAMES.noGroup }, this.renderFixedFields())), h("hr", null), h("div", { id: this.ID_GROUPS, class: 'groups-container' }, this.renderDraggableGroups()))), h("div", { class: 'add-group-container', onClick: this.handleAddGroup.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus" }), h("span", null, this.getMessage('snkFormConfig.form.createNewGroup')))));
324
327
  }
325
328
  static get is() { return "fields-layout"; }
@@ -91,13 +91,13 @@
91
91
  .guide-item .actions {
92
92
  display: flex;
93
93
  gap: 8px;
94
- transition: 0.2s ease-in-out;
95
- visibility: hidden;
94
+ transition: opacity 0.2s ease-in-out;
95
+ display: none;
96
96
  opacity: 0;
97
97
  }
98
98
 
99
99
  .guide-item:hover .actions {
100
- visibility: visible;
100
+ display: flex;
101
101
  opacity: 1;
102
102
  }
103
103
 
@@ -1,7 +1,7 @@
1
- import { h } from '@stencil/core';
2
- import Sortable from 'sortablejs';
3
1
  import { ArrayUtils, ObjectUtils } from '@sankhyalabs/core';
4
2
  import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
3
+ import { h } from '@stencil/core';
4
+ import Sortable from 'sortablejs';
5
5
  import { TAB_NAMES } from '../../../lib/utils/constants';
6
6
  export class GuidesConfigurator {
7
7
  constructor() {
@@ -92,7 +92,9 @@ export class GuidesConfigurator {
92
92
  var _a;
93
93
  return (h("div", { key: guide.name, "data-guide-name": guide.name, title: guide.label, class: `guide-item ${((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.label) === guide.label ? 'selected' : ''} ${this.filterTerm.length ? 'disable-sort' : ''}`, onClick: e => this.handleSelectGuide(guide, e) }, h("span", null, h("ez-icon", { iconName: "drag-indicator", class: 'ez-margin-right--small' })), h("span", { class: 'item-label' }, guide.label), h("div", { class: 'actions' }, h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.toggleGuideVisibility(guide, e), size: "medium", iconName: guide.visible ? 'eye-off' : 'eye', title: guide.visible ?
94
94
  this.getMessage('snkFormConfig.guidesConfigurator.actions.hide') :
95
- this.getMessage('snkFormConfig.guidesConfigurator.actions.show') }), h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.handleDeleteGuide(guide, e), size: "medium", iconName: 'delete', title: this.getMessage('snkFormConfig.guidesConfigurator.actions.delete') }))));
95
+ this.getMessage('snkFormConfig.guidesConfigurator.actions.show') }), h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.handleDeleteGuide(guide, e), size: "medium", isDisabled: guide.isCustom || guide.isDetail, iconName: 'delete', title: guide.isCustom || guide.isDetail ?
96
+ this.getMessage('snkFormConfig.guidesConfigurator.canNotDeleteCustomGuide') :
97
+ this.getMessage('snkFormConfig.guidesConfigurator.actions.delete') }))));
96
98
  });
97
99
  }
98
100
  getContainerElement(id) {
@@ -1,10 +1,10 @@
1
- import { h, Host } from '@stencil/core';
2
1
  import { ApplicationContext, ObjectUtils } from '@sankhyalabs/core';
3
2
  import { buildFormConfigFromDataUnit } from '@sankhyalabs/ezui/dist/collection/utils/form';
4
- import { updateTabInFieldsFromGroupList, buildGuides, buildGuidesMap, buildNewGuideName, getFieldsToSave, } from './FormConfigHelper';
5
- import { GROUP_NAMES, TAB_NAMES } from '../../lib/utils/constants';
3
+ import { h, Host } from '@stencil/core';
6
4
  import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
7
5
  import { UserConfigType } from '../../lib/http/data-fetcher/fetchers/form-config-fetcher';
6
+ import { GROUP_NAMES, TAB_NAMES } from '../../lib/utils/constants';
7
+ import { buildChildrenGuides, buildCustomGuides, buildGuides, buildGuidesMap, buildNewGuideName, getFieldsToSave, updateTabInFieldsFromGroupList, } from './FormConfigHelper';
8
8
  export class SnkFormConfig {
9
9
  constructor() {
10
10
  this.guidesMap = new Map();
@@ -22,6 +22,7 @@ export class SnkFormConfig {
22
22
  this.configManager = undefined;
23
23
  this.ignoreReadOnlyFormFields = undefined;
24
24
  this.messagesBuilder = undefined;
25
+ this.customGuidesConfig = [];
25
26
  }
26
27
  handleFieldConfigChanged() {
27
28
  this.hasChanges = true;
@@ -41,6 +42,10 @@ export class SnkFormConfig {
41
42
  this.showNoGuideSelectedDialog();
42
43
  return;
43
44
  }
45
+ if (this.selectedGuide.isCustom || this.selectedGuide.isDetail) {
46
+ this.showCanNotAddFieldToGuideDialog();
47
+ return;
48
+ }
44
49
  this.availableFields = [...this.availableFields.filter(f => f.name !== fieldItem.name)];
45
50
  await ((_a = this.refFieldsLayout) === null || _a === void 0 ? void 0 : _a.addFieldToLayout(fieldItem));
46
51
  }
@@ -66,6 +71,11 @@ export class SnkFormConfig {
66
71
  const message = this.getMessage('snkFormConfig.noGuideSelected.message');
67
72
  ApplicationUtils.alert(title, message);
68
73
  }
74
+ showCanNotAddFieldToGuideDialog() {
75
+ const title = this.getMessage('snkFormConfig.canNotAddFieldToGuide.title');
76
+ const message = this.getMessage('snkFormConfig.canNotAddFieldToGuide.message');
77
+ ApplicationUtils.alert(title, message);
78
+ }
69
79
  /**
70
80
  * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
71
81
  * através de um pequeno modulo na estrutura da aplicação:
@@ -83,8 +93,8 @@ export class SnkFormConfig {
83
93
  this.configOptions = userConfig;
84
94
  const isDefault = this._formConfig != undefined ? this._formConfig.defaultConfiguration : true;
85
95
  const origin = (isDefault ? UserConfigType.DEFAULT : UserConfigType.USER);
86
- this.configSelected = userConfig.find((config) => config.origin === origin);
87
- this.originalConfigSelected = userConfig.find((config) => config.origin === origin);
96
+ this.configSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
97
+ this.originalConfigSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
88
98
  }
89
99
  catch (error) {
90
100
  console.error(this.getMessage('snkFormConfig.errors.failFetchUserConfig'));
@@ -137,9 +147,22 @@ export class SnkFormConfig {
137
147
  return fieldVisible === true && hasCfg === false;
138
148
  });
139
149
  }
150
+ getInitialOrder(guidesList) {
151
+ var _a, _b;
152
+ if (Array.isArray((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.tabs)) {
153
+ return (_b = this._formConfig.tabs) === null || _b === void 0 ? void 0 : _b.length;
154
+ }
155
+ if (guidesList.length > 0) {
156
+ return Math.max(...guidesList.map(g => g.order));
157
+ }
158
+ return 0;
159
+ }
140
160
  loadGuides() {
141
161
  var _a;
142
- this.guidesList = [...buildGuides(this._formConfig, this.getMessage('snkFormConfig.form.mainArea'))];
162
+ this.guidesList = [];
163
+ this.guidesList.push(...buildGuides(this._formConfig, this.getMessage('snkFormConfig.form.mainArea')));
164
+ this.guidesList.push(...buildChildrenGuides(this.dataUnit, this.getInitialOrder(this.guidesList), this.guidesList));
165
+ this.guidesList.push(...buildCustomGuides(this.customGuidesConfig, this.guidesList));
143
166
  this.guidesMap = buildGuidesMap((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields, this.guidesList, this.dataUnit, this.getMessage('snkFormConfig.form.tabGeneral'));
144
167
  }
145
168
  getConfig() {
@@ -368,6 +391,30 @@ export class SnkFormConfig {
368
391
  "tags": [],
369
392
  "text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
370
393
  }
394
+ },
395
+ "customGuidesConfig": {
396
+ "type": "unknown",
397
+ "mutable": false,
398
+ "complexType": {
399
+ "original": "Array<CustomGuideItem>",
400
+ "resolved": "CustomGuideItem[]",
401
+ "references": {
402
+ "Array": {
403
+ "location": "global"
404
+ },
405
+ "CustomGuideItem": {
406
+ "location": "import",
407
+ "path": "../snk-crud/subcomponents/snk-guides-viewer"
408
+ }
409
+ }
410
+ },
411
+ "required": false,
412
+ "optional": true,
413
+ "docs": {
414
+ "tags": [],
415
+ "text": "Informa\u00E7\u00F5es das guias personalizadas."
416
+ },
417
+ "defaultValue": "[]"
371
418
  }
372
419
  };
373
420
  }
@@ -9,6 +9,8 @@
9
9
  width: 100%;
10
10
  padding: var(--snk-grid-padding);
11
11
  outline: none;
12
+
13
+ --snk-grid-header--min-height: var(--space--52);
12
14
  }
13
15
 
14
16
  .snk-grid__header {
@@ -16,6 +18,8 @@
16
18
  display: flex;
17
19
  flex-wrap: nowrap;
18
20
  justify-content: flex-end;
21
+ align-items: flex-start;
22
+ min-height: var(--snk-grid-header--min-height);
19
23
  }
20
24
 
21
25
  .snk-grid__filter-bar {
@@ -25,6 +29,14 @@
25
29
  .snk-grid__header-divider {
26
30
  /*public*/
27
31
  margin-bottom: var(--space--medium);
32
+ margin-right: var(--space--0);
33
+ align-self: stretch;
34
+ }
35
+
36
+ .snk-grid__header snk-taskbar {
37
+ display: flex;
38
+ align-items: flex-start;
39
+ min-height: var(--snk-grid-header--min-height);
28
40
  }
29
41
 
30
42
  .snk-grid__table {