@sankhyalabs/sankhyablocks 2.11.1 → 2.12.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 (94) hide show
  1. package/dist/cjs/{SnkMessageBuilder-248b5105.js → SnkMessageBuilder-b1e5ee65.js} +1 -0
  2. package/dist/cjs/{constants-a47a5190.js → constants-0069b951.js} +14 -0
  3. package/dist/cjs/index-0e663819.js +33 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  6. package/dist/cjs/snk-application.cjs.entry.js +48 -27
  7. package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
  8. package/dist/cjs/snk-configurator_3.cjs.entry.js +41 -10
  9. package/dist/cjs/snk-crud.cjs.entry.js +4 -8
  10. package/dist/cjs/snk-data-exporter_8.cjs.entry.js +182 -138
  11. package/dist/cjs/snk-data-unit.cjs.entry.js +6 -6
  12. package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
  13. package/dist/cjs/snk-form.cjs.entry.js +1 -1
  14. package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
  15. package/dist/cjs/{taskbar-elements-89bf9399.js → taskbar-elements-fec33533.js} +1 -1
  16. package/dist/collection/components/snk-application/snk-application.js +60 -10
  17. package/dist/collection/components/snk-crud/snk-crud.js +1 -23
  18. package/dist/collection/components/snk-data-exporter/snk-data-exporter.css +5 -0
  19. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +54 -18
  20. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +1 -1
  21. package/dist/collection/components/snk-data-unit/snk-data-unit.js +5 -5
  22. package/dist/collection/components/snk-grid/snk-grid.js +39 -26
  23. package/dist/collection/lib/@types/index.js +26 -0
  24. package/dist/collection/lib/applet-caller/applet-caller.js +6 -0
  25. package/dist/collection/lib/applet-caller/interfaces/IAppletCallerParams.js +1 -0
  26. package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +1 -0
  27. package/dist/collection/lib/utils/constants.js +12 -0
  28. package/dist/collection/lib/utils/fileViewer/index.js +24 -2
  29. package/dist/collection/lib/workspace/workspace.js +11 -0
  30. package/dist/components/SnkMessageBuilder.js +1 -0
  31. package/dist/components/constants.js +13 -1
  32. package/dist/components/snk-application2.js +48 -26
  33. package/dist/components/snk-crud.js +3 -8
  34. package/dist/components/snk-data-exporter2.js +130 -53
  35. package/dist/components/snk-data-unit.js +5 -5
  36. package/dist/components/snk-form2.js +2 -2
  37. package/dist/components/snk-grid2.js +41 -11
  38. package/dist/components/snk-tab-config2.js +1 -1
  39. package/dist/components/snk-taskbar2.js +2 -8
  40. package/dist/esm/{SnkMessageBuilder-4a060599.js → SnkMessageBuilder-608c038f.js} +1 -0
  41. package/dist/esm/{constants-babe1a08.js → constants-8ad13317.js} +13 -1
  42. package/dist/esm/index-1564817d.js +33 -0
  43. package/dist/esm/loader.js +1 -1
  44. package/dist/esm/sankhyablocks.js +1 -1
  45. package/dist/esm/snk-application.entry.js +48 -27
  46. package/dist/esm/snk-config-options.entry.js +1 -1
  47. package/dist/esm/snk-configurator_3.entry.js +41 -10
  48. package/dist/esm/snk-crud.entry.js +4 -8
  49. package/dist/esm/snk-data-exporter_8.entry.js +111 -67
  50. package/dist/esm/snk-data-unit.entry.js +6 -6
  51. package/dist/esm/snk-form-config.entry.js +1 -1
  52. package/dist/esm/snk-form.entry.js +1 -1
  53. package/dist/esm/snk-tab-config.entry.js +1 -1
  54. package/dist/esm/{taskbar-elements-c8966343.js → taskbar-elements-e4006db7.js} +1 -1
  55. package/dist/sankhyablocks/{p-a65d6ba3.entry.js → p-223d1bd9.entry.js} +1 -1
  56. package/dist/sankhyablocks/{p-4c759619.entry.js → p-392d3c18.entry.js} +1 -1
  57. package/dist/sankhyablocks/p-5534e08c.js +1 -0
  58. package/dist/sankhyablocks/p-6671b0e1.entry.js +1 -0
  59. package/dist/sankhyablocks/{p-9b858e3a.entry.js → p-7ba9d7c7.entry.js} +1 -1
  60. package/dist/sankhyablocks/p-847d06a3.entry.js +1 -0
  61. package/dist/sankhyablocks/p-ad2026bb.js +1 -0
  62. package/dist/sankhyablocks/{p-420d07c4.js → p-b03ff65b.js} +1 -1
  63. package/dist/sankhyablocks/p-b7a379bf.entry.js +83 -0
  64. package/dist/sankhyablocks/{p-f624979d.js → p-c422cbd2.js} +1 -1
  65. package/dist/sankhyablocks/p-c613957d.entry.js +1 -0
  66. package/dist/sankhyablocks/{p-4a5c1d36.entry.js → p-e24e488b.entry.js} +1 -1
  67. package/dist/sankhyablocks/{p-cd19bd29.entry.js → p-f6f71be7.entry.js} +1 -1
  68. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  69. package/dist/types/components/snk-application/snk-application.d.ts +9 -1
  70. package/dist/types/components/snk-crud/snk-crud.d.ts +0 -4
  71. package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +2 -0
  72. package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +2 -1
  73. package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +1 -1
  74. package/dist/types/components.d.ts +7 -16
  75. package/dist/types/lib/@types/index.d.ts +23 -0
  76. package/dist/types/lib/applet-caller/applet-caller.d.ts +4 -0
  77. package/dist/types/lib/applet-caller/interfaces/IAppletCallerParams.d.ts +6 -0
  78. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +1 -1
  79. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +2 -0
  80. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterResponse.d.ts +5 -4
  81. package/dist/types/lib/utils/constants.d.ts +12 -0
  82. package/dist/types/lib/utils/fileViewer/index.d.ts +2 -2
  83. package/dist/types/lib/workspace/workspace.d.ts +1 -0
  84. package/package.json +1 -1
  85. package/dist/cjs/index-9c584423.js +0 -7
  86. package/dist/collection/components/snk-data-exporter/enum/data-exporter-option.js +0 -11
  87. package/dist/esm/index-de5f37a6.js +0 -7
  88. package/dist/sankhyablocks/p-014615a3.entry.js +0 -83
  89. package/dist/sankhyablocks/p-01c361bb.entry.js +0 -1
  90. package/dist/sankhyablocks/p-05fadb77.js +0 -1
  91. package/dist/sankhyablocks/p-3ee68d78.entry.js +0 -1
  92. package/dist/sankhyablocks/p-6673c77c.js +0 -1
  93. package/dist/sankhyablocks/p-c32cfc29.entry.js +0 -1
  94. package/dist/types/components/snk-data-exporter/enum/data-exporter-option.d.ts +0 -10
@@ -2,67 +2,20 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-2cd6f753.js');
5
+ const index$1 = require('./index-2cd6f753.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
+ const index = require('./index-0e663819.js');
8
9
  const ConfigStorage = require('./ConfigStorage-8b5e3261.js');
10
+ const constants = require('./constants-0069b951.js');
9
11
  const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
10
12
  const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
11
13
  const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
12
- const constants = require('./constants-a47a5190.js');
13
14
  const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
14
- const taskbarElements = require('./taskbar-elements-89bf9399.js');
15
- const index$1 = require('./index-9c584423.js');
15
+ const taskbarElements = require('./taskbar-elements-fec33533.js');
16
16
  require('./_commonjsHelpers-537d719a.js');
17
17
  require('./index-696b5c3b.js');
18
18
 
19
- var DataExporterOption;
20
- (function (DataExporterOption) {
21
- DataExporterOption["EXPORT_TO_PDF"] = "exportToPDF";
22
- DataExporterOption["EXPORT_TO_XLS"] = "exportToXLS";
23
- DataExporterOption["EXPORT_CURRENT_PAGE"] = "exportCurrentPage";
24
- DataExporterOption["EXPORT_PAGE_TO_PDF"] = "exportPageToPDF";
25
- DataExporterOption["EXPORT_PAGE_TO_XLS"] = "exportPageToXLS";
26
- DataExporterOption["EXPORT_BY_EMAIL"] = "exportToEmail";
27
- DataExporterOption["EXPORT_PDF_TO_EMAIL"] = "exportPDFToEmail";
28
- DataExporterOption["EXPORT_XLS_TO_EMAIL"] = "exportXLSToEmail";
29
- })(DataExporterOption || (DataExporterOption = {}));
30
-
31
- var __rest = (undefined && undefined.__rest) || function (s, e) {
32
- var t = {};
33
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
34
- t[p] = s[p];
35
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
36
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
37
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
38
- t[p[i]] = s[p[i]];
39
- }
40
- return t;
41
- };
42
- function fetchDataExporter(_a) {
43
- var { methodName } = _a, requestBody = __rest(_a, ["methodName"]);
44
- const serviceName = `DataExporterSPBean.${methodName}`;
45
- const payload = { serviceName, requestBody };
46
- return new Promise((resolve, reject) => {
47
- ConfigStorage.DataFetcher.get()
48
- .callServiceBroker(serviceName, core.ObjectUtils.objectToString(payload))
49
- .then(result => resolve(getFormatResponse(result)))
50
- .catch(error => reject(error));
51
- });
52
- }
53
- function getFormatResponse(result) {
54
- var _a;
55
- const response = (_a = result === null || result === void 0 ? void 0 : result.json) === null || _a === void 0 ? void 0 : _a.$;
56
- if (response == undefined) {
57
- return;
58
- }
59
- return core.ObjectUtils.stringToObject(response);
60
- }
61
-
62
- function fileViewer({ fileSessionKey }) {
63
- window.open(`${window.location.protocol}//${window.location.hostname}:${window.location.port}/mge/visualizadorArquivos.mge?chaveArquivo=${fileSessionKey}&download=S`);
64
- }
65
-
66
19
  class ItemBuilder {
67
20
  constructor(getMessage, selectedNumber) {
68
21
  this._selectedNumber = 0;
@@ -76,10 +29,10 @@ class ItemBuilder {
76
29
  */
77
30
  setExportOption(option, items) {
78
31
  const groupName = this.getExportGroupName();
79
- if (option === DataExporterOption.EXPORT_TO_PDF) {
32
+ if (option === index.DataExporterOption.EXPORT_TO_PDF) {
80
33
  items.push(this.getExportToPDF(groupName));
81
34
  }
82
- if (option === DataExporterOption.EXPORT_TO_XLS) {
35
+ if (option === index.DataExporterOption.EXPORT_TO_XLS) {
83
36
  items.push(this.getExportToXLS(groupName));
84
37
  }
85
38
  this.setExportCurrentPage(option, items);
@@ -92,23 +45,23 @@ class ItemBuilder {
92
45
  */
93
46
  setExportCurrentPage(option, items) {
94
47
  var _a;
95
- const pageOptions = [DataExporterOption.EXPORT_PAGE_TO_PDF, DataExporterOption.EXPORT_PAGE_TO_XLS];
96
- if (option === DataExporterOption.EXPORT_CURRENT_PAGE) {
48
+ const pageOptions = [index.DataExporterOption.EXPORT_PAGE_TO_PDF, index.DataExporterOption.EXPORT_PAGE_TO_XLS];
49
+ if (option === index.DataExporterOption.EXPORT_CURRENT_PAGE) {
97
50
  items.push(this.getCurrentPage());
98
51
  }
99
52
  if (pageOptions.includes(option)) {
100
- let item = items.find((item) => item.id === DataExporterOption.EXPORT_CURRENT_PAGE);
53
+ let item = items.find((item) => item.id === index.DataExporterOption.EXPORT_CURRENT_PAGE);
101
54
  if (item == undefined) {
102
55
  items.push(this.getCurrentPage());
103
- item = items.find((item) => item.id === DataExporterOption.EXPORT_CURRENT_PAGE);
56
+ item = items.find((item) => item.id === index.DataExporterOption.EXPORT_CURRENT_PAGE);
104
57
  }
105
58
  if (!((_a = item === null || item === void 0 ? void 0 : item.children) === null || _a === void 0 ? void 0 : _a.length)) {
106
59
  item.children = [];
107
60
  }
108
- if (option === DataExporterOption.EXPORT_PAGE_TO_PDF) {
61
+ if (option === index.DataExporterOption.EXPORT_PAGE_TO_PDF) {
109
62
  item.children.push(this.getExportPageToPDF());
110
63
  }
111
- if (option === DataExporterOption.EXPORT_PAGE_TO_XLS) {
64
+ if (option === index.DataExporterOption.EXPORT_PAGE_TO_XLS) {
112
65
  item.children.push(this.getExportPageToXLS());
113
66
  }
114
67
  }
@@ -119,7 +72,7 @@ class ItemBuilder {
119
72
  * @param items - Array que será alimentado com as opções permitidas.
120
73
  */
121
74
  setExportByEmail(option, items) {
122
- if (option === DataExporterOption.EXPORT_BY_EMAIL) {
75
+ if (option === index.DataExporterOption.EXPORT_BY_EMAIL) {
123
76
  items.push(this.getExportByEmail());
124
77
  }
125
78
  }
@@ -130,7 +83,7 @@ class ItemBuilder {
130
83
  */
131
84
  getExportToPDF(groupName) {
132
85
  return {
133
- id: DataExporterOption.EXPORT_TO_PDF,
86
+ id: index.DataExporterOption.EXPORT_TO_PDF,
134
87
  label: "PDF (.pdf)",
135
88
  group: groupName
136
89
  };
@@ -142,7 +95,7 @@ class ItemBuilder {
142
95
  */
143
96
  getExportToXLS(groupName) {
144
97
  return {
145
- id: DataExporterOption.EXPORT_TO_XLS,
98
+ id: index.DataExporterOption.EXPORT_TO_XLS,
146
99
  label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`,
147
100
  group: groupName
148
101
  };
@@ -153,7 +106,7 @@ class ItemBuilder {
153
106
  */
154
107
  getCurrentPage() {
155
108
  return {
156
- id: DataExporterOption.EXPORT_CURRENT_PAGE,
109
+ id: index.DataExporterOption.EXPORT_CURRENT_PAGE,
157
110
  label: this._getMessage("snkDataExporter.label.currentPage"),
158
111
  group: this._getMessage("snkDataExporter.group.custom")
159
112
  };
@@ -164,7 +117,7 @@ class ItemBuilder {
164
117
  */
165
118
  getExportPageToPDF() {
166
119
  return {
167
- id: DataExporterOption.EXPORT_PAGE_TO_PDF,
120
+ id: index.DataExporterOption.EXPORT_PAGE_TO_PDF,
168
121
  label: "PDF (.pdf)"
169
122
  };
170
123
  }
@@ -174,7 +127,7 @@ class ItemBuilder {
174
127
  */
175
128
  getExportPageToXLS() {
176
129
  return {
177
- id: DataExporterOption.EXPORT_PAGE_TO_XLS,
130
+ id: index.DataExporterOption.EXPORT_PAGE_TO_XLS,
178
131
  label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`
179
132
  };
180
133
  }
@@ -184,7 +137,7 @@ class ItemBuilder {
184
137
  */
185
138
  getExportByEmail() {
186
139
  return {
187
- id: DataExporterOption.EXPORT_BY_EMAIL,
140
+ id: index.DataExporterOption.EXPORT_BY_EMAIL,
188
141
  label: `${this._getMessage("snkDataExporter.label.sendByEmail")}...`
189
142
  };
190
143
  }
@@ -203,19 +156,77 @@ class ItemBuilder {
203
156
  }
204
157
  }
205
158
 
206
- const snkDataExporterCss = ".sc-snk-data-exporter-h{--snk-data-exporter--z-index:var(--most-visible, 3);display:flex;width:fit-content;height:fit-content}.snk-data-exporter.sc-snk-data-exporter{display:flex;width:fit-content;height:fit-content}.snk-data-exporter--overlap.sc-snk-data-exporter{z-index:var(--snk-data-exporter--z-index)}";
159
+ var __rest = (undefined && undefined.__rest) || function (s, e) {
160
+ var t = {};
161
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
162
+ t[p] = s[p];
163
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
164
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
165
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
166
+ t[p[i]] = s[p[i]];
167
+ }
168
+ return t;
169
+ };
170
+ function fetchDataExporter(_a) {
171
+ var { methodName } = _a, requestBody = __rest(_a, ["methodName"]);
172
+ const serviceName = `DataExporterSPBean.${methodName}`;
173
+ const payload = { serviceName, requestBody };
174
+ return new Promise((resolve, reject) => {
175
+ ConfigStorage.DataFetcher.get()
176
+ .callServiceBroker(serviceName, core.ObjectUtils.objectToString(payload))
177
+ .then(result => resolve(getFormatResponse(result)))
178
+ .catch(error => reject(error));
179
+ });
180
+ }
181
+ function getFormatResponse(result) {
182
+ var _a;
183
+ const response = (_a = result === null || result === void 0 ? void 0 : result.json) === null || _a === void 0 ? void 0 : _a.$;
184
+ if (response == undefined) {
185
+ return;
186
+ }
187
+ return core.ObjectUtils.stringToObject(response);
188
+ }
189
+
190
+ function fileViewer({ fileSessionKey, canPrint, canExport, useAppPrint, isDownload }) {
191
+ if (useAppPrint && !isDownload) {
192
+ webConnection(fileSessionKey, canPrint, canExport);
193
+ }
194
+ else {
195
+ window.open(`${window.location.protocol}//${window.location.hostname}:${window.location.port}/mge/visualizadorArquivos.mge?chaveArquivo=${fileSessionKey}${isDownload ? "&download=S" : ""}`);
196
+ }
197
+ }
198
+ function webConnection(fileSessionKey, canPrint, canExport) {
199
+ const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
200
+ if (application == undefined) {
201
+ return;
202
+ }
203
+ const keyPort = constants.KEY_PORT_EXPORT;
204
+ const methodName = constants.WEB_CONNECTION.methods.PDF_VIEWER;
205
+ const params = {
206
+ chaveArquivo: fileSessionKey,
207
+ permiteImprimir: canPrint ? "S" : "N",
208
+ permiteExportar: canExport ? "S" : "N",
209
+ contentType: "S"
210
+ };
211
+ application.webConnection(keyPort, methodName, params);
212
+ }
213
+
214
+ const snkDataExporterCss = ".sc-snk-data-exporter-h{--snk-data-exporter--z-index:var(--most-visible, 3);display:flex;width:fit-content;height:fit-content}.snk-data-exporter.sc-snk-data-exporter{display:flex;width:fit-content;height:fit-content}.snk-data-exporter--overlap.sc-snk-data-exporter{z-index:var(--snk-data-exporter--z-index)}.snk-data-exporter__dropdown--hide.sc-snk-data-exporter{display:none}";
207
215
 
208
216
  const SnkDataExporter = class {
209
217
  constructor(hostRef) {
210
- index.registerInstance(this, hostRef);
218
+ index$1.registerInstance(this, hostRef);
211
219
  this._items = [];
212
220
  this._selectedNumber = 0;
213
221
  this._showDropdown = false;
214
222
  this._releasedToExport = [
215
- DataExporterOption.EXPORT_TO_PDF,
216
- DataExporterOption.EXPORT_BY_EMAIL,
217
- DataExporterOption.EXPORT_PDF_TO_EMAIL,
218
- DataExporterOption.EXPORT_XLS_TO_EMAIL
223
+ index.DataExporterOption.EXPORT_TO_PDF,
224
+ index.DataExporterOption.EXPORT_TO_XLS,
225
+ index.DataExporterOption.EXPORT_BY_EMAIL,
226
+ index.DataExporterOption.EXPORT_PDF_TO_EMAIL,
227
+ index.DataExporterOption.EXPORT_XLS_TO_EMAIL,
228
+ index.DataExporterOption.EXPORT_PAGE_TO_PDF,
229
+ index.DataExporterOption.EXPORT_PAGE_TO_XLS
219
230
  ];
220
231
  /**
221
232
  * Provedor das informações para exportação dos dados.
@@ -235,19 +246,14 @@ const SnkDataExporter = class {
235
246
  };
236
247
  this._snkEmailSender.open(config)
237
248
  .then(({ format, email: { to, subject, message } }) => {
238
- const methodName = this.getFormatExporter(format);
249
+ var _a;
250
+ const methodName = (_a = index.DataExporterFormat[format === null || format === void 0 ? void 0 : format.toUpperCase()]) !== null && _a !== void 0 ? _a : index.DataExporterFormat.PDF;
239
251
  this.resolveExporter({ methodName, to, subject, message, fileName: this._appLabel, titleGrid: this._appLabel }, () => {
240
252
  this._snkEmailSender.close();
241
253
  utils.ApplicationUtils.info(this.getMessage("snkDataExporter.message.emailSuccess"), { iconName: "check" });
242
254
  });
243
255
  });
244
256
  }
245
- getFormatExporter(format) {
246
- if (format === "xlsx") {
247
- return DataExporterOption.EXPORT_XLS_TO_EMAIL;
248
- }
249
- return DataExporterOption.EXPORT_PDF_TO_EMAIL;
250
- }
251
257
  /**
252
258
  * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
253
259
  * através de um pequeno modulo na estrutura da aplicação:
@@ -285,30 +291,66 @@ const SnkDataExporter = class {
285
291
  this._showDropdown = !this._showDropdown;
286
292
  }
287
293
  resolveExporter(resolveProps, callbackResolver) {
288
- if (this.provider == undefined) {
294
+ if (this.provider == undefined || resolveProps == undefined || callbackResolver == undefined) {
289
295
  return;
290
296
  }
291
297
  const filters = this.provider.getFilters();
292
298
  const columns = this.provider.getColumnsMetadata();
293
299
  const sort = this.provider.getOrders();
294
300
  const resourceURI = this.provider.getResourceURI();
295
- fetchDataExporter(Object.assign({ filters,
301
+ const option = resolveProps.exportOption;
302
+ const currentPageOptions = [
303
+ index.DataExporterOption.EXPORT_PAGE_TO_PDF,
304
+ index.DataExporterOption.EXPORT_PAGE_TO_XLS
305
+ ];
306
+ delete resolveProps.exportOption;
307
+ let params = Object.assign({ filters,
296
308
  columns,
297
309
  sort,
298
- resourceURI }, resolveProps))
310
+ resourceURI }, resolveProps);
311
+ if (currentPageOptions.includes(option)) {
312
+ const offset = this.provider.getOffset();
313
+ const limit = this.provider.getLimit();
314
+ params = Object.assign(Object.assign({}, params), { offset,
315
+ limit });
316
+ }
317
+ fetchDataExporter(params)
299
318
  .then((result) => callbackResolver(result))
300
319
  .catch(() => utils.ApplicationUtils.error(this.getMessage("snkDataExporter.title.error"), this.getMessage("snkDataExporter.message.exportError")));
301
320
  }
321
+ getOptionKey(option) {
322
+ return Object.keys(index.DataExporterOption)
323
+ .find((key) => {
324
+ return index.DataExporterOption[key] === option;
325
+ });
326
+ }
327
+ dispatchExporter(option) {
328
+ var _a;
329
+ const optionKey = this.getOptionKey(option);
330
+ const fileType = (_a = index.DataExporterType[optionKey]) !== null && _a !== void 0 ? _a : index.DataExporterType.EXPORT_TO_PDF;
331
+ const isDownload = index.DataExporterType[optionKey] === index.DataExporterType.EXPORT_TO_XLS;
332
+ const params = {
333
+ methodName: index.DataExporterOption[`EXPORT_TO_${fileType}`],
334
+ fileName: this._appLabel,
335
+ titleGrid: this._appLabel,
336
+ exportOption: option
337
+ };
338
+ this.resolveExporter(params, (response) => {
339
+ fileViewer(Object.assign(Object.assign({}, response), { fileType,
340
+ isDownload }));
341
+ utils.ApplicationUtils.info(this.getMessage("snkDataExporter.message.exportSuccess"), { iconName: "check" });
342
+ });
343
+ }
302
344
  async processExporter(evt) {
303
345
  const item = evt === null || evt === void 0 ? void 0 : evt.detail;
304
346
  if (!this._releasedToExport.includes(item === null || item === void 0 ? void 0 : item.id)) {
305
347
  return;
306
348
  }
307
- if (item.id === DataExporterOption.EXPORT_BY_EMAIL) {
349
+ if (item.id === index.DataExporterOption.EXPORT_BY_EMAIL) {
308
350
  this.exportByEmail();
309
351
  }
310
352
  else {
311
- this.resolveExporter({ methodName: item.id, fileName: this._appLabel, titleGrid: this._appLabel }, (response) => (fileViewer(Object.assign(Object.assign({}, response), { fileType: "PDF" }))));
353
+ this.dispatchExporter(item.id);
312
354
  }
313
355
  this._showDropdown = false;
314
356
  }
@@ -316,7 +358,8 @@ const SnkDataExporter = class {
316
358
  const items = [];
317
359
  this._releasedToExport
318
360
  .forEach((option) => {
319
- this._itemBuilder.setExportOption(option, items);
361
+ var _a;
362
+ (_a = this._itemBuilder) === null || _a === void 0 ? void 0 : _a.setExportOption(option, items);
320
363
  });
321
364
  return items;
322
365
  }
@@ -327,8 +370,9 @@ const SnkDataExporter = class {
327
370
  this._items = this.getItems();
328
371
  }
329
372
  componentWillLoad() {
373
+ var _a;
330
374
  this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
331
- this._application.getAppLabel().then(result => this._appLabel = result);
375
+ (_a = this._application) === null || _a === void 0 ? void 0 : _a.getAppLabel().then(result => this._appLabel = result);
332
376
  this.loadDropdown();
333
377
  this.setEvents();
334
378
  }
@@ -337,6 +381,7 @@ const SnkDataExporter = class {
337
381
  return;
338
382
  }
339
383
  core.ElementIDUtils.addIDInfo(this._element);
384
+ this.positionDropdown();
340
385
  }
341
386
  componentWillUpdate() {
342
387
  if (this._showDropdown) {
@@ -349,13 +394,12 @@ const SnkDataExporter = class {
349
394
  }
350
395
  }
351
396
  render() {
352
- return (index.h(index.Host, null, index.h("div", { class: `snk-data-exporter
397
+ return (index$1.h(index$1.Host, null, index$1.h("div", { class: `snk-data-exporter
353
398
  ${this._showDropdown ? " snk-data-exporter--overlap" : ""}
354
- ` }, index.h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "file-download", size: "small", mode: "icon", onClick: () => this.controlDropdown() }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("button")}` })), this._showDropdown &&
355
- index.h("ez-dropdown", Object.assign({ ref: (ref) => this._ezDropdown = ref, items: this._items, onEzClick: (evt) => this.processExporter(evt) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("dropdown")}` }))), this._showDropdown &&
356
- index.h("div", Object.assign({ class: "ez-scrim ez-scrim--light" }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("ezScrim")}` })), index.h("snk-exporter-email-sender", { ref: ref => this._snkEmailSender = ref, getMessage: (key, params) => this.getMessage(key, params) })));
399
+ ` }, index$1.h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "file-download", size: "small", mode: "icon", onClick: () => this.controlDropdown() }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("button")}` })), index$1.h("ez-dropdown", Object.assign({ class: this._showDropdown ? "" : "snk-data-exporter__dropdown--hide", ref: (ref) => this._ezDropdown = ref, items: this._items, onEzClick: (evt) => this.processExporter(evt) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("dropdown")}` }))), this._showDropdown &&
400
+ index$1.h("div", Object.assign({ class: "ez-scrim ez-scrim--light" }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("ezScrim")}` })), index$1.h("snk-exporter-email-sender", { ref: ref => this._snkEmailSender = ref, getMessage: (key, params) => this.getMessage(key, params) })));
357
401
  }
358
- get _element() { return index.getElement(this); }
402
+ get _element() { return index$1.getElement(this); }
359
403
  };
360
404
  SnkDataExporter.style = snkDataExporterCss;
361
405
 
@@ -465,7 +509,7 @@ const ADD_FILTER = "ADD_FILTER";
465
509
  const APPLIED_FILTERS = "APPLIED_FILTERS";
466
510
  const SnkFilterBar = class {
467
511
  constructor(hostRef) {
468
- index.registerInstance(this, hostRef);
512
+ index$1.registerInstance(this, hostRef);
469
513
  this._updateSequence = [];
470
514
  this._loadingPending = false;
471
515
  this._configUpdated = false;
@@ -585,9 +629,9 @@ const SnkFilterBar = class {
585
629
  const unpinnedItems = [];
586
630
  this.filterConfig
587
631
  .filter(item => item.visible)
588
- .forEach((item, index$1) => {
632
+ .forEach((item, index) => {
589
633
  const itemId = `filter-${item.id}`;
590
- const filterItem = (index.h("snk-filter-item", { onVisibleChanged: (evt) => this.scrollerLocked = evt.detail, onFocusin: () => this.itemFocused(itemId), id: itemId, config: item, class: index$1 > 0 ? "ez-padding-left--medium" : "", getMessage: (key, props) => this.getMessage(key, props), key: item.id }));
634
+ const filterItem = (index$1.h("snk-filter-item", { onVisibleChanged: (evt) => this.scrollerLocked = evt.detail, onFocusin: () => this.itemFocused(itemId), id: itemId, config: item, class: index > 0 ? "ez-padding-left--medium" : "", getMessage: (key, props) => this.getMessage(key, props), key: item.id }));
591
635
  if (item.fixed || item.hardFixed) {
592
636
  pinnedItems.push(filterItem);
593
637
  }
@@ -599,7 +643,7 @@ const SnkFilterBar = class {
599
643
  const elements = [];
600
644
  elements.push(...pinnedItems);
601
645
  if (pinnedItems.length > 0 && unpinnedItems.length > 0) {
602
- elements.push(index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-filter-bar__divider" }));
646
+ elements.push(index$1.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-filter-bar__divider" }));
603
647
  }
604
648
  elements.push(...unpinnedItems);
605
649
  return elements;
@@ -826,9 +870,9 @@ const SnkFilterBar = class {
826
870
  if (!this.dataUnit || !this.filterConfig || this.filterConfig.length === 0) {
827
871
  return undefined;
828
872
  }
829
- return (index.h(index.Host, null, index.h("ez-scroller", { direction: "horizontal", activeShadow: true, locked: this.scrollerLocked }, this.getFilterItems()), index.h("snk-filter-list", { id: APPLIED_FILTERS, onFocusin: () => this.itemFocused(APPLIED_FILTERS), items: this.getAppliedListItems(), getMessage: (key, params) => this.getMessage(key, params), emptyText: this.getMessage("snkFilterBar.emptyAppliedFiltersList"), findFilterText: this.getMessage("snkFilterBar.findFilter"), iconName: "filter", class: "ez-padding-left--medium", buttonClass: this.getActiveClass(), onSnkItemSelected: evt => this.appliedFilterHandler(evt.detail), "data-element-id": "apppliedFilters" }), index.h("snk-filter-list", { id: ADD_FILTER, onFocusin: () => this.itemFocused(ADD_FILTER), items: this.getAddListItems(), label: this.getMessage("snkFilterBar.addFilter"), getMessage: (key, params) => this.getMessage(key, params), emptyText: this.getMessage("snkFilterBar.emptyFiltersList"), findFilterText: this.getMessage("snkFilterBar.findField"), class: "ez-padding-left--medium", onSnkItemSelected: evt => this.addFilterHandler(evt.detail), "data-element-id": "addFilters" }, index.h("ez-icon", { slot: "leftIcon", class: "ez-padding-right--small", iconName: "plus" }))));
873
+ return (index$1.h(index$1.Host, null, index$1.h("ez-scroller", { direction: "horizontal", activeShadow: true, locked: this.scrollerLocked }, this.getFilterItems()), index$1.h("snk-filter-list", { id: APPLIED_FILTERS, onFocusin: () => this.itemFocused(APPLIED_FILTERS), items: this.getAppliedListItems(), getMessage: (key, params) => this.getMessage(key, params), emptyText: this.getMessage("snkFilterBar.emptyAppliedFiltersList"), findFilterText: this.getMessage("snkFilterBar.findFilter"), iconName: "filter", class: "ez-padding-left--medium", buttonClass: this.getActiveClass(), onSnkItemSelected: evt => this.appliedFilterHandler(evt.detail), "data-element-id": "apppliedFilters" }), index$1.h("snk-filter-list", { id: ADD_FILTER, onFocusin: () => this.itemFocused(ADD_FILTER), items: this.getAddListItems(), label: this.getMessage("snkFilterBar.addFilter"), getMessage: (key, params) => this.getMessage(key, params), emptyText: this.getMessage("snkFilterBar.emptyFiltersList"), findFilterText: this.getMessage("snkFilterBar.findField"), class: "ez-padding-left--medium", onSnkItemSelected: evt => this.addFilterHandler(evt.detail), "data-element-id": "addFilters" }, index$1.h("ez-icon", { slot: "leftIcon", class: "ez-padding-right--small", iconName: "plus" }))));
830
874
  }
831
- get _element() { return index.getElement(this); }
875
+ get _element() { return index$1.getElement(this); }
832
876
  static get watchers() { return {
833
877
  "filterConfig": ["observeFilterConfig"]
834
878
  }; }
@@ -837,9 +881,9 @@ SnkFilterBar.style = snkFilterBarCss;
837
881
 
838
882
  const SnkFilterItem = class {
839
883
  constructor(hostRef) {
840
- index.registerInstance(this, hostRef);
841
- this.visibleChanged = index.createEvent(this, "visibleChanged", 7);
842
- this.filterChange = index.createEvent(this, "filterChange", 7);
884
+ index$1.registerInstance(this, hostRef);
885
+ this.visibleChanged = index$1.createEvent(this, "visibleChanged", 7);
886
+ this.filterChange = index$1.createEvent(this, "filterChange", 7);
843
887
  this.innerClickCheck = (_floatingContainer, node) => {
844
888
  if (node.id != core.FloatingManager.MODAL_ELEMENT_ID) {
845
889
  return true;
@@ -1033,9 +1077,9 @@ const SnkFilterItem = class {
1033
1077
  }
1034
1078
  render() {
1035
1079
  const leftIcon = this.getLeftIconName();
1036
- return (index.h(index.Host, null, index.h("ez-chip", { ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.config.value != undefined, id: this.config.id }, leftIcon ? index.h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, index.h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), index.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index.h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail }))));
1080
+ return (index$1.h(index$1.Host, null, index$1.h("ez-chip", { ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.config.value != undefined, id: this.config.id }, leftIcon ? index$1.h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, index$1.h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), index$1.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index$1.h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail }))));
1037
1081
  }
1038
- get _filterItemElement() { return index.getElement(this); }
1082
+ get _filterItemElement() { return index$1.getElement(this); }
1039
1083
  static get watchers() { return {
1040
1084
  "detailIsVisible": ["observeDetailIsVisible"]
1041
1085
  }; }
@@ -1045,8 +1089,8 @@ const SHOW_MORE_ITEM_NAME = "__SHOWMORE__";
1045
1089
  const MAX_FILTERS = 5;
1046
1090
  const SnkFilterList = class {
1047
1091
  constructor(hostRef) {
1048
- index.registerInstance(this, hostRef);
1049
- this.snkItemSelected = index.createEvent(this, "snkItemSelected", 7);
1092
+ index$1.registerInstance(this, hostRef);
1093
+ this.snkItemSelected = index$1.createEvent(this, "snkItemSelected", 7);
1050
1094
  this._preselection = -1;
1051
1095
  this.innerClickCheck = (_floatingContainer, node) => {
1052
1096
  if (node.id != core.FloatingManager.MODAL_ELEMENT_ID) {
@@ -1110,7 +1154,7 @@ const SnkFilterList = class {
1110
1154
  }
1111
1155
  buildItemElement(item) {
1112
1156
  const itemId = ++this._selectableItemsCount;
1113
- return (index.h("button", { ref: elem => elem && this.buildIdElement(elem, item.label), id: `filter-item${itemId}`, onFocusin: () => this._preselection = itemId, class: `ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item`, onClick: () => this.itemSelected(item.name), name: item.label, key: itemId }, item.iconName ? index.h("ez-icon", { iconName: item.iconName, size: "small", class: `ez-padding-right--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__icon ${item.iconClass || ""}` }) : undefined, index.h("div", { class: `ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__label ${item.labelClass || ""}` }, item.label)));
1157
+ return (index$1.h("button", { ref: elem => elem && this.buildIdElement(elem, item.label), id: `filter-item${itemId}`, onFocusin: () => this._preselection = itemId, class: `ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item`, onClick: () => this.itemSelected(item.name), name: item.label, key: itemId }, item.iconName ? index$1.h("ez-icon", { iconName: item.iconName, size: "small", class: `ez-padding-right--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__icon ${item.iconClass || ""}` }) : undefined, index$1.h("div", { class: `ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__label ${item.labelClass || ""}` }, item.label)));
1114
1158
  }
1115
1159
  itemSelected(itemName) {
1116
1160
  if (itemName === SHOW_MORE_ITEM_NAME) {
@@ -1124,7 +1168,7 @@ const SnkFilterList = class {
1124
1168
  getFilterItems() {
1125
1169
  const items = this.items ? core.ArrayUtils.applyStringFilter(this._filterArgument, this.items.filter(item => item.kind === "FILTER")) : [];
1126
1170
  if (items.length === 0) {
1127
- return index.h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-items-container--empty" }, this.emptyText);
1171
+ return index$1.h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-items-container--empty" }, this.emptyText);
1128
1172
  }
1129
1173
  const hideItems = !this._filterArgument && !this._showAll && (items.length > MAX_FILTERS + 1);
1130
1174
  if (hideItems) {
@@ -1132,7 +1176,7 @@ const SnkFilterList = class {
1132
1176
  items.push({ kind: "INTERNAL", label: "Mostrar mais", iconName: "dots-horizontal", name: SHOW_MORE_ITEM_NAME, iconClass: "snk-filter-bar__filter-list-item__icon--secondary", labelClass: "snk-filter-bar__filter-list-item__label--secondary" });
1133
1177
  }
1134
1178
  this._selectableItemsCount = 0;
1135
- return index.h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-list-items-container" }, items.map(item => this.buildItemElement(item)));
1179
+ return index$1.h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-list-items-container" }, items.map(item => this.buildItemElement(item)));
1136
1180
  }
1137
1181
  getFooterItems() {
1138
1182
  return this.items.filter(item => item.kind === "FOOTER");
@@ -1171,16 +1215,16 @@ const SnkFilterList = class {
1171
1215
  }
1172
1216
  }
1173
1217
  render() {
1174
- return (index.h(index.Host, { class: "ez-flex ez-flex--column" }, index.h("ez-button", { class: this.buttonClass, label: this.label, onClick: () => this.buttonClick(), mode: this.iconName ? "icon" : undefined, iconName: this.iconName, size: "small" }, index.h("slot", { name: "leftIcon" })), index.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index.h("div", { class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem }, index.h("ez-filter-input", { ref: ref => this._filterInput = ref, "data-element-id": "serachFilters", mode: "slim", label: this.findFilterText, value: this._filterArgument, onEzChange: (evt) => this._filterArgument = evt.detail, onFocus: () => this._preselection = 0 }), this.getFilterItems(), index.h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), this.items ? this.getFooterItems().map(item => this.buildItemElement(item)) : undefined))));
1218
+ return (index$1.h(index$1.Host, { class: "ez-flex ez-flex--column" }, index$1.h("ez-button", { class: this.buttonClass, label: this.label, onClick: () => this.buttonClick(), mode: this.iconName ? "icon" : undefined, iconName: this.iconName, size: "small" }, index$1.h("slot", { name: "leftIcon" })), index$1.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index$1.h("div", { class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem }, index$1.h("ez-filter-input", { ref: ref => this._filterInput = ref, "data-element-id": "serachFilters", mode: "slim", label: this.findFilterText, value: this._filterArgument, onEzChange: (evt) => this._filterArgument = evt.detail, onFocus: () => this._preselection = 0 }), this.getFilterItems(), index$1.h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), this.items ? this.getFooterItems().map(item => this.buildItemElement(item)) : undefined))));
1175
1219
  }
1176
- get _element() { return index.getElement(this); }
1220
+ get _element() { return index$1.getElement(this); }
1177
1221
  };
1178
1222
 
1179
1223
  const snkFilterModalCss = ".snk-filter__modal-container{width:359px;max-width:359px}";
1180
1224
 
1181
1225
  const SnkFilterModal = class {
1182
1226
  constructor(hostRef) {
1183
- index.registerInstance(this, hostRef);
1227
+ index$1.registerInstance(this, hostRef);
1184
1228
  }
1185
1229
  updateValue(id, value = undefined) {
1186
1230
  this.items = this.items.map(item => {
@@ -1202,7 +1246,7 @@ const SnkFilterModal = class {
1202
1246
  }
1203
1247
  buildItems(list) {
1204
1248
  return list.map(item => {
1205
- return (index.h("button", { onClick: () => this.updateValue(item.id), class: "ez-padding--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item ez-align--middle ez-margin-bottom--small" }, index.h("ez-check", { id: `checkbox_${item.id}`, tabIndex: "-1", class: "sc-snk-filter-bar snk-filter-bar__filter-modal-item__check", onEzChange: evt => this.updateValue(item.id, evt.detail), enabled: item.enabled, value: item.active, mode: utils.CheckMode.SWITCH }), index.h("div", { class: "ez-text ez-title--primary ez-text--medium ez-margin-left--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item__label" }, item.label)));
1249
+ return (index$1.h("button", { onClick: () => this.updateValue(item.id), class: "ez-padding--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item ez-align--middle ez-margin-bottom--small" }, index$1.h("ez-check", { id: `checkbox_${item.id}`, tabIndex: "-1", class: "sc-snk-filter-bar snk-filter-bar__filter-modal-item__check", onEzChange: evt => this.updateValue(item.id, evt.detail), enabled: item.enabled, value: item.active, mode: utils.CheckMode.SWITCH }), index$1.h("div", { class: "ez-text ez-title--primary ez-text--medium ez-margin-left--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item__label" }, item.label)));
1206
1250
  });
1207
1251
  }
1208
1252
  itemKeyBoardSelect(event, item) {
@@ -1224,10 +1268,10 @@ const SnkFilterModal = class {
1224
1268
  render() {
1225
1269
  const allowCancel = this.items.filter(item => item.active).length > 0;
1226
1270
  const items = (this.items ? core.ArrayUtils.applyStringFilter(this._filterArgument, this.items) : []);
1227
- return (index.h("ez-modal-container", { class: "snk-filter__modal-container", modalTitle: this.modalTitle, modalSubTitle: this.modalSubTitle, cancelButtonLabel: this.cancelButtonLabel, okButtonLabel: this.okButtonLabel, onEzModalAction: evt => this.modalActionListener(evt), cancelButtonStatus: allowCancel ? ezModalContainer.ModalButtonStatus.ENABLED : ezModalContainer.ModalButtonStatus.DISABLED }, index.h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-modal-content" }, index.h("div", null, this.useSearch ?
1228
- index.h("ez-filter-input", { ref: ref => this._filterInput = ref, label: this.getMessage("snkFilterBar.modalFindFilter"), onEzChange: (evt) => this._filterArgument = evt.detail })
1271
+ return (index$1.h("ez-modal-container", { class: "snk-filter__modal-container", modalTitle: this.modalTitle, modalSubTitle: this.modalSubTitle, cancelButtonLabel: this.cancelButtonLabel, okButtonLabel: this.okButtonLabel, onEzModalAction: evt => this.modalActionListener(evt), cancelButtonStatus: allowCancel ? ezModalContainer.ModalButtonStatus.ENABLED : ezModalContainer.ModalButtonStatus.DISABLED }, index$1.h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-modal-content" }, index$1.h("div", null, this.useSearch ?
1272
+ index$1.h("ez-filter-input", { ref: ref => this._filterInput = ref, label: this.getMessage("snkFilterBar.modalFindFilter"), onEzChange: (evt) => this._filterArgument = evt.detail })
1229
1273
  :
1230
- undefined), items.length > 0 ? index.h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding-bottom--small" }, this.getActiveFiltersMsg()) : undefined, index.h("div", null, this.buildItems(items)), index.h("div", { class: "ez-text ez-text--large ez-align--middle ez-text--secondary ez-text--center ez-padding-bottom--large" }, this.infoText))));
1274
+ undefined), items.length > 0 ? index$1.h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding-bottom--small" }, this.getActiveFiltersMsg()) : undefined, index$1.h("div", null, this.buildItems(items)), index$1.h("div", { class: "ez-text ez-text--large ez-align--middle ez-text--secondary ez-text--center ez-padding-bottom--large" }, this.infoText))));
1231
1275
  }
1232
1276
  };
1233
1277
  SnkFilterModal.style = snkFilterModalCss;
@@ -1236,9 +1280,9 @@ const snkGridConfigCss = ".sc-snk-grid-config-h{--snk-grid-config__footer--paddi
1236
1280
 
1237
1281
  const EzGridConfig = class {
1238
1282
  constructor(hostRef) {
1239
- index.registerInstance(this, hostRef);
1240
- this.configChange = index.createEvent(this, "configChange", 7);
1241
- this.configCancel = index.createEvent(this, "configCancel", 7);
1283
+ index$1.registerInstance(this, hostRef);
1284
+ this.configChange = index$1.createEvent(this, "configChange", 7);
1285
+ this.configCancel = index$1.createEvent(this, "configCancel", 7);
1242
1286
  this._orderListItems = [];
1243
1287
  this._orderPriorityList = [];
1244
1288
  this._columListItems = [];
@@ -1338,7 +1382,7 @@ const EzGridConfig = class {
1338
1382
  }
1339
1383
  buildColumnListSlot(item, group) {
1340
1384
  const dataElementId = `configItem_${core.StringUtils.replaceAccentuatedChars(core.StringUtils.toCamelCase(item.label))}`;
1341
- return (index.h("div", null, index.h("ez-check", { mode: 'switch', id: 'switch' + ((item === null || item === void 0 ? void 0 : item.label) || '') + ((group === null || group === void 0 ? void 0 : group.group) || ''), value: group.group === this.getMessage("snkGridConfig.group.visible"), "data-element-id": dataElementId, onEzChange: (evt) => { this.switchColumnGroup(evt, item); } })));
1385
+ return (index$1.h("div", null, index$1.h("ez-check", { mode: 'switch', id: 'switch' + ((item === null || item === void 0 ? void 0 : item.label) || '') + ((group === null || group === void 0 ? void 0 : group.group) || ''), value: group.group === this.getMessage("snkGridConfig.group.visible"), "data-element-id": dataElementId, onEzChange: (evt) => { this.switchColumnGroup(evt, item); } })));
1342
1386
  }
1343
1387
  buildOrderListSlot(item) {
1344
1388
  const dataElementId = `${this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_configItem_${core.StringUtils.toCamelCase(item.label)}`;
@@ -1346,7 +1390,7 @@ const EzGridConfig = class {
1346
1390
  if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
1347
1391
  selectedOption = item.ascending == true ? constants.ORDER_VALUES.asc.value : constants.ORDER_VALUES.desc.value;
1348
1392
  }
1349
- return (index.h("div", null, index.h("snk-select-box", { selectedOption: selectedOption, key: 'snk-select-box-' + this._componenteInternalKey + '-' + item, "data-element-id": dataElementId, onEzChange: (evt) => { evt.stopPropagation(); this.updateOrder(evt.detail, item.label); } })));
1393
+ return (index$1.h("div", null, index$1.h("snk-select-box", { selectedOption: selectedOption, key: 'snk-select-box-' + this._componenteInternalKey + '-' + item, "data-element-id": dataElementId, onEzChange: (evt) => { evt.stopPropagation(); this.updateOrder(evt.detail, item.label); } })));
1350
1394
  }
1351
1395
  updateOrder(sortOrder, updatedItemLabel) {
1352
1396
  var _a;
@@ -1697,10 +1741,10 @@ const EzGridConfig = class {
1697
1741
  core.ElementIDUtils.addIDInfo(this._element);
1698
1742
  }
1699
1743
  render() {
1700
- return (index.h(index.Host, null, index.h("div", { class: "grid-config__header" }, index.h("div", { class: "title-container" }, index.h("div", { class: "" }, index.h("label", { class: "title" }, this.getMessage("snkGridConfig.gridConfiguration")), index.h("label", { class: "subtitle" }, this.getMessage("snkGridConfig.columnVisibilityOrder"))), index.h("div", { class: "button-close" }, index.h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))), index.h("div", { class: "tabselector-container" }, index.h("ez-tabselector", { selectedIndex: this.selectedIndex, onEzChange: (evt) => { this.handleTabChange(evt.detail); }, tabs: this.getColumnNames() })), index.h("div", null, index.h("ez-text-input", { "data-element-id": "searchColums", ref: (el) => this._searchElement = el, label: this.getMessage("snkGridConfig.findColumn"), onKeyUp: (evt) => this.locateColumn(evt) }, index.h("ez-icon", { slot: "leftIcon", size: "medium", iconName: "search" })))), index.h("div", { class: "grid-config__main" }, index.h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedIndex === 0 ? "" : "hidden", dataSource: this._columListItems, onEzChange: (evt) => this.handleColumnListChange(evt), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true, "data-element-id": "configCols" }), index.h("div", { class: this.selectedIndex === 1 ? "group-name" : "hidden" }, this.getMessage("snkGridConfig.info.sortingSequence")), index.h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedIndex === 1 ? "height-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: (evt) => this.handleOrderListChange(evt), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item), "data-element-id": "configDataOrder" })), index.h("div", { class: "grid-config__footer" }, index.h("ez-button", { class: "padding-right--medium", label: this.getMessage("snkGridConfig.cancel"), onClick: () => this.closeConfig() }), index.h("ez-button", { label: this.getMessage("snkGridConfig.complete"), class: "ez-button--primary", onClick: () => this.finish() }))));
1744
+ return (index$1.h(index$1.Host, null, index$1.h("div", { class: "grid-config__header" }, index$1.h("div", { class: "title-container" }, index$1.h("div", { class: "" }, index$1.h("label", { class: "title" }, this.getMessage("snkGridConfig.gridConfiguration")), index$1.h("label", { class: "subtitle" }, this.getMessage("snkGridConfig.columnVisibilityOrder"))), index$1.h("div", { class: "button-close" }, index$1.h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))), index$1.h("div", { class: "tabselector-container" }, index$1.h("ez-tabselector", { selectedIndex: this.selectedIndex, onEzChange: (evt) => { this.handleTabChange(evt.detail); }, tabs: this.getColumnNames() })), index$1.h("div", null, index$1.h("ez-text-input", { "data-element-id": "searchColums", ref: (el) => this._searchElement = el, label: this.getMessage("snkGridConfig.findColumn"), onKeyUp: (evt) => this.locateColumn(evt) }, index$1.h("ez-icon", { slot: "leftIcon", size: "medium", iconName: "search" })))), index$1.h("div", { class: "grid-config__main" }, index$1.h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedIndex === 0 ? "" : "hidden", dataSource: this._columListItems, onEzChange: (evt) => this.handleColumnListChange(evt), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true, "data-element-id": "configCols" }), index$1.h("div", { class: this.selectedIndex === 1 ? "group-name" : "hidden" }, this.getMessage("snkGridConfig.info.sortingSequence")), index$1.h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedIndex === 1 ? "height-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: (evt) => this.handleOrderListChange(evt), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item), "data-element-id": "configDataOrder" })), index$1.h("div", { class: "grid-config__footer" }, index$1.h("ez-button", { class: "padding-right--medium", label: this.getMessage("snkGridConfig.cancel"), onClick: () => this.closeConfig() }), index$1.h("ez-button", { label: this.getMessage("snkGridConfig.complete"), class: "ez-button--primary", onClick: () => this.finish() }))));
1701
1745
  }
1702
1746
  static get assetsDirs() { return ["../assets"]; }
1703
- get _element() { return index.getElement(this); }
1747
+ get _element() { return index$1.getElement(this); }
1704
1748
  };
1705
1749
  EzGridConfig.style = snkGridConfigCss;
1706
1750
 
@@ -1708,16 +1752,16 @@ const snkSelectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-i
1708
1752
 
1709
1753
  const SelectBox = class {
1710
1754
  constructor(hostRef) {
1711
- index.registerInstance(this, hostRef);
1712
- this.ezChange = index.createEvent(this, "ezChange", 7);
1755
+ index$1.registerInstance(this, hostRef);
1756
+ this.ezChange = index$1.createEvent(this, "ezChange", 7);
1713
1757
  /**
1714
1758
  * Determina a opção selecionada.
1715
1759
  */
1716
1760
  this.selectedOption = constants.ORDER_VALUES.none;
1717
1761
  }
1718
1762
  render() {
1719
- return (index.h("ez-combo-box", { class: "grid-config-combo ez-input--inverted", label: "", suppressSearch: true, value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, Object.keys(constants.ORDER_VALUES).map((key) => {
1720
- return index.h("option", { value: constants.ORDER_VALUES[key].value }, constants.ORDER_VALUES[key].label);
1763
+ return (index$1.h("ez-combo-box", { class: "grid-config-combo ez-input--inverted", label: "", suppressSearch: true, value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, Object.keys(constants.ORDER_VALUES).map((key) => {
1764
+ return index$1.h("option", { value: constants.ORDER_VALUES[key].value }, constants.ORDER_VALUES[key].label);
1721
1765
  })));
1722
1766
  }
1723
1767
  static get assetsDirs() { return ["../assets"]; }
@@ -1728,12 +1772,12 @@ const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex}";
1728
1772
 
1729
1773
  const SnkTaskbar = class {
1730
1774
  constructor(hostRef) {
1731
- index.registerInstance(this, hostRef);
1732
- this.actionClick = index.createEvent(this, "actionClick", 7);
1775
+ index$1.registerInstance(this, hostRef);
1776
+ this.actionClick = index$1.createEvent(this, "actionClick", 7);
1733
1777
  /**
1734
1778
  * Altera o modo de apresentação dos botões do snk-taskbar.
1735
1779
  */
1736
- this.presentationMode = index$1.PresentationMode.PRIMARY;
1780
+ this.presentationMode = index.PresentationMode.PRIMARY;
1737
1781
  this._titleKeyByElement = {
1738
1782
  [taskbarElements.TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
1739
1783
  [taskbarElements.TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
@@ -1834,10 +1878,10 @@ const SnkTaskbar = class {
1834
1878
  return !(this.disabledButtons && this.disabledButtons.includes(elem));
1835
1879
  }
1836
1880
  validatePresentationMode() {
1837
- if (Object.values(index$1.PresentationMode).includes(this.presentationMode)) {
1881
+ if (Object.values(index.PresentationMode).includes(this.presentationMode)) {
1838
1882
  return;
1839
1883
  }
1840
- this.presentationMode = index$1.PresentationMode.PRIMARY;
1884
+ this.presentationMode = index.PresentationMode.PRIMARY;
1841
1885
  }
1842
1886
  getElement(index, def) {
1843
1887
  let className = def === this.primaryButton ? "ez-button--primary " : "";
@@ -1900,24 +1944,24 @@ const SnkTaskbar = class {
1900
1944
  if (this._definitions === undefined) {
1901
1945
  return undefined;
1902
1946
  }
1903
- let index$1 = 0;
1904
- return (index.h(index.Host, null, this.removeEmpty(this._definitions.map((elem) => {
1947
+ let index = 0;
1948
+ return (index$1.h(index$1.Host, null, this.removeEmpty(this._definitions.map((elem) => {
1905
1949
  if (elem === taskbarElements.TaskbarElement.DIVIDER) {
1906
- index$1 = 0;
1950
+ index = 0;
1907
1951
  }
1908
1952
  else {
1909
- index$1++;
1953
+ index++;
1910
1954
  }
1911
1955
  if (taskbarElements.TaskbarElement[elem]) {
1912
- return this.getElement(index$1, taskbarElements.TaskbarElement[elem]);
1956
+ return this.getElement(index, taskbarElements.TaskbarElement[elem]);
1913
1957
  }
1914
1958
  if (this.customButtons.has(elem)) {
1915
- return this.getElement(index$1, this.customButtons.get(elem));
1959
+ return this.getElement(index, this.customButtons.get(elem));
1916
1960
  }
1917
- return index.h("slot", { name: elem });
1961
+ return index$1.h("slot", { name: elem });
1918
1962
  }))));
1919
1963
  }
1920
- get _element() { return index.getElement(this); }
1964
+ get _element() { return index$1.getElement(this); }
1921
1965
  static get watchers() { return {
1922
1966
  "buttons": ["observeButtons"]
1923
1967
  }; }