@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,4 +1,121 @@
1
- import { S as SnkFilterModal$1, d as defineCustomElement$1 } from './snk-filter-modal2.js';
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+ import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
3
+ import { F as FilterType, d as defineCustomElement$2 } from './snk-filter-modal-item2.js';
4
+ import { F as FilterItemType } from './filter-item-type.enum.js';
5
+
6
+ const snkFilterModalCss = "ez-modal{--ez-modal-content-padding:24px 12px}.snk-filter__modal-container{width:344px;max-width:344px;overflow:hidden}.snk-filter__modal-content{display:flex;flex-direction:column;gap:12px;max-height:760px;overflow-x:clip;overflow-y:auto;padding-right:4px}.snk-filter__modal-content::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.snk-filter__modal-collapsible-box{border:1px solid #DCE0E8;border-radius:var(--border--radius-medium)}";
7
+
8
+ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
9
+ constructor() {
10
+ super();
11
+ this.__registerHost();
12
+ this.getMessage = undefined;
13
+ this.filters = undefined;
14
+ this.applyFilters = undefined;
15
+ this.clearAll = undefined;
16
+ this.closeModal = undefined;
17
+ }
18
+ getCustomMessage(key, params) {
19
+ var _a;
20
+ return (_a = this.getMessage) === null || _a === void 0 ? void 0 : _a.call(this, `snkFilterBar.filterModal.${key}`, params);
21
+ }
22
+ handleClearAll() {
23
+ const cleanedFilters = this.clearAll(this.filters);
24
+ this.filters = cleanedFilters;
25
+ }
26
+ modalActionListener(evt) {
27
+ const modalAction = evt.detail;
28
+ switch (modalAction) {
29
+ case ModalAction.CANCEL:
30
+ this.handleClearAll();
31
+ break;
32
+ case ModalAction.OK:
33
+ this.applyFilters(this.filters);
34
+ case ModalAction.CLOSE:
35
+ this.closeModal();
36
+ }
37
+ }
38
+ handleFilterChange(filterConfig) {
39
+ this.filters = this.filters.map(filter => filter.id === filterConfig.id ? filterConfig : filter);
40
+ }
41
+ handleClearFilters(filterList) {
42
+ this.filters = this.filters.map(filter => filterList.includes(filter) ? (Object.assign(Object.assign({}, filter), { value: undefined })) : filter);
43
+ }
44
+ renderFilterItem(filterItem, fullRow) {
45
+ return (h("snk-filter-modal-item", { class: fullRow ? 'ez-col ez-col--sd-12' : 'ez-col ez-col--sd-6 ez-padding--small', filterItem: filterItem, onFilterChange: (event) => this.handleFilterChange(event.detail) }));
46
+ }
47
+ mountFiltersLines(filters) {
48
+ const MAX_LINE_LENGTH = 2;
49
+ let currentLine = 0;
50
+ let forceAddCurrent = false;
51
+ const filtersLines = {};
52
+ for (let curr = 0; curr < filters.length; curr++) {
53
+ filtersLines[currentLine] = filtersLines[currentLine] || [];
54
+ const item = filters[curr];
55
+ const isLast = curr === filters.length - 1;
56
+ const currentItemMatch = [FilterItemType.TEXT, FilterItemType.NUMBER].includes(item.type);
57
+ const nextItemMatch = isLast ? false : [FilterItemType.TEXT, FilterItemType.NUMBER].includes(filters[curr + 1].type);
58
+ if ((currentItemMatch && nextItemMatch) || forceAddCurrent) {
59
+ filtersLines[currentLine].push(item);
60
+ forceAddCurrent = filtersLines[currentLine].length < MAX_LINE_LENGTH;
61
+ if (filtersLines[currentLine].length === MAX_LINE_LENGTH)
62
+ ++currentLine;
63
+ continue;
64
+ }
65
+ filtersLines[currentLine] = filtersLines[currentLine] || [];
66
+ filtersLines[currentLine].push(item);
67
+ ++currentLine;
68
+ }
69
+ return Object.values(filtersLines);
70
+ }
71
+ renderFilterLine(filters) {
72
+ const fullLine = filters.length === 1;
73
+ return (h("div", { class: "ez-row" }, filters.map((filter) => this.renderFilterItem(filter, fullLine))));
74
+ }
75
+ renderCollapsibleFilterBox(label, listItems) {
76
+ if (!listItems.length)
77
+ return null;
78
+ const appliedFilters = listItems.filter(filterItem => !!filterItem.value).length;
79
+ const lines = this.mountFiltersLines(listItems);
80
+ return (h("ez-collapsible-box", { className: "snk-filter__modal-collapsible-box ez-padding--medium", headerSize: "medium", value: true, label: label }, !!appliedFilters && (h("ez-badge", { className: "ez-badge--primary-subtle", slot: "rightSlot", label: appliedFilters })), lines.map(this.renderFilterLine.bind(this)), h("div", { class: "ez-flex ez-flex--justify-end grow" }, h("ez-button", { className: "ez-button--tertiary", size: "medium", label: "Limpar", onClick: () => this.handleClearFilters(listItems) }))));
81
+ }
82
+ componentWillRender() {
83
+ this._modalTitle = this.getCustomMessage('title');
84
+ this._okButtonLabel = this.getCustomMessage('okButtonLabel');
85
+ this._cancelButtonLabel = this.getCustomMessage('cancelButtonLabel');
86
+ }
87
+ render() {
88
+ const customFilters = this.filters.filter(filter => filter.filterType === FilterType.CUSTOM_FILTER);
89
+ const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
90
+ const otherFilters = this.filters.filter(filter => filter.filterType === FilterType.OTHER_FILTERS);
91
+ return (h("ez-modal-container", { class: "snk-filter__modal-container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter__modal-content" }, this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter])))));
92
+ }
93
+ static get style() { return snkFilterModalCss; }
94
+ }, [0, "snk-filter-modal", {
95
+ "getMessage": [16],
96
+ "filters": [1040],
97
+ "applyFilters": [16],
98
+ "clearAll": [16],
99
+ "closeModal": [16]
100
+ }]);
101
+ function defineCustomElement$1() {
102
+ if (typeof customElements === "undefined") {
103
+ return;
104
+ }
105
+ const components = ["snk-filter-modal", "snk-filter-modal-item"];
106
+ components.forEach(tagName => { switch (tagName) {
107
+ case "snk-filter-modal":
108
+ if (!customElements.get(tagName)) {
109
+ customElements.define(tagName, SnkFilterModal$1);
110
+ }
111
+ break;
112
+ case "snk-filter-modal-item":
113
+ if (!customElements.get(tagName)) {
114
+ defineCustomElement$2();
115
+ }
116
+ break;
117
+ } });
118
+ }
2
119
 
3
120
  const SnkFilterModal = SnkFilterModal$1;
4
121
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { F as FilterItemType } from './filter-item-type.enum.js';
4
4
 
@@ -6,6 +6,7 @@ const SnkFilterMultiSelect$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
6
6
  constructor() {
7
7
  super();
8
8
  this.__registerHost();
9
+ this.valueChanged = createEvent(this, "valueChanged", 7);
9
10
  this.value = undefined;
10
11
  this.config = undefined;
11
12
  }
@@ -14,6 +15,7 @@ const SnkFilterMultiSelect$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
14
15
  */
15
16
  ezChangeListener(evt) {
16
17
  this.value = evt.detail.value;
18
+ this.valueChanged.emit(this.value);
17
19
  }
18
20
  /**
19
21
  * Exibe o componente snk-filter-multi-select
@@ -1,4 +1,4 @@
1
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { F as FilterItemType } from './filter-item-type.enum.js';
4
4
 
@@ -6,6 +6,7 @@ const SnkFilterPeriod = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
6
6
  constructor() {
7
7
  super();
8
8
  this.__registerHost();
9
+ this.valueChanged = createEvent(this, "valueChanged", 7);
9
10
  this.config = undefined;
10
11
  this.value = undefined;
11
12
  }
@@ -14,6 +15,7 @@ const SnkFilterPeriod = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
14
15
  */
15
16
  ezChangeListener(evt) {
16
17
  this.value = evt.detail;
18
+ this.valueChanged.emit(this.value);
17
19
  }
18
20
  /**
19
21
  * Exibe o componente snk-filter-number
@@ -1,276 +1,4 @@
1
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
- import { StringUtils, DataType, ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
3
- import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
4
- import { F as FilterOperand, a as FilterConfigType, b as FilterEntities, c as FilterUserConfigTypes } from './index2.js';
5
-
6
- class PersonalizedFilterUtils {
7
- /**
8
- * Cria uma expressão de filtro a partir de um IExpressionItem.
9
- * @param expressionItem - Objeto com os parâmetros necessários para montar a expressão.
10
- * @returns Retorna a expressão de filtro.
11
- */
12
- static buildFilterExpression(expressionItem) {
13
- if (expressionItem == undefined) {
14
- return;
15
- }
16
- const value = this.buildVariableParameterValue(expressionItem);
17
- let expression = expressionItem.expression || "";
18
- switch (expressionItem.operand) {
19
- case FilterOperand.IN:
20
- expression += ` ${expressionItem.operand} (${value})`;
21
- break;
22
- case FilterOperand.NULL:
23
- case FilterOperand.NOT_NULL:
24
- expression += ` IS ${value}`;
25
- break;
26
- case FilterOperand.LIKE:
27
- expression += ` LIKE '%${value}%'`;
28
- break;
29
- case FilterOperand.START_WITH:
30
- expression += ` LIKE '${value}%'`;
31
- break;
32
- case FilterOperand.FINISHED_WITH:
33
- expression += ` LIKE '%${value}'`;
34
- break;
35
- default:
36
- expression += ` ${expressionItem.operand} ${value}`;
37
- }
38
- return expression;
39
- }
40
- /**
41
- * Obtém o valor do parâmetro a partir de um IExpressionItem.
42
- * @param expressionItem - Objeto com os parâmetros necessários para montar a expressão.
43
- * @returns Retorna o valor do parâmetro.
44
- */
45
- static buildVariableParameterValue(expressionItem) {
46
- if (expressionItem == undefined) {
47
- return;
48
- }
49
- if (expressionItem.systemConfig != undefined) {
50
- const systemConfig = expressionItem.systemConfig;
51
- return `?:{entidade=${systemConfig.entity || ""};campo=${systemConfig.fieldName || ""}}`;
52
- }
53
- if (expressionItem.userConfig != undefined) {
54
- const userConfig = expressionItem.userConfig;
55
- return `?:{desc=${userConfig.description || ""};tipo=${userConfig.type || ""}}`;
56
- }
57
- return `?:{entidade=${expressionItem.entityName || ""};campo=${expressionItem.fieldName || ""}}`;
58
- }
59
- }
60
-
61
- const snkFilterParamConfigCss = ".sc-snk-filter-param-config-h{--snk-filter-param-config__expression--color:var(--title--primary, #2b3a54);display:flex;position:relative}.snk-filter-param-config__expression.sc-snk-filter-param-config{--text-area__input--disabled--color:var(--snk-filter-param-config__expression--color)}";
62
-
63
- const SnkFilterParamConfig$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
64
- constructor() {
65
- super();
66
- this.__registerHost();
67
- this._opened = false;
68
- this._configType = FilterConfigType.SYSTEM_CONFIG;
69
- this._expressionItem = undefined;
70
- this._informedInstance = false;
71
- this._canSave = false;
72
- this.messagesBuilder = undefined;
73
- }
74
- open(expressionItem) {
75
- this._opened = true;
76
- this._expressionItem = expressionItem;
77
- this.loadValues();
78
- return new Promise(accept => {
79
- this._promiseResolver = accept;
80
- });
81
- }
82
- close() {
83
- this._opened = false;
84
- return new Promise(accept => {
85
- this._promiseResolver = accept;
86
- });
87
- }
88
- /**
89
- * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
90
- * através de um pequeno modulo na estrutura da aplicação:
91
- * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
92
- * Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-param-config.msg.ts"
93
- */
94
- getMessage(key, params) {
95
- return this.messagesBuilder.getMessage(key, params);
96
- }
97
- getConfigValue(configName, inputName, inputAlias = "") {
98
- var _a, _b, _c;
99
- return ((_b = (_a = this._expressionItem) === null || _a === void 0 ? void 0 : _a[configName]) === null || _b === void 0 ? void 0 : _b[inputName])
100
- || ((_c = this._expressionItem) === null || _c === void 0 ? void 0 : _c[inputAlias || inputName]);
101
- }
102
- loadValues() {
103
- var _a;
104
- const entityName = this.getConfigValue("systemConfig", "entity", "entityName");
105
- const fieldName = this.getConfigValue("systemConfig", "fieldName");
106
- const description = this.getConfigValue("userConfig", "description");
107
- const type = this.getConfigValue("userConfig", "type");
108
- if (((_a = this._expressionItem) === null || _a === void 0 ? void 0 : _a.userConfig) != undefined) {
109
- this._configType = FilterConfigType.USER_CONFIG;
110
- }
111
- else {
112
- this._configType = FilterConfigType.SYSTEM_CONFIG;
113
- }
114
- if (!StringUtils.isEmpty(entityName) && !StringUtils.isEmpty(fieldName)) {
115
- this._instanceElement.value = { value: entityName, label: "" };
116
- this._fieldElement.value = { value: fieldName, label: "" };
117
- }
118
- if (!StringUtils.isEmpty(description) && !StringUtils.isEmpty(type)) {
119
- this._descriptionElement.value = description;
120
- this._typeElement.value = type;
121
- }
122
- this.buildFilterExpression();
123
- }
124
- changeDefinitionUsed(option) {
125
- this._configType = option !== null && option !== void 0 ? option : FilterConfigType.SYSTEM_CONFIG;
126
- if (this._configType === FilterConfigType.SYSTEM_CONFIG) {
127
- const entityName = this.getConfigValue("systemConfig", "entity", "entityName");
128
- const fieldName = this.getConfigValue("systemConfig", "fieldName");
129
- this._instanceElement.value = this._instanceElement.value || { value: entityName, label: "" };
130
- this._fieldElement.value = this._fieldElement.value || { value: fieldName, label: "" };
131
- }
132
- else if (this._configType === FilterConfigType.USER_CONFIG) {
133
- const description = this.getConfigValue("userConfig", "description");
134
- const type = this.getConfigValue("userConfig", "type");
135
- this._descriptionElement.value = this._descriptionElement.value || description;
136
- this._typeElement.value = this._typeElement.value || type;
137
- }
138
- this.buildFilterExpression();
139
- }
140
- getTypeValue() {
141
- var _a;
142
- const value = (_a = this._typeElement) === null || _a === void 0 ? void 0 : _a.value;
143
- return ((value === null || value === void 0 ? void 0 : value.value) || value);
144
- }
145
- getExpressionValues() {
146
- var _a, _b, _c, _d, _e;
147
- let systemConfig;
148
- let userConfig;
149
- if (this._configType === FilterConfigType.SYSTEM_CONFIG) {
150
- const entity = (_b = (_a = this._instanceElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.value;
151
- const fieldName = (_d = (_c = this._fieldElement) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.value;
152
- systemConfig = { entity, fieldName };
153
- }
154
- else if (this._configType === FilterConfigType.USER_CONFIG) {
155
- const description = (_e = this._descriptionElement) === null || _e === void 0 ? void 0 : _e.value;
156
- const type = this.getTypeValue();
157
- userConfig = { description, type };
158
- }
159
- return Object.assign(Object.assign(Object.assign({}, this._expressionItem), { systemConfig }), { userConfig });
160
- }
161
- isEnabled(value) {
162
- return this._configType === value;
163
- }
164
- isInformedInstance() {
165
- var _a, _b;
166
- return !StringUtils.isEmpty((_b = (_a = this._instanceElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.value);
167
- }
168
- save() {
169
- var _a;
170
- this._expressionItem = Object.assign(Object.assign({}, this.getExpressionValues()), { expression: (_a = this._expressionElement) === null || _a === void 0 ? void 0 : _a.value });
171
- this._promiseResolver(this._expressionItem);
172
- this._opened = false;
173
- }
174
- buildFilterExpression() {
175
- var _a;
176
- this._informedInstance = this.isInformedInstance();
177
- const expression = PersonalizedFilterUtils.buildFilterExpression(this.getExpressionValues());
178
- this._expressionElement.value = expression || ((_a = this._expressionItem) === null || _a === void 0 ? void 0 : _a.expression);
179
- this._canSave = this.getCanSave();
180
- }
181
- handleChangeInstance() {
182
- this._informedInstance = this.isInformedInstance();
183
- if (this._fieldElement != undefined && !StringUtils.isEmpty(this._fieldElement.value)) {
184
- this._fieldElement.value = null;
185
- }
186
- this.buildFilterExpression();
187
- }
188
- getInstanceCriteria() {
189
- var _a, _b;
190
- const value = (_b = (_a = this._instanceElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.value;
191
- return {
192
- expression: "this.NOMETAB = (SELECT NOMETAB FROM TDDINS WHERE NOMEINSTANCIA = ?)",
193
- params: [
194
- {
195
- name: "NOMEINSTANCIA",
196
- dataType: DataType.TEXT,
197
- value
198
- }
199
- ]
200
- };
201
- }
202
- onSearch({ mode, argument }, entity) {
203
- if (this._application == undefined) {
204
- return;
205
- }
206
- const isField = entity === FilterEntities.FIELD;
207
- const criteria = isField ? this.getInstanceCriteria() : undefined;
208
- const messageKey = `snkFilterParamConfig.label${isField ? "Field" : "Instance"}`;
209
- const entityDescription = this.getMessage(messageKey);
210
- const searchOptions = {
211
- descriptionFieldName: isField ? "DESCRCAMPO" : "DESCRINSTANCIA",
212
- codeFieldName: isField ? "NOMECAMPO" : "NOMEINSTANCIA",
213
- showInactives: false
214
- };
215
- const options = {
216
- entity,
217
- entityDescription,
218
- criteria,
219
- searchOptions
220
- };
221
- return this._application.executePreparedSearch(mode, argument, options);
222
- }
223
- getElementID(sufix) {
224
- return {
225
- [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(sufix)
226
- };
227
- }
228
- getCanSave() {
229
- var _a;
230
- if (this._configType === FilterConfigType.USER_CONFIG) {
231
- const description = (_a = this._descriptionElement) === null || _a === void 0 ? void 0 : _a.value;
232
- const type = this.getTypeValue();
233
- return !StringUtils.isEmpty(description) && !StringUtils.isEmpty(type);
234
- }
235
- return true;
236
- }
237
- componentWillLoad() {
238
- this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
239
- }
240
- render() {
241
- ElementIDUtils.addIDInfoIfNotExists(this._element, 'snkFilterParamConfig');
242
- return (h("ez-popup", Object.assign({ useHeader: false, size: "small", heightMode: "auto", opened: this._opened }, this.getElementID("popup")), h("ez-modal-container", Object.assign({ onEzModalAction: (evt) => {
243
- if (evt.detail === ModalAction.CLOSE)
244
- this.close();
245
- }, modalTitle: this.getMessage("snkFilterParamConfig.modalTitle") }, this.getElementID("modalContainer")), h("div", { class: "ez-flex" }, h("div", { class: "ez-col ez-col--sd-6 ez-flex--column" }, h("ez-radio-button", Object.assign({ value: this._configType, onEzChange: (evt) => this.changeDefinitionUsed(evt.detail) }, this.getElementID("systemConfigOption")), h("ez-radio-button-option", { label: this.getMessage("snkFilterParamConfig.labelSystemConfig"), value: FilterConfigType.SYSTEM_CONFIG })), h("ez-search", Object.assign({ ref: (ref) => this._instanceElement = ref, label: this.getMessage("snkFilterParamConfig.labelInstance"), enabled: this.isEnabled(FilterConfigType.SYSTEM_CONFIG), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, onEzChange: () => this.handleChangeInstance(), optionLoader: (searchArgument) => this.onSearch(searchArgument, FilterEntities.INSTANCE) }, this.getElementID("configFindEntity"))), h("ez-search", Object.assign({ ref: (ref) => this._fieldElement = ref, label: this.getMessage("snkFilterParamConfig.labelField"), enabled: this.isEnabled(FilterConfigType.SYSTEM_CONFIG) && this._informedInstance, suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, onEzChange: () => this.buildFilterExpression(), optionLoader: (searchArgument) => this.onSearch(searchArgument, FilterEntities.FIELD) }, this.getElementID("configFindField")))), h("div", { class: "ez-flex ez-padding--medium" }, h("hr", { class: "ez-divider-vertical" })), h("div", { class: "ez-col ez-col--sd-6 ez-flex--column" }, h("ez-radio-button", Object.assign({ value: this._configType, onEzChange: (evt) => this.changeDefinitionUsed(evt.detail) }, this.getElementID("userConfigOption")), h("ez-radio-button-option", { label: this.getMessage("snkFilterParamConfig.labelUserConfig"), value: FilterConfigType.USER_CONFIG })), h("ez-text-input", Object.assign({ ref: (ref) => this._descriptionElement = ref, label: this.getMessage("snkFilterParamConfig.labelDescription"), enabled: this.isEnabled(FilterConfigType.USER_CONFIG), onEzChange: () => this.buildFilterExpression() }, this.getElementID("configParamLabel"))), h("ez-combo-box", Object.assign({ ref: (ref) => this._typeElement = ref, label: this.getMessage("snkFilterParamConfig.labelType"), enabled: this.isEnabled(FilterConfigType.USER_CONFIG), suppressEmptyOption: true, onEzChange: () => this.buildFilterExpression() }, this.getElementID("configParamType")), Object.keys(FilterUserConfigTypes).map((configType) => {
246
- return (h("option", { value: FilterUserConfigTypes[configType] }, this.getMessage(`snkFilterParamConfig.labelTypeValues.${configType.toLowerCase()}`)));
247
- })))), 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"))), h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, h("ez-button", Object.assign({ class: "ez-padding-right--medium", label: this.getMessage("snkFilterParamConfig.labelCancel"), onClick: () => this.close() }, this.getElementID("cancelEditParam"))), h("ez-button", Object.assign({ class: "ez-button--primary", label: this.getMessage("snkFilterParamConfig.labelSave"), onClick: () => this.save(), enabled: this._canSave }, this.getElementID("saveEditParam")))))));
248
- }
249
- get _element() { return this; }
250
- static get style() { return snkFilterParamConfigCss; }
251
- }, [2, "snk-filter-param-config", {
252
- "messagesBuilder": [1040],
253
- "_opened": [32],
254
- "_configType": [32],
255
- "_expressionItem": [32],
256
- "_informedInstance": [32],
257
- "_canSave": [32],
258
- "open": [64],
259
- "close": [64]
260
- }]);
261
- function defineCustomElement$1() {
262
- if (typeof customElements === "undefined") {
263
- return;
264
- }
265
- const components = ["snk-filter-param-config"];
266
- components.forEach(tagName => { switch (tagName) {
267
- case "snk-filter-param-config":
268
- if (!customElements.get(tagName)) {
269
- customElements.define(tagName, SnkFilterParamConfig$1);
270
- }
271
- break;
272
- } });
273
- }
1
+ import { S as SnkFilterParamConfig$1, d as defineCustomElement$1 } from './snk-filter-param-config2.js';
274
2
 
275
3
  const SnkFilterParamConfig = SnkFilterParamConfig$1;
276
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,7 +1,7 @@
1
- import { r as registerInstance, h, g as getElement } from './index-cfd4bb13.js';
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
  import { StringUtils, DataType, ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
3
3
  import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
4
- import { F as FilterOperand, c as FilterConfigType, d as FilterEntities, e as FilterUserConfigTypes } from './index-6519a79e.js';
4
+ import { a as FilterOperand, d as FilterConfigType, e as FilterEntities, F as FilterUserConfigTypes } from './index2.js';
5
5
 
6
6
  class PersonalizedFilterUtils {
7
7
  /**
@@ -58,11 +58,12 @@ class PersonalizedFilterUtils {
58
58
  }
59
59
  }
60
60
 
61
- const snkFilterParamConfigCss = ".sc-snk-filter-param-config-h{--snk-filter-param-config__expression--color:var(--title--primary, #2b3a54);display:flex;position:relative}.snk-filter-param-config__expression.sc-snk-filter-param-config{--text-area__input--disabled--color:var(--snk-filter-param-config__expression--color)}";
61
+ 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)}";
62
62
 
63
- const SnkFilterParamConfig = class {
64
- constructor(hostRef) {
65
- registerInstance(this, hostRef);
63
+ const SnkFilterParamConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
64
+ constructor() {
65
+ super();
66
+ this.__registerHost();
66
67
  this._opened = false;
67
68
  this._configType = FilterConfigType.SYSTEM_CONFIG;
68
69
  this._expressionItem = undefined;
@@ -91,7 +92,8 @@ const SnkFilterParamConfig = class {
91
92
  * Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-param-config.msg.ts"
92
93
  */
93
94
  getMessage(key, params) {
94
- return this.messagesBuilder.getMessage(key, params);
95
+ var _a;
96
+ return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
95
97
  }
96
98
  getConfigValue(configName, inputName, inputAlias = "") {
97
99
  var _a, _b, _c;
@@ -245,8 +247,30 @@ const SnkFilterParamConfig = class {
245
247
  return (h("option", { value: FilterUserConfigTypes[configType] }, this.getMessage(`snkFilterParamConfig.labelTypeValues.${configType.toLowerCase()}`)));
246
248
  })))), 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"))), h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, h("ez-button", Object.assign({ class: "ez-padding-right--medium", label: this.getMessage("snkFilterParamConfig.labelCancel"), onClick: () => this.close() }, this.getElementID("cancelEditParam"))), h("ez-button", Object.assign({ class: "ez-button--primary", label: this.getMessage("snkFilterParamConfig.labelSave"), onClick: () => this.save(), enabled: this._canSave }, this.getElementID("saveEditParam")))))));
247
249
  }
248
- get _element() { return getElement(this); }
249
- };
250
- SnkFilterParamConfig.style = snkFilterParamConfigCss;
250
+ get _element() { return this; }
251
+ static get style() { return snkFilterParamConfigCss; }
252
+ }, [0, "snk-filter-param-config", {
253
+ "messagesBuilder": [1040],
254
+ "_opened": [32],
255
+ "_configType": [32],
256
+ "_expressionItem": [32],
257
+ "_informedInstance": [32],
258
+ "_canSave": [32],
259
+ "open": [64],
260
+ "close": [64]
261
+ }]);
262
+ function defineCustomElement() {
263
+ if (typeof customElements === "undefined") {
264
+ return;
265
+ }
266
+ const components = ["snk-filter-param-config"];
267
+ components.forEach(tagName => { switch (tagName) {
268
+ case "snk-filter-param-config":
269
+ if (!customElements.get(tagName)) {
270
+ customElements.define(tagName, SnkFilterParamConfig);
271
+ }
272
+ break;
273
+ } });
274
+ }
251
275
 
252
- export { SnkFilterParamConfig as snk_filter_param_config };
276
+ export { SnkFilterParamConfig as S, defineCustomElement as d };
@@ -1,13 +1,16 @@
1
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { F as FilterItemType } from './filter-item-type.enum.js';
4
+ import { E as EPresentationMode } from './presentationMode.js';
4
5
 
5
6
  const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
7
  constructor() {
7
8
  super();
8
9
  this.__registerHost();
10
+ this.valueChanged = createEvent(this, "valueChanged", 7);
9
11
  this.config = undefined;
10
12
  this.value = undefined;
13
+ this.presentationMode = EPresentationMode.CHIP;
11
14
  }
12
15
  /**
13
16
  * Emitido quando acontece a alteração de valor do componente snk-filter-period
@@ -16,6 +19,7 @@ const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
16
19
  const start = this._startDate.value;
17
20
  const end = this._endDate.value;
18
21
  this.value = (start || end ? { start, end } : undefined);
22
+ this.valueChanged.emit(this.value);
19
23
  }
20
24
  componentDidLoad() {
21
25
  if (this._element) {
@@ -40,16 +44,22 @@ const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
40
44
  async show() {
41
45
  this._startDate.setFocus();
42
46
  }
47
+ buildLabel() {
48
+ if (this.presentationMode === EPresentationMode.CHIP) {
49
+ return h("label", { class: "ez-text ez-text--medium ez-text--primary ez-margin--medium" }, "at\u00E9");
50
+ }
51
+ }
43
52
  render() {
44
53
  if (!this.config || this.config.type !== FilterItemType.PERIOD) {
45
54
  return undefined;
46
55
  }
47
- return (h("div", { class: "ez-col ez-col--nowrap" }, h("ez-date-input", { id: `${this.config.id}_start`, 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", { id: `${this.config.id}_end`, label: this.config.label, ref: ref => this._endDate = ref, value: this.getDate("end") })));
56
+ return (h("div", { class: "ez-col ez-col--nowrap" }, h("ez-date-input", { id: `${this.config.id}_start`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding--small' : '', label: this.config.label, ref: ref => this._startDate = ref, value: this.getDate("start") }), this.buildLabel(), h("ez-date-input", { id: `${this.config.id}_end`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding--small' : '', label: this.config.label, ref: ref => this._endDate = ref, value: this.getDate("end") })));
48
57
  }
49
58
  get _element() { return this; }
50
59
  }, [0, "snk-filter-period", {
51
60
  "config": [16],
52
61
  "value": [8],
62
+ "presentationMode": [2, "presentation-mode"],
53
63
  "show": [64]
54
64
  }, [[0, "ezChange", "ezChangeListener"]]]);
55
65
  function defineCustomElement$1() {
@@ -1,4 +1,4 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { ElementIDUtils, UserInterface, ApplicationContext } from '@sankhyalabs/core';
3
3
  import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
4
4
  import { CheckMode } from '@sankhyalabs/ezui/dist/collection/utils';
@@ -8,6 +8,7 @@ const SnkFilterPersonalized$1 = /*@__PURE__*/ proxyCustomElement(class extends H
8
8
  constructor() {
9
9
  super();
10
10
  this.__registerHost();
11
+ this.valueChanged = createEvent(this, "valueChanged", 7);
11
12
  this.config = undefined;
12
13
  this.value = undefined;
13
14
  this.fix = undefined;
@@ -39,6 +40,7 @@ const SnkFilterPersonalized$1 = /*@__PURE__*/ proxyCustomElement(class extends H
39
40
  if (this.value.filter(item => item != undefined).length == 0) {
40
41
  this.value = null;
41
42
  }
43
+ this.valueChanged.emit(this.value || []);
42
44
  }
43
45
  doSearch(mode, argument, param) {
44
46
  const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
@@ -1,4 +1,4 @@
1
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
3
3
  import { F as FilterItemType } from './filter-item-type.enum.js';
4
4
 
@@ -6,6 +6,7 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
6
6
  constructor() {
7
7
  super();
8
8
  this.__registerHost();
9
+ this.valueChanged = createEvent(this, "valueChanged", 7);
9
10
  this.config = undefined;
10
11
  this.value = undefined;
11
12
  }
@@ -14,6 +15,7 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
14
15
  */
15
16
  ezChangeListener(_evt) {
16
17
  this.value = this._searchInput.value;
18
+ this.valueChanged.emit(this.value);
17
19
  }
18
20
  componentDidLoad() {
19
21
  if (this._element) {
@@ -1,10 +1,11 @@
1
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { ElementIDUtils } from '@sankhyalabs/core';
3
3
 
4
4
  const SnkFilterText$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
5
5
  constructor() {
6
6
  super();
7
7
  this.__registerHost();
8
+ this.valueChanged = createEvent(this, "valueChanged", 7);
8
9
  this.config = undefined;
9
10
  this.value = undefined;
10
11
  }
@@ -13,6 +14,7 @@ const SnkFilterText$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
13
14
  */
14
15
  ezChangeListener(evt) {
15
16
  this.value = evt.detail;
17
+ this.valueChanged.emit(this.value);
16
18
  }
17
19
  componentDidLoad() {
18
20
  if (this._element) {