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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/dist/cjs/{ConfigStorage-a1fab5ca.js → ConfigStorage-4201dd3d.js} +2 -2
  2. package/dist/cjs/{DataFetcher-384d2ce8.js → DataFetcher-b3a8075d.js} +2830 -2
  3. package/dist/cjs/FormConfigHelper-c5f5473a.js +342 -0
  4. package/dist/cjs/{ISave-ecbe9336.js → ISave-4674c283.js} +1 -1
  5. package/dist/cjs/{PersonalizedFilterUtils-eccb267a.js → PersonalizedFilterUtils-263e4d24.js} +52 -5
  6. package/dist/cjs/{SnkFormConfigManager-44386305.js → SnkFormConfigManager-c3a49038.js} +2 -2
  7. package/dist/cjs/{SnkMultiSelectionListDataSource-d341dd02.js → SnkMultiSelectionListDataSource-0bc94d36.js} +4 -4
  8. package/dist/cjs/{auth-fetcher-6b134ec4.js → auth-fetcher-0ecc53ff.js} +1 -1
  9. package/dist/cjs/{dataunit-fetcher-b9822794.js → dataunit-fetcher-bcbc38c0.js} +2 -3
  10. package/dist/cjs/{filter-type.enum-2bb46d2a.js → filter-type.enum-b3b388af.js} +7 -0
  11. package/dist/cjs/{form-config-fetcher-45d1964c.js → form-config-fetcher-f80dbc3b.js} +23 -5
  12. package/dist/cjs/index-1894343a.js +24 -36
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -5
  15. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  16. package/dist/cjs/snk-actions-button_9.cjs.entry.js +5 -6
  17. package/dist/cjs/snk-application.cjs.entry.js +7 -8
  18. package/dist/cjs/snk-attach_11.cjs.entry.js +2950 -0
  19. package/dist/cjs/snk-crud.cjs.entry.js +31 -243
  20. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -6
  21. package/dist/cjs/{snk-data-unit-4b6dc396.js → snk-data-unit-3b94547d.js} +11 -11
  22. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -4
  23. package/dist/cjs/snk-detail-view.cjs.entry.js +9 -10
  24. package/dist/cjs/snk-dynaform-config-header_5.cjs.entry.js +739 -0
  25. package/dist/cjs/snk-dynaform-detail-view_2.cjs.entry.js +938 -0
  26. package/dist/cjs/snk-dynaform-field-config_2.cjs.entry.js +327 -0
  27. package/dist/cjs/snk-dynaform-guides-view-e98f7f3a.js +747 -0
  28. package/dist/cjs/snk-dynaform-guides-view.cjs.entry.js +23 -0
  29. package/dist/cjs/snk-dynaform.cjs.entry.js +675 -0
  30. package/dist/cjs/{snk-expression-group_2.cjs.entry.js → snk-expression-group_4.cjs.entry.js} +421 -18
  31. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +41 -44
  32. package/dist/cjs/snk-form_2.cjs.entry.js +4 -5
  33. package/dist/cjs/snk-grid.cjs.entry.js +7 -8
  34. package/dist/cjs/{snk-guides-viewer-8e7a503b.js → snk-guides-viewer-3054d541.js} +1 -1
  35. package/dist/cjs/snk-guides-viewer.cjs.entry.js +5 -6
  36. package/dist/cjs/snk-layout-form-config.cjs.entry.js +4 -5
  37. package/dist/cjs/snk-pesquisa.cjs.entry.js +4 -5
  38. package/dist/cjs/taskbarUtils-38748460.js +231 -0
  39. package/dist/collection/collection-manifest.json +17 -0
  40. package/dist/collection/components/snk-dynaform/interfaces/PropsCustomEditor.js +1 -0
  41. package/dist/collection/components/snk-dynaform/interfaces/PropsCustomRender.js +1 -0
  42. package/dist/collection/components/snk-dynaform/snk-dynaform.css +64 -0
  43. package/dist/collection/components/snk-dynaform/snk-dynaform.js +1657 -0
  44. package/dist/collection/components/snk-dynaform/subcomponents/CardFormResizeObserver.js +26 -0
  45. package/dist/collection/components/snk-dynaform/subcomponents/GuideBuilder.js +51 -0
  46. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.css +112 -0
  47. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.js +992 -0
  48. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.css +64 -0
  49. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.js +588 -0
  50. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.css +98 -0
  51. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.js +1167 -0
  52. package/dist/collection/components/snk-dynaform-form-config/FormConfigHelper.js +325 -0
  53. package/dist/collection/components/snk-dynaform-form-config/SnkFormConfigManager.js +212 -0
  54. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.css +17 -0
  55. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.js +236 -0
  56. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.css +41 -0
  57. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.js +170 -0
  58. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.css +22 -0
  59. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.js +408 -0
  60. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-item.css +88 -0
  61. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-item.js +209 -0
  62. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.css +167 -0
  63. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.js +655 -0
  64. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.css +42 -0
  65. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.js +171 -0
  66. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-form-config.css +66 -0
  67. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-form-config.js +557 -0
  68. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.css +80 -0
  69. package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.js +326 -0
  70. package/dist/collection/components/snk-grid/snk-grid.css +4 -2
  71. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +22 -4
  72. package/dist/components/form-config-fetcher.js +22 -4
  73. package/dist/components/index.d.ts +12 -0
  74. package/dist/components/index.js +12 -0
  75. package/dist/components/snk-crud.js +1 -212
  76. package/dist/components/snk-dynaform-config-header.d.ts +11 -0
  77. package/dist/components/snk-dynaform-config-header.js +6 -0
  78. package/dist/components/snk-dynaform-config-header2.js +103 -0
  79. package/dist/components/snk-dynaform-configs-button.d.ts +11 -0
  80. package/dist/components/snk-dynaform-configs-button.js +6 -0
  81. package/dist/components/snk-dynaform-configs-button2.js +76 -0
  82. package/dist/components/snk-dynaform-detail-view.d.ts +11 -0
  83. package/dist/components/snk-dynaform-detail-view.js +6 -0
  84. package/dist/components/snk-dynaform-detail-view2.js +1835 -0
  85. package/dist/components/snk-dynaform-field-config.d.ts +11 -0
  86. package/dist/components/snk-dynaform-field-config.js +6 -0
  87. package/dist/components/snk-dynaform-field-config2.js +605 -0
  88. package/dist/components/snk-dynaform-field-item.d.ts +11 -0
  89. package/dist/components/snk-dynaform-field-item.js +6 -0
  90. package/dist/components/snk-dynaform-field-item2.js +96 -0
  91. package/dist/components/snk-dynaform-fields-layout.d.ts +11 -0
  92. package/dist/components/snk-dynaform-fields-layout.js +6 -0
  93. package/dist/components/snk-dynaform-fields-layout2.js +428 -0
  94. package/dist/components/snk-dynaform-fields-selector.d.ts +11 -0
  95. package/dist/components/snk-dynaform-fields-selector.js +6 -0
  96. package/dist/components/snk-dynaform-fields-selector2.js +104 -0
  97. package/dist/components/snk-dynaform-form-config.d.ts +11 -0
  98. package/dist/components/snk-dynaform-form-config.js +6 -0
  99. package/dist/components/snk-dynaform-form-config2.js +430 -0
  100. package/dist/components/snk-dynaform-form-view.d.ts +11 -0
  101. package/dist/components/snk-dynaform-form-view.js +6 -0
  102. package/dist/components/snk-dynaform-form-view2.js +270 -0
  103. package/dist/components/snk-dynaform-guides-configurator.d.ts +11 -0
  104. package/dist/components/snk-dynaform-guides-configurator.js +6 -0
  105. package/dist/components/snk-dynaform-guides-configurator2.js +173 -0
  106. package/dist/components/snk-dynaform-guides-view.d.ts +11 -0
  107. package/dist/components/snk-dynaform-guides-view.js +6 -0
  108. package/dist/components/snk-dynaform.d.ts +11 -0
  109. package/dist/components/snk-dynaform.js +1003 -0
  110. package/dist/components/snk-grid2.js +1 -1
  111. package/dist/components/taskbarUtils.js +224 -0
  112. package/dist/esm/{ConfigStorage-76872695.js → ConfigStorage-e834d1ea.js} +2 -2
  113. package/dist/esm/{DataFetcher-e60f8d53.js → DataFetcher-5ed0a377.js} +2830 -3
  114. package/dist/esm/FormConfigHelper-efc29480.js +328 -0
  115. package/dist/esm/{ISave-4929c071.js → ISave-5b46d691.js} +1 -1
  116. package/dist/esm/{PersonalizedFilterUtils-d2439a9a.js → PersonalizedFilterUtils-45b5803c.js} +49 -2
  117. package/dist/esm/{SnkFormConfigManager-83f6b22f.js → SnkFormConfigManager-bfd575c2.js} +2 -2
  118. package/dist/esm/{SnkMultiSelectionListDataSource-18abafb1.js → SnkMultiSelectionListDataSource-9e9166ae.js} +4 -4
  119. package/dist/esm/{auth-fetcher-1a31c1e4.js → auth-fetcher-5283045d.js} +1 -1
  120. package/dist/esm/{dataunit-fetcher-c176e002.js → dataunit-fetcher-3b1ca96e.js} +1 -2
  121. package/dist/esm/{filter-type.enum-f6a8fe23.js → filter-type.enum-62b7fe88.js} +8 -1
  122. package/dist/esm/{form-config-fetcher-b44b2727.js → form-config-fetcher-db1bf140.js} +23 -5
  123. package/dist/esm/index-04f73a26.js +24 -36
  124. package/dist/esm/loader.js +1 -1
  125. package/dist/esm/pesquisa-grid_2.entry.js +4 -5
  126. package/dist/esm/sankhyablocks.js +1 -1
  127. package/dist/esm/snk-actions-button_9.entry.js +5 -6
  128. package/dist/esm/snk-application.entry.js +6 -7
  129. package/dist/esm/snk-attach_11.entry.js +2936 -0
  130. package/dist/esm/snk-crud.entry.js +6 -218
  131. package/dist/esm/snk-data-exporter.entry.js +5 -6
  132. package/dist/esm/{snk-data-unit-d8cfa950.js → snk-data-unit-dfde62cb.js} +2 -2
  133. package/dist/esm/snk-data-unit.entry.js +3 -4
  134. package/dist/esm/snk-detail-view.entry.js +7 -8
  135. package/dist/esm/snk-dynaform-config-header_5.entry.js +731 -0
  136. package/dist/esm/snk-dynaform-detail-view_2.entry.js +933 -0
  137. package/dist/esm/snk-dynaform-field-config_2.entry.js +322 -0
  138. package/dist/esm/snk-dynaform-guides-view-1f1455d6.js +744 -0
  139. package/dist/esm/snk-dynaform-guides-view.entry.js +15 -0
  140. package/dist/esm/snk-dynaform.entry.js +671 -0
  141. package/dist/esm/{snk-expression-group_2.entry.js → snk-expression-group_4.entry.js} +405 -4
  142. package/dist/esm/snk-filter-bar_4.entry.js +5 -8
  143. package/dist/esm/snk-form_2.entry.js +4 -5
  144. package/dist/esm/snk-grid.entry.js +7 -8
  145. package/dist/esm/{snk-guides-viewer-adf39ea2.js → snk-guides-viewer-95fefcaa.js} +1 -1
  146. package/dist/esm/snk-guides-viewer.entry.js +5 -6
  147. package/dist/esm/snk-layout-form-config.entry.js +4 -5
  148. package/dist/esm/snk-pesquisa.entry.js +4 -5
  149. package/dist/esm/taskbarUtils-8501d09e.js +225 -0
  150. package/dist/sankhyablocks/p-0dbd53d9.js +1 -0
  151. package/dist/sankhyablocks/{p-f5ad0720.js → p-19d1ca14.js} +1 -1
  152. package/dist/sankhyablocks/{p-ab5e12fa.js → p-1cc4cf61.js} +1 -1
  153. package/dist/sankhyablocks/p-1edd6be6.entry.js +1 -0
  154. package/dist/sankhyablocks/p-22ddc1a5.entry.js +1 -0
  155. package/dist/sankhyablocks/p-24b059ee.entry.js +1 -0
  156. package/dist/sankhyablocks/{p-5c250661.js → p-2c00b93d.js} +1 -1
  157. package/dist/sankhyablocks/p-3623fddf.entry.js +1 -0
  158. package/dist/sankhyablocks/p-43c94ba5.entry.js +1 -0
  159. package/dist/sankhyablocks/p-449dfe55.entry.js +1 -0
  160. package/dist/sankhyablocks/p-451b5bcc.entry.js +1 -0
  161. package/dist/sankhyablocks/p-46d7e2de.js +1 -0
  162. package/dist/sankhyablocks/{p-3c990841.js → p-51e853f2.js} +1 -1
  163. package/dist/sankhyablocks/p-58709cf9.js +1 -0
  164. package/dist/sankhyablocks/p-589016e2.entry.js +1 -0
  165. package/dist/sankhyablocks/p-5d02c032.js +1 -0
  166. package/dist/sankhyablocks/p-5d50f59a.entry.js +1 -0
  167. package/dist/sankhyablocks/p-61776b68.entry.js +1 -0
  168. package/dist/sankhyablocks/p-6b8a1ec3.js +1 -0
  169. package/dist/sankhyablocks/p-7038cf62.entry.js +1 -0
  170. package/dist/sankhyablocks/{p-b1bb4cf1.js → p-70c2ee5c.js} +1 -1
  171. package/dist/sankhyablocks/p-7628e04f.entry.js +1 -0
  172. package/dist/sankhyablocks/p-7798788b.entry.js +1 -0
  173. package/dist/sankhyablocks/p-77c26de0.js +1 -0
  174. package/dist/sankhyablocks/p-7c34a0f7.entry.js +1 -0
  175. package/dist/sankhyablocks/p-a4a0d9b7.entry.js +1 -0
  176. package/dist/sankhyablocks/{p-4f7adf97.js → p-b1bf9564.js} +1 -1
  177. package/dist/sankhyablocks/p-b4c2a99c.entry.js +1 -0
  178. package/dist/sankhyablocks/p-b75af274.entry.js +1 -0
  179. package/dist/sankhyablocks/p-c538bd6c.entry.js +1 -0
  180. package/dist/sankhyablocks/{p-3704bf1b.js → p-d5810110.js} +1 -1
  181. package/dist/sankhyablocks/p-d7fd447e.entry.js +1 -0
  182. package/dist/sankhyablocks/p-d88278f8.js +28 -0
  183. package/dist/sankhyablocks/p-f076d742.js +60 -0
  184. package/dist/sankhyablocks/{p-8fe740b7.entry.js → p-f1ef090f.entry.js} +2 -2
  185. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  186. package/dist/types/components/snk-dynaform/interfaces/PropsCustomEditor.d.ts +4 -0
  187. package/dist/types/components/snk-dynaform/interfaces/PropsCustomRender.d.ts +4 -0
  188. package/dist/types/components/snk-dynaform/subcomponents/CardFormResizeObserver.d.ts +1 -0
  189. package/dist/types/components/snk-dynaform/subcomponents/GuideBuilder.d.ts +14 -0
  190. package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.d.ts +158 -0
  191. package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.d.ts +107 -0
  192. package/dist/types/components/snk-dynaform-form-config/FormConfigHelper.d.ts +36 -0
  193. package/dist/types/components/snk-dynaform-form-config/SnkFormConfigManager.d.ts +35 -0
  194. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.d.ts +23 -0
  195. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.d.ts +19 -0
  196. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.d.ts +56 -0
  197. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.d.ts +74 -0
  198. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.d.ts +21 -0
  199. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-form-config.d.ts +95 -0
  200. package/dist/types/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.d.ts +35 -0
  201. package/dist/types/components.d.ts +2403 -1322
  202. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +1 -0
  203. package/package.json +1 -1
  204. package/react/components.d.ts +12 -0
  205. package/react/components.js +12 -0
  206. package/react/components.js.map +1 -1
  207. package/dist/cjs/SnkMessageBuilder-a9300ebe.js +0 -2833
  208. package/dist/cjs/default-filters-a09bf82b.js +0 -8
  209. package/dist/cjs/index-62760a9c.js +0 -49
  210. package/dist/cjs/index-8d94b7e0.js +0 -7
  211. package/dist/cjs/snk-attach.cjs.entry.js +0 -948
  212. package/dist/cjs/snk-default-filter.cjs.entry.js +0 -77
  213. package/dist/cjs/snk-filter-advanced-mode_3.cjs.entry.js +0 -99
  214. package/dist/cjs/snk-filter-detail.cjs.entry.js +0 -198
  215. package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +0 -408
  216. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +0 -109
  217. package/dist/cjs/snk-image-input.cjs.entry.js +0 -160
  218. package/dist/cjs/snk-personalized-filter.cjs.entry.js +0 -358
  219. package/dist/cjs/snk-simple-crud.cjs.entry.js +0 -865
  220. package/dist/esm/SnkMessageBuilder-1eb7a1af.js +0 -2831
  221. package/dist/esm/default-filters-50105e43.js +0 -8
  222. package/dist/esm/index-620ac460.js +0 -7
  223. package/dist/esm/index-8acbae97.js +0 -49
  224. package/dist/esm/snk-attach.entry.js +0 -944
  225. package/dist/esm/snk-default-filter.entry.js +0 -73
  226. package/dist/esm/snk-filter-advanced-mode_3.entry.js +0 -93
  227. package/dist/esm/snk-filter-detail.entry.js +0 -194
  228. package/dist/esm/snk-filter-field-search_2.entry.js +0 -403
  229. package/dist/esm/snk-filter-modal-item.entry.js +0 -105
  230. package/dist/esm/snk-image-input.entry.js +0 -156
  231. package/dist/esm/snk-personalized-filter.entry.js +0 -354
  232. package/dist/esm/snk-simple-crud.entry.js +0 -861
  233. package/dist/sankhyablocks/p-0a4cdcde.entry.js +0 -1
  234. package/dist/sankhyablocks/p-0afc64df.entry.js +0 -1
  235. package/dist/sankhyablocks/p-10f27dc6.entry.js +0 -1
  236. package/dist/sankhyablocks/p-20f03230.entry.js +0 -1
  237. package/dist/sankhyablocks/p-2af8aca3.js +0 -1
  238. package/dist/sankhyablocks/p-3870748a.js +0 -28
  239. package/dist/sankhyablocks/p-3d294185.entry.js +0 -1
  240. package/dist/sankhyablocks/p-438a225f.entry.js +0 -1
  241. package/dist/sankhyablocks/p-4d04bc75.entry.js +0 -1
  242. package/dist/sankhyablocks/p-554c0e54.js +0 -1
  243. package/dist/sankhyablocks/p-57c184a2.entry.js +0 -1
  244. package/dist/sankhyablocks/p-68c1a093.js +0 -1
  245. package/dist/sankhyablocks/p-6a4b21dd.js +0 -1
  246. package/dist/sankhyablocks/p-6ae7543b.entry.js +0 -1
  247. package/dist/sankhyablocks/p-6e278003.js +0 -60
  248. package/dist/sankhyablocks/p-82bcb4cf.entry.js +0 -1
  249. package/dist/sankhyablocks/p-84345e7a.js +0 -1
  250. package/dist/sankhyablocks/p-95af0bb1.entry.js +0 -1
  251. package/dist/sankhyablocks/p-a905712a.entry.js +0 -1
  252. package/dist/sankhyablocks/p-aff2d081.entry.js +0 -1
  253. package/dist/sankhyablocks/p-b0a357b4.entry.js +0 -1
  254. package/dist/sankhyablocks/p-b568c1d4.js +0 -1
  255. package/dist/sankhyablocks/p-bab4cde4.entry.js +0 -1
  256. package/dist/sankhyablocks/p-bd3c1aaa.entry.js +0 -1
  257. package/dist/sankhyablocks/p-cc64239c.entry.js +0 -1
  258. package/dist/sankhyablocks/p-cd00a3d1.entry.js +0 -1
  259. package/dist/sankhyablocks/p-d9ec8c4b.entry.js +0 -1
  260. package/dist/sankhyablocks/p-dbdbb77a.entry.js +0 -1
  261. package/dist/sankhyablocks/p-e8df1dea.entry.js +0 -1
  262. package/dist/sankhyablocks/p-ef9343c3.entry.js +0 -1
  263. package/dist/sankhyablocks/p-f4184ce7.js +0 -1
@@ -1,408 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-1894343a.js');
6
- const index$1 = require('./index-8d94b7e0.js');
7
- const core = require('@sankhyalabs/core');
8
- const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
9
- const index$2 = require('./index-62760a9c.js');
10
- const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-eccb267a.js');
11
- require('./filter-item-type.enum-a7ffdaa6.js');
12
-
13
- const ICON_MODES = {
14
- [core.UserInterface.SHORTTEXT]: 'text',
15
- [core.UserInterface.LONGTEXT]: 'text',
16
- [core.UserInterface.INTEGERNUMBER]: 'number',
17
- [core.UserInterface.DECIMALNUMBER]: 'number',
18
- [core.UserInterface.DATE]: 'calendar',
19
- [core.UserInterface.DATETIME]: 'calendar',
20
- [core.UserInterface.SWITCH]: 'boolean',
21
- [core.UserInterface.CHECKBOX]: 'check-circle-inverted',
22
- [core.UserInterface.OPTIONSELECTOR]: 'list',
23
- [core.UserInterface.SEARCH]: 'search',
24
- [core.UserInterface.HTML]: 'tag_code',
25
- [core.UserInterface.IMAGE]: 'png',
26
- [core.UserInterface.FILE]: 'edit-file',
27
- [core.UserInterface.TIME]: 'timer-outline',
28
- [core.UserInterface.ELAPSEDTIME]: 'timer',
29
- [core.UserInterface.MASKEDTEXT]: 'text',
30
- [core.UserInterface.PASSWORD]: 'email',
31
- };
32
- const ListItem = ({ userInterface, description }) => {
33
- return (index.h("ez-icon", { iconName: ICON_MODES[userInterface], class: "ez-padding-left--small", title: description }));
34
- };
35
-
36
- const snkFilterFieldSearchCss = ".sc-snk-filter-field-search-h{--snk-filter-field-search--container-width:468px;--snk-filter-field-search--container-height:322px}.snk-filter-field-search__container.sc-snk-filter-field-search{display:flex;flex-direction:column;padding:var(--space--medium);width:var(--snk-filter-field-search--container-width);height:var(--snk-filter-field-search--container-height)}.snk-filter-field-search__section.sc-snk-filter-field-search{display:grid;grid-template-columns:1fr 1fr;place-items:flex-start;overflow:hidden;gap:var(--space--small)}.snk-filter-field-search__input.sc-snk-filter-field-search{margin-bottom:var(--space--medium)}.snk-filter-field-search__list_container.sc-snk-filter-field-search{display:flex;flex-direction:column}.snk-filter-field-search__list.sc-snk-filter-field-search{overflow-y:auto}";
37
-
38
- const SNK_CONTEXT_KEY = "__SNK__APPLICATION__";
39
- const ENTITY_NAME_PATTERN = /\w+:\/\/(\w+)/;
40
- const SnkFilterFieldSearch = class {
41
- constructor(hostRef) {
42
- index.registerInstance(this, hostRef);
43
- this.ezSelectFilterItem = index.createEvent(this, "ezSelectFilterItem", 7);
44
- this._currentMetadata = null;
45
- this._filterText = "";
46
- this._isLoading = false;
47
- this.searchable = true;
48
- this.fieldsDataSource = undefined;
49
- this.breadcrumbItems = [];
50
- this.linkItems = [];
51
- this.fieldItems = [];
52
- this.searchEmpty = false;
53
- this.groupEmpty = false;
54
- }
55
- /**
56
- * /**
57
- * Realiza a abertura do componente abaixo do elemento HTML informado
58
- * e faz a primeira carga de dados.
59
- *
60
- * @param {HTMLElement} element - Elemento HTML onde o snk-filter-field-search irá se posicionar abaixo.
61
- * @param {IEzPopoverAnchorOptions} options - opções para regular o posicionamento do componente.
62
- */
63
- async show(element, options) {
64
- var _a;
65
- if (element) {
66
- (_a = this._ezPopover) === null || _a === void 0 ? void 0 : _a.showUnder(element, options);
67
- }
68
- else {
69
- this._ezPopover.show();
70
- }
71
- return this.loadData();
72
- }
73
- /**
74
- * Filtra a fonte de dados do componente.
75
- * @param {string} filterText - Texto para filtrar a fonte de dados.
76
- * @throws {Error} - Quando o componente estiver com a propriedade searchable como true.
77
- */
78
- async applyFilter(filterText) {
79
- if (this.searchable)
80
- throw new Error('This method is not available when searchable is true');
81
- this.handleFilterChange(filterText);
82
- }
83
- async loadData() {
84
- var _a, _b;
85
- this._isLoading = true;
86
- let metadata = await this.fieldsDataSource.fetchData(this._currentLink);
87
- this._currentLink = metadata.currentLink;
88
- const { fields, links } = metadata || {};
89
- if (!Array.isArray(fields) || !Array.isArray(links))
90
- throw new Error('Invalid metadata');
91
- this._currentMetadata = metadata;
92
- this.mapDataSourceToLinkItems();
93
- this.mapDataSourceToFieldItems();
94
- this._isLoading = false;
95
- (_a = this._ezFieldList) === null || _a === void 0 ? void 0 : _a.scrollToTop();
96
- (_b = this._ezLinkList) === null || _b === void 0 ? void 0 : _b.scrollToTop();
97
- }
98
- mapDataSourceToLinkItems() {
99
- var _a;
100
- const { links } = this._currentMetadata;
101
- const filterLinkLabelMessage = this.getMessage('snkFilterFieldSearch.linkLabel', { link: (_a = this._currentLink) === null || _a === void 0 ? void 0 : _a.description });
102
- const items = links.map(link => (Object.assign({ label: link.description }, link)));
103
- this.groupEmpty = Boolean(items.length === 0);
104
- this.linkItems = [{
105
- group: filterLinkLabelMessage,
106
- items,
107
- }];
108
- if (this.breadcrumbItems.length === 0) {
109
- this.breadcrumbItems = [Object.assign({ id: core.JSUtils.generateUUID(), label: this._currentLink.description }, this._currentLink)];
110
- }
111
- }
112
- mapDataSourceToFieldItems() {
113
- var _a;
114
- const fields = this._currentMetadata.fields;
115
- const filterFieldLabelMessage = this.getMessage('snkFilterFieldSearch.fieldLabel', { link: (_a = this._currentLink) === null || _a === void 0 ? void 0 : _a.description });
116
- const filteredFields = fields.filter(field => {
117
- if (!this._currentLink)
118
- return true;
119
- const searchableByDescription = field.description.toLowerCase().includes(this._filterText.toLowerCase());
120
- const searchableByName = field.name.toLowerCase().includes(this._filterText.toLowerCase());
121
- return searchableByDescription || searchableByName;
122
- });
123
- const items = filteredFields.map(field => (Object.assign({ label: field.description }, field)));
124
- this.searchEmpty = Boolean(this._filterText && items.length === 0);
125
- this.fieldItems = [{
126
- group: filterFieldLabelMessage,
127
- items
128
- }];
129
- }
130
- handleFilterChange(filterText) {
131
- if (this._isLoading)
132
- return;
133
- this._filterText = filterText;
134
- this.mapDataSourceToFieldItems();
135
- }
136
- handleSelectLink({ detail: item }) {
137
- if (this._isLoading)
138
- return;
139
- const breadcrumbByIndex = this.breadcrumbItems.findIndex(breadcrumbItem => breadcrumbItem.id === item.id);
140
- if (breadcrumbByIndex > -1) {
141
- this.breadcrumbItems = this.breadcrumbItems.slice(0, (breadcrumbByIndex + 1));
142
- }
143
- else {
144
- this.breadcrumbItems = [...this.breadcrumbItems, Object.assign({ id: core.JSUtils.generateUUID(), label: item.description }, item)];
145
- }
146
- const selectedItem = Object.assign(Object.assign({}, item), { type: index$1.SelectedItemType.LINK });
147
- this._currentLink = selectedItem;
148
- this.ezSelectFilterItem.emit(selectedItem);
149
- this.loadData();
150
- }
151
- getEntityFromBreadCrumbItem(item) {
152
- const result = ENTITY_NAME_PATTERN.exec(item.uri);
153
- if (!result) {
154
- return undefined;
155
- }
156
- return result[1];
157
- }
158
- handleSelectField({ detail: item }) {
159
- var _a;
160
- const breadcrumbPath = this.breadcrumbItems.map(breadcrumbItem => breadcrumbItem.label).join('>>');
161
- const selectedField = Object.assign(Object.assign({}, item), { type: index$1.SelectedItemType.FIELD, entityPath: this.breadcrumbItems.map(item => this.getEntityFromBreadCrumbItem(item)).filter(item => item != undefined), path: `${breadcrumbPath} >> ${item.description}` });
162
- this.ezSelectFilterItem.emit(selectedField);
163
- (_a = this._ezPopover) === null || _a === void 0 ? void 0 : _a.hide();
164
- }
165
- getElementID(sufix) {
166
- return {
167
- [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(sufix)
168
- };
169
- }
170
- /**
171
- * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
172
- * através de um pequeno modulo na estrutura da aplicação:
173
- * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
174
- * Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-field-search.msg.ts"
175
- */
176
- getMessage(key, params) {
177
- var _a, _b, _c;
178
- if (!this._application)
179
- this._application = core.ApplicationContext.getContextValue(SNK_CONTEXT_KEY);
180
- return (_c = (_b = (_a = this._application) === null || _a === void 0 ? void 0 : _a.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage) === null || _c === void 0 ? void 0 : _c.call(_b, key, params);
181
- }
182
- ;
183
- componentWillLoad() {
184
- this._application = core.ApplicationContext.getContextValue(SNK_CONTEXT_KEY);
185
- }
186
- componentDidLoad() {
187
- core.ElementIDUtils.addIDInfoIfNotExists(this._ezPopover, 'popover');
188
- }
189
- disconnectedCallback() {
190
- var _a;
191
- (_a = this._ezPopover) === null || _a === void 0 ? void 0 : _a.hide();
192
- }
193
- render() {
194
- var _a;
195
- const searchLabelMessage = this.getMessage('snkFilterFieldSearch.searchLabel');
196
- return (index.h("ez-popover", Object.assign({ ref: (el) => this._ezPopover = el, role: "dialog", overlayType: "none", "aria-hidden": !((_a = this._ezPopover) === null || _a === void 0 ? void 0 : _a.opened) }, this.getElementID('EzPopover')), index.h("div", { class: "snk-filter-field-search__container" }, index.h("header", { class: "snk-filter-field-search__header" }, this.searchable && !!searchLabelMessage && (index.h("ez-filter-input", Object.assign({ class: "snk-filter-field-search__input", label: searchLabelMessage, asyncSearch: true, canShowError: false, onEzSearching: (event) => this.handleFilterChange.bind(this)(event.detail), "aria-label": searchLabelMessage, "aria-required": "false", "aria-invalid": "false" }, this.getElementID('EzFilterInput')))), this.breadcrumbItems.length > 0 && (index.h("ez-breadcrumb", Object.assign({ items: this.breadcrumbItems, onSelectedItem: this.handleSelectLink.bind(this), role: "navigation", "aria-current": "step" }, this.getElementID('EzBreadcrumb')))), index.h("hr", { class: "ez-divider-horizontal ez-margin-vertical--medium" })), index.h("section", { class: `snk-filter-field-search__section ${(this.groupEmpty && this.searchEmpty) && " ez-margin--auto"}` }, this.groupEmpty ?
197
- index.h("div", { class: "ez-margin--auto" }, index.h("span", { class: "ez-text ez-text--secondary ez-text--medium" }, this.getMessage('snkFilterFieldSearch.groupEmpty')))
198
- :
199
- index.h("ez-list", Object.assign({ ref: (el) => this._ezLinkList = el, class: "snk-filter-field-search__list", id: "filterLinkList", useGroups: true, dataSource: this.linkItems, onEzSelectItem: this.handleSelectLink.bind(this), hoverFeedback: true, ezSelectable: true, itemSlotBuilder: listItem => index.h("ez-badge", { label: listItem.fieldCount }), "aria-describedby": "filterLinkLabel" }, this.getElementID('EzListLinks'))), this.searchEmpty ?
200
- index.h("div", { class: "ez-margin--auto" }, index.h("span", { class: "ez-text ez-text--secondary ez-text--medium" }, this.getMessage('snkFilterFieldSearch.searchEmpty')))
201
- :
202
- index.h("ez-list", Object.assign({ ref: (el) => this._ezFieldList = el, class: "snk-filter-field-search__list", id: "filterFieldList", useGroups: true, dataSource: this.fieldItems, onEzSelectItem: this.handleSelectField.bind(this), hoverFeedback: true, ezSelectable: true, itemSlotBuilder: ListItem, "aria-describedby": "filterFieldLabel" }, this.getElementID('EzListFields')))))));
203
- }
204
- };
205
- SnkFilterFieldSearch.style = snkFilterFieldSearchCss;
206
-
207
- const snkFilterParamConfigCss = ":host{--snk-filter-param-config__expression--color:var(--title--primary, #2b3a54);display:flex;position:relative}.snk-filter-param-config__expression{--text-area__input--disabled--color:var(--snk-filter-param-config__expression--color)}";
208
-
209
- const SnkFilterParamConfig = class {
210
- constructor(hostRef) {
211
- index.registerInstance(this, hostRef);
212
- this._opened = false;
213
- this._configType = index$2.FilterConfigType.SYSTEM_CONFIG;
214
- this._expressionItem = undefined;
215
- this._informedInstance = false;
216
- this._canSave = false;
217
- this.messagesBuilder = undefined;
218
- }
219
- /**
220
- * Abre o modal de configuração de valor variável
221
- */
222
- open(expressionItem) {
223
- this._opened = true;
224
- this._expressionItem = expressionItem;
225
- this.loadValues();
226
- return new Promise(accept => {
227
- this._promiseResolver = accept;
228
- });
229
- }
230
- /**
231
- * Fecha o modal de configuração de valor variável
232
- */
233
- close() {
234
- this._opened = false;
235
- return new Promise(accept => {
236
- this._promiseResolver = accept;
237
- });
238
- }
239
- /**
240
- * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
241
- * através de um pequeno modulo na estrutura da aplicação:
242
- * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
243
- * Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-param-config.msg.ts"
244
- */
245
- getMessage(key, params) {
246
- var _a;
247
- return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
248
- }
249
- getConfigValue(configName, inputName, inputAlias = "") {
250
- var _a, _b, _c;
251
- return ((_b = (_a = this._expressionItem) === null || _a === void 0 ? void 0 : _a[configName]) === null || _b === void 0 ? void 0 : _b[inputName])
252
- || ((_c = this._expressionItem) === null || _c === void 0 ? void 0 : _c[inputAlias || inputName]);
253
- }
254
- loadValues() {
255
- var _a;
256
- const entityName = this.getConfigValue("systemConfig", "entity", "entityName");
257
- const fieldName = this.getConfigValue("systemConfig", "fieldName");
258
- const description = this.getConfigValue("userConfig", "description");
259
- const type = this.getConfigValue("userConfig", "type");
260
- if (((_a = this._expressionItem) === null || _a === void 0 ? void 0 : _a.userConfig) != undefined) {
261
- this._configType = index$2.FilterConfigType.USER_CONFIG;
262
- }
263
- else {
264
- this._configType = index$2.FilterConfigType.SYSTEM_CONFIG;
265
- }
266
- if (!core.StringUtils.isEmpty(entityName) && !core.StringUtils.isEmpty(fieldName)) {
267
- this._instanceElement.value = { value: entityName, label: "" };
268
- this._fieldElement.value = { value: fieldName, label: "" };
269
- }
270
- if (!core.StringUtils.isEmpty(description) && !core.StringUtils.isEmpty(type)) {
271
- this._descriptionElement.value = description;
272
- this._typeElement.value = type;
273
- }
274
- this.buildFilterExpression();
275
- }
276
- changeDefinitionUsed(option) {
277
- this._configType = option !== null && option !== void 0 ? option : index$2.FilterConfigType.SYSTEM_CONFIG;
278
- if (this._configType === index$2.FilterConfigType.SYSTEM_CONFIG) {
279
- const entityName = this.getConfigValue("systemConfig", "entity", "entityName");
280
- const fieldName = this.getConfigValue("systemConfig", "fieldName");
281
- this._instanceElement.value = this._instanceElement.value || { value: entityName, label: "" };
282
- this._fieldElement.value = this._fieldElement.value || { value: fieldName, label: "" };
283
- }
284
- else if (this._configType === index$2.FilterConfigType.USER_CONFIG) {
285
- const description = this.getConfigValue("userConfig", "description");
286
- const type = this.getConfigValue("userConfig", "type");
287
- this._descriptionElement.value = this._descriptionElement.value || description;
288
- this._typeElement.value = this._typeElement.value || type;
289
- }
290
- this.buildFilterExpression();
291
- }
292
- getTypeValue() {
293
- var _a;
294
- const value = (_a = this._typeElement) === null || _a === void 0 ? void 0 : _a.value;
295
- return ((value === null || value === void 0 ? void 0 : value.value) || value);
296
- }
297
- getExpressionValues() {
298
- var _a, _b, _c, _d, _e;
299
- let systemConfig;
300
- let userConfig;
301
- if (this._configType === index$2.FilterConfigType.SYSTEM_CONFIG) {
302
- const entity = (_b = (_a = this._instanceElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.value;
303
- const fieldName = (_d = (_c = this._fieldElement) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.value;
304
- systemConfig = { entity, fieldName };
305
- }
306
- else if (this._configType === index$2.FilterConfigType.USER_CONFIG) {
307
- const description = (_e = this._descriptionElement) === null || _e === void 0 ? void 0 : _e.value;
308
- const type = this.getTypeValue();
309
- userConfig = { description, type };
310
- }
311
- return Object.assign(Object.assign(Object.assign({}, this._expressionItem), { systemConfig }), { userConfig });
312
- }
313
- isEnabled(value) {
314
- return this._configType === value;
315
- }
316
- isInformedInstance() {
317
- var _a, _b;
318
- return !core.StringUtils.isEmpty((_b = (_a = this._instanceElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.value);
319
- }
320
- save() {
321
- var _a;
322
- this._expressionItem = Object.assign(Object.assign({}, this.getExpressionValues()), { expression: (_a = this._expressionElement) === null || _a === void 0 ? void 0 : _a.value });
323
- this._promiseResolver(this._expressionItem);
324
- this._opened = false;
325
- }
326
- buildFilterExpression() {
327
- var _a;
328
- this._informedInstance = this.isInformedInstance();
329
- const expression = PersonalizedFilterUtils.PersonalizedFilterUtils.buildFilterExpression(this.getExpressionValues());
330
- this._expressionElement.value = expression || ((_a = this._expressionItem) === null || _a === void 0 ? void 0 : _a.expression);
331
- this._canSave = this.getCanSave();
332
- }
333
- handleChangeInstance() {
334
- this._informedInstance = this.isInformedInstance();
335
- if (this._fieldElement != undefined && !core.StringUtils.isEmpty(this._fieldElement.value)) {
336
- this._fieldElement.value = null;
337
- }
338
- this.buildFilterExpression();
339
- }
340
- getInstanceCriteria() {
341
- var _a, _b;
342
- const value = (_b = (_a = this._instanceElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.value;
343
- return {
344
- expression: "this.NOMETAB = (SELECT NOMETAB FROM TDDINS WHERE NOMEINSTANCIA = ?)",
345
- params: [
346
- {
347
- name: "NOMEINSTANCIA",
348
- dataType: core.DataType.TEXT,
349
- value
350
- }
351
- ]
352
- };
353
- }
354
- onSearch({ mode, argument }, entity) {
355
- if (this._application == undefined || !this._opened) {
356
- return;
357
- }
358
- const isField = entity === index$2.FilterEntities.FIELD;
359
- const criteria = isField ? this.getInstanceCriteria() : undefined;
360
- const messageKey = `snkFilterParamConfig.label${isField ? "Field" : "Instance"}`;
361
- const entityDescription = this.getMessage(messageKey);
362
- const searchOptions = {
363
- descriptionFieldName: isField ? "DESCRCAMPO" : "DESCRINSTANCIA",
364
- codeFieldName: isField ? "NOMECAMPO" : "NOMEINSTANCIA",
365
- showInactives: false
366
- };
367
- const options = {
368
- entity,
369
- entityDescription,
370
- criteria,
371
- searchOptions
372
- };
373
- return new Promise((resolve) => {
374
- this._application.executePreparedSearch(mode, argument, options).then(res => resolve(res));
375
- });
376
- }
377
- getElementID(sufix) {
378
- return {
379
- [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(sufix)
380
- };
381
- }
382
- getCanSave() {
383
- var _a;
384
- if (this._configType === index$2.FilterConfigType.USER_CONFIG) {
385
- const description = (_a = this._descriptionElement) === null || _a === void 0 ? void 0 : _a.value;
386
- const type = this.getTypeValue();
387
- return !core.StringUtils.isEmpty(description) && !core.StringUtils.isEmpty(type);
388
- }
389
- return true;
390
- }
391
- componentWillLoad() {
392
- this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
393
- }
394
- render() {
395
- core.ElementIDUtils.addIDInfoIfNotExists(this._element, 'snkFilterParamConfig');
396
- return (index.h("ez-popup", Object.assign({ useHeader: false, size: "small", heightMode: "auto", opened: this._opened }, this.getElementID("popup")), index.h("ez-modal-container", Object.assign({ onEzModalAction: (evt) => {
397
- if (evt.detail === ezModalContainer.ModalAction.CLOSE)
398
- this.close();
399
- }, modalTitle: this.getMessage("snkFilterParamConfig.modalTitle") }, this.getElementID("modalContainer")), index.h("div", { class: "ez-flex" }, index.h("div", { class: "ez-col ez-col--sd-6 ez-flex--column" }, index.h("ez-radio-button", Object.assign({ value: this._configType, onEzChange: (evt) => this.changeDefinitionUsed(evt.detail) }, this.getElementID("systemConfigOption")), index.h("ez-radio-button-option", { label: this.getMessage("snkFilterParamConfig.labelSystemConfig"), value: index$2.FilterConfigType.SYSTEM_CONFIG })), index.h("ez-search", Object.assign({ ref: (ref) => this._instanceElement = ref, label: this.getMessage("snkFilterParamConfig.labelInstance"), enabled: this.isEnabled(index$2.FilterConfigType.SYSTEM_CONFIG), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, onEzChange: () => this.handleChangeInstance(), optionLoader: (searchArgument) => this.onSearch(searchArgument, index$2.FilterEntities.INSTANCE) }, this.getElementID("configFindEntity"))), index.h("ez-search", Object.assign({ ref: (ref) => this._fieldElement = ref, label: this.getMessage("snkFilterParamConfig.labelField"), enabled: this.isEnabled(index$2.FilterConfigType.SYSTEM_CONFIG) && this._informedInstance, suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, onEzChange: () => this.buildFilterExpression(), optionLoader: (searchArgument) => this.onSearch(searchArgument, index$2.FilterEntities.FIELD) }, this.getElementID("configFindField")))), index.h("div", { class: "ez-flex ez-padding--medium" }, index.h("hr", { class: "ez-divider-vertical" })), index.h("div", { class: "ez-col ez-col--sd-6 ez-flex--column" }, index.h("ez-radio-button", Object.assign({ value: this._configType, onEzChange: (evt) => this.changeDefinitionUsed(evt.detail) }, this.getElementID("userConfigOption")), index.h("ez-radio-button-option", { label: this.getMessage("snkFilterParamConfig.labelUserConfig"), value: index$2.FilterConfigType.USER_CONFIG })), index.h("ez-text-input", Object.assign({ ref: (ref) => this._descriptionElement = ref, label: this.getMessage("snkFilterParamConfig.labelDescription"), enabled: this.isEnabled(index$2.FilterConfigType.USER_CONFIG), onEzChange: () => this.buildFilterExpression() }, this.getElementID("configParamLabel"))), index.h("ez-combo-box", Object.assign({ ref: (ref) => this._typeElement = ref, label: this.getMessage("snkFilterParamConfig.labelType"), enabled: this.isEnabled(index$2.FilterConfigType.USER_CONFIG), suppressEmptyOption: true, onEzChange: () => this.buildFilterExpression() }, this.getElementID("configParamType")), Object.keys(index$2.FilterUserConfigTypes).map((configType) => {
400
- return (index.h("option", { value: index$2.FilterUserConfigTypes[configType] }, this.getMessage(`snkFilterParamConfig.labelTypeValues.${configType.toLowerCase()}`)));
401
- })))), index.h("ez-text-area", Object.assign({ ref: (ref) => this._expressionElement = ref, class: "snk-filter-param-config__expression", label: this.getMessage("snkFilterParamConfig.labelExpression"), enabled: false }, this.getElementID("presentationExpression"))), index.h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, index.h("ez-button", Object.assign({ class: "ez-padding-right--medium", label: this.getMessage("snkFilterParamConfig.labelCancel"), onClick: () => this.close() }, this.getElementID("cancelEditParam"))), index.h("ez-button", Object.assign({ class: "ez-button--primary", label: this.getMessage("snkFilterParamConfig.labelSave"), onClick: () => this.save(), enabled: this._canSave }, this.getElementID("saveEditParam")))))));
402
- }
403
- get _element() { return index.getElement(this); }
404
- };
405
- SnkFilterParamConfig.style = snkFilterParamConfigCss;
406
-
407
- exports.snk_filter_field_search = SnkFilterFieldSearch;
408
- exports.snk_filter_param_config = SnkFilterParamConfig;
@@ -1,109 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-1894343a.js');
6
- const core = require('@sankhyalabs/core');
7
- const ConfigStorage = require('./ConfigStorage-a1fab5ca.js');
8
- const presentationMode = require('./presentationMode-52ec3bdd.js');
9
- const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
10
- const filterType_enum = require('./filter-type.enum-2bb46d2a.js');
11
- require('./form-config-fetcher-45d1964c.js');
12
- require('./DataFetcher-384d2ce8.js');
13
- require('./PrintUtils-bcaeb82f.js');
14
- require('./SnkMessageBuilder-a9300ebe.js');
15
- require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
16
-
17
- const snkFilterModalItemCss = ".grow{flex-grow:1}.gap{gap:4px}";
18
-
19
- const SnkFilterModalItem = class {
20
- constructor(hostRef) {
21
- index.registerInstance(this, hostRef);
22
- this.filterChange = index.createEvent(this, "filterChange", 7);
23
- this.editPersonalizedFilter = index.createEvent(this, "editPersonalizedFilter", 7);
24
- this.addPersonalizedFilter = index.createEvent(this, "addPersonalizedFilter", 7);
25
- this.filterItem = undefined;
26
- this.configName = undefined;
27
- this.resourceID = undefined;
28
- }
29
- getContentEditorConfig() {
30
- const props = { presentationMode: presentationMode.EPresentationMode.MODAL };
31
- switch (this.filterItem.type) {
32
- case filterItemType_enum.FilterItemType.BINARY_SELECT:
33
- return { tag: "snk-filter-binary-select", props };
34
- case filterItemType_enum.FilterItemType.MULTI_SELECT:
35
- return { tag: "snk-filter-multi-select" };
36
- case filterItemType_enum.FilterItemType.PERIOD:
37
- return { tag: "snk-filter-period", props };
38
- case filterItemType_enum.FilterItemType.SEARCH:
39
- return { tag: "snk-filter-search" };
40
- case filterItemType_enum.FilterItemType.NUMBER:
41
- return { tag: "snk-filter-number", props };
42
- case filterItemType_enum.FilterItemType.PERSONALIZED:
43
- return this.buildSnkFilterPersonalizedProps();
44
- case filterItemType_enum.FilterItemType.CHECK_BOX_LIST:
45
- return { tag: "snk-filter-checkbox-list", props };
46
- case filterItemType_enum.FilterItemType.MULTI_LIST:
47
- return { tag: "snk-entity-list", props: { maxHeightList: "640px", rightListSlotBuilder: item => this.buildRightSlot(item) } };
48
- }
49
- return { tag: "snk-filter-text" };
50
- }
51
- buildSnkFilterPersonalizedProps() {
52
- return {
53
- tag: "snk-personalized-filter-editor", props: {
54
- onEditFilter: (event) => this.editPersonalizedFilter.emit(event.detail),
55
- onAddFilter: () => this.addPersonalizedFilter.emit(),
56
- }
57
- };
58
- }
59
- isVisible(newValue) {
60
- return !this.filterItem.visible ? newValue !== undefined : true;
61
- }
62
- updateFilterValue(data) {
63
- var _a, _b;
64
- const newValue = (data === null || data === void 0 ? void 0 : data.value) !== undefined ? data.value : data;
65
- if (this.filterItem.groupedItems != undefined) {
66
- this.filterItem = Object.assign(Object.assign({}, this.filterItem), { visible: newValue > 0, value: newValue, groupedItems: data.items });
67
- }
68
- else {
69
- this.filterItem = Object.assign(Object.assign({}, this.filterItem), { value: this.filterItem.type === (filterItemType_enum.FilterItemType.SEARCH || filterItemType_enum.FilterItemType.CHECK_BOX_LIST) ? data : newValue, visible: this.isVisible(newValue) });
70
- }
71
- this._editor && (this._editor["config"] = this.filterItem);
72
- (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a['reloadList']) === null || _b === void 0 ? void 0 : _b.call(_a);
73
- this.filterChange.emit(this.filterItem);
74
- }
75
- handleDeleteFilter(filter, filterItemType) {
76
- if (filterItemType === filterItemType_enum.FilterItemType.PERSONALIZED) {
77
- ConfigStorage.ConfigStorage.removePersonalizedFilter(filter, this.resourceID, this.configName);
78
- }
79
- }
80
- componentDidLoad() {
81
- if (this._element) {
82
- core.ElementIDUtils.addIDInfo(this._element);
83
- const dataElementIdDoFilterItem = this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
84
- this._idContentEditor = `${dataElementIdDoFilterItem}_${this.filterItem.id}`;
85
- }
86
- }
87
- buildRightSlot(item) {
88
- return (index.h("ez-icon", { iconName: "delete", onClick: () => this.removeValueFromConfig(item) }));
89
- }
90
- removeValueFromConfig(item) {
91
- var _a, _b, _c;
92
- const index = (_b = (_a = this.filterItem) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.findIndex(({ id }) => id === item.id);
93
- const filterItemCopy = core.ObjectUtils.copy(this.filterItem);
94
- (_c = filterItemCopy === null || filterItemCopy === void 0 ? void 0 : filterItemCopy.value) === null || _c === void 0 ? void 0 : _c.splice(index, 1);
95
- this.updateFilterValue(filterItemCopy.value);
96
- }
97
- canShowDetailModal() {
98
- const { CUSTOM_FILTER, OTHER_FILTERS } = filterType_enum.FilterType;
99
- return ![CUSTOM_FILTER, OTHER_FILTERS].includes(this.filterItem.filterType) && this.filterItem.type !== filterItemType_enum.FilterItemType.BINARY_SELECT;
100
- }
101
- render() {
102
- const { tag: ContentEditor, props } = this.getContentEditorConfig();
103
- return (index.h(index.Host, null, index.h("div", { class: "ez-flex ez-flex--column grow" }, this.canShowDetailModal() && (index.h("label", { class: "ez-text ez-text--medium ez-text--primary ez-margin-bottom--extra-small", htmlFor: `filter-item-${this.filterItem.id}` }, this.filterItem.detailModal)), index.h(ContentEditor, Object.assign({ ref: ref => this._editor = ref, id: `filter-item-${this.filterItem.id}`, config: this.filterItem, value: this.filterItem.value, onValueChanged: (event) => this.updateFilterValue(event.detail), "data-element-id": this._idContentEditor }, props)))));
104
- }
105
- get _element() { return index.getElement(this); }
106
- };
107
- SnkFilterModalItem.style = snkFilterModalItemCss;
108
-
109
- exports.snk_filter_modal_item = SnkFilterModalItem;