@sankhyalabs/sankhyablocks 8.16.0-ms.1 → 8.16.0-ms.10

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 (144) hide show
  1. package/dist/cjs/{ClientSideExporterProvider-2f5f350c.js → ClientSideExporterProvider-fe52f7cf.js} +63 -22
  2. package/dist/cjs/{ConfigStorage-d024aec8.js → ConfigStorage-6b633b10.js} +2 -2
  3. package/dist/cjs/{DataFetcher-65879b2c.js → DataFetcher-875371e9.js} +1 -1
  4. package/dist/cjs/{SnkFormConfigManager-c11d8468.js → SnkFormConfigManager-d680be08.js} +2 -2
  5. package/dist/cjs/{auth-fetcher-8480751c.js → auth-fetcher-24ba4135.js} +1 -1
  6. package/dist/cjs/{dataunit-fetcher-449d51a3.js → dataunit-fetcher-b95768e8.js} +1 -1
  7. package/dist/cjs/{form-config-fetcher-90126e4c.js → form-config-fetcher-e0a512c3.js} +1 -1
  8. package/dist/cjs/{index-102ba62d.js → index-ab1cfb44.js} +3 -4
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{pesquisa-fetcher-5c583c93.js → pesquisa-fetcher-30cab386.js} +1 -1
  11. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -5
  12. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  13. package/dist/cjs/snk-actions-button_5.cjs.entry.js +5 -5
  14. package/dist/cjs/snk-application.cjs.entry.js +6 -6
  15. package/dist/cjs/snk-attach.cjs.entry.js +50 -21
  16. package/dist/cjs/snk-config-options_3.cjs.entry.js +4 -4
  17. package/dist/cjs/snk-crud.cjs.entry.js +9 -8
  18. package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -6
  19. package/dist/cjs/{snk-data-unit-bbd384bf.js → snk-data-unit-33937ffe.js} +1 -1
  20. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  21. package/dist/cjs/snk-detail-view.cjs.entry.js +9 -9
  22. package/dist/cjs/snk-expression-group_2.cjs.entry.js +1 -1
  23. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +6 -5
  24. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  25. package/dist/cjs/snk-grid.cjs.entry.js +11 -10
  26. package/dist/cjs/{snk-guides-viewer-5396062f.js → snk-guides-viewer-b6002ea7.js} +6 -6
  27. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
  28. package/dist/cjs/snk-personalized-filter.cjs.entry.js +4 -4
  29. package/dist/cjs/snk-pesquisa.cjs.entry.js +11 -5
  30. package/dist/cjs/snk-simple-crud.cjs.entry.js +12 -11
  31. package/dist/cjs/snk-taskbar.cjs.entry.js +6 -3
  32. package/dist/cjs/{taskbar-elements-7e19882d.js → taskbar-elements-ebddaef4.js} +1 -1
  33. package/dist/collection/components/snk-attach/snk-attach.js +27 -1
  34. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +17 -13
  35. package/dist/collection/components/snk-crud/snk-crud.js +20 -1
  36. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +51 -16
  37. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +1 -1
  38. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +2 -1
  39. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -0
  40. package/dist/collection/components/snk-grid/snk-grid.css +1 -0
  41. package/dist/collection/components/snk-grid/snk-grid.js +20 -1
  42. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +1 -1
  43. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +9 -2
  44. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +21 -2
  45. package/dist/collection/components/snk-taskbar/snk-taskbar.js +4 -1
  46. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +8 -2
  47. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +1 -1
  48. package/dist/components/ContinuousInsertUtils.js +59 -18
  49. package/dist/components/DataFetcher.js +1 -1
  50. package/dist/components/index2.js +3 -4
  51. package/dist/components/pesquisa-grid2.js +1 -1
  52. package/dist/components/snk-attach2.js +43 -14
  53. package/dist/components/snk-crud.js +3 -1
  54. package/dist/components/snk-data-exporter2.js +1 -1
  55. package/dist/components/snk-filter-bar2.js +1 -1
  56. package/dist/components/snk-filter-item2.js +2 -1
  57. package/dist/components/snk-grid2.js +4 -2
  58. package/dist/components/snk-pesquisa2.js +9 -2
  59. package/dist/components/snk-simple-crud2.js +4 -2
  60. package/dist/components/snk-taskbar2.js +4 -1
  61. package/dist/esm/{ClientSideExporterProvider-3537805a.js → ClientSideExporterProvider-bd24a4b3.js} +63 -22
  62. package/dist/esm/{ConfigStorage-373bb440.js → ConfigStorage-e5c1f4c0.js} +2 -2
  63. package/dist/esm/{DataFetcher-5221b992.js → DataFetcher-ecf5f903.js} +1 -1
  64. package/dist/esm/{SnkFormConfigManager-5022f87f.js → SnkFormConfigManager-1efd102b.js} +2 -2
  65. package/dist/esm/{auth-fetcher-e32fe8a4.js → auth-fetcher-9987c66e.js} +1 -1
  66. package/dist/esm/{dataunit-fetcher-91b094f2.js → dataunit-fetcher-ed6e65ef.js} +1 -1
  67. package/dist/esm/{form-config-fetcher-126e2471.js → form-config-fetcher-34becd23.js} +1 -1
  68. package/dist/esm/{index-bdf75557.js → index-c57e49af.js} +3 -4
  69. package/dist/esm/loader.js +1 -1
  70. package/dist/esm/{pesquisa-fetcher-4284f2a3.js → pesquisa-fetcher-e26c3295.js} +1 -1
  71. package/dist/esm/pesquisa-grid_2.entry.js +5 -5
  72. package/dist/esm/sankhyablocks.js +1 -1
  73. package/dist/esm/snk-actions-button_5.entry.js +5 -5
  74. package/dist/esm/snk-application.entry.js +6 -6
  75. package/dist/esm/snk-attach.entry.js +50 -21
  76. package/dist/esm/snk-config-options_3.entry.js +4 -4
  77. package/dist/esm/snk-crud.entry.js +9 -8
  78. package/dist/esm/snk-data-exporter.entry.js +6 -6
  79. package/dist/esm/{snk-data-unit-b03bb5cf.js → snk-data-unit-6258b8ae.js} +1 -1
  80. package/dist/esm/snk-data-unit.entry.js +3 -3
  81. package/dist/esm/snk-detail-view.entry.js +9 -9
  82. package/dist/esm/snk-expression-group_2.entry.js +1 -1
  83. package/dist/esm/snk-filter-bar_4.entry.js +6 -5
  84. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  85. package/dist/esm/snk-grid.entry.js +11 -10
  86. package/dist/esm/{snk-guides-viewer-749d027c.js → snk-guides-viewer-39fae8d5.js} +6 -6
  87. package/dist/esm/snk-guides-viewer.entry.js +9 -9
  88. package/dist/esm/snk-personalized-filter.entry.js +4 -4
  89. package/dist/esm/snk-pesquisa.entry.js +11 -5
  90. package/dist/esm/snk-simple-crud.entry.js +12 -11
  91. package/dist/esm/snk-taskbar.entry.js +6 -3
  92. package/dist/esm/{taskbar-elements-d2353c64.js → taskbar-elements-ed51e143.js} +1 -1
  93. package/dist/sankhyablocks/p-11afea24.entry.js +1 -0
  94. package/dist/sankhyablocks/p-18389343.entry.js +1 -0
  95. package/dist/sankhyablocks/{p-1435701f.js → p-22ddc147.js} +1 -1
  96. package/dist/sankhyablocks/{p-4be6e0e7.entry.js → p-240ac47f.entry.js} +1 -1
  97. package/dist/sankhyablocks/{p-44efbeed.entry.js → p-2746d606.entry.js} +1 -1
  98. package/dist/sankhyablocks/p-3ce68be5.js +1 -0
  99. package/dist/sankhyablocks/{p-19dc71e9.js → p-3fcb90d6.js} +1 -1
  100. package/dist/sankhyablocks/{p-7b87d1a8.js → p-43769aa9.js} +1 -1
  101. package/dist/sankhyablocks/{p-647f9830.entry.js → p-4b01cbad.entry.js} +1 -1
  102. package/dist/sankhyablocks/{p-3fc82614.js → p-517efc93.js} +1 -1
  103. package/dist/sankhyablocks/{p-d62228fb.js → p-5a7e18f4.js} +1 -1
  104. package/dist/sankhyablocks/p-5e9fbd76.js +1 -0
  105. package/dist/sankhyablocks/{p-4fa79d68.entry.js → p-6b898a51.entry.js} +1 -1
  106. package/dist/sankhyablocks/p-77168ab4.entry.js +1 -0
  107. package/dist/sankhyablocks/{p-3653374d.js → p-7e0a0aae.js} +1 -1
  108. package/dist/sankhyablocks/p-91708c3d.entry.js +1 -0
  109. package/dist/sankhyablocks/{p-ad5e4f9d.entry.js → p-9523fc40.entry.js} +1 -1
  110. package/dist/sankhyablocks/p-9887a437.entry.js +1 -0
  111. package/dist/sankhyablocks/p-9ebc3f3b.entry.js +1 -0
  112. package/dist/sankhyablocks/p-a5bdcb3f.entry.js +1 -0
  113. package/dist/sankhyablocks/{p-82ee6dc3.entry.js → p-a61bbe18.entry.js} +1 -1
  114. package/dist/sankhyablocks/{p-f0b9303b.js → p-a77bdadc.js} +1 -1
  115. package/dist/sankhyablocks/{p-23b47a92.js → p-abd9681c.js} +1 -1
  116. package/dist/sankhyablocks/{p-9d3a025a.entry.js → p-bfdf92e9.entry.js} +1 -1
  117. package/dist/sankhyablocks/p-cb1e77e0.entry.js +1 -0
  118. package/dist/sankhyablocks/{p-1cf39cfd.entry.js → p-d3b9b377.entry.js} +1 -1
  119. package/dist/sankhyablocks/p-e289826a.js +1 -0
  120. package/dist/sankhyablocks/p-e51c52cf.entry.js +1 -0
  121. package/dist/sankhyablocks/{p-c021a3a9.entry.js → p-e66bcb5c.entry.js} +1 -1
  122. package/dist/sankhyablocks/{p-41c3bee5.js → p-ef076eea.js} +2 -2
  123. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  124. package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
  125. package/dist/types/components/snk-crud/snk-crud.d.ts +4 -0
  126. package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +7 -0
  127. package/dist/types/components/snk-grid/snk-grid.d.ts +4 -0
  128. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +1 -0
  129. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -0
  130. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +1 -0
  131. package/dist/types/components.d.ts +24 -0
  132. package/package.json +1 -1
  133. package/dist/sankhyablocks/p-0ce56d43.entry.js +0 -1
  134. package/dist/sankhyablocks/p-13391b3d.entry.js +0 -1
  135. package/dist/sankhyablocks/p-389ba782.entry.js +0 -1
  136. package/dist/sankhyablocks/p-3ba431c9.js +0 -1
  137. package/dist/sankhyablocks/p-4d87cd45.entry.js +0 -1
  138. package/dist/sankhyablocks/p-5dd7f4c7.js +0 -1
  139. package/dist/sankhyablocks/p-6234bda8.entry.js +0 -1
  140. package/dist/sankhyablocks/p-6dc031de.js +0 -1
  141. package/dist/sankhyablocks/p-a962a3e4.entry.js +0 -1
  142. package/dist/sankhyablocks/p-b2de1bcc.entry.js +0 -1
  143. package/dist/sankhyablocks/p-ca316523.entry.js +0 -1
  144. package/dist/sankhyablocks/p-ee53b000.entry.js +0 -1
@@ -50,6 +50,7 @@ export class SnkSimpleCrud {
50
50
  this.pageSize = 150;
51
51
  this.resourceID = undefined;
52
52
  this.enableGridInsert = false;
53
+ this.paginationCounterMode = 'auto';
53
54
  this.taskbarManager = undefined;
54
55
  this.messagesBuilder = undefined;
55
56
  this.useEnterLikeTab = false;
@@ -751,9 +752,9 @@ export class SnkSimpleCrud {
751
752
  if (this.dataUnit == undefined) {
752
753
  return;
753
754
  }
754
- 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, 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 ${this.outlineMode ? 'ez-box--outline' : '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)
755
+ 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), 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 ${this.outlineMode ? 'ez-box--outline' : '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)
755
756
  ? undefined
756
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, 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`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), 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() }))));
757
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, paginationCounterMode: this.paginationCounterMode }, 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`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), 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() }))));
757
758
  }
758
759
  static get is() { return "snk-simple-crud"; }
759
760
  static get encapsulation() { return "scoped"; }
@@ -1031,6 +1032,24 @@ export class SnkSimpleCrud {
1031
1032
  "reflect": false,
1032
1033
  "defaultValue": "false"
1033
1034
  },
1035
+ "paginationCounterMode": {
1036
+ "type": "string",
1037
+ "mutable": false,
1038
+ "complexType": {
1039
+ "original": "'show' | 'hidden' | 'auto'",
1040
+ "resolved": "\"auto\" | \"hidden\" | \"show\"",
1041
+ "references": {}
1042
+ },
1043
+ "required": false,
1044
+ "optional": true,
1045
+ "docs": {
1046
+ "tags": [],
1047
+ "text": "Define se a grid ser\u00E1 focada ao ser carregada."
1048
+ },
1049
+ "attribute": "pagination-counter-mode",
1050
+ "reflect": false,
1051
+ "defaultValue": "'auto'"
1052
+ },
1034
1053
  "taskbarManager": {
1035
1054
  "type": "unknown",
1036
1055
  "mutable": false,
@@ -10,6 +10,7 @@ export class SnkTaskbar {
10
10
  this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
11
11
  this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
12
12
  this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
13
+ this.TASKBAR_CUSTOM_ELEMENTS = 'taskbar-custom-elements-container';
13
14
  this._titleKeyByElement = {
14
15
  [TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
15
16
  [TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
@@ -413,6 +414,7 @@ export class SnkTaskbar {
413
414
  this._slotContainer.appendChild(customElement);
414
415
  }
415
416
  render() {
417
+ var _a;
416
418
  if (this._definitions === undefined) {
417
419
  return undefined;
418
420
  }
@@ -431,7 +433,8 @@ export class SnkTaskbar {
431
433
  }
432
434
  (_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
433
435
  return h("slot", { name: elem });
434
- })), h("div", { class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, h("slot", { name: this.customSlotId }))));
436
+ })), h("div", { id: this.TASKBAR_CUSTOM_ELEMENTS, class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, h("slot", { name: this.customSlotId }), (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 :
437
+ _a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS))));
435
438
  }
436
439
  getHostClasses() {
437
440
  if (this.overflowStrategy !== 'hiddenItems')
@@ -24,9 +24,15 @@ export default class RmPrecisionCustomValueFormatter {
24
24
  if (rmPrecision || rmPrecision === 0) {
25
25
  return NumberUtils.format(currentValue, rmPrecision, rmPrecision);
26
26
  }
27
- else {
28
- return currentValue;
27
+ const columnProps = column === null || column === void 0 ? void 0 : column.props;
28
+ if (columnProps) {
29
+ const precision = column === null || column === void 0 ? void 0 : column.props.get('precision');
30
+ const prettyPrecision = column === null || column === void 0 ? void 0 : column.props.get('prettyPrecision');
31
+ if (precision !== undefined && prettyPrecision !== undefined) {
32
+ return NumberUtils.format(currentValue, precision, prettyPrecision);
33
+ }
29
34
  }
35
+ return currentValue;
30
36
  }
31
37
  refreshSelectedRows() {
32
38
  var _a;
@@ -415,7 +415,7 @@ export class DataFetcher {
415
415
  const requestId = StringUtils.generateUUID();
416
416
  DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url, requestBody: request, requestId }));
417
417
  try {
418
- const response = await batchRequests(url, request, { 'Content-Type': `application/json; charset=${window['SERVER_ENCODING'] || 'UTF-8'}` });
418
+ const response = await batchRequests(url, request, { 'Content-Type': `application/json; charset=UTF-8` });
419
419
  response.forEach((resItem, index) => {
420
420
  var _a;
421
421
  if (((_a = resItem === null || resItem === void 0 ? void 0 : resItem.errors) === null || _a === void 0 ? void 0 : _a.length) > 0) {
@@ -248,9 +248,15 @@ class RmPrecisionCustomValueFormatter {
248
248
  if (rmPrecision || rmPrecision === 0) {
249
249
  return NumberUtils.format(currentValue, rmPrecision, rmPrecision);
250
250
  }
251
- else {
252
- return currentValue;
251
+ const columnProps = column === null || column === void 0 ? void 0 : column.props;
252
+ if (columnProps) {
253
+ const precision = column === null || column === void 0 ? void 0 : column.props.get('precision');
254
+ const prettyPrecision = column === null || column === void 0 ? void 0 : column.props.get('prettyPrecision');
255
+ if (precision !== undefined && prettyPrecision !== undefined) {
256
+ return NumberUtils.format(currentValue, precision, prettyPrecision);
257
+ }
253
258
  }
259
+ return currentValue;
254
260
  }
255
261
  refreshSelectedRows() {
256
262
  var _a;
@@ -260,6 +266,9 @@ class RmPrecisionCustomValueFormatter {
260
266
 
261
267
  class CommonsExporter {
262
268
  constructor(dataUnit, grid) {
269
+ this.MAX_WIDTH_COD = 60;
270
+ this.MIN_WIDTH_COD = 10;
271
+ this.DEFAULT_FONT_SIZE = 13;
263
272
  this.dataUnit = dataUnit;
264
273
  this.grid = grid;
265
274
  }
@@ -272,7 +281,7 @@ class CommonsExporter {
272
281
  return this.columnsState;
273
282
  }
274
283
  async buildColumnsMetadata(gridColumns) {
275
- var _a, _b;
284
+ var _a, _b, _c;
276
285
  const columnsMetadata = [];
277
286
  for (const column of gridColumns) {
278
287
  /**
@@ -283,31 +292,63 @@ class CommonsExporter {
283
292
  }
284
293
  const fieldData = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(column.name);
285
294
  const customFormatter = await this.grid.getCustomValueFormatter(column.name);
286
- const columnData = {
287
- label: column.label,
295
+ const isUserInterfaceSEARCH = (fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface) === UserInterface$1.SEARCH;
296
+ const widthColumnDefault = 60;
297
+ const labelColumn = isUserInterfaceSEARCH ? "Cód. " : column.label;
298
+ let descriptionColumn = undefined;
299
+ let columnData = {
288
300
  id: column.name,
289
- width: (fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface) === UserInterface$1.SEARCH ? 60 : column.width,
301
+ label: labelColumn,
302
+ width: isUserInterfaceSEARCH ? (labelColumn.length * this.DEFAULT_FONT_SIZE) : column.width,
290
303
  type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
291
304
  userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface,
292
305
  customFormatter
293
306
  };
307
+ if (isUserInterfaceSEARCH) {
308
+ if (((_b = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONFIELD) != undefined) {
309
+ const labelDescription = (_c = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _c === void 0 ? void 0 : _c.DESCRIPTIONENTITY;
310
+ const mergedFrom = fieldData.properties.mergedFrom;
311
+ const descriptionField = `${fieldData.properties.ENTITYNAME}.${fieldData.properties.DESCRIPTIONFIELD}`;
312
+ descriptionColumn = {
313
+ id: `${mergedFrom ? (mergedFrom + ".") : ""}${descriptionField}`,
314
+ label: labelDescription,
315
+ width: isUserInterfaceSEARCH && labelDescription ? (labelDescription.length * this.DEFAULT_FONT_SIZE - widthColumnDefault) : column.width,
316
+ type: DataType.TEXT,
317
+ userInterface: UserInterface$1.LONGTEXT,
318
+ descriptionFrom: fieldData.name
319
+ };
320
+ }
321
+ if (descriptionColumn) {
322
+ const newWidth = this.getWidthByMetaData(column === null || column === void 0 ? void 0 : column.width, columnData === null || columnData === void 0 ? void 0 : columnData.width, descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.width);
323
+ columnData = Object.assign(Object.assign({}, columnData), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.codWidth });
324
+ descriptionColumn = Object.assign(Object.assign({}, descriptionColumn), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.descWidth, label: (descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.label) || (column === null || column === void 0 ? void 0 : column.label) });
325
+ }
326
+ }
294
327
  columnsMetadata.push(columnData);
295
- if (((_b = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONFIELD) != undefined) {
296
- const mergedFrom = fieldData.properties.mergedFrom;
297
- const descriptionField = `${fieldData.properties.ENTITYNAME}.${fieldData.properties.DESCRIPTIONFIELD}`;
298
- const descriptionColumn = {
299
- label: fieldData.properties.DESCRIPTIONENTITY,
300
- id: `${mergedFrom ? (mergedFrom + ".") : ""}${descriptionField}`,
301
- width: column.width,
302
- type: DataType.TEXT,
303
- userInterface: UserInterface$1.LONGTEXT,
304
- descriptionFrom: fieldData.name
305
- };
328
+ if (descriptionColumn)
306
329
  columnsMetadata.push(descriptionColumn);
307
- }
308
330
  }
309
331
  return columnsMetadata || [];
310
332
  }
333
+ getWidthByMetaData(maxWidth, widthCod, widthDescription) {
334
+ const totalCurrentWidth = widthCod + widthDescription;
335
+ const codPercentage = widthCod / totalCurrentWidth;
336
+ const descPercentage = widthDescription / totalCurrentWidth;
337
+ let newWidthCod = Math.round(maxWidth * codPercentage);
338
+ let newWidthDescription = Math.round(maxWidth * descPercentage);
339
+ if (newWidthCod > this.MAX_WIDTH_COD) {
340
+ newWidthCod = this.MAX_WIDTH_COD;
341
+ newWidthDescription = maxWidth - this.MAX_WIDTH_COD;
342
+ }
343
+ else if (newWidthCod < this.MIN_WIDTH_COD) {
344
+ newWidthCod = this.MIN_WIDTH_COD;
345
+ newWidthDescription = maxWidth - this.MIN_WIDTH_COD;
346
+ }
347
+ return {
348
+ codWidth: newWidthCod,
349
+ descWidth: newWidthDescription
350
+ };
351
+ }
311
352
  }
312
353
 
313
354
  class ClientSideExporterProvider extends CommonsExporter {
@@ -7058,7 +7058,7 @@ class DataFetcher {
7058
7058
  const requestId = StringUtils.generateUUID();
7059
7059
  DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url, requestBody: request, requestId }));
7060
7060
  try {
7061
- const response = await dist.batchRequests(url, request, { 'Content-Type': `application/json; charset=${window['SERVER_ENCODING'] || 'UTF-8'}` });
7061
+ const response = await dist.batchRequests(url, request, { 'Content-Type': `application/json; charset=UTF-8` });
7062
7062
  response.forEach((resItem, index) => {
7063
7063
  var _a;
7064
7064
  if (((_a = resItem === null || resItem === void 0 ? void 0 : resItem.errors) === null || _a === void 0 ? void 0 : _a.length) > 0) {
@@ -36,7 +36,7 @@ const cleanupElements = debounce((map) => {
36
36
  for (let key of map.keys()) {
37
37
  map.set(key, map.get(key).filter(isConnected));
38
38
  }
39
- }, 2000);
39
+ }, 2_000);
40
40
  const stencilSubscription = () => {
41
41
  if (typeof getRenderingRef !== 'function') {
42
42
  // If we are not in a stencil project, we do nothing.
@@ -69,7 +69,7 @@ const stencilSubscription = () => {
69
69
  const unwrap = (val) => (typeof val === 'function' ? val() : val);
70
70
  const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
71
71
  const unwrappedState = unwrap(defaultState);
72
- let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
72
+ let states = new Map(Object.entries(unwrappedState ?? {}));
73
73
  const handlers = {
74
74
  dispose: [],
75
75
  get: [],
@@ -77,10 +77,9 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
77
77
  reset: [],
78
78
  };
79
79
  const reset = () => {
80
- var _a;
81
80
  // When resetting the state, the default state may be a function - unwrap it to invoke it.
82
81
  // otherwise, the state won't be properly reset
83
- states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
82
+ states = new Map(Object.entries(unwrap(defaultState) ?? {}));
84
83
  handlers.reset.forEach((cb) => cb());
85
84
  };
86
85
  const dispose = () => {
@@ -45,7 +45,7 @@ const PesquisaGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
45
45
  }
46
46
  initializeDataUnit() {
47
47
  var _a;
48
- if (!this.metadata)
48
+ if (!this.metadata || this._dataunit)
49
49
  return;
50
50
  this._inMemoryLoader = new InMemoryLoader(this.metadata, (_a = this.dataSource) !== null && _a !== void 0 ? _a : []);
51
51
  this._dataunit = this._inMemoryLoader.dataUnit;
@@ -508,20 +508,24 @@ class AttachFetcherDataUnitFactory {
508
508
  }
509
509
  getInterceptions(dataUnit, action, crudRef) {
510
510
  return new Promise((resolve) => {
511
- if (action.type === Action.EDITION_CANCELED) {
512
- if (!dataUnit.isDirty())
513
- return resolve(action);
514
- return this._application.confirm(this.getMessage('snkAttach.cancelConfirmation.title'), this.getMessage('snkAttach.cancelConfirmation.message')).then((cancellationConfirmed) => {
515
- if (cancellationConfirmed) {
516
- crudRef.goToView(VIEW_MODE.GRID);
511
+ var _a, _b, _c, _d, _e, _f;
512
+ switch (action.type) {
513
+ case Action.EDITION_CANCELED:
514
+ if (!dataUnit.isDirty())
517
515
  return resolve(action);
518
- }
519
- return resolve(undefined);
520
- });
521
- }
522
- if (action.type === Action.DATA_SAVED) {
523
- dataUnit.loadData();
524
- return resolve(action);
516
+ return this._application.confirm(this.getMessage('snkAttach.cancelConfirmation.title'), this.getMessage('snkAttach.cancelConfirmation.message')).then((cancellationConfirmed) => {
517
+ if (cancellationConfirmed) {
518
+ crudRef.goToView(VIEW_MODE.GRID);
519
+ return resolve(action);
520
+ }
521
+ return resolve(undefined);
522
+ });
523
+ case Action.DATA_SAVED:
524
+ dataUnit.loadData(undefined, undefined, false, (_c = (_b = (_a = action === null || action === void 0 ? void 0 : action.payload) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.REGISTER_KEY);
525
+ return resolve(action);
526
+ case Action.RECORDS_REMOVED:
527
+ dataUnit.loadData(undefined, undefined, false, (_f = (_e = (_d = action === null || action === void 0 ? void 0 : action.payload) === null || _d === void 0 ? void 0 : _d.cachedRecords) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.CODATA);
528
+ return resolve(action);
525
529
  }
526
530
  resolve(action);
527
531
  });
@@ -641,6 +645,9 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
641
645
  this.handleFinish = () => {
642
646
  if (!this._currentDataUnit.isDirty())
643
647
  return this.back.emit();
648
+ if (!this.validateAnexoSistema()) {
649
+ return;
650
+ }
644
651
  this._currentDataUnit.saveData().then(() => {
645
652
  this.showFinishedToast();
646
653
  this.back.emit();
@@ -775,6 +782,7 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
775
782
  var _a, _b;
776
783
  this._currentFetcher = new AttachFetcher();
777
784
  this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
785
+ this._currentDataUnit.pageSize = 150;
778
786
  this.initDataUnitLoaders();
779
787
  this._currentDataUnit.addInterceptor({
780
788
  interceptAction: (action) => {
@@ -819,6 +827,27 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
819
827
  }
820
828
  });
821
829
  }
830
+ validateAnexoSistema() {
831
+ var _a;
832
+ if (this._currentFetcher instanceof AnexoSistemaFetcher) {
833
+ try {
834
+ let fields = this._currentDataUnit.getSelectedRecord();
835
+ fields = Object.assign(Object.assign({}, fields), { NOMEARQUIVO: (_a = fields.NOMEARQUIVO) === null || _a === void 0 ? void 0 : _a[0] });
836
+ this._currentFetcher.validateFields(fields);
837
+ }
838
+ catch (error) {
839
+ if (error.message === SaveErrorsEnum.LINK_AND_FILE_AT_THE_SAME_TIME) {
840
+ this._application.alert(this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.title'), this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.message'));
841
+ return false;
842
+ }
843
+ if (error.message === SaveErrorsEnum.ANY_LINK_OR_FILE_FILLED) {
844
+ this._application.alert(this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.title'), this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.message'));
845
+ return false;
846
+ }
847
+ }
848
+ }
849
+ return true;
850
+ }
822
851
  async componentWillLoad() {
823
852
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
824
853
  await this.initAttach();
@@ -847,7 +876,7 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
847
876
  var _a, _b;
848
877
  if (!this._currentDataUnit)
849
878
  return null;
850
- return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this) }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
879
+ return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
851
880
  }
852
881
  static get watchers() { return {
853
882
  "registerKey": ["registerKeyWatcher"]
@@ -87,6 +87,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
87
87
  this.ignoreReadOnlyFormFields = undefined;
88
88
  this.setCustomFormTitle = undefined;
89
89
  this.strategyExporter = ExporterStrategy.SERVER_SIDE;
90
+ this.paginationCounterMode = 'auto';
90
91
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
91
92
  }
92
93
  /**
@@ -421,7 +422,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
421
422
  return;
422
423
  }
423
424
  this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
424
- return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter }, 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, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, 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" }))));
425
+ return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, paginationCounterMode: this.paginationCounterMode }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), 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, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, 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" }))));
425
426
  }
426
427
  get _element() { return this; }
427
428
  static get watchers() { return {
@@ -454,6 +455,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
454
455
  "ignoreReadOnlyFormFields": [4, "ignore-read-only-form-fields"],
455
456
  "setCustomFormTitle": [16],
456
457
  "strategyExporter": [1025, "strategy-exporter"],
458
+ "paginationCounterMode": [1, "pagination-counter-mode"],
457
459
  "_dataUnit": [32],
458
460
  "_dataState": [32],
459
461
  "attachmentRegisterKey": [32],
@@ -249,7 +249,7 @@ function getFormatResponse(result) {
249
249
  return ObjectUtils.stringToObject(response);
250
250
  }
251
251
 
252
- const DOC_MAX_WIDTH = 760;
252
+ const DOC_MAX_WIDTH = 860;
253
253
  function getVisibleColumns(columns) {
254
254
  const visibleColumns = [];
255
255
  let totalWidth = 0;
@@ -253,7 +253,7 @@ class SnkFilterModalFactory {
253
253
  }
254
254
  }
255
255
 
256
- const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:12px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{width:0px;height:0px}[data-mode=\"button\"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-items:start}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
256
+ const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:12px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{width:0px;height:0px}[data-mode=\"button\"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small);height:80%}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-items:start}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
257
257
 
258
258
  const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
259
259
  constructor() {
@@ -30,10 +30,11 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
30
30
  */
31
31
  async showUp(open = false) {
32
32
  return new Promise(resolve => {
33
+ var _a;
33
34
  this._filterItemElement.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" });
34
35
  if (open) {
35
36
  this._closeCallback = resolve;
36
- this._chipElement.blur();
37
+ (_a = this._chipElement) === null || _a === void 0 ? void 0 : _a.blur();
37
38
  window.requestAnimationFrame(() => {
38
39
  this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, this.getFloatOptions());
39
40
  this._popover.show();
@@ -86,7 +86,7 @@ class ServerSideExporterProvider extends CommonsExporter {
86
86
  }
87
87
  }
88
88
 
89
- const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding)}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";
89
+ const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding);outline:none}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";
90
90
 
91
91
  const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
92
92
  constructor() {
@@ -157,6 +157,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
157
157
  this.enableGridInsert = false;
158
158
  this.outlineMode = false;
159
159
  this.strategyExporter = ExporterStrategy.SERVER_SIDE;
160
+ this.paginationCounterMode = 'auto';
160
161
  }
161
162
  reloadConfig() {
162
163
  this.loadConfig();
@@ -564,7 +565,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
564
565
  return undefined;
565
566
  }
566
567
  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--extra-small" }, this._showSnkFilterBar &&
567
- h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }), 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, overflowStrategy: 'none' }, 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, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), 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 snk-grid-container__footer" }, 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), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
568
+ h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }), 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, overflowStrategy: 'none' }, 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, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, paginationCounterMode: this.paginationCounterMode }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), 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 snk-grid-container__footer" }, 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), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
568
569
  }
569
570
  get _element() { return this; }
570
571
  static get watchers() { return {
@@ -600,6 +601,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
600
601
  "enableGridInsert": [4, "enable-grid-insert"],
601
602
  "outlineMode": [4, "outline-mode"],
602
603
  "strategyExporter": [1025, "strategy-exporter"],
604
+ "paginationCounterMode": [1, "pagination-counter-mode"],
603
605
  "_dataUnit": [32],
604
606
  "_dataState": [32],
605
607
  "_gridConfig": [32],
@@ -32,6 +32,7 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
32
32
  this._startLoading = false;
33
33
  this._presentationMode = "list";
34
34
  this._currentView = undefined;
35
+ this._valideDataSource = false;
35
36
  this.searchLoader = undefined;
36
37
  this.treeLoader = undefined;
37
38
  this.selectItem = undefined;
@@ -302,10 +303,13 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
302
303
  if (this.argument && (!isNaN(argumentNumber) || this.argument.length >= this._limitCharsToSearch)) {
303
304
  this._changeDeboucingTimeout = setTimeout(() => {
304
305
  this.doSearch(isNaN(argumentNumber) ? this.argument : argumentNumber.toString());
306
+ this._valideDataSource = true;
305
307
  }, this._deboucingTime);
306
308
  }
307
309
  else {
308
310
  this._itemList = undefined;
311
+ this._gridDataSource = [];
312
+ this._valideDataSource = false;
309
313
  }
310
314
  }
311
315
  clearDeboucingTimeout() {
@@ -316,6 +320,7 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
316
320
  }
317
321
  onClickSearch() {
318
322
  this.doSearch((this.argument || "").trim());
323
+ this._valideDataSource = true;
319
324
  }
320
325
  getMessageView() {
321
326
  return this._startLoading
@@ -383,7 +388,8 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
383
388
  var _a, _b;
384
389
  return (h(Host, null, h("div", { class: "snk-pesquisa" }, h("div", { class: "snk-pesquisa__input" }, h("ez-text-input", { label: "Buscar", class: "ez-margin-right--medium", canShowError: false, ref: (ref) => this._textInput = ref, onEzChange: (event) => this.onChangeValue(event), value: this.argument, "data-element-id": "searchInput" }, h("ez-icon", { slot: "leftIcon", iconName: "search" }), this.argument && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)
385
390
  ? h("button", { slot: "rightIcon", class: "snk-pesquisa__btn", onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
386
- : undefined), h("ez-button", { class: "ez-button--primary", label: "Pesquisar", onClick: () => this.onClickSearch() }), h("ez-button", { class: "ez-margin-left--medium", mode: "icon", iconName: this.getButtonModeInfo().iconName, title: this.getButtonModeInfo().title, onClick: async () => await this.handleChangeViewMode() })), h("div", { class: `snk-pesquisa__records-label ${this._currentView === PESQUISA_VIEW_MODE.TREE ? 'hidden' : ''}` }, h("label", { class: `snk-pesquisa__records ${this.hideRecordsMessage() ? "hidden" : ""}` }, this.getMessageView()), h("label", { class: `snk-pesquisa__records-limit ${this.hideLimitMessage() ? "hidden" : ""}` }, "Essa pesquisa foi limitada, existem mais resultados.")), h("div", { class: "snk-pesquisa__content" }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("pesquisa-grid", { metadata: this._gridMetadata, dataSource: this._gridDataSource, pkField: this._pkField, descriptionField: this._descriptionField, entityName: this.entityName, shouldLoadConfig: this._currentView === PESQUISA_VIEW_MODE.GRID, onPesquisaGridSelectItem: ({ detail }) => this.selectItem(detail) })), h("stack-item", null, h("div", { class: 'snk-pesquisa__cards-container' }, (_b = this._itemList) === null || _b === void 0 ? void 0 : _b.map((item) => {
391
+ : undefined), h("ez-button", { class: "ez-button--primary", label: "Pesquisar", onClick: () => this.onClickSearch() }), h("ez-button", { class: "ez-margin-left--medium", mode: "icon", iconName: this.getButtonModeInfo().iconName, title: this.getButtonModeInfo().title, onClick: async () => await this.handleChangeViewMode() })), h("div", { class: `snk-pesquisa__records-label ${this._currentView === PESQUISA_VIEW_MODE.TREE ? 'hidden' : ''}` }, h("label", { class: `snk-pesquisa__records ${this.hideRecordsMessage() ? "hidden" : ""}` }, this.getMessageView()), h("label", { class: `snk-pesquisa__records-limit ${this.hideLimitMessage() ? "hidden" : ""}` }, "Essa pesquisa foi limitada, existem mais resultados.")), h("div", { class: "snk-pesquisa__content" }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, this._valideDataSource &&
392
+ h("pesquisa-grid", { metadata: this._gridMetadata, dataSource: this._gridDataSource, pkField: this._pkField, descriptionField: this._descriptionField, entityName: this.entityName, shouldLoadConfig: this._currentView === PESQUISA_VIEW_MODE.GRID, onPesquisaGridSelectItem: ({ detail }) => this.selectItem(detail) })), h("stack-item", null, h("div", { class: 'snk-pesquisa__cards-container' }, (_b = this._itemList) === null || _b === void 0 ? void 0 : _b.map((item) => {
387
393
  return (h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
388
394
  }))), h("stack-item", null, h("pesquisa-tree", { ref: (element) => this._pesquisaTree = element, argument: this.argument, treeLoader: this.treeLoader, allowsNonAnalytic: this.allowsNonAnalytic, shouldLoadTree: this._currentView === PESQUISA_VIEW_MODE.TREE, onPesquisaTreeSelectItem: ({ detail }) => this.selectItem(detail) })))))));
389
395
  }
@@ -403,7 +409,8 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
403
409
  "_itemList": [32],
404
410
  "_startLoading": [32],
405
411
  "_presentationMode": [32],
406
- "_currentView": [32]
412
+ "_currentView": [32],
413
+ "_valideDataSource": [32]
407
414
  }]);
408
415
  function defineCustomElement() {
409
416
  if (typeof customElements === "undefined") {
@@ -72,6 +72,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
72
72
  this.pageSize = 150;
73
73
  this.resourceID = undefined;
74
74
  this.enableGridInsert = false;
75
+ this.paginationCounterMode = 'auto';
75
76
  this.taskbarManager = undefined;
76
77
  this.messagesBuilder = undefined;
77
78
  this.useEnterLikeTab = false;
@@ -773,9 +774,9 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
773
774
  if (this.dataUnit == undefined) {
774
775
  return;
775
776
  }
776
- 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, 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 ${this.outlineMode ? 'ez-box--outline' : '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)
777
+ 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), 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 ${this.outlineMode ? 'ez-box--outline' : '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)
777
778
  ? undefined
778
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, 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`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), 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() }))));
779
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, paginationCounterMode: this.paginationCounterMode }, 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`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), 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() }))));
779
780
  }
780
781
  get _element() { return this; }
781
782
  static get watchers() { return {
@@ -802,6 +803,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
802
803
  "pageSize": [2, "page-size"],
803
804
  "resourceID": [1, "resource-i-d"],
804
805
  "enableGridInsert": [4, "enable-grid-insert"],
806
+ "paginationCounterMode": [1, "pagination-counter-mode"],
805
807
  "taskbarManager": [16],
806
808
  "messagesBuilder": [1040],
807
809
  "useEnterLikeTab": [4, "use-enter-like-tab"],