@sankhyalabs/sankhyablocks 8.15.0-dev.2 → 8.15.0-dev.20

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 (215) hide show
  1. package/dist/cjs/{ConfigStorage-0d507a8f.js → ConfigStorage-302bbbd4.js} +25 -15
  2. package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
  3. package/dist/cjs/{SnkFormConfigManager-467907f6.js → SnkFormConfigManager-71c4768e.js} +1 -1
  4. package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-e7dcf408.js} +13 -0
  5. package/dist/cjs/{index-0e663819.js → index-0922807b.js} +1 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{dataunit-fetcher-bdaf9482.js → pesquisa-fetcher-e4a7c4c3.js} +254 -34
  8. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  9. package/dist/cjs/snk-actions-button_2.cjs.entry.js +23 -5
  10. package/dist/cjs/snk-application.cjs.entry.js +74 -6
  11. package/dist/cjs/snk-attach.cjs.entry.js +395 -57
  12. package/dist/cjs/snk-crud.cjs.entry.js +5 -6
  13. package/dist/cjs/snk-data-exporter.cjs.entry.js +4 -4
  14. package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-82c08a8c.js} +1 -1
  15. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  16. package/dist/cjs/snk-detail-view.cjs.entry.js +8 -9
  17. package/dist/cjs/snk-filter-bar.cjs.entry.js +40 -5
  18. package/dist/cjs/snk-filter-item.cjs.entry.js +3 -0
  19. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -2
  20. package/dist/cjs/snk-filter-modal.cjs.entry.js +16 -1
  21. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
  22. package/dist/cjs/snk-form.cjs.entry.js +2 -2
  23. package/dist/cjs/snk-grid-config.cjs.entry.js +1 -1
  24. package/dist/cjs/snk-grid.cjs.entry.js +41 -18
  25. package/dist/cjs/{snk-guides-viewer-9342bca1.js → snk-guides-viewer-d32c096f.js} +6 -7
  26. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -8
  27. package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
  28. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  29. package/dist/cjs/snk-simple-crud.cjs.entry.js +19 -8
  30. package/dist/cjs/snk-taskbar.cjs.entry.js +2 -2
  31. package/dist/cjs/{taskbar-elements-b8c428a9.js → taskbar-elements-01b85b99.js} +1 -1
  32. package/dist/collection/collection-manifest.json +1 -1
  33. package/dist/collection/components/snk-application/snk-application.js +119 -13
  34. package/dist/collection/components/snk-attach/snk-attach.js +194 -38
  35. package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
  36. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
  37. package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
  38. package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
  39. package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
  40. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
  41. package/dist/collection/components/snk-attach/structure/index.js +6 -3
  42. package/dist/collection/components/snk-crud/snk-crud.js +2 -2
  43. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +2 -2
  44. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
  45. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
  46. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +3 -0
  47. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +84 -2
  48. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +0 -1
  49. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +84 -3
  50. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +5 -1
  51. package/dist/collection/components/snk-grid/snk-grid.js +39 -16
  52. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
  53. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
  54. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +53 -1
  55. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +26 -1
  56. package/dist/collection/components/snk-taskbar/snk-taskbar.js +1 -1
  57. package/dist/collection/lib/@types/index.js +1 -0
  58. package/dist/collection/lib/configs/ConfigStorage.js +24 -14
  59. package/dist/collection/lib/dataUnit/InMemoryLoader.js +1 -1
  60. package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
  61. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
  62. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
  63. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
  64. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
  65. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
  66. package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
  67. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +31 -3
  68. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +55 -31
  69. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +1 -1
  70. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +7 -1
  71. package/dist/collection/lib/index.js +1 -1
  72. package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
  73. package/dist/components/ConfigStorage.js +25 -15
  74. package/dist/components/SnkMessageBuilder.js +13 -0
  75. package/dist/components/dataunit-fetcher.js +93 -35
  76. package/dist/components/index2.js +1 -0
  77. package/dist/components/snk-actions-button2.js +1 -0
  78. package/dist/components/snk-application2.js +73 -3
  79. package/dist/components/snk-attach2.js +400 -56
  80. package/dist/components/snk-crud.js +1 -1
  81. package/dist/components/snk-data-exporter2.js +1 -1
  82. package/dist/components/snk-detail-view2.js +1 -1
  83. package/dist/components/snk-filter-bar2.js +42 -5
  84. package/dist/components/snk-filter-item2.js +3 -0
  85. package/dist/components/snk-filter-modal-item2.js +0 -1
  86. package/dist/components/snk-filter-modal.js +21 -3
  87. package/dist/components/snk-filter-multi-select.js +2 -1
  88. package/dist/components/snk-grid2.js +38 -15
  89. package/dist/components/snk-personalized-filter2.js +1 -1
  90. package/dist/components/snk-pesquisa2.js +1 -1
  91. package/dist/components/snk-simple-crud2.js +15 -1
  92. package/dist/components/taskbar-actions-button2.js +21 -2
  93. package/dist/esm/{ConfigStorage-379a9cba.js → ConfigStorage-4151acc8.js} +25 -15
  94. package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
  95. package/dist/esm/{SnkFormConfigManager-587e9030.js → SnkFormConfigManager-5c7d3771.js} +1 -1
  96. package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0fb796b9.js} +13 -0
  97. package/dist/esm/{index-1564817d.js → index-0ece87a6.js} +1 -0
  98. package/dist/esm/loader.js +1 -1
  99. package/dist/esm/{dataunit-fetcher-cc1650eb.js → pesquisa-fetcher-fa0c2540.js} +255 -36
  100. package/dist/esm/sankhyablocks.js +1 -1
  101. package/dist/esm/snk-actions-button_2.entry.js +23 -5
  102. package/dist/esm/snk-application.entry.js +74 -6
  103. package/dist/esm/snk-attach.entry.js +396 -58
  104. package/dist/esm/snk-crud.entry.js +5 -6
  105. package/dist/esm/snk-data-exporter.entry.js +4 -4
  106. package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-5d201fb3.js} +1 -1
  107. package/dist/esm/snk-data-unit.entry.js +2 -2
  108. package/dist/esm/snk-detail-view.entry.js +8 -9
  109. package/dist/esm/snk-filter-bar.entry.js +40 -5
  110. package/dist/esm/snk-filter-item.entry.js +3 -0
  111. package/dist/esm/snk-filter-modal-item.entry.js +1 -2
  112. package/dist/esm/snk-filter-modal.entry.js +16 -1
  113. package/dist/esm/snk-filter-multi-select.entry.js +2 -1
  114. package/dist/esm/snk-form.entry.js +2 -2
  115. package/dist/esm/snk-grid-config.entry.js +1 -1
  116. package/dist/esm/snk-grid.entry.js +41 -18
  117. package/dist/esm/{snk-guides-viewer-9ce9588c.js → snk-guides-viewer-f49613c6.js} +6 -7
  118. package/dist/esm/snk-guides-viewer.entry.js +7 -8
  119. package/dist/esm/snk-personalized-filter.entry.js +2 -2
  120. package/dist/esm/snk-pesquisa.entry.js +1 -1
  121. package/dist/esm/snk-simple-crud.entry.js +17 -6
  122. package/dist/esm/snk-taskbar.entry.js +2 -2
  123. package/dist/esm/{taskbar-elements-26c981af.js → taskbar-elements-d4d0b424.js} +1 -1
  124. package/dist/sankhyablocks/p-02e3a45b.entry.js +1 -0
  125. package/dist/sankhyablocks/{p-ff6064e7.js → p-05243555.js} +1 -1
  126. package/dist/sankhyablocks/p-0ec5b2e5.js +1 -0
  127. package/dist/sankhyablocks/{p-729f5f5b.entry.js → p-1d75d9f9.entry.js} +1 -1
  128. package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
  129. package/dist/sankhyablocks/p-2582537c.entry.js +1 -0
  130. package/dist/sankhyablocks/p-282789a6.entry.js +1 -0
  131. package/dist/sankhyablocks/p-374d03f6.js +1 -0
  132. package/dist/sankhyablocks/p-38289a55.js +1 -0
  133. package/dist/sankhyablocks/p-3b0e4e08.js +65 -0
  134. package/dist/sankhyablocks/{p-35fe6e61.entry.js → p-40915359.entry.js} +1 -1
  135. package/dist/sankhyablocks/{p-2028633c.js → p-573a07c5.js} +1 -1
  136. package/dist/sankhyablocks/p-62896624.entry.js +1 -0
  137. package/dist/sankhyablocks/{p-953346b9.entry.js → p-69efa80d.entry.js} +1 -1
  138. package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
  139. package/dist/sankhyablocks/{p-aaa1438e.entry.js → p-761ed32f.entry.js} +1 -1
  140. package/dist/sankhyablocks/p-7f3c7b09.entry.js +1 -0
  141. package/dist/sankhyablocks/{p-6977a26c.entry.js → p-86801b08.entry.js} +1 -1
  142. package/dist/sankhyablocks/p-9b5944a4.entry.js +1 -0
  143. package/dist/sankhyablocks/p-9bdbc7d8.entry.js +1 -0
  144. package/dist/sankhyablocks/p-aa95fb2c.js +56 -0
  145. package/dist/sankhyablocks/p-ac384baf.entry.js +1 -0
  146. package/dist/sankhyablocks/p-b05ab13d.entry.js +1 -0
  147. package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
  148. package/dist/sankhyablocks/p-c4874327.entry.js +1 -0
  149. package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
  150. package/dist/sankhyablocks/p-e0fd9555.entry.js +1 -0
  151. package/dist/sankhyablocks/p-e817f254.entry.js +11 -0
  152. package/dist/sankhyablocks/{p-32f0935f.js → p-f3d1c48e.js} +1 -1
  153. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  154. package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
  155. package/dist/types/components/snk-application/snk-application.d.ts +12 -2
  156. package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
  157. package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
  158. package/dist/types/components/snk-attach/snk-attach.d.ts +28 -6
  159. package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
  160. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
  161. package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
  162. package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
  163. package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
  164. package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
  165. package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
  166. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -1
  167. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +19 -1
  168. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +16 -0
  169. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +7 -1
  170. package/dist/types/components/snk-grid/snk-grid.d.ts +1 -0
  171. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -1
  172. package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +2 -0
  173. package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +1 -0
  174. package/dist/types/components.d.ts +108 -13
  175. package/dist/types/lib/@types/index.d.ts +2 -1
  176. package/dist/types/lib/configs/ConfigStorage.d.ts +4 -0
  177. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
  178. package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
  179. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
  180. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
  181. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
  182. package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
  183. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -0
  184. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +4 -1
  185. package/dist/types/lib/index.d.ts +1 -1
  186. package/package.json +15 -6
  187. package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
  188. package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
  189. package/dist/sankhyablocks/p-145c4434.js +0 -1
  190. package/dist/sankhyablocks/p-17dda7a2.entry.js +0 -1
  191. package/dist/sankhyablocks/p-19f51c6b.entry.js +0 -11
  192. package/dist/sankhyablocks/p-20726710.entry.js +0 -1
  193. package/dist/sankhyablocks/p-311c6173.entry.js +0 -1
  194. package/dist/sankhyablocks/p-4396d1a6.js +0 -56
  195. package/dist/sankhyablocks/p-44e894af.entry.js +0 -1
  196. package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
  197. package/dist/sankhyablocks/p-4b0ea83f.entry.js +0 -1
  198. package/dist/sankhyablocks/p-5534e08c.js +0 -1
  199. package/dist/sankhyablocks/p-78777ae0.entry.js +0 -1
  200. package/dist/sankhyablocks/p-9c3229fc.entry.js +0 -1
  201. package/dist/sankhyablocks/p-a037f5b4.entry.js +0 -1
  202. package/dist/sankhyablocks/p-a702a1a2.js +0 -60
  203. package/dist/sankhyablocks/p-c259545b.entry.js +0 -1
  204. package/dist/sankhyablocks/p-d1677df0.entry.js +0 -1
  205. package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
  206. package/dist/sankhyablocks/p-dd6a8377.js +0 -1
  207. package/dist/sankhyablocks/p-e138e7d4.entry.js +0 -1
  208. package/dist/sankhyablocks/p-e1b29d4c.entry.js +0 -1
  209. package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
  210. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
  211. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
  212. /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
  213. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
  214. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
  215. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -317,7 +317,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
317
317
  return;
318
318
  }
319
319
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
320
- return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "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, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, 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, 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, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, 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, 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 })), 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" }))));
320
+ return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "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 }, 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, 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 }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, 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, 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 })), 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" }))));
321
321
  }
322
322
  get _element() { return this; }
323
323
  static get watchers() { return {
@@ -442,7 +442,7 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
442
442
  pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
443
443
  pkObject['pks'] = [];
444
444
  }
445
- const dataFields = { nome: name, tipo: type, valor: value };
445
+ const dataFields = { nome: name, tipo: this.parseDataType(type), valor: value };
446
446
  fields['fields'].push(dataFields);
447
447
  pkObject['pks'].push(fields);
448
448
  });
@@ -176,7 +176,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
176
176
  });
177
177
  this._guides = this._guides.map(guide => {
178
178
  if (guide.id === guideItem.id) {
179
- return Object.assign(Object.assign({}, guide), guideItem);
179
+ return Object.assign(Object.assign(Object.assign({}, guide), guideItem), (guideItem.children !== undefined ? {} : { children: undefined }));
180
180
  }
181
181
  return guide;
182
182
  });
@@ -209,13 +209,15 @@ function buildPersonalized(item) {
209
209
  }
210
210
 
211
211
  class SnkFilterModalFactory {
212
- constructor({ filterConfig, configName, onComplete, getMessage, onAddPersonalizedFilter, onEditPersonalizedFilter }) {
212
+ constructor({ filterConfig, configName, onComplete, getMessage, disablePersonalizedFilter, onAddPersonalizedFilter, onEditPersonalizedFilter, onDeletePersonalizedFilter }) {
213
213
  this._filterConfig = filterConfig;
214
214
  this._configName = configName;
215
215
  this._onComplete = onComplete;
216
216
  this._getMessage = getMessage;
217
+ this._disablePersonalizedFilter = disablePersonalizedFilter;
217
218
  this._addPersonalizedFilterFn = onAddPersonalizedFilter;
218
219
  this._editPersonalizedFilterFn = onEditPersonalizedFilter;
220
+ this._onDeletePersonalizedFilter = onDeletePersonalizedFilter;
219
221
  }
220
222
  applyFilters(newFilterConfig) {
221
223
  this._onComplete(newFilterConfig);
@@ -226,11 +228,13 @@ class SnkFilterModalFactory {
226
228
  filterModal.className = "ez-size-height--full";
227
229
  filterModal.filters = this._filterConfig;
228
230
  filterModal.configName = this._configName;
231
+ filterModal.disablePersonalizedFilter = this._disablePersonalizedFilter;
229
232
  filterModal.getMessage = this._getMessage.bind(this);
230
233
  filterModal.applyFilters = this.applyFilters.bind(this);
231
234
  filterModal.closeModal = () => this._closeModal();
232
235
  filterModal.addPersonalizedFilter = () => this._addPersonalizedFilterFn();
233
236
  filterModal.editPersonalizedFilter = (id) => this._editPersonalizedFilterFn(id);
237
+ filterModal.deletePersonalizedFilter = (filter, configName) => this._onDeletePersonalizedFilter(filter, configName);
234
238
  return filterModal;
235
239
  }
236
240
  async showModal() {
@@ -279,6 +283,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
279
283
  this.resourceID = undefined;
280
284
  this.filterConfig = undefined;
281
285
  this.messagesBuilder = undefined;
286
+ this.disablePersonalizedFilter = undefined;
282
287
  this.allowDefault = undefined;
283
288
  this.scrollerLocked = false;
284
289
  this.showPersonalizedFilter = false;
@@ -322,7 +327,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
322
327
  * Faz o recarregamento da filterbar buscando o state no servidor.
323
328
  */
324
329
  async reload() {
325
- this.loadConfigFromStorage();
330
+ this.loadConfigFromStorage(true);
326
331
  }
327
332
  /**
328
333
  * Retorna um item de filtro pelo ID.
@@ -362,6 +367,23 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
362
367
  this.updateFilter(filterItem);
363
368
  return Promise.resolve();
364
369
  }
370
+ /**
371
+ * Remove um item de filtro.
372
+ *
373
+ * @param filterID - ID do a ser adicionado
374
+ *
375
+ * @returns {Promise<SnkFilterItemConfig|undefined>} - Retorna o item de filtro removido, ou undefined caso não encontrado.
376
+ */
377
+ async removeFilterItem(filterID) {
378
+ const itemIndex = this.filterConfig.findIndex(item => item.id === filterID);
379
+ if (itemIndex == -1) {
380
+ console.warn("[SnkFilterBar.removeFilterItem] FilterItem não encontrado");
381
+ return Promise.resolve(undefined);
382
+ }
383
+ const itemToRemove = this.filterConfig[itemIndex];
384
+ this.filterConfig = this.filterConfig.filter(item => item.id !== filterID);
385
+ return Promise.resolve(itemToRemove);
386
+ }
365
387
  componentDidLoad() {
366
388
  if (this._element) {
367
389
  const dataInfo = { dataUnit: this.dataUnit };
@@ -409,6 +431,9 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
409
431
  */
410
432
  getMessage(key, params, defaultValue) {
411
433
  var _a;
434
+ if (this.messagesBuilder == undefined && this._application) {
435
+ this.messagesBuilder = this._application.messagesBuilder;
436
+ }
412
437
  return ((_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params)) || defaultValue;
413
438
  }
414
439
  getFilter(_dataUnit) {
@@ -512,7 +537,10 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
512
537
  loadPermitions() {
513
538
  this._application.isUserSup().then(value => this.allowDefault = value);
514
539
  }
515
- loadConfigFromStorage() {
540
+ async loadConfigFromStorage(clearCache) {
541
+ if (clearCache) {
542
+ await ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
543
+ }
516
544
  return new Promise(accept => {
517
545
  ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name })
518
546
  .then((filters) => {
@@ -567,9 +595,11 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
567
595
  filterConfig: filtersConfigCopy,
568
596
  configName: this.configName,
569
597
  onComplete: callbackOnApplyFilter,
598
+ disablePersonalizedFilter: this.disablePersonalizedFilter,
570
599
  getMessage: (key, props) => this.getMessage(key, props),
571
600
  onAddPersonalizedFilter: () => this.addPersonalizedFilter(),
572
- onEditPersonalizedFilter: (id) => this.editPersonalizedFilter(id)
601
+ onEditPersonalizedFilter: (id) => this.editPersonalizedFilter(id),
602
+ onDeletePersonalizedFilter: (filter, configName) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName),
573
603
  };
574
604
  this._filterModalFactory = new SnkFilterModalFactory(factoryParams);
575
605
  await this._filterModalFactory.showModal();
@@ -587,6 +617,11 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
587
617
  this.showPersonalizedFilter = true;
588
618
  this.personalizedFilterId = id;
589
619
  }
620
+ deletePersonalizedFilter(filter, filterItemType, configName) {
621
+ if (filterItemType === FilterItemType.PERSONALIZED) {
622
+ ConfigStorage.removePersonalizedFilter(filter, this.resourceID, configName);
623
+ }
624
+ }
590
625
  handleHidePersonalizedFilter(reloadFilterBar) {
591
626
  if (reloadFilterBar) {
592
627
  this.loadConfigFromStorage().then(() => {
@@ -632,6 +667,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
632
667
  "resourceID": [1, "resource-i-d"],
633
668
  "filterConfig": [1040],
634
669
  "messagesBuilder": [1040],
670
+ "disablePersonalizedFilter": [4, "disable-personalized-filter"],
635
671
  "allowDefault": [32],
636
672
  "scrollerLocked": [32],
637
673
  "showPersonalizedFilter": [32],
@@ -639,7 +675,8 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
639
675
  "reload": [64],
640
676
  "getFilterItem": [64],
641
677
  "updateFilterItem": [64],
642
- "addFilterItem": [64]
678
+ "addFilterItem": [64],
679
+ "removeFilterItem": [64]
643
680
  }, [[0, "filterChange", "filterChangeListener"]]]);
644
681
  function defineCustomElement() {
645
682
  if (typeof customElements === "undefined") {
@@ -260,6 +260,9 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
260
260
  }
261
261
  canClearFilter() {
262
262
  const { value, groupedItems = [] } = this.config;
263
+ if (value != undefined && this.config.type === FilterItemType.MULTI_LIST) {
264
+ return value.some((item) => item.check);
265
+ }
263
266
  return value !== undefined || groupedItems.some(item => item.visible);
264
267
  }
265
268
  getRightIconName() {
@@ -56,7 +56,6 @@ const SnkFilterModalItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
56
56
  buildSnkFilterPersonalizedProps() {
57
57
  return {
58
58
  tag: "snk-personalized-filter-editor", props: {
59
- onDeleteFilter: (event) => this.handleDeleteFilter(event.detail, FilterItemType.PERSONALIZED),
60
59
  onEditFilter: (event) => this.editPersonalizedFilter.emit(event.detail),
61
60
  onAddFilter: () => this.addPersonalizedFilter.emit(),
62
61
  }
@@ -20,6 +20,15 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
20
20
  this.closeModal = undefined;
21
21
  this.addPersonalizedFilter = undefined;
22
22
  this.editPersonalizedFilter = undefined;
23
+ this.deletePersonalizedFilter = undefined;
24
+ this.filtersToDelete = [];
25
+ this.disablePersonalizedFilter = undefined;
26
+ }
27
+ /**
28
+ * Emitido quando um filtro personalizado é deletado.
29
+ */
30
+ deletePersonalizedFilterListener(event) {
31
+ this.filtersToDelete.push(event.detail);
23
32
  }
24
33
  getCustomMessage(key, params) {
25
34
  var _a;
@@ -87,6 +96,12 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
87
96
  if (this.isValidCustomFilter(filterPersonalized)) {
88
97
  this.applyFilters(this.filters);
89
98
  }
99
+ if (this.filtersToDelete.length > 0) {
100
+ this.filtersToDelete.forEach(filter => {
101
+ this.deletePersonalizedFilter(filter, this.configName);
102
+ });
103
+ this.filtersToDelete = [];
104
+ }
90
105
  }
91
106
  isValidCustomFilter(filterPersonalized) {
92
107
  const isValid = PersonalizedFilterUtils.validateVariableValues(filterPersonalized);
@@ -222,7 +237,7 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
222
237
  const customFilters = this.filters.filter(filter => filter.filterType === FilterType.CUSTOM_FILTER);
223
238
  const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
224
239
  const otherFilters = this.filters.filter(filter => filter.filterType === FilterType.OTHER_FILTERS);
225
- return (h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" }, this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true)))));
240
+ return (h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" }, !this.disablePersonalizedFilter && this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true)))));
226
241
  }
227
242
  static get style() { return snkFilterModalCss; }
228
243
  }, [0, "snk-filter-modal", {
@@ -232,8 +247,11 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
232
247
  "applyFilters": [16],
233
248
  "closeModal": [16],
234
249
  "addPersonalizedFilter": [16],
235
- "editPersonalizedFilter": [16]
236
- }]);
250
+ "editPersonalizedFilter": [16],
251
+ "deletePersonalizedFilter": [16],
252
+ "filtersToDelete": [16],
253
+ "disablePersonalizedFilter": [4, "disable-personalized-filter"]
254
+ }, [[0, "deleteFilter", "deletePersonalizedFilterListener"]]]);
237
255
  function defineCustomElement$1() {
238
256
  if (typeof customElements === "undefined") {
239
257
  return;
@@ -14,7 +14,8 @@ const SnkFilterMultiSelect$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
14
14
  * Emitido quando acontece a alteração de valor do componente snk-filter-multi-select
15
15
  */
16
16
  ezChangeListener(evt) {
17
- this.value = evt.detail.value;
17
+ var _a;
18
+ this.value = (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value;
18
19
  this.valueChanged.emit(this.value);
19
20
  }
20
21
  /**
@@ -36,14 +36,21 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
36
36
  this._topTaskbarProcessor = new TaskbarProcessor({
37
37
  "snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
38
38
  "snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
39
+ "snkGridTopTaskbar.regular.singleTaskbar": [],
39
40
  "snkGridTopTaskbar.finish_edition": ["CANCEL", "SAVE"],
40
- "snkGridTopTaskbar.finish_edition.secondary": []
41
+ "snkGridTopTaskbar.finish_edition.secondary": [],
42
+ "snkGridTopTaskbar.finish_edition.singleTaskbar": [],
41
43
  });
42
44
  this._headerTaskbarProcessor = new TaskbarProcessor({
43
45
  "snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
44
46
  "snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
45
47
  "snkGridHeaderTaskbar.detail.unselected": ["REFRESH", "MORE_OPTIONS"],
46
- "snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
48
+ "snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"],
49
+ "snkGridHeaderTaskbar.singleTaskbar.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
50
+ "snkGridHeaderTaskbar.singleTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
51
+ "snkGridHeaderTaskbar.singleTaskbar.detail.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "MORE_OPTIONS"],
52
+ "snkGridHeaderTaskbar.singleTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "FORM_MODE", "CONFIGURATOR", "REFRESH"],
53
+ "snkGridHeaderTaskbar.singleTaskbar.finish_edition": ["CANCEL", "SAVE"]
47
54
  });
48
55
  this._dataUnit = undefined;
49
56
  this._dataState = undefined;
@@ -324,30 +331,46 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
324
331
  return invisibleButtons;
325
332
  }
326
333
  componentWillRender() {
327
- var _a;
328
334
  const invisibleButtons = this.getInvisibleButtons();
329
- const hasSelectedRecord = this._dataState && !!((_a = this._dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.length);
330
- let headerTaskbarId;
331
- if (hasSelectedRecord) {
332
- headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.selected" : "snkGridHeaderTaskbar.selected";
333
- }
334
- else {
335
- headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.unselected" : "snkGridHeaderTaskbar.unselected";
336
- }
337
- this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
335
+ this._headerTaskbarProcessor.process(this.getHeaderTaskbarId(), this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
338
336
  this._topTaskbarProcessor.process(this.getTopTaskBarId(), this.taskbarManager, this._dataState, undefined, invisibleButtons);
339
337
  this.dataExporterProviderStore();
340
338
  }
339
+ getHeaderTaskbarId() {
340
+ var _a, _b;
341
+ const hasSelectedRecord = this._dataState && !!((_a = this._dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.length);
342
+ const taskbarIdPrefixLookup = {
343
+ primary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
344
+ secondary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
345
+ singleTaskbar: this.isDetail ? "snkGridHeaderTaskbar.singleTaskbar.detail" : "snkGridHeaderTaskbar.singleTaskbar"
346
+ };
347
+ const taskbarIdPrefix = taskbarIdPrefixLookup[this.presentationMode];
348
+ let headerTaskbarId = hasSelectedRecord ? `${taskbarIdPrefix}.selected` : `${taskbarIdPrefix}.unselected`;
349
+ if (((_b = this._dataState) === null || _b === void 0 ? void 0 : _b.isDirty) && this.presentationMode === PresentationMode.SINGLE_TASKBAR) {
350
+ headerTaskbarId = "snkGridHeaderTaskbar.singleTaskbar.finish_edition";
351
+ }
352
+ return headerTaskbarId;
353
+ }
341
354
  getTopTaskBarId() {
342
355
  var _a;
343
- const sufix = this.presentationMode === PresentationMode.SECONDARY ? ".secondary" : "";
356
+ const suffixLookup = {
357
+ primary: "",
358
+ secondary: ".secondary",
359
+ singleTaskbar: ".singleTaskbar"
360
+ };
361
+ const sufix = suffixLookup[this.presentationMode];
344
362
  if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
345
363
  return `snkGridTopTaskbar.finish_edition${sufix}`;
346
364
  }
347
365
  return `snkGridTopTaskbar.regular${sufix}`;
348
366
  }
349
367
  getPrimaryButton() {
350
- return this.presentationMode === PresentationMode.PRIMARY ? "INSERT" : "";
368
+ const primaryButtonLookup = {
369
+ primary: "INSERT",
370
+ secondary: "",
371
+ singleTaskbar: "INSERT"
372
+ };
373
+ return primaryButtonLookup[this.presentationMode];
351
374
  }
352
375
  getColumnSearch(actionButton, item) {
353
376
  if (this._columnSearch != undefined) {
@@ -398,7 +421,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
398
421
  return undefined;
399
422
  }
400
423
  return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
401
- h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, 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) }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
424
+ h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, 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) }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
402
425
  }
403
426
  get _element() { return this; }
404
427
  static get style() { return snkGridCss; }
@@ -202,7 +202,7 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
202
202
  return personalizedFilter;
203
203
  }
204
204
  addFilterGroupCondition(personalizedFilter) {
205
- if (!personalizedFilter.assistent.operand) {
205
+ if (personalizedFilter.assistent && !personalizedFilter.assistent.operand) {
206
206
  personalizedFilter.assistent.operand = FilterGroupCondition.AND;
207
207
  }
208
208
  }
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { ObjectUtils, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
3
3
 
4
- const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--medium, 12px);max-height:100%;height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records.sc-snk-pesquisa{font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);color:var(--snk-pesquisa__records--color);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}";
4
+ const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--medium, 12px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records.sc-snk-pesquisa{font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);color:var(--snk-pesquisa__records--color);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}";
5
5
 
6
6
  const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
7
  constructor() {
@@ -51,6 +51,8 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
51
51
  this.taskbarManager = undefined;
52
52
  this.messagesBuilder = undefined;
53
53
  this.useEnterLikeTab = false;
54
+ this.actionsList = undefined;
55
+ this.configName = undefined;
54
56
  }
55
57
  resolveInMemoryBtns(taskbarButtons) {
56
58
  const newTaskBarConfig = [...taskbarButtons];
@@ -249,7 +251,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
249
251
  }
250
252
  getActionsList() {
251
253
  var _a, _b;
252
- return [{
254
+ const hardList = [{
253
255
  value: StringUtils.generateUUID(),
254
256
  label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findColumn", undefined)) !== null && _b !== void 0 ? _b : "Buscar",
255
257
  disableCloseOnSelect: true,
@@ -258,6 +260,16 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
258
260
  ? this.getColumnSearch(actionButton, item)
259
261
  : this.getFieldSearch(actionButton, item)
260
262
  }];
263
+ if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
264
+ const taskbarID = this.getTopTaskBarId();
265
+ return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this.dataState, this.actionsList));
266
+ }
267
+ return hardList.concat(this.actionsList);
268
+ }
269
+ getTopTaskBarId() {
270
+ var _a;
271
+ return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? `snkGridTopTaskbar.finish_edition${PresentationMode.PRIMARY}` :
272
+ `snkGridTopTaskbar.regular${PresentationMode.PRIMARY}`;
261
273
  }
262
274
  async keyDownListener(event) {
263
275
  if (!event.ctrlKey || event.key == undefined || event.key.toUpperCase() !== "F") {
@@ -319,6 +331,8 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
319
331
  "taskbarManager": [16],
320
332
  "messagesBuilder": [1040],
321
333
  "useEnterLikeTab": [4, "use-enter-like-tab"],
334
+ "actionsList": [16],
335
+ "configName": [1025, "config-name"],
322
336
  "_currentViewMode": [32],
323
337
  "_config": [32],
324
338
  "_fieldToGetFocus": [32],
@@ -19,6 +19,9 @@ const TaskbarActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTML
19
19
  await this.hideActions();
20
20
  }
21
21
  }
22
+ async handleClose() {
23
+ await this.hideActions();
24
+ }
22
25
  /**
23
26
  * Exibe a lista de ações.
24
27
  */
@@ -64,12 +67,28 @@ const TaskbarActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTML
64
67
  return this._showDropdown && ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
65
68
  }
66
69
  onSelectAction(iAction) {
67
- const selectedAction = this.actions.find(action => action.value === iAction.id);
70
+ const actions = this.actions.map(action => (Object.assign(Object.assign({}, action), { id: action.value })));
71
+ const selectedAction = this.getSelectedAction(iAction.id, actions);
68
72
  this.taskbarActionSelected.emit(selectedAction);
69
73
  if (!selectedAction.disableCloseOnSelect) {
70
74
  this._showDropdown = false;
71
75
  }
72
76
  }
77
+ getSelectedAction(id, actions) {
78
+ let selectedItem = null;
79
+ for (const item of actions) {
80
+ if (item.id === id) {
81
+ selectedItem = item;
82
+ break;
83
+ }
84
+ if (!(item === null || item === void 0 ? void 0 : item.children))
85
+ continue;
86
+ selectedItem = this.getSelectedAction(id, item.children);
87
+ if (selectedItem)
88
+ break;
89
+ }
90
+ return selectedItem;
91
+ }
73
92
  dropdownItemBuilder(item, _level) {
74
93
  const itemAction = this.actions.find(action => action.value === item.id);
75
94
  if (!itemAction || !itemAction.itemBuilder) {
@@ -119,7 +138,7 @@ const TaskbarActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTML
119
138
  "showActions": [64],
120
139
  "hideActions": [64],
121
140
  "isOpened": [64]
122
- }, [[8, "keydown", "handleKeyDown"]]]);
141
+ }, [[8, "keydown", "handleKeyDown"], [8, "ezOpenModal", "handleClose"]]]);
123
142
  function defineCustomElement() {
124
143
  if (typeof customElements === "undefined") {
125
144
  return;
@@ -148,7 +148,7 @@ class FilterBarConfigFetcher extends ResourceFetcher {
148
148
  multilistValueArray = Array.isArray(multilistValueArray) ? multilistValueArray : [multilistValueArray];
149
149
  // Existem cenários onde o HTML5 não salva o Id do filtro, apenas seu label e value
150
150
  multilistValueArray = multilistValueArray.map(itemRaw => {
151
- return Object.assign(Object.assign({}, itemRaw), { id: itemRaw.id ? itemRaw.id : itemRaw.value });
151
+ return Object.assign(Object.assign({}, itemRaw), { id: (itemRaw.id !== undefined) ? itemRaw.id : itemRaw.value });
152
152
  });
153
153
  item.value = ObjectUtils.copy(multilistValueArray);
154
154
  }
@@ -351,11 +351,12 @@ class PersonalizedFilterFetcher {
351
351
  }
352
352
  }
353
353
 
354
- const CONFIG_SOURCE = {
355
- form: "form",
356
- grid: "grid",
357
- filterBar: "filterBar"
358
- };
354
+ var CONFIG_SOURCE;
355
+ (function (CONFIG_SOURCE) {
356
+ CONFIG_SOURCE["form"] = "form";
357
+ CONFIG_SOURCE["grid"] = "grid";
358
+ CONFIG_SOURCE["filterBar"] = "filterBar";
359
+ })(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
359
360
  class ConfigStorage {
360
361
  static preload(resourceID, configName) {
361
362
  ConfigStorage.loadFormConfig(configName, resourceID);
@@ -383,13 +384,11 @@ class ConfigStorage {
383
384
  return ConfigStorage.configById.get(cacheID);
384
385
  }
385
386
  static async saveFilterBarConfig(config, name, resourceID) {
386
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.filterBar, resourceID);
387
- this.configById.delete(cacheID);
387
+ await this.deleteFilterBarConfigCache(name, resourceID);
388
388
  return this.filterBarConfigFetcher.saveConfig(config, resourceID, name);
389
389
  }
390
390
  static async saveFormConfig(config, name, resourceID) {
391
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.form, resourceID);
392
- this.configById.delete(cacheID);
391
+ await this.deleteFormConfigCache(name, resourceID);
393
392
  return this.formConfigFetcher.saveConfig(config, name, resourceID);
394
393
  }
395
394
  static async saveCardState(config, name, resourceID) {
@@ -399,18 +398,16 @@ class ConfigStorage {
399
398
  if (config == undefined) {
400
399
  return;
401
400
  }
402
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.grid, resourceID);
403
- this.configById.delete(cacheID);
401
+ await this.deleteGridConfigCache(name, resourceID);
404
402
  return this.gridConfigFetcher.saveConfig(config, name, resourceID);
405
403
  }
406
404
  static async loadPersonalizedFilter(filterId, resourceID, configName) {
407
405
  return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName);
408
406
  }
409
407
  static async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
410
- //Ao criar ou alterar um filtro personalizado,
408
+ //Ao criar ou alterar um filtro personalizado,
411
409
  //precisamos remover o cache do status da filterbar.
412
- const cacheID = this.buildCacheID(configName, CONFIG_SOURCE.filterBar, resourceID);
413
- this.configById.delete(cacheID);
410
+ await this.deleteFilterBarConfigCache(configName, resourceID);
414
411
  return this.personalizedFilterFetcher.savePersonalizedFilter(personalizedFilter, resourceID, configName);
415
412
  }
416
413
  static async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
@@ -419,6 +416,19 @@ class ConfigStorage {
419
416
  static async validatePersonalizedFilter(dataUnitName, expression) {
420
417
  return this.personalizedFilterFetcher.validatePersonalizedFilter(dataUnitName, expression);
421
418
  }
419
+ static async deleteGridConfigCache(name, resourceID) {
420
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.grid);
421
+ }
422
+ static async deleteFormConfigCache(name, resourceID) {
423
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.form);
424
+ }
425
+ static async deleteFilterBarConfigCache(name, resourceID) {
426
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
427
+ }
428
+ static async deleteConfigCache(name, resourceID, source) {
429
+ const cacheID = ConfigStorage.buildCacheID(name, source, resourceID);
430
+ this.configById.delete(cacheID);
431
+ }
422
432
  static buildCacheID(name, source, resourceID) {
423
433
  if (name == undefined) {
424
434
  return `req_${source}_${resourceID}`;
@@ -3,6 +3,7 @@ var SaveErrorsEnum;
3
3
  SaveErrorsEnum["LINK_AND_FILE_AT_THE_SAME_TIME"] = "LINK_AND_FILE_AT_THE_SAME_TIME";
4
4
  SaveErrorsEnum["ANY_LINK_OR_FILE_FILLED"] = "ANY_LINK_OR_FILE_FILLED";
5
5
  SaveErrorsEnum["UNKNOWN"] = "UNKNOWN";
6
+ SaveErrorsEnum["DESCRIPTION_CANNOT_BE_CHANGED"] = "DESCRIPTION_CANNOT_BE_CHANGED";
6
7
  })(SaveErrorsEnum || (SaveErrorsEnum = {}));
7
8
 
8
9
  export { SaveErrorsEnum as S };
@@ -1,4 +1,4 @@
1
- import { C as ConfigStorage } from './ConfigStorage-379a9cba.js';
1
+ import { C as ConfigStorage } from './ConfigStorage-4151acc8.js';
2
2
  import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
3
3
  import { F as FormConfigFetcher } from './form-config-fetcher-36219cd3.js';
4
4
 
@@ -351,11 +351,24 @@ const snkAttachMessages = {
351
351
  anyLinkOrFileFilled: {
352
352
  title: "Atenção",
353
353
  message: `É necessário preencher o campo "Link" ou anexar um arquivo.`
354
+ },
355
+ descriptionCannotBeChanged: {
356
+ title: "Atenção",
357
+ message: "O campo 'Descrição' não pode ser alterado."
354
358
  }
355
359
  },
356
360
  taskbar: {
357
361
  titleDownload: "Fazer download",
358
362
  titleLink: "Abrir link",
363
+ },
364
+ attachMetadata: {
365
+ lblCode: "Código",
366
+ lblDescription: "Descrição",
367
+ lblFileOrLink: "Arquivo / Link",
368
+ lblUser: "Usuário",
369
+ lblDate: "Data de alteração",
370
+ lblFile: "Arquivo",
371
+ lblSubTitle: "Clique para selecionar um arquivo",
359
372
  }
360
373
  };
361
374
 
@@ -2,6 +2,7 @@ var PresentationMode;
2
2
  (function (PresentationMode) {
3
3
  PresentationMode["PRIMARY"] = "primary";
4
4
  PresentationMode["SECONDARY"] = "secondary";
5
+ PresentationMode["SINGLE_TASKBAR"] = "singleTaskbar";
5
6
  })(PresentationMode || (PresentationMode = {}));
6
7
  var DataExporterOption;
7
8
  (function (DataExporterOption) {