@sankhyalabs/sankhyablocks 9.2.0-dev.17 → 9.2.0-dev.19

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 (189) hide show
  1. package/dist/cjs/{ConfigStorage-0ebc800f.js → ConfigStorage-52c38bb9.js} +2 -2
  2. package/dist/cjs/{DataFetcher-602cdc72.js → DataFetcher-9af55840.js} +15 -0
  3. package/dist/cjs/{ISave-18205d86.js → ISave-c4918000.js} +1 -1
  4. package/dist/cjs/{SnkFormConfigManager-4b651537.js → SnkFormConfigManager-cef663d1.js} +2 -2
  5. package/dist/cjs/{ClientSideExporterProvider-bb0b2273.js → SnkMultiSelectionListDataSource-58ded10c.js} +78 -78
  6. package/dist/cjs/{auth-fetcher-82317d4d.js → auth-fetcher-a3a3bb16.js} +1 -1
  7. package/dist/cjs/{dataunit-fetcher-93077a2f.js → dataunit-fetcher-ae454648.js} +1 -1
  8. package/dist/cjs/filter-validate-6993f6f2.js +30 -0
  9. package/dist/cjs/{form-config-fetcher-05d210e7.js → form-config-fetcher-d7bb4f41.js} +1 -1
  10. package/dist/cjs/index-1cf293c1.js +8 -8
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
  13. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  14. package/dist/cjs/snk-actions-button_8.cjs.entry.js +5 -5
  15. package/dist/cjs/snk-application.cjs.entry.js +6 -6
  16. package/dist/cjs/snk-attach.cjs.entry.js +5 -5
  17. package/dist/cjs/snk-crud.cjs.entry.js +5 -5
  18. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
  19. package/dist/cjs/{snk-data-unit-28d629e4.js → snk-data-unit-a59a7ade.js} +2 -2
  20. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  21. package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
  22. package/dist/cjs/snk-entity-list.cjs.entry.js +10 -3
  23. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +164 -100
  24. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +23 -2
  25. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +20 -2
  26. package/dist/cjs/snk-filter-detail.cjs.entry.js +25 -8
  27. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +9 -14
  28. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +16 -3
  29. package/dist/cjs/snk-filter-number.cjs.entry.js +34 -3
  30. package/dist/cjs/snk-filter-period.cjs.entry.js +59 -14
  31. package/dist/cjs/snk-filter-search.cjs.entry.js +14 -3
  32. package/dist/cjs/snk-filter-text.cjs.entry.js +18 -1
  33. package/dist/cjs/snk-form_2.cjs.entry.js +4 -4
  34. package/dist/cjs/snk-grid.cjs.entry.js +38 -21
  35. package/dist/cjs/{snk-guides-viewer-73d40f42.js → snk-guides-viewer-e7c08c71.js} +5 -5
  36. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  37. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  38. package/dist/cjs/snk-pesquisa.cjs.entry.js +4 -4
  39. package/dist/cjs/snk-simple-crud.cjs.entry.js +13 -13
  40. package/dist/collection/components/snk-entity-list/snk-entity-list.js +28 -4
  41. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +72 -2
  42. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +73 -2
  43. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +51 -5
  44. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +83 -3
  45. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +118 -27
  46. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +49 -5
  47. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +71 -1
  48. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +62 -11
  49. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +70 -8
  50. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +0 -4
  51. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +112 -16
  52. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +8 -16
  53. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +106 -52
  54. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
  55. package/dist/collection/components/snk-filter-bar/utils/filter-validate.js +24 -0
  56. package/dist/collection/components/snk-grid/snk-grid.js +89 -11
  57. package/dist/collection/lib/message/resources/en-us/snk-filter-bar.msg.js +1 -0
  58. package/dist/collection/lib/message/resources/en-us/snk-grid.msg.js +4 -0
  59. package/dist/collection/lib/message/resources/es-es/snk-filter-bar.msg.js +1 -0
  60. package/dist/collection/lib/message/resources/es-es/snk-grid.msg.js +4 -0
  61. package/dist/collection/lib/message/resources/pt-br/snk-filter-bar.msg.js +1 -0
  62. package/dist/collection/lib/message/resources/pt-br/snk-grid.msg.js +4 -0
  63. package/dist/components/DataFetcher.js +15 -0
  64. package/dist/components/snk-crud.js +62 -44
  65. package/dist/components/snk-detail-view2.js +89 -56
  66. package/dist/components/snk-entity-list.js +11 -3
  67. package/dist/components/snk-filter-bar2.js +77 -93
  68. package/dist/components/snk-filter-binary-select.js +27 -3
  69. package/dist/components/snk-filter-checkbox-list.js +24 -3
  70. package/dist/components/snk-filter-detail2.js +28 -9
  71. package/dist/components/snk-filter-item2.js +70 -8
  72. package/dist/components/snk-filter-modal-item2.js +7 -12
  73. package/dist/components/snk-filter-modal.js +1 -325
  74. package/dist/components/snk-filter-modal2.js +391 -0
  75. package/dist/components/snk-filter-multi-select.js +19 -4
  76. package/dist/components/snk-filter-number.js +38 -4
  77. package/dist/components/snk-filter-period.js +64 -16
  78. package/dist/components/snk-filter-search.js +17 -4
  79. package/dist/components/snk-filter-text.js +22 -2
  80. package/dist/components/snk-grid2.js +65 -29
  81. package/dist/esm/{ConfigStorage-fc4e3a42.js → ConfigStorage-1e758486.js} +2 -2
  82. package/dist/esm/{DataFetcher-01ce1a4f.js → DataFetcher-2f7ba7ae.js} +15 -0
  83. package/dist/esm/{ISave-d36bade4.js → ISave-4c9742c1.js} +1 -1
  84. package/dist/esm/{SnkFormConfigManager-71dae34e.js → SnkFormConfigManager-d7031fcb.js} +2 -2
  85. package/dist/esm/{ClientSideExporterProvider-21a99af1.js → SnkMultiSelectionListDataSource-eace25fd.js} +83 -83
  86. package/dist/esm/{auth-fetcher-2e565c35.js → auth-fetcher-d8169b9c.js} +1 -1
  87. package/dist/esm/{dataunit-fetcher-14ba162b.js → dataunit-fetcher-1f7a73df.js} +1 -1
  88. package/dist/esm/filter-validate-d765d450.js +27 -0
  89. package/dist/esm/{form-config-fetcher-a1ccc944.js → form-config-fetcher-eb03ac08.js} +1 -1
  90. package/dist/esm/index-479e1293.js +8 -8
  91. package/dist/esm/loader.js +1 -1
  92. package/dist/esm/pesquisa-grid_2.entry.js +4 -4
  93. package/dist/esm/sankhyablocks.js +1 -1
  94. package/dist/esm/snk-actions-button_8.entry.js +5 -5
  95. package/dist/esm/snk-application.entry.js +6 -6
  96. package/dist/esm/snk-attach.entry.js +5 -5
  97. package/dist/esm/snk-crud.entry.js +5 -5
  98. package/dist/esm/snk-data-exporter.entry.js +5 -5
  99. package/dist/esm/{snk-data-unit-3977725e.js → snk-data-unit-a94dd52a.js} +2 -2
  100. package/dist/esm/snk-data-unit.entry.js +3 -3
  101. package/dist/esm/snk-detail-view.entry.js +7 -7
  102. package/dist/esm/snk-entity-list.entry.js +10 -3
  103. package/dist/esm/snk-filter-bar_4.entry.js +165 -101
  104. package/dist/esm/snk-filter-binary-select.entry.js +23 -2
  105. package/dist/esm/snk-filter-checkbox-list.entry.js +20 -2
  106. package/dist/esm/snk-filter-detail.entry.js +25 -8
  107. package/dist/esm/snk-filter-modal-item.entry.js +9 -14
  108. package/dist/esm/snk-filter-multi-select.entry.js +16 -3
  109. package/dist/esm/snk-filter-number.entry.js +34 -3
  110. package/dist/esm/snk-filter-period.entry.js +59 -14
  111. package/dist/esm/snk-filter-search.entry.js +14 -3
  112. package/dist/esm/snk-filter-text.entry.js +18 -1
  113. package/dist/esm/snk-form_2.entry.js +4 -4
  114. package/dist/esm/snk-grid.entry.js +31 -14
  115. package/dist/esm/{snk-guides-viewer-f800c9aa.js → snk-guides-viewer-e716659f.js} +5 -5
  116. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  117. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  118. package/dist/esm/snk-pesquisa.entry.js +4 -4
  119. package/dist/esm/snk-simple-crud.entry.js +8 -8
  120. package/dist/sankhyablocks/p-093f58fa.entry.js +1 -0
  121. package/dist/sankhyablocks/{p-e63cc25f.js → p-0dc071de.js} +1 -1
  122. package/dist/sankhyablocks/{p-f4bf0517.entry.js → p-0f6f2a84.entry.js} +1 -1
  123. package/dist/sankhyablocks/{p-2b2c2718.js → p-1129ded7.js} +1 -1
  124. package/dist/sankhyablocks/p-12cba660.entry.js +1 -0
  125. package/dist/sankhyablocks/{p-51209229.js → p-12db5588.js} +1 -1
  126. package/dist/sankhyablocks/{p-65517fcf.js → p-3d4a3965.js} +1 -1
  127. package/dist/sankhyablocks/p-3ed04f0d.entry.js +1 -0
  128. package/dist/sankhyablocks/{p-b6b42620.entry.js → p-4033a6e3.entry.js} +1 -1
  129. package/dist/sankhyablocks/p-49ddc27a.entry.js +1 -0
  130. package/dist/sankhyablocks/{p-c3eea705.entry.js → p-4a42d004.entry.js} +1 -1
  131. package/dist/sankhyablocks/p-4c763b10.entry.js +1 -0
  132. package/dist/sankhyablocks/p-4eeb06fc.js +1 -0
  133. package/dist/sankhyablocks/{p-dc8bb41f.js → p-552bdfdc.js} +1 -1
  134. package/dist/sankhyablocks/{p-3cdfd7fb.js → p-66e6569e.js} +1 -1
  135. package/dist/sankhyablocks/p-6909c146.entry.js +1 -0
  136. package/dist/sankhyablocks/p-69d0afa4.js +1 -0
  137. package/dist/sankhyablocks/{p-c3bab5f4.js → p-75b80a92.js} +1 -1
  138. package/dist/sankhyablocks/p-7f7fe6c4.entry.js +1 -0
  139. package/dist/sankhyablocks/{p-e5571279.entry.js → p-86009ea5.entry.js} +1 -1
  140. package/dist/sankhyablocks/{p-7b97f9af.entry.js → p-864066bb.entry.js} +1 -1
  141. package/dist/sankhyablocks/p-96d45943.entry.js +1 -0
  142. package/dist/sankhyablocks/{p-34222890.entry.js → p-a0b4c940.entry.js} +1 -1
  143. package/dist/sankhyablocks/{p-a60028f1.entry.js → p-a4be272f.entry.js} +1 -1
  144. package/dist/sankhyablocks/p-ab2ba522.entry.js +1 -0
  145. package/dist/sankhyablocks/p-ac9488fd.entry.js +1 -0
  146. package/dist/sankhyablocks/{p-7a1d3cb6.entry.js → p-b1d8cbf7.entry.js} +1 -1
  147. package/dist/sankhyablocks/{p-7535d592.js → p-b393f1df.js} +1 -1
  148. package/dist/sankhyablocks/{p-dfbe4d7f.entry.js → p-c5d281ad.entry.js} +1 -1
  149. package/dist/sankhyablocks/{p-41e5a485.entry.js → p-c6d8c86b.entry.js} +1 -1
  150. package/dist/sankhyablocks/p-cb4343c4.entry.js +1 -0
  151. package/dist/sankhyablocks/p-d235314c.entry.js +1 -0
  152. package/dist/sankhyablocks/{p-dde9da7a.entry.js → p-d76f1aa5.entry.js} +1 -1
  153. package/dist/sankhyablocks/{p-aba06047.entry.js → p-de58a26f.entry.js} +1 -1
  154. package/dist/sankhyablocks/p-e258de96.entry.js +1 -0
  155. package/dist/sankhyablocks/p-fd8047b8.js +1 -0
  156. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  157. package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +8 -4
  158. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +12 -0
  159. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.d.ts +12 -0
  160. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +12 -4
  161. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +16 -4
  162. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +17 -3
  163. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +10 -2
  164. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +12 -0
  165. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +8 -3
  166. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +27 -4
  167. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +17 -3
  168. package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +2 -3
  169. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +15 -2
  170. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +4 -2
  171. package/dist/types/components/snk-filter-bar/utils/filter-validate.d.ts +11 -0
  172. package/dist/types/components/snk-grid/snk-grid.d.ts +21 -8
  173. package/dist/types/components.d.ts +202 -17
  174. package/package.json +1 -1
  175. package/dist/sankhyablocks/p-07b14811.entry.js +0 -1
  176. package/dist/sankhyablocks/p-082e7ba8.entry.js +0 -1
  177. package/dist/sankhyablocks/p-25209340.entry.js +0 -1
  178. package/dist/sankhyablocks/p-295b83ae.entry.js +0 -1
  179. package/dist/sankhyablocks/p-3143bb44.entry.js +0 -1
  180. package/dist/sankhyablocks/p-353b4a74.js +0 -1
  181. package/dist/sankhyablocks/p-398cdd67.entry.js +0 -1
  182. package/dist/sankhyablocks/p-5bab470d.entry.js +0 -1
  183. package/dist/sankhyablocks/p-9fd87bfd.entry.js +0 -1
  184. package/dist/sankhyablocks/p-a76e6d51.entry.js +0 -1
  185. package/dist/sankhyablocks/p-ae2ebab7.js +0 -1
  186. package/dist/sankhyablocks/p-b21aa190.entry.js +0 -1
  187. package/dist/sankhyablocks/p-c6a8a8bc.entry.js +0 -1
  188. package/dist/sankhyablocks/p-c8932b14.entry.js +0 -1
  189. package/dist/sankhyablocks/p-dff65083.entry.js +0 -1
@@ -2,18 +2,20 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
2
2
  import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext, LockManager, LockManagerOperation } from '@sankhyalabs/core';
3
3
  import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
4
4
  import { C as ConfigStorage } from './ConfigStorage.js';
5
+ import { a as FilterOperand, P as PersonalizedFilterUtils } from './PersonalizedFilterUtils.js';
5
6
  import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
6
7
  import { F as FilterItemType } from './filter-item-type.enum.js';
7
- import { a as FilterOperand, P as PersonalizedFilterUtils } from './PersonalizedFilterUtils.js';
8
8
  import { F as FilterNumberVariation } from './filterNumberVariation.js';
9
- import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
10
- import { d as defineCustomElement$a } from './snk-expression-group2.js';
11
- import { d as defineCustomElement$9 } from './snk-expression-item2.js';
12
- import { d as defineCustomElement$8 } from './snk-filter-advanced-mode2.js';
13
- import { d as defineCustomElement$7 } from './snk-filter-assistent-mode2.js';
14
- import { d as defineCustomElement$6 } from './snk-filter-detail2.js';
15
- import { d as defineCustomElement$5 } from './snk-filter-field-search2.js';
16
- import { d as defineCustomElement$4 } from './snk-filter-item2.js';
9
+ import { d as defineCustomElement$d } from './snk-default-filter2.js';
10
+ import { d as defineCustomElement$c } from './snk-expression-group2.js';
11
+ import { d as defineCustomElement$b } from './snk-expression-item2.js';
12
+ import { d as defineCustomElement$a } from './snk-filter-advanced-mode2.js';
13
+ import { d as defineCustomElement$9 } from './snk-filter-assistent-mode2.js';
14
+ import { d as defineCustomElement$8 } from './snk-filter-detail2.js';
15
+ import { d as defineCustomElement$7 } from './snk-filter-field-search2.js';
16
+ import { d as defineCustomElement$6 } from './snk-filter-item2.js';
17
+ import { d as defineCustomElement$5 } from './snk-filter-modal2.js';
18
+ import { d as defineCustomElement$4 } from './snk-filter-modal-item2.js';
17
19
  import { d as defineCustomElement$3 } from './snk-filter-param-config2.js';
18
20
  import { d as defineCustomElement$2 } from './snk-personalized-filter2.js';
19
21
  import { d as defineCustomElement$1 } from './snk-simple-bar2.js';
@@ -208,51 +210,6 @@ function buildPersonalized(item) {
208
210
  return { name: id, expression, params };
209
211
  }
210
212
 
211
- class SnkFilterModalFactory {
212
- constructor({ filterConfig, configName, onComplete, getMessage, disablePersonalizedFilter, onAddPersonalizedFilter, onEditPersonalizedFilter, onDeletePersonalizedFilter }) {
213
- this._filterConfig = filterConfig;
214
- this._configName = configName;
215
- this._onComplete = onComplete;
216
- this._getMessage = getMessage;
217
- this._disablePersonalizedFilter = disablePersonalizedFilter;
218
- this._addPersonalizedFilterFn = onAddPersonalizedFilter;
219
- this._editPersonalizedFilterFn = onEditPersonalizedFilter;
220
- this._onDeletePersonalizedFilter = onDeletePersonalizedFilter;
221
- }
222
- applyFilters(newFilterConfig) {
223
- this._onComplete(newFilterConfig);
224
- this._closeModal();
225
- }
226
- buildFilterModal() {
227
- const filterModal = document.createElement("snk-filter-modal");
228
- filterModal.className = "ez-size-height--full";
229
- filterModal.filters = this._filterConfig;
230
- filterModal.configName = this._configName;
231
- filterModal.disablePersonalizedFilter = this._disablePersonalizedFilter;
232
- filterModal.getMessage = this._getMessage.bind(this);
233
- filterModal.applyFilters = this.applyFilters.bind(this);
234
- filterModal.closeModal = () => this._closeModal();
235
- filterModal.addPersonalizedFilter = (isDefault) => this._addPersonalizedFilterFn(isDefault);
236
- filterModal.editPersonalizedFilter = (id, isDefault) => this._editPersonalizedFilterFn(id, isDefault);
237
- filterModal.deletePersonalizedFilter = (filter, configName, isDefault) => this._onDeletePersonalizedFilter(filter, configName, isDefault);
238
- return filterModal;
239
- }
240
- async showModal() {
241
- const filterModal = this.buildFilterModal();
242
- const modalProps = {
243
- content: filterModal,
244
- position: 'right',
245
- heightMode: 'full',
246
- closeOutsideClick: false,
247
- useScrimLight: true
248
- };
249
- this._closeModal = await ApplicationUtils.showModal(modalProps);
250
- }
251
- async closeModal() {
252
- this._closeModal();
253
- }
254
- }
255
-
256
213
  const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:12px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{width:0px;height:0px}[data-mode=\"button\"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small);height:80%}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-items:start;margin:var(--space--2, 2px) 0}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
257
214
 
258
215
  const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
@@ -294,10 +251,13 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
294
251
  this.filterBarLegacyConfigName = undefined;
295
252
  this.autoLoad = undefined;
296
253
  this.afterApplyConfig = undefined;
254
+ this.filterCustomConfig = undefined;
255
+ this.filterCustomConfigInterceptor = undefined;
297
256
  this.allowDefault = undefined;
298
257
  this.scrollerLocked = false;
299
258
  this.showPersonalizedFilter = false;
300
259
  this.personalizedFilterId = undefined;
260
+ this.isFilterModalOpen = false;
301
261
  }
302
262
  hasValidValue(item) {
303
263
  if (item.value === undefined || item.value === null)
@@ -445,7 +405,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
445
405
  return;
446
406
  }
447
407
  this._loadingPending = false;
448
- this.doLoadData(this.dataUnit.getLastLoadRequest() != undefined);
408
+ this.doLoadData();
449
409
  }
450
410
  if (this._configUpdated) {
451
411
  this._configUpdated = false;
@@ -544,11 +504,11 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
544
504
  const unpinnedItems = [];
545
505
  this.filterConfig.sort((a, b) => this._filtersComparator(a, b))
546
506
  .filter(this.filterActiveFilter)
547
- .forEach((item, index) => {
507
+ .forEach((item) => {
548
508
  item = ObjectUtils.copy(item);
549
509
  const itemId = `filter-${item.id}`;
550
- const filterItem = (h("snk-filter-item", { onVisibleChanged: (evt) => this.scrollerLocked = evt.detail, onFilterChange: (event) => this.updateFilter(event.detail), onFocusin: () => this.itemFocused(itemId), id: itemId, config: item, class: index > 0 ? "ez-padding-left--medium" : "", getMessage: (key, props) => this.getMessage(key, props), key: item.id }));
551
- if (item.fixed || item.hardFixed) {
510
+ const filterItem = (h("snk-filter-item", { onVisibleChanged: (evt) => this.scrollerLocked = evt.detail, onFilterChange: (event) => this.updateFilter(event.detail), onFocusin: () => this.itemFocused(itemId), id: itemId, config: item, class: "ez-margin-horizontal--extra-small", getMessage: (key, props) => this.getMessage(key, props), key: item.id }));
511
+ if (item.fixed || item.hardFixed || item.required) {
552
512
  pinnedItems.push(filterItem);
553
513
  }
554
514
  else {
@@ -557,9 +517,9 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
557
517
  return filterItem;
558
518
  });
559
519
  const elements = [];
560
- elements.push(...pinnedItems);
520
+ elements.push(...pinnedItems.reverse());
561
521
  if (pinnedItems.length > 0 && unpinnedItems.length > 0) {
562
- elements.push(h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-filter-bar__divider" }));
522
+ elements.push(h("hr", { class: "ez-margin-horizontal--small ez-margin-vertical--auto ez-divider-vertical ez-divider--dark snk-filter-bar__divider" }));
563
523
  }
564
524
  elements.push(...unpinnedItems);
565
525
  return elements;
@@ -584,7 +544,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
584
544
  return normalized;
585
545
  }
586
546
  updateFilter(newItem) {
587
- this.filterConfig = this.filterConfig.map(item => {
547
+ let config = this.filterConfig.map(item => {
588
548
  newItem = this.normalizeItem(newItem);
589
549
  if (item.id === newItem.id) {
590
550
  if (ObjectUtils.objectToString(item) != ObjectUtils.objectToString(newItem)) {
@@ -594,6 +554,10 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
594
554
  }
595
555
  return item;
596
556
  }).sort((a, b) => this._filtersComparator(a, b));
557
+ if (this.filterCustomConfigInterceptor) {
558
+ config = this.filterCustomConfigInterceptor(config);
559
+ }
560
+ this.filterConfig = config;
597
561
  }
598
562
  loadPermitions() {
599
563
  this._application.isUserSup().then(value => this.allowDefault = value);
@@ -615,6 +579,12 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
615
579
  else {
616
580
  config = await ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name });
617
581
  }
582
+ if (this.filterCustomConfig) {
583
+ config = [...this.filterCustomConfig, ...config];
584
+ }
585
+ if (this.filterCustomConfigInterceptor) {
586
+ config = this.filterCustomConfigInterceptor(config);
587
+ }
618
588
  this.filterConfig = config.map(item => this.normalizeItem(item));
619
589
  this.filterConfig.sort((a, b) => this._filtersComparator(a, b));
620
590
  }
@@ -658,30 +628,13 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
658
628
  * @async
659
629
  */
660
630
  async showFilterModal() {
661
- const callbackOnApplyFilter = (filters) => {
662
- var _a;
663
- this.filterConfig = filters.map(this.normalizeItem).sort((a, b) => this._filtersComparator(a, b));
664
- (_a = this.afterApplyConfig) === null || _a === void 0 ? void 0 : _a.call(this);
665
- };
666
- let filtersConfigCopy = ObjectUtils.copy(this.filterConfig);
667
- filtersConfigCopy = filtersConfigCopy.sort((itemA, itemB) => {
668
- return itemA.originOrder - itemB.originOrder;
669
- });
670
- const factoryParams = {
671
- filterConfig: filtersConfigCopy,
672
- configName: this.configName,
673
- onComplete: callbackOnApplyFilter,
674
- disablePersonalizedFilter: this.disablePersonalizedFilter,
675
- getMessage: (key, props) => this.getMessage(key, props),
676
- onAddPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault),
677
- onEditPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault),
678
- onDeletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName, isDefault),
679
- };
680
- this._filterModalFactory = new SnkFilterModalFactory(factoryParams);
681
- await this._filterModalFactory.showModal();
631
+ if (this.isFilterModalOpen) {
632
+ return; // Evita abrir múltiplos modais
633
+ }
634
+ this.isFilterModalOpen = true;
682
635
  }
683
636
  addPersonalizedFilter(isDefault = false) {
684
- this._filterModalFactory.closeModal();
637
+ this.isFilterModalOpen = false;
685
638
  this._isDefaultFilter = isDefault;
686
639
  this.personalizedFilterId = undefined;
687
640
  this.showPersonalizedFilter = true;
@@ -690,7 +643,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
690
643
  });
691
644
  }
692
645
  editPersonalizedFilter(id, isDefault = false) {
693
- this._filterModalFactory.closeModal();
646
+ this.isFilterModalOpen = false;
694
647
  this._isDefaultFilter = isDefault;
695
648
  this.showPersonalizedFilter = true;
696
649
  this.personalizedFilterId = id;
@@ -705,6 +658,15 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
705
658
  ConfigStorage.removePersonalizedFilter(filter, this.resourceID, configName);
706
659
  }
707
660
  }
661
+ closeFilterModal() {
662
+ this.isFilterModalOpen = false;
663
+ }
664
+ applyFiltersFromModal(filters) {
665
+ var _a;
666
+ this.filterConfig = filters.map(this.normalizeItem).sort((a, b) => this._filtersComparator(a, b));
667
+ (_a = this.afterApplyConfig) === null || _a === void 0 ? void 0 : _a.call(this);
668
+ this.isFilterModalOpen = false;
669
+ }
708
670
  handleHidePersonalizedFilter(reloadFilterBar) {
709
671
  if (reloadFilterBar) {
710
672
  this.loadConfigFromStorage().then(() => {
@@ -751,10 +713,14 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
751
713
  if (this.showPersonalizedFilter) {
752
714
  return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, isDefaultFilter: this._isDefaultFilter, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
753
715
  }
716
+ let filtersConfigCopy = ObjectUtils.copy(this.filterConfig);
717
+ filtersConfigCopy = filtersConfigCopy.sort((itemA, itemB) => {
718
+ return itemA.originOrder - itemB.originOrder;
719
+ });
754
720
  if (this.mode !== "regular") {
755
- return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) }))));
721
+ return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) })), h("snk-filter-modal", { opened: this.isFilterModalOpen, filterConfig: this.filterConfig, configName: this.configName, disablePersonalizedFilter: this.disablePersonalizedFilter, getMessage: (key, props) => this.getMessage(key, props), applyFilters: (filters) => this.applyFiltersFromModal(filters), closeModal: () => this.closeFilterModal(), addPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault), editPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault), deletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName, isDefault), filterCustomConfigInterceptor: this.filterCustomConfigInterceptor })));
756
722
  }
757
- return (h(Host, null, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium ez-margin-top--extra-small", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
723
+ return (h(Host, null, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium ez-margin-top--extra-small", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" })), h("snk-filter-modal", { opened: this.isFilterModalOpen, filterConfig: this.filterConfig, configName: this.configName, disablePersonalizedFilter: this.disablePersonalizedFilter, getMessage: (key, props) => this.getMessage(key, props), applyFilters: (filters) => this.applyFiltersFromModal(filters), closeModal: () => this.closeFilterModal(), addPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault), editPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault), deletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName, isDefault), filterCustomConfigInterceptor: this.filterCustomConfigInterceptor })));
758
724
  }
759
725
  get _element() { return this; }
760
726
  static get watchers() { return {
@@ -775,10 +741,13 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
775
741
  "filterBarLegacyConfigName": [1, "filter-bar-legacy-config-name"],
776
742
  "autoLoad": [4, "auto-load"],
777
743
  "afterApplyConfig": [16],
744
+ "filterCustomConfig": [16],
745
+ "filterCustomConfigInterceptor": [16],
778
746
  "allowDefault": [32],
779
747
  "scrollerLocked": [32],
780
748
  "showPersonalizedFilter": [32],
781
749
  "personalizedFilterId": [32],
750
+ "isFilterModalOpen": [32],
782
751
  "reload": [64],
783
752
  "getFilterItem": [64],
784
753
  "updateFilterItem": [64],
@@ -791,44 +760,59 @@ function defineCustomElement() {
791
760
  if (typeof customElements === "undefined") {
792
761
  return;
793
762
  }
794
- const components = ["snk-filter-bar", "snk-expression-group", "snk-expression-item", "snk-filter-advanced-mode", "snk-filter-assistent-mode", "snk-filter-detail", "snk-filter-field-search", "snk-filter-item", "snk-filter-param-config", "snk-personalized-filter", "snk-simple-bar"];
763
+ const components = ["snk-filter-bar", "snk-default-filter", "snk-expression-group", "snk-expression-item", "snk-filter-advanced-mode", "snk-filter-assistent-mode", "snk-filter-detail", "snk-filter-field-search", "snk-filter-item", "snk-filter-modal", "snk-filter-modal-item", "snk-filter-param-config", "snk-personalized-filter", "snk-simple-bar"];
795
764
  components.forEach(tagName => { switch (tagName) {
796
765
  case "snk-filter-bar":
797
766
  if (!customElements.get(tagName)) {
798
767
  customElements.define(tagName, SnkFilterBar);
799
768
  }
800
769
  break;
770
+ case "snk-default-filter":
771
+ if (!customElements.get(tagName)) {
772
+ defineCustomElement$d();
773
+ }
774
+ break;
801
775
  case "snk-expression-group":
802
776
  if (!customElements.get(tagName)) {
803
- defineCustomElement$a();
777
+ defineCustomElement$c();
804
778
  }
805
779
  break;
806
780
  case "snk-expression-item":
807
781
  if (!customElements.get(tagName)) {
808
- defineCustomElement$9();
782
+ defineCustomElement$b();
809
783
  }
810
784
  break;
811
785
  case "snk-filter-advanced-mode":
812
786
  if (!customElements.get(tagName)) {
813
- defineCustomElement$8();
787
+ defineCustomElement$a();
814
788
  }
815
789
  break;
816
790
  case "snk-filter-assistent-mode":
817
791
  if (!customElements.get(tagName)) {
818
- defineCustomElement$7();
792
+ defineCustomElement$9();
819
793
  }
820
794
  break;
821
795
  case "snk-filter-detail":
822
796
  if (!customElements.get(tagName)) {
823
- defineCustomElement$6();
797
+ defineCustomElement$8();
824
798
  }
825
799
  break;
826
800
  case "snk-filter-field-search":
827
801
  if (!customElements.get(tagName)) {
828
- defineCustomElement$5();
802
+ defineCustomElement$7();
829
803
  }
830
804
  break;
831
805
  case "snk-filter-item":
806
+ if (!customElements.get(tagName)) {
807
+ defineCustomElement$6();
808
+ }
809
+ break;
810
+ case "snk-filter-modal":
811
+ if (!customElements.get(tagName)) {
812
+ defineCustomElement$5();
813
+ }
814
+ break;
815
+ case "snk-filter-modal-item":
832
816
  if (!customElements.get(tagName)) {
833
817
  defineCustomElement$4();
834
818
  }
@@ -13,6 +13,7 @@ const SnkFilterBinarySelect$1 = /*@__PURE__*/ proxyCustomElement(class extends H
13
13
  this.value = undefined;
14
14
  this.config = undefined;
15
15
  this.presentationMode = EPresentationMode.CHIP;
16
+ this.errorMessage = undefined;
16
17
  }
17
18
  isSelected(option) {
18
19
  return this.value == undefined || this.value === option;
@@ -21,6 +22,7 @@ const SnkFilterBinarySelect$1 = /*@__PURE__*/ proxyCustomElement(class extends H
21
22
  * Emitido quando acontece a alteração de valor do componente snk-filter-binary-select
22
23
  */
23
24
  ezChangeListener(evt) {
25
+ this.errorMessage = undefined;
24
26
  if (this.presentationMode === EPresentationMode.MODAL) {
25
27
  if (!evt.detail) {
26
28
  this.assertCheckedOption(evt.target);
@@ -37,6 +39,23 @@ const SnkFilterBinarySelect$1 = /*@__PURE__*/ proxyCustomElement(class extends H
37
39
  async resetValues() {
38
40
  this.ezChangeListener({ detail: this._noOptionValue });
39
41
  }
42
+ /**
43
+ * Limpa o valor do componente restaurando o valor original da configuração.
44
+ */
45
+ async clearValue() {
46
+ this.value = this.config.value;
47
+ this._radioButtonValue = this.value || this._noOptionValue;
48
+ }
49
+ /**
50
+ * Define o foco no componente snk-filter-binary-select.
51
+ */
52
+ async setFocus() {
53
+ if (this.presentationMode === EPresentationMode.MODAL) {
54
+ this._checkOne.setFocus();
55
+ return;
56
+ }
57
+ this._element.querySelector('ez-radio-button').focus();
58
+ }
40
59
  assertCheckedOption(updatingCheck) {
41
60
  if (updatingCheck === this._checkOne) {
42
61
  this._checkTwo.value = true;
@@ -78,16 +97,21 @@ const SnkFilterBinarySelect$1 = /*@__PURE__*/ proxyCustomElement(class extends H
78
97
  }
79
98
  const [optOne, optTwo] = this.config.props.options;
80
99
  if (this.presentationMode === EPresentationMode.MODAL) {
81
- return (h(Host, null, h("div", { class: "ez-row ez-size-height--full" }, h("label", { class: "ez-text ez-title--small ez-title--primary ez-size-height--full ez-flex ez-flex--row ez-flex--align-items-center ez-col ez-col--sd-4" }, this.config.detailModal), h("div", { class: "ez-col ez-col--sd-4" }, h("ez-check", { ref: (ref) => this._checkOne = ref, id: `${this.config.id}_${optOne.name || "option1"}`, class: "sc-snk-filter-bar editor__ez-check", label: optOne.label, value: this.isSelected(optOne.name) })), h("div", { class: "ez-col ez-col--sd-4" }, h("ez-check", { ref: (ref) => this._checkTwo = ref, id: `${this.config.id}_${optTwo.name || "option2"}`, class: "sc-snk-filter-bar editor__ez-check", label: optTwo.label, value: this.isSelected(optTwo.name) })))));
100
+ return (h(Host, null, h("div", { class: "ez-row ez-size-height--full" }, h("label", { class: "ez-text ez-title--small ez-title--primary ez-size-height--full ez-flex ez-flex--row ez-flex--align-items-center ez-col ez-col--sd-4" }, this.config.detailModal), h("div", { class: "ez-col ez-col--sd-4" }, h("ez-check", { ref: (ref) => this._checkOne = ref, id: `${this.config.id}_${optOne.name || "option1"}`, class: "sc-snk-filter-bar editor__ez-check", label: optOne.label, enabled: this.config.enabled, value: this.isSelected(optOne.name) })), h("div", { class: "ez-col ez-col--sd-4" }, h("ez-check", { ref: (ref) => this._checkTwo = ref, id: `${this.config.id}_${optTwo.name || "option2"}`, class: "sc-snk-filter-bar editor__ez-check", label: optTwo.label, enabled: this.config.enabled, value: this.isSelected(optTwo.name) })), this.errorMessage &&
101
+ h("span", { class: 'ez-text ez-text--small ez-text--error ez-margin--small' }, this.errorMessage))));
82
102
  }
83
- return (h(Host, null, h("ez-radio-button", { value: this._radioButtonValue }, h("ez-radio-button-option", { id: `${this.config.id}_${optOne.name || "option1"}`, class: "sc-snk-filter-bar editor__ez-check", label: optOne.label, value: optOne.name }), h("ez-radio-button-option", { id: `${this.config.id}_${optTwo.name || "option2"}`, class: "sc-snk-filter-bar editor__ez-check", label: optTwo.label, value: optTwo.name }), h("ez-radio-button-option", { id: `${this.config.id}_option3`, class: "sc-snk-filter-bar editor__ez-check", label: `${optOne.label} + ${optTwo.label}`, value: this._noOptionValue }))));
103
+ return (h(Host, null, h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-radio-button", { value: this._radioButtonValue }, h("ez-radio-button-option", { id: `${this.config.id}_${optOne.name || "option1"}`, class: "sc-snk-filter-bar editor__ez-check", label: optOne.label, value: optOne.name }), h("ez-radio-button-option", { id: `${this.config.id}_${optTwo.name || "option2"}`, class: "sc-snk-filter-bar editor__ez-check", label: optTwo.label, value: optTwo.name }), h("ez-radio-button-option", { id: `${this.config.id}_option3`, class: "sc-snk-filter-bar editor__ez-check", label: `${optOne.label} + ${optTwo.label}`, value: this._noOptionValue })), this.errorMessage &&
104
+ h("span", { class: 'ez-text ez-text--small ez-text--error ez-margin--small' }, this.errorMessage))));
84
105
  }
85
106
  get _element() { return this; }
86
107
  }, [0, "snk-filter-binary-select", {
87
108
  "value": [1544],
88
109
  "config": [16],
89
110
  "presentationMode": [2, "presentation-mode"],
90
- "resetValues": [64]
111
+ "errorMessage": [1537, "error-message"],
112
+ "resetValues": [64],
113
+ "clearValue": [64],
114
+ "setFocus": [64]
91
115
  }, [[0, "ezChange", "ezChangeListener"]]]);
92
116
  function defineCustomElement$1() {
93
117
  if (typeof customElements === "undefined") {
@@ -8,8 +8,24 @@ const SnkFilterCheckboxList$1 = /*@__PURE__*/ proxyCustomElement(class extends H
8
8
  this.__registerHost();
9
9
  this.valueChanged = createEvent(this, "valueChanged", 7);
10
10
  this.config = undefined;
11
+ this.errorMessage = undefined;
11
12
  this.optionsList = [];
12
13
  }
14
+ /**
15
+ * Define o foco no componente snk-filter-checkbox-list.
16
+ */
17
+ async setFocus() {
18
+ var _a, _b;
19
+ (_b = (_a = this._element) === null || _a === void 0 ? void 0 : _a.querySelector('ez-check')) === null || _b === void 0 ? void 0 : _b.setFocus();
20
+ }
21
+ /**
22
+ * Limpa o valor do componente restaurando o valor original da configuração.
23
+ */
24
+ async clearValue() {
25
+ var _a;
26
+ this.config = Object.assign(Object.assign({}, this.config), { value: this.config.value });
27
+ this.valueChanged.emit((_a = this.config) === null || _a === void 0 ? void 0 : _a.value);
28
+ }
13
29
  componentDidLoad() {
14
30
  if (this._element) {
15
31
  ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
@@ -17,13 +33,14 @@ const SnkFilterCheckboxList$1 = /*@__PURE__*/ proxyCustomElement(class extends H
17
33
  }
18
34
  handleToggleCheck(itemChanged, checked) {
19
35
  var _a, _b;
36
+ this.errorMessage = undefined;
20
37
  let configValueMap = (_a = this.config.value) !== null && _a !== void 0 ? _a : {};
21
38
  configValueMap[itemChanged.name] = checked;
22
39
  this.config = Object.assign(Object.assign({}, this.config), { value: configValueMap });
23
40
  this.valueChanged.emit((_b = this.config) === null || _b === void 0 ? void 0 : _b.value);
24
41
  }
25
42
  renderOptions() {
26
- return this.optionsList.map(option => (h("ez-check", { label: option.label, onEzChange: (event) => this.handleToggleCheck(option, event.detail), value: !!this.isChecked(option.name) })));
43
+ return this.optionsList.map(option => (h("ez-check", { label: option.label, onEzChange: (event) => this.handleToggleCheck(option, event.detail), value: !!this.isChecked(option.name), enabled: this.config.enabled })));
27
44
  }
28
45
  isChecked(itemName) {
29
46
  var _a;
@@ -41,12 +58,16 @@ const SnkFilterCheckboxList$1 = /*@__PURE__*/ proxyCustomElement(class extends H
41
58
  if (!this.config || this.config.type !== FilterItemType.CHECK_BOX_LIST) {
42
59
  return undefined;
43
60
  }
44
- return (h("div", { class: 'ez-flex ez-flex--column' }, this.renderOptions()));
61
+ return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("div", { class: 'ez-flex ez-flex--column' }, this.renderOptions(), this.errorMessage &&
62
+ h("span", { class: 'ez-text ez-text--small ez-text--error ez-margin--small' }, this.errorMessage))));
45
63
  }
46
64
  get _element() { return this; }
47
65
  }, [0, "snk-filter-checkbox-list", {
48
66
  "config": [1040],
49
- "optionsList": [32]
67
+ "errorMessage": [1537, "error-message"],
68
+ "optionsList": [32],
69
+ "setFocus": [64],
70
+ "clearValue": [64]
50
71
  }]);
51
72
  function defineCustomElement$1() {
52
73
  if (typeof customElements === "undefined") {
@@ -1,9 +1,9 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
2
- import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
3
- import { F as FilterItemType } from './filter-item-type.enum.js';
4
2
  import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
5
- import { E as EPresentationMode } from './presentationMode.js';
3
+ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
6
4
  import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils.js';
5
+ import { E as EPresentationMode } from './presentationMode.js';
6
+ import { F as FilterItemType } from './filter-item-type.enum.js';
7
7
 
8
8
  const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
9
9
  constructor() {
@@ -13,13 +13,30 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
13
13
  this.config = undefined;
14
14
  this.getMessage = undefined;
15
15
  this.showHardFixed = true;
16
+ this.removalBlocked = false;
16
17
  }
17
18
  /**
18
- * Exibe o componente snk-filter-detail.
19
+ * Define o foco no campo do editor.
19
20
  */
20
- async show() {
21
- var _a, _b;
22
- (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a["show"]) === null || _b === void 0 ? void 0 : _b.call(_a);
21
+ async setFocusField() {
22
+ var _a, _b, _c, _d;
23
+ if (!this._editor) {
24
+ return;
25
+ }
26
+ if (this._editor["setFocus"]) {
27
+ (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a["setFocus"]) === null || _b === void 0 ? void 0 : _b.call(_a);
28
+ }
29
+ else if (this._editor["focus"]) {
30
+ (_d = (_c = this._editor) === null || _c === void 0 ? void 0 : _c["focus"]) === null || _d === void 0 ? void 0 : _d.call(_c);
31
+ }
32
+ }
33
+ async clearValue() {
34
+ if (!this._editor) {
35
+ return;
36
+ }
37
+ if (this._editor["clearValue"]) {
38
+ await this._editor["clearValue"]();
39
+ }
23
40
  }
24
41
  observeConfig(newValue) {
25
42
  var _a, _b;
@@ -91,7 +108,7 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
91
108
  return Object.assign(Object.assign({}, item), { visible: false, fixed: false, value: undefined });
92
109
  }
93
110
  getPopUpHeaderButtons() {
94
- return (h(Fragment, null, !this.config.removalBlocked &&
111
+ return (h(Fragment, null, !this.removalBlocked && !this.config.removalBlocked &&
95
112
  this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), this.showHardFixed && !this.config.hardFixed &&
96
113
  this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))));
97
114
  }
@@ -176,7 +193,9 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
176
193
  "config": [1040],
177
194
  "getMessage": [16],
178
195
  "showHardFixed": [4, "show-hard-fixed"],
179
- "show": [64]
196
+ "removalBlocked": [4, "removal-blocked"],
197
+ "setFocusField": [64],
198
+ "clearValue": [64]
180
199
  }]);
181
200
  function defineCustomElement() {
182
201
  if (typeof customElements === "undefined") {