@sankhyalabs/sankhyablocks 1.3.34 → 1.4.0-beta.10

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 (285) hide show
  1. package/dist/cjs/SnkMessageBuilder-6c2f7bcd.js +302 -0
  2. package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
  3. package/dist/cjs/configurableElementsStorage-93459c72.js +20 -0
  4. package/dist/cjs/constants-9056ca9e.js +84 -0
  5. package/dist/cjs/draggable.bundle-82a25c06.js +6886 -0
  6. package/dist/cjs/filter-item-type.enum-3daf58d3.js +16 -0
  7. package/dist/cjs/form-config-fetcher-2de7c16a.js +6895 -0
  8. package/dist/cjs/{index-1133bc2a.js → index-20e8b68a.js} +964 -209
  9. package/dist/cjs/loader.cjs.js +3 -3
  10. package/dist/cjs/sankhyablocks.cjs.js +3 -3
  11. package/dist/cjs/snk-application.cjs.entry.js +680 -6994
  12. package/dist/cjs/snk-config-modal.cjs.entry.js +62 -0
  13. package/dist/cjs/snk-config-options.cjs.entry.js +230 -0
  14. package/dist/cjs/snk-configurator_6.cjs.entry.js +1156 -0
  15. package/dist/cjs/snk-crud.cjs.entry.js +78 -0
  16. package/dist/cjs/snk-data-unit.cjs.entry.js +272 -0
  17. package/dist/cjs/snk-field-config_2.cjs.entry.js +135 -0
  18. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +50 -0
  19. package/dist/cjs/snk-filter-detail.cjs.entry.js +106 -0
  20. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +26 -0
  21. package/dist/cjs/snk-filter-number.cjs.entry.js +27 -0
  22. package/dist/cjs/snk-filter-period.cjs.entry.js +40 -0
  23. package/dist/cjs/snk-filter-personalized.cjs.entry.js +89 -0
  24. package/dist/cjs/snk-filter-search.cjs.entry.js +38 -0
  25. package/dist/cjs/snk-filter-text.cjs.entry.js +22 -0
  26. package/dist/cjs/snk-form-config.cjs.entry.js +957 -0
  27. package/dist/cjs/snk-form.cjs.entry.js +146 -0
  28. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  29. package/dist/cjs/snk-tab-config.cjs.entry.js +321 -0
  30. package/dist/cjs/taskbar-elements-9a4b1e19.js +97 -0
  31. package/dist/cjs/taskbar-processor-6bd0d35c.js +47 -0
  32. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  33. package/dist/collection/collection-manifest.json +45 -2
  34. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +9 -2
  35. package/dist/collection/components/snk-application/snk-application.js +1346 -642
  36. package/dist/collection/components/snk-configurator/snk-configurator.js +261 -0
  37. package/dist/collection/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.js +16 -0
  38. package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.css +122 -0
  39. package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.js +137 -0
  40. package/dist/collection/components/snk-crud/snk-crud.css +6 -0
  41. package/dist/collection/components/snk-crud/snk-crud.js +232 -0
  42. package/dist/collection/components/snk-data-unit/snk-data-unit.css +6 -0
  43. package/dist/collection/components/snk-data-unit/snk-data-unit.js +517 -0
  44. package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +100 -0
  45. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +111 -0
  46. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +87 -0
  47. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +88 -0
  48. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +101 -0
  49. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +180 -0
  50. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +102 -0
  51. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +63 -0
  52. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +12 -0
  53. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +178 -0
  54. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +289 -0
  55. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +299 -0
  56. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +222 -0
  57. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +149 -0
  58. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +462 -0
  59. package/dist/collection/components/snk-form/snk-form.css +38 -0
  60. package/dist/collection/components/snk-form/snk-form.js +336 -0
  61. package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.css +9 -0
  62. package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js +315 -0
  63. package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.css +164 -0
  64. package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js +140 -0
  65. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.css +185 -0
  66. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +1062 -0
  67. package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.css +272 -0
  68. package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +476 -0
  69. package/dist/collection/components/snk-grid/snk-grid.css +18 -0
  70. package/dist/collection/components/snk-grid/snk-grid.js +273 -0
  71. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +80 -79
  72. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +90 -0
  73. package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +43 -0
  74. package/dist/collection/components/snk-taskbar/snk-taskbar.css +3 -0
  75. package/dist/collection/components/snk-taskbar/snk-taskbar.js +339 -0
  76. package/dist/collection/components/teste-pesquisa/teste-pesquisa.js +12 -9
  77. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +39 -14
  78. package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +87 -21
  79. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +62 -0
  80. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +106 -3
  81. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +4 -3
  82. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +15 -15
  83. package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +9 -1
  84. package/dist/collection/lib/http/data-fetcher/fetchers/totals-fetcher.js +47 -0
  85. package/dist/collection/lib/index.js +2 -0
  86. package/dist/collection/lib/message/SnkMessageBuilder.js +130 -0
  87. package/dist/collection/lib/message/resources/crud-utils.msg.js +4 -0
  88. package/dist/collection/lib/message/resources/snk-configurator.msg.js +11 -0
  89. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +23 -0
  90. package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +30 -0
  91. package/dist/collection/lib/message/resources/snk-form.msg.js +67 -0
  92. package/dist/collection/lib/message/resources/snk-taskbar.msg.js +17 -0
  93. package/dist/collection/lib/utils/CrudUtils.js +73 -0
  94. package/dist/collection/lib/utils/constants.js +72 -0
  95. package/dist/components/SnkMessageBuilder.js +280 -0
  96. package/dist/components/_commonjsHelpers.js +17 -0
  97. package/dist/components/constants.js +74 -0
  98. package/dist/components/filter-item-type.enum.js +14 -0
  99. package/dist/components/form-config-fetcher.js +6889 -0
  100. package/dist/components/index.d.ts +26 -5
  101. package/dist/components/index.js +26 -0
  102. package/dist/components/snk-application2.js +681 -6980
  103. package/dist/components/snk-config-modal.d.ts +11 -0
  104. package/dist/components/snk-config-modal.js +6 -0
  105. package/dist/components/snk-config-modal2.js +91 -0
  106. package/dist/components/snk-config-options.d.ts +11 -0
  107. package/dist/components/snk-config-options.js +6 -0
  108. package/dist/components/snk-config-options2.js +245 -0
  109. package/dist/components/snk-configurator.d.ts +11 -0
  110. package/dist/components/snk-configurator.js +6 -0
  111. package/dist/components/snk-configurator2.js +212 -0
  112. package/dist/components/snk-crud.d.ts +11 -0
  113. package/dist/components/snk-crud.js +183 -0
  114. package/dist/components/snk-data-unit.d.ts +11 -0
  115. package/dist/components/snk-data-unit.js +294 -0
  116. package/dist/components/snk-field-config.d.ts +11 -0
  117. package/dist/components/snk-field-config.js +6 -0
  118. package/dist/components/snk-field-config2.js +70 -0
  119. package/dist/components/snk-filter-bar.d.ts +11 -0
  120. package/dist/components/snk-filter-bar.js +6 -0
  121. package/dist/components/snk-filter-bar2.js +516 -0
  122. package/dist/components/snk-filter-binary-select.d.ts +11 -0
  123. package/dist/components/snk-filter-binary-select.js +67 -0
  124. package/dist/components/snk-filter-detail.d.ts +11 -0
  125. package/dist/components/snk-filter-detail.js +6 -0
  126. package/dist/components/snk-filter-detail2.js +120 -0
  127. package/dist/components/snk-filter-item.d.ts +11 -0
  128. package/dist/components/snk-filter-item.js +6 -0
  129. package/dist/components/snk-filter-item2.js +194 -0
  130. package/dist/components/snk-filter-list.d.ts +11 -0
  131. package/dist/components/snk-filter-list.js +6 -0
  132. package/dist/components/snk-filter-list2.js +149 -0
  133. package/dist/components/snk-filter-modal.d.ts +11 -0
  134. package/dist/components/snk-filter-modal.js +6 -0
  135. package/dist/components/snk-filter-modal2.js +84 -0
  136. package/dist/components/snk-filter-multi-select.d.ts +11 -0
  137. package/dist/components/snk-filter-multi-select.js +43 -0
  138. package/dist/components/snk-filter-number.d.ts +11 -0
  139. package/dist/components/snk-filter-number.js +44 -0
  140. package/dist/components/snk-filter-period.d.ts +11 -0
  141. package/dist/components/snk-filter-period.js +57 -0
  142. package/dist/components/snk-filter-personalized.d.ts +11 -0
  143. package/dist/components/snk-filter-personalized.js +108 -0
  144. package/dist/components/snk-filter-search.d.ts +11 -0
  145. package/dist/components/snk-filter-search.js +55 -0
  146. package/dist/components/snk-filter-text.d.ts +11 -0
  147. package/dist/components/snk-filter-text.js +38 -0
  148. package/dist/components/snk-form-config.d.ts +11 -0
  149. package/dist/components/snk-form-config.js +6 -0
  150. package/dist/components/snk-form-config2.js +996 -0
  151. package/dist/components/snk-form.d.ts +11 -0
  152. package/dist/components/snk-form.js +6 -0
  153. package/dist/components/snk-form2.js +209 -0
  154. package/dist/components/snk-grid.d.ts +11 -0
  155. package/dist/components/snk-grid.js +6 -0
  156. package/dist/components/snk-grid2.js +152 -0
  157. package/dist/components/snk-tab-config.d.ts +11 -0
  158. package/dist/components/snk-tab-config.js +6 -0
  159. package/dist/components/snk-tab-config2.js +7220 -0
  160. package/dist/components/snk-taskbar.d.ts +11 -0
  161. package/dist/components/snk-taskbar.js +6 -0
  162. package/dist/components/snk-taskbar2.js +282 -0
  163. package/dist/components/taskbar-processor.js +45 -0
  164. package/dist/esm/SnkMessageBuilder-5792c260.js +280 -0
  165. package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
  166. package/dist/esm/configurableElementsStorage-cdc144b5.js +18 -0
  167. package/dist/esm/constants-c6039d3d.js +74 -0
  168. package/dist/esm/draggable.bundle-41d56f06.js +6884 -0
  169. package/dist/esm/filter-item-type.enum-a79b2fa8.js +14 -0
  170. package/dist/esm/form-config-fetcher-96c6c2dc.js +6889 -0
  171. package/dist/esm/{index-ffda6382.js → index-e4121713.js} +963 -210
  172. package/dist/esm/loader.js +3 -3
  173. package/dist/esm/polyfills/css-shim.js +1 -1
  174. package/dist/esm/sankhyablocks.js +3 -3
  175. package/dist/esm/snk-application.entry.js +667 -6981
  176. package/dist/esm/snk-config-modal.entry.js +58 -0
  177. package/dist/esm/snk-config-options.entry.js +226 -0
  178. package/dist/esm/snk-configurator_6.entry.js +1147 -0
  179. package/dist/esm/snk-crud.entry.js +74 -0
  180. package/dist/esm/snk-data-unit.entry.js +268 -0
  181. package/dist/esm/snk-field-config_2.entry.js +130 -0
  182. package/dist/esm/snk-filter-binary-select.entry.js +46 -0
  183. package/dist/esm/snk-filter-detail.entry.js +102 -0
  184. package/dist/esm/snk-filter-multi-select.entry.js +22 -0
  185. package/dist/esm/snk-filter-number.entry.js +23 -0
  186. package/dist/esm/snk-filter-period.entry.js +36 -0
  187. package/dist/esm/snk-filter-personalized.entry.js +85 -0
  188. package/dist/esm/snk-filter-search.entry.js +34 -0
  189. package/dist/esm/snk-filter-text.entry.js +18 -0
  190. package/dist/esm/snk-form-config.entry.js +953 -0
  191. package/dist/esm/snk-form.entry.js +142 -0
  192. package/dist/esm/snk-pesquisa.entry.js +1 -1
  193. package/dist/esm/snk-tab-config.entry.js +317 -0
  194. package/dist/esm/taskbar-elements-e2ed0536.js +94 -0
  195. package/dist/esm/taskbar-processor-aa6772c9.js +45 -0
  196. package/dist/esm/teste-pesquisa.entry.js +1 -1
  197. package/dist/sankhyablocks/p-029ae4e4.entry.js +1 -0
  198. package/dist/sankhyablocks/p-03f9c407.js +1 -0
  199. package/dist/sankhyablocks/p-112455b1.js +1 -0
  200. package/dist/sankhyablocks/p-12ad2a19.entry.js +1 -0
  201. package/dist/sankhyablocks/p-1feabfc7.entry.js +1 -0
  202. package/dist/sankhyablocks/p-21c8929b.js +1 -0
  203. package/dist/sankhyablocks/p-2284c850.entry.js +1 -0
  204. package/dist/sankhyablocks/p-2b891c4a.entry.js +1 -0
  205. package/dist/sankhyablocks/p-2dc76d79.entry.js +1 -0
  206. package/dist/sankhyablocks/p-361299e8.js +26 -0
  207. package/dist/sankhyablocks/p-3a276f3d.entry.js +1 -0
  208. package/dist/sankhyablocks/p-400cc777.entry.js +1 -0
  209. package/dist/sankhyablocks/{p-2a7b4cb3.entry.js → p-44ce5b90.entry.js} +1 -1
  210. package/dist/sankhyablocks/p-521c96f0.entry.js +1 -0
  211. package/dist/sankhyablocks/{p-9520d78a.entry.js → p-6988f4a6.entry.js} +1 -1
  212. package/dist/sankhyablocks/p-776ff4d1.entry.js +1 -0
  213. package/dist/sankhyablocks/p-7b4a4a50.entry.js +1 -0
  214. package/dist/sankhyablocks/p-9ba3df4c.js +2 -0
  215. package/dist/sankhyablocks/p-9dc4426d.entry.js +1 -0
  216. package/dist/sankhyablocks/p-9dd2b8cb.js +1 -0
  217. package/dist/sankhyablocks/p-a17a4fca.entry.js +1 -0
  218. package/dist/sankhyablocks/p-a5b26df2.js +1 -0
  219. package/dist/sankhyablocks/p-b6d6b172.js +1 -0
  220. package/dist/sankhyablocks/p-cc4bef9f.entry.js +1 -0
  221. package/dist/sankhyablocks/p-d50651a3.js +1 -0
  222. package/dist/sankhyablocks/p-d690b6b5.entry.js +75 -0
  223. package/dist/sankhyablocks/p-d9fbb26f.js +1 -0
  224. package/dist/sankhyablocks/p-deb1f523.entry.js +1 -0
  225. package/dist/sankhyablocks/p-e871aa92.entry.js +1 -0
  226. package/dist/sankhyablocks/p-e9beab79.entry.js +1 -0
  227. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  228. package/dist/types/components/snk-application/errorhandler/snk-error-handler.d.ts +1 -0
  229. package/dist/types/components/snk-application/snk-application.d.ts +178 -26
  230. package/dist/types/components/snk-configurator/snk-configurator.d.ts +46 -0
  231. package/dist/types/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.d.ts +8 -0
  232. package/dist/types/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.d.ts +38 -0
  233. package/dist/types/components/snk-crud/snk-crud.d.ts +50 -0
  234. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +92 -0
  235. package/dist/types/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.d.ts +4 -0
  236. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +13 -0
  237. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +9 -0
  238. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +9 -0
  239. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +15 -0
  240. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +24 -0
  241. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +11 -0
  242. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +8 -0
  243. package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +11 -0
  244. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +20 -0
  245. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +40 -0
  246. package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +45 -0
  247. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +26 -0
  248. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +65 -0
  249. package/dist/types/components/snk-form/snk-form.d.ts +71 -0
  250. package/dist/types/components/snk-form/subcomponents/snk-config-options/snk-config-options.d.ts +51 -0
  251. package/dist/types/components/snk-form/subcomponents/snk-field-config/snk-field-config.d.ts +32 -0
  252. package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +139 -0
  253. package/dist/types/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.d.ts +97 -0
  254. package/dist/types/components/snk-grid/snk-grid.d.ts +59 -0
  255. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +30 -0
  256. package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +12 -0
  257. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +92 -0
  258. package/dist/types/components.d.ts +1100 -12
  259. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +7 -6
  260. package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +3 -0
  261. package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +6 -0
  262. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +21 -3
  263. package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +1 -1
  264. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +7 -7
  265. package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +1 -0
  266. package/dist/types/lib/http/data-fetcher/fetchers/totals-fetcher.d.ts +8 -0
  267. package/dist/types/lib/index.d.ts +2 -0
  268. package/dist/types/lib/message/SnkMessageBuilder.d.ts +42 -0
  269. package/dist/types/lib/message/resources/crud-utils.msg.d.ts +2 -0
  270. package/dist/types/lib/message/resources/snk-configurator.msg.d.ts +2 -0
  271. package/dist/types/lib/message/resources/snk-data-unit.msg.d.ts +2 -0
  272. package/dist/types/lib/message/resources/snk-filter-bar.msg.d.ts +2 -0
  273. package/dist/types/lib/message/resources/snk-form.msg.d.ts +5 -0
  274. package/dist/types/lib/message/resources/snk-taskbar.msg.d.ts +2 -0
  275. package/dist/types/lib/utils/CrudUtils.d.ts +6 -0
  276. package/dist/types/lib/utils/constants.d.ts +76 -0
  277. package/dist/types/lib/utils/pesquisa.d.ts +2 -1
  278. package/dist/types/stencil-public-runtime.d.ts +15 -4
  279. package/loader/package.json +1 -0
  280. package/package.json +6 -5
  281. package/react/components.d.ts +23 -0
  282. package/react/components.js +23 -0
  283. package/react/components.js.map +1 -1
  284. package/dist/sankhyablocks/p-98e8490d.entry.js +0 -69
  285. package/dist/sankhyablocks/p-edcb9d8e.js +0 -2
@@ -0,0 +1,111 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import FilterItemType from '../filter-item-type.enum';
3
+ export class SnkFilterBinarySelect {
4
+ isSelected(option) {
5
+ return this.value == undefined || this.value === option;
6
+ }
7
+ ezChangeListener(evt) {
8
+ if (!evt.detail) {
9
+ this.assertCheckedOption(evt.target);
10
+ }
11
+ this.updateValue();
12
+ }
13
+ assertCheckedOption(updatingCheck) {
14
+ if (updatingCheck === this._checkOne) {
15
+ this._checkTwo.value = true;
16
+ }
17
+ else {
18
+ this._checkOne.value = true;
19
+ }
20
+ }
21
+ updateValue() {
22
+ if (!this._checkOne.value || !this._checkTwo.value) {
23
+ const [optOne, optTwo] = this.config.props.options;
24
+ this.value = this._checkOne.value ? optOne.name : optTwo.name;
25
+ }
26
+ else {
27
+ this.value = undefined;
28
+ }
29
+ }
30
+ async show() {
31
+ this._checkOne.setFocus();
32
+ }
33
+ render() {
34
+ if (!this.config || this.config.type !== FilterItemType.BINARY_SELECT) {
35
+ return undefined;
36
+ }
37
+ const [optOne, optTwo] = this.config.props.options;
38
+ return (h(Host, null, h("ez-check", { label: optOne.label, class: "sc-snk-filter-bar editor__ez-check", ref: (ref) => this._checkOne = ref, value: this.isSelected(optOne.name) }), h("ez-check", { label: optTwo.label, class: "sc-snk-filter-bar editor__ez-check", ref: (ref) => this._checkTwo = ref, value: this.isSelected(optTwo.name) })));
39
+ }
40
+ static get is() { return "snk-filter-binary-select"; }
41
+ static get properties() {
42
+ return {
43
+ "value": {
44
+ "type": "any",
45
+ "mutable": true,
46
+ "complexType": {
47
+ "original": "any",
48
+ "resolved": "any",
49
+ "references": {}
50
+ },
51
+ "required": false,
52
+ "optional": false,
53
+ "docs": {
54
+ "tags": [],
55
+ "text": ""
56
+ },
57
+ "attribute": "value",
58
+ "reflect": true
59
+ },
60
+ "config": {
61
+ "type": "unknown",
62
+ "mutable": false,
63
+ "complexType": {
64
+ "original": "SnkFilterItemConfig",
65
+ "resolved": "SnkFilterItemConfig",
66
+ "references": {
67
+ "SnkFilterItemConfig": {
68
+ "location": "import",
69
+ "path": "../snk-filter-item"
70
+ }
71
+ }
72
+ },
73
+ "required": false,
74
+ "optional": false,
75
+ "docs": {
76
+ "tags": [],
77
+ "text": ""
78
+ }
79
+ }
80
+ };
81
+ }
82
+ static get methods() {
83
+ return {
84
+ "show": {
85
+ "complexType": {
86
+ "signature": "() => Promise<void>",
87
+ "parameters": [],
88
+ "references": {
89
+ "Promise": {
90
+ "location": "global"
91
+ }
92
+ },
93
+ "return": "Promise<void>"
94
+ },
95
+ "docs": {
96
+ "text": "",
97
+ "tags": []
98
+ }
99
+ }
100
+ };
101
+ }
102
+ static get listeners() {
103
+ return [{
104
+ "name": "ezChange",
105
+ "method": "ezChangeListener",
106
+ "target": undefined,
107
+ "capture": false,
108
+ "passive": false
109
+ }];
110
+ }
111
+ }
@@ -0,0 +1,87 @@
1
+ import { h } from '@stencil/core';
2
+ import FilterItemType from '../filter-item-type.enum';
3
+ export class SnkFilterMultiSelect {
4
+ ezChangeListener(evt) {
5
+ this.value = evt.detail.value;
6
+ }
7
+ async show() {
8
+ this._comboElement.setFocus();
9
+ }
10
+ render() {
11
+ if (!this.config || this.config.type !== FilterItemType.MULTI_SELECT) {
12
+ return undefined;
13
+ }
14
+ return (h("ez-combo-box", { ref: ref => this._comboElement = ref, label: this.config.label, value: this.config.value, options: this.config.props.options }));
15
+ }
16
+ static get is() { return "snk-filter-multi-select"; }
17
+ static get properties() {
18
+ return {
19
+ "value": {
20
+ "type": "any",
21
+ "mutable": true,
22
+ "complexType": {
23
+ "original": "any",
24
+ "resolved": "any",
25
+ "references": {}
26
+ },
27
+ "required": false,
28
+ "optional": false,
29
+ "docs": {
30
+ "tags": [],
31
+ "text": ""
32
+ },
33
+ "attribute": "value",
34
+ "reflect": true
35
+ },
36
+ "config": {
37
+ "type": "unknown",
38
+ "mutable": false,
39
+ "complexType": {
40
+ "original": "SnkFilterItemConfig",
41
+ "resolved": "SnkFilterItemConfig",
42
+ "references": {
43
+ "SnkFilterItemConfig": {
44
+ "location": "import",
45
+ "path": "../snk-filter-item"
46
+ }
47
+ }
48
+ },
49
+ "required": false,
50
+ "optional": false,
51
+ "docs": {
52
+ "tags": [],
53
+ "text": ""
54
+ }
55
+ }
56
+ };
57
+ }
58
+ static get methods() {
59
+ return {
60
+ "show": {
61
+ "complexType": {
62
+ "signature": "() => Promise<void>",
63
+ "parameters": [],
64
+ "references": {
65
+ "Promise": {
66
+ "location": "global"
67
+ }
68
+ },
69
+ "return": "Promise<void>"
70
+ },
71
+ "docs": {
72
+ "text": "",
73
+ "tags": []
74
+ }
75
+ }
76
+ };
77
+ }
78
+ static get listeners() {
79
+ return [{
80
+ "name": "ezChange",
81
+ "method": "ezChangeListener",
82
+ "target": undefined,
83
+ "capture": false,
84
+ "passive": false
85
+ }];
86
+ }
87
+ }
@@ -0,0 +1,88 @@
1
+ import { h } from '@stencil/core';
2
+ import FilterItemType from '../filter-item-type.enum';
3
+ export class SnkFilterPeriod {
4
+ ezChangeListener(evt) {
5
+ this.value = evt.detail;
6
+ }
7
+ async show() {
8
+ this._numberElement.setFocus();
9
+ }
10
+ render() {
11
+ var _a;
12
+ if (!this.config || this.config.type !== FilterItemType.NUMBER) {
13
+ return undefined;
14
+ }
15
+ return (h("ez-number-input", { ref: ref => this._numberElement = ref, label: this.config.label, value: this.config.value, precision: (_a = this.config.props) === null || _a === void 0 ? void 0 : _a.precision }));
16
+ }
17
+ static get is() { return "snk-filter-number"; }
18
+ static get properties() {
19
+ return {
20
+ "config": {
21
+ "type": "unknown",
22
+ "mutable": false,
23
+ "complexType": {
24
+ "original": "SnkFilterItemConfig",
25
+ "resolved": "SnkFilterItemConfig",
26
+ "references": {
27
+ "SnkFilterItemConfig": {
28
+ "location": "import",
29
+ "path": "../snk-filter-item"
30
+ }
31
+ }
32
+ },
33
+ "required": false,
34
+ "optional": false,
35
+ "docs": {
36
+ "tags": [],
37
+ "text": ""
38
+ }
39
+ },
40
+ "value": {
41
+ "type": "number",
42
+ "mutable": false,
43
+ "complexType": {
44
+ "original": "number",
45
+ "resolved": "number",
46
+ "references": {}
47
+ },
48
+ "required": false,
49
+ "optional": false,
50
+ "docs": {
51
+ "tags": [],
52
+ "text": ""
53
+ },
54
+ "attribute": "value",
55
+ "reflect": false
56
+ }
57
+ };
58
+ }
59
+ static get methods() {
60
+ return {
61
+ "show": {
62
+ "complexType": {
63
+ "signature": "() => Promise<void>",
64
+ "parameters": [],
65
+ "references": {
66
+ "Promise": {
67
+ "location": "global"
68
+ }
69
+ },
70
+ "return": "Promise<void>"
71
+ },
72
+ "docs": {
73
+ "text": "",
74
+ "tags": []
75
+ }
76
+ }
77
+ };
78
+ }
79
+ static get listeners() {
80
+ return [{
81
+ "name": "ezChange",
82
+ "method": "ezChangeListener",
83
+ "target": undefined,
84
+ "capture": false,
85
+ "passive": false
86
+ }];
87
+ }
88
+ }
@@ -0,0 +1,101 @@
1
+ import { h } from '@stencil/core';
2
+ import FilterItemType from '../filter-item-type.enum';
3
+ export class SnkFilterPeriod {
4
+ ezChangeListener() {
5
+ const start = this._startDate.value;
6
+ const end = this._endDate.value;
7
+ this.value = (start || end ? { start, end } : undefined);
8
+ }
9
+ getDate(prop) {
10
+ const objValue = this.value ? this.value[prop] : null;
11
+ if (objValue instanceof Date) {
12
+ return objValue;
13
+ }
14
+ if (typeof objValue === "string") {
15
+ let date = new Date(objValue);
16
+ date.setMinutes(date.getMinutes() + date.getTimezoneOffset());
17
+ return date;
18
+ }
19
+ return null;
20
+ }
21
+ async show() {
22
+ this._startDate.setFocus();
23
+ }
24
+ render() {
25
+ if (!this.config || this.config.type !== FilterItemType.PERIOD) {
26
+ return undefined;
27
+ }
28
+ return (h("div", { class: "ez-col ez-col--nowrap" }, h("ez-date-input", { label: this.config.label, ref: ref => this._startDate = ref, value: this.getDate("start") }), h("label", { class: "ez-text ez-text--medium ez-text--primary ez-margin--medium" }, "at\u00E9"), h("ez-date-input", { label: this.config.label, ref: ref => this._endDate = ref, value: this.getDate("end") })));
29
+ }
30
+ static get is() { return "snk-filter-period"; }
31
+ static get properties() {
32
+ return {
33
+ "config": {
34
+ "type": "unknown",
35
+ "mutable": false,
36
+ "complexType": {
37
+ "original": "SnkFilterItemConfig",
38
+ "resolved": "SnkFilterItemConfig",
39
+ "references": {
40
+ "SnkFilterItemConfig": {
41
+ "location": "import",
42
+ "path": "../snk-filter-item"
43
+ }
44
+ }
45
+ },
46
+ "required": false,
47
+ "optional": false,
48
+ "docs": {
49
+ "tags": [],
50
+ "text": ""
51
+ }
52
+ },
53
+ "value": {
54
+ "type": "any",
55
+ "mutable": false,
56
+ "complexType": {
57
+ "original": "any",
58
+ "resolved": "any",
59
+ "references": {}
60
+ },
61
+ "required": false,
62
+ "optional": false,
63
+ "docs": {
64
+ "tags": [],
65
+ "text": ""
66
+ },
67
+ "attribute": "value",
68
+ "reflect": false
69
+ }
70
+ };
71
+ }
72
+ static get methods() {
73
+ return {
74
+ "show": {
75
+ "complexType": {
76
+ "signature": "() => Promise<void>",
77
+ "parameters": [],
78
+ "references": {
79
+ "Promise": {
80
+ "location": "global"
81
+ }
82
+ },
83
+ "return": "Promise<void>"
84
+ },
85
+ "docs": {
86
+ "text": "",
87
+ "tags": []
88
+ }
89
+ }
90
+ };
91
+ }
92
+ static get listeners() {
93
+ return [{
94
+ "name": "ezChange",
95
+ "method": "ezChangeListener",
96
+ "target": undefined,
97
+ "capture": false,
98
+ "passive": false
99
+ }];
100
+ }
101
+ }
@@ -0,0 +1,180 @@
1
+ import { ApplicationContext, UserInterface } from '@sankhyalabs/core';
2
+ import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
3
+ import { h, Host } from '@stencil/core';
4
+ import { CheckMode } from "@sankhyalabs/ezui/dist/collection/utils";
5
+ import FilterItemType from '../filter-item-type.enum';
6
+ export class SnkFilterPersonalized {
7
+ getValue(param, index) {
8
+ if (this.value && index >= 0 && index < this.value.length) {
9
+ const rawValue = this.value[index];
10
+ if (param.type === UserInterface.SEARCH) {
11
+ return rawValue;
12
+ }
13
+ return convertType(param.dataType, rawValue);
14
+ }
15
+ return undefined;
16
+ }
17
+ setValue(index, value) {
18
+ if (this.value == undefined) {
19
+ this.value = Array(index).fill(null);
20
+ }
21
+ else {
22
+ this.value = [...this.value];
23
+ }
24
+ this.value[index] = value;
25
+ if (this.value.filter(item => item != undefined).length == 0) {
26
+ this.value = null;
27
+ }
28
+ }
29
+ doSearch(mode, argument, param) {
30
+ const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
31
+ return new Promise((resolve, reject) => {
32
+ application.executePreparedSearch(mode, argument, param.searchContext)
33
+ .then(result => {
34
+ resolve(result);
35
+ }).catch(reason => {
36
+ reject(reason);
37
+ });
38
+ });
39
+ }
40
+ getParamsInterface() {
41
+ var _a, _b, _c;
42
+ const params = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.personalizedFilter) === null || _c === void 0 ? void 0 : _c.parameters;
43
+ return params.map((param, index) => {
44
+ var _a;
45
+ const elemId = 'param_' + index;
46
+ switch (param.type) {
47
+ case UserInterface.SEARCH:
48
+ return h("ez-search", { id: elemId, suppressEmptyOption: true, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail), label: param.label, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, param) });
49
+ case UserInterface.SWITCH:
50
+ case UserInterface.CHECKBOX:
51
+ const mode = UserInterface.SWITCH === param.type ? CheckMode.SWITCH : CheckMode.REGULAR;
52
+ return h("ez-check", { id: elemId, class: "ez-padding-bottom--medium", mode: mode, value: this.getValue(param, index), label: param.label, onEzChange: evt => this.setValue(index, evt.detail) });
53
+ case UserInterface.DECIMALNUMBER:
54
+ case UserInterface.INTEGERNUMBER:
55
+ return h("ez-number-input", { id: elemId, label: param.label, value: this.getValue(param, index), precision: (_a = param.props) === null || _a === void 0 ? void 0 : _a.precision, onEzChange: evt => this.setValue(index, evt.detail) });
56
+ case UserInterface.OPTIONSELECTOR:
57
+ return h("ez-combo-box", { id: elemId, label: param.label, value: this.getValue(param, index), options: param.options, onEzChange: evt => { var _a; return this.setValue(index, (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); } });
58
+ case UserInterface.DATE:
59
+ return h("ez-date-input", { id: elemId, label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
60
+ case UserInterface.DATETIME:
61
+ return h("ez-date-time-input", { id: elemId, label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
62
+ default:
63
+ return h("ez-text-input", { id: elemId, label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
64
+ }
65
+ });
66
+ }
67
+ async show() {
68
+ const elem = document.querySelector("#param_0");
69
+ if (elem) {
70
+ elem["setFocus"]();
71
+ }
72
+ }
73
+ render() {
74
+ if (!this.config || this.config.type !== FilterItemType.PERSONALIZED) {
75
+ return undefined;
76
+ }
77
+ return (h(Host, null, this.getParamsInterface()));
78
+ }
79
+ static get is() { return "snk-filter-personalized"; }
80
+ static get properties() {
81
+ return {
82
+ "config": {
83
+ "type": "unknown",
84
+ "mutable": false,
85
+ "complexType": {
86
+ "original": "SnkFilterItemConfig",
87
+ "resolved": "SnkFilterItemConfig",
88
+ "references": {
89
+ "SnkFilterItemConfig": {
90
+ "location": "import",
91
+ "path": "../snk-filter-item"
92
+ }
93
+ }
94
+ },
95
+ "required": false,
96
+ "optional": false,
97
+ "docs": {
98
+ "tags": [],
99
+ "text": ""
100
+ }
101
+ },
102
+ "value": {
103
+ "type": "unknown",
104
+ "mutable": true,
105
+ "complexType": {
106
+ "original": "Array<IOption|boolean|string|number|Date>",
107
+ "resolved": "(string | number | boolean | Date | IOption)[]",
108
+ "references": {
109
+ "Array": {
110
+ "location": "global"
111
+ },
112
+ "IOption": {
113
+ "location": "import",
114
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box"
115
+ },
116
+ "Date": {
117
+ "location": "global"
118
+ }
119
+ }
120
+ },
121
+ "required": false,
122
+ "optional": false,
123
+ "docs": {
124
+ "tags": [],
125
+ "text": ""
126
+ }
127
+ },
128
+ "fix": {
129
+ "type": "unknown",
130
+ "mutable": false,
131
+ "complexType": {
132
+ "original": "()=>void",
133
+ "resolved": "() => void",
134
+ "references": {}
135
+ },
136
+ "required": false,
137
+ "optional": false,
138
+ "docs": {
139
+ "tags": [],
140
+ "text": ""
141
+ }
142
+ },
143
+ "unfix": {
144
+ "type": "unknown",
145
+ "mutable": false,
146
+ "complexType": {
147
+ "original": "()=>void",
148
+ "resolved": "() => void",
149
+ "references": {}
150
+ },
151
+ "required": false,
152
+ "optional": false,
153
+ "docs": {
154
+ "tags": [],
155
+ "text": ""
156
+ }
157
+ }
158
+ };
159
+ }
160
+ static get methods() {
161
+ return {
162
+ "show": {
163
+ "complexType": {
164
+ "signature": "() => Promise<void>",
165
+ "parameters": [],
166
+ "references": {
167
+ "Promise": {
168
+ "location": "global"
169
+ }
170
+ },
171
+ "return": "Promise<void>"
172
+ },
173
+ "docs": {
174
+ "text": "",
175
+ "tags": []
176
+ }
177
+ }
178
+ };
179
+ }
180
+ }
@@ -0,0 +1,102 @@
1
+ import { ApplicationContext } from '@sankhyalabs/core';
2
+ import { h } from '@stencil/core';
3
+ import FilterItemType from '../filter-item-type.enum';
4
+ export class SnkFilterSearch {
5
+ ezChangeListener(_evt) {
6
+ this.value = this._searchInput.value;
7
+ }
8
+ doSearch(mode, argument) {
9
+ const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
10
+ return new Promise((resolve, reject) => {
11
+ application.executePreparedSearch(mode, argument, this.config.props.searchContext)
12
+ .then(result => {
13
+ resolve(result);
14
+ }).catch(reason => {
15
+ reject(reason);
16
+ });
17
+ });
18
+ }
19
+ async show() {
20
+ this._searchInput.setFocus();
21
+ }
22
+ render() {
23
+ if (!this.config || this.config.type !== FilterItemType.SEARCH) {
24
+ return undefined;
25
+ }
26
+ return (h("ez-search", { suppressEmptyOption: true, value: this.config.value, label: this.config.label, ref: ref => this._searchInput = ref, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument) }));
27
+ }
28
+ static get is() { return "snk-filter-search"; }
29
+ static get properties() {
30
+ return {
31
+ "config": {
32
+ "type": "unknown",
33
+ "mutable": false,
34
+ "complexType": {
35
+ "original": "SnkFilterItemConfig",
36
+ "resolved": "SnkFilterItemConfig",
37
+ "references": {
38
+ "SnkFilterItemConfig": {
39
+ "location": "import",
40
+ "path": "../snk-filter-item"
41
+ }
42
+ }
43
+ },
44
+ "required": false,
45
+ "optional": false,
46
+ "docs": {
47
+ "tags": [],
48
+ "text": ""
49
+ }
50
+ },
51
+ "value": {
52
+ "type": "unknown",
53
+ "mutable": false,
54
+ "complexType": {
55
+ "original": "IOption",
56
+ "resolved": "IOption",
57
+ "references": {
58
+ "IOption": {
59
+ "location": "import",
60
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box"
61
+ }
62
+ }
63
+ },
64
+ "required": false,
65
+ "optional": false,
66
+ "docs": {
67
+ "tags": [],
68
+ "text": ""
69
+ }
70
+ }
71
+ };
72
+ }
73
+ static get methods() {
74
+ return {
75
+ "show": {
76
+ "complexType": {
77
+ "signature": "() => Promise<void>",
78
+ "parameters": [],
79
+ "references": {
80
+ "Promise": {
81
+ "location": "global"
82
+ }
83
+ },
84
+ "return": "Promise<void>"
85
+ },
86
+ "docs": {
87
+ "text": "",
88
+ "tags": []
89
+ }
90
+ }
91
+ };
92
+ }
93
+ static get listeners() {
94
+ return [{
95
+ "name": "ezChange",
96
+ "method": "ezChangeListener",
97
+ "target": undefined,
98
+ "capture": false,
99
+ "passive": false
100
+ }];
101
+ }
102
+ }