@sankhyalabs/sankhyablocks 10.1.0-dev.37 → 10.1.0-dev.39

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 (225) hide show
  1. package/dist/cjs/{ConfigStorage-e384fb7b.js → ConfigStorage-a1fab5ca.js} +2 -2
  2. package/dist/cjs/ContinuousInsertUtils-1ae0c6ac.js +41 -0
  3. package/dist/cjs/{DataFetcher-3a8ea521.js → DataFetcher-384d2ce8.js} +1 -1
  4. package/dist/cjs/{ISave-a66bb65e.js → ISave-ecbe9336.js} +1 -1
  5. package/dist/cjs/{ImageUtils-5e3f406b.js → ImageUtils-c46f2d11.js} +1 -1
  6. package/dist/cjs/{SnkFormConfigManager-73df0f8b.js → SnkFormConfigManager-44386305.js} +2 -2
  7. package/dist/cjs/{SnkMessageBuilder-d9558dba.js → SnkMessageBuilder-a9300ebe.js} +24 -0
  8. package/dist/cjs/{SnkMultiSelectionListDataSource-016393f3.js → SnkMultiSelectionListDataSource-b951ed91.js} +61 -47
  9. package/dist/cjs/{auth-fetcher-80e608b0.js → auth-fetcher-6b134ec4.js} +1 -1
  10. package/dist/cjs/{dataunit-fetcher-6febd6c4.js → dataunit-fetcher-93f53260.js} +2 -2
  11. package/dist/cjs/{form-config-fetcher-81cbd405.js → form-config-fetcher-45d1964c.js} +1 -1
  12. package/dist/cjs/index-1894343a.js +8 -8
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -5
  15. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  16. package/dist/cjs/{snk-actions-button_8.cjs.entry.js → snk-actions-button_9.cjs.entry.js} +52 -12
  17. package/dist/cjs/snk-application.cjs.entry.js +7 -7
  18. package/dist/cjs/snk-attach.cjs.entry.js +50 -24
  19. package/dist/cjs/snk-crud.cjs.entry.js +344 -109
  20. package/dist/cjs/snk-data-exporter.cjs.entry.js +8 -7
  21. package/dist/cjs/{snk-data-unit-94757628.js → snk-data-unit-6abc5efc.js} +2 -2
  22. package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
  23. package/dist/cjs/snk-detail-view.cjs.entry.js +11 -16
  24. package/dist/cjs/snk-entity-search.cjs.entry.js +211 -0
  25. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  26. package/dist/cjs/{snk-filter-advanced-mode_2.cjs.entry.js → snk-filter-advanced-mode_3.cjs.entry.js} +39 -1
  27. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +106 -95
  28. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +4 -4
  29. package/dist/cjs/snk-form-view.cjs.entry.js +1 -1
  30. package/dist/cjs/snk-form_2.cjs.entry.js +5 -5
  31. package/dist/cjs/snk-grid.cjs.entry.js +40 -17
  32. package/dist/cjs/{snk-guides-viewer-688c4398.js → snk-guides-viewer-b4ca3437.js} +37 -153
  33. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -17
  34. package/dist/cjs/snk-image-input.cjs.entry.js +2 -2
  35. package/dist/cjs/snk-layout-form-config.cjs.entry.js +5 -5
  36. package/dist/cjs/snk-personalized-filter.cjs.entry.js +5 -5
  37. package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -5
  38. package/dist/cjs/snk-simple-crud.cjs.entry.js +12 -12
  39. package/dist/cjs/snk-taskbar.cjs.entry.js +181 -124
  40. package/dist/cjs/taskbar-elements-80eddec8.js +152 -0
  41. package/dist/collection/collection-manifest.json +2 -0
  42. package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -3
  43. package/dist/collection/components/snk-attach/snk-attach.css +29 -7
  44. package/dist/collection/components/snk-attach/snk-attach.js +81 -18
  45. package/dist/collection/components/snk-crud/snk-crud.css +46 -0
  46. package/dist/collection/components/snk-crud/snk-crud.js +143 -94
  47. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -5
  48. package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.css +17 -0
  49. package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.js +330 -0
  50. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +22 -8
  51. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +35 -144
  52. package/dist/collection/components/snk-crud/utils/taskbarUtils.js +144 -0
  53. package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js +1 -1
  54. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +20 -1
  55. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css +2 -2
  56. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +23 -1
  57. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +6 -1
  58. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +8 -5
  59. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -6
  60. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +139 -84
  61. package/dist/collection/components/snk-grid/snk-grid.css +12 -3
  62. package/dist/collection/components/snk-grid/snk-grid.js +148 -4
  63. package/dist/collection/components/snk-image-input/utils/ImageUtils.js +1 -1
  64. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
  65. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +8 -0
  66. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +38 -2
  67. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +51 -35
  68. package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js +27 -1
  69. package/dist/collection/components/snk-taskbar/processor/simple-taskbar-processor.js +55 -0
  70. package/dist/collection/components/snk-taskbar/snk-taskbar.css +44 -1
  71. package/dist/collection/components/snk-taskbar/snk-taskbar.js +248 -132
  72. package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.css +12 -0
  73. package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.js +19 -0
  74. package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +8 -0
  75. package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +8 -0
  76. package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +8 -0
  77. package/dist/components/ContinuousInsertUtils.js +1 -1
  78. package/dist/components/SnkMessageBuilder.js +24 -0
  79. package/dist/components/index.d.ts +2 -0
  80. package/dist/components/index.js +2 -0
  81. package/dist/components/snk-actions-button2.js +6 -3
  82. package/dist/components/snk-attach2.js +56 -27
  83. package/dist/components/snk-crud.js +422 -175
  84. package/dist/components/snk-data-exporter2.js +3 -1
  85. package/dist/components/snk-detail-view2.js +158 -258
  86. package/dist/components/snk-entity-search.d.ts +11 -0
  87. package/dist/components/snk-entity-search.js +6 -0
  88. package/dist/components/snk-entity-search2.js +231 -0
  89. package/dist/components/snk-exporter-email-sender2.js +1 -1
  90. package/dist/components/snk-filter-bar2.js +94 -85
  91. package/dist/components/snk-filter-item2.js +4 -2
  92. package/dist/components/snk-filter-modal2.js +8 -5
  93. package/dist/components/snk-grid2.js +82 -47
  94. package/dist/components/snk-image-input2.js +1 -1
  95. package/dist/components/snk-personalized-filter2.js +1 -1
  96. package/dist/components/snk-simple-crud2.js +29 -23
  97. package/dist/components/snk-taskbar-skeleton.d.ts +11 -0
  98. package/dist/components/snk-taskbar-skeleton.js +6 -0
  99. package/dist/components/snk-taskbar-skeleton2.js +29 -0
  100. package/dist/components/snk-taskbar2.js +253 -174
  101. package/dist/components/taskbar-actions-button2.js +21 -2
  102. package/dist/components/taskbar-split-button2.js +10 -1
  103. package/dist/esm/{ConfigStorage-82ff76fb.js → ConfigStorage-76872695.js} +2 -2
  104. package/dist/esm/ContinuousInsertUtils-bce77dc1.js +39 -0
  105. package/dist/esm/{DataFetcher-1dd7e8c0.js → DataFetcher-e60f8d53.js} +1 -1
  106. package/dist/esm/{ISave-498c4831.js → ISave-4929c071.js} +1 -1
  107. package/dist/esm/{ImageUtils-8fc8d905.js → ImageUtils-7f3a4149.js} +1 -1
  108. package/dist/esm/{SnkFormConfigManager-e8ae1561.js → SnkFormConfigManager-83f6b22f.js} +2 -2
  109. package/dist/esm/{SnkMessageBuilder-c0bc4424.js → SnkMessageBuilder-1eb7a1af.js} +24 -0
  110. package/dist/esm/{SnkMultiSelectionListDataSource-ec783ded.js → SnkMultiSelectionListDataSource-7fe25a58.js} +55 -41
  111. package/dist/esm/{auth-fetcher-38a83f5e.js → auth-fetcher-1a31c1e4.js} +1 -1
  112. package/dist/esm/{dataunit-fetcher-21c43ec7.js → dataunit-fetcher-050b6d31.js} +2 -2
  113. package/dist/esm/{form-config-fetcher-24eb587c.js → form-config-fetcher-b44b2727.js} +1 -1
  114. package/dist/esm/index-04f73a26.js +8 -8
  115. package/dist/esm/loader.js +1 -1
  116. package/dist/esm/pesquisa-grid_2.entry.js +5 -5
  117. package/dist/esm/sankhyablocks.js +1 -1
  118. package/dist/esm/{snk-actions-button_8.entry.js → snk-actions-button_9.entry.js} +52 -13
  119. package/dist/esm/snk-application.entry.js +7 -7
  120. package/dist/esm/snk-attach.entry.js +50 -24
  121. package/dist/esm/snk-crud.entry.js +333 -98
  122. package/dist/esm/snk-data-exporter.entry.js +8 -7
  123. package/dist/esm/{snk-data-unit-3b06a0f3.js → snk-data-unit-ca2c9858.js} +2 -2
  124. package/dist/esm/snk-data-unit.entry.js +4 -4
  125. package/dist/esm/snk-detail-view.entry.js +11 -16
  126. package/dist/esm/snk-entity-search.entry.js +207 -0
  127. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  128. package/dist/esm/{snk-filter-advanced-mode_2.entry.js → snk-filter-advanced-mode_3.entry.js} +40 -3
  129. package/dist/esm/snk-filter-bar_4.entry.js +107 -96
  130. package/dist/esm/snk-filter-modal-item.entry.js +4 -4
  131. package/dist/esm/snk-form-view.entry.js +1 -1
  132. package/dist/esm/snk-form_2.entry.js +5 -5
  133. package/dist/esm/snk-grid.entry.js +37 -14
  134. package/dist/esm/{snk-guides-viewer-6ddc7e6a.js → snk-guides-viewer-cc37535b.js} +38 -154
  135. package/dist/esm/snk-guides-viewer.entry.js +9 -17
  136. package/dist/esm/snk-image-input.entry.js +2 -2
  137. package/dist/esm/snk-layout-form-config.entry.js +5 -5
  138. package/dist/esm/snk-personalized-filter.entry.js +5 -5
  139. package/dist/esm/snk-pesquisa.entry.js +5 -5
  140. package/dist/esm/snk-simple-crud.entry.js +10 -10
  141. package/dist/esm/snk-taskbar.entry.js +182 -125
  142. package/dist/esm/taskbar-elements-63651ca7.js +149 -0
  143. package/dist/sankhyablocks/p-09ba6bd4.js +1 -0
  144. package/dist/sankhyablocks/p-10f27dc6.entry.js +1 -0
  145. package/dist/sankhyablocks/{p-54f5c36d.entry.js → p-20af4b6a.entry.js} +1 -1
  146. package/dist/sankhyablocks/p-225f92cf.entry.js +1 -0
  147. package/dist/sankhyablocks/{p-605a2a99.entry.js → p-251aee41.entry.js} +1 -1
  148. package/dist/sankhyablocks/p-2af815bb.entry.js +1 -0
  149. package/dist/sankhyablocks/{p-bdf0077f.js → p-2af8aca3.js} +1 -1
  150. package/dist/sankhyablocks/p-3072136e.js +1 -0
  151. package/dist/sankhyablocks/p-33492640.entry.js +1 -0
  152. package/dist/sankhyablocks/{p-f208ec52.entry.js → p-35317d9a.entry.js} +1 -1
  153. package/dist/sankhyablocks/{p-6753f16e.js → p-3704bf1b.js} +1 -1
  154. package/dist/sankhyablocks/{p-2d606189.js → p-3870748a.js} +1 -1
  155. package/dist/sankhyablocks/{p-e057ecb6.js → p-3c990841.js} +1 -1
  156. package/dist/sankhyablocks/{p-4ff3b494.js → p-420b39b5.js} +1 -1
  157. package/dist/sankhyablocks/{p-8bb4e86b.entry.js → p-46f75667.entry.js} +1 -1
  158. package/dist/sankhyablocks/{p-32ad76cc.js → p-4f7adf97.js} +2 -2
  159. package/dist/sankhyablocks/p-554c0e54.js +1 -0
  160. package/dist/sankhyablocks/p-6ae7543b.entry.js +1 -0
  161. package/dist/sankhyablocks/p-771b137e.js +1 -0
  162. package/dist/sankhyablocks/p-77f608bc.entry.js +1 -0
  163. package/dist/sankhyablocks/p-7c8bf699.entry.js +1 -0
  164. package/dist/sankhyablocks/{p-d34a41ec.entry.js → p-8a8900a9.entry.js} +1 -1
  165. package/dist/sankhyablocks/{p-e484913b.entry.js → p-95af0bb1.entry.js} +1 -1
  166. package/dist/sankhyablocks/{p-10cad767.entry.js → p-98241c21.entry.js} +1 -1
  167. package/dist/sankhyablocks/{p-f5b929c2.entry.js → p-ab12f544.entry.js} +1 -1
  168. package/dist/sankhyablocks/{p-ef8cf0e2.js → p-ab5e12fa.js} +1 -1
  169. package/dist/sankhyablocks/p-ac384a1e.entry.js +1 -0
  170. package/dist/sankhyablocks/{p-3a98c337.entry.js → p-aff2d081.entry.js} +1 -1
  171. package/dist/sankhyablocks/p-b3b51693.entry.js +1 -0
  172. package/dist/sankhyablocks/{p-08415ef7.entry.js → p-bab4cde4.entry.js} +1 -1
  173. package/dist/sankhyablocks/p-ce3b284c.entry.js +1 -0
  174. package/dist/sankhyablocks/p-ce8ccd72.entry.js +1 -0
  175. package/dist/sankhyablocks/{p-b9970342.js → p-d972a9c1.js} +1 -1
  176. package/dist/sankhyablocks/p-e5a3711f.js +1 -0
  177. package/dist/sankhyablocks/{p-2b882835.entry.js → p-e737fd5a.entry.js} +1 -1
  178. package/dist/sankhyablocks/p-efd18bc2.entry.js +1 -0
  179. package/dist/sankhyablocks/{p-362e6e8c.js → p-f185d5ad.js} +1 -1
  180. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  181. package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +4 -0
  182. package/dist/types/components/snk-attach/snk-attach.d.ts +20 -4
  183. package/dist/types/components/snk-crud/snk-crud.d.ts +28 -10
  184. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
  185. package/dist/types/components/snk-crud/subcomponents/snk-entity-search.d.ts +62 -0
  186. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +4 -18
  187. package/dist/types/components/snk-crud/utils/taskbarUtils.d.ts +13 -0
  188. package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +4 -0
  189. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +4 -0
  190. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +32 -20
  191. package/dist/types/components/snk-grid/snk-grid.d.ts +28 -1
  192. package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +6 -0
  193. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +29 -2
  194. package/dist/types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.d.ts +5 -0
  195. package/dist/types/components/snk-taskbar/processor/simple-taskbar-processor.d.ts +31 -0
  196. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +32 -21
  197. package/dist/types/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.d.ts +3 -0
  198. package/dist/types/components.d.ts +197 -4
  199. package/package.json +2 -2
  200. package/react/components.d.ts +2 -0
  201. package/react/components.js +2 -0
  202. package/react/components.js.map +1 -1
  203. package/dist/cjs/snk-simple-bar.cjs.entry.js +0 -45
  204. package/dist/cjs/taskbar-elements-a94d4318.js +0 -133
  205. package/dist/cjs/taskbar-processor-2fba34a8.js +0 -53
  206. package/dist/esm/snk-simple-bar.entry.js +0 -41
  207. package/dist/esm/taskbar-elements-97541bdd.js +0 -130
  208. package/dist/esm/taskbar-processor-3436124c.js +0 -51
  209. package/dist/sankhyablocks/p-07aa8192.entry.js +0 -1
  210. package/dist/sankhyablocks/p-1a0caadb.js +0 -1
  211. package/dist/sankhyablocks/p-27aea149.entry.js +0 -1
  212. package/dist/sankhyablocks/p-27d6590e.js +0 -1
  213. package/dist/sankhyablocks/p-449e36d2.entry.js +0 -1
  214. package/dist/sankhyablocks/p-615655bd.entry.js +0 -1
  215. package/dist/sankhyablocks/p-62e17eea.entry.js +0 -1
  216. package/dist/sankhyablocks/p-6e1a7929.entry.js +0 -1
  217. package/dist/sankhyablocks/p-72d62f22.js +0 -1
  218. package/dist/sankhyablocks/p-9c1ff75e.entry.js +0 -1
  219. package/dist/sankhyablocks/p-a8c5ebf1.entry.js +0 -1
  220. package/dist/sankhyablocks/p-b25777fa.entry.js +0 -1
  221. package/dist/sankhyablocks/p-b6d47f08.entry.js +0 -1
  222. package/dist/sankhyablocks/p-b8453e18.js +0 -1
  223. package/dist/sankhyablocks/p-c8043a53.entry.js +0 -1
  224. package/dist/sankhyablocks/p-f0c9969e.entry.js +0 -1
  225. package/dist/sankhyablocks/p-fc5938fb.js +0 -1
@@ -1,25 +1,226 @@
1
1
  import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-04f73a26.js';
2
2
  import { Action, StringUtils, ElementIDUtils, ApplicationContext, KeyboardManager } from '@sankhyalabs/core';
3
- import './DataFetcher-1dd7e8c0.js';
4
- import './ISave-498c4831.js';
3
+ import './DataFetcher-e60f8d53.js';
4
+ import './ISave-4929c071.js';
5
5
  import { P as PresentationMode, E as ExporterStrategy } from './index-b40568ff.js';
6
6
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
7
7
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
8
- import './dataunit-fetcher-21c43ec7.js';
8
+ import './dataunit-fetcher-050b6d31.js';
9
9
  import './filter-item-type.enum-d45e026f.js';
10
- import './form-config-fetcher-24eb587c.js';
10
+ import './form-config-fetcher-b44b2727.js';
11
11
  import { V as VIEW_MODE } from './constants-7b422de0.js';
12
- import { A as AutorizationType } from './auth-fetcher-38a83f5e.js';
12
+ import { A as AutorizationType } from './auth-fetcher-1a31c1e4.js';
13
13
  import { S as ServicesNumberingConfig } from './ServicesNumberingConfig-2f7b050e.js';
14
- import { T as TaskbarElement } from './taskbar-elements-97541bdd.js';
14
+ import { T as TaskbarElement } from './taskbar-elements-63651ca7.js';
15
+ import { v as validateFilters } from './filter-validate-faf51fa9.js';
16
+ import { buildFieldSearch } from '@sankhyalabs/ezui/dist/collection/utils';
17
+ import { C as ContinuousInsertUtils } from './ContinuousInsertUtils-bce77dc1.js';
15
18
  import './PrintUtils-3e4ff0f5.js';
16
- import './SnkMessageBuilder-c0bc4424.js';
19
+ import './SnkMessageBuilder-1eb7a1af.js';
17
20
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
18
21
  import '@sankhyalabs/core/dist/utils/SortingUtils';
19
22
  import './ResourceIDUtils-a114189a.js';
20
23
  import './index-ea250be6.js';
21
24
 
22
- const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
25
+ class SimpleTaskbarProcessor {
26
+ /**
27
+ * Cria uma nova instância do processador de taskbar.
28
+ * @param defaultButtons - Array com os botões padrão a serem exibidos
29
+ */
30
+ constructor(defaultButtons) {
31
+ this._defaultButtons = [];
32
+ this._defaultButtons = [...defaultButtons];
33
+ }
34
+ /**
35
+ * Processa a taskbar aplicando regras de visibilidade e habilitação.
36
+ * @param taskbarID - Identificador único da taskbar
37
+ * @param taskbarManager - Gerenciador de taskbar com regras customizadas
38
+ * @param dataState - Estado atual dos dados
39
+ * @param disabledButtons - Array de botões desabilitados
40
+ * @param invisibleButtons - Array de botões invisíveis
41
+ */
42
+ process(taskbarID, taskbarManager, dataState, disabledButtons = [], invisibleButtons = []) {
43
+ var _a;
44
+ this.taskbarID = taskbarID;
45
+ this.customButtons = new Map();
46
+ this.buttonsArray = [];
47
+ this.disabledButtons = [...disabledButtons];
48
+ (_a = this.getButtonsArray(taskbarManager, dataState)) === null || _a === void 0 ? void 0 : _a.forEach((btnDef) => {
49
+ let buttonName;
50
+ if (typeof btnDef === "string") {
51
+ buttonName = btnDef;
52
+ }
53
+ else {
54
+ this.customButtons.set(btnDef.name, btnDef);
55
+ buttonName = btnDef.name;
56
+ }
57
+ if (!invisibleButtons.includes(buttonName)) {
58
+ if (!this.isEnabled(taskbarManager, buttonName, dataState, disabledButtons)) {
59
+ this.disabledButtons.push(buttonName);
60
+ }
61
+ this.buttonsArray.push(buttonName);
62
+ }
63
+ });
64
+ this.buttons = this.buttonsArray.join(",");
65
+ }
66
+ getButtonsArray(taskbarManager, dataState) {
67
+ if (taskbarManager) {
68
+ return taskbarManager.getButtons(this.taskbarID, dataState, [...this._defaultButtons]);
69
+ }
70
+ return this._defaultButtons;
71
+ }
72
+ isEnabled(taskbarManager, buttonName, dataState, disabled) {
73
+ const originalValue = !disabled.includes(buttonName);
74
+ if (taskbarManager && taskbarManager.isEnabled) {
75
+ return taskbarManager.isEnabled(this.taskbarID, dataState, buttonName, originalValue);
76
+ }
77
+ return originalValue;
78
+ }
79
+ }
80
+
81
+ const DEFAULT_TASKBAR_BUTTONS = [
82
+ TaskbarElement.FORM_MODE,
83
+ TaskbarElement.PREVIOUS,
84
+ TaskbarElement.NEXT,
85
+ TaskbarElement.REFRESH,
86
+ TaskbarElement.SPACER,
87
+ TaskbarElement.ACTIONS_BUTTON,
88
+ TaskbarElement.DATA_EXPORTER,
89
+ TaskbarElement.ATTACH,
90
+ TaskbarElement.CLONE,
91
+ TaskbarElement.UPDATE,
92
+ TaskbarElement.REMOVE,
93
+ TaskbarElement.INSERT,
94
+ TaskbarElement.CONFIGURATOR,
95
+ TaskbarElement.MORE_OPTIONS,
96
+ ];
97
+ var CustomTaskbarButton;
98
+ (function (CustomTaskbarButton) {
99
+ CustomTaskbarButton["FILTER"] = "FILTER";
100
+ CustomTaskbarButton["ENTITY_SEARCH"] = "ENTITY_SEARCH";
101
+ })(CustomTaskbarButton || (CustomTaskbarButton = {}));
102
+ /**
103
+ * Insere os botões customizados à esquerda do elemento SPACER na lista de botões.
104
+ * Caso o SPACER não seja encontrado, os botões são inseridos no início da lista.
105
+ */
106
+ function insertCustomButtonsBeforeSpacer(buttons, customButtons) {
107
+ const spacerIndex = buttons.findIndex(btn => btn === TaskbarElement.SPACER || (typeof btn === 'string' && btn === 'SPACER'));
108
+ if (spacerIndex > -1) {
109
+ return [
110
+ ...buttons.slice(0, spacerIndex),
111
+ ...customButtons,
112
+ ...buttons.slice(spacerIndex),
113
+ ];
114
+ }
115
+ return [...customButtons, ...buttons];
116
+ }
117
+ function buildNativeTaskbarManager(currentViewMode, mergeTaskbarManager, messagesBuilder) {
118
+ var _a, _b;
119
+ const CUSTOM_BUTTONS = [
120
+ {
121
+ name: CustomTaskbarButton.FILTER,
122
+ hint: (_a = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("snkCrud.customButtons.filter")) !== null && _a !== void 0 ? _a : "Abre o painel de filtros",
123
+ iconName: "filter",
124
+ },
125
+ {
126
+ name: CustomTaskbarButton.ENTITY_SEARCH,
127
+ hint: (_b = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("snkCrud.customButtons.entitySearch")) !== null && _b !== void 0 ? _b : "Busca na entidade",
128
+ iconName: "search",
129
+ },
130
+ ];
131
+ const EDITION_MODE_BUTTONS = [
132
+ TaskbarElement.CANCEL,
133
+ TaskbarElement.SAVE,
134
+ ];
135
+ return {
136
+ getButtons: (taskbarID, dataState, defaultButtons) => {
137
+ var _a, _b;
138
+ if (!taskbarID) {
139
+ console.warn('taskbarID não fornecido');
140
+ return [];
141
+ }
142
+ const isInEditionMode = (dataState === null || dataState === void 0 ? void 0 : dataState.insertionMode) || (dataState === null || dataState === void 0 ? void 0 : dataState.isDirty);
143
+ if (isInEditionMode) {
144
+ return EDITION_MODE_BUTTONS;
145
+ }
146
+ if (currentViewMode === VIEW_MODE.FORM) {
147
+ const indexFormMode = defaultButtons.indexOf(TaskbarElement.FORM_MODE);
148
+ if (indexFormMode > -1) {
149
+ defaultButtons = [
150
+ ...defaultButtons.slice(0, indexFormMode),
151
+ TaskbarElement.GRID_MODE,
152
+ ...defaultButtons.slice(indexFormMode + 1)
153
+ ];
154
+ }
155
+ }
156
+ if (((_b = (_a = dataState === null || dataState === void 0 ? void 0 : dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.length) > 1) {
157
+ const indexUpdate = defaultButtons.indexOf(TaskbarElement.UPDATE);
158
+ if (indexUpdate > -1) {
159
+ defaultButtons = [
160
+ ...defaultButtons.slice(0, indexUpdate),
161
+ TaskbarElement.UPDATE_MULTIPLE,
162
+ ...defaultButtons.slice(indexUpdate + 1)
163
+ ];
164
+ }
165
+ }
166
+ const defaultsWithCustomButtons = insertCustomButtonsBeforeSpacer(defaultButtons, CUSTOM_BUTTONS);
167
+ if (mergeTaskbarManager === null || mergeTaskbarManager === void 0 ? void 0 : mergeTaskbarManager.getButtons) {
168
+ return mergeTaskbarManager.getButtons(taskbarID, dataState, defaultsWithCustomButtons);
169
+ }
170
+ return defaultsWithCustomButtons;
171
+ },
172
+ isEnabled: (_, dataState, buttonName, originalValue) => {
173
+ var _a;
174
+ if (!dataState) {
175
+ return originalValue;
176
+ }
177
+ const hasSelectedRecord = dataState.selectedRecord !== undefined;
178
+ const buttonsRequiringSelection = [
179
+ TaskbarElement.UPDATE,
180
+ TaskbarElement.REMOVE,
181
+ TaskbarElement.ATTACH,
182
+ TaskbarElement.CLONE,
183
+ ];
184
+ if (!hasSelectedRecord && buttonsRequiringSelection.includes(buttonName)) {
185
+ return false;
186
+ }
187
+ return (_a = mergeTaskbarManager === null || mergeTaskbarManager === void 0 ? void 0 : mergeTaskbarManager.isEnabled(_, dataState, buttonName, originalValue)) !== null && _a !== void 0 ? _a : originalValue;
188
+ },
189
+ getMoreOptions(taskbarId, configName, dataState, currentActions) {
190
+ var _a;
191
+ return (_a = mergeTaskbarManager === null || mergeTaskbarManager === void 0 ? void 0 : mergeTaskbarManager.getMoreOptions) === null || _a === void 0 ? void 0 : _a.call(mergeTaskbarManager, taskbarId, configName, dataState, currentActions);
192
+ },
193
+ };
194
+ }
195
+ function getHeaderTaskbarId(dataState, presentationMode) {
196
+ var _a;
197
+ const hasSelectedRecord = dataState && !!((_a = dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.length);
198
+ const taskbarIdPrefixLookup = {
199
+ primary: "snkGridHeaderTaskbar",
200
+ secondary: "snkGridHeaderTaskbar",
201
+ singleTaskbar: "snkGridHeaderTaskbar.singleTaskbar",
202
+ };
203
+ const taskbarIdPrefix = taskbarIdPrefixLookup[presentationMode];
204
+ let headerTaskbarId = hasSelectedRecord ? `${taskbarIdPrefix}.selected` : `${taskbarIdPrefix}.unselected`;
205
+ if ((dataState === null || dataState === void 0 ? void 0 : dataState.isDirty) && presentationMode === PresentationMode.SINGLE_TASKBAR) {
206
+ headerTaskbarId = "snkGridHeaderTaskbar.singleTaskbar.finish_edition";
207
+ }
208
+ return headerTaskbarId;
209
+ }
210
+ function getTopTaskBarId(dataState, presentationMode) {
211
+ const suffixLookup = {
212
+ primary: '',
213
+ secondary: '.secondary',
214
+ singleTaskbar: '.singleTaskbar',
215
+ };
216
+ const sufix = suffixLookup[presentationMode];
217
+ if (dataState === null || dataState === void 0 ? void 0 : dataState.isDirty) {
218
+ return `snkGridTopTaskbar.finish_edition${sufix}`;
219
+ }
220
+ return `snkGridTopTaskbar.regular${sufix}`;
221
+ }
222
+
223
+ const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%;overflow-y:auto;scrollbar-gutter:stable both-edges}snk-grid.sc-snk-crud{--snk-grid-padding:0 var(--space--6, 6px) var(--space--6, 6px) var(--space--6, 6px)}stack-item.sc-snk-crud.sc-snk-crud{display:grid;min-height:100%}.snk-crud__grid-stack-item.sc-snk-crud{display:flex;flex-direction:column;height:100%;width:100%;padding:0 var(--space--2, 2px)}.snk-crud__header-top.sc-snk-crud{display:flex;justify-content:space-between;align-items:center;padding:var(--space--8, 8px);padding-top:var(--space--12, 12px)}.snk-crud__header-bottom.sc-snk-crud{display:flex;justify-content:space-between;align-items:center;padding:0 var(--space--8, 8px) 0 var(--space--6, 6px)}.snk-crud__header-bottom.sc-snk-crud>snk-taskbar.sc-snk-crud{padding-bottom:var(--space--8, 8px);margin-left:var(--space--12, 12px)}.snk-crud--hidden.sc-snk-crud{display:none !important}ez-record-navigation.sc-snk-crud,ez-grid-pagination.sc-snk-crud{margin-bottom:var(--space--8, 8px)}";
23
224
 
24
225
  const SnkCrud = class {
25
226
  constructor(hostRef) {
@@ -34,44 +235,18 @@ const SnkCrud = class {
34
235
  this._viewHistory = [];
35
236
  this._customEditors = new Map();
36
237
  this._customRenders = new Map();
37
- this.loadEntitySuggestions = async (argument) => {
38
- var _a;
39
- const value = (_a = argument === null || argument === void 0 ? void 0 : argument.argument) !== null && _a !== void 0 ? _a : '';
40
- const mode = (argument === null || argument === void 0 ? void 0 : argument.mode) || "PREDICTIVE";
41
- if (!value || value.trim().length === 0) {
42
- return [];
43
- }
44
- try {
45
- this._showMoreOnSearch = false;
46
- const entityName = this._snkDataUnit.entityName;
47
- if (mode === "PREDICTIVE") {
48
- return await this.handlePredictiveSearch(value, entityName);
49
- }
50
- return await this._application.executePreparedSearch(mode, value, this.buildSearchOptions(entityName));
51
- }
52
- catch (error) {
53
- console.error('Erro ao carregar sugestões de entidades:', error);
54
- return [];
55
- }
56
- };
57
- this.searchEntitySelect = async (item) => {
58
- if (!this._entityPKField || !item) {
59
- return;
60
- }
61
- try {
62
- const pk = [{ name: this._entityPKField, value: item.value }];
63
- await this.refreshDataUnitByPk(pk);
64
- }
65
- catch (error) {
66
- console.error('Erro ao selecionar entidade:', error);
67
- }
68
- };
238
+ this._taskbarProcessor = new SimpleTaskbarProcessor(DEFAULT_TASKBAR_BUTTONS);
239
+ this._taskbarCustomProcessor = new SimpleTaskbarProcessor([]);
69
240
  this.dataUnitInterceptor = {
70
- interceptAction: (action) => {
71
- if (action.type === Action.DATA_SAVED) {
72
- action = this.interceptDataSaved(action);
241
+ interceptAction: async (action) => {
242
+ switch (action.type) {
243
+ case Action.DATA_SAVED:
244
+ return this.interceptDataSaved(action);
245
+ case Action.LOADING_DATA:
246
+ return await this.interceptLoadData(action);
247
+ default:
248
+ return action;
73
249
  }
74
- return action;
75
250
  },
76
251
  };
77
252
  this._dataUnit = undefined;
@@ -82,8 +257,9 @@ const SnkCrud = class {
82
257
  this._resourceID = undefined;
83
258
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
84
259
  this.numberingConfig = undefined;
85
- this._showMoreOnSearch = false;
86
- this._entityPKField = undefined;
260
+ this._filterMode = 'regular';
261
+ this._enableContinuousInsert = false;
262
+ this._headerVisible = true;
87
263
  this.enableLockManagerLoadingComp = false;
88
264
  this.enableLockManagerTaskbarClick = false;
89
265
  this.configName = undefined;
@@ -116,6 +292,9 @@ const SnkCrud = class {
116
292
  this.showEntitySearch = true;
117
293
  this.disableNumberingConfig = false;
118
294
  }
295
+ handleActionClick(evt) {
296
+ this.executeAction(evt.detail);
297
+ }
119
298
  /**
120
299
  * Usado para alternar a visão entre GRID e FORM externamente.
121
300
  */
@@ -213,6 +392,7 @@ const SnkCrud = class {
213
392
  this.setViewMode(VIEW_MODE.FORM);
214
393
  }
215
394
  async executeAction(act) {
395
+ var _a;
216
396
  switch (act) {
217
397
  case TaskbarElement.GRID_MODE:
218
398
  return this.setViewMode(VIEW_MODE.GRID);
@@ -225,13 +405,13 @@ const SnkCrud = class {
225
405
  case TaskbarElement.CONFIGURATOR:
226
406
  return this._snkConfigurator.open();
227
407
  case TaskbarElement.ATTACH:
228
- return this.setViewMode(VIEW_MODE.ATTACHMENT);
408
+ return this._snkAttach.open();
409
+ case CustomTaskbarButton.FILTER:
410
+ return (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.showFilterModal();
411
+ case CustomTaskbarButton.ENTITY_SEARCH:
412
+ return this.openSearchPopover();
229
413
  }
230
414
  }
231
- backView() {
232
- const lastView = this._viewHistory.at(-2) || VIEW_MODE.GRID;
233
- this.setViewMode(lastView);
234
- }
235
415
  setViewMode(viewMode) {
236
416
  this._viewStack.show(viewMode);
237
417
  this._currentViewMode = viewMode;
@@ -293,6 +473,16 @@ const SnkCrud = class {
293
473
  this._customEditors.delete(fieldName);
294
474
  }
295
475
  }
476
+ initializeTaskbarProcessor() {
477
+ const nativeTaskbarManager = buildNativeTaskbarManager(this._currentViewMode, this.taskbarManager, this.messagesBuilder);
478
+ const topTaskbarId = getTopTaskBarId(this._dataState, this.presentationMode);
479
+ this._taskbarProcessor.process(topTaskbarId, nativeTaskbarManager, this._dataState, undefined, []);
480
+ const headerTaskbarId = getHeaderTaskbarId(this._dataState, this.presentationMode);
481
+ this._taskbarCustomProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState, undefined, []);
482
+ }
483
+ componentWillRender() {
484
+ this.initializeTaskbarProcessor();
485
+ }
296
486
  componentDidRender() {
297
487
  this.setCustomRenders();
298
488
  this.setCustomEditors();
@@ -328,6 +518,7 @@ const SnkCrud = class {
328
518
  if (!this.configName) {
329
519
  this.configName = this._application.configName;
330
520
  }
521
+ this.initContinuousInsertUtils();
331
522
  }
332
523
  componentDidLoad() {
333
524
  this.initKeyboardManager();
@@ -409,49 +600,6 @@ const SnkCrud = class {
409
600
  var _a;
410
601
  (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
411
602
  }
412
- async handlePredictiveSearch(argument, entityName) {
413
- var _a, _b;
414
- const response = await this._application.executePreparedSearchWithFullResponse(argument, this.buildSearchOptions(entityName, 5));
415
- this._showMoreOnSearch = (_a = response === null || response === void 0 ? void 0 : response.hasMore) !== null && _a !== void 0 ? _a : false;
416
- this._entityPKField = response === null || response === void 0 ? void 0 : response.pkField;
417
- return (_b = response === null || response === void 0 ? void 0 : response.data) !== null && _b !== void 0 ? _b : [];
418
- }
419
- async refreshDataUnitByPk(pks) {
420
- try {
421
- const pkField = pks[0].name;
422
- const pkValue = pks[0].value;
423
- // Criar filtro para a busca específica
424
- const quickFilter = {
425
- term: '',
426
- filter: {
427
- name: '',
428
- params: [],
429
- expression: `(${pkField} = ${pkValue})`
430
- }
431
- };
432
- // Carregar dados com o filtro aplicado diretamente
433
- await this._dataUnit.loadData(quickFilter);
434
- // Navegar para o formulário se houver apenas um registro
435
- if (this._dataUnit.records.length === 1) {
436
- this._dataUnit.selectFirst();
437
- this.gridToForm(true);
438
- }
439
- }
440
- catch (error) {
441
- console.error('Erro ao atualizar dataset:', error);
442
- }
443
- }
444
- buildSearchOptions(entityName, limit) {
445
- return {
446
- entity: entityName,
447
- entityDescription: entityName,
448
- executeOnOpen: true,
449
- searchOptions: {
450
- localEntityName: entityName,
451
- limit,
452
- }
453
- };
454
- }
455
603
  async toggleView() {
456
604
  const currentView = await this._viewStack.getSelectedIndex();
457
605
  this.setViewMode(VIEW_MODE.GRID === currentView ? VIEW_MODE.FORM : VIEW_MODE.GRID);
@@ -495,6 +643,17 @@ const SnkCrud = class {
495
643
  this.updateNumberingConfigAfterInsert(action);
496
644
  return action;
497
645
  }
646
+ async interceptLoadData(action) {
647
+ var _a;
648
+ const hasInvalidFilters = !validateFilters((_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig);
649
+ if (hasInvalidFilters) {
650
+ const errorTitle = this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.title", {});
651
+ const errorMessage = this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.message", {});
652
+ await this._application.error(errorTitle, errorMessage);
653
+ return;
654
+ }
655
+ return action;
656
+ }
498
657
  onDataUnitReady() {
499
658
  var _a;
500
659
  (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.addInterceptor(this.dataUnitInterceptor);
@@ -514,6 +673,12 @@ const SnkCrud = class {
514
673
  }
515
674
  this.onDataUnitReady();
516
675
  }
676
+ initContinuousInsertUtils() {
677
+ this._continuousInsertUtils = new ContinuousInsertUtils(this._application, this._resourceID, this.configName);
678
+ if (this.enableGridInsert) {
679
+ this._continuousInsertUtils.getConfig().then(value => this._enableContinuousInsert = value);
680
+ }
681
+ }
517
682
  async loadNumberingConfig() {
518
683
  if (this.numberingConfig || !this._snkDataUnit || !this._snkDataUnit.entityName || this.disableNumberingConfig) {
519
684
  return;
@@ -563,18 +728,88 @@ const SnkCrud = class {
563
728
  return;
564
729
  return this.customGuidesConfig.map(g => h("slot", { name: g.id }));
565
730
  }
566
- renderDynamicSearch(slotName) {
731
+ getColumnSearch(item) {
732
+ if (this._columnSearch != undefined) {
733
+ return this._columnSearch;
734
+ }
735
+ this._columnSearch = buildFieldSearch(item, ({ argument }) => new Promise(accept => {
736
+ this._snkGrid.filterColumns(argument).then((columns) => {
737
+ accept(columns
738
+ .filter(column => !column.hidden)
739
+ .map(column => ({ label: column.label, value: column.name })));
740
+ });
741
+ }), (option) => {
742
+ if (option != undefined) {
743
+ this._snkGrid.locateColumn(option.value);
744
+ }
745
+ });
746
+ return this._columnSearch;
747
+ }
748
+ buildTaskbarCustomActionsList() {
749
+ return [this.buildSearchColumnTaskbarAction()];
750
+ }
751
+ buildSearchColumnTaskbarAction() {
752
+ return {
753
+ value: StringUtils.generateUUID(),
754
+ label: this.messagesBuilder.getMessage('snkGrid.findColumn', {}),
755
+ disableCloseOnSelect: true,
756
+ eagerInitialize: true,
757
+ itemBuilder: (_, item) => this.getColumnSearch(item),
758
+ };
759
+ }
760
+ isGridInsertActive() {
761
+ return this.enableGridInsert && this._dataUnit.hasNewRecord();
762
+ }
763
+ getActionsList() {
764
+ const hardList = [];
765
+ if (this.enableGridInsert) {
766
+ hardList.push(this._continuousInsertUtils.actionContinuousInsert(this._enableContinuousInsert, () => {
767
+ this._enableContinuousInsert = !this._enableContinuousInsert;
768
+ this._continuousInsertUtils.handleSaveConfig(this._enableContinuousInsert);
769
+ }));
770
+ }
771
+ if (this.isGridInsertActive())
772
+ return hardList;
773
+ if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
774
+ const taskbarID = getTopTaskBarId(this._dataState, this.presentationMode);
775
+ return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this._dataState, this.actionsList));
776
+ }
777
+ return hardList.concat(this.actionsList);
778
+ }
779
+ async openSearchPopover() {
780
+ if (!this._popoverSearchEntity) {
781
+ return;
782
+ }
783
+ const buttonElement = this._element.querySelector(`[data-taskbar-element="${CustomTaskbarButton.ENTITY_SEARCH}"]`);
784
+ await this._popoverSearchEntity.showUnder(buttonElement);
785
+ }
786
+ handleLoadedSearch(evt) {
787
+ if (evt.detail.length === 1) {
788
+ this._dataUnit.selectFirst();
789
+ this.gridToForm(true);
790
+ }
791
+ }
792
+ renderDynamicSearch() {
567
793
  var _a;
568
- if (!this.showEntitySearch || ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.insertionMode) === true)
794
+ if (!this.showEntitySearch)
569
795
  return;
570
- return (h("div", { slot: slotName, class: "entity-search-container", style: { position: 'relative', display: 'inline-block', marginLeft: '10px', minWidth: '200px' } }, h("ez-search", { label: "Buscar registros", optionLoader: this.loadEntitySuggestions, onEzChange: (evt) => this.searchEntitySelect(evt.detail), mode: "slim", showMore: this._showMoreOnSearch, suppressEmptyOption: true, suppressInputPersist: true })));
796
+ return (h("snk-entity-search", { ref: (ref) => this._popoverSearchEntity = ref, dataUnit: this._dataUnit, entityName: (_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.entityName, messagesBuilder: this.messagesBuilder, onLoaded: (evt) => this.handleLoadedSearch(evt) }));
797
+ }
798
+ handleFilterConfigUpdated(filterConfig) {
799
+ if (!filterConfig.length) {
800
+ return;
801
+ }
802
+ if (filterConfig.length === 1 && filterConfig[0].id === 'PERSONALIZED_FILTER_GROUP') {
803
+ this._filterMode = filterConfig[0].groupedItems.length > 0 ? 'regular' : 'button';
804
+ return;
805
+ }
571
806
  }
572
807
  render() {
573
808
  if (this._resourceID == undefined) {
574
809
  return;
575
810
  }
576
811
  this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
577
- return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }), this.renderDynamicSearch("GRID_HEADER_DYNAMIC_SEARCH"))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, customGuidesConfig: this.customGuidesConfig, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), this.renderCustomGuideSlots(), this.renderDynamicSearch("GUIDES_VIEWER_DYNAMIC_SEARCH"), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", { tabIndex: "0" }, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: this._snkDataUnit.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
812
+ return (h(Host, null, h("header", { class: { 'snk-crud--hidden': !this._headerVisible } }, h("div", { class: "snk-crud__header-top" }, h("snk-taskbar", { "data-element-id": "grid_top", key: "snkGridTopTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, resourceID: this._resourceID, primaryButton: "INSERT", overflowStrategy: "hiddenItems", alignRigth: true, actionsList: this.getActionsList(), customActionsList: this.buildTaskbarCustomActionsList(), sizeButtons: 'medium' })), h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this._resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, mode: this._filterMode, hideFilterButton: true, sizeChips: 'default' })), h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'snk-crud__grid-stack-item' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode, hideHeader: true, hideGridTaskbar: true }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, customGuidesConfig: this.customGuidesConfig, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields, onFormConfigVisibilityChanged: evt => this._headerVisible = !evt.detail }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), this.renderCustomGuideSlots(), h("slot", { name: "SnkFormTaskBar" })))), h("snk-attach", { ref: (ref) => this._snkAttach = ref, registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName }), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: this._snkDataUnit.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig }), this.renderDynamicSearch(), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
578
813
  }
579
814
  get _element() { return getElement(this); }
580
815
  static get watchers() { return {
@@ -4,16 +4,16 @@ import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/
4
4
  import { I as IExportType } from './IFetchDataExporterParams-d73bed3d.js';
5
5
  import { D as DataExporterOption, a as DataExporterType, b as DataExporterFormat } from './index-b40568ff.js';
6
6
  import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants-7b422de0.js';
7
- import { D as DataFetcher } from './DataFetcher-1dd7e8c0.js';
8
- import { S as SnkDataUnit } from './snk-data-unit-3b06a0f3.js';
9
- import './ISave-498c4831.js';
7
+ import { D as DataFetcher } from './DataFetcher-e60f8d53.js';
8
+ import { S as SnkDataUnit } from './snk-data-unit-ca2c9858.js';
9
+ import './ISave-4929c071.js';
10
10
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
11
11
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
12
- import './dataunit-fetcher-21c43ec7.js';
12
+ import './dataunit-fetcher-050b6d31.js';
13
13
  import './filter-item-type.enum-d45e026f.js';
14
- import './form-config-fetcher-24eb587c.js';
14
+ import './form-config-fetcher-b44b2727.js';
15
15
  import './PrintUtils-3e4ff0f5.js';
16
- import './SnkMessageBuilder-c0bc4424.js';
16
+ import './SnkMessageBuilder-1eb7a1af.js';
17
17
  import '@sankhyalabs/core/dist/dataunit/metadata/DataType';
18
18
  import './GetSelectedRecordsIDsInfo-9fa41508.js';
19
19
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
@@ -462,6 +462,7 @@ const SnkDataExporter = class {
462
462
  this._showDropdown = false;
463
463
  this.provider = null;
464
464
  this.messagesBuilder = undefined;
465
+ this.size = 'medium';
465
466
  }
466
467
  async exportByEmail() {
467
468
  const selectedRows = this._selectedNumber;
@@ -747,7 +748,7 @@ const SnkDataExporter = class {
747
748
  render() {
748
749
  return (h(Host, null, h("div", { class: `snk-data-exporter
749
750
  ${this.canShowDropdown() ? " ez-elevation--16" : ""}
750
- ` }, h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "file-download", size: "small", mode: "icon", title: this.getMessage("snkDataExporter.group.export.title"), onClick: () => this.controlDropdown() }, this.getElementID("button"))), h("div", Object.assign({ ref: (ref) => this._dropdownParent = ref, class: `snk-data-exporter__dropdown
751
+ ` }, h("ez-tooltip", { message: this.getMessage("snkDataExporter.group.export.title") }, h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "file-download", mode: "icon", onClick: () => this.controlDropdown(), size: this.size }, this.getElementID("button")))), h("div", Object.assign({ ref: (ref) => this._dropdownParent = ref, class: `snk-data-exporter__dropdown
751
752
  ${this.canShowDropdown() ? "snk-data-exporter__dropdown--show" : ""}
752
753
  ` }, this.getElementID("dropdown")), this.canShowDropdown() &&
753
754
  h("ez-dropdown", Object.assign({ items: this._items, onEzClick: (evt) => this.processExporter(evt) }, this.getElementID("dropdown"))))), this.canShowDropdown() &&
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, e as createEvent, h, g as getElement, f as Host } from './index-04f73a26.js';
2
2
  import { ApplicationContext, Action, ObjectUtils, DataUnitAction, StringUtils } from '@sankhyalabs/core';
3
3
  import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
4
- import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder-c0bc4424.js';
5
- import { g as getRecordValue, a as DatasetStrategy } from './dataunit-fetcher-21c43ec7.js';
4
+ import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder-1eb7a1af.js';
5
+ import { g as getRecordValue, a as DatasetStrategy } from './dataunit-fetcher-050b6d31.js';
6
6
  import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
7
7
  import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
8
8
 
@@ -1,10 +1,10 @@
1
- export { S as snk_data_unit } from './snk-data-unit-3b06a0f3.js';
1
+ export { S as snk_data_unit } from './snk-data-unit-ca2c9858.js';
2
2
  import './index-04f73a26.js';
3
3
  import '@sankhyalabs/core';
4
4
  import '@sankhyalabs/ezui/dist/collection/utils';
5
- import './SnkMessageBuilder-c0bc4424.js';
6
- import './dataunit-fetcher-21c43ec7.js';
7
- import './DataFetcher-1dd7e8c0.js';
5
+ import './SnkMessageBuilder-1eb7a1af.js';
6
+ import './dataunit-fetcher-050b6d31.js';
7
+ import './DataFetcher-e60f8d53.js';
8
8
  import './PrintUtils-3e4ff0f5.js';
9
9
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
10
10
  import '@sankhyalabs/ezui/dist/collection/utils/constants';