@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-kb-80398.0 → 0.0.0-bugfix-dev-KB-74406.0

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 (99) hide show
  1. package/dist/cjs/{ContinuousInsertUtils-c27b439e.js → ClientSideExporterProvider-6b781452.js} +70 -1
  2. package/dist/cjs/IFetchDataExporterParams-e78ec415.js +8 -0
  3. package/dist/cjs/{index-1dfc7a6e.js → index-e3e39724.js} +5 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +1 -1
  6. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  7. package/dist/cjs/snk-actions-button_5.cjs.entry.js +1 -1
  8. package/dist/cjs/snk-application.cjs.entry.js +8 -1
  9. package/dist/cjs/snk-attach.cjs.entry.js +2 -2
  10. package/dist/cjs/snk-crud.cjs.entry.js +2 -13
  11. package/dist/cjs/snk-data-exporter.cjs.entry.js +11 -14
  12. package/dist/cjs/snk-detail-view.cjs.entry.js +3 -3
  13. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -2
  14. package/dist/cjs/snk-grid.cjs.entry.js +16 -12
  15. package/dist/cjs/{snk-guides-viewer-bff0d27d.js → snk-guides-viewer-a029ff50.js} +2 -2
  16. package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -3
  17. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  18. package/dist/cjs/snk-simple-crud.cjs.entry.js +29 -83
  19. package/dist/cjs/snk-taskbar.cjs.entry.js +2 -2
  20. package/dist/cjs/{taskbar-elements-9ad1f9c0.js → taskbar-elements-7e19882d.js} +1 -1
  21. package/dist/collection/components/snk-application/snk-application.js +8 -1
  22. package/dist/collection/components/snk-crud/snk-crud.js +0 -11
  23. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +3 -9
  24. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +17 -5
  25. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +7 -4
  26. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +1 -0
  27. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +2 -2
  28. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +1 -1
  29. package/dist/collection/components/snk-grid/snk-grid.css +6 -0
  30. package/dist/collection/components/snk-grid/snk-grid.js +30 -3
  31. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +25 -8
  32. package/dist/collection/lib/@types/index.js +5 -0
  33. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.js +6 -1
  34. package/dist/components/ContinuousInsertUtils.js +70 -2
  35. package/dist/components/ISave.js +6 -1
  36. package/dist/components/snk-application2.js +8 -1
  37. package/dist/components/snk-crud.js +0 -11
  38. package/dist/components/snk-data-exporter2.js +17 -14
  39. package/dist/components/snk-filter-bar2.js +2 -2
  40. package/dist/components/snk-filter-item2.js +1 -0
  41. package/dist/components/snk-grid2.js +9 -5
  42. package/dist/components/snk-simple-crud2.js +10 -66
  43. package/dist/esm/{ContinuousInsertUtils-6bf78c5e.js → ClientSideExporterProvider-ff89c7e9.js} +70 -2
  44. package/dist/esm/IFetchDataExporterParams-d73bed3d.js +8 -0
  45. package/dist/esm/{index-3aa4977a.js → index-b40568ff.js} +6 -1
  46. package/dist/esm/loader.js +1 -1
  47. package/dist/esm/pesquisa-grid_2.entry.js +1 -1
  48. package/dist/esm/sankhyablocks.js +1 -1
  49. package/dist/esm/snk-actions-button_5.entry.js +1 -1
  50. package/dist/esm/snk-application.entry.js +8 -1
  51. package/dist/esm/snk-attach.entry.js +2 -2
  52. package/dist/esm/snk-crud.entry.js +2 -13
  53. package/dist/esm/snk-data-exporter.entry.js +11 -14
  54. package/dist/esm/snk-detail-view.entry.js +3 -3
  55. package/dist/esm/snk-filter-bar_4.entry.js +3 -2
  56. package/dist/esm/snk-grid.entry.js +10 -6
  57. package/dist/esm/{snk-guides-viewer-454ebc07.js → snk-guides-viewer-fa45714d.js} +2 -2
  58. package/dist/esm/snk-guides-viewer.entry.js +3 -3
  59. package/dist/esm/snk-pesquisa.entry.js +1 -1
  60. package/dist/esm/snk-simple-crud.entry.js +12 -66
  61. package/dist/esm/snk-taskbar.entry.js +2 -2
  62. package/dist/esm/{taskbar-elements-d59867f1.js → taskbar-elements-d2353c64.js} +1 -1
  63. package/dist/sankhyablocks/{p-643b2aaa.entry.js → p-0b00d69c.entry.js} +1 -1
  64. package/dist/sankhyablocks/p-0f3698af.js +1 -0
  65. package/dist/sankhyablocks/{p-9a99c67b.entry.js → p-172848d4.entry.js} +1 -1
  66. package/dist/sankhyablocks/{p-ae26e8d0.entry.js → p-29d08446.entry.js} +1 -1
  67. package/dist/sankhyablocks/{p-7e7a7473.js → p-3fc82614.js} +1 -1
  68. package/dist/sankhyablocks/p-40e323f9.js +1 -0
  69. package/dist/sankhyablocks/p-700a4cc3.entry.js +1 -0
  70. package/dist/sankhyablocks/p-8f3f2306.js +1 -0
  71. package/dist/sankhyablocks/{p-28ca3908.entry.js → p-a962a3e4.entry.js} +1 -1
  72. package/dist/sankhyablocks/p-aa1a0f3e.entry.js +1 -0
  73. package/dist/sankhyablocks/{p-73b037a8.entry.js → p-b02e58fd.entry.js} +1 -1
  74. package/dist/sankhyablocks/{p-50bf8dbc.entry.js → p-b0ff53b7.entry.js} +1 -1
  75. package/dist/sankhyablocks/{p-91e34755.entry.js → p-c82deea7.entry.js} +1 -1
  76. package/dist/sankhyablocks/{p-bd234604.entry.js → p-d2d0535f.entry.js} +1 -1
  77. package/dist/sankhyablocks/{p-478ab2b6.js → p-de9da2f2.js} +1 -1
  78. package/dist/sankhyablocks/p-e10faff0.entry.js +11 -0
  79. package/dist/sankhyablocks/p-e36f89d1.entry.js +1 -0
  80. package/dist/sankhyablocks/p-fa0cf19c.entry.js +1 -0
  81. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  82. package/dist/types/components/snk-data-exporter/data/export-result.d.ts +2 -1
  83. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +0 -1
  84. package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +2 -1
  85. package/dist/types/components/snk-data-exporter/interfaces/IRecordID.d.ts +1 -0
  86. package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +3 -1
  87. package/dist/types/components/snk-grid/snk-grid.d.ts +5 -0
  88. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +1 -1
  89. package/dist/types/components.d.ts +11 -1
  90. package/dist/types/lib/@types/index.d.ts +4 -0
  91. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +5 -1
  92. package/package.json +1 -1
  93. package/dist/sankhyablocks/p-03e6825e.js +0 -1
  94. package/dist/sankhyablocks/p-198c48c5.entry.js +0 -1
  95. package/dist/sankhyablocks/p-30cf616e.js +0 -1
  96. package/dist/sankhyablocks/p-6fc8bfa2.entry.js +0 -1
  97. package/dist/sankhyablocks/p-8ad7c8bc.entry.js +0 -1
  98. package/dist/sankhyablocks/p-a04f38aa.entry.js +0 -1
  99. package/dist/sankhyablocks/p-d9bb48c4.entry.js +0 -11
@@ -484,7 +484,7 @@ export class SnkFilterBar {
484
484
  if (this.mode !== "regular") {
485
485
  return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }))));
486
486
  }
487
- return (h(Host, null, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
487
+ return (h(Host, null, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium ez-margin-top--extra-small", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
488
488
  }
489
489
  static get is() { return "snk-filter-bar"; }
490
490
  static get encapsulation() { return "scoped"; }
@@ -32,4 +32,10 @@
32
32
 
33
33
  .snk-grid-container__without-shadow {
34
34
  --ezgrid__container--shadow: unset;
35
+ }
36
+
37
+ .snk-grid-container__footer {
38
+ background-color: var(--background--xlight, #FFF);
39
+ border-radius: 0 0 var(--border--radius-medium) var(--border--radius-medium);
40
+ box-shadow: var(--shadow--small);
35
41
  }
@@ -2,7 +2,7 @@ import { h, Fragment, } from '@stencil/core';
2
2
  import { Action as DUAction, ApplicationContext, ElementIDUtils, StringUtils } from '@sankhyalabs/core';
3
3
  import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
4
4
  import { ConfigStorage } from '../../lib/configs/ConfigStorage';
5
- import { PresentationMode } from '../../lib/@types';
5
+ import { ExporterStrategy, PresentationMode } from '../../lib/@types';
6
6
  import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
7
7
  import store from "../../lib/store";
8
8
  import SnkMultiSelectionListDataSource from './filtercolumn/SnkMultiSelectionListDataSource';
@@ -12,6 +12,7 @@ import { CrudUtils } from '../../lib';
12
12
  import RmPrecisionCustomValueFormatter from '../../lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter';
13
13
  import ServerSideExporterProvider from '../snk-data-exporter/providers/ServerSideExporterProvider';
14
14
  import { ContinuousInsertUtils } from '../../lib/utils/ContinuousInsertUtils';
15
+ import ClientSideExporterProvider from '../snk-data-exporter/providers/ClientSideExporterProvider';
15
16
  export class SnkGrid {
16
17
  constructor() {
17
18
  this._customEditors = new Map();
@@ -76,6 +77,7 @@ export class SnkGrid {
76
77
  this.autoFocus = true;
77
78
  this.enableGridInsert = false;
78
79
  this.outlineMode = false;
80
+ this.strategyExporter = ExporterStrategy.SERVER_SIDE;
79
81
  }
80
82
  reloadConfig() {
81
83
  this.loadConfig();
@@ -255,7 +257,9 @@ export class SnkGrid {
255
257
  evt.stopPropagation();
256
258
  }
257
259
  async dataExporterProviderStore() {
258
- const dataExporterProvider = new ServerSideExporterProvider(this._dataUnit, this._grid);
260
+ const dataExporterProvider = this.strategyExporter === ExporterStrategy.SERVER_SIDE
261
+ ? new ServerSideExporterProvider(this._dataUnit, this._grid)
262
+ : new ClientSideExporterProvider(this._dataUnit, this._grid);
259
263
  store.set("exporterProviders", Object.assign(Object.assign({}, store.get("exporterProviders")), { [this.configName]: dataExporterProvider }));
260
264
  }
261
265
  addElementID() {
@@ -481,7 +485,7 @@ export class SnkGrid {
481
485
  return undefined;
482
486
  }
483
487
  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 &&
484
- 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" }, 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 }))));
488
+ 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 }))));
485
489
  }
486
490
  static get is() { return "snk-grid"; }
487
491
  static get encapsulation() { return "scoped"; }
@@ -999,6 +1003,29 @@ export class SnkGrid {
999
1003
  "attribute": "outline-mode",
1000
1004
  "reflect": false,
1001
1005
  "defaultValue": "false"
1006
+ },
1007
+ "strategyExporter": {
1008
+ "type": "string",
1009
+ "mutable": true,
1010
+ "complexType": {
1011
+ "original": "IExporterStrategyMode",
1012
+ "resolved": "\"ClientSideExporterStrategy\" | \"ServerSideExporterStrategy\"",
1013
+ "references": {
1014
+ "IExporterStrategyMode": {
1015
+ "location": "import",
1016
+ "path": "../snk-data-exporter/interfaces/IRecordID"
1017
+ }
1018
+ }
1019
+ },
1020
+ "required": false,
1021
+ "optional": false,
1022
+ "docs": {
1023
+ "tags": [],
1024
+ "text": "Modo de exporta\u00E7\u00E3o dos dados."
1025
+ },
1026
+ "attribute": "strategy-exporter",
1027
+ "reflect": false,
1028
+ "defaultValue": "ExporterStrategy.SERVER_SIDE"
1002
1029
  }
1003
1030
  };
1004
1031
  }
@@ -44,7 +44,7 @@ export class SnkSimpleCrud {
44
44
  this.formConfig = undefined;
45
45
  this._formFields = [];
46
46
  this._fieldsProps = new Map();
47
- this._enableContinuousInsert = true;
47
+ this.enableContinuousInsert = false;
48
48
  this.multipleSelection = undefined;
49
49
  this.useCancelConfirm = true;
50
50
  this.pageSize = 150;
@@ -331,7 +331,7 @@ export class SnkSimpleCrud {
331
331
  this._rmPrecisionCustomValueFormatter = new RmPrecisionCustomValueFormatter();
332
332
  this._continuousInsertUtils = new ContinuousInsertUtils(this.application, this.resolveResourceID(), this.configName);
333
333
  if (this.enableGridInsert) {
334
- this._continuousInsertUtils.getConfig().then(value => this._enableContinuousInsert = value);
334
+ this._continuousInsertUtils.getConfig().then(value => this.enableContinuousInsert = value);
335
335
  }
336
336
  }
337
337
  componentDidLoad() {
@@ -583,9 +583,9 @@ export class SnkSimpleCrud {
583
583
  : this.getFieldSearch(actionButton, item)
584
584
  }];
585
585
  if (this.enableGridInsert) {
586
- hardList.push(this._continuousInsertUtils.actionContinuousInsert(this._enableContinuousInsert, () => {
587
- this._enableContinuousInsert = !this._enableContinuousInsert;
588
- this._continuousInsertUtils.handleSaveConfig(this._enableContinuousInsert);
586
+ hardList.push(this._continuousInsertUtils.actionContinuousInsert(this.enableContinuousInsert, () => {
587
+ this.enableContinuousInsert = !this.enableContinuousInsert;
588
+ this._continuousInsertUtils.handleSaveConfig(this.enableContinuousInsert);
589
589
  }));
590
590
  }
591
591
  if (this.isGridInsertActive())
@@ -753,7 +753,7 @@ export class SnkSimpleCrud {
753
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
755
  ? 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() }))));
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
757
  }
758
758
  static get is() { return "snk-simple-crud"; }
759
759
  static get encapsulation() { return "scoped"; }
@@ -925,6 +925,24 @@ export class SnkSimpleCrud {
925
925
  "text": ""
926
926
  }
927
927
  },
928
+ "enableContinuousInsert": {
929
+ "type": "boolean",
930
+ "mutable": true,
931
+ "complexType": {
932
+ "original": "boolean",
933
+ "resolved": "boolean",
934
+ "references": {}
935
+ },
936
+ "required": false,
937
+ "optional": false,
938
+ "docs": {
939
+ "tags": [],
940
+ "text": ""
941
+ },
942
+ "attribute": "enable-continuous-insert",
943
+ "reflect": false,
944
+ "defaultValue": "false"
945
+ },
928
946
  "multipleSelection": {
929
947
  "type": "boolean",
930
948
  "mutable": false,
@@ -1260,8 +1278,7 @@ export class SnkSimpleCrud {
1260
1278
  "_fieldToGetFocus": {},
1261
1279
  "_customContainerId": {},
1262
1280
  "_formFields": {},
1263
- "_fieldsProps": {},
1264
- "_enableContinuousInsert": {}
1281
+ "_fieldsProps": {}
1265
1282
  };
1266
1283
  }
1267
1284
  static get events() {
@@ -35,3 +35,8 @@ export var DataExporterType;
35
35
  DataExporterType["EXPORT_PDF_TO_EMAIL"] = "PDF";
36
36
  DataExporterType["EXPORT_XLS_TO_EMAIL"] = "XLS";
37
37
  })(DataExporterType || (DataExporterType = {}));
38
+ export var ExporterStrategy;
39
+ (function (ExporterStrategy) {
40
+ ExporterStrategy["SERVER_SIDE"] = "ServerSideExporterStrategy";
41
+ ExporterStrategy["CLIENT_SIDE"] = "ClientSideExporterStrategy";
42
+ })(ExporterStrategy || (ExporterStrategy = {}));
@@ -1 +1,6 @@
1
- export {};
1
+ export var IExportType;
2
+ (function (IExportType) {
3
+ IExportType["ALL"] = "all";
4
+ IExportType["PAGE"] = "page";
5
+ IExportType["SELECTION"] = "selection";
6
+ })(IExportType || (IExportType = {}));
@@ -1,5 +1,5 @@
1
1
  import { D as DataFetcher } from './DataFetcher.js';
2
- import './ISave.js';
2
+ import { D as DataExporterOption } from './ISave.js';
3
3
  import { SortMode, ApplicationContext, UserInterface, DateUtils, ObjectUtils, StringUtils, NumberUtils, DataType } from '@sankhyalabs/core';
4
4
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
5
5
  import { UserInterface as UserInterface$1 } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -9,6 +9,8 @@ import './form-config-fetcher.js';
9
9
  import './constants.js';
10
10
  import InMemoryFilterColumnDataSource from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
11
11
  import { h } from '@stencil/core/internal/client';
12
+ import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo.js';
13
+ import { I as IExportType } from './snk-data-exporter2.js';
12
14
 
13
15
  class CrudUtils {
14
16
  static assertDefaultSorting(gridConfig, dataUnit) {
@@ -308,6 +310,72 @@ class CommonsExporter {
308
310
  }
309
311
  }
310
312
 
313
+ class ClientSideExporterProvider extends CommonsExporter {
314
+ getSelectedNumber() {
315
+ return this.dataUnit.getSelectionInfo().length;
316
+ }
317
+ getTotalRecords() {
318
+ var _a, _b, _c;
319
+ const { total } = ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo()) || {};
320
+ return total !== null && total !== void 0 ? total : (_c = (_b = this.dataUnit) === null || _b === void 0 ? void 0 : _b.records) === null || _c === void 0 ? void 0 : _c.length;
321
+ }
322
+ getSelectedIDs() {
323
+ return getSelectedRecordsIDsInfo(this.dataUnit);
324
+ }
325
+ getRecordID() {
326
+ var _a, _b, _c;
327
+ return (_c = (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.__record__id__;
328
+ }
329
+ async getRecords(exportType) {
330
+ if (this.dataUnit.records.length === 0)
331
+ return [];
332
+ switch (exportType) {
333
+ case IExportType.ALL:
334
+ return this.dataUnit.getSelectionInfo().getAllRecords();
335
+ case IExportType.SELECTION:
336
+ return this.resolveRecordsFromSelection();
337
+ case IExportType.PAGE:
338
+ return this.dataUnit.records;
339
+ default:
340
+ return this.resolveRecordsFromSelection();
341
+ }
342
+ }
343
+ resolveRecordsFromSelection() {
344
+ const selectionInfo = this.dataUnit.getSelectionInfo();
345
+ const selectionRecords = selectionInfo.isEmpty() || selectionInfo.isAllRecords() ? selectionInfo.getAllRecords() : selectionInfo.records;
346
+ return selectionRecords.length ? selectionRecords : this.dataUnit.records;
347
+ }
348
+ getHiddenOptions() {
349
+ return [
350
+ DataExporterOption.EXPORT_BY_EMAIL,
351
+ DataExporterOption.EXPORT_PDF_TO_EMAIL,
352
+ DataExporterOption.EXPORT_XLS_TO_EMAIL,
353
+ DataExporterOption.EXPORT_PAGE_TO_PDF,
354
+ DataExporterOption.EXPORT_PAGE_TO_XLS
355
+ ];
356
+ }
357
+ formatValue(record, column) {
358
+ const { id, descriptionFrom } = column;
359
+ const value = record[descriptionFrom || id];
360
+ if (value == undefined) {
361
+ return "";
362
+ }
363
+ if (descriptionFrom != undefined) {
364
+ return value.label;
365
+ }
366
+ const fieldDescriptor = this.dataUnit.getField(id);
367
+ if (fieldDescriptor.userInterface === UserInterface.SEARCH) {
368
+ return value.value;
369
+ }
370
+ if (column.customFormatter) {
371
+ const ezGridColumn = this.getColumnsState().find(columnState => column.id === columnState.name);
372
+ const formattedValue = column.customFormatter.format(value, ezGridColumn, record.__record__id__);
373
+ return formattedValue;
374
+ }
375
+ return this.dataUnit.getFormattedValue(id, value);
376
+ }
377
+ }
378
+
311
379
  class ContinuousInsertUtils {
312
380
  constructor(snkApplication, resourceID, configName) {
313
381
  this.snkApplication = snkApplication;
@@ -339,4 +407,4 @@ class ContinuousInsertUtils {
339
407
  }
340
408
  }
341
409
 
342
- export { CommonsExporter as C, RmPrecisionCustomValueFormatter as R, SnkMultiSelectionListDataSource as S, TaskbarProcessor as T, CrudUtils as a, buildFieldSearch as b, ContinuousInsertUtils as c, openFieldSearch as o };
410
+ export { CommonsExporter as C, RmPrecisionCustomValueFormatter as R, SnkMultiSelectionListDataSource as S, TaskbarProcessor as T, CrudUtils as a, buildFieldSearch as b, ContinuousInsertUtils as c, ClientSideExporterProvider as d, openFieldSearch as o };
@@ -396,6 +396,11 @@ var DataExporterType;
396
396
  DataExporterType["EXPORT_PDF_TO_EMAIL"] = "PDF";
397
397
  DataExporterType["EXPORT_XLS_TO_EMAIL"] = "XLS";
398
398
  })(DataExporterType || (DataExporterType = {}));
399
+ var ExporterStrategy;
400
+ (function (ExporterStrategy) {
401
+ ExporterStrategy["SERVER_SIDE"] = "ServerSideExporterStrategy";
402
+ ExporterStrategy["CLIENT_SIDE"] = "ClientSideExporterStrategy";
403
+ })(ExporterStrategy || (ExporterStrategy = {}));
399
404
 
400
405
  var SaveErrorsEnum;
401
406
  (function (SaveErrorsEnum) {
@@ -405,4 +410,4 @@ var SaveErrorsEnum;
405
410
  SaveErrorsEnum["DESCRIPTION_CANNOT_BE_CHANGED"] = "DESCRIPTION_CANNOT_BE_CHANGED";
406
411
  })(SaveErrorsEnum || (SaveErrorsEnum = {}));
407
412
 
408
- export { DataExporterOption as D, PresentationMode as P, SaveErrorsEnum as S, PesquisaFetcher as a, DataExporterType as b, DataExporterFormat as c, buildGridMetadata as d, PESQUISA_VIEW_MODE as e };
413
+ export { DataExporterOption as D, ExporterStrategy as E, PresentationMode as P, SaveErrorsEnum as S, PesquisaFetcher as a, DataExporterType as b, DataExporterFormat as c, buildGridMetadata as d, PESQUISA_VIEW_MODE as e };
@@ -536,7 +536,14 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
536
536
  const allAccess = {};
537
537
  allAccess['isSup'] = auths.isSup;
538
538
  Object.entries(AutorizationType).forEach((data) => {
539
- allAccess[data[0]] = auths.actions[data[1]] || false;
539
+ if (data[1] === AutorizationType.CLONE) {
540
+ const insertPermission = auths.actions[AutorizationType.INSERT] || false;
541
+ const clonePermission = auths.actions[AutorizationType.CLONE] || false;
542
+ allAccess[data[0]] = insertPermission && clonePermission;
543
+ }
544
+ else {
545
+ allAccess[data[0]] = auths.actions[data[1]] || false;
546
+ }
540
547
  });
541
548
  resolve(allAccess);
542
549
  }).catch(error => reject(error));
@@ -337,15 +337,6 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
337
337
  .bind("F8", handleAddRecord.bind(this), { description: "Adiciona um novo registro.", element: this._element })
338
338
  .bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
339
339
  .bind("ctrl + F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
340
- .bind("ctrl + .", () => {
341
- if (dataUnit.getSelectionInfo().records.length === 0) {
342
- return dataUnit.selectFirst();
343
- }
344
- return dataUnit.nextRecord();
345
- }, {
346
- description: "Avança para o próximo registro.", element: this._element
347
- })
348
- .bind("ctrl + ,", dataUnit.previousRecord.bind(dataUnit), { description: "Retorna ao registro anterior.", element: this._element })
349
340
  .bind("F5", async () => {
350
341
  const currentView = await this._viewStack.getSelectedIndex();
351
342
  if (VIEW_MODE.GRID === currentView) {
@@ -373,8 +364,6 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
373
364
  .unbind("F8")
374
365
  .unbind("F9")
375
366
  .unbind("ctrl + F9")
376
- .unbind("ctrl + .")
377
- .unbind("ctrl + ,")
378
367
  .unbind("F5")
379
368
  .unbind("Escape");
380
369
  }
@@ -12,6 +12,13 @@ import './filter-item-type.enum.js';
12
12
  import './form-config-fetcher.js';
13
13
  import { d as defineCustomElement$1 } from './snk-exporter-email-sender2.js';
14
14
 
15
+ var IExportType;
16
+ (function (IExportType) {
17
+ IExportType["ALL"] = "all";
18
+ IExportType["PAGE"] = "page";
19
+ IExportType["SELECTION"] = "selection";
20
+ })(IExportType || (IExportType = {}));
21
+
15
22
  class ItemBuilder {
16
23
  constructor(getMessage, selectedNumber) {
17
24
  this._selectedNumber = 0;
@@ -348,17 +355,11 @@ class ClientSideExporterStrategy {
348
355
  const visibleColumns = getVisibleColumns(columns);
349
356
  return visibleColumns;
350
357
  }
351
- async getColumns(resolveProps) {
352
- var _a;
353
- if ((_a = getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) === null || _a === void 0 ? void 0 : _a.includes("PDF")) {
354
- return await this.getParsedColumns();
355
- }
356
- return await this._provider.getColumnsMetadata();
357
- }
358
358
  async executeExport(resolveProps) {
359
+ var _a;
359
360
  const { methodName, gridTitle } = resolveProps;
360
- const records = await this._provider.getRecords();
361
- const columns = await this.getColumns(resolveProps);
361
+ const records = await this._provider.getRecords(resolveProps.type);
362
+ const columns = ((_a = getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) === null || _a === void 0 ? void 0 : _a.includes("PDF")) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
362
363
  const [serviceName, processor] = this.getExecutor(methodName);
363
364
  const payload = {
364
365
  serviceName,
@@ -538,7 +539,9 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
538
539
  });
539
540
  }
540
541
  getExporterStrategy() {
541
- return this.provider.getRecords == undefined ? new ServerSideExporterStrategy(this.provider) : new ClientSideExporterStrategy(this.provider);
542
+ return this.provider.getRecords == undefined
543
+ ? new ServerSideExporterStrategy(this.provider)
544
+ : new ClientSideExporterStrategy(this.provider);
542
545
  }
543
546
  getOptionKey(option) {
544
547
  return Object.keys(DataExporterOption)
@@ -548,12 +551,12 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
548
551
  }
549
552
  getExportType(option) {
550
553
  if (option === DataExporterOption.EXPORT_ALL_RECORDS_TO_PDF || option === DataExporterOption.EXPORT_ALL_RECORDS_TO_XLS) {
551
- return 'all';
554
+ return IExportType.ALL;
552
555
  }
553
556
  if (option === DataExporterOption.EXPORT_PAGE_TO_PDF || option === DataExporterOption.EXPORT_PAGE_TO_XLS) {
554
- return 'page';
557
+ return IExportType.PAGE;
555
558
  }
556
- return 'selection';
559
+ return IExportType.SELECTION;
557
560
  }
558
561
  async dispatchExporter(option) {
559
562
  var _a, _b, _c;
@@ -777,4 +780,4 @@ function defineCustomElement() {
777
780
  } });
778
781
  }
779
782
 
780
- export { SnkDataExporter as S, defineCustomElement as d };
783
+ export { IExportType as I, SnkDataExporter as S, defineCustomElement as d };
@@ -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:8px}[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__scroller.sc-snk-filter-bar{height:calc(100% + var(--space-extra-small, 3px))}.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)}.snk-filter-bar__scroller.sc-snk-filter-bar{height:calc(100% + var(--space-extra-small, 0px))}.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() {
@@ -735,7 +735,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
735
735
  if (this.mode !== "regular") {
736
736
  return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }))));
737
737
  }
738
- return (h(Host, null, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
738
+ return (h(Host, null, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium ez-margin-top--extra-small", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
739
739
  }
740
740
  get _element() { return this; }
741
741
  static get watchers() { return {
@@ -33,6 +33,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
33
33
  this._filterItemElement.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" });
34
34
  if (open) {
35
35
  this._closeCallback = resolve;
36
+ this._chipElement.blur();
36
37
  window.requestAnimationFrame(() => {
37
38
  this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, this.getFloatOptions());
38
39
  this._popover.show();
@@ -2,8 +2,8 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@sten
2
2
  import { Action, ElementIDUtils, ApplicationContext, StringUtils } from '@sankhyalabs/core';
3
3
  import { T as TaskbarElement, d as defineCustomElement$2 } from './snk-taskbar2.js';
4
4
  import { C as ConfigStorage } from './ConfigStorage.js';
5
- import { P as PresentationMode } from './ISave.js';
6
- import { C as CommonsExporter, T as TaskbarProcessor, S as SnkMultiSelectionListDataSource, o as openFieldSearch, a as CrudUtils, R as RmPrecisionCustomValueFormatter, c as ContinuousInsertUtils, b as buildFieldSearch } from './ContinuousInsertUtils.js';
5
+ import { P as PresentationMode, E as ExporterStrategy } from './ISave.js';
6
+ import { C as CommonsExporter, T as TaskbarProcessor, S as SnkMultiSelectionListDataSource, o as openFieldSearch, a as CrudUtils, R as RmPrecisionCustomValueFormatter, c as ContinuousInsertUtils, b as buildFieldSearch, d as ClientSideExporterProvider } from './ContinuousInsertUtils.js';
7
7
  import { s as store } from './index2.js';
8
8
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
9
9
  import './DataFetcher.js';
@@ -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}";
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)}";
90
90
 
91
91
  const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
92
92
  constructor() {
@@ -156,6 +156,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
156
156
  this.autoFocus = true;
157
157
  this.enableGridInsert = false;
158
158
  this.outlineMode = false;
159
+ this.strategyExporter = ExporterStrategy.SERVER_SIDE;
159
160
  }
160
161
  reloadConfig() {
161
162
  this.loadConfig();
@@ -335,7 +336,9 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
335
336
  evt.stopPropagation();
336
337
  }
337
338
  async dataExporterProviderStore() {
338
- const dataExporterProvider = new ServerSideExporterProvider(this._dataUnit, this._grid);
339
+ const dataExporterProvider = this.strategyExporter === ExporterStrategy.SERVER_SIDE
340
+ ? new ServerSideExporterProvider(this._dataUnit, this._grid)
341
+ : new ClientSideExporterProvider(this._dataUnit, this._grid);
339
342
  store.set("exporterProviders", Object.assign(Object.assign({}, store.get("exporterProviders")), { [this.configName]: dataExporterProvider }));
340
343
  }
341
344
  addElementID() {
@@ -561,7 +564,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
561
564
  return undefined;
562
565
  }
563
566
  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 &&
564
- 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" }, 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 }))));
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 }))));
565
568
  }
566
569
  get _element() { return this; }
567
570
  static get watchers() { return {
@@ -596,6 +599,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
596
599
  "autoFocus": [4, "auto-focus"],
597
600
  "enableGridInsert": [4, "enable-grid-insert"],
598
601
  "outlineMode": [4, "outline-mode"],
602
+ "strategyExporter": [1025, "strategy-exporter"],
599
603
  "_dataUnit": [32],
600
604
  "_dataState": [32],
601
605
  "_gridConfig": [32],