@sankhyalabs/sankhyablocks 2.5.1 → 2.6.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.
- package/dist/cjs/{SnkMessageBuilder-370e23ae.js → SnkMessageBuilder-09b25b0a.js} +20 -1
- package/dist/cjs/data-exporter-option-417da37a.js +19 -0
- package/dist/cjs/{index-20e8b68a.js → index-2cd6f753.js} +26 -0
- package/dist/cjs/index-696b5c3b.js +200 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/snk-application.cjs.entry.js +2 -2
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator_3.cjs.entry.js +71 -13
- package/dist/cjs/snk-crud.cjs.entry.js +3 -2
- package/dist/cjs/{snk-exporter-email-sender_8.cjs.entry.js → snk-data-exporter_9.cjs.entry.js} +305 -8
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-personalized.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/{taskbar-elements-3807c809.js → taskbar-elements-bbb89cdb.js} +8 -5
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/snk-data-exporter/enum/data-exporter-option.js +11 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js +4 -4
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.css +19 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +181 -0
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +140 -0
- package/dist/collection/components/snk-grid/snk-grid.js +69 -10
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +7 -4
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +2 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +33 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterResponse.js +1 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +3 -1
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +16 -0
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +1 -0
- package/dist/collection/lib/store/index.js +5 -0
- package/dist/collection/lib/utils/fileViewer/index.js +3 -0
- package/dist/collection/lib/utils/fileViewer/interfaces/IFileViewerParams.js +1 -0
- package/dist/components/ConfigStorage.js +3 -6694
- package/dist/components/DataFetcher.js +6695 -0
- package/dist/components/SnkMessageBuilder.js +20 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-application2.js +2 -1
- package/dist/components/snk-crud.js +10 -4
- package/dist/components/snk-data-exporter.d.ts +11 -0
- package/dist/components/snk-data-exporter.js +6 -0
- package/dist/components/snk-data-exporter2.js +330 -0
- package/dist/components/snk-form-config2.js +1 -1
- package/dist/components/snk-form2.js +8 -2
- package/dist/components/snk-grid2.js +74 -10
- package/dist/components/snk-taskbar2.js +212 -9
- package/dist/esm/{SnkMessageBuilder-7d583c9a.js → SnkMessageBuilder-47db5d75.js} +20 -1
- package/dist/esm/data-exporter-option-006307dd.js +19 -0
- package/dist/esm/{index-e4121713.js → index-a77b6f35.js} +25 -1
- package/dist/esm/index-d89e384f.js +198 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/sankhyablocks.js +2 -2
- package/dist/esm/snk-application.entry.js +2 -2
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator_3.entry.js +68 -10
- package/dist/esm/snk-crud.entry.js +3 -2
- package/dist/esm/{snk-exporter-email-sender_8.entry.js → snk-data-exporter_9.entry.js} +304 -8
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-detail.entry.js +1 -1
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +1 -1
- package/dist/esm/snk-filter-period.entry.js +1 -1
- package/dist/esm/snk-filter-personalized.entry.js +1 -1
- package/dist/esm/snk-filter-search.entry.js +1 -1
- package/dist/esm/snk-filter-text.entry.js +1 -1
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-form.entry.js +1 -1
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/{taskbar-elements-b2bbe275.js → taskbar-elements-beec3b27.js} +8 -5
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/{p-a3871147.entry.js → p-02d430a7.entry.js} +3 -3
- package/dist/sankhyablocks/p-04581d0c.entry.js +1 -0
- package/dist/sankhyablocks/p-112bb324.js +1 -0
- package/dist/sankhyablocks/{p-c17be74f.entry.js → p-12ebe36a.entry.js} +1 -1
- package/dist/sankhyablocks/p-13116d05.entry.js +1 -0
- package/dist/sankhyablocks/{p-14af45cc.entry.js → p-187b0d06.entry.js} +1 -1
- package/dist/sankhyablocks/{p-570cc474.entry.js → p-1a2533d0.entry.js} +1 -1
- package/dist/sankhyablocks/{p-fd3b562d.entry.js → p-1ccaea51.entry.js} +1 -1
- package/dist/sankhyablocks/p-1d7a0daf.js +1 -0
- package/dist/sankhyablocks/p-50c8bcb7.entry.js +1 -0
- package/dist/sankhyablocks/{p-44ce5b90.entry.js → p-57895452.entry.js} +1 -1
- package/dist/sankhyablocks/{p-48bbbd2c.entry.js → p-68fcc226.entry.js} +1 -1
- package/dist/sankhyablocks/p-719e570a.js +1 -0
- package/dist/sankhyablocks/{p-00b3c5d8.entry.js → p-772f1c44.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c30d0966.entry.js → p-82e20fc0.entry.js} +1 -1
- package/dist/sankhyablocks/{p-eff899b0.entry.js → p-91c23d20.entry.js} +1 -1
- package/dist/sankhyablocks/p-a77dd79a.js +2 -0
- package/dist/sankhyablocks/{p-f50c6ef6.entry.js → p-ab4ff312.entry.js} +1 -1
- package/dist/sankhyablocks/p-c8327a5c.js +1 -0
- package/dist/sankhyablocks/{p-2664ae24.entry.js → p-d3e402d3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9593c937.entry.js → p-d7ae56ce.entry.js} +1 -1
- package/dist/sankhyablocks/{p-70e52fee.entry.js → p-d96bf6a7.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b0a0222f.entry.js → p-df5d94c6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-db111acd.entry.js → p-e075dba7.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-data-exporter/data/attachment.d.ts +1 -1
- package/dist/types/components/snk-data-exporter/data/email.d.ts +3 -3
- package/dist/types/components/snk-data-exporter/data/export-config.d.ts +5 -5
- package/dist/types/components/snk-data-exporter/data/export-result.d.ts +5 -5
- package/dist/types/components/snk-data-exporter/data/report.d.ts +1 -1
- package/dist/types/components/snk-data-exporter/enum/data-exporter-option.d.ts +10 -0
- package/dist/types/components/snk-data-exporter/exporter-email-sender/email-info-step.d.ts +4 -4
- package/dist/types/components/snk-data-exporter/exporter-email-sender/options-step.d.ts +4 -4
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +9 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +40 -0
- package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +61 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -2
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +1 -1
- package/dist/types/components.d.ts +33 -3
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +14 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterResponse.d.ts +7 -0
- package/dist/types/lib/message/resources/snk-data-exporter.msg.d.ts +1 -0
- package/dist/types/lib/store/index.d.ts +4 -0
- package/dist/types/lib/utils/fileViewer/index.d.ts +2 -0
- package/dist/types/lib/utils/fileViewer/interfaces/IFileViewerParams.d.ts +4 -0
- package/package.json +3 -2
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/AuthorizationConfig-79ffae4b.js +0 -7
- package/dist/esm/AuthorizationConfig-dcbd207a.js +0 -7
- package/dist/sankhyablocks/p-8a872a35.entry.js +0 -1
- package/dist/sankhyablocks/p-9ba3df4c.js +0 -2
- package/dist/sankhyablocks/p-9e67cf79.entry.js +0 -1
- package/dist/sankhyablocks/p-c118ef2a.entry.js +0 -1
- package/dist/sankhyablocks/p-dbaad88c.js +0 -1
- package/dist/sankhyablocks/p-dc36cfbf.js +0 -1
- package/dist/sankhyablocks/p-e7f772ed.js +0 -1
package/dist/cjs/{snk-exporter-email-sender_8.cjs.entry.js → snk-data-exporter_9.cjs.entry.js}
RENAMED
|
@@ -2,17 +2,313 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
+
const dataExporterOption = require('./data-exporter-option-417da37a.js');
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-91953f29.js');
|
|
7
9
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
8
10
|
const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
|
|
9
11
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
10
12
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
11
|
-
const ConfigStorage = require('./ConfigStorage-91953f29.js');
|
|
12
13
|
const constants = require('./constants-a47a5190.js');
|
|
13
|
-
const
|
|
14
|
-
const taskbarElements = require('./taskbar-elements-3807c809.js');
|
|
14
|
+
const taskbarElements = require('./taskbar-elements-bbb89cdb.js');
|
|
15
15
|
require('./_commonjsHelpers-537d719a.js');
|
|
16
|
+
require('./index-696b5c3b.js');
|
|
17
|
+
|
|
18
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
19
|
+
var t = {};
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
23
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
24
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
25
|
+
t[p[i]] = s[p[i]];
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
};
|
|
29
|
+
function fetchDataExporter(_a) {
|
|
30
|
+
var { methodName } = _a, requestBody = __rest(_a, ["methodName"]);
|
|
31
|
+
const serviceName = `DataExporterSPBean.${methodName}`;
|
|
32
|
+
const payload = { serviceName, requestBody };
|
|
33
|
+
return new Promise((resolve, reject) => {
|
|
34
|
+
ConfigStorage.DataFetcher.get()
|
|
35
|
+
.callServiceBroker(serviceName, core.ObjectUtils.objectToString(payload))
|
|
36
|
+
.then(result => resolve(getFormatResponse(result)))
|
|
37
|
+
.catch(error => reject(error));
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function getFormatResponse(result) {
|
|
41
|
+
var _a;
|
|
42
|
+
const response = (_a = result === null || result === void 0 ? void 0 : result.json) === null || _a === void 0 ? void 0 : _a.$;
|
|
43
|
+
if (response == undefined) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
return core.ObjectUtils.stringToObject(response);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function fileViewer({ fileSessionKey }) {
|
|
50
|
+
window.open(`${window.location.protocol}//${window.location.hostname}:${window.location.port}/mge/visualizadorArquivos.mge?chaveArquivo=${fileSessionKey}&download=S`);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
class ItemBuilder {
|
|
54
|
+
constructor(getMessage, selectedNumber) {
|
|
55
|
+
this._selectedNumber = 0;
|
|
56
|
+
this._getMessage = getMessage;
|
|
57
|
+
this._selectedNumber = selectedNumber;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Método responsável por inserir os items no array de opções.
|
|
61
|
+
* @param option - Nome da opção que será inserida no array.
|
|
62
|
+
* @param items - Array que será alimentado com as opções permitidas.
|
|
63
|
+
*/
|
|
64
|
+
setExportOption(option, items) {
|
|
65
|
+
const groupName = this.getExportGroupName();
|
|
66
|
+
if (option === dataExporterOption.DataExporterOption.EXPORT_TO_PDF) {
|
|
67
|
+
items.push(this.getExportToPDF(groupName));
|
|
68
|
+
}
|
|
69
|
+
if (option === dataExporterOption.DataExporterOption.EXPORT_TO_XLS) {
|
|
70
|
+
items.push(this.getExportToXLS(groupName));
|
|
71
|
+
}
|
|
72
|
+
this.setExportCurrentPage(option, items);
|
|
73
|
+
this.setExportByEmail(option, items);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Método responsável por inserir os itens de exportação personalizada.
|
|
77
|
+
* @param option - Nome da opção que será inserida no array.
|
|
78
|
+
* @param items - Array que será alimentado com as opções permitidas.
|
|
79
|
+
*/
|
|
80
|
+
setExportCurrentPage(option, items) {
|
|
81
|
+
var _a;
|
|
82
|
+
const pageOptions = [dataExporterOption.DataExporterOption.EXPORT_PAGE_TO_PDF, dataExporterOption.DataExporterOption.EXPORT_PAGE_TO_XLS];
|
|
83
|
+
if (option === dataExporterOption.DataExporterOption.EXPORT_CURRENT_PAGE) {
|
|
84
|
+
items.push(this.getCurrentPage());
|
|
85
|
+
}
|
|
86
|
+
if (pageOptions.includes(option)) {
|
|
87
|
+
let item = items.find((item) => item.id === dataExporterOption.DataExporterOption.EXPORT_CURRENT_PAGE);
|
|
88
|
+
if (item == undefined) {
|
|
89
|
+
items.push(this.getCurrentPage());
|
|
90
|
+
item = items.find((item) => item.id === dataExporterOption.DataExporterOption.EXPORT_CURRENT_PAGE);
|
|
91
|
+
}
|
|
92
|
+
if (!((_a = item === null || item === void 0 ? void 0 : item.children) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
93
|
+
item.children = [];
|
|
94
|
+
}
|
|
95
|
+
if (option === dataExporterOption.DataExporterOption.EXPORT_PAGE_TO_PDF) {
|
|
96
|
+
item.children.push(this.getExportPageToPDF());
|
|
97
|
+
}
|
|
98
|
+
if (option === dataExporterOption.DataExporterOption.EXPORT_PAGE_TO_XLS) {
|
|
99
|
+
item.children.push(this.getExportPageToXLS());
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Método responsável por inserir os itens de exportação por e-mail.
|
|
105
|
+
* @param option - Nome da opção que será inserida no array.
|
|
106
|
+
* @param items - Array que será alimentado com as opções permitidas.
|
|
107
|
+
*/
|
|
108
|
+
setExportByEmail(option, items) {
|
|
109
|
+
if (option === dataExporterOption.DataExporterOption.EXPORT_BY_EMAIL) {
|
|
110
|
+
items.push(this.getExportByEmail());
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Método responsável por capturar o objeto com os dados de exportação em PDF.
|
|
115
|
+
* @param groupName - Nome do grupo da opção que será inserida na lista.
|
|
116
|
+
* @returns Retorna o objeto com os dados de exportação em PDF.
|
|
117
|
+
*/
|
|
118
|
+
getExportToPDF(groupName) {
|
|
119
|
+
return {
|
|
120
|
+
id: dataExporterOption.DataExporterOption.EXPORT_TO_PDF,
|
|
121
|
+
label: "PDF (.pdf)",
|
|
122
|
+
group: groupName
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Método responsável por capturar o objeto com os dados de exportação em XLS.
|
|
127
|
+
* @param groupName - Nome do grupo da opção que será inserida na lista.
|
|
128
|
+
* @returns Retorna o objeto com os dados de exportação em XLS.
|
|
129
|
+
*/
|
|
130
|
+
getExportToXLS(groupName) {
|
|
131
|
+
return {
|
|
132
|
+
id: dataExporterOption.DataExporterOption.EXPORT_TO_XLS,
|
|
133
|
+
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`,
|
|
134
|
+
group: groupName
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Método responsável por capturar o objeto com os dados de exportação personalizada.
|
|
139
|
+
* @returns Retorna o objeto com os dados de exportação personalizada.
|
|
140
|
+
*/
|
|
141
|
+
getCurrentPage() {
|
|
142
|
+
return {
|
|
143
|
+
id: dataExporterOption.DataExporterOption.EXPORT_CURRENT_PAGE,
|
|
144
|
+
label: this._getMessage("snkDataExporter.label.currentPage"),
|
|
145
|
+
group: this._getMessage("snkDataExporter.group.custom")
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Método responsável por capturar o objeto com os dados de exportação personalizada em PDF.
|
|
150
|
+
* @returns Retorna o objeto com os dados de exportação personalizada em PDF.
|
|
151
|
+
*/
|
|
152
|
+
getExportPageToPDF() {
|
|
153
|
+
return {
|
|
154
|
+
id: dataExporterOption.DataExporterOption.EXPORT_PAGE_TO_PDF,
|
|
155
|
+
label: "PDF (.pdf)"
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Método responsável por capturar o objeto com os dados de exportação personalizada em XLS.
|
|
160
|
+
* @returns Retorna o objeto com os dados de exportação personalizada em XLS.
|
|
161
|
+
*/
|
|
162
|
+
getExportPageToXLS() {
|
|
163
|
+
return {
|
|
164
|
+
id: dataExporterOption.DataExporterOption.EXPORT_PAGE_TO_XLS,
|
|
165
|
+
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Método responsável por capturar o objeto com os dados de exportação por e-mail.
|
|
170
|
+
* @returns Retorna o objeto com os dados de exportação por e-mail.
|
|
171
|
+
*/
|
|
172
|
+
getExportByEmail() {
|
|
173
|
+
return {
|
|
174
|
+
id: dataExporterOption.DataExporterOption.EXPORT_BY_EMAIL,
|
|
175
|
+
label: `${this._getMessage("snkDataExporter.label.sendByEmail")}...`
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Método responsável por capturar o nome do grupo da opção que será inserida na lista.
|
|
180
|
+
* @returns Retorna o nome do grupo da opção que será inserida na lista.
|
|
181
|
+
*/
|
|
182
|
+
getExportGroupName() {
|
|
183
|
+
if (this._selectedNumber === 1) {
|
|
184
|
+
return this._getMessage("snkDataExporter.group.export.selectedLine");
|
|
185
|
+
}
|
|
186
|
+
if (this._selectedNumber > 1) {
|
|
187
|
+
return this._getMessage("snkDataExporter.group.export.multiSelected").replace('{0}', this._selectedNumber.toString());
|
|
188
|
+
}
|
|
189
|
+
return this._getMessage("snkDataExporter.group.export.default");
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
const snkDataExporterCss = ".sc-snk-data-exporter-h{--snk-data-exporter--z-index:var(--more-visible, 2);display:flex;width:fit-content;height:fit-content}.snk-data-exporter.sc-snk-data-exporter{display:flex;width:fit-content;height:fit-content;z-index:var(--snk-data-exporter--z-index)}";
|
|
194
|
+
|
|
195
|
+
const SnkDataExporter = class {
|
|
196
|
+
constructor(hostRef) {
|
|
197
|
+
index.registerInstance(this, hostRef);
|
|
198
|
+
this.ezClickDataExporter = index.createEvent(this, "ezClickDataExporter", 7);
|
|
199
|
+
this._items = [];
|
|
200
|
+
this._selectedNumber = 0;
|
|
201
|
+
this._showDropdown = false;
|
|
202
|
+
this._releasedToExport = [
|
|
203
|
+
dataExporterOption.DataExporterOption.EXPORT_TO_PDF,
|
|
204
|
+
dataExporterOption.DataExporterOption.EXPORT_BY_EMAIL,
|
|
205
|
+
dataExporterOption.DataExporterOption.EXPORT_PDF_TO_EMAIL,
|
|
206
|
+
dataExporterOption.DataExporterOption.EXPORT_XLS_TO_EMAIL
|
|
207
|
+
];
|
|
208
|
+
/**
|
|
209
|
+
* Provedor das informações para exportação dos dados.
|
|
210
|
+
*/
|
|
211
|
+
this.provider = null;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
215
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
|
216
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
217
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-data-exporter.msg.ts"
|
|
218
|
+
*/
|
|
219
|
+
getMessage(key, params) {
|
|
220
|
+
return this._application.messagesBuilder.getMessage(key, params);
|
|
221
|
+
}
|
|
222
|
+
positionDropdown() {
|
|
223
|
+
var _a;
|
|
224
|
+
const bounding = (_a = this._ezButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
225
|
+
if (bounding == undefined || this._ezDropdown == undefined) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
this._ezDropdown.style.top = (bounding.y + bounding.height + 5) + "px";
|
|
229
|
+
this._ezDropdown.style.left = bounding.x + "px";
|
|
230
|
+
}
|
|
231
|
+
closeDropdown(evt) {
|
|
232
|
+
const target = evt === null || evt === void 0 ? void 0 : evt.target;
|
|
233
|
+
if (target == undefined) {
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
if (!target.closest(".snk-data-exporter")) {
|
|
237
|
+
this._showDropdown = false;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
setEvents() {
|
|
241
|
+
document.removeEventListener("click", this.closeDropdown.bind(this));
|
|
242
|
+
document.addEventListener("click", this.closeDropdown.bind(this));
|
|
243
|
+
document.removeEventListener("scroll", this.positionDropdown.bind(this));
|
|
244
|
+
document.addEventListener("scroll", this.positionDropdown.bind(this));
|
|
245
|
+
}
|
|
246
|
+
controlDropdown() {
|
|
247
|
+
this._showDropdown = !this._showDropdown;
|
|
248
|
+
}
|
|
249
|
+
async processExporter(evt) {
|
|
250
|
+
const item = evt === null || evt === void 0 ? void 0 : evt.detail;
|
|
251
|
+
if (!this._releasedToExport.includes(item === null || item === void 0 ? void 0 : item.id)) {
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
if (item.id !== dataExporterOption.DataExporterOption.EXPORT_BY_EMAIL) {
|
|
255
|
+
if (this.provider == undefined) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
const filters = this.provider.getFilters();
|
|
259
|
+
const columns = this.provider.getColumnsMetadata();
|
|
260
|
+
const sort = this.provider.getOrders();
|
|
261
|
+
const resourceURI = this.provider.getResourceURI();
|
|
262
|
+
fetchDataExporter({ filters, columns, sort, resourceURI, methodName: item.id })
|
|
263
|
+
.then((response) => fileViewer(Object.assign(Object.assign({}, response), { fileType: "PDF" })))
|
|
264
|
+
.catch(err => console.log(err));
|
|
265
|
+
}
|
|
266
|
+
this.ezClickDataExporter.emit(item);
|
|
267
|
+
this._showDropdown = false;
|
|
268
|
+
}
|
|
269
|
+
getItems() {
|
|
270
|
+
const items = [];
|
|
271
|
+
this._releasedToExport
|
|
272
|
+
.forEach((option) => {
|
|
273
|
+
this._itemBuilder.setExportOption(option, items);
|
|
274
|
+
});
|
|
275
|
+
return items;
|
|
276
|
+
}
|
|
277
|
+
loadDropdown() {
|
|
278
|
+
var _a;
|
|
279
|
+
this._selectedNumber = ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedNumber()) || 0;
|
|
280
|
+
this._itemBuilder = new ItemBuilder(this.getMessage.bind(this), this._selectedNumber);
|
|
281
|
+
this._items = this.getItems();
|
|
282
|
+
}
|
|
283
|
+
componentWillLoad() {
|
|
284
|
+
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
285
|
+
this.loadDropdown();
|
|
286
|
+
this.setEvents();
|
|
287
|
+
}
|
|
288
|
+
componentDidLoad() {
|
|
289
|
+
if (this._element == undefined) {
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
core.ElementIDUtils.addIDInfo(this._element);
|
|
293
|
+
}
|
|
294
|
+
componentWillUpdate() {
|
|
295
|
+
if (this._showDropdown) {
|
|
296
|
+
this.loadDropdown();
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
componentDidUpdate() {
|
|
300
|
+
if (this._showDropdown) {
|
|
301
|
+
this.positionDropdown();
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
render() {
|
|
305
|
+
return (index.h(index.Host, null, index.h("div", { class: "snk-data-exporter" }, 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 &&
|
|
306
|
+
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 &&
|
|
307
|
+
index.h("div", Object.assign({ class: "ez-scrim ez-scrim-light" }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("ezScrim")}` }))));
|
|
308
|
+
}
|
|
309
|
+
get _element() { return index.getElement(this); }
|
|
310
|
+
};
|
|
311
|
+
SnkDataExporter.style = snkDataExporterCss;
|
|
16
312
|
|
|
17
313
|
const EmailInfoStep = ({ getMessage, changeInfo, data }) => {
|
|
18
314
|
return index.h("div", null,
|
|
@@ -1516,7 +1812,7 @@ const SnkTaskbar = class {
|
|
|
1516
1812
|
[taskbarElements.TaskbarElement.GRID_MODE]: "snkTaskbar.titleGridMode",
|
|
1517
1813
|
[taskbarElements.TaskbarElement.FORM_MODE]: "snkTaskbar.titleFormMode",
|
|
1518
1814
|
[taskbarElements.TaskbarElement.CONFIGURATOR]: "snkTaskbar.titleConfigurator",
|
|
1519
|
-
[taskbarElements.TaskbarElement.
|
|
1815
|
+
[taskbarElements.TaskbarElement.DATA_EXPORTER]: "snkTaskbar.titleDataExporter"
|
|
1520
1816
|
};
|
|
1521
1817
|
}
|
|
1522
1818
|
observeButtons() {
|
|
@@ -1539,8 +1835,8 @@ const SnkTaskbar = class {
|
|
|
1539
1835
|
if (buttonName === taskbarElements.AuthorizationElements.CONFIGURATOR) {
|
|
1540
1836
|
return this._permissions
|
|
1541
1837
|
? this._permissions.isSup
|
|
1542
|
-
|| this._permissions[
|
|
1543
|
-
|| this._permissions[
|
|
1838
|
+
|| this._permissions[dataExporterOption.AuthorizationConfig.CONFIG_GRID]
|
|
1839
|
+
|| this._permissions[dataExporterOption.AuthorizationConfig.CONFIG]
|
|
1544
1840
|
: false;
|
|
1545
1841
|
}
|
|
1546
1842
|
if (taskbarElements.AuthorizationElements[buttonName]) {
|
|
@@ -1607,7 +1903,7 @@ const SnkTaskbar = class {
|
|
|
1607
1903
|
className += "ez-padding-left--medium";
|
|
1608
1904
|
}
|
|
1609
1905
|
if (taskbarElements.TaskbarElement[def.toString()]) {
|
|
1610
|
-
return taskbarElements.buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.actionsList);
|
|
1906
|
+
return taskbarElements.buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.actionsList, this.configName);
|
|
1611
1907
|
}
|
|
1612
1908
|
else {
|
|
1613
1909
|
return taskbarElements.buildCustomButton(def, className, this.getIdElemBtnCustom(def), elem => this.elementClick(elem), elem => this.isEnabled(elem));
|
|
@@ -1685,6 +1981,7 @@ const SnkTaskbar = class {
|
|
|
1685
1981
|
};
|
|
1686
1982
|
SnkTaskbar.style = snkTaskbarCss;
|
|
1687
1983
|
|
|
1984
|
+
exports.snk_data_exporter = SnkDataExporter;
|
|
1688
1985
|
exports.snk_exporter_email_sender = SnkExporterEmailSender;
|
|
1689
1986
|
exports.snk_filter_bar = SnkFilterBar;
|
|
1690
1987
|
exports.snk_filter_item = SnkFilterItem;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
|
-
const SnkMessageBuilder = require('./SnkMessageBuilder-
|
|
8
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-09b25b0a.js');
|
|
9
9
|
|
|
10
10
|
const snkDataUnitCss = ".sc-snk-data-unit-h{display:flex;flex-direction:column;height:100%}";
|
|
11
11
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
8
8
|
const core = require('@sankhyalabs/core');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const draggable_bundle = require('./draggable.bundle-82a25c06.js');
|
|
7
7
|
const core = require('@sankhyalabs/core');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const taskbarProcessor = require('./taskbar-processor-6f3d2a75.js');
|
|
8
8
|
const ConfigStorage = require('./ConfigStorage-91953f29.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
8
|
const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--medium, 12px);max-height:100%;height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records.sc-snk-pesquisa{font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);color:var(--snk-pesquisa__records--color);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const draggable_bundle = require('./draggable.bundle-82a25c06.js');
|
|
7
7
|
const core = require('@sankhyalabs/core');
|
|
8
8
|
const constants = require('./constants-a47a5190.js');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-2cd6f753.js');
|
|
4
|
+
const index$1 = require('./index-696b5c3b.js');
|
|
4
5
|
|
|
5
6
|
exports.TaskbarElement = void 0;
|
|
6
7
|
(function (TaskbarElement) {
|
|
@@ -18,7 +19,7 @@ exports.TaskbarElement = void 0;
|
|
|
18
19
|
TaskbarElement["MORE_OPTIONS"] = "MORE_OPTIONS";
|
|
19
20
|
TaskbarElement["DIVIDER"] = "DIVIDER";
|
|
20
21
|
TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
|
|
21
|
-
TaskbarElement["
|
|
22
|
+
TaskbarElement["DATA_EXPORTER"] = "DATA_EXPORTER";
|
|
22
23
|
})(exports.TaskbarElement || (exports.TaskbarElement = {}));
|
|
23
24
|
exports.AuthorizationElements = void 0;
|
|
24
25
|
(function (AuthorizationElements) {
|
|
@@ -46,7 +47,8 @@ const buildCustomButton = (def, className, dataElementId, action, isEnabled) =>
|
|
|
46
47
|
return textButton(def.name, className, dataElementId, text, hint, action, isEnabled);
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
|
-
const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions) => {
|
|
50
|
+
const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions, configName) => {
|
|
51
|
+
var _a;
|
|
50
52
|
const title = getTitle(element);
|
|
51
53
|
switch (element) {
|
|
52
54
|
case exports.TaskbarElement.PREVIOUS:
|
|
@@ -73,12 +75,13 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
|
73
75
|
return iconButton("list", element, className, dataElementId, title, action, isEnabled);
|
|
74
76
|
case exports.TaskbarElement.CONFIGURATOR:
|
|
75
77
|
return iconButton("settings-inverted", element, className, dataElementId, title, action, isEnabled);
|
|
76
|
-
case exports.TaskbarElement.EXPORT:
|
|
77
|
-
return iconButton("file-download", element, className, dataElementId, title, action, isEnabled);
|
|
78
78
|
case exports.TaskbarElement.MORE_OPTIONS:
|
|
79
79
|
return actionButton(element, className, dataElementId, title, action, isEnabled, actions);
|
|
80
80
|
case exports.TaskbarElement.DIVIDER:
|
|
81
81
|
return index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-horizontal--medium", "data-taskbar-divider": true });
|
|
82
|
+
case exports.TaskbarElement.DATA_EXPORTER:
|
|
83
|
+
const provider = (_a = index$1.store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
|
|
84
|
+
return index.h("snk-data-exporter", { class: className, title: title, provider: provider, "data-element-id": dataElementId });
|
|
82
85
|
}
|
|
83
86
|
};
|
|
84
87
|
function textButton(name, className, dataElementId, text, title, action, isEnabled) {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"./components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js",
|
|
10
10
|
"./components/snk-configurator/snk-configurator.js",
|
|
11
11
|
"./components/snk-crud/snk-crud.js",
|
|
12
|
+
"./components/snk-data-exporter/snk-data-exporter.js",
|
|
12
13
|
"./components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js",
|
|
13
14
|
"./components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js",
|
|
14
15
|
"./components/snk-filter-bar/snk-filter-bar.js",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export var DataExporterOption;
|
|
2
|
+
(function (DataExporterOption) {
|
|
3
|
+
DataExporterOption["EXPORT_TO_PDF"] = "exportToPDF";
|
|
4
|
+
DataExporterOption["EXPORT_TO_XLS"] = "exportToXLS";
|
|
5
|
+
DataExporterOption["EXPORT_CURRENT_PAGE"] = "exportCurrentPage";
|
|
6
|
+
DataExporterOption["EXPORT_PAGE_TO_PDF"] = "exportPageToPDF";
|
|
7
|
+
DataExporterOption["EXPORT_PAGE_TO_XLS"] = "exportPageToXLS";
|
|
8
|
+
DataExporterOption["EXPORT_BY_EMAIL"] = "exportToEmail";
|
|
9
|
+
DataExporterOption["EXPORT_PDF_TO_EMAIL"] = "exportPDFToEmail";
|
|
10
|
+
DataExporterOption["EXPORT_XLS_TO_EMAIL"] = "exportXLSToEmail";
|
|
11
|
+
})(DataExporterOption || (DataExporterOption = {}));
|
|
@@ -115,7 +115,7 @@ export class SnkExporterEmailSender {
|
|
|
115
115
|
return {
|
|
116
116
|
"open": {
|
|
117
117
|
"complexType": {
|
|
118
|
-
"signature": "(config:
|
|
118
|
+
"signature": "(config: IExportConfig) => Promise<IExportResult>",
|
|
119
119
|
"parameters": [{
|
|
120
120
|
"tags": [],
|
|
121
121
|
"text": ""
|
|
@@ -124,16 +124,16 @@ export class SnkExporterEmailSender {
|
|
|
124
124
|
"Promise": {
|
|
125
125
|
"location": "global"
|
|
126
126
|
},
|
|
127
|
-
"
|
|
127
|
+
"IExportResult": {
|
|
128
128
|
"location": "import",
|
|
129
129
|
"path": "../data/export-result"
|
|
130
130
|
},
|
|
131
|
-
"
|
|
131
|
+
"IExportConfig": {
|
|
132
132
|
"location": "import",
|
|
133
133
|
"path": "../data/export-config"
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
|
-
"return": "Promise<
|
|
136
|
+
"return": "Promise<IExportResult>"
|
|
137
137
|
},
|
|
138
138
|
"docs": {
|
|
139
139
|
"text": "",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
/*@doc Define o posicionamento de z-index do componente.*/
|
|
3
|
+
--snk-data-exporter--z-index: var(--more-visible, 2);
|
|
4
|
+
|
|
5
|
+
/*private*/
|
|
6
|
+
display: flex;
|
|
7
|
+
width: fit-content;
|
|
8
|
+
height: fit-content;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.snk-data-exporter {
|
|
12
|
+
/*private*/
|
|
13
|
+
display: flex;
|
|
14
|
+
width: fit-content;
|
|
15
|
+
height: fit-content;
|
|
16
|
+
|
|
17
|
+
/*public*/
|
|
18
|
+
z-index: var(--snk-data-exporter--z-index);
|
|
19
|
+
}
|