@sankhyalabs/sankhyablocks 5.5.0 → 5.7.0

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 (224) hide show
  1. package/dist/cjs/{SnkMessageBuilder-26da04f7.js → SnkMessageBuilder-056d1c24.js} +23 -1
  2. package/dist/cjs/{filter-item-type.enum-3daf58d3.js → filter-item-type.enum-aa823a00.js} +1 -0
  3. package/dist/cjs/filter-type.enum-b14ce507.js +11 -0
  4. package/dist/cjs/index-8d94b7e0.js +7 -0
  5. package/dist/cjs/index-de79181a.js +201 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/presentationMode-52ec3bdd.js +7 -0
  8. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  9. package/dist/cjs/snk-application.cjs.entry.js +1 -1
  10. package/dist/cjs/snk-attach.cjs.entry.js +2 -1
  11. package/dist/cjs/snk-crud.cjs.entry.js +2 -1
  12. package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
  13. package/dist/cjs/{snk-data-unit-c43df27b.js → snk-data-unit-289081c4.js} +1 -1
  14. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  15. package/dist/cjs/snk-detail-view.cjs.entry.js +4 -3
  16. package/dist/cjs/snk-expression-item.cjs.entry.js +213 -0
  17. package/dist/cjs/snk-filter-bar.cjs.entry.js +52 -140
  18. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +8 -1
  19. package/dist/cjs/snk-filter-detail.cjs.entry.js +1 -1
  20. package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +435 -0
  21. package/dist/cjs/snk-filter-item.cjs.entry.js +1 -1
  22. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +66 -0
  23. package/dist/cjs/snk-filter-modal.cjs.entry.js +72 -49
  24. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +3 -1
  25. package/dist/cjs/snk-filter-number.cjs.entry.js +3 -1
  26. package/dist/cjs/snk-filter-period.cjs.entry.js +11 -2
  27. package/dist/cjs/snk-filter-personalized.cjs.entry.js +3 -1
  28. package/dist/cjs/snk-filter-search.cjs.entry.js +3 -1
  29. package/dist/cjs/snk-filter-text.cjs.entry.js +2 -0
  30. package/dist/cjs/snk-grid.cjs.entry.js +3 -2
  31. package/dist/cjs/{snk-guides-viewer-e6a65393.js → snk-guides-viewer-9784c527.js} +1 -1
  32. package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -2
  33. package/dist/cjs/snk-personalized-filter.cjs.entry.js +126 -0
  34. package/dist/cjs/snk-simple-bar_2.cjs.entry.js +2 -1
  35. package/dist/cjs/snk-taskbar.cjs.entry.js +2 -1
  36. package/dist/cjs/taskbar-elements-bc2598f9.js +118 -0
  37. package/dist/collection/collection-manifest.json +3 -0
  38. package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/presentationMode.js +5 -0
  39. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +47 -0
  40. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +19 -0
  41. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +19 -0
  42. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +50 -1
  43. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +19 -0
  44. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +19 -0
  45. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +19 -0
  46. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +1 -0
  47. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +31 -2
  48. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +116 -156
  49. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.css +4 -0
  50. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +115 -0
  51. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +19 -142
  52. package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js +7 -0
  53. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +36 -0
  54. package/dist/collection/components/snk-filter-bar/utils/filters-mock.js +315 -0
  55. package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.js +62 -69
  56. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.css +4 -0
  57. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +87 -0
  58. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js +34 -0
  59. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.css +97 -0
  60. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +298 -0
  61. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js +2 -2
  62. package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +63 -0
  63. package/dist/collection/lib/message/SnkMessageBuilder.js +2 -0
  64. package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +9 -1
  65. package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +12 -0
  66. package/dist/collection/lib/store/index.js +2 -1
  67. package/dist/components/SnkMessageBuilder.js +23 -1
  68. package/dist/components/filter-item-type.enum.js +1 -0
  69. package/dist/components/index.d.ts +3 -0
  70. package/dist/components/index.js +3 -0
  71. package/dist/components/index2.js +1 -1
  72. package/dist/components/index3.js +199 -0
  73. package/dist/components/presentationMode.js +7 -0
  74. package/dist/components/snk-crud.js +22 -34
  75. package/dist/components/snk-data-exporter2.js +1 -1
  76. package/dist/components/snk-detail-view2.js +24 -46
  77. package/dist/components/snk-expression-item.d.ts +11 -0
  78. package/dist/components/snk-expression-item.js +6 -0
  79. package/dist/components/snk-expression-item2.js +241 -0
  80. package/dist/components/snk-filter-bar2.js +57 -157
  81. package/dist/components/snk-filter-binary-select.js +9 -1
  82. package/dist/components/snk-filter-field-search.js +1 -200
  83. package/dist/{esm/snk-filter-field-search.entry.js → components/snk-filter-field-search2.js} +65 -38
  84. package/dist/components/snk-filter-list.js +171 -1
  85. package/dist/components/snk-filter-modal-item.d.ts +11 -0
  86. package/dist/components/snk-filter-modal-item.js +6 -0
  87. package/dist/components/snk-filter-modal-item2.js +85 -0
  88. package/dist/components/snk-filter-modal.js +118 -1
  89. package/dist/components/snk-filter-multi-select.js +3 -1
  90. package/dist/components/snk-filter-number.js +3 -1
  91. package/dist/components/snk-filter-param-config.js +1 -273
  92. package/dist/{esm/snk-filter-param-config.entry.js → components/snk-filter-param-config2.js} +35 -11
  93. package/dist/components/snk-filter-period.js +12 -2
  94. package/dist/components/snk-filter-personalized.js +3 -1
  95. package/dist/components/snk-filter-search.js +3 -1
  96. package/dist/components/snk-filter-text.js +3 -1
  97. package/dist/components/snk-grid2.js +12 -23
  98. package/dist/components/snk-personalized-filter.d.ts +11 -0
  99. package/dist/components/snk-personalized-filter.js +158 -0
  100. package/dist/components/snk-taskbar2.js +3 -197
  101. package/dist/esm/{SnkMessageBuilder-7a9392e6.js → SnkMessageBuilder-23272e07.js} +23 -1
  102. package/dist/esm/{filter-item-type.enum-a79b2fa8.js → filter-item-type.enum-5028ed3f.js} +1 -0
  103. package/dist/esm/filter-type.enum-a80c1b6b.js +9 -0
  104. package/dist/esm/{index-6519a79e.js → index-507e19ec.js} +1 -1
  105. package/dist/esm/index-620ac460.js +7 -0
  106. package/dist/esm/index-8efbf198.js +199 -0
  107. package/dist/esm/loader.js +1 -1
  108. package/dist/esm/presentationMode-783bbf9d.js +7 -0
  109. package/dist/esm/sankhyablocks.js +1 -1
  110. package/dist/esm/snk-application.entry.js +1 -1
  111. package/dist/esm/snk-attach.entry.js +3 -2
  112. package/dist/esm/snk-crud.entry.js +3 -2
  113. package/dist/esm/snk-data-exporter.entry.js +3 -3
  114. package/dist/esm/{snk-data-unit-f9e4c694.js → snk-data-unit-34dc5371.js} +1 -1
  115. package/dist/esm/snk-data-unit.entry.js +2 -2
  116. package/dist/esm/snk-detail-view.entry.js +5 -4
  117. package/dist/esm/snk-expression-item.entry.js +209 -0
  118. package/dist/esm/snk-filter-bar.entry.js +53 -141
  119. package/dist/esm/snk-filter-binary-select.entry.js +9 -2
  120. package/dist/esm/snk-filter-detail.entry.js +1 -1
  121. package/dist/esm/snk-filter-field-search_2.entry.js +430 -0
  122. package/dist/esm/snk-filter-item.entry.js +1 -1
  123. package/dist/esm/snk-filter-modal-item.entry.js +62 -0
  124. package/dist/esm/snk-filter-modal.entry.js +73 -50
  125. package/dist/esm/snk-filter-multi-select.entry.js +4 -2
  126. package/dist/esm/snk-filter-number.entry.js +4 -2
  127. package/dist/esm/snk-filter-period.entry.js +12 -3
  128. package/dist/esm/snk-filter-personalized.entry.js +4 -2
  129. package/dist/esm/snk-filter-search.entry.js +4 -2
  130. package/dist/esm/snk-filter-text.entry.js +3 -1
  131. package/dist/esm/snk-grid.entry.js +3 -2
  132. package/dist/esm/{snk-guides-viewer-62a9f74d.js → snk-guides-viewer-4d12f268.js} +2 -2
  133. package/dist/esm/snk-guides-viewer.entry.js +4 -3
  134. package/dist/esm/snk-personalized-filter.entry.js +122 -0
  135. package/dist/esm/snk-simple-bar_2.entry.js +3 -2
  136. package/dist/esm/snk-taskbar.entry.js +3 -2
  137. package/dist/esm/taskbar-elements-e6af3e93.js +115 -0
  138. package/dist/sankhyablocks/p-0110b7da.entry.js +1 -0
  139. package/dist/sankhyablocks/p-1a68fb59.js +1 -0
  140. package/dist/sankhyablocks/p-27e264d9.entry.js +1 -0
  141. package/dist/sankhyablocks/p-343699ad.entry.js +1 -0
  142. package/dist/sankhyablocks/{p-f2223502.js → p-3db1d3de.js} +1 -1
  143. package/dist/sankhyablocks/p-433dfa63.entry.js +1 -0
  144. package/dist/sankhyablocks/p-45ee8b22.entry.js +1 -0
  145. package/dist/sankhyablocks/{p-f132e371.js → p-4c2015a9.js} +1 -1
  146. package/dist/sankhyablocks/p-4ce96831.entry.js +1 -0
  147. package/dist/sankhyablocks/p-4eefe631.entry.js +1 -0
  148. package/dist/sankhyablocks/{p-9dd2b8cb.js → p-584d7212.js} +1 -1
  149. package/dist/sankhyablocks/{p-a412992c.entry.js → p-64b03506.entry.js} +1 -1
  150. package/dist/sankhyablocks/p-6a02e236.js +1 -0
  151. package/dist/sankhyablocks/p-7695c404.entry.js +1 -0
  152. package/dist/sankhyablocks/p-786ae316.entry.js +1 -0
  153. package/dist/sankhyablocks/p-82bc97da.entry.js +1 -0
  154. package/dist/sankhyablocks/p-8bdf5e57.entry.js +1 -0
  155. package/dist/sankhyablocks/p-8efb0f47.entry.js +1 -0
  156. package/dist/sankhyablocks/p-9af04fc7.entry.js +1 -0
  157. package/dist/sankhyablocks/{p-3a2ce158.entry.js → p-a1c58536.entry.js} +1 -1
  158. package/dist/sankhyablocks/{p-afba9bbe.entry.js → p-bdbb2672.entry.js} +1 -1
  159. package/dist/sankhyablocks/{p-b2523981.entry.js → p-c1ab16d0.entry.js} +2 -2
  160. package/dist/sankhyablocks/{p-aeffd219.js → p-ccd26e3a.js} +1 -1
  161. package/dist/sankhyablocks/p-d410f45a.js +1 -0
  162. package/dist/sankhyablocks/p-d9804798.js +1 -0
  163. package/dist/sankhyablocks/p-df8f13b4.entry.js +1 -0
  164. package/dist/sankhyablocks/p-e2bb9c9a.entry.js +1 -0
  165. package/dist/sankhyablocks/p-e9f42525.entry.js +1 -0
  166. package/dist/sankhyablocks/p-ed3d6ab4.entry.js +1 -0
  167. package/dist/sankhyablocks/p-ee1381f4.entry.js +1 -0
  168. package/dist/sankhyablocks/p-f4184ce7.js +1 -0
  169. package/dist/sankhyablocks/p-f5f36fbb.js +1 -0
  170. package/dist/sankhyablocks/p-fd4ed40a.entry.js +1 -0
  171. package/dist/sankhyablocks/p-ff96b509.entry.js +27 -0
  172. package/dist/sankhyablocks/p-ffac37d5.entry.js +1 -0
  173. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  174. package/dist/types/components/snk-filter-bar/filter-item/editors/enum/presentationMode.d.ts +4 -0
  175. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +5 -0
  176. package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +2 -1
  177. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +3 -0
  178. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +37 -0
  179. package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +17 -0
  180. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +2 -11
  181. package/dist/types/components/snk-filter-bar/types/filter-type.enum.d.ts +6 -0
  182. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +20 -0
  183. package/dist/types/components/snk-filter-bar/utils/filters-mock.d.ts +186 -0
  184. package/dist/types/components/snk-filter-field-search/interfaces/index.d.ts +14 -4
  185. package/dist/types/components/snk-filter-field-search/snk-filter-field-search.d.ts +13 -10
  186. package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +20 -0
  187. package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.d.ts +9 -0
  188. package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +54 -0
  189. package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionItem.d.ts +4 -2
  190. package/dist/types/components.d.ts +196 -63
  191. package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +7 -0
  192. package/dist/types/lib/message/resources/snk-personalized-filter.msg.d.ts +1 -0
  193. package/dist/types/lib/store/index.d.ts +1 -0
  194. package/package.json +1 -1
  195. package/react/components.d.ts +3 -0
  196. package/react/components.js +3 -0
  197. package/react/components.js.map +1 -1
  198. package/dist/cjs/snk-filter-field-search.cjs.entry.js +0 -185
  199. package/dist/cjs/snk-filter-param-config.cjs.entry.js +0 -256
  200. package/dist/cjs/taskbar-elements-80285601.js +0 -313
  201. package/dist/components/snk-filter-list2.js +0 -173
  202. package/dist/components/snk-filter-modal2.js +0 -97
  203. package/dist/esm/taskbar-elements-055ba1ad.js +0 -309
  204. package/dist/sankhyablocks/p-4512cc6c.entry.js +0 -1
  205. package/dist/sankhyablocks/p-5cbbe1f7.entry.js +0 -1
  206. package/dist/sankhyablocks/p-5e62a17b.entry.js +0 -1
  207. package/dist/sankhyablocks/p-5fc55684.entry.js +0 -1
  208. package/dist/sankhyablocks/p-63d01871.entry.js +0 -1
  209. package/dist/sankhyablocks/p-73e830cf.entry.js +0 -1
  210. package/dist/sankhyablocks/p-741b00ef.entry.js +0 -1
  211. package/dist/sankhyablocks/p-79d22df0.entry.js +0 -1
  212. package/dist/sankhyablocks/p-86d29b6f.entry.js +0 -1
  213. package/dist/sankhyablocks/p-92a0fca4.js +0 -1
  214. package/dist/sankhyablocks/p-93d8fe00.entry.js +0 -1
  215. package/dist/sankhyablocks/p-999d1953.entry.js +0 -1
  216. package/dist/sankhyablocks/p-ad51bf1c.entry.js +0 -1
  217. package/dist/sankhyablocks/p-c336170d.entry.js +0 -1
  218. package/dist/sankhyablocks/p-c3efd4eb.entry.js +0 -1
  219. package/dist/sankhyablocks/p-d5c9c1f8.entry.js +0 -1
  220. package/dist/sankhyablocks/p-ebe876f5.entry.js +0 -1
  221. package/dist/sankhyablocks/p-ed438690.js +0 -1
  222. package/dist/sankhyablocks/p-ee82c157.entry.js +0 -1
  223. package/dist/sankhyablocks/p-f3d0c744.entry.js +0 -1
  224. package/dist/sankhyablocks/p-fac37198.entry.js +0 -1
@@ -1,17 +1,16 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { VersionUtils, ElementIDUtils, ApplicationContext, DataType } from '@sankhyalabs/core';
3
3
  import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
4
- import { T as TaskbarElement, s as store, d as defineCustomElement$1 } from './snk-taskbar2.js';
4
+ import { T as TaskbarElement, d as defineCustomElement$1 } from './snk-taskbar2.js';
5
5
  import { C as ConfigStorage } from './ConfigStorage.js';
6
6
  import { P as PresentationMode } from './index2.js';
7
7
  import { T as TaskbarProcessor } from './taskbar-processor.js';
8
- import { d as defineCustomElement$a } from './snk-data-exporter2.js';
9
- import { d as defineCustomElement$9 } from './snk-exporter-email-sender2.js';
10
- import { d as defineCustomElement$8 } from './snk-filter-bar2.js';
11
- import { d as defineCustomElement$7 } from './snk-filter-detail2.js';
12
- import { d as defineCustomElement$6 } from './snk-filter-item2.js';
13
- import { d as defineCustomElement$5 } from './snk-filter-list2.js';
14
- import { d as defineCustomElement$4 } from './snk-filter-modal2.js';
8
+ import { s as store } from './index3.js';
9
+ import { d as defineCustomElement$8 } from './snk-data-exporter2.js';
10
+ import { d as defineCustomElement$7 } from './snk-exporter-email-sender2.js';
11
+ import { d as defineCustomElement$6 } from './snk-filter-bar2.js';
12
+ import { d as defineCustomElement$5 } from './snk-filter-detail2.js';
13
+ import { d as defineCustomElement$4 } from './snk-filter-item2.js';
15
14
  import { d as defineCustomElement$3 } from './snk-grid-config2.js';
16
15
  import { d as defineCustomElement$2 } from './snk-select-box2.js';
17
16
 
@@ -312,7 +311,7 @@ function defineCustomElement() {
312
311
  if (typeof customElements === "undefined") {
313
312
  return;
314
313
  }
315
- const components = ["snk-grid", "snk-data-exporter", "snk-exporter-email-sender", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-filter-list", "snk-filter-modal", "snk-grid-config", "snk-select-box", "snk-taskbar"];
314
+ const components = ["snk-grid", "snk-data-exporter", "snk-exporter-email-sender", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-grid-config", "snk-select-box", "snk-taskbar"];
316
315
  components.forEach(tagName => { switch (tagName) {
317
316
  case "snk-grid":
318
317
  if (!customElements.get(tagName)) {
@@ -320,36 +319,26 @@ function defineCustomElement() {
320
319
  }
321
320
  break;
322
321
  case "snk-data-exporter":
323
- if (!customElements.get(tagName)) {
324
- defineCustomElement$a();
325
- }
326
- break;
327
- case "snk-exporter-email-sender":
328
- if (!customElements.get(tagName)) {
329
- defineCustomElement$9();
330
- }
331
- break;
332
- case "snk-filter-bar":
333
322
  if (!customElements.get(tagName)) {
334
323
  defineCustomElement$8();
335
324
  }
336
325
  break;
337
- case "snk-filter-detail":
326
+ case "snk-exporter-email-sender":
338
327
  if (!customElements.get(tagName)) {
339
328
  defineCustomElement$7();
340
329
  }
341
330
  break;
342
- case "snk-filter-item":
331
+ case "snk-filter-bar":
343
332
  if (!customElements.get(tagName)) {
344
333
  defineCustomElement$6();
345
334
  }
346
335
  break;
347
- case "snk-filter-list":
336
+ case "snk-filter-detail":
348
337
  if (!customElements.get(tagName)) {
349
338
  defineCustomElement$5();
350
339
  }
351
340
  break;
352
- case "snk-filter-modal":
341
+ case "snk-filter-item":
353
342
  if (!customElements.get(tagName)) {
354
343
  defineCustomElement$4();
355
344
  }
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface SnkPersonalizedFilter extends Components.SnkPersonalizedFilter, HTMLElement {}
4
+ export const SnkPersonalizedFilter: {
5
+ prototype: SnkPersonalizedFilter;
6
+ new (): SnkPersonalizedFilter;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,158 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { d as dist, D as DataFetcher } from './DataFetcher.js';
3
+ import { F as FilterUserConfigTypes, a as FilterOperand } from './index2.js';
4
+ import { s as store } from './index3.js';
5
+ import { StringUtils, ApplicationContext } from '@sankhyalabs/core';
6
+ import { d as defineCustomElement$4 } from './snk-expression-item2.js';
7
+ import { d as defineCustomElement$3 } from './snk-filter-field-search2.js';
8
+ import { d as defineCustomElement$2 } from './snk-filter-param-config2.js';
9
+
10
+ class PersonalizedFilterFetcher {
11
+ constructor() {
12
+ this.templateByQuery = new Map();
13
+ this.buildTemplates();
14
+ }
15
+ buildTemplates() {
16
+ const query = dist.gql `
17
+ query($name: String!) {
18
+ $queryAlias$: fetchFilterFields(name: $name){
19
+ currentLink {
20
+ description
21
+ uri
22
+ }
23
+ links {
24
+ description
25
+ uri
26
+ fieldCount
27
+ }
28
+ fields {
29
+ name
30
+ description
31
+ uri
32
+ onlyDate
33
+ dataType
34
+ userInterface
35
+ properties {
36
+ name
37
+ value
38
+ }
39
+ }
40
+ }
41
+ }
42
+ `;
43
+ this.templateByQuery.set("fetchFilterFields", query);
44
+ }
45
+ loadFields(uri) {
46
+ return new Promise((resolve, reject) => {
47
+ DataFetcher.get()
48
+ .callGraphQL({
49
+ values: { name: uri },
50
+ query: this.templateByQuery.get("fetchFilterFields"),
51
+ })
52
+ .then((resp) => {
53
+ let fields = resp.fields;
54
+ for (const field of fields) {
55
+ if (Array.isArray(field.properties) && field.properties.length > 0 && field.userInterface === "SEARCH") {
56
+ const propertiesConvertedObject = field.properties.reduce((accumulator, prop) => {
57
+ accumulator[prop.name] = prop.value;
58
+ return accumulator;
59
+ }, {});
60
+ field.properties = propertiesConvertedObject;
61
+ }
62
+ }
63
+ resolve(Object.assign(Object.assign({}, resp), { fields: fields }));
64
+ })
65
+ .catch((error) => {
66
+ reject(error);
67
+ });
68
+ });
69
+ }
70
+ }
71
+
72
+ const snkPersonalizedFilterCss = ":host{display:flex}";
73
+
74
+ const SnkPersonalizedFilter$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
75
+ constructor() {
76
+ super();
77
+ this.__registerHost();
78
+ this._personalizedFilterFetcher = new PersonalizedFilterFetcher();
79
+ this._dataSourceFetcher = {
80
+ fetchData: async (entity) => {
81
+ let entityURI = entity === null || entity === void 0 ? void 0 : entity.uri;
82
+ if (StringUtils.isEmpty(entityURI)) {
83
+ entityURI = "dd://Financeiro/br.com.sankhya.fin.cad.receber"; //TODO: Receber como prop
84
+ }
85
+ return await this._personalizedFilterFetcher.loadFields(entityURI);
86
+ }
87
+ };
88
+ this.items = {
89
+ entityName: "Financeiro",
90
+ fieldName: "CODBCO",
91
+ description: "Financeiro >> Banco",
92
+ type: FilterUserConfigTypes.DECIMAL,
93
+ expression: "Financeiro.CODBCO",
94
+ operand: FilterOperand.EQUAL,
95
+ paramVariable: false,
96
+ value: "61",
97
+ systemConfig: null,
98
+ userConfig: null
99
+ };
100
+ this.handleFilterItemChange = (changes) => {
101
+ console.log("Campo do ExpressionItem alterado");
102
+ console.log(changes);
103
+ };
104
+ this.handleFilterItemRemove = (expression) => {
105
+ console.log("Event de deleção disparado");
106
+ console.log(expression);
107
+ };
108
+ this.messagesBuilder = undefined;
109
+ }
110
+ componentWillLoad() {
111
+ if (store.get("filterFieldsDataSource") == undefined) {
112
+ store.set("filterFieldsDataSource", this._dataSourceFetcher);
113
+ }
114
+ if (!this.messagesBuilder) {
115
+ const snkApp = ApplicationContext.getContextValue("__SNK__APPLICATION__");
116
+ this.messagesBuilder = snkApp === null || snkApp === void 0 ? void 0 : snkApp.messagesBuilder;
117
+ }
118
+ }
119
+ render() {
120
+ return (h(Host, null, h("div", null, h("snk-expression-item", { expression: this.items, canRemove: true, onEzFilterItemChange: (evt) => this.handleFilterItemChange(evt.detail), onEzFilterItemRemove: (evt) => this.handleFilterItemRemove(evt.detail), messagesBuilder: this.messagesBuilder }))));
121
+ }
122
+ static get style() { return snkPersonalizedFilterCss; }
123
+ }, [0, "snk-personalized-filter", {
124
+ "messagesBuilder": [1040]
125
+ }]);
126
+ function defineCustomElement$1() {
127
+ if (typeof customElements === "undefined") {
128
+ return;
129
+ }
130
+ const components = ["snk-personalized-filter", "snk-expression-item", "snk-filter-field-search", "snk-filter-param-config"];
131
+ components.forEach(tagName => { switch (tagName) {
132
+ case "snk-personalized-filter":
133
+ if (!customElements.get(tagName)) {
134
+ customElements.define(tagName, SnkPersonalizedFilter$1);
135
+ }
136
+ break;
137
+ case "snk-expression-item":
138
+ if (!customElements.get(tagName)) {
139
+ defineCustomElement$4();
140
+ }
141
+ break;
142
+ case "snk-filter-field-search":
143
+ if (!customElements.get(tagName)) {
144
+ defineCustomElement$3();
145
+ }
146
+ break;
147
+ case "snk-filter-param-config":
148
+ if (!customElements.get(tagName)) {
149
+ defineCustomElement$2();
150
+ }
151
+ break;
152
+ } });
153
+ }
154
+
155
+ const SnkPersonalizedFilter = SnkPersonalizedFilter$1;
156
+ const defineCustomElement = defineCustomElement$1;
157
+
158
+ export { SnkPersonalizedFilter, defineCustomElement };
@@ -1,205 +1,11 @@
1
- import { getRenderingRef, forceUpdate, h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
1
+ import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
2
2
  import { StringUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { A as AuthorizationConfig } from './AuthorizationConfig.js';
4
4
  import { P as PresentationMode } from './index2.js';
5
+ import { s as store } from './index3.js';
5
6
  import { d as defineCustomElement$2 } from './snk-data-exporter2.js';
6
7
  import { d as defineCustomElement$1 } from './snk-exporter-email-sender2.js';
7
8
 
8
- const appendToMap = (map, propName, value) => {
9
- const items = map.get(propName);
10
- if (!items) {
11
- map.set(propName, [value]);
12
- }
13
- else if (!items.includes(value)) {
14
- items.push(value);
15
- }
16
- };
17
- const debounce = (fn, ms) => {
18
- let timeoutId;
19
- return (...args) => {
20
- if (timeoutId) {
21
- clearTimeout(timeoutId);
22
- }
23
- timeoutId = setTimeout(() => {
24
- timeoutId = 0;
25
- fn(...args);
26
- }, ms);
27
- };
28
- };
29
-
30
- /**
31
- * Check if a possible element isConnected.
32
- * The property might not be there, so we check for it.
33
- *
34
- * We want it to return true if isConnected is not a property,
35
- * otherwise we would remove these elements and would not update.
36
- *
37
- * Better leak in Edge than to be useless.
38
- */
39
- const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
40
- const cleanupElements = debounce((map) => {
41
- for (let key of map.keys()) {
42
- map.set(key, map.get(key).filter(isConnected));
43
- }
44
- }, 2000);
45
- const stencilSubscription = () => {
46
- if (typeof getRenderingRef !== 'function') {
47
- // If we are not in a stencil project, we do nothing.
48
- // This function is not really exported by @stencil/core.
49
- return {};
50
- }
51
- const elmsToUpdate = new Map();
52
- return {
53
- dispose: () => elmsToUpdate.clear(),
54
- get: (propName) => {
55
- const elm = getRenderingRef();
56
- if (elm) {
57
- appendToMap(elmsToUpdate, propName, elm);
58
- }
59
- },
60
- set: (propName) => {
61
- const elements = elmsToUpdate.get(propName);
62
- if (elements) {
63
- elmsToUpdate.set(propName, elements.filter(forceUpdate));
64
- }
65
- cleanupElements(elmsToUpdate);
66
- },
67
- reset: () => {
68
- elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
69
- cleanupElements(elmsToUpdate);
70
- },
71
- };
72
- };
73
-
74
- const unwrap = (val) => (typeof val === 'function' ? val() : val);
75
- const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
76
- const unwrappedState = unwrap(defaultState);
77
- let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
78
- const handlers = {
79
- dispose: [],
80
- get: [],
81
- set: [],
82
- reset: [],
83
- };
84
- const reset = () => {
85
- var _a;
86
- // When resetting the state, the default state may be a function - unwrap it to invoke it.
87
- // otherwise, the state won't be properly reset
88
- states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
89
- handlers.reset.forEach((cb) => cb());
90
- };
91
- const dispose = () => {
92
- // Call first dispose as resetting the state would
93
- // cause less updates ;)
94
- handlers.dispose.forEach((cb) => cb());
95
- reset();
96
- };
97
- const get = (propName) => {
98
- handlers.get.forEach((cb) => cb(propName));
99
- return states.get(propName);
100
- };
101
- const set = (propName, value) => {
102
- const oldValue = states.get(propName);
103
- if (shouldUpdate(value, oldValue, propName)) {
104
- states.set(propName, value);
105
- handlers.set.forEach((cb) => cb(propName, value, oldValue));
106
- }
107
- };
108
- const state = (typeof Proxy === 'undefined'
109
- ? {}
110
- : new Proxy(unwrappedState, {
111
- get(_, propName) {
112
- return get(propName);
113
- },
114
- ownKeys(_) {
115
- return Array.from(states.keys());
116
- },
117
- getOwnPropertyDescriptor() {
118
- return {
119
- enumerable: true,
120
- configurable: true,
121
- };
122
- },
123
- has(_, propName) {
124
- return states.has(propName);
125
- },
126
- set(_, propName, value) {
127
- set(propName, value);
128
- return true;
129
- },
130
- }));
131
- const on = (eventName, callback) => {
132
- handlers[eventName].push(callback);
133
- return () => {
134
- removeFromArray(handlers[eventName], callback);
135
- };
136
- };
137
- const onChange = (propName, cb) => {
138
- const unSet = on('set', (key, newValue) => {
139
- if (key === propName) {
140
- cb(newValue);
141
- }
142
- });
143
- // We need to unwrap the defaultState because it might be a function.
144
- // Otherwise we might not be sending the right reset value.
145
- const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
146
- return () => {
147
- unSet();
148
- unReset();
149
- };
150
- };
151
- const use = (...subscriptions) => {
152
- const unsubs = subscriptions.reduce((unsubs, subscription) => {
153
- if (subscription.set) {
154
- unsubs.push(on('set', subscription.set));
155
- }
156
- if (subscription.get) {
157
- unsubs.push(on('get', subscription.get));
158
- }
159
- if (subscription.reset) {
160
- unsubs.push(on('reset', subscription.reset));
161
- }
162
- if (subscription.dispose) {
163
- unsubs.push(on('dispose', subscription.dispose));
164
- }
165
- return unsubs;
166
- }, []);
167
- return () => unsubs.forEach((unsub) => unsub());
168
- };
169
- const forceUpdate = (key) => {
170
- const oldValue = states.get(key);
171
- handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
172
- };
173
- return {
174
- state,
175
- get,
176
- set,
177
- on,
178
- onChange,
179
- use,
180
- dispose,
181
- reset,
182
- forceUpdate,
183
- };
184
- };
185
- const removeFromArray = (array, item) => {
186
- const index = array.indexOf(item);
187
- if (index >= 0) {
188
- array[index] = array[array.length - 1];
189
- array.length--;
190
- }
191
- };
192
-
193
- const createStore = (defaultState, shouldUpdate) => {
194
- const map = createObservableMap(defaultState, shouldUpdate);
195
- map.use(stencilSubscription());
196
- return map;
197
- };
198
-
199
- const store = createStore({
200
- exporterProviders: {}
201
- });
202
-
203
9
  var TaskbarElement;
204
10
  (function (TaskbarElement) {
205
11
  TaskbarElement["PREVIOUS"] = "PREVIOUS";
@@ -553,4 +359,4 @@ function defineCustomElement() {
553
359
  } });
554
360
  }
555
361
 
556
- export { SnkTaskbar as S, TaskbarElement as T, defineCustomElement as d, store as s };
362
+ export { SnkTaskbar as S, TaskbarElement as T, defineCustomElement as d };
@@ -56,7 +56,15 @@ const snkFilterBarMessages = {
56
56
  "modalPersonalizedFilterSubTitle": "Gerencie seus filtros",
57
57
  "modalInfoTextCreateEditPersonalized": "Use o layout antigo para criar ou editar filtros, em breve traremos uma nova experiência",
58
58
  "modalOkButtonLabel": "Aplicar",
59
- "modalCancelButtonLabel": "Limpar"
59
+ "modalCancelButtonLabel": "Limpar",
60
+ "filters": "Filtros",
61
+ "filterModal": {
62
+ "title": "Filtros",
63
+ "okButtonLabel": "Aplicar",
64
+ "cancelButtonLabel": "Limpar tudo",
65
+ "customFilters": "Filtros personalizados",
66
+ "quickFilters": "Filtros rápidos"
67
+ }
60
68
  };
61
69
 
62
70
  const snkTaskbarMessages = {
@@ -310,6 +318,19 @@ const snkAttachMessages = {
310
318
  }
311
319
  };
312
320
 
321
+ const snkPersonalizedFilterMessages = {
322
+ info: {
323
+ labelSearchField: "Buscar campo",
324
+ labelOperator: "Operador",
325
+ labelValueVarible: "Valor variável",
326
+ titleTooltip: "Ao ativar um valor variável, é possível inserir um valor diferente sempre que o filtro for aplicado"
327
+ },
328
+ confirm: {
329
+ title: "Aviso",
330
+ description: `As informações da condição serão descartadas.</br></br><b>Gostaria de continuar?</b>`
331
+ }
332
+ };
333
+
313
334
  class SnkMessageBuilder {
314
335
  constructor(domainName) {
315
336
  this._defaults = {
@@ -332,6 +353,7 @@ class SnkMessageBuilder {
332
353
  snkFilterFieldSearch: snkFilterFieldSearchMessages,
333
354
  snkSimpleBar: snkSimpleBarMessages,
334
355
  snkAttach: snkAttachMessages,
356
+ snkPersonalizedFilter: snkPersonalizedFilterMessages
335
357
  };
336
358
  this._currentOperation = OperationMap.CLEAN;
337
359
  this._domainName = domainName;
@@ -8,6 +8,7 @@ var FilterItemType;
8
8
  FilterItemType["NUMBER"] = "NUMBER";
9
9
  FilterItemType["DEFAULT_FILTER"] = "DEFAULT_FILTER";
10
10
  FilterItemType["PERSONALIZED"] = "PERSONALIZED";
11
+ FilterItemType["MULTI_LIST"] = "MULTI_LIST";
11
12
  })(FilterItemType || (FilterItemType = {}));
12
13
  const FilterItemType$1 = FilterItemType;
13
14
 
@@ -0,0 +1,9 @@
1
+ var FilterType;
2
+ (function (FilterType) {
3
+ FilterType["QUICK_FILTER"] = "QUICK_FILTER";
4
+ FilterType["CUSTOM_FILTER"] = "CUSTOM_FILTER";
5
+ FilterType["OTHER_FILTERS"] = "OTHER_FILTERS";
6
+ })(FilterType || (FilterType = {}));
7
+ const FilterType$1 = FilterType;
8
+
9
+ export { FilterType$1 as F };
@@ -64,4 +64,4 @@ var FilterEntities;
64
64
  FilterEntities["INSTANCE"] = "Instancia";
65
65
  })(FilterEntities || (FilterEntities = {}));
66
66
 
67
- export { DataExporterOption as D, FilterOperand as F, PresentationMode as P, DataExporterFormat as a, DataExporterType as b, FilterConfigType as c, FilterEntities as d, FilterUserConfigTypes as e };
67
+ export { DataExporterOption as D, FilterUserConfigTypes as F, PresentationMode as P, DataExporterFormat as a, DataExporterType as b, FilterOperand as c, FilterConfigType as d, FilterEntities as e };
@@ -0,0 +1,7 @@
1
+ var SelectedItemType;
2
+ (function (SelectedItemType) {
3
+ SelectedItemType["LINK"] = "LINK";
4
+ SelectedItemType["FIELD"] = "FIELD";
5
+ })(SelectedItemType || (SelectedItemType = {}));
6
+
7
+ export { SelectedItemType as S };