@sankhyalabs/sankhyablocks 5.19.1 → 6.0.1

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 (298) hide show
  1. package/dist/cjs/ConfigStorage-0a738cdc.js +304 -0
  2. package/dist/cjs/IExpressionItem-1090c3fd.js +7 -0
  3. package/dist/cjs/PersonalizedFilterUtils-7d959e91.js +229 -0
  4. package/dist/cjs/{SnkFormConfigManager-69df3f74.js → SnkFormConfigManager-a583f503.js} +1 -1
  5. package/dist/cjs/{SnkMessageBuilder-3b5b5614.js → SnkMessageBuilder-8a2d3f26.js} +65 -4
  6. package/dist/cjs/{filter-bar-config-fetcher-a14536bf.js → filter-bar-config-fetcher-75219599.js} +34 -11
  7. package/dist/cjs/{index-de79181a.js → index-59a3e2de.js} +1 -1
  8. package/dist/cjs/{index-f400b1d6.js → index-614af008.js} +2 -0
  9. package/dist/cjs/{index-21bd01e1.js → index-aaaa2af5.js} +6 -1
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/sankhyablocks.cjs.js +2 -2
  12. package/dist/cjs/snk-actions-button.cjs.entry.js +2 -2
  13. package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
  14. package/dist/cjs/snk-application.cjs.entry.js +4 -4
  15. package/dist/cjs/snk-attach.cjs.entry.js +4 -4
  16. package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
  17. package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
  18. package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
  19. package/dist/cjs/snk-crud.cjs.entry.js +4 -4
  20. package/dist/cjs/snk-data-exporter.cjs.entry.js +4 -4
  21. package/dist/cjs/{snk-data-unit-e9c20097.js → snk-data-unit-53fc9200.js} +2 -2
  22. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  23. package/dist/cjs/snk-detail-view.cjs.entry.js +10 -10
  24. package/dist/cjs/snk-entity-list.cjs.entry.js +6 -4
  25. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  26. package/dist/cjs/snk-expression-group.cjs.entry.js +246 -0
  27. package/dist/cjs/{snk-filter-field-search_2.cjs.entry.js → snk-expression-item_3.cjs.entry.js} +327 -66
  28. package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
  29. package/dist/cjs/snk-filter-bar.cjs.entry.js +162 -72
  30. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
  31. package/dist/cjs/snk-filter-detail.cjs.entry.js +54 -69
  32. package/dist/cjs/snk-filter-item.cjs.entry.js +21 -7
  33. package/dist/cjs/snk-filter-list.cjs.entry.js +1 -1
  34. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +57 -29
  35. package/dist/cjs/snk-filter-modal.cjs.entry.js +67 -13
  36. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
  37. package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
  38. package/dist/cjs/snk-filter-period.cjs.entry.js +5 -3
  39. package/dist/cjs/snk-filter-personalized.cjs.entry.js +135 -55
  40. package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
  41. package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
  42. package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
  43. package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
  44. package/dist/cjs/snk-form-view.cjs.entry.js +1 -1
  45. package/dist/cjs/snk-form.cjs.entry.js +4 -4
  46. package/dist/cjs/snk-grid-config.cjs.entry.js +3 -3
  47. package/dist/cjs/snk-grid.cjs.entry.js +7 -7
  48. package/dist/cjs/{snk-guides-viewer-c8843478.js → snk-guides-viewer-10ffca10.js} +5 -5
  49. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
  50. package/dist/cjs/snk-personalized-filter.cjs.entry.js +166 -94
  51. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  52. package/dist/cjs/snk-select-box.cjs.entry.js +1 -1
  53. package/dist/cjs/snk-simple-bar.cjs.entry.js +45 -0
  54. package/dist/cjs/{snk-simple-bar_2.cjs.entry.js → snk-simple-crud.cjs.entry.js} +5 -43
  55. package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
  56. package/dist/cjs/snk-taskbar.cjs.entry.js +4 -4
  57. package/dist/cjs/{taskbar-elements-3be287d6.js → taskbar-elements-068aa945.js} +3 -3
  58. package/dist/cjs/{taskbar-processor-02f0fc84.js → taskbar-processor-6442c585.js} +1 -1
  59. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  60. package/dist/collection/collection-manifest.json +2 -1
  61. package/dist/collection/components/snk-entity-list/snk-entity-list.js +6 -4
  62. package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +34 -12
  63. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +4 -2
  64. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized/snk-filter-personalized.css +66 -0
  65. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized/snk-filter-personalized.js +370 -0
  66. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +52 -68
  67. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +20 -6
  68. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +15 -15
  69. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +111 -11
  70. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +98 -27
  71. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +21 -0
  72. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +100 -49
  73. package/dist/collection/components/snk-filter-bar/types/custom-element-filter.js +1 -0
  74. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +23 -3
  75. package/dist/collection/components/snk-filter-bar/utils/filters-mock.js +96 -0
  76. package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.css +1 -1
  77. package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.js +27 -6
  78. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.css +39 -2
  79. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +276 -30
  80. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css +73 -0
  81. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +443 -0
  82. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js +16 -24
  83. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.css +18 -4
  84. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +131 -21
  85. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionGroup.js +0 -0
  86. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionItem.js +5 -1
  87. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IParameter.js +1 -0
  88. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IPersonalizedFilter.js +1 -0
  89. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/index.js +3 -0
  90. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js +1 -1
  91. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +184 -15
  92. package/dist/collection/lib/@types/index.js +2 -0
  93. package/dist/collection/lib/configs/ConfigStorage.js +15 -0
  94. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +36 -13
  95. package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +106 -4
  96. package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +15 -2
  97. package/dist/collection/lib/message/resources/snk-filter-field-search.msg.js +2 -0
  98. package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +48 -2
  99. package/dist/components/ConfigStorage.js +180 -1
  100. package/dist/components/PersonalizedFilterUtils.js +227 -0
  101. package/dist/components/SnkMessageBuilder.js +65 -4
  102. package/dist/components/filter-bar-config-fetcher.js +34 -11
  103. package/dist/components/index.d.ts +2 -1
  104. package/dist/components/index.js +1 -0
  105. package/dist/components/index2.js +3 -1
  106. package/dist/components/snk-crud.js +65 -35
  107. package/dist/components/snk-data-exporter2.js +1 -1
  108. package/dist/components/snk-detail-view2.js +99 -44
  109. package/dist/components/snk-entity-list.js +6 -4
  110. package/dist/components/snk-expression-group.d.ts +11 -0
  111. package/dist/components/snk-expression-group.js +6 -0
  112. package/dist/components/snk-expression-group2.js +296 -0
  113. package/dist/components/snk-expression-item2.js +133 -46
  114. package/dist/components/snk-filter-bar2.js +196 -68
  115. package/dist/components/snk-filter-detail2.js +52 -68
  116. package/dist/components/snk-filter-field-search2.js +26 -5
  117. package/dist/components/snk-filter-item2.js +20 -6
  118. package/dist/components/snk-filter-modal-item2.js +54 -27
  119. package/dist/components/snk-filter-modal.js +69 -13
  120. package/dist/components/snk-filter-param-config2.js +3 -57
  121. package/dist/components/snk-filter-period.js +4 -2
  122. package/dist/components/snk-filter-personalized.js +139 -58
  123. package/dist/components/snk-grid2.js +52 -16
  124. package/dist/components/snk-personalized-filter.js +1 -153
  125. package/dist/components/snk-personalized-filter2.js +238 -0
  126. package/dist/esm/ConfigStorage-9f4d2e67.js +300 -0
  127. package/dist/esm/IExpressionItem-2e922b2c.js +7 -0
  128. package/dist/esm/PersonalizedFilterUtils-202cd721.js +227 -0
  129. package/dist/esm/{SnkFormConfigManager-e60367a0.js → SnkFormConfigManager-def999fe.js} +1 -1
  130. package/dist/esm/{SnkMessageBuilder-188a38bb.js → SnkMessageBuilder-cc4d1599.js} +65 -4
  131. package/dist/esm/{filter-bar-config-fetcher-edc48f4b.js → filter-bar-config-fetcher-bd2070a3.js} +34 -11
  132. package/dist/esm/{index-cfd4bb13.js → index-8c3d76a6.js} +6 -1
  133. package/dist/esm/{index-507e19ec.js → index-a255b326.js} +3 -1
  134. package/dist/esm/{index-8efbf198.js → index-d60ca0ac.js} +1 -1
  135. package/dist/esm/loader.js +3 -3
  136. package/dist/esm/sankhyablocks.js +3 -3
  137. package/dist/esm/snk-actions-button.entry.js +2 -2
  138. package/dist/esm/snk-actions-form.entry.js +1 -1
  139. package/dist/esm/snk-application.entry.js +4 -4
  140. package/dist/esm/snk-attach.entry.js +4 -4
  141. package/dist/esm/snk-client-confirm.entry.js +1 -1
  142. package/dist/esm/snk-config-options.entry.js +1 -1
  143. package/dist/esm/snk-configurator.entry.js +1 -1
  144. package/dist/esm/snk-crud.entry.js +4 -4
  145. package/dist/esm/snk-data-exporter.entry.js +4 -4
  146. package/dist/esm/{snk-data-unit-79b1583a.js → snk-data-unit-97824457.js} +2 -2
  147. package/dist/esm/snk-data-unit.entry.js +3 -3
  148. package/dist/esm/snk-detail-view.entry.js +10 -10
  149. package/dist/esm/snk-entity-list.entry.js +7 -5
  150. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  151. package/dist/esm/snk-expression-group.entry.js +242 -0
  152. package/dist/esm/{snk-filter-field-search_2.entry.js → snk-expression-item_3.entry.js} +326 -66
  153. package/dist/esm/snk-field-config.entry.js +1 -1
  154. package/dist/esm/snk-filter-bar.entry.js +157 -67
  155. package/dist/esm/snk-filter-binary-select.entry.js +1 -1
  156. package/dist/esm/snk-filter-detail.entry.js +55 -70
  157. package/dist/esm/snk-filter-item.entry.js +21 -7
  158. package/dist/esm/snk-filter-list.entry.js +1 -1
  159. package/dist/esm/snk-filter-modal-item.entry.js +57 -29
  160. package/dist/esm/snk-filter-modal.entry.js +67 -13
  161. package/dist/esm/snk-filter-multi-select.entry.js +1 -1
  162. package/dist/esm/snk-filter-number.entry.js +1 -1
  163. package/dist/esm/snk-filter-period.entry.js +5 -3
  164. package/dist/esm/snk-filter-personalized.entry.js +135 -55
  165. package/dist/esm/snk-filter-search.entry.js +1 -1
  166. package/dist/esm/snk-filter-text.entry.js +1 -1
  167. package/dist/esm/snk-form-config.entry.js +1 -1
  168. package/dist/esm/snk-form-summary.entry.js +1 -1
  169. package/dist/esm/snk-form-view.entry.js +1 -1
  170. package/dist/esm/snk-form.entry.js +4 -4
  171. package/dist/esm/snk-grid-config.entry.js +3 -3
  172. package/dist/esm/snk-grid.entry.js +7 -7
  173. package/dist/esm/{snk-guides-viewer-59d3a78c.js → snk-guides-viewer-0380f3df.js} +5 -5
  174. package/dist/esm/snk-guides-viewer.entry.js +9 -9
  175. package/dist/esm/snk-personalized-filter.entry.js +166 -94
  176. package/dist/esm/snk-pesquisa.entry.js +1 -1
  177. package/dist/esm/snk-select-box.entry.js +1 -1
  178. package/dist/esm/snk-simple-bar.entry.js +41 -0
  179. package/dist/esm/{snk-simple-bar_2.entry.js → snk-simple-crud.entry.js} +7 -44
  180. package/dist/esm/snk-tab-config.entry.js +1 -1
  181. package/dist/esm/snk-taskbar.entry.js +4 -4
  182. package/dist/esm/{taskbar-elements-8ff33c26.js → taskbar-elements-26d0fba3.js} +3 -3
  183. package/dist/esm/{taskbar-processor-20de6616.js → taskbar-processor-dfef41a8.js} +1 -1
  184. package/dist/esm/teste-pesquisa.entry.js +1 -1
  185. package/dist/sankhyablocks/{p-f27dc5e9.entry.js → p-00d1cac4.entry.js} +1 -1
  186. package/dist/sankhyablocks/{p-b9667fbe.js → p-066ee142.js} +2 -2
  187. package/dist/sankhyablocks/p-09a058ba.entry.js +1 -0
  188. package/dist/sankhyablocks/{p-82bc4666.entry.js → p-0dec4d29.entry.js} +1 -1
  189. package/dist/sankhyablocks/{p-1e6a95f5.entry.js → p-12632b8e.entry.js} +1 -1
  190. package/dist/sankhyablocks/{p-384c4a6b.js → p-18b34bb4.js} +1 -1
  191. package/dist/sankhyablocks/{p-538c057a.entry.js → p-2ad89e28.entry.js} +1 -1
  192. package/dist/sankhyablocks/p-2d5108b3.js +1 -0
  193. package/dist/sankhyablocks/{p-ff398057.entry.js → p-34cd4b39.entry.js} +1 -1
  194. package/dist/sankhyablocks/p-36ecb6ab.js +1 -0
  195. package/dist/sankhyablocks/p-372e0185.entry.js +1 -0
  196. package/dist/sankhyablocks/p-3be34bd1.entry.js +1 -0
  197. package/dist/sankhyablocks/p-3d45107f.js +1 -0
  198. package/dist/sankhyablocks/{p-28c12f65.js → p-463e0936.js} +1 -1
  199. package/dist/sankhyablocks/{p-e701646c.entry.js → p-49d628d1.entry.js} +1 -1
  200. package/dist/sankhyablocks/{p-e642bf7a.entry.js → p-50db4bc4.entry.js} +1 -1
  201. package/dist/sankhyablocks/{p-093febff.entry.js → p-5427566a.entry.js} +1 -1
  202. package/dist/sankhyablocks/{p-6a02e236.js → p-590d8900.js} +1 -1
  203. package/dist/sankhyablocks/p-5a6c090e.entry.js +1 -0
  204. package/dist/sankhyablocks/{p-e2bb9c9a.entry.js → p-67a19b48.entry.js} +1 -1
  205. package/dist/sankhyablocks/{p-19692f92.js → p-69770075.js} +1 -1
  206. package/dist/sankhyablocks/p-6d4169fc.entry.js +1 -0
  207. package/dist/sankhyablocks/{p-0b40c655.js → p-708ee8ee.js} +1 -1
  208. package/dist/sankhyablocks/{p-9af04fc7.entry.js → p-718cc24b.entry.js} +1 -1
  209. package/dist/sankhyablocks/{p-2d0fc912.entry.js → p-7946512f.entry.js} +1 -1
  210. package/dist/sankhyablocks/{p-900b2889.entry.js → p-7a5e1be7.entry.js} +1 -1
  211. package/dist/sankhyablocks/p-801b8858.js +68 -0
  212. package/dist/sankhyablocks/{p-80e52e85.entry.js → p-847b9506.entry.js} +1 -1
  213. package/dist/sankhyablocks/{p-56d70073.entry.js → p-8d541539.entry.js} +1 -1
  214. package/dist/sankhyablocks/{p-584a315a.entry.js → p-8e98a893.entry.js} +1 -1
  215. package/dist/sankhyablocks/p-9731180c.entry.js +1 -0
  216. package/dist/sankhyablocks/{p-b680fa7a.entry.js → p-a655ea15.entry.js} +1 -1
  217. package/dist/sankhyablocks/{p-eae124e3.entry.js → p-a8b06801.entry.js} +1 -1
  218. package/dist/sankhyablocks/{p-b25450ab.js → p-a8e5ded0.js} +1 -1
  219. package/dist/sankhyablocks/{p-6ac29569.entry.js → p-b66b99d9.entry.js} +1 -1
  220. package/dist/sankhyablocks/p-b7efc49a.entry.js +1 -0
  221. package/dist/sankhyablocks/{p-9c7f7214.entry.js → p-b91ee370.entry.js} +1 -1
  222. package/dist/sankhyablocks/{p-e551b19a.entry.js → p-b940798f.entry.js} +1 -1
  223. package/dist/sankhyablocks/{p-72e78de0.entry.js → p-bbefb3b2.entry.js} +1 -1
  224. package/dist/sankhyablocks/p-bdd61fa8.entry.js +1 -0
  225. package/dist/sankhyablocks/{p-f8c66aa3.entry.js → p-c06973e7.entry.js} +1 -1
  226. package/dist/sankhyablocks/{p-257c71a7.entry.js → p-c17e19a2.entry.js} +1 -1
  227. package/dist/sankhyablocks/p-c6bf66e0.js +1 -0
  228. package/dist/sankhyablocks/p-cdfddb41.entry.js +1 -0
  229. package/dist/sankhyablocks/p-cf90a195.entry.js +1 -0
  230. package/dist/sankhyablocks/{p-44c2ed16.entry.js → p-d11c5026.entry.js} +1 -1
  231. package/dist/sankhyablocks/p-d5145c3f.entry.js +1 -0
  232. package/dist/sankhyablocks/p-de328b00.entry.js +1 -0
  233. package/dist/sankhyablocks/{p-971abcc2.entry.js → p-e500863b.entry.js} +1 -1
  234. package/dist/sankhyablocks/{p-22e44b9d.entry.js → p-e824aef2.entry.js} +1 -1
  235. package/dist/sankhyablocks/{p-4ce96831.entry.js → p-eb24c092.entry.js} +1 -1
  236. package/dist/sankhyablocks/{p-4c2015a9.js → p-eb90de43.js} +1 -1
  237. package/dist/sankhyablocks/p-ebb8de34.entry.js +1 -0
  238. package/dist/sankhyablocks/p-f55450d5.entry.js +1 -0
  239. package/dist/sankhyablocks/{p-8652d177.entry.js → p-fc512cbe.entry.js} +1 -1
  240. package/dist/sankhyablocks/{p-786ae316.entry.js → p-fced1d89.entry.js} +1 -1
  241. package/dist/sankhyablocks/{p-e0b4aec3.entry.js → p-fdb43927.entry.js} +1 -1
  242. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  243. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized/snk-filter-personalized.d.ts +85 -0
  244. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +6 -6
  245. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +2 -0
  246. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +18 -1
  247. package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +14 -6
  248. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +10 -3
  249. package/dist/types/components/snk-filter-bar/types/custom-element-filter.d.ts +6 -0
  250. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +10 -1
  251. package/dist/types/components/snk-filter-bar/utils/filters-mock.d.ts +92 -15
  252. package/dist/types/components/snk-filter-field-search/interfaces/index.d.ts +5 -11
  253. package/dist/types/components/snk-filter-field-search/snk-filter-field-search.d.ts +3 -0
  254. package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +39 -6
  255. package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.d.ts +82 -0
  256. package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.d.ts +1 -1
  257. package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +13 -1
  258. package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionGroup.d.ts +0 -0
  259. package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionItem.d.ts +23 -3
  260. package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IParameter.d.ts +21 -0
  261. package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IPersonalizedFilter.d.ts +11 -0
  262. package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/index.d.ts +3 -0
  263. package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.d.ts +14 -2
  264. package/dist/types/components.d.ts +169 -10
  265. package/dist/types/lib/@types/index.d.ts +3 -1
  266. package/dist/types/lib/configs/ConfigStorage.d.ts +5 -0
  267. package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +4 -2
  268. package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +5 -0
  269. package/dist/types/lib/store/index.d.ts +1 -2
  270. package/package.json +5 -5
  271. package/react/components.d.ts +1 -0
  272. package/react/components.js +1 -0
  273. package/react/components.js.map +1 -1
  274. package/dist/cjs/ConfigStorage-f68c3607.js +0 -124
  275. package/dist/cjs/index-8d94b7e0.js +0 -7
  276. package/dist/cjs/snk-expression-item.cjs.entry.js +0 -213
  277. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +0 -214
  278. package/dist/esm/ConfigStorage-e6c17998.js +0 -121
  279. package/dist/esm/index-620ac460.js +0 -7
  280. package/dist/esm/snk-expression-item.entry.js +0 -209
  281. package/dist/sankhyablocks/p-0b6ddb67.entry.js +0 -1
  282. package/dist/sankhyablocks/p-0c2afa63.entry.js +0 -1
  283. package/dist/sankhyablocks/p-343699ad.entry.js +0 -1
  284. package/dist/sankhyablocks/p-471568c7.entry.js +0 -1
  285. package/dist/sankhyablocks/p-6c2c71ca.js +0 -1
  286. package/dist/sankhyablocks/p-8ce9ea9f.entry.js +0 -1
  287. package/dist/sankhyablocks/p-8efb0f47.entry.js +0 -1
  288. package/dist/sankhyablocks/p-9a448ff9.entry.js +0 -1
  289. package/dist/sankhyablocks/p-9e50681c.entry.js +0 -1
  290. package/dist/sankhyablocks/p-9f66bc54.entry.js +0 -1
  291. package/dist/sankhyablocks/p-b1c02726.js +0 -1
  292. package/dist/sankhyablocks/p-b34d23fa.js +0 -1
  293. package/dist/sankhyablocks/p-c20dd153.entry.js +0 -1
  294. package/dist/sankhyablocks/p-cbb5c440.entry.js +0 -1
  295. package/dist/sankhyablocks/p-f3241ada.entry.js +0 -1
  296. package/dist/sankhyablocks/p-f4184ce7.js +0 -1
  297. package/dist/sankhyablocks/p-ff96b509.entry.js +0 -27
  298. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +0 -40
@@ -2,124 +2,196 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-21bd01e1.js');
6
- const DataFetcher = require('./DataFetcher-a9d0228f.js');
7
- const index$1 = require('./index-f400b1d6.js');
8
- const index$2 = require('./index-de79181a.js');
5
+ const index = require('./index-aaaa2af5.js');
9
6
  const core = require('@sankhyalabs/core');
7
+ const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-7d959e91.js');
8
+ const ConfigStorage = require('./ConfigStorage-0a738cdc.js');
9
+ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
10
+ const IExpressionItem = require('./IExpressionItem-1090c3fd.js');
11
+ const index$1 = require('./index-59a3e2de.js');
12
+ require('./index-614af008.js');
13
+ require('./filter-item-type.enum-aa823a00.js');
14
+ require('./form-config-fetcher-92bc8fe7.js');
15
+ require('./DataFetcher-a9d0228f.js');
10
16
  require('./_commonjsHelpers-537d719a.js');
17
+ require('./resource-fetcher-2979b54b.js');
18
+ require('./filter-bar-config-fetcher-75219599.js');
11
19
 
12
- class PersonalizedFilterFetcher {
13
- constructor() {
14
- this.templateByQuery = new Map();
15
- this.buildTemplates();
16
- }
17
- buildTemplates() {
18
- const query = DataFetcher.dist.gql `
19
- query($name: String!) {
20
- $queryAlias$: fetchFilterFields(name: $name){
21
- currentLink {
22
- description
23
- uri
24
- }
25
- links {
26
- description
27
- uri
28
- fieldCount
29
- }
30
- fields {
31
- name
32
- description
33
- uri
34
- onlyDate
35
- dataType
36
- userInterface
37
- properties {
38
- name
39
- value
40
- }
41
- }
42
- }
43
- }
44
- `;
45
- this.templateByQuery.set("fetchFilterFields", query);
46
- }
47
- loadFields(uri) {
48
- return new Promise((resolve, reject) => {
49
- DataFetcher.DataFetcher.get()
50
- .callGraphQL({
51
- values: { name: uri },
52
- query: this.templateByQuery.get("fetchFilterFields"),
53
- })
54
- .then((resp) => {
55
- let fields = resp.fields;
56
- for (const field of fields) {
57
- if (Array.isArray(field.properties) && field.properties.length > 0 && field.userInterface === "SEARCH") {
58
- const propertiesConvertedObject = field.properties.reduce((accumulator, prop) => {
59
- accumulator[prop.name] = prop.value;
60
- return accumulator;
61
- }, {});
62
- field.properties = propertiesConvertedObject;
63
- }
64
- }
65
- resolve(Object.assign(Object.assign({}, resp), { fields: fields }));
66
- })
67
- .catch((error) => {
68
- reject(error);
69
- });
70
- });
71
- }
72
- }
73
-
74
- const snkPersonalizedFilterCss = ":host{display:flex}";
20
+ const snkPersonalizedFilterCss = ".sc-snk-personalized-filter-h{display:flex;height:100%;padding:var(--space--large, 24px);--snk-personalized-filter--width:100%;--snk-personalized-filter--height:100%;--snk-personalized-filter--background-color-line:var(--color--disable-secondary);--snk-personalized-filter--margin-line:var(--border--radius-medium, 12px)}.snk-personalized-filter.sc-snk-personalized-filter{height:var(--snk-personalized-filter--width);width:var(--snk-personalized-filter--height)}.snk-personalized-filter__header-actions.sc-snk-personalized-filter{display:flex;gap:var(--space--medium)}.snk-personalized-filter__group.sc-snk-personalized-filter{flex:1}.snk-personalized-filter__expression-input--line.sc-snk-personalized-filter{width:100%;height:2px;background-color:var(--snk-personalized-filter--background-color-line);margin-top:var(--snk-personalized-filter--margin-line);margin-bottom:var(--snk-personalized-filter--margin-line)}.ez-box__main.sc-snk-personalized-filter{height:90%}";
75
21
 
76
22
  const SnkPersonalizedFilter = class {
77
23
  constructor(hostRef) {
78
24
  index.registerInstance(this, hostRef);
79
- this._personalizedFilterFetcher = new PersonalizedFilterFetcher();
25
+ this.ezCancel = index.createEvent(this, "ezCancel", 7);
26
+ this.ezSave = index.createEvent(this, "ezSave", 7);
27
+ this._personalizedFilterFetcher = new ConfigStorage.PersonalizedFilterFetcher();
80
28
  this._dataSourceFetcher = {
81
29
  fetchData: async (entity) => {
82
30
  let entityURI = entity === null || entity === void 0 ? void 0 : entity.uri;
83
31
  if (core.StringUtils.isEmpty(entityURI)) {
84
- entityURI = "dd://Financeiro/br.com.sankhya.fin.cad.receber"; //TODO: Receber como prop
32
+ entityURI = this.entityUri;
85
33
  }
86
34
  return await this._personalizedFilterFetcher.loadFields(entityURI);
87
35
  }
88
36
  };
89
- this.items = {
90
- entityName: "Financeiro",
91
- fieldName: "CODBCO",
92
- description: "Financeiro >> Banco",
93
- type: index$1.FilterUserConfigTypes.DECIMAL,
94
- expression: "Financeiro.CODBCO",
95
- operand: index$1.FilterOperand.EQUAL,
96
- paramVariable: false,
97
- value: "61",
98
- systemConfig: null,
99
- userConfig: null
100
- };
101
- this.handleFilterItemChange = (changes) => {
102
- console.log("Campo do ExpressionItem alterado");
103
- console.log(changes);
104
- };
105
- this.handleFilterItemRemove = (expression) => {
106
- console.log("Event de deleção disparado");
107
- console.log(expression);
108
- };
37
+ this._filterAssistentMode = true;
38
+ this._filterAssistent = undefined;
109
39
  this.messagesBuilder = undefined;
40
+ this.entityUri = undefined;
41
+ this.filterId = undefined;
42
+ this.configName = undefined;
43
+ }
44
+ /*
45
+ * Cria um novo filtro se não houver nenhum filtro existente
46
+ */
47
+ async createPersonalizedFilter() {
48
+ const newPersonalizedFilter = {
49
+ name: "",
50
+ active: true,
51
+ expression: "",
52
+ parameters: [],
53
+ assistent: {
54
+ id: core.StringUtils.generateUUID(),
55
+ items: [
56
+ {
57
+ id: core.StringUtils.generateUUID(),
58
+ entityName: "",
59
+ fieldName: "",
60
+ description: "",
61
+ fieldLabel: "Valor",
62
+ type: undefined,
63
+ expression: undefined,
64
+ operand: undefined,
65
+ paramVariable: false,
66
+ value: undefined,
67
+ systemConfig: null,
68
+ userConfig: null
69
+ }
70
+ ],
71
+ childrenGroups: [],
72
+ operand: IExpressionItem.FilterGroupCondition.AND
73
+ }
74
+ };
75
+ this._originalFilterAssistent = core.ObjectUtils.copy(newPersonalizedFilter);
76
+ this._filterAssistent = core.ObjectUtils.copy(newPersonalizedFilter);
77
+ }
78
+ loadFilter(newValue, oldValue) {
79
+ if (newValue == null || oldValue == newValue) {
80
+ return;
81
+ }
82
+ ConfigStorage.ConfigStorage.get().then((_instance) => {
83
+ ConfigStorage.ConfigStorage.loadPersonalizedFilter(newValue, this.configName)
84
+ .then((resp) => {
85
+ const personalizedFilter = this.addLabelToItems(resp);
86
+ this._filterAssistent = personalizedFilter;
87
+ this._originalFilterAssistent = core.ObjectUtils.copy(personalizedFilter);
88
+ this._filterAssistentMode = this._filterAssistent.hasOwnProperty("assistent") && this._filterAssistent.assistent != undefined;
89
+ });
90
+ });
110
91
  }
111
92
  componentWillLoad() {
112
- if (index$2.store.get("filterFieldsDataSource") == undefined) {
113
- index$2.store.set("filterFieldsDataSource", this._dataSourceFetcher);
93
+ var _a;
94
+ if (index$1.store.get(`filterFieldsDataSource.${this.entityUri}`) == undefined) {
95
+ index$1.store.set(`filterFieldsDataSource.${this.entityUri}`, this._dataSourceFetcher);
114
96
  }
115
97
  if (!this.messagesBuilder) {
116
- const snkApp = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
117
- this.messagesBuilder = snkApp === null || snkApp === void 0 ? void 0 : snkApp.messagesBuilder;
98
+ this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
99
+ this.messagesBuilder = (_a = this._application) === null || _a === void 0 ? void 0 : _a.messagesBuilder;
118
100
  }
101
+ this.loadFilter(this.filterId, undefined);
102
+ }
103
+ getMessage(key, params) {
104
+ return this._application.messagesBuilder.getMessage(key, params);
105
+ }
106
+ saveFilter() {
107
+ ConfigStorage.ConfigStorage.savePersonalizedFilter(this._filterAssistent, this.configName).then((personalizedFilter) => {
108
+ this._elButtonSave.enabled = false;
109
+ utils.ApplicationUtils.info(this.getMessage("snkPersonalizedFilter.confirmSave.title", { name: this._filterAssistent.name }), { iconName: "check" });
110
+ const updatedFilterAssistent = Object.assign(Object.assign({}, personalizedFilter), this._filterAssistent);
111
+ updatedFilterAssistent.parameters = PersonalizedFilterUtils.PersonalizedFilterUtils.buildVariableParameters(this._filterAssistent.assistent);
112
+ this._originalFilterAssistent = core.ObjectUtils.copy(updatedFilterAssistent);
113
+ this._filterAssistent = core.ObjectUtils.copy(updatedFilterAssistent);
114
+ });
115
+ }
116
+ removeFilter() {
117
+ ConfigStorage.ConfigStorage.removePersonalizedFilter(this._filterAssistent, this.configName);
118
+ }
119
+ async handleFilterGroupChange() {
120
+ const assistent = await this._mainExpressionGroup.getExpressionGroup();
121
+ this._filterAssistent = Object.assign(Object.assign({}, this._filterAssistent), { assistent });
122
+ this._filterAssistent.parameters = PersonalizedFilterUtils.PersonalizedFilterUtils.buildVariableParameters(this._filterAssistent.assistent);
123
+ this._elTextAreaExpression.value = PersonalizedFilterUtils.PersonalizedFilterUtils.buildGroupExpression(this._filterAssistent.assistent, true);
124
+ this._elButtonSave.enabled = !this.hasChangesToSave();
125
+ }
126
+ hasChangesToSave() {
127
+ return JSON.stringify(this._filterAssistent) === JSON.stringify(this._originalFilterAssistent);
128
+ }
129
+ handleSave() {
130
+ const { assistent, expression } = this._filterAssistent;
131
+ const isValid = PersonalizedFilterUtils.PersonalizedFilterUtils.validateFields(assistent);
132
+ if (!isValid || !this._filterAssistent.name)
133
+ return this._application.error(this.getMessage("snkPersonalizedFilter.error.title"), this.getMessage("snkPersonalizedFilter.error.description"));
134
+ const expressionQuery = !!assistent ? PersonalizedFilterUtils.PersonalizedFilterUtils.buildGroupExpression(assistent) : expression;
135
+ this._filterAssistent.expression = expressionQuery;
136
+ this.ezSave.emit(expressionQuery);
137
+ this.saveFilter();
138
+ }
139
+ handleCancel() {
140
+ if (this.hasChangesToSave()) {
141
+ return this.ezCancel.emit();
142
+ }
143
+ utils.ApplicationUtils.confirm(this.getMessage("snkPersonalizedFilter.confirmCancel.title"), this.getMessage("snkPersonalizedFilter.confirmCancel.description"))
144
+ .then((canCancel) => {
145
+ var _a;
146
+ if (canCancel) {
147
+ this._filterAssistent = core.ObjectUtils.copy((_a = this._originalFilterAssistent) !== null && _a !== void 0 ? _a : {});
148
+ this.ezCancel.emit();
149
+ this._elButtonSave.enabled = false;
150
+ }
151
+ });
152
+ }
153
+ handleTitleChange(name) {
154
+ this._filterAssistent = Object.assign(Object.assign({}, this._filterAssistent), { name });
155
+ this._elButtonSave.enabled = !this.hasChangesToSave();
156
+ }
157
+ addLabelToItems(resp) {
158
+ //Workaround: Alguns filtros foram salvos sem o fieldLabel. Para evitar transtornos
159
+ //tentamos usar o fieldLabel que pode estar informado no parametro.
160
+ if (resp.assistent && resp.assistent.items && resp.assistent.items.length > 0) {
161
+ resp.assistent.items.forEach(item => {
162
+ if (item.fieldLabel == undefined) {
163
+ const param = (resp.parameters || []).find(param => param.fieldName === item.fieldName);
164
+ if (param) {
165
+ item.fieldLabel = param.label;
166
+ }
167
+ }
168
+ });
169
+ }
170
+ return resp;
171
+ }
172
+ handleExpressionChange(expression) {
173
+ this._filterAssistent = Object.assign(Object.assign({}, this._filterAssistent), { expression });
174
+ this._elButtonSave.enabled = !this.hasChangesToSave();
175
+ }
176
+ getWarningMessageComponent() {
177
+ var _a;
178
+ if (core.StringUtils.isEmpty((_a = this._filterAssistent) === null || _a === void 0 ? void 0 : _a.warningMessage)) {
179
+ return undefined;
180
+ }
181
+ return (index.h("div", { class: "ez-flex" }, index.h("ez-alert", { alertType: "warn" }, this._filterAssistent.warningMessage)));
119
182
  }
120
183
  render() {
121
- return (index.h(index.Host, null, index.h("div", null, index.h("snk-expression-item", { expression: this.items, canRemove: true, onEzFilterItemChange: (evt) => this.handleFilterItemChange(evt.detail), onEzFilterItemRemove: (evt) => this.handleFilterItemRemove(evt.detail), messagesBuilder: this.messagesBuilder }))));
184
+ var _a, _b, _c, _d, _e;
185
+ if (!((_a = this._filterAssistent) === null || _a === void 0 ? void 0 : _a.assistent) && this._filterAssistentMode) {
186
+ return;
187
+ }
188
+ return (index.h(index.Host, null, index.h("div", { class: "snk-personalized-filter" }, index.h("div", null, index.h("snk-simple-bar", { label: this.filterId ? this.getMessage("snkPersonalizedFilter.info.titleEdit") : this.getMessage("snkPersonalizedFilter.info.titleAdd"), onExit: () => this.handleCancel() }, index.h("div", { class: "snk-personalized-filter__header-actions", slot: "rightSlot" }, index.h("ez-button", { size: "small", label: this.getMessage("snkPersonalizedFilter.info.labelCancel"), onClick: () => this.handleCancel() }), index.h("ez-button", { size: "small", ref: (el) => this._elButtonSave = el, enabled: false, class: "ez-button--primary", label: this.getMessage("snkPersonalizedFilter.info.labelSave"), onClick: this.handleSave.bind(this) })))), index.h("div", { class: "ez-box ez-margin-bottom--medium ez-box__main" }, index.h("div", { class: "ez-box__container" }, index.h("div", { class: "ez-flex ez-flex--column ez-size-width--full" }, index.h("div", { class: "ez-flex" }, index.h("ez-text-input", { class: "ez-padding-right--medium", label: this.getMessage("snkPersonalizedFilter.info.labelNameFilter"), value: (_b = this._filterAssistent) === null || _b === void 0 ? void 0 : _b.name, onEzChange: (evt) => this.handleTitleChange(evt.detail) })), this._filterAssistentMode ?
189
+ index.h(index.Fragment, null, index.h("div", { class: "ez-padding-top--small snk-personalized-filter__group" }, index.h("snk-expression-group", { ref: (el) => this._mainExpressionGroup = el, group: (_c = this._filterAssistent) === null || _c === void 0 ? void 0 : _c.assistent, messagesBuilder: this.messagesBuilder, onEzFilterGroupChange: this.handleFilterGroupChange.bind(this), filterId: this.filterId, entityURI: this.entityUri })), index.h("div", null, index.h("div", { class: "snk-personalized-filter__expression-input--line" }), index.h("ez-collapsible-box", { label: this.getMessage("snkPersonalizedFilter.info.titleCollapsible"), headerSize: "medium", value: true }, index.h("div", { class: "ez-box" }, index.h("div", { class: "ez-box__container" }, index.h("ez-text-area", { ref: (el) => this._elTextAreaExpression = el, enabled: false, label: this.getMessage("snkPersonalizedFilter.info.labelExpression"), value: (_d = this._filterAssistent) === null || _d === void 0 ? void 0 : _d.expression })))))) :
190
+ index.h(index.Fragment, null, index.h("span", { class: "ez-text ez-text--small ez-text--bold ez-padding-bottom--medium" }, "Express\u00E3o a ser aplicada:"), index.h("ez-text-area", { label: this.getMessage("snkPersonalizedFilter.info.labelExpression"), value: (_e = this._filterAssistent) === null || _e === void 0 ? void 0 : _e.expression, onEzChange: (evt) => this.handleExpressionChange(evt.detail) }), this.getWarningMessageComponent())))))));
122
191
  }
192
+ static get watchers() { return {
193
+ "filterId": ["loadFilter"]
194
+ }; }
123
195
  };
124
196
  SnkPersonalizedFilter.style = snkPersonalizedFilterCss;
125
197
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-21bd01e1.js');
5
+ const index = require('./index-aaaa2af5.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
 
8
8
  const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--medium, 12px);max-height:100%;height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records.sc-snk-pesquisa{font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);color:var(--snk-pesquisa__records--color);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}";
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-21bd01e1.js');
5
+ const index = require('./index-aaaa2af5.js');
6
6
  const constants = require('./constants-3787fa32.js');
7
7
 
8
8
  const snkSelectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-aaaa2af5.js');
6
+ const core = require('@sankhyalabs/core');
7
+
8
+ const snkSimpleBarCss = ".sc-snk-simple-bar-h{display:flex;height:100%;width:100%}.simple-bar__container.sc-snk-simple-bar{flex:1;display:flex;align-items:stretch;gap:var(--space--small)}.simple-bar__left-slot.sc-snk-simple-bar{min-width:280px;flex:1;display:flex;align-items:center}.simple-bar__right-slot.sc-snk-simple-bar{flex:1;display:flex;align-items:center;justify-content:flex-end}.simple-bar__column.sc-snk-simple-bar{flex:1;display:flex;flex-direction:column}";
9
+
10
+ const SnkSimpleBar = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.clickBreadcrumbItem = index.createEvent(this, "clickBreadcrumbItem", 3);
14
+ this.exit = index.createEvent(this, "exit", 3);
15
+ this.label = undefined;
16
+ this.breadcrumbItens = undefined;
17
+ this.messagesBuilder = undefined;
18
+ }
19
+ /**
20
+ * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
21
+ * através de um pequeno modulo na estrutura da aplicação:
22
+ * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
23
+ * Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-simple-bar.msg.ts"
24
+ */
25
+ getMessage(key, params) {
26
+ var _a;
27
+ if (this.messagesBuilder)
28
+ return this.messagesBuilder.getMessage(key, params);
29
+ if ((_a = this._application) === null || _a === void 0 ? void 0 : _a.messagesBuilder)
30
+ return this._application.messagesBuilder.getMessage(key, params);
31
+ }
32
+ componentDidLoad() {
33
+ if (!this._element)
34
+ return;
35
+ core.ElementIDUtils.addIDInfo(this._element);
36
+ this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
37
+ }
38
+ render() {
39
+ return (index.h("div", { class: "simple-bar__container ez-margin-vertical--medium ez-padding--extra-small" }, index.h("div", { class: "simple-bar__left-slot" }, index.h("ez-button", { class: "ez-padding-right--medium", title: this.getMessage('snkSimpleBar.backTitle'), mode: 'icon', iconName: "arrow_back", size: 'medium', onClick: () => this.exit.emit() }), index.h("div", { class: "simple-bar__column" }, index.h("h1", { class: "ez-title ez-title--primary ez-title--extra-large" }, this.label), index.h("ez-breadcrumb", { items: this.breadcrumbItens, onSelectedItem: ({ detail }) => this.clickBreadcrumbItem.emit(detail) }))), index.h("div", { class: "simple-bar__right-slot" }, index.h("slot", { name: "rightSlot" }))));
40
+ }
41
+ get _element() { return index.getElement(this); }
42
+ };
43
+ SnkSimpleBar.style = snkSimpleBarCss;
44
+
45
+ exports.snk_simple_bar = SnkSimpleBar;
@@ -2,54 +2,17 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-21bd01e1.js');
5
+ const index = require('./index-aaaa2af5.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const constants = require('./constants-3787fa32.js');
8
- const taskbarElements = require('./taskbar-elements-3be287d6.js');
8
+ const taskbarElements = require('./taskbar-elements-068aa945.js');
9
9
  require('./DataFetcher-a9d0228f.js');
10
10
  require('./pesquisa-fetcher-954b74c3.js');
11
- const index$1 = require('./index-f400b1d6.js');
12
- const taskbarProcessor = require('./taskbar-processor-02f0fc84.js');
13
- require('./index-de79181a.js');
11
+ const index$1 = require('./index-614af008.js');
12
+ const taskbarProcessor = require('./taskbar-processor-6442c585.js');
13
+ require('./index-59a3e2de.js');
14
14
  require('./_commonjsHelpers-537d719a.js');
15
15
 
16
- const snkSimpleBarCss = ".sc-snk-simple-bar-h{display:flex;height:100%;width:100%}.simple-bar__container.sc-snk-simple-bar{flex:1;display:flex;align-items:stretch;gap:var(--space--small)}.simple-bar__left-slot.sc-snk-simple-bar{min-width:280px;flex:1;display:flex;align-items:center}.simple-bar__right-slot.sc-snk-simple-bar{flex:1;display:flex;align-items:center;justify-content:flex-end}.simple-bar__column.sc-snk-simple-bar{flex:1;display:flex;flex-direction:column}";
17
-
18
- const SnkSimpleBar = class {
19
- constructor(hostRef) {
20
- index.registerInstance(this, hostRef);
21
- this.clickBreadcrumbItem = index.createEvent(this, "clickBreadcrumbItem", 3);
22
- this.exit = index.createEvent(this, "exit", 3);
23
- this.label = undefined;
24
- this.breadcrumbItens = undefined;
25
- this.messagesBuilder = undefined;
26
- }
27
- /**
28
- * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
29
- * através de um pequeno modulo na estrutura da aplicação:
30
- * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
31
- * Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-simple-bar.msg.ts"
32
- */
33
- getMessage(key, params) {
34
- var _a;
35
- if (this.messagesBuilder)
36
- return this.messagesBuilder.getMessage(key, params);
37
- if ((_a = this._application) === null || _a === void 0 ? void 0 : _a.messagesBuilder)
38
- return this._application.messagesBuilder.getMessage(key, params);
39
- }
40
- componentDidLoad() {
41
- if (!this._element)
42
- return;
43
- core.ElementIDUtils.addIDInfo(this._element);
44
- this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
45
- }
46
- render() {
47
- return (index.h("div", { class: "simple-bar__container ez-margin-vertical--medium ez-padding--extra-small" }, index.h("div", { class: "simple-bar__left-slot" }, index.h("ez-button", { class: "ez-padding-right--medium", title: this.getMessage('snkSimpleBar.backTitle'), mode: 'icon', iconName: "arrow_back", size: 'medium', onClick: () => this.exit.emit() }), index.h("div", { class: "simple-bar__column" }, index.h("h1", { class: "ez-title ez-title--primary ez-title--extra-large" }, this.label), index.h("ez-breadcrumb", { items: this.breadcrumbItens, onSelectedItem: ({ detail }) => this.clickBreadcrumbItem.emit(detail) }))), index.h("div", { class: "simple-bar__right-slot" }, index.h("slot", { name: "rightSlot" }))));
48
- }
49
- get _element() { return index.getElement(this); }
50
- };
51
- SnkSimpleBar.style = snkSimpleBarCss;
52
-
53
16
  class InMemoryLoader {
54
17
  constructor(metadata, records) {
55
18
  this.records = records || [];
@@ -327,5 +290,4 @@ const SnkSimpleCrud = class {
327
290
  };
328
291
  SnkSimpleCrud.style = snkSimpleCrudCss;
329
292
 
330
- exports.snk_simple_bar = SnkSimpleBar;
331
293
  exports.snk_simple_crud = SnkSimpleCrud;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-21bd01e1.js');
5
+ const index = require('./index-aaaa2af5.js');
6
6
  const draggable_bundle = require('./draggable.bundle-82a25c06.js');
7
7
  const core = require('@sankhyalabs/core');
8
8
  const constants = require('./constants-3787fa32.js');
@@ -2,12 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-21bd01e1.js');
5
+ const index = require('./index-aaaa2af5.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
8
- const taskbarElements = require('./taskbar-elements-3be287d6.js');
9
- const index$1 = require('./index-f400b1d6.js');
10
- require('./index-de79181a.js');
8
+ const taskbarElements = require('./taskbar-elements-068aa945.js');
9
+ const index$1 = require('./index-614af008.js');
10
+ require('./index-59a3e2de.js');
11
11
 
12
12
  const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex}";
13
13
 
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-21bd01e1.js');
4
- const index$2 = require('./index-f400b1d6.js');
5
- const index$1 = require('./index-de79181a.js');
3
+ const index = require('./index-aaaa2af5.js');
4
+ const index$2 = require('./index-614af008.js');
5
+ const index$1 = require('./index-59a3e2de.js');
6
6
 
7
7
  exports.TaskbarElement = void 0;
8
8
  (function (TaskbarElement) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const taskbarElements = require('./taskbar-elements-3be287d6.js');
3
+ const taskbarElements = require('./taskbar-elements-068aa945.js');
4
4
  const core = require('@sankhyalabs/core');
5
5
 
6
6
  const MINIMUM_SK_VERSION_TO_ATTACHMENT = "4.22";
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-21bd01e1.js');
5
+ const index = require('./index-aaaa2af5.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
 
8
8
  const testePesquisaCss = ":host{display:block}";
@@ -19,7 +19,7 @@
19
19
  "./components/snk-data-exporter/snk-data-exporter.js",
20
20
  "./components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js",
21
21
  "./components/snk-entity-list/snk-entity-list.js",
22
- "./components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js",
22
+ "./components/snk-filter-bar/filter-item/editors/snk-filter-personalized/snk-filter-personalized.js",
23
23
  "./components/snk-filter-bar/snk-filter-bar.js",
24
24
  "./components/snk-filter-bar/filter-item/snk-filter-detail.js",
25
25
  "./components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js",
@@ -39,6 +39,7 @@
39
39
  "./components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js",
40
40
  "./components/snk-grid/subcomponents/snk-select-box/snk-select-box.js",
41
41
  "./components/snk-personalized-filter/snk-personalized-filter.js",
42
+ "./components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js",
42
43
  "./components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js",
43
44
  "./components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js",
44
45
  "./components/snk-pesquisa/snk-pesquisa.js",
@@ -1,5 +1,5 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { ApplicationContext } from "@sankhyalabs/core";
2
+ import { ApplicationContext, ObjectUtils } from "@sankhyalabs/core";
3
3
  export class SnkEntityList {
4
4
  constructor() {
5
5
  this._searchValue = undefined;
@@ -18,12 +18,14 @@ export class SnkEntityList {
18
18
  }
19
19
  ezListChangeListener(evt) {
20
20
  var _a, _b;
21
- (_a = (this.getListConfigValue(this.config))) === null || _a === void 0 ? void 0 : _a.forEach(value => {
21
+ const configCopy = ObjectUtils.copy(this.config);
22
+ (_a = (this.getListConfigValue(configCopy))) === null || _a === void 0 ? void 0 : _a.forEach(value => {
22
23
  var _a, _b;
23
24
  if (value && value.id === ((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.id)) {
24
25
  value.check = (_b = evt.detail) === null || _b === void 0 ? void 0 : _b.check;
25
26
  }
26
27
  });
28
+ this.config = ObjectUtils.copy(configCopy);
27
29
  this.saveConfig.emit(this.config);
28
30
  this.valueChanged.emit((_b = this.config) === null || _b === void 0 ? void 0 : _b.value);
29
31
  }
@@ -94,8 +96,8 @@ export class SnkEntityList {
94
96
  return (_d = (_b = (_a = config.value) === null || _a === void 0 ? void 0 : _a.elements) !== null && _b !== void 0 ? _b : (_c = config === null || config === void 0 ? void 0 : config.value) === null || _c === void 0 ? void 0 : _c.members) !== null && _d !== void 0 ? _d : config === null || config === void 0 ? void 0 : config.value;
95
97
  }
96
98
  render() {
97
- var _a;
98
- return (h(Host, null, h("ez-search", { ref: elem => this._searchElement = elem, optionLoader: argument => this.optionLoader(argument), value: this._searchValue, label: (_a = this.config) === null || _a === void 0 ? void 0 : _a.label, onEzChange: evt => this.onEzSearchChange(evt) }), h("label", { class: "label" }, this.getMessage("snkEntityList.selected")), h("div", { style: this.maxHeightList ? { 'max-height': this.maxHeightList } : {}, class: { "snk-entity-list--overflow": !!this.maxHeightList } }, h("ez-list", { ref: (el) => this._ezList = el, id: "snkEntityList", listMode: "check", dataSource: this._ezListSource, hoverFeedback: true, itemSlotBuilder: this.rightListSlotBuilder, onEzCheckChange: evt => this.ezListChangeListener(evt) }))));
99
+ var _a, _b;
100
+ return (h(Host, null, h("ez-search", { ref: elem => this._searchElement = elem, optionLoader: argument => this.optionLoader(argument), value: this._searchValue, label: (_a = this.config) === null || _a === void 0 ? void 0 : _a.label, onEzChange: evt => this.onEzSearchChange(evt), suppressEmptyOption: true }), ((_b = this._ezListSource) === null || _b === void 0 ? void 0 : _b.length) > 0 && (h("label", { class: "label" }, this.getMessage("snkEntityList.selected"))), h("div", { style: this.maxHeightList ? { 'max-height': this.maxHeightList } : {}, class: { "snk-entity-list--overflow": !!this.maxHeightList } }, h("ez-list", { ref: (el) => this._ezList = el, id: "snkEntityList", listMode: "check", dataSource: this._ezListSource, hoverFeedback: true, itemSlotBuilder: this.rightListSlotBuilder, onEzCheckChange: evt => this.ezListChangeListener(evt) }))));
99
101
  }
100
102
  static get is() { return "snk-entity-list"; }
101
103
  static get encapsulation() { return "scoped"; }
@@ -1,14 +1,15 @@
1
1
  import { DataType } from "@sankhyalabs/core";
2
2
  import { toString } from "@sankhyalabs/core/dist/dataunit/metadata/DataType";
3
3
  import FilterItemType from "../filter-item-type.enum";
4
+ import { FilterOperand } from "../../../../lib/@types";
4
5
  const buildFilter = (item) => {
5
6
  switch (item.type) {
6
7
  case FilterItemType.DEFAULT_FILTER:
7
8
  return buildDefault(item);
8
9
  case FilterItemType.BINARY_SELECT:
9
10
  return buildBinary(item);
10
- case FilterItemType.MULTI_SELECT:
11
- return buildMultSelect(item);
11
+ case FilterItemType.MULTI_LIST:
12
+ return buildMultiList(item);
12
13
  case FilterItemType.PERIOD:
13
14
  return buildPeriod(item);
14
15
  case FilterItemType.SEARCH:
@@ -33,9 +34,25 @@ function buildBinary(item) {
33
34
  const selectedOption = options.find(opt => opt.name === value);
34
35
  return { name: id, expression: selectedOption.expression, params: [] };
35
36
  }
36
- function buildMultSelect(item) {
37
+ function buildMultiList(item) {
37
38
  const { id, value, props } = item;
38
- return { name: id, expression: props.expression, params: [{ name: id, dataType: DataType.TEXT, value }] };
39
+ const parsedValues = parseMultiListValues(value);
40
+ if (parsedValues.length > 0) {
41
+ return {
42
+ name: id,
43
+ expression: props.expression,
44
+ params: [{
45
+ name: id,
46
+ dataType: DataType.TEXT,
47
+ value: JSON.stringify(parsedValues)
48
+ }]
49
+ };
50
+ }
51
+ }
52
+ function parseMultiListValues(multiListValue) {
53
+ var _a, _b;
54
+ const value = (_b = (_a = multiListValue === null || multiListValue === void 0 ? void 0 : multiListValue.elements) !== null && _a !== void 0 ? _a : multiListValue === null || multiListValue === void 0 ? void 0 : multiListValue.members) !== null && _b !== void 0 ? _b : multiListValue;
55
+ return value.filter(item => item === null || item === void 0 ? void 0 : item.check).map(({ id }) => Number.isNaN(+id) ? String(id) : Number(id));
39
56
  }
40
57
  function buildPeriod(item) {
41
58
  const { id, value, props } = item;
@@ -80,12 +97,13 @@ function buildNumber(item) {
80
97
  return { name: id, expression, params: [{ name: id, dataType: DataType.NUMBER, value: toString(DataType.NUMBER, value) }] };
81
98
  }
82
99
  function buildPersonalized(item) {
83
- var _a;
84
- const { id, value, props } = item;
85
- const expression = props.expression;
86
- return {
87
- name: id, expression, params: (((_a = props.personalizedFilter) === null || _a === void 0 ? void 0 : _a.parameters) || []).map((param, index) => {
88
- const valuesArray = Array.from(value);
100
+ const { id, groupedItems = [] } = item;
101
+ const activeFilters = groupedItems.filter(groupItem => !!groupItem.visible);
102
+ const filters = activeFilters.map(item => {
103
+ var _a;
104
+ const expression = item.props.expression;
105
+ const params = (((_a = item.props.personalizedFilter) === null || _a === void 0 ? void 0 : _a.parameters) || []).map((param, index) => {
106
+ const valuesArray = Array.from(item.value || 0);
89
107
  const dataType = param.dataType;
90
108
  let paramValue = (index >= 0 && index < valuesArray.length ? valuesArray[index] : null);
91
109
  if (paramValue != undefined && typeof paramValue === "object" && "value" in paramValue) {
@@ -95,6 +113,10 @@ function buildPersonalized(item) {
95
113
  paramValue = false;
96
114
  }
97
115
  return { name: param.name, dataType, value: typeof paramValue === "string" ? paramValue : toString(dataType, paramValue) };
98
- })
99
- };
116
+ });
117
+ return { expression, name: item.id, params };
118
+ });
119
+ const expression = filters.map(filter => `(${filter.expression})`).join(` ${FilterOperand.AND} `);
120
+ const params = filters.flatMap(filter => filter.params);
121
+ return { name: id, expression, params };
100
122
  }
@@ -49,8 +49,10 @@ export class SnkFilterPeriod {
49
49
  }
50
50
  }
51
51
  componentWillLoad() {
52
- this._startDateLabel = this.getMessage('snkFilterBar.labelStartDatePeriod');
53
- this._endDateLabel = this.getMessage('snkFilterBar.labelEndDatePeriod');
52
+ if (this.getMessage) {
53
+ this._startDateLabel = this.getMessage('snkFilterBar.labelStartDatePeriod');
54
+ this._endDateLabel = this.getMessage('snkFilterBar.labelEndDatePeriod');
55
+ }
54
56
  }
55
57
  render() {
56
58
  if (!this.config || this.config.type !== FilterItemType.PERIOD) {