@sankhyalabs/sankhyablocks 2.11.0 → 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.
- package/dist/cjs/{SnkMessageBuilder-248b5105.js → SnkMessageBuilder-b1e5ee65.js} +1 -0
- package/dist/cjs/{constants-a47a5190.js → constants-0069b951.js} +14 -0
- package/dist/cjs/index-0e663819.js +33 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +48 -34
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator_3.cjs.entry.js +41 -10
- package/dist/cjs/snk-crud.cjs.entry.js +4 -8
- package/dist/cjs/snk-data-exporter_8.cjs.entry.js +182 -138
- package/dist/cjs/snk-data-unit.cjs.entry.js +6 -6
- 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-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/{taskbar-elements-89bf9399.js → taskbar-elements-fec33533.js} +1 -1
- package/dist/collection/components/snk-application/snk-application.js +60 -10
- package/dist/collection/components/snk-crud/snk-crud.js +1 -23
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.css +5 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +54 -18
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +1 -1
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +5 -5
- package/dist/collection/components/snk-grid/snk-grid.js +39 -26
- package/dist/collection/lib/@types/index.js +26 -0
- package/dist/collection/lib/applet-caller/applet-caller.js +6 -0
- package/dist/collection/lib/applet-caller/interfaces/IAppletCallerParams.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +0 -7
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +1 -0
- package/dist/collection/lib/utils/constants.js +12 -0
- package/dist/collection/lib/utils/fileViewer/index.js +24 -2
- package/dist/collection/lib/workspace/workspace.js +11 -0
- package/dist/components/SnkMessageBuilder.js +1 -0
- package/dist/components/constants.js +13 -1
- package/dist/components/snk-application2.js +48 -33
- package/dist/components/snk-crud.js +3 -8
- package/dist/components/snk-data-exporter2.js +130 -53
- package/dist/components/snk-data-unit.js +5 -5
- package/dist/components/snk-form2.js +2 -2
- package/dist/components/snk-grid2.js +41 -11
- package/dist/components/snk-tab-config2.js +1 -1
- package/dist/components/snk-taskbar2.js +2 -8
- package/dist/esm/{SnkMessageBuilder-4a060599.js → SnkMessageBuilder-608c038f.js} +1 -0
- package/dist/esm/{constants-babe1a08.js → constants-8ad13317.js} +13 -1
- package/dist/esm/index-1564817d.js +33 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +48 -34
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator_3.entry.js +41 -10
- package/dist/esm/snk-crud.entry.js +4 -8
- package/dist/esm/snk-data-exporter_8.entry.js +111 -67
- package/dist/esm/snk-data-unit.entry.js +6 -6
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-form.entry.js +1 -1
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/{taskbar-elements-c8966343.js → taskbar-elements-e4006db7.js} +1 -1
- package/dist/sankhyablocks/{p-a65d6ba3.entry.js → p-223d1bd9.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4c759619.entry.js → p-392d3c18.entry.js} +1 -1
- package/dist/sankhyablocks/p-5534e08c.js +1 -0
- package/dist/sankhyablocks/p-6671b0e1.entry.js +1 -0
- package/dist/sankhyablocks/{p-9b858e3a.entry.js → p-7ba9d7c7.entry.js} +1 -1
- package/dist/sankhyablocks/p-847d06a3.entry.js +1 -0
- package/dist/sankhyablocks/p-ad2026bb.js +1 -0
- package/dist/sankhyablocks/{p-420d07c4.js → p-b03ff65b.js} +1 -1
- package/dist/sankhyablocks/p-b7a379bf.entry.js +83 -0
- package/dist/sankhyablocks/{p-f624979d.js → p-c422cbd2.js} +1 -1
- package/dist/sankhyablocks/p-c613957d.entry.js +1 -0
- package/dist/sankhyablocks/{p-4a5c1d36.entry.js → p-e24e488b.entry.js} +1 -1
- package/dist/sankhyablocks/{p-cd19bd29.entry.js → p-f6f71be7.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +9 -1
- package/dist/types/components/snk-crud/snk-crud.d.ts +0 -4
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +2 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +2 -1
- package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +1 -1
- package/dist/types/components.d.ts +7 -16
- package/dist/types/lib/@types/index.d.ts +23 -0
- package/dist/types/lib/applet-caller/applet-caller.d.ts +4 -0
- package/dist/types/lib/applet-caller/interfaces/IAppletCallerParams.d.ts +6 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterResponse.d.ts +5 -4
- package/dist/types/lib/utils/constants.d.ts +12 -0
- package/dist/types/lib/utils/fileViewer/index.d.ts +2 -2
- package/dist/types/lib/workspace/workspace.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/index-9c584423.js +0 -7
- package/dist/collection/components/snk-data-exporter/enum/data-exporter-option.js +0 -11
- package/dist/esm/index-de5f37a6.js +0 -7
- package/dist/sankhyablocks/p-01c361bb.entry.js +0 -1
- package/dist/sankhyablocks/p-05fadb77.js +0 -1
- package/dist/sankhyablocks/p-3ee68d78.entry.js +0 -1
- package/dist/sankhyablocks/p-6673c77c.js +0 -1
- package/dist/sankhyablocks/p-b84c7c61.entry.js +0 -90
- package/dist/sankhyablocks/p-c32cfc29.entry.js +0 -1
- package/dist/types/components/snk-data-exporter/enum/data-exporter-option.d.ts +0 -10
|
@@ -2,9 +2,9 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
|
|
|
2
2
|
import { ElementIDUtils, ApplicationContext, DataType } from '@sankhyalabs/core';
|
|
3
3
|
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
4
4
|
import { C as ConfigStorage } from './ConfigStorage.js';
|
|
5
|
-
import { P as PresentationMode,
|
|
5
|
+
import { P as PresentationMode, d as defineCustomElement$a } from './snk-data-exporter2.js';
|
|
6
6
|
import { T as TaskbarProcessor } from './taskbar-processor.js';
|
|
7
|
-
import { d as defineCustomElement$
|
|
7
|
+
import { s as store, d as defineCustomElement$1 } from './snk-taskbar2.js';
|
|
8
8
|
import { d as defineCustomElement$9 } from './snk-exporter-email-sender2.js';
|
|
9
9
|
import { d as defineCustomElement$8 } from './snk-filter-bar2.js';
|
|
10
10
|
import { d as defineCustomElement$7 } from './snk-filter-detail2.js';
|
|
@@ -30,10 +30,6 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
30
30
|
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH", "DATA_EXPORTER"]
|
|
31
31
|
});
|
|
32
32
|
this._popUpGridConfig = false;
|
|
33
|
-
/**
|
|
34
|
-
* Determina se haverá exportação de dados
|
|
35
|
-
*/
|
|
36
|
-
this.enableDataExporter = false;
|
|
37
33
|
/**
|
|
38
34
|
* Altera o modo de apresentação dos botões do snk-taskbar.
|
|
39
35
|
*/
|
|
@@ -105,7 +101,10 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
105
101
|
buildColumnsMetadata(columnsMetadata, gridColumns) {
|
|
106
102
|
gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach((column) => {
|
|
107
103
|
var _a, _b, _c, _d, _e;
|
|
108
|
-
|
|
104
|
+
/**
|
|
105
|
+
* TODO: Analisar e criar uma melhor forma de tratar essa validação do "RECDESP".
|
|
106
|
+
*/
|
|
107
|
+
if (column.hidden && column.name !== "RECDESP") {
|
|
109
108
|
return;
|
|
110
109
|
}
|
|
111
110
|
const fieldData = (_d = (_c = (_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.fields) === null || _c === void 0 ? void 0 : _c.filter((field) => field.name === column.name)) === null || _d === void 0 ? void 0 : _d[0];
|
|
@@ -113,7 +112,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
113
112
|
label: column.label,
|
|
114
113
|
id: column.name,
|
|
115
114
|
width: column.width,
|
|
116
|
-
|
|
115
|
+
type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
|
|
117
116
|
userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface
|
|
118
117
|
};
|
|
119
118
|
columnsMetadata.push(columnData);
|
|
@@ -122,7 +121,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
122
121
|
label: fieldData.properties.DESCRIPTIONENTITY,
|
|
123
122
|
id: fieldData.properties.ENTITYNAME + "." + fieldData.properties.DESCRIPTIONFIELD,
|
|
124
123
|
width: 200,
|
|
125
|
-
|
|
124
|
+
type: DataType.TEXT,
|
|
126
125
|
userInterface: UserInterface.LONGTEXT
|
|
127
126
|
};
|
|
128
127
|
columnsMetadata.push(descriptionColumn);
|
|
@@ -130,8 +129,34 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
130
129
|
});
|
|
131
130
|
return columnsMetadata || [];
|
|
132
131
|
}
|
|
132
|
+
getPaginationInfo() {
|
|
133
|
+
var _a;
|
|
134
|
+
return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo();
|
|
135
|
+
}
|
|
136
|
+
getExporterOffset(paginationInfo) {
|
|
137
|
+
if (paginationInfo == undefined) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const offset = paginationInfo.firstRecord;
|
|
141
|
+
if (offset > 0) {
|
|
142
|
+
return (offset - 1);
|
|
143
|
+
}
|
|
144
|
+
return offset;
|
|
145
|
+
}
|
|
146
|
+
getExporterLimit(paginationInfo) {
|
|
147
|
+
if (paginationInfo == undefined) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const { firstRecord, lastRecord } = paginationInfo;
|
|
151
|
+
const limit = firstRecord > 0 && lastRecord > 0 && (lastRecord - firstRecord + 1);
|
|
152
|
+
if (!limit) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
return limit;
|
|
156
|
+
}
|
|
133
157
|
async dataExporterProviderStore() {
|
|
134
158
|
var _a;
|
|
159
|
+
const paginationInfo = this.getPaginationInfo();
|
|
135
160
|
const columnsMetadata = [];
|
|
136
161
|
await ((_a = this._grid) === null || _a === void 0 ? void 0 : _a.getColumnsState().then(this.buildColumnsMetadata.bind(this, columnsMetadata)));
|
|
137
162
|
const dataExporterProvider = {
|
|
@@ -153,6 +178,12 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
153
178
|
getSelectedNumber: () => {
|
|
154
179
|
var _a, _b;
|
|
155
180
|
return (_b = (_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectedRecords) === null || _b === void 0 ? void 0 : _b.length;
|
|
181
|
+
},
|
|
182
|
+
getOffset: () => {
|
|
183
|
+
return this.getExporterOffset(paginationInfo);
|
|
184
|
+
},
|
|
185
|
+
getLimit: () => {
|
|
186
|
+
return this.getExporterLimit(paginationInfo);
|
|
156
187
|
}
|
|
157
188
|
};
|
|
158
189
|
store.set("exporterProviders", Object.assign(Object.assign({}, store.get("exporterProviders")), { [this.configName]: dataExporterProvider }));
|
|
@@ -196,7 +227,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
196
227
|
this.loadConfig();
|
|
197
228
|
}
|
|
198
229
|
componentWillRender() {
|
|
199
|
-
const invisibleButtons = this.
|
|
230
|
+
const invisibleButtons = this._dataUnit && this._dataUnit.records.length > 0 ? [] : ["DATA_EXPORTER"];
|
|
200
231
|
const headerTaskbarId = this._dataState && this._dataState.selectedRecords.length > 0 ? "snkGridHeaderTaskbar.selected" : "snkGridHeaderTaskbar.unselected";
|
|
201
232
|
this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
|
202
233
|
this._topTaskbarProcessor.process("snkGridTopTaskbar", this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
|
@@ -217,7 +248,6 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
217
248
|
"taskbarManager": [16],
|
|
218
249
|
"statusResolver": [16],
|
|
219
250
|
"multipleSelection": [4, "multiple-selection"],
|
|
220
|
-
"enableDataExporter": [4, "enable-data-exporter"],
|
|
221
251
|
"presentationMode": [1, "presentation-mode"],
|
|
222
252
|
"_dataUnit": [32],
|
|
223
253
|
"_dataState": [32],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as createCommonjsModule } from './_commonjsHelpers.js';
|
|
3
3
|
import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
4
|
-
import { C as CONFIG_EVENTS,
|
|
4
|
+
import { C as CONFIG_EVENTS, c as KEY_EVENTS, d as TYPE_ACTIONS, b as TAB_NAMES } from './constants.js';
|
|
5
5
|
|
|
6
6
|
var draggable_bundle = createCommonjsModule(function (module, exports) {
|
|
7
7
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { getRenderingRef, forceUpdate, h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { StringUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { A as AuthorizationConfig } from './AuthorizationConfig.js';
|
|
4
|
-
import { d as defineCustomElement$2 } from './snk-data-exporter2.js';
|
|
4
|
+
import { P as PresentationMode, d as defineCustomElement$2 } from './snk-data-exporter2.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './snk-exporter-email-sender2.js';
|
|
6
6
|
|
|
7
|
-
var PresentationMode;
|
|
8
|
-
(function (PresentationMode) {
|
|
9
|
-
PresentationMode["PRIMARY"] = "primary";
|
|
10
|
-
PresentationMode["SECONDARY"] = "secondary";
|
|
11
|
-
})(PresentationMode || (PresentationMode = {}));
|
|
12
|
-
|
|
13
7
|
const appendToMap = (map, propName, value) => {
|
|
14
8
|
const items = map.get(propName);
|
|
15
9
|
if (!items) {
|
|
@@ -546,4 +540,4 @@ function defineCustomElement() {
|
|
|
546
540
|
} });
|
|
547
541
|
}
|
|
548
542
|
|
|
549
|
-
export {
|
|
543
|
+
export { SnkTaskbar as S, TaskbarElement as T, defineCustomElement as d, store as s };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const KEY_PORT_EXPORT = "global.porta.app.impressao";
|
|
1
2
|
const VIEW_MODE = {
|
|
2
3
|
grid: {
|
|
3
4
|
index: 0,
|
|
@@ -84,5 +85,16 @@ const ORDER_VALUES = {
|
|
|
84
85
|
label: "Z-A"
|
|
85
86
|
}
|
|
86
87
|
};
|
|
88
|
+
const WEB_CONNECTION = {
|
|
89
|
+
methods: {
|
|
90
|
+
PRINTERS_LIST: "pList",
|
|
91
|
+
LOCAL_PRINTING: "localPrinting",
|
|
92
|
+
IMPRESSAO_DIRETA: "impressaoDireta",
|
|
93
|
+
IMPRESSAO_DIRETA_TEXTO: "impressaoDiretaTexto",
|
|
94
|
+
INFO: "info",
|
|
95
|
+
PDF_VIEWER: "pdfViewer",
|
|
96
|
+
IMPORT_IMAGE: "importImage"
|
|
97
|
+
}
|
|
98
|
+
};
|
|
87
99
|
|
|
88
|
-
export { ACTION_CONFIG as A, CONFIG_EVENTS as C, DEFAULT_TYPE as D, KEY_EVENTS as K, ORDER_VALUES as O, TAB_NAMES as T, VARS_BY_TYPE as V, TAGS_BY_TYPE as a, TYPE_ACTIONS as b, VIEW_MODE as c };
|
|
100
|
+
export { ACTION_CONFIG as A, CONFIG_EVENTS as C, DEFAULT_TYPE as D, KEY_EVENTS as K, ORDER_VALUES as O, TAB_NAMES as T, VARS_BY_TYPE as V, WEB_CONNECTION as W, TAGS_BY_TYPE as a, TYPE_ACTIONS as b, VIEW_MODE as c, KEY_PORT_EXPORT as d };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var PresentationMode;
|
|
2
|
+
(function (PresentationMode) {
|
|
3
|
+
PresentationMode["PRIMARY"] = "primary";
|
|
4
|
+
PresentationMode["SECONDARY"] = "secondary";
|
|
5
|
+
})(PresentationMode || (PresentationMode = {}));
|
|
6
|
+
var DataExporterOption;
|
|
7
|
+
(function (DataExporterOption) {
|
|
8
|
+
DataExporterOption["EXPORT_TO_PDF"] = "exportToPDF";
|
|
9
|
+
DataExporterOption["EXPORT_TO_XLS"] = "exportToXLS";
|
|
10
|
+
DataExporterOption["EXPORT_CURRENT_PAGE"] = "exportCurrentPage";
|
|
11
|
+
DataExporterOption["EXPORT_PAGE_TO_PDF"] = "exportPageToPDF";
|
|
12
|
+
DataExporterOption["EXPORT_PAGE_TO_XLS"] = "exportPageToXLS";
|
|
13
|
+
DataExporterOption["EXPORT_BY_EMAIL"] = "exportToEmail";
|
|
14
|
+
DataExporterOption["EXPORT_PDF_TO_EMAIL"] = "exportPDFToEmail";
|
|
15
|
+
DataExporterOption["EXPORT_XLS_TO_EMAIL"] = "exportXLSToEmail";
|
|
16
|
+
})(DataExporterOption || (DataExporterOption = {}));
|
|
17
|
+
var DataExporterFormat;
|
|
18
|
+
(function (DataExporterFormat) {
|
|
19
|
+
DataExporterFormat["PDF"] = "exportPDFToEmail";
|
|
20
|
+
DataExporterFormat["XLS"] = "exportXLSToEmail";
|
|
21
|
+
DataExporterFormat["XLSX"] = "exportXLSToEmail";
|
|
22
|
+
})(DataExporterFormat || (DataExporterFormat = {}));
|
|
23
|
+
var DataExporterType;
|
|
24
|
+
(function (DataExporterType) {
|
|
25
|
+
DataExporterType["EXPORT_TO_PDF"] = "PDF";
|
|
26
|
+
DataExporterType["EXPORT_TO_XLS"] = "XLS";
|
|
27
|
+
DataExporterType["EXPORT_PAGE_TO_PDF"] = "PDF";
|
|
28
|
+
DataExporterType["EXPORT_PAGE_TO_XLS"] = "XLS";
|
|
29
|
+
DataExporterType["EXPORT_PDF_TO_EMAIL"] = "PDF";
|
|
30
|
+
DataExporterType["EXPORT_XLS_TO_EMAIL"] = "XLS";
|
|
31
|
+
})(DataExporterType || (DataExporterType = {}));
|
|
32
|
+
|
|
33
|
+
export { DataExporterOption as D, PresentationMode as P, DataExporterFormat as a, DataExporterType as b };
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-configurator_3",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"
|
|
13
|
+
return bootstrapLazy([["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-configurator_3",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}],[2,"snk-configurator",{"configName":[1,"config-name"],"viewMode":[1,"view-mode"],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}],[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16]}]]],["snk-form-config",[[2,"snk-form-config",{"dataUnit":[16],"formConfig":[16],"configName":[513,"config-name"],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["snk-exporter-email-sender",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter_8",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32],"scrollerLocked":[32]},[[0,"filterChange","filterChangeListener"]]],[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"saveConfig":[64]}],[6,"snk-taskbar",{"configName":[1,"config-name"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"_permissions":[32]}],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]],[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}],[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}],[2,"snk-data-exporter",{"provider":[16],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-form",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32],"_showFormConfig":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_viewMode":[32],"goToView":[64]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"fetchUserAvailableConfigs":[64],"fetchLegacyConfig":[64],"fetchDefaultConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"saveFormConfig":[64],"getDefaultValues":[64],"getDefaultValue":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-configurator_3",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"
|
|
16
|
+
return bootstrapLazy([["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-configurator_3",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}],[2,"snk-configurator",{"configName":[1,"config-name"],"viewMode":[1,"view-mode"],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}],[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16]}]]],["snk-form-config",[[2,"snk-form-config",{"dataUnit":[16],"formConfig":[16],"configName":[513,"config-name"],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["snk-exporter-email-sender",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter_8",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32],"scrollerLocked":[32]},[[0,"filterChange","filterChangeListener"]]],[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"saveConfig":[64]}],[6,"snk-taskbar",{"configName":[1,"config-name"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"_permissions":[32]}],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]],[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}],[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}],[2,"snk-data-exporter",{"provider":[16],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-form",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32],"_showFormConfig":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_viewMode":[32],"goToView":[64]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"fetchUserAvailableConfigs":[64],"fetchLegacyConfig":[64],"fetchDefaultConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"saveFormConfig":[64],"getDefaultValues":[64],"getDefaultValue":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64]}]]]], options);
|
|
17
17
|
});
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, g as getElement } from './i
|
|
|
2
2
|
import { WaitingChangeException, WarningException, ErrorException, ObjectUtils, DataType, DataUnit, StringUtils, ChangeOperation, DateUtils, DependencyType, ElementIDUtils, ApplicationContext, ErrorTracking } from '@sankhyalabs/core';
|
|
3
3
|
import { d as dist, D as DataFetcher, R as ResourceFetcher, U as UrlUtils, F as FormConfigFetcher, G as GridConfigFetcher, C as ConfigStorage } from './ConfigStorage-4654f57b.js';
|
|
4
4
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-
|
|
5
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-608c038f.js';
|
|
6
6
|
import './_commonjsHelpers-9943807e.js';
|
|
7
7
|
|
|
8
8
|
class SnkErrorHandler {
|
|
@@ -207,6 +207,23 @@ class TotalsFetcher {
|
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
+
class DefaultValuesFetcher extends ResourceFetcher {
|
|
211
|
+
getDefaultValues(resourceID) {
|
|
212
|
+
return new Promise((resolve, reject) => {
|
|
213
|
+
this.loadResource(`cfg://defaultValues/${resourceID}`)
|
|
214
|
+
.then(loadedResource => {
|
|
215
|
+
let value;
|
|
216
|
+
if (loadedResource) {
|
|
217
|
+
value = JSON.parse(loadedResource);
|
|
218
|
+
}
|
|
219
|
+
resolve(value);
|
|
220
|
+
}).catch((error) => {
|
|
221
|
+
reject(error);
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
210
227
|
class DataUnitFetcher {
|
|
211
228
|
constructor() {
|
|
212
229
|
this.templateByQuery = new Map();
|
|
@@ -237,13 +254,6 @@ class DataUnitFetcher {
|
|
|
237
254
|
type
|
|
238
255
|
expression
|
|
239
256
|
}
|
|
240
|
-
},
|
|
241
|
-
children{
|
|
242
|
-
name
|
|
243
|
-
links{
|
|
244
|
-
source
|
|
245
|
-
target
|
|
246
|
-
}
|
|
247
257
|
}
|
|
248
258
|
children{
|
|
249
259
|
name
|
|
@@ -504,9 +514,27 @@ class Workspace {
|
|
|
504
514
|
var _a;
|
|
505
515
|
(_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.openAppActivity(resourceId, pkObject);
|
|
506
516
|
}
|
|
517
|
+
static getAppLabel(resourceID) {
|
|
518
|
+
if ((window === null || window === void 0 ? void 0 : window["workspace"]) == undefined) {
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
if (window["workspace"].getAppLabel == undefined) {
|
|
522
|
+
window["workspace"].getAppLabel = (id) => {
|
|
523
|
+
return (id || "").split(".").pop();
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
return window["workspace"].getAppLabel(resourceID);
|
|
527
|
+
}
|
|
507
528
|
}
|
|
508
529
|
Workspace.resourceID = (_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID;
|
|
509
530
|
|
|
531
|
+
class AppletCaller {
|
|
532
|
+
static webConnectionCaller(port, methodName, params) {
|
|
533
|
+
var _a;
|
|
534
|
+
(_a = window["AppletCaller"]) === null || _a === void 0 ? void 0 : _a.webConnectionCaller(port, methodName, params);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
510
538
|
class ParametersFetcher {
|
|
511
539
|
constructor() {
|
|
512
540
|
this.templateByQuery = new Map();
|
|
@@ -656,23 +684,6 @@ class FilterBarConfigFetcher extends ResourceFetcher {
|
|
|
656
684
|
}
|
|
657
685
|
}
|
|
658
686
|
|
|
659
|
-
class DefaultValuesFetcher extends ResourceFetcher {
|
|
660
|
-
getDefaultValues(resourceID) {
|
|
661
|
-
return new Promise((resolve, reject) => {
|
|
662
|
-
this.loadResource(`cfg://defaultValues/${resourceID}`)
|
|
663
|
-
.then(loadedResource => {
|
|
664
|
-
let value;
|
|
665
|
-
if (loadedResource) {
|
|
666
|
-
value = JSON.parse(loadedResource);
|
|
667
|
-
}
|
|
668
|
-
resolve(value);
|
|
669
|
-
}).catch((error) => {
|
|
670
|
-
reject(error);
|
|
671
|
-
});
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
|
|
676
687
|
const snkApplicationCss = ".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";
|
|
677
688
|
|
|
678
689
|
const SnkApplication = class {
|
|
@@ -910,6 +921,17 @@ const SnkApplication = class {
|
|
|
910
921
|
async openApp(resourceId, pkObject) {
|
|
911
922
|
Workspace.openAppActivity(resourceId, pkObject);
|
|
912
923
|
}
|
|
924
|
+
/**
|
|
925
|
+
* Realiza a chamada do WebConnection para realizar a exportação de arquivo.
|
|
926
|
+
* @param keyPort - Chave da porta que será requisitada.
|
|
927
|
+
* @param methodName - Nome do tipo de exportação de arquivo que será realizado.
|
|
928
|
+
* @param params - Parâmetros necessários para realizar a exportação do arquivo.
|
|
929
|
+
*/
|
|
930
|
+
async webConnection(keyPort, methodName, params) {
|
|
931
|
+
this.getStringParam(keyPort).then((port) => {
|
|
932
|
+
AppletCaller.webConnectionCaller(port, methodName, params);
|
|
933
|
+
});
|
|
934
|
+
}
|
|
913
935
|
getDuPromissesStack(dataUnitName) {
|
|
914
936
|
let stack;
|
|
915
937
|
if (dataUnitName) {
|
|
@@ -1232,15 +1254,7 @@ const SnkApplication = class {
|
|
|
1232
1254
|
* Obtém o nome das telas da aplicação
|
|
1233
1255
|
*/
|
|
1234
1256
|
async getAppLabel() {
|
|
1235
|
-
|
|
1236
|
-
return;
|
|
1237
|
-
}
|
|
1238
|
-
if (window["workspace"].getAppLabel == undefined) {
|
|
1239
|
-
window["workspace"].getAppLabel = (resourceID) => {
|
|
1240
|
-
return (resourceID || "").split(".").pop();
|
|
1241
|
-
};
|
|
1242
|
-
}
|
|
1243
|
-
return window["workspace"].getAppLabel(this._resourceID);
|
|
1257
|
+
return Workspace.getAppLabel(this._resourceID);
|
|
1244
1258
|
}
|
|
1245
1259
|
clearContent(container) {
|
|
1246
1260
|
if (container) {
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
|
|
|
2
2
|
import { UserInterface, ObjectUtils, StringUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { DataType, getConvertedValue } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
4
4
|
import { CheckMode } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
|
-
import { V as VARS_BY_TYPE, D as DEFAULT_TYPE, a as TAGS_BY_TYPE } from './constants-
|
|
5
|
+
import { V as VARS_BY_TYPE, D as DEFAULT_TYPE, a as TAGS_BY_TYPE } from './constants-8ad13317.js';
|
|
6
6
|
|
|
7
7
|
const snkConfigOptionsCss = ".sc-snk-config-options-h{--snk-config-options--border:2px solid var(--color--secondary-200, #D2D3DA);width:100%;border-radius:15px;border:var(--snk-config-options--border)}.config-options__switch-row.sc-snk-config-options{margin-top:-30px}";
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { ApplicationContext, ElementIDUtils, DataType } from '@sankhyalabs/core';
|
|
3
|
-
import { c as VIEW_MODE, A as ACTION_CONFIG } from './constants-
|
|
3
|
+
import { c as VIEW_MODE, A as ACTION_CONFIG } from './constants-8ad13317.js';
|
|
4
4
|
import { A as AuthorizationConfig } from './AuthorizationConfig-dcbd207a.js';
|
|
5
5
|
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
6
6
|
import { C as ConfigStorage } from './ConfigStorage-4654f57b.js';
|
|
7
|
-
import { P as PresentationMode } from './index-
|
|
7
|
+
import { P as PresentationMode } from './index-1564817d.js';
|
|
8
8
|
import { T as TaskbarProcessor } from './taskbar-processor-c2a99aba.js';
|
|
9
9
|
import { s as store } from './index-d89e384f.js';
|
|
10
10
|
import './_commonjsHelpers-9943807e.js';
|
|
@@ -169,10 +169,6 @@ const SnkGrid = class {
|
|
|
169
169
|
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH", "DATA_EXPORTER"]
|
|
170
170
|
});
|
|
171
171
|
this._popUpGridConfig = false;
|
|
172
|
-
/**
|
|
173
|
-
* Determina se haverá exportação de dados
|
|
174
|
-
*/
|
|
175
|
-
this.enableDataExporter = false;
|
|
176
172
|
/**
|
|
177
173
|
* Altera o modo de apresentação dos botões do snk-taskbar.
|
|
178
174
|
*/
|
|
@@ -244,7 +240,10 @@ const SnkGrid = class {
|
|
|
244
240
|
buildColumnsMetadata(columnsMetadata, gridColumns) {
|
|
245
241
|
gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach((column) => {
|
|
246
242
|
var _a, _b, _c, _d, _e;
|
|
247
|
-
|
|
243
|
+
/**
|
|
244
|
+
* TODO: Analisar e criar uma melhor forma de tratar essa validação do "RECDESP".
|
|
245
|
+
*/
|
|
246
|
+
if (column.hidden && column.name !== "RECDESP") {
|
|
248
247
|
return;
|
|
249
248
|
}
|
|
250
249
|
const fieldData = (_d = (_c = (_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.fields) === null || _c === void 0 ? void 0 : _c.filter((field) => field.name === column.name)) === null || _d === void 0 ? void 0 : _d[0];
|
|
@@ -252,7 +251,7 @@ const SnkGrid = class {
|
|
|
252
251
|
label: column.label,
|
|
253
252
|
id: column.name,
|
|
254
253
|
width: column.width,
|
|
255
|
-
|
|
254
|
+
type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
|
|
256
255
|
userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface
|
|
257
256
|
};
|
|
258
257
|
columnsMetadata.push(columnData);
|
|
@@ -261,7 +260,7 @@ const SnkGrid = class {
|
|
|
261
260
|
label: fieldData.properties.DESCRIPTIONENTITY,
|
|
262
261
|
id: fieldData.properties.ENTITYNAME + "." + fieldData.properties.DESCRIPTIONFIELD,
|
|
263
262
|
width: 200,
|
|
264
|
-
|
|
263
|
+
type: DataType.TEXT,
|
|
265
264
|
userInterface: UserInterface.LONGTEXT
|
|
266
265
|
};
|
|
267
266
|
columnsMetadata.push(descriptionColumn);
|
|
@@ -269,8 +268,34 @@ const SnkGrid = class {
|
|
|
269
268
|
});
|
|
270
269
|
return columnsMetadata || [];
|
|
271
270
|
}
|
|
271
|
+
getPaginationInfo() {
|
|
272
|
+
var _a;
|
|
273
|
+
return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo();
|
|
274
|
+
}
|
|
275
|
+
getExporterOffset(paginationInfo) {
|
|
276
|
+
if (paginationInfo == undefined) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
const offset = paginationInfo.firstRecord;
|
|
280
|
+
if (offset > 0) {
|
|
281
|
+
return (offset - 1);
|
|
282
|
+
}
|
|
283
|
+
return offset;
|
|
284
|
+
}
|
|
285
|
+
getExporterLimit(paginationInfo) {
|
|
286
|
+
if (paginationInfo == undefined) {
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
const { firstRecord, lastRecord } = paginationInfo;
|
|
290
|
+
const limit = firstRecord > 0 && lastRecord > 0 && (lastRecord - firstRecord + 1);
|
|
291
|
+
if (!limit) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
return limit;
|
|
295
|
+
}
|
|
272
296
|
async dataExporterProviderStore() {
|
|
273
297
|
var _a;
|
|
298
|
+
const paginationInfo = this.getPaginationInfo();
|
|
274
299
|
const columnsMetadata = [];
|
|
275
300
|
await ((_a = this._grid) === null || _a === void 0 ? void 0 : _a.getColumnsState().then(this.buildColumnsMetadata.bind(this, columnsMetadata)));
|
|
276
301
|
const dataExporterProvider = {
|
|
@@ -292,6 +317,12 @@ const SnkGrid = class {
|
|
|
292
317
|
getSelectedNumber: () => {
|
|
293
318
|
var _a, _b;
|
|
294
319
|
return (_b = (_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectedRecords) === null || _b === void 0 ? void 0 : _b.length;
|
|
320
|
+
},
|
|
321
|
+
getOffset: () => {
|
|
322
|
+
return this.getExporterOffset(paginationInfo);
|
|
323
|
+
},
|
|
324
|
+
getLimit: () => {
|
|
325
|
+
return this.getExporterLimit(paginationInfo);
|
|
295
326
|
}
|
|
296
327
|
};
|
|
297
328
|
store.set("exporterProviders", Object.assign(Object.assign({}, store.get("exporterProviders")), { [this.configName]: dataExporterProvider }));
|
|
@@ -335,7 +366,7 @@ const SnkGrid = class {
|
|
|
335
366
|
this.loadConfig();
|
|
336
367
|
}
|
|
337
368
|
componentWillRender() {
|
|
338
|
-
const invisibleButtons = this.
|
|
369
|
+
const invisibleButtons = this._dataUnit && this._dataUnit.records.length > 0 ? [] : ["DATA_EXPORTER"];
|
|
339
370
|
const headerTaskbarId = this._dataState && this._dataState.selectedRecords.length > 0 ? "snkGridHeaderTaskbar.selected" : "snkGridHeaderTaskbar.unselected";
|
|
340
371
|
this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
|
341
372
|
this._topTaskbarProcessor.process("snkGridTopTaskbar", this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
-
import { c as VIEW_MODE } from './constants-
|
|
4
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
|
5
|
-
import { P as PresentationMode } from './index-
|
|
3
|
+
import { c as VIEW_MODE } from './constants-8ad13317.js';
|
|
4
|
+
import { T as TaskbarElement } from './taskbar-elements-e4006db7.js';
|
|
5
|
+
import { P as PresentationMode } from './index-1564817d.js';
|
|
6
6
|
import './index-d89e384f.js';
|
|
7
7
|
|
|
8
8
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
|
@@ -18,10 +18,6 @@ const SnkCrud = class {
|
|
|
18
18
|
* Determina se pode haver mais de uma linha selecionada na grade.
|
|
19
19
|
*/
|
|
20
20
|
this.multipleSelection = true;
|
|
21
|
-
/**
|
|
22
|
-
* Determina se haverá exportação de dados
|
|
23
|
-
*/
|
|
24
|
-
this.enableDataExporter = false;
|
|
25
21
|
/**
|
|
26
22
|
* Altera o modo de apresentação dos botões do snk-taskbar.
|
|
27
23
|
*/
|
|
@@ -113,7 +109,7 @@ const SnkCrud = class {
|
|
|
113
109
|
this.validatePresentationMode();
|
|
114
110
|
}
|
|
115
111
|
render() {
|
|
116
|
-
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection,
|
|
112
|
+
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-form", { ref: (ref) => this._snkForm = ref, "data-element-id": "crud_form", configName: this.configName, actionsList: this.actionsList, onExit: () => this.setViewMode(GRID_MODE), recordsValidator: this.recordsValidator, taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode }, h("slot", { name: "SnkFormTaskBar" }))), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._viewMode, onConfigSelected: (evt) => this.executeAction(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail) })));
|
|
117
113
|
}
|
|
118
114
|
get _element() { return getElement(this); }
|
|
119
115
|
};
|