@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-76362.0 → 0.0.0-bugfix-dev-KB-74224.1

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 (185) hide show
  1. package/dist/cjs/{ConfigStorage-f079f5fd.js → ConfigStorage-ecc0ed20.js} +2 -2
  2. package/dist/cjs/{ContinuousInsertUtils-64e47516.js → ContinuousInsertUtils-29b65619.js} +20 -29
  3. package/dist/cjs/{DataFetcher-e059eb72.js → DataFetcher-cadeef8e.js} +5 -7
  4. package/dist/cjs/{SnkFormConfigManager-63369164.js → SnkFormConfigManager-f1c92f79.js} +2 -2
  5. package/dist/cjs/{SnkMessageBuilder-7691a2c1.js → SnkMessageBuilder-bae64d0d.js} +0 -10
  6. package/dist/cjs/{auth-fetcher-4f853233.js → auth-fetcher-d68841bc.js} +1 -1
  7. package/dist/cjs/{dataunit-fetcher-228016f4.js → dataunit-fetcher-f89461c1.js} +3 -3
  8. package/dist/cjs/{form-config-fetcher-39397ac5.js → form-config-fetcher-ed497282.js} +1 -1
  9. package/dist/cjs/index-f9e81701.js +28 -16
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/{pesquisa-fetcher-a9bfeb22.js → pesquisa-fetcher-ca89181c.js} +2 -7
  12. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  13. package/dist/cjs/snk-actions-button_4.cjs.entry.js +30 -27
  14. package/dist/cjs/snk-application.cjs.entry.js +60 -102
  15. package/dist/cjs/snk-attach.cjs.entry.js +5 -5
  16. package/dist/cjs/snk-config-options.cjs.entry.js +239 -0
  17. package/dist/cjs/snk-crud.cjs.entry.js +5 -5
  18. package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -6
  19. package/dist/cjs/{snk-data-unit-7dbdad0e.js → snk-data-unit-668dc5e8.js} +2 -2
  20. package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
  21. package/dist/cjs/snk-detail-view.cjs.entry.js +8 -8
  22. package/dist/cjs/{snk-filter-bar_4.cjs.entry.js → snk-filter-bar.cjs.entry.js} +3 -688
  23. package/dist/cjs/snk-filter-item.cjs.entry.js +312 -0
  24. package/dist/cjs/snk-filter-list.cjs.entry.js +152 -0
  25. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  26. package/dist/cjs/snk-filter-modal.cjs.entry.js +249 -0
  27. package/dist/cjs/{snk-config-options_3.cjs.entry.js → snk-form-config.cjs.entry.js} +3 -365
  28. package/dist/cjs/snk-form.cjs.entry.js +144 -0
  29. package/dist/cjs/snk-grid.cjs.entry.js +6 -6
  30. package/dist/cjs/{snk-guides-viewer-eee43c8b.js → snk-guides-viewer-4236cb9d.js} +5 -8
  31. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  32. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  33. package/dist/cjs/snk-simple-crud.cjs.entry.js +14 -14
  34. package/dist/collection/collection-manifest.json +31 -14
  35. package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -26
  36. package/dist/collection/components/snk-application/snk-application.js +53 -3
  37. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +0 -3
  38. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +7 -7
  39. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +6 -8
  40. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +2 -2
  41. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +1 -6
  42. package/dist/collection/lib/message/SnkMessageBuilder.js +0 -2
  43. package/dist/collection/lib/utils/CrudUtils.js +16 -25
  44. package/dist/components/ContinuousInsertUtils.js +16 -25
  45. package/dist/components/DataFetcher.js +5 -7
  46. package/dist/components/SnkMessageBuilder.js +0 -10
  47. package/dist/components/dataunit-fetcher.js +2 -2
  48. package/dist/components/index.d.ts +0 -3
  49. package/dist/components/index.js +0 -3
  50. package/dist/components/pesquisa-fetcher.js +1 -6
  51. package/dist/components/snk-actions-button2.js +27 -26
  52. package/dist/components/snk-application2.js +53 -95
  53. package/dist/components/snk-detail-view2.js +0 -3
  54. package/dist/components/snk-simple-crud2.js +7 -7
  55. package/dist/esm/{ConfigStorage-6514d66e.js → ConfigStorage-7b36d041.js} +2 -2
  56. package/dist/esm/{ContinuousInsertUtils-b62906f9.js → ContinuousInsertUtils-30caa626.js} +20 -29
  57. package/dist/esm/{DataFetcher-5034df59.js → DataFetcher-a9c598f2.js} +5 -7
  58. package/dist/esm/{SnkFormConfigManager-b409c745.js → SnkFormConfigManager-139f09fa.js} +3 -3
  59. package/dist/esm/{SnkMessageBuilder-7ace6803.js → SnkMessageBuilder-6fff4a4c.js} +0 -10
  60. package/dist/esm/{auth-fetcher-ca5d3a49.js → auth-fetcher-749d880f.js} +1 -1
  61. package/dist/esm/{constants-7302ee87.js → constants-8457af36.js} +1 -1
  62. package/dist/esm/{dataunit-fetcher-56cb648b.js → dataunit-fetcher-c24c76c6.js} +3 -3
  63. package/dist/esm/{form-config-fetcher-a7d3e277.js → form-config-fetcher-adbe5d34.js} +1 -1
  64. package/dist/esm/index-a7d3d3f1.js +28 -16
  65. package/dist/esm/loader.js +1 -1
  66. package/dist/esm/{pesquisa-fetcher-6bc2e41a.js → pesquisa-fetcher-8edaa8cd.js} +2 -7
  67. package/dist/esm/sankhyablocks.js +1 -1
  68. package/dist/esm/snk-actions-button_4.entry.js +32 -29
  69. package/dist/esm/snk-application.entry.js +60 -102
  70. package/dist/esm/snk-attach.entry.js +6 -6
  71. package/dist/esm/snk-config-options.entry.js +235 -0
  72. package/dist/esm/snk-configurator.entry.js +1 -1
  73. package/dist/esm/snk-crud.entry.js +6 -6
  74. package/dist/esm/snk-data-exporter.entry.js +7 -7
  75. package/dist/esm/{snk-data-unit-7a579dbd.js → snk-data-unit-0fdfb6c2.js} +2 -2
  76. package/dist/esm/snk-data-unit.entry.js +4 -4
  77. package/dist/esm/snk-detail-view.entry.js +9 -9
  78. package/dist/esm/snk-field-config.entry.js +1 -1
  79. package/dist/esm/{snk-filter-bar_4.entry.js → snk-filter-bar.entry.js} +5 -687
  80. package/dist/esm/snk-filter-item.entry.js +308 -0
  81. package/dist/esm/snk-filter-list.entry.js +148 -0
  82. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  83. package/dist/esm/snk-filter-modal.entry.js +245 -0
  84. package/dist/esm/{snk-config-options_3.entry.js → snk-form-config.entry.js} +6 -366
  85. package/dist/esm/snk-form.entry.js +140 -0
  86. package/dist/esm/snk-grid.entry.js +6 -6
  87. package/dist/esm/{snk-guides-viewer-e8ca764a.js → snk-guides-viewer-8934c537.js} +6 -9
  88. package/dist/esm/snk-guides-viewer.entry.js +8 -8
  89. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  90. package/dist/esm/snk-simple-crud.entry.js +15 -15
  91. package/dist/esm/snk-tab-config.entry.js +1 -1
  92. package/dist/sankhyablocks/p-01086ff7.entry.js +1 -0
  93. package/dist/sankhyablocks/{p-126c58ea.js → p-06421fdb.js} +1 -1
  94. package/dist/sankhyablocks/{p-e3a285a2.js → p-16869f77.js} +1 -1
  95. package/dist/sankhyablocks/p-17425c72.js +1 -0
  96. package/dist/sankhyablocks/{p-341465ce.js → p-1bf06cd3.js} +2 -2
  97. package/dist/sankhyablocks/{p-aa003d4e.entry.js → p-212213d9.entry.js} +1 -1
  98. package/dist/sankhyablocks/p-2923c1b5.js +1 -0
  99. package/dist/sankhyablocks/p-3b60db06.entry.js +1 -0
  100. package/dist/sankhyablocks/{p-00f9fe5c.entry.js → p-430e4d3c.entry.js} +1 -1
  101. package/dist/sankhyablocks/{p-9ffd9fc7.js → p-4d9549cf.js} +1 -1
  102. package/dist/sankhyablocks/{p-c75fae8e.js → p-5dd8cf4f.js} +1 -1
  103. package/dist/sankhyablocks/p-60b29483.entry.js +1 -0
  104. package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
  105. package/dist/sankhyablocks/{p-41793e17.entry.js → p-7663f597.entry.js} +1 -1
  106. package/dist/sankhyablocks/{p-47d24ac8.js → p-7ac7932c.js} +2 -2
  107. package/dist/sankhyablocks/{p-2d3f9482.entry.js → p-8eb67fa4.entry.js} +1 -1
  108. package/dist/sankhyablocks/{p-f0aaad2b.entry.js → p-92eadb1c.entry.js} +1 -1
  109. package/dist/sankhyablocks/{p-8b4fc28f.entry.js → p-95df461f.entry.js} +1 -1
  110. package/dist/sankhyablocks/p-a42e7a1e.entry.js +11 -0
  111. package/dist/sankhyablocks/p-a724e798.entry.js +1 -0
  112. package/dist/sankhyablocks/{p-1dbd5c18.entry.js → p-a75d242d.entry.js} +1 -1
  113. package/dist/sankhyablocks/{p-0e206e62.js → p-afbb070d.js} +1 -1
  114. package/dist/sankhyablocks/{p-95ce311a.js → p-b0ef4383.js} +1 -1
  115. package/dist/sankhyablocks/p-b9679243.entry.js +1 -0
  116. package/dist/sankhyablocks/{p-f4e221b2.entry.js → p-b9c67e45.entry.js} +1 -1
  117. package/dist/sankhyablocks/{p-b389ed49.entry.js → p-be5d8fcb.entry.js} +1 -1
  118. package/dist/sankhyablocks/p-ca5ec380.js +1 -0
  119. package/dist/sankhyablocks/p-d3f53df2.entry.js +1 -0
  120. package/dist/sankhyablocks/{p-a2c790ac.entry.js → p-dcead955.entry.js} +1 -1
  121. package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
  122. package/dist/sankhyablocks/{p-00278e07.js → p-f3434fc4.js} +1 -1
  123. package/dist/sankhyablocks/{p-fca0e5cc.entry.js → p-fb34e0cf.entry.js} +1 -1
  124. package/dist/sankhyablocks/p-fd8e631c.entry.js +1 -0
  125. package/dist/sankhyablocks/p-feba9d4b.entry.js +1 -0
  126. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  127. package/dist/types/components/snk-actions-button/interfaces/index.d.ts +3 -0
  128. package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +3 -2
  129. package/dist/types/components/snk-application/snk-application.d.ts +12 -3
  130. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +1 -0
  131. package/dist/types/components.d.ts +1 -393
  132. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +0 -1
  133. package/dist/types/lib/utils/CrudUtils.d.ts +0 -1
  134. package/package.json +2 -3
  135. package/react/components.d.ts +0 -3
  136. package/react/components.js +0 -3
  137. package/react/components.js.map +1 -1
  138. package/dist/cjs/input-distinct-search_2.cjs.entry.js +0 -471
  139. package/dist/cjs/snk-distinct-search.cjs.entry.js +0 -123
  140. package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +0 -28
  141. package/dist/collection/components/snk-application/request-listener/RequestListenerFactory.js +0 -16
  142. package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js +0 -52
  143. package/dist/collection/components/snk-distinct-search/snk-distinct-search.css +0 -4
  144. package/dist/collection/components/snk-distinct-search/snk-distinct-search.js +0 -372
  145. package/dist/collection/components/snk-distinct-search/subcomponents/input-distinct-search/input-distinct-search.css +0 -110
  146. package/dist/collection/components/snk-distinct-search/subcomponents/input-distinct-search/input-distinct-search.js +0 -544
  147. package/dist/collection/components/snk-distinct-search/subcomponents/search-modal/search-modal.css +0 -28
  148. package/dist/collection/components/snk-distinct-search/subcomponents/search-modal/search-modal.js +0 -593
  149. package/dist/collection/components/snk-distinct-search/utils/filter-distinct-search.js +0 -15
  150. package/dist/collection/lib/http/data-fetcher/fetchers/distinct-search-fetcher.js +0 -25
  151. package/dist/collection/lib/message/resources/snk-distinct-search.msg.js +0 -9
  152. package/dist/collection/sw.js +0 -46
  153. package/dist/components/filter-distinct-search.js +0 -17
  154. package/dist/components/input-distinct-search.d.ts +0 -11
  155. package/dist/components/input-distinct-search.js +0 -6
  156. package/dist/components/input-distinct-search2.js +0 -264
  157. package/dist/components/search-modal.d.ts +0 -11
  158. package/dist/components/search-modal.js +0 -6
  159. package/dist/components/search-modal2.js +0 -264
  160. package/dist/components/snk-distinct-search.d.ts +0 -11
  161. package/dist/components/snk-distinct-search.js +0 -163
  162. package/dist/esm/input-distinct-search_2.entry.js +0 -466
  163. package/dist/esm/snk-distinct-search.entry.js +0 -119
  164. package/dist/sankhyablocks/p-0e250436.entry.js +0 -1
  165. package/dist/sankhyablocks/p-154aa2a6.entry.js +0 -11
  166. package/dist/sankhyablocks/p-18cb1acb.entry.js +0 -1
  167. package/dist/sankhyablocks/p-30ebcbe0.entry.js +0 -1
  168. package/dist/sankhyablocks/p-3755b46f.entry.js +0 -1
  169. package/dist/sankhyablocks/p-3858a2e4.entry.js +0 -1
  170. package/dist/sankhyablocks/p-42130213.entry.js +0 -1
  171. package/dist/sankhyablocks/p-563b7c28.entry.js +0 -1
  172. package/dist/sankhyablocks/p-aaf94476.js +0 -1
  173. package/dist/sankhyablocks/p-d8665750.js +0 -1
  174. package/dist/sankhyablocks/p-e4391e16.js +0 -1
  175. package/dist/types/components/snk-application/request-listener/DebouncedRequestListener.d.ts +0 -11
  176. package/dist/types/components/snk-application/request-listener/RequestListenerFactory.d.ts +0 -12
  177. package/dist/types/components/snk-application/request-listener/RequestListenerLoadingBar.d.ts +0 -13
  178. package/dist/types/components/snk-distinct-search/snk-distinct-search.d.ts +0 -83
  179. package/dist/types/components/snk-distinct-search/subcomponents/input-distinct-search/input-distinct-search.d.ts +0 -105
  180. package/dist/types/components/snk-distinct-search/subcomponents/search-modal/search-modal.d.ts +0 -127
  181. package/dist/types/components/snk-distinct-search/types/index.d.ts +0 -12
  182. package/dist/types/components/snk-distinct-search/utils/filter-distinct-search.d.ts +0 -4
  183. package/dist/types/lib/http/data-fetcher/fetchers/distinct-search-fetcher.d.ts +0 -6
  184. package/dist/types/lib/message/resources/snk-distinct-search.msg.d.ts +0 -2
  185. /package/dist/collection/components/{snk-distinct-search/types → snk-actions-button/interfaces}/index.js +0 -0
@@ -644,11 +644,9 @@ export class SnkSimpleCrud {
644
644
  window.removeEventListener("keydown", this._keyDownHandler);
645
645
  }
646
646
  gridConfigChangeHandler(evt) {
647
- evt.stopPropagation();
648
- if (!this.configName)
649
- return;
650
647
  const config = evt.detail;
651
648
  ConfigStorage.saveGridConfig(config, this.configName, this.resolveResourceID());
649
+ evt.stopPropagation();
652
650
  }
653
651
  modalConfigChangeHandler(evt) {
654
652
  const config = evt.detail;
@@ -725,16 +723,18 @@ export class SnkSimpleCrud {
725
723
  return;
726
724
  this.goToView(VIEW_MODE.FORM);
727
725
  }
726
+ renderTaskbarContent() {
727
+ var _a;
728
+ return (h("snk-taskbar", { class: this._currentViewMode === VIEW_MODE.FORM && "ez-box ez-box--shadow ez-padding--small", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
729
+ }
728
730
  /* istanbul ignore next */
729
731
  render() {
730
- var _a;
731
732
  if (this.dataUnit == undefined) {
732
733
  return;
733
734
  }
734
- const taskbarContent = (h("snk-taskbar", { class: this._currentViewMode === VIEW_MODE.FORM && "ez-box ez-box--shadow ez-padding--small", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
735
- return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, this._currentViewMode === VIEW_MODE.FORM && taskbarContent, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
735
+ return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
736
736
  ? undefined
737
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert }, this._currentViewMode === VIEW_MODE.GRID && taskbarContent, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, 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), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
737
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, 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), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
738
738
  }
739
739
  static get is() { return "snk-simple-crud"; }
740
740
  static get encapsulation() { return "scoped"; }
@@ -6,7 +6,7 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
6
6
  function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
7
7
  function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
8
8
  };
9
- import { ApplicationContext, ErrorException, ObjectUtils, ServiceCanceledException, StringUtils, WarningException } from '@sankhyalabs/core';
9
+ import { ApplicationContext, ErrorException, ServiceCanceledException, ObjectUtils, StringUtils, WarningException } from '@sankhyalabs/core';
10
10
  import { batchRequests } from 'graphql-request';
11
11
  import UrlUtils from "../../../lib/utils/urlutils";
12
12
  import { PrintUtils } from '../../utils/PrintUtils';
@@ -266,8 +266,7 @@ export class DataFetcher {
266
266
  }
267
267
  payloadJson['requestBody']['clientEventList'].clientEvent.push({ $: key });
268
268
  }
269
- const requestId = StringUtils.generateUUID();
270
- DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url: url, requestBody: payload, requestId }));
269
+ DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url: url, requestBody: payload }));
271
270
  http.open("POST", url, true);
272
271
  http.withCredentials = true;
273
272
  http.send(ObjectUtils.objectToString(payloadJson));
@@ -307,7 +306,7 @@ export class DataFetcher {
307
306
  else if (http.readyState == 4 && http.status != 200) {
308
307
  reject(new ErrorException(`Erro ao executar serviço: ${serviceName}`, http.responseText));
309
308
  }
310
- DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url: url, requestBody: payload, requestId }));
309
+ DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url: url, requestBody: payload }));
311
310
  };
312
311
  });
313
312
  }
@@ -412,8 +411,7 @@ export class DataFetcher {
412
411
  const errorsResponse = [];
413
412
  const responseExtensions = [];
414
413
  const url = this.buildGraphQlURL(quietMode);
415
- const requestId = StringUtils.generateUUID();
416
- DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url, requestBody: request, requestId }));
414
+ DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url, requestBody: request }));
417
415
  try {
418
416
  const response = await batchRequests(url, request, { 'Content-Type': `application/json; charset=${window['SERVER_ENCODING'] || 'UTF-8'}` });
419
417
  response.forEach((resItem, index) => {
@@ -447,11 +445,11 @@ export class DataFetcher {
447
445
  });
448
446
  }
449
447
  else {
450
- DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url, requestBody: request, requestId }));
448
+ DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url, requestBody: request }));
451
449
  throw new ErrorException("Falha de comunicação", err.message);
452
450
  }
453
451
  }
454
- DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url, requestBody: request, requestId }));
452
+ DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url, requestBody: request }));
455
453
  return { data: dataResponse, errors: errorsResponse, extensions: responseExtensions };
456
454
  }
457
455
  isHttpError(err) {
@@ -73,7 +73,7 @@ export default class DataUnitDataLoader {
73
73
  }
74
74
  const count = loadingInfo.count;
75
75
  if (loadingInfo.loadingInProgress) {
76
- dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { count, loadingInProgress: true }));
76
+ dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { count }));
77
77
  return;
78
78
  }
79
79
  if (loadingInfo.needReload) {
@@ -81,7 +81,7 @@ export default class DataUnitDataLoader {
81
81
  dataUnit.gotoPage(0);
82
82
  return;
83
83
  }
84
- dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { total: count, count, loadingInProgress: false }));
84
+ dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { total: count, count }));
85
85
  }
86
86
  static registryLoading(dataUnit, loadingInfo) {
87
87
  if (loadingInfo == undefined) {
@@ -96,14 +96,9 @@ export class PesquisaFetcher {
96
96
  }
97
97
  }
98
98
  };
99
- const urlOptions = {
100
- urlParams: {
101
- "quietMode": true
102
- }
103
- };
104
99
  return new Promise((resolve, reject) => {
105
100
  DataFetcher.get()
106
- .callServiceBroker("PesquisaSP.getSuggestion", JSON.stringify(reqBody), urlOptions)
101
+ .callServiceBroker("PesquisaSP.getSuggestion", JSON.stringify(reqBody))
107
102
  .then(result => resolve(result))
108
103
  .catch(error => reject(error));
109
104
  });
@@ -7,7 +7,6 @@ import snkCrudMessages from "./resources/snk-crud.msg";
7
7
  import snkSimpleCrudMessages from "./resources/snk-simple-crud.msg";
8
8
  import fileViewerMessages from "./resources/file-viewer.msg";
9
9
  import snkApplicationMessages from "./resources/snk-application.msg";
10
- import snkDistinctSearchMessages from "./resources/snk-distinct-search.msg";
11
10
  import { snkFormConfigMessages, snkConfigOptionsMessages, snkFieldConfigMessages, snkTabConfigMessages } from "./resources/snk-form.msg";
12
11
  import { snkConfiguratorMessages } from "./resources/snk-configurator.msg";
13
12
  import { snkGridMessages, snkGridConfigMessages } from "./resources/snk-grid.msg";
@@ -49,7 +48,6 @@ export class SnkMessageBuilder {
49
48
  snkEntityList: snkEntityListMessages,
50
49
  snkActionsButton: snkActionsButtonMessages,
51
50
  snkPrintSelector: snkPrintSelectorMessages,
52
- snkDistinctSearch: snkDistinctSearchMessages,
53
51
  };
54
52
  this._currentOperation = OperationMap.CLEAN;
55
53
  this._domainName = domainName;
@@ -13,28 +13,6 @@ export class CrudUtils {
13
13
  });
14
14
  }
15
15
  }
16
- static parseCrudResults(entities, onlyFirst) {
17
- if (!Array.isArray(entities)) {
18
- entities = [entities];
19
- }
20
- const crudFindResults = [];
21
- for (const entity of entities) {
22
- let crudFindResult = {
23
- fields: new Map()
24
- };
25
- for (let key in entity) {
26
- let fieldValue = entity[key];
27
- if (fieldValue.hasOwnProperty('$')) {
28
- crudFindResult.fields.set(key, fieldValue.$);
29
- }
30
- if (onlyFirst) {
31
- break;
32
- }
33
- }
34
- crudFindResults.push(crudFindResult);
35
- }
36
- return crudFindResults.length > 1 ? crudFindResults : crudFindResults[0];
37
- }
38
16
  static find(entityName, fields, criteria, onlyFirst = true, criteriaExpression, orderBy) {
39
17
  const SERVICE_CRUD_FIND = "mge@crud.find";
40
18
  let parsedFields = [];
@@ -83,11 +61,24 @@ export class CrudUtils {
83
61
  DataFetcher.get().callServiceBroker(SERVICE_CRUD_FIND, JSON.stringify(request)).then((result) => {
84
62
  var _a;
85
63
  let entities = (_a = result.entidades) === null || _a === void 0 ? void 0 : _a.entidade;
86
- if (!entities) {
64
+ if (entities != undefined) {
65
+ let crudFindResult = {
66
+ fields: new Map()
67
+ };
68
+ for (let key in entities) {
69
+ let fieldValue = entities[key];
70
+ if (fieldValue.hasOwnProperty('$')) {
71
+ crudFindResult.fields.set(key, fieldValue.$);
72
+ }
73
+ if (onlyFirst) {
74
+ break;
75
+ }
76
+ }
77
+ resolve(crudFindResult);
78
+ }
79
+ else {
87
80
  resolve(null);
88
81
  }
89
- const crudFindResults = this.parseCrudResults(entities, onlyFirst);
90
- resolve(crudFindResults);
91
82
  });
92
83
  });
93
84
  }
@@ -23,28 +23,6 @@ class CrudUtils {
23
23
  });
24
24
  }
25
25
  }
26
- static parseCrudResults(entities, onlyFirst) {
27
- if (!Array.isArray(entities)) {
28
- entities = [entities];
29
- }
30
- const crudFindResults = [];
31
- for (const entity of entities) {
32
- let crudFindResult = {
33
- fields: new Map()
34
- };
35
- for (let key in entity) {
36
- let fieldValue = entity[key];
37
- if (fieldValue.hasOwnProperty('$')) {
38
- crudFindResult.fields.set(key, fieldValue.$);
39
- }
40
- if (onlyFirst) {
41
- break;
42
- }
43
- }
44
- crudFindResults.push(crudFindResult);
45
- }
46
- return crudFindResults.length > 1 ? crudFindResults : crudFindResults[0];
47
- }
48
26
  static find(entityName, fields, criteria, onlyFirst = true, criteriaExpression, orderBy) {
49
27
  const SERVICE_CRUD_FIND = "mge@crud.find";
50
28
  let parsedFields = [];
@@ -92,11 +70,24 @@ class CrudUtils {
92
70
  DataFetcher.get().callServiceBroker(SERVICE_CRUD_FIND, JSON.stringify(request)).then((result) => {
93
71
  var _a;
94
72
  let entities = (_a = result.entidades) === null || _a === void 0 ? void 0 : _a.entidade;
95
- if (!entities) {
73
+ if (entities != undefined) {
74
+ let crudFindResult = {
75
+ fields: new Map()
76
+ };
77
+ for (let key in entities) {
78
+ let fieldValue = entities[key];
79
+ if (fieldValue.hasOwnProperty('$')) {
80
+ crudFindResult.fields.set(key, fieldValue.$);
81
+ }
82
+ if (onlyFirst) {
83
+ break;
84
+ }
85
+ }
86
+ resolve(crudFindResult);
87
+ }
88
+ else {
96
89
  resolve(null);
97
90
  }
98
- const crudFindResults = this.parseCrudResults(entities, onlyFirst);
99
- resolve(crudFindResults);
100
91
  });
101
92
  });
102
93
  }
@@ -6777,8 +6777,7 @@ class DataFetcher {
6777
6777
  }
6778
6778
  payloadJson['requestBody']['clientEventList'].clientEvent.push({ $: key });
6779
6779
  }
6780
- const requestId = StringUtils.generateUUID();
6781
- DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url: url, requestBody: payload, requestId }));
6780
+ DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url: url, requestBody: payload }));
6782
6781
  http.open("POST", url, true);
6783
6782
  http.withCredentials = true;
6784
6783
  http.send(ObjectUtils.objectToString(payloadJson));
@@ -6818,7 +6817,7 @@ class DataFetcher {
6818
6817
  else if (http.readyState == 4 && http.status != 200) {
6819
6818
  reject(new ErrorException(`Erro ao executar serviço: ${serviceName}`, http.responseText));
6820
6819
  }
6821
- DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url: url, requestBody: payload, requestId }));
6820
+ DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url: url, requestBody: payload }));
6822
6821
  };
6823
6822
  });
6824
6823
  }
@@ -6923,8 +6922,7 @@ class DataFetcher {
6923
6922
  const errorsResponse = [];
6924
6923
  const responseExtensions = [];
6925
6924
  const url = this.buildGraphQlURL(quietMode);
6926
- const requestId = StringUtils.generateUUID();
6927
- DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url, requestBody: request, requestId }));
6925
+ DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url, requestBody: request }));
6928
6926
  try {
6929
6927
  const response = await dist.batchRequests(url, request, { 'Content-Type': `application/json; charset=${window['SERVER_ENCODING'] || 'UTF-8'}` });
6930
6928
  response.forEach((resItem, index) => {
@@ -6958,11 +6956,11 @@ class DataFetcher {
6958
6956
  });
6959
6957
  }
6960
6958
  else {
6961
- DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url, requestBody: request, requestId }));
6959
+ DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url, requestBody: request }));
6962
6960
  throw new ErrorException("Falha de comunicação", err.message);
6963
6961
  }
6964
6962
  }
6965
- DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url, requestBody: request, requestId }));
6963
+ DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url, requestBody: request }));
6966
6964
  return { data: dataResponse, errors: errorsResponse, extensions: responseExtensions };
6967
6965
  }
6968
6966
  isHttpError(err) {
@@ -172,15 +172,6 @@ const snkAttachMessages$1 = {
172
172
  }
173
173
  };
174
174
 
175
- const snkDistinctSearchMessages = {
176
- titleBadgeNew: "novo",
177
- titleAdd: "Adicionar",
178
- availableResults: "resultados disponíveis",
179
- availableResult: "resultado disponível",
180
- limitResult: "Esta pesquisa foi limitada, existem mais resultados",
181
- emptyResult: "Nenhum resultado disponível. <br/>Você pode adicionar um novo termo",
182
- };
183
-
184
175
  const snkConfigOptionsMessages = {
185
176
  label: {
186
177
  nameField: "Nome do Campo *",
@@ -561,7 +552,6 @@ class SnkMessageBuilder {
561
552
  snkEntityList: snkEntityListMessages,
562
553
  snkActionsButton: snkActionsButtonMessages,
563
554
  snkPrintSelector: snkPrintSelectorMessages,
564
- snkDistinctSearch: snkDistinctSearchMessages,
565
555
  };
566
556
  this._currentOperation = OperationMap.CLEAN;
567
557
  this._domainName = domainName;
@@ -712,7 +712,7 @@ class DataUnitDataLoader {
712
712
  }
713
713
  const count = loadingInfo.count;
714
714
  if (loadingInfo.loadingInProgress) {
715
- dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { count, loadingInProgress: true }));
715
+ dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { count }));
716
716
  return;
717
717
  }
718
718
  if (loadingInfo.needReload) {
@@ -720,7 +720,7 @@ class DataUnitDataLoader {
720
720
  dataUnit.gotoPage(0);
721
721
  return;
722
722
  }
723
- dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { total: count, count, loadingInProgress: false }));
723
+ dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { total: count, count }));
724
724
  }
725
725
  static registryLoading(dataUnit, loadingInfo) {
726
726
  if (loadingInfo == undefined) {
@@ -1,6 +1,4 @@
1
1
  /* sankhyablocks custom elements */
2
- export { InputDistinctSearch as InputDistinctSearch } from '../types/components/snk-distinct-search/subcomponents/input-distinct-search/input-distinct-search';
3
- export { SearchModal as SearchModal } from '../types/components/snk-distinct-search/subcomponents/search-modal/search-modal';
4
2
  export { SnkActionsButton as SnkActionsButton } from '../types/components/snk-actions-button/snk-actions-button';
5
3
  export { SnkActionsForm as SnkActionsForm } from '../types/components/snk-actions-button/subcomponents/snk-actions-form';
6
4
  export { SnkApplication as SnkApplication } from '../types/components/snk-application/snk-application';
@@ -13,7 +11,6 @@ export { SnkCustomSlotElements as SnkCustomSlotElements } from '../types/compone
13
11
  export { SnkDataExporter as SnkDataExporter } from '../types/components/snk-data-exporter/snk-data-exporter';
14
12
  export { SnkDataUnit as SnkDataUnit } from '../types/components/snk-data-unit/snk-data-unit';
15
13
  export { SnkDetailView as SnkDetailView } from '../types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view';
16
- export { SnkDistinctSearch as SnkDistinctSearch } from '../types/components/snk-distinct-search/snk-distinct-search';
17
14
  export { SnkEntityList as SnkEntityList } from '../types/components/snk-entity-list/snk-entity-list';
18
15
  export { SnkExporterEmailSender as SnkExporterEmailSender } from '../types/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender';
19
16
  export { SnkExpressionGroup as SnkExpressionGroup } from '../types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group';
@@ -1,6 +1,4 @@
1
1
  export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
2
- export { InputDistinctSearch, defineCustomElement as defineCustomElementInputDistinctSearch } from './input-distinct-search.js';
3
- export { SearchModal, defineCustomElement as defineCustomElementSearchModal } from './search-modal.js';
4
2
  export { SnkActionsButton, defineCustomElement as defineCustomElementSnkActionsButton } from './snk-actions-button.js';
5
3
  export { SnkActionsForm, defineCustomElement as defineCustomElementSnkActionsForm } from './snk-actions-form.js';
6
4
  export { SnkApplication, defineCustomElement as defineCustomElementSnkApplication } from './snk-application.js';
@@ -13,7 +11,6 @@ export { SnkCustomSlotElements, defineCustomElement as defineCustomElementSnkCus
13
11
  export { SnkDataExporter, defineCustomElement as defineCustomElementSnkDataExporter } from './snk-data-exporter.js';
14
12
  export { SnkDataUnit, defineCustomElement as defineCustomElementSnkDataUnit } from './snk-data-unit.js';
15
13
  export { SnkDetailView, defineCustomElement as defineCustomElementSnkDetailView } from './snk-detail-view.js';
16
- export { SnkDistinctSearch, defineCustomElement as defineCustomElementSnkDistinctSearch } from './snk-distinct-search.js';
17
14
  export { SnkEntityList, defineCustomElement as defineCustomElementSnkEntityList } from './snk-entity-list.js';
18
15
  export { SnkExporterEmailSender, defineCustomElement as defineCustomElementSnkExporterEmailSender } from './snk-exporter-email-sender.js';
19
16
  export { SnkExpressionGroup, defineCustomElement as defineCustomElementSnkExpressionGroup } from './snk-expression-group.js';
@@ -96,14 +96,9 @@ class PesquisaFetcher {
96
96
  }
97
97
  }
98
98
  };
99
- const urlOptions = {
100
- urlParams: {
101
- "quietMode": true
102
- }
103
- };
104
99
  return new Promise((resolve, reject) => {
105
100
  DataFetcher.get()
106
- .callServiceBroker("PesquisaSP.getSuggestion", JSON.stringify(reqBody), urlOptions)
101
+ .callServiceBroker("PesquisaSP.getSuggestion", JSON.stringify(reqBody))
107
102
  .then(result => resolve(result))
108
103
  .catch(error => reject(error));
109
104
  });
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, DateUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
2
+ import { ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, DateUtils, ServiceUtils, StorageType, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { D as DataFetcher } from './DataFetcher.js';
4
4
  import { P as ParamType } from './ParamType.js';
5
5
  import './pesquisa-fetcher.js';
@@ -598,6 +598,7 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
598
598
  super();
599
599
  this.__registerHost();
600
600
  this.CLIENT_EVENT_CONFIRM_NAME = "br.com.sankhya.actionbutton.clientconfirm";
601
+ this._actions = [];
601
602
  this.handleClick = (evt) => {
602
603
  const selectedAction = this._actions.find((action) => action.actionID == evt.detail.id);
603
604
  const executor = new ExecutorFactory(selectedAction.type).executor;
@@ -607,27 +608,22 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
607
608
  };
608
609
  this._items = [];
609
610
  this._showDropdown = false;
610
- this._actions = [];
611
- this._isOrderActions = false;
612
611
  }
613
612
  async getActions() {
614
- let param = {
615
- param: {
616
- entityName: this._entityName,
617
- resourceID: this._resourceID
618
- }
619
- };
620
- return DataFetcher.get().callServiceBroker('ActionButtonsSP.getActions', param).then((result) => {
613
+ const actions = await ServiceUtils.useCacheWithService(`SnkActionsButton_${this._entityName}-${this._resourceID}`, async () => {
621
614
  var _a;
622
- if (!((_a = result.actions) === null || _a === void 0 ? void 0 : _a.action))
623
- return;
624
- if (this._isOrderActions) {
625
- this._actions = ArrayUtils.sortAlphabetically(result.actions.action, 'description');
626
- }
627
- else {
628
- this._actions = result.actions.action;
629
- }
630
- });
615
+ const param = {
616
+ param: {
617
+ entityName: this._entityName,
618
+ resourceID: this._resourceID,
619
+ },
620
+ };
621
+ const result = await DataFetcher.get().callServiceBroker('ActionButtonsSP.getActions', param);
622
+ return ((_a = result.actions) === null || _a === void 0 ? void 0 : _a.action) || [];
623
+ }, StorageType.IN_MEMORY_CACHE);
624
+ this._actions = SnkActionsButton.parameters.isOrderActions
625
+ ? ArrayUtils.sortAlphabetically(actions, 'description')
626
+ : actions;
631
627
  }
632
628
  controlDropdown() {
633
629
  this._showDropdown = !this._showDropdown;
@@ -660,7 +656,7 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
660
656
  }
661
657
  async componentWillLoad() {
662
658
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
663
- this._isOrderActions = await this._application.getBooleanParam('global.ordenar.acoes.personalizadas');
659
+ await this.loadParameters();
664
660
  const snkDataUnit = this._element.parentElement;
665
661
  this._dataUnit = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.dataUnit;
666
662
  this._resourceID = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.resourceID;
@@ -669,9 +665,8 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
669
665
  this._resourceID = await ResourceIDUtils.getResourceID();
670
666
  }
671
667
  this.setEvents();
672
- this.getActions().then(() => {
673
- this.loadItems();
674
- });
668
+ await this.getActions();
669
+ this.loadItems();
675
670
  }
676
671
  async componentDidLoad() {
677
672
  if (!this._element)
@@ -698,6 +693,11 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
698
693
  [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(sufix)
699
694
  };
700
695
  }
696
+ async loadParameters() {
697
+ if (SnkActionsButton.parameters.isOrderActions != null)
698
+ return;
699
+ SnkActionsButton.parameters.isOrderActions = await this._application.getBooleanParam('global.ordenar.acoes.personalizadas');
700
+ }
701
701
  render() {
702
702
  return (h(Host, null, (this._actions && this._actions.length > 0) &&
703
703
  (h("div", { class: `ez-padding-left--medium snk-actions-button
@@ -713,10 +713,11 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
713
713
  static get style() { return snkActionsButtonCss; }
714
714
  }, [2, "snk-actions-button", {
715
715
  "_items": [32],
716
- "_showDropdown": [32],
717
- "_actions": [32],
718
- "_isOrderActions": [32]
716
+ "_showDropdown": [32]
719
717
  }]);
718
+ SnkActionsButton.parameters = {
719
+ isOrderActions: null
720
+ };
720
721
  function defineCustomElement() {
721
722
  if (typeof customElements === "undefined") {
722
723
  return;