@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-50737.1 → 0.0.0-bugfix-dev-KB-53946.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/{ConfigStorage-8d4e9d53.js → ConfigStorage-085c7117.js} +11 -12
- package/dist/cjs/{SnkMultiSelectionListDataSource-1438f8f2.js → IExporterProvider-f50b6846.js} +52 -5
- package/dist/cjs/RecordIDUtils-3735135c.js +43 -0
- package/dist/cjs/{SnkFormConfigManager-33995e92.js → SnkFormConfigManager-8986431f.js} +2 -2
- package/dist/cjs/{SnkMessageBuilder-141aa18d.js → SnkMessageBuilder-66aa2557.js} +4 -0
- package/dist/cjs/{auth-fetcher-bb8e9ae4.js → auth-fetcher-eddaf17f.js} +1 -1
- package/dist/cjs/{DataFetcher-99f0f6ed.js → form-config-fetcher-cdd644a7.js} +251 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-94f6b316.js → pesquisa-fetcher-90b801fb.js} +79 -55
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +9 -9
- package/dist/cjs/snk-application.cjs.entry.js +24 -24
- package/dist/cjs/snk-attach.cjs.entry.js +73 -52
- package/dist/cjs/snk-crud.cjs.entry.js +5 -5
- package/dist/cjs/snk-data-exporter.cjs.entry.js +199 -81
- package/dist/cjs/{snk-data-unit-6026a9f7.js → snk-data-unit-abd2113f.js} +3 -38
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +8 -8
- package/dist/cjs/snk-filter-bar.cjs.entry.js +7 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +2 -3
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -2
- package/dist/cjs/snk-form.cjs.entry.js +3 -4
- package/dist/cjs/snk-grid.cjs.entry.js +66 -102
- package/dist/cjs/{snk-guides-viewer-25721856.js → snk-guides-viewer-e4c8ee66.js} +4 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -3
- package/dist/cjs/snk-simple-crud.cjs.entry.js +144 -36
- package/dist/cjs/snk-taskbar.cjs.entry.js +27 -4
- package/dist/cjs/{taskbar-elements-3ecd1278.js → taskbar-elements-d9392685.js} +2 -2
- package/dist/collection/components/snk-attach/snk-attach.js +39 -24
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +1 -1
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +29 -22
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +90 -0
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +68 -0
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +48 -1
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +1 -0
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +53 -0
- package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +55 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +37 -47
- package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +88 -0
- package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +38 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +3 -42
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +5 -0
- package/dist/collection/components/snk-grid/snk-grid.js +3 -94
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +5 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +126 -14
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +2 -2
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +30 -3
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +10 -41
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +33 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +3 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +4 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +10 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +1 -0
- package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +4 -0
- package/dist/components/ConfigStorage.js +1 -2
- package/dist/components/{field-search.js → IExporterProvider.js} +52 -7
- package/dist/components/ISave.js +42 -0
- package/dist/components/SnkMessageBuilder.js +4 -0
- package/dist/components/dataunit-fetcher.js +61 -44
- package/dist/components/form-config-fetcher.js +7022 -3
- package/dist/components/index2.js +198 -33
- package/dist/components/snk-actions-button2.js +3 -12
- package/dist/components/snk-application2.js +1 -1
- package/dist/components/snk-attach2.js +64 -44
- package/dist/components/snk-crud.js +3 -4
- package/dist/components/snk-data-exporter2.js +194 -81
- package/dist/components/snk-data-unit2.js +41 -39
- package/dist/components/snk-detail-view2.js +4 -5
- package/dist/components/snk-expression-item2.js +1 -1
- package/dist/components/snk-filter-bar2.js +5 -0
- package/dist/components/snk-form-config2.js +1 -1
- package/dist/components/snk-grid2.js +63 -100
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-simple-crud2.js +133 -23
- package/dist/components/snk-taskbar2.js +33 -8
- package/dist/esm/{ConfigStorage-6e241cd7.js → ConfigStorage-cc3f3dd3.js} +1 -2
- package/dist/esm/{SnkMultiSelectionListDataSource-aad5d4ff.js → IExporterProvider-9e6e0071.js} +52 -6
- package/dist/esm/RecordIDUtils-87d02110.js +41 -0
- package/dist/esm/{SnkFormConfigManager-7a4e678f.js → SnkFormConfigManager-7edda7eb.js} +2 -2
- package/dist/esm/{SnkMessageBuilder-9747ddd2.js → SnkMessageBuilder-0a4becdd.js} +4 -0
- package/dist/esm/{auth-fetcher-8ec448b0.js → auth-fetcher-11dd9cae.js} +1 -1
- package/dist/esm/{DataFetcher-a650ae58.js → form-config-fetcher-13cd3285.js} +250 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-f05a12ca.js → pesquisa-fetcher-d785663b.js} +61 -44
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_4.entry.js +4 -4
- package/dist/esm/snk-application.entry.js +6 -6
- package/dist/esm/snk-attach.entry.js +65 -44
- package/dist/esm/snk-crud.entry.js +5 -5
- package/dist/esm/snk-data-exporter.entry.js +199 -81
- package/dist/esm/{snk-data-unit-4c343635.js → snk-data-unit-29eba11a.js} +4 -39
- package/dist/esm/snk-data-unit.entry.js +3 -2
- package/dist/esm/snk-detail-view.entry.js +8 -8
- package/dist/esm/snk-filter-bar.entry.js +7 -3
- package/dist/esm/snk-filter-modal-item.entry.js +2 -3
- package/dist/esm/snk-form-config.entry.js +1 -2
- package/dist/esm/snk-form.entry.js +3 -4
- package/dist/esm/snk-grid.entry.js +64 -100
- package/dist/esm/{snk-guides-viewer-b94752f2.js → snk-guides-viewer-8fc16590.js} +4 -5
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter.entry.js +2 -3
- package/dist/esm/snk-simple-crud.entry.js +132 -24
- package/dist/esm/snk-taskbar.entry.js +27 -4
- package/dist/esm/{taskbar-elements-2473c8ac.js → taskbar-elements-ad766858.js} +2 -2
- package/dist/sankhyablocks/p-07825198.js +1 -0
- package/dist/sankhyablocks/p-0ba97458.js +65 -0
- package/dist/sankhyablocks/p-1650f66b.entry.js +1 -0
- package/dist/sankhyablocks/p-1d1aa052.js +1 -0
- package/dist/sankhyablocks/p-1d9d07b4.entry.js +1 -0
- package/dist/sankhyablocks/p-250149af.entry.js +1 -0
- package/dist/sankhyablocks/p-2cfa05b0.entry.js +1 -0
- package/dist/sankhyablocks/{p-400097f2.entry.js → p-2daa70f9.entry.js} +3 -3
- package/dist/sankhyablocks/p-32556aa6.js +1 -0
- package/dist/sankhyablocks/p-33a6728e.js +26 -0
- package/dist/sankhyablocks/p-5b6c4f46.entry.js +1 -0
- package/dist/sankhyablocks/p-5d9456dc.js +1 -0
- package/dist/sankhyablocks/{p-0624f62d.js → p-8a4c4b54.js} +6 -6
- package/dist/sankhyablocks/p-9863d682.js +1 -0
- package/dist/sankhyablocks/{p-125bb902.js → p-99b51d06.js} +1 -1
- package/dist/sankhyablocks/p-9c283890.entry.js +1 -0
- package/dist/sankhyablocks/p-9ee96756.entry.js +1 -0
- package/dist/sankhyablocks/p-a4c94582.entry.js +1 -0
- package/dist/sankhyablocks/p-c2e3a71c.entry.js +1 -0
- package/dist/sankhyablocks/p-c2f3ebf3.entry.js +1 -0
- package/dist/sankhyablocks/p-ce37e3d3.entry.js +1 -0
- package/dist/sankhyablocks/p-cfb98f51.entry.js +1 -0
- package/dist/sankhyablocks/{p-efeca7ba.js → p-d24c9dc6.js} +1 -1
- package/dist/sankhyablocks/p-edd9dd1c.entry.js +1 -0
- package/dist/sankhyablocks/p-f51af6dd.entry.js +1 -0
- package/dist/sankhyablocks/p-fa84e72f.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +2 -1
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +10 -1
- package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +5 -4
- package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +13 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +11 -0
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +21 -4
- package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +5 -0
- package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +17 -0
- package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +17 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +3 -1
- package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +77 -0
- package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +3 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +1 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +0 -3
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +17 -2
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +6 -0
- package/dist/types/components.d.ts +17 -0
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +0 -2
- package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/form-config-fetcher-d73f4449.js +0 -256
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +0 -34
- package/dist/components/DataFetcher.js +0 -7023
- package/dist/components/index3.js +0 -199
- package/dist/esm/form-config-fetcher-765b8498.js +0 -253
- package/dist/sankhyablocks/p-004c356e.js +0 -26
- package/dist/sankhyablocks/p-0bba5c9f.entry.js +0 -1
- package/dist/sankhyablocks/p-1048bd26.entry.js +0 -1
- package/dist/sankhyablocks/p-20b46647.entry.js +0 -1
- package/dist/sankhyablocks/p-24ed6ad6.entry.js +0 -1
- package/dist/sankhyablocks/p-2936303b.js +0 -1
- package/dist/sankhyablocks/p-6c9adfca.js +0 -1
- package/dist/sankhyablocks/p-85af23fe.entry.js +0 -1
- package/dist/sankhyablocks/p-85ba3d6b.entry.js +0 -1
- package/dist/sankhyablocks/p-88b29791.js +0 -1
- package/dist/sankhyablocks/p-9a5d1b39.js +0 -1
- package/dist/sankhyablocks/p-9e8618ec.entry.js +0 -1
- package/dist/sankhyablocks/p-a043314f.entry.js +0 -1
- package/dist/sankhyablocks/p-a1642e7c.entry.js +0 -1
- package/dist/sankhyablocks/p-ac77949b.entry.js +0 -1
- package/dist/sankhyablocks/p-b47c2963.entry.js +0 -1
- package/dist/sankhyablocks/p-be75153c.js +0 -1
- package/dist/sankhyablocks/p-bf39bdb8.entry.js +0 -1
- package/dist/sankhyablocks/p-d304659d.entry.js +0 -1
- package/dist/sankhyablocks/p-d5cb4b5a.entry.js +0 -1
- package/dist/sankhyablocks/p-d78d4062.js +0 -65
- package/dist/sankhyablocks/p-e7dbe53a.entry.js +0 -1
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +0 -3
- /package/dist/sankhyablocks/{p-ae4fc9a9.js → p-61dd89eb.js} +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { FieldComparator, SortMode, DataUnit, DataType, DateUtils, StringUtils, ChangeOperation, ApplicationContext, UserInterface, DataUnitStorage } from '@sankhyalabs/core';
|
|
2
|
-
import { D as DataFetcher, d as dist } from './
|
|
1
|
+
import { ObjectUtils, FieldComparator, SortMode, DataUnit, DataType, DateUtils, StringUtils, ChangeOperation, ApplicationContext, UserInterface, DataUnitStorage } from '@sankhyalabs/core';
|
|
2
|
+
import { D as DataFetcher, d as dist } from './form-config-fetcher-13cd3285.js';
|
|
3
3
|
import { DISTINCT_FILTER_NAME_PREFIX } from '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
4
4
|
import { DataUnitTransient } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
5
5
|
import { ColumnFilterManager } from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
6
|
+
import SortingUtils from '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
6
7
|
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
|
7
8
|
|
|
8
9
|
class ArrayRepository {
|
|
@@ -84,6 +85,9 @@ class ArrayRepository {
|
|
|
84
85
|
async count() {
|
|
85
86
|
return Promise.resolve(this._list.length);
|
|
86
87
|
}
|
|
88
|
+
getFromCache() {
|
|
89
|
+
return ObjectUtils.copy(this._list);
|
|
90
|
+
}
|
|
87
91
|
}
|
|
88
92
|
|
|
89
93
|
class PreloadManager {
|
|
@@ -152,7 +156,11 @@ class PreloadManager {
|
|
|
152
156
|
static async loadData(dataUnit, request, loadFromServer) {
|
|
153
157
|
try {
|
|
154
158
|
if (PreloadManager.isCacheEnabled(dataUnit)) {
|
|
155
|
-
|
|
159
|
+
const useCache = [
|
|
160
|
+
"EZ_GRID_LOADING_SOURCE",
|
|
161
|
+
DataUnit.CHANGING_PAGE_LOADING_SOURCE,
|
|
162
|
+
DataUnit.ALL_RECORDS_SELECTION_SOURCE
|
|
163
|
+
].includes(request.source);
|
|
156
164
|
if (useCache) {
|
|
157
165
|
const isCacheEmpty = await PreloadManager.getRepository(dataUnit).isEmpty();
|
|
158
166
|
if (!isCacheEmpty) {
|
|
@@ -202,7 +210,7 @@ class PreloadManager {
|
|
|
202
210
|
const columnFilters = ColumnFilterManager.getColumnFilters(request.filters, "");
|
|
203
211
|
const { limit, offset, sort } = request;
|
|
204
212
|
PreloadManager.getRepository(dataUnit)
|
|
205
|
-
.load(ColumnFilterManager.getFilterFunction(dataUnit, Array.from(columnFilters.values())),
|
|
213
|
+
.load(ColumnFilterManager.getFilterFunction(dataUnit, Array.from(columnFilters.values())), SortingUtils.getSortingFunction(dataUnit, sort), offset, limit)
|
|
206
214
|
.then(loadResult => {
|
|
207
215
|
const stillLoading = PreloadManager._loadingStatus.get(dataUnit.name);
|
|
208
216
|
const { count, result: records } = loadResult;
|
|
@@ -219,10 +227,45 @@ class PreloadManager {
|
|
|
219
227
|
.catch(reason => reject(reason));
|
|
220
228
|
});
|
|
221
229
|
}
|
|
230
|
+
static getCachedRecords(dataUnit) {
|
|
231
|
+
return PreloadManager.getRepository(dataUnit).getFromCache();
|
|
232
|
+
}
|
|
222
233
|
}
|
|
223
234
|
PreloadManager._repositories = new Map();
|
|
224
235
|
PreloadManager._loadingStatus = new Map();
|
|
225
236
|
|
|
237
|
+
function applyFilter(records, dataUnit, filters) {
|
|
238
|
+
const columnFilters = ColumnFilterManager.getColumnFilters(filters, "");
|
|
239
|
+
if (!(columnFilters === null || columnFilters === void 0 ? void 0 : columnFilters.size)) {
|
|
240
|
+
return records;
|
|
241
|
+
}
|
|
242
|
+
const filterFunction = ColumnFilterManager.getFilterFunction(dataUnit, Array.from(columnFilters.values()));
|
|
243
|
+
if (filterFunction == undefined) {
|
|
244
|
+
return records;
|
|
245
|
+
}
|
|
246
|
+
return records.filter(filterFunction);
|
|
247
|
+
}
|
|
248
|
+
function applySorting(records, dataUnit, sorting) {
|
|
249
|
+
if (sorting == undefined || sorting.length == 0) {
|
|
250
|
+
return records;
|
|
251
|
+
}
|
|
252
|
+
const sortingFunction = SortingUtils.getSortingFunction(dataUnit, sorting);
|
|
253
|
+
if (sortingFunction == undefined) {
|
|
254
|
+
return records;
|
|
255
|
+
}
|
|
256
|
+
return records.sort(sortingFunction);
|
|
257
|
+
}
|
|
258
|
+
function buildPaginationInfo(records, offset = 0, limit = 0) {
|
|
259
|
+
const lastRecord = Math.min(offset + limit, records === null || records === void 0 ? void 0 : records.length);
|
|
260
|
+
return {
|
|
261
|
+
currentPage: limit === 0 ? 0 : Math.ceil(offset / limit),
|
|
262
|
+
firstRecord: offset,
|
|
263
|
+
lastRecord: lastRecord,
|
|
264
|
+
total: records === null || records === void 0 ? void 0 : records.length,
|
|
265
|
+
hasMore: !!((records === null || records === void 0 ? void 0 : records.length) - lastRecord),
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
|
|
226
269
|
class InMemoryLoader {
|
|
227
270
|
constructor(metadata, records) {
|
|
228
271
|
this.metadata = metadata;
|
|
@@ -235,9 +278,13 @@ class InMemoryLoader {
|
|
|
235
278
|
this.dataUnit.loadMetadata().then(() => this.dataUnit.loadData());
|
|
236
279
|
}
|
|
237
280
|
getRecordsToLoad() {
|
|
238
|
-
if (this._initialRecords == undefined
|
|
281
|
+
if (this._initialRecords == undefined && this.dataUnit.records.length > 0) {
|
|
239
282
|
this._initialRecords = this.dataUnit.records;
|
|
240
283
|
}
|
|
284
|
+
const addedRecords = this.dataUnit.getAddedRecords();
|
|
285
|
+
if (addedRecords) {
|
|
286
|
+
return [...this._initialRecords, ...addedRecords];
|
|
287
|
+
}
|
|
241
288
|
return this._initialRecords;
|
|
242
289
|
}
|
|
243
290
|
get dataUnit() {
|
|
@@ -280,7 +327,7 @@ class InMemoryLoader {
|
|
|
280
327
|
this._initialRecords = newRecords;
|
|
281
328
|
if (this._dataUnit) {
|
|
282
329
|
//Isso força o refresh internamente no datunit
|
|
283
|
-
this._dataUnit.
|
|
330
|
+
this._dataUnit.loadData();
|
|
284
331
|
}
|
|
285
332
|
}
|
|
286
333
|
get metadata() {
|
|
@@ -296,30 +343,9 @@ class InMemoryLoader {
|
|
|
296
343
|
return StringUtils.generateUUID();
|
|
297
344
|
}
|
|
298
345
|
inMemoryLoader(dataUnit, request, recordsIn) {
|
|
299
|
-
let records =
|
|
300
|
-
records =
|
|
301
|
-
return Promise.resolve({ records, paginationInfo: buildPaginationInfo(request,
|
|
302
|
-
}
|
|
303
|
-
applyFilter(records, dataUnit, filters) {
|
|
304
|
-
const columnFilters = ColumnFilterManager.getColumnFilters(filters, "");
|
|
305
|
-
if (columnFilters == undefined || columnFilters.size == 0) {
|
|
306
|
-
return records;
|
|
307
|
-
}
|
|
308
|
-
const filterFunciton = ColumnFilterManager.getFilterFunction(dataUnit, Array.from(columnFilters.values()));
|
|
309
|
-
if (filterFunciton == undefined) {
|
|
310
|
-
return records;
|
|
311
|
-
}
|
|
312
|
-
return records.filter(filterFunciton);
|
|
313
|
-
}
|
|
314
|
-
applySorting(records, dataUnit, sorting) {
|
|
315
|
-
if (sorting == undefined || sorting.length == 0) {
|
|
316
|
-
return records;
|
|
317
|
-
}
|
|
318
|
-
const sortingFunction = PreloadManager.getSortingFunction(dataUnit, sorting);
|
|
319
|
-
if (sortingFunction == undefined) {
|
|
320
|
-
return records;
|
|
321
|
-
}
|
|
322
|
-
return records.sort(sortingFunction);
|
|
346
|
+
let records = applyFilter(recordsIn, dataUnit, request.filters);
|
|
347
|
+
records = applySorting(records, dataUnit, request.sort);
|
|
348
|
+
return Promise.resolve({ records, paginationInfo: buildPaginationInfo(records, request.offset, request.limit) });
|
|
323
349
|
}
|
|
324
350
|
metadaLoader() {
|
|
325
351
|
return Promise.resolve(this._metadata);
|
|
@@ -352,19 +378,6 @@ class InMemoryLoader {
|
|
|
352
378
|
}
|
|
353
379
|
}
|
|
354
380
|
InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME = "InMemoryDataUnit";
|
|
355
|
-
function buildPaginationInfo({ offset, limit }, records) {
|
|
356
|
-
if (offset === undefined || limit === undefined) {
|
|
357
|
-
return undefined;
|
|
358
|
-
}
|
|
359
|
-
const lastRecord = Math.min(offset + limit, records.length);
|
|
360
|
-
return {
|
|
361
|
-
currentPage: Math.ceil(offset / limit),
|
|
362
|
-
firstRecord: offset,
|
|
363
|
-
lastRecord: lastRecord,
|
|
364
|
-
total: records.length,
|
|
365
|
-
hasMore: !!(records.length - lastRecord),
|
|
366
|
-
};
|
|
367
|
-
}
|
|
368
381
|
|
|
369
382
|
class DatasetStrategy {
|
|
370
383
|
canSlice() {
|
|
@@ -565,6 +578,9 @@ class DataUnitDataLoader {
|
|
|
565
578
|
});
|
|
566
579
|
});
|
|
567
580
|
}
|
|
581
|
+
static getCachedRecords(dataUnit) {
|
|
582
|
+
return PreloadManager.getCachedRecords(dataUnit);
|
|
583
|
+
}
|
|
568
584
|
static async loadFromServer(dataUnit, request, loadingInfo) {
|
|
569
585
|
try {
|
|
570
586
|
//Registramos a request com as informações de carga para determinarmos a última.
|
|
@@ -765,6 +781,7 @@ class DataUnitFetcher {
|
|
|
765
781
|
dataUnit.saveLoader = (_dataUnit, changes) => this.saveData(dataUnit, changes);
|
|
766
782
|
dataUnit.removeLoader = (dataUnit, recordIds) => this.removeRecords(dataUnit, recordIds);
|
|
767
783
|
dataUnit.recordLoader = (dataUnit, recordIds) => this.loadRecord(dataUnit, recordIds);
|
|
784
|
+
dataUnit.allRecordsLoader = (dataUnit) => DataUnitDataLoader.getCachedRecords(dataUnit);
|
|
768
785
|
return dataUnit;
|
|
769
786
|
}
|
|
770
787
|
loadMetadata(dataUnit) {
|
|
@@ -1143,4 +1160,4 @@ var SearchListenerType;
|
|
|
1143
1160
|
SearchListenerType["beforeSearch"] = "beforeSearch";
|
|
1144
1161
|
})(SearchListenerType || (SearchListenerType = {}));
|
|
1145
1162
|
|
|
1146
|
-
export { DataUnitFetcher as D, InMemoryLoader as I, PesquisaFetcher as P, PreloadManager as a };
|
|
1163
|
+
export { DataUnitFetcher as D, InMemoryLoader as I, PesquisaFetcher as P, PreloadManager as a, applyFilter as b, applySorting as c, buildPaginationInfo as d };
|
|
@@ -14,5 +14,5 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy(JSON.parse("[[\"teste-pesquisa\",[[1,\"teste-pesquisa\"]]],[\"snk-filter-modal\",[[0,\"snk-filter-modal\",{\"getMessage\":[16],\"configName\":[1025,\"config-name\"],\"filters\":[1040],\"applyFilters\":[16],\"closeModal\":[16],\"addPersonalizedFilter\":[16],\"editPersonalizedFilter\":[16],\"deletePersonalizedFilter\":[16],\"filtersToDelete\":[16],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"]},[[0,\"deleteFilter\",\"deletePersonalizedFilterListener\"]]]]],[\"snk-actions-form\",[[2,\"snk-actions-form\",{\"action\":[16],\"applyParameters\":[16],\"dataUnit\":[32],\"openPopup\":[64]}]]],[\"snk-client-confirm\",[[2,\"snk-client-confirm\",{\"titleMessage\":[1,\"title-message\"],\"message\":[1],\"accept\":[16],\"cancel\":[16],\"openPopup\":[64]}]]],[\"snk-custom-slot-elements\",[[6,\"snk-custom-slot-elements\",{\"slotName\":[1,\"slot-name\"]}]]],[\"snk-entity-list\",[[2,\"snk-entity-list\",{\"config\":[1040],\"rightListSlotBuilder\":[1040],\"maxHeightList\":[1,\"max-height-list\"],\"_searchValue\":[32],\"_ezListSource\":[32],\"reloadList\":[64]}]]],[\"snk-filter-binary-select\",[[0,\"snk-filter-binary-select\",{\"value\":[1544],\"config\":[16],\"presentationMode\":[2,\"presentation-mode\"],\"resetValues\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-checkbox-list\",[[0,\"snk-filter-checkbox-list\",{\"config\":[1040],\"optionsList\":[32]}]]],[\"snk-filter-list\",[[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\"]]]]],[\"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],\"getMessage\":[16],\"value\":[2],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-period\",[[0,\"snk-filter-period\",{\"config\":[16],\"getMessage\":[16],\"value\":[8],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"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-personalized-filter-editor\",[[2,\"snk-personalized-filter-editor\",{\"messagesBuilder\":[1040],\"presentationMode\":[2,\"presentation-mode\"],\"config\":[16],\"value\":[1040],\"items\":[32],\"show\":[64]}]]],[\"snk-print-selector\",[[2,\"snk-print-selector\",{\"_printServerActive\":[32],\"_selectedPrinter\":[32],\"_remotePrintersDataSource\":[32],\"_localPrintersDataSource\":[32],\"_printJobData\":[32],\"openPrintSelector\":[64]}]]],[\"snk-filter-modal-item\",[[0,\"snk-filter-modal-item\",{\"filterItem\":[1040],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}]]],[\"snk-pesquisa\",[[2,\"snk-pesquisa\",{\"searchLoader\":[16],\"selectItem\":[16],\"argument\":[1025],\"_itemList\":[32],\"_startLoading\":[32]}]]],[\"snk-simple-crud\",[[6,\"snk-simple-crud\",{\"dataState\":[16],\"dataUnit\":[16],\"mode\":[2],\"gridConfig\":[1040],\"formConfig\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"resourceID\":[1,\"resource-i-d\"],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"actionsList\":[16],\"configName\":[1025,\"config-name\"],\"showConfiguratorButtons\":[4,\"show-configurator-buttons\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"ignoreReadOnlyFormFields\":[4,\"ignore-read-only-form-fields\"],\"_showPopUpGridConfig\":[32],\"_showFormConfig\":[32],\"_currentViewMode\":[32],\"_config\":[32],\"_fieldToGetFocus\":[32],\"_customContainerId\":[32],\"_formFields\":[32],\"goToView\":[64],\"setMetadata\":[64],\"setRecords\":[64],\"getRecords\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64]},[[0,\"actionClick\",\"actionClickListener\"]]]]],[\"snk-attach\",[[2,\"snk-attach\",{\"fetcherType\":[1,\"fetcher-type\"],\"fetcher\":[16],\"dataUnit\":[16],\"dataUnitBuilder\":[16],\"registerKey\":[1,\"register-key\"],\"entityName\":[1,\"entity-name\"],\"messagesBuilder\":[1040],\"_currentFetcher\":[32],\"_currentDataUnit\":[32],\"crudConfig\":[32]}]]],[\"snk-form-summary\",[[2,\"snk-form-summary\",{\"fixed\":[1540],\"contracted\":[1540],\"summary\":[16]}]]],[\"snk-form-view\",[[6,\"snk-form-view\",{\"levelPath\":[1,\"level-path\"],\"label\":[1],\"name\":[1],\"fields\":[16],\"formMetadata\":[8,\"form-metadata\"],\"dataUnit\":[16],\"contracted\":[4],\"fixed\":[1540],\"summaryFields\":[16],\"canExpand\":[4,\"can-expand\"],\"canFix\":[4,\"can-fix\"],\"recordsValidator\":[16],\"fieldToFocus\":[1,\"field-to-focus\"],\"showUp\":[64]}]]],[\"snk-filter-field-search_2\",[[2,\"snk-filter-field-search\",{\"searchable\":[4],\"fieldsDataSource\":[16],\"breadcrumbItems\":[32],\"linkItems\":[32],\"fieldItems\":[32],\"searchEmpty\":[32],\"groupEmpty\":[32],\"show\":[64],\"applyFilter\":[64]}],[0,\"snk-filter-param-config\",{\"messagesBuilder\":[1040],\"_opened\":[32],\"_configType\":[32],\"_expressionItem\":[32],\"_informedInstance\":[32],\"_canSave\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-expression-group_2\",[[2,\"snk-expression-group\",{\"parentTop\":[1026,\"parent-top\"],\"group\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityURI\":[1025,\"entity-u-r-i\"],\"_conditionOperator\":[32],\"_group\":[32],\"_selfTop\":[32],\"canAddExpression\":[32],\"_showDashes\":[32],\"getExpressionGroup\":[64]},[[8,\"ezExpressionLayoutChanged\",\"todoCompletedHandler\"]]],[2,\"snk-expression-item\",{\"expression\":[16],\"canRemove\":[516,\"can-remove\"],\"messagesBuilder\":[1040],\"entityURI\":[1025,\"entity-u-r-i\"],\"_showValueVariable\":[32],\"_fieldSelected\":[32],\"_optionNotNull\":[32]}]]],[\"snk-personalized-filter\",[[2,\"snk-personalized-filter\",{\"messagesBuilder\":[1040],\"entityUri\":[1025,\"entity-uri\"],\"filterId\":[1025,\"filter-id\"],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_filterAssistentMode\":[32],\"_filterAssistent\":[32],\"createPersonalizedFilter\":[64]}]]],[\"snk-filter-item\",[[0,\"snk-filter-item\",{\"config\":[1040],\"getMessage\":[16],\"showChips\":[4,\"show-chips\"],\"detailIsVisible\":[32],\"showUp\":[64],\"hideDetail\":[64]},[[2,\"click\",\"clickListener\"],[2,\"mousedown\",\"mouseDownListener\"],[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-filter-bar\",[[2,\"snk-filter-bar\",{\"dataUnit\":[1040],\"title\":[1],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"mode\":[1],\"filterConfig\":[1040],\"messagesBuilder\":[1040],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"allowDefault\":[32],\"scrollerLocked\":[32],\"showPersonalizedFilter\":[32],\"personalizedFilterId\":[32],\"reload\":[64],\"getFilterItem\":[64],\"updateFilterItem\":[64],\"addFilterItem\":[64],\"removeFilterItem\":[64],\"showFilterModal\":[64]},[[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-grid\",[[6,\"snk-grid\",{\"columnFilterDataSource\":[1040],\"configName\":[1,\"config-name\"],\"filterBarTitle\":[1,\"filter-bar-title\"],\"resourceID\":[1,\"resource-i-d\"],\"selectionToastConfig\":[16],\"actionsList\":[16],\"isDetail\":[4,\"is-detail\"],\"taskbarManager\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"recordsValidator\":[16],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"gridHeaderCustomSlotId\":[1,\"grid-header-custom-slot-id\"],\"topTaskbarCustomSlotId\":[1,\"top-taskbar-custom-slot-id\"],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_gridConfig\":[32],\"_popUpGridConfig\":[32],\"_showSnkFilterBar\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"setConfig\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64],\"findColumn\":[64]}]]],[\"snk-configurator\",[[2,\"snk-configurator\",{\"showActionButtons\":[4,\"show-action-buttons\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"viewMode\":[2,\"view-mode\"],\"customContainerId\":[1,\"custom-container-id\"],\"messagesBuilder\":[1040],\"_opened\":[32],\"_permissions\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-data-unit\",[[2,\"snk-data-unit\",{\"dataState\":[1040],\"messagesBuilder\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"entityName\":[1,\"entity-name\"],\"pageSize\":[2,\"page-size\"],\"dataUnit\":[1040],\"beforeSave\":[16],\"afterSave\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"ignoreSaveMessage\":[4,\"ignore-save-message\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"getDataUnit\":[64],\"getSelectedRecordsIDsInfo\":[64]}]]],[\"snk-taskbar\",[[6,\"snk-taskbar\",{\"alignRigth\":[4,\"align-rigth\"],\"customSlotId\":[1,\"custom-slot-id\"],\"customContainerId\":[1,\"custom-container-id\"],\"overflowStrategy\":[1,\"overflow-strategy\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"buttons\":[1],\"customButtons\":[16],\"actionsList\":[16],\"primaryButton\":[1,\"primary-button\"],\"disabledButtons\":[16],\"dataUnit\":[16],\"presentationMode\":[1537,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_permissions\":[32],\"_overFlowedElements\":[32],\"_customElements\":[32],\"_customElementsId\":[32],\"_slotContainer\":[32],\"_hiddenActionsList\":[32]}]]],[\"snk-filter-detail\",[[0,\"snk-filter-detail\",{\"config\":[1040],\"getMessage\":[16],\"showHardFixed\":[4,\"show-hard-fixed\"],\"show\":[64]}]]],[\"snk-config-options\",[[2,\"snk-config-options\",{\"fieldConfig\":[16],\"idConfig\":[513,\"id-config\"],\"dataUnit\":[16],\"messagesBuilder\":[1040],\"_defaultType\":[32]}]]],[\"snk-field-config\",[[2,\"snk-field-config\",{\"isConfigActive\":[16],\"fieldConfig\":[16],\"modeInsertion\":[516,\"mode-insertion\"],\"dataUnit\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-simple-bar\",[[6,\"snk-simple-bar\",{\"label\":[1],\"breadcrumbItens\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-tab-config\",[[6,\"snk-tab-config\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"tabItems\":[16],\"messagesBuilder\":[1040],\"_processedTabs\":[32],\"_activeEditText\":[32],\"_activeEditTextIndex\":[32],\"_actionsHide\":[32],\"_actionsShow\":[32]}]]],[\"snk-form-config\",[[2,\"snk-form-config\",{\"dataUnit\":[16],\"configManager\":[16],\"messagesBuilder\":[1040],\"_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-crud\",[[6,\"snk-crud\",{\"configName\":[1025,\"config-name\"],\"filterBarTitle\":[1,\"filter-bar-title\"],\"selectionToastConfig\":[16],\"showActionButtons\":[4,\"show-action-buttons\"],\"actionsList\":[16],\"taskbarManager\":[16],\"recordsValidator\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"_dataUnit\":[32],\"_dataState\":[32],\"attachmentRegisterKey\":[32],\"_currentViewMode\":[32],\"_canEdit\":[32],\"_resourceID\":[32],\"customContainerId\":[32],\"goToView\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64]}]]],[\"snk-form\",[[2,\"snk-form\",{\"configName\":[1,\"config-name\"],\"recordsValidator\":[16],\"messagesBuilder\":[1040],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_showFormConfig\":[32],\"_configManager\":[32],\"showConfig\":[64],\"hideConfig\":[64]}]]],[\"snk-data-exporter\",[[2,\"snk-data-exporter\",{\"provider\":[16],\"messagesBuilder\":[1040],\"_items\":[32],\"_showDropdown\":[32],\"_releasedToExport\":[32]}]]],[\"snk-guides-viewer\",[[6,\"snk-guides-viewer\",{\"dataUnit\":[16],\"dataState\":[16],\"configName\":[1,\"config-name\"],\"entityPath\":[1,\"entity-path\"],\"actionsList\":[16],\"recordsValidator\":[16],\"masterFormConfig\":[1040],\"selectedGuide\":[16],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"canEdit\":[4,\"can-edit\"],\"presentationMode\":[1,\"presentation-mode\"],\"resourceID\":[1,\"resource-i-d\"],\"detailTaskbarCustomContainerId\":[1,\"detail-taskbar-custom-container-id\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"_hasToCreateFieldSearch\":[32],\"_breadcrumbItems\":[32],\"_guides\":[32],\"_formEditorConfigManager\":[32],\"_formEditorDataUnit\":[32],\"_fieldToGetFocus\":[32],\"showFormConfig\":[64],\"findField\":[64]},[[2,\"actionClick\",\"onActionClick\"],[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-application\",[[2,\"snk-application\",{\"messagesBuilder\":[1040],\"configName\":[1,\"config-name\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"loadByPK\":[16],\"getKeyboardManager\":[64],\"isUserSup\":[64],\"addPendingAction\":[64],\"callServiceBroker\":[64],\"initOnboarding\":[64],\"hasAccess\":[64],\"getAllAccess\":[64],\"getStringParam\":[64],\"getIntParam\":[64],\"getFloatParam\":[64],\"getBooleanParam\":[64],\"getDateParam\":[64],\"showPopUp\":[64],\"showModal\":[64],\"showAlerts\":[64],\"closeModal\":[64],\"closePopUp\":[64],\"temOpcional\":[64],\"getConfig\":[64],\"saveConfig\":[64],\"getAttributeFromHTMLWrapper\":[64],\"openApp\":[64],\"webConnection\":[64],\"createDataunit\":[64],\"updateDataunitCache\":[64],\"getDataUnit\":[64],\"addClientEvent\":[64],\"removeClientEvent\":[64],\"hasClientEvent\":[64],\"getResourceID\":[64],\"getUserID\":[64],\"alert\":[64],\"error\":[64],\"success\":[64],\"message\":[64],\"confirm\":[64],\"info\":[64],\"loadTotals\":[64],\"isLoadedByPk\":[64],\"executeSearch\":[64],\"executePreparedSearch\":[64],\"isDebugMode\":[64],\"getAppLabel\":[64],\"addSearchListener\":[64],\"importScript\":[64],\"getApplicationPath\":[64],\"executeSelectDistinct\":[64],\"getDataFetcher\":[64],\"whenApplicationReady\":[64],\"setSearchFilterContext\":[64]}]]],[\"snk-filter-advanced-mode_2\",[[2,\"snk-filter-assistent-mode\",{\"filterAssistent\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityUri\":[1025,\"entity-uri\"],\"application\":[1040]}],[2,\"snk-filter-advanced-mode\",{\"filterAssistent\":[1040],\"application\":[1040]}]]],[\"snk-actions-button_4\",[[2,\"snk-grid-config\",{\"selectedIndex\":[1026,\"selected-index\"],\"columns\":[1040],\"config\":[1040],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}],[2,\"snk-actions-button\",{\"_items\":[32],\"_showDropdown\":[32],\"_actions\":[32],\"_isOrderActions\":[32]}],[1,\"snk-select-box\",{\"selectedOption\":[1,\"selected-option\"]}],[2,\"taskbar-actions-button\",{\"title\":[1],\"enabled\":[4],\"actions\":[16],\"_showDropdown\":[32],\"showActions\":[64],\"hideActions\":[64],\"isOpened\":[64]},[[8,\"keydown\",\"handleKeyDown\"],[8,\"ezOpenModal\",\"handleClose\"]]]]],[\"snk-detail-view\",[[6,\"snk-detail-view\",{\"formConfigManager\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"resourceID\":[1,\"resource-i-d\"],\"guideItemPath\":[16],\"entityName\":[1,\"entity-name\"],\"label\":[1],\"dataUnit\":[1040],\"selectedForm\":[1025,\"selected-form\"],\"dataState\":[1040],\"messagesBuilder\":[1040],\"branchGuide\":[1040],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"_disabledButtons\":[32],\"_currentView\":[32],\"attachmentRegisterKey\":[32],\"changeViewMode\":[64],\"configGrid\":[64],\"showUp\":[64]},[[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]]]"), options);
|
|
17
|
+
return bootstrapLazy(JSON.parse("[[\"teste-pesquisa\",[[1,\"teste-pesquisa\"]]],[\"snk-filter-modal\",[[0,\"snk-filter-modal\",{\"getMessage\":[16],\"configName\":[1025,\"config-name\"],\"filters\":[1040],\"applyFilters\":[16],\"closeModal\":[16],\"addPersonalizedFilter\":[16],\"editPersonalizedFilter\":[16],\"deletePersonalizedFilter\":[16],\"filtersToDelete\":[16],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"]},[[0,\"deleteFilter\",\"deletePersonalizedFilterListener\"]]]]],[\"snk-actions-form\",[[2,\"snk-actions-form\",{\"action\":[16],\"applyParameters\":[16],\"dataUnit\":[32],\"openPopup\":[64]}]]],[\"snk-client-confirm\",[[2,\"snk-client-confirm\",{\"titleMessage\":[1,\"title-message\"],\"message\":[1],\"accept\":[16],\"cancel\":[16],\"openPopup\":[64]}]]],[\"snk-custom-slot-elements\",[[6,\"snk-custom-slot-elements\",{\"slotName\":[1,\"slot-name\"]}]]],[\"snk-entity-list\",[[2,\"snk-entity-list\",{\"config\":[1040],\"rightListSlotBuilder\":[1040],\"maxHeightList\":[1,\"max-height-list\"],\"_searchValue\":[32],\"_ezListSource\":[32],\"reloadList\":[64]}]]],[\"snk-filter-binary-select\",[[0,\"snk-filter-binary-select\",{\"value\":[1544],\"config\":[16],\"presentationMode\":[2,\"presentation-mode\"],\"resetValues\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-checkbox-list\",[[0,\"snk-filter-checkbox-list\",{\"config\":[1040],\"optionsList\":[32]}]]],[\"snk-filter-list\",[[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\"]]]]],[\"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],\"getMessage\":[16],\"value\":[2],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-period\",[[0,\"snk-filter-period\",{\"config\":[16],\"getMessage\":[16],\"value\":[8],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"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-personalized-filter-editor\",[[2,\"snk-personalized-filter-editor\",{\"messagesBuilder\":[1040],\"presentationMode\":[2,\"presentation-mode\"],\"config\":[16],\"value\":[1040],\"items\":[32],\"show\":[64]}]]],[\"snk-print-selector\",[[2,\"snk-print-selector\",{\"_printServerActive\":[32],\"_selectedPrinter\":[32],\"_remotePrintersDataSource\":[32],\"_localPrintersDataSource\":[32],\"_printJobData\":[32],\"openPrintSelector\":[64]}]]],[\"snk-filter-modal-item\",[[0,\"snk-filter-modal-item\",{\"filterItem\":[1040],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}]]],[\"snk-pesquisa\",[[2,\"snk-pesquisa\",{\"searchLoader\":[16],\"selectItem\":[16],\"argument\":[1025],\"_itemList\":[32],\"_startLoading\":[32]}]]],[\"snk-simple-crud\",[[6,\"snk-simple-crud\",{\"dataState\":[16],\"dataUnit\":[16],\"entityName\":[1,\"entity-name\"],\"mode\":[2],\"gridConfig\":[1040],\"formConfig\":[1040],\"multipleSelection\":[4,\"multiple-selection\"],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"pageSize\":[2,\"page-size\"],\"resourceID\":[1,\"resource-i-d\"],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"actionsList\":[16],\"configName\":[1025,\"config-name\"],\"showConfiguratorButtons\":[4,\"show-configurator-buttons\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"ignoreReadOnlyFormFields\":[4,\"ignore-read-only-form-fields\"],\"_showPopUpGridConfig\":[32],\"_showFormConfig\":[32],\"_currentViewMode\":[32],\"_config\":[32],\"_fieldToGetFocus\":[32],\"_customContainerId\":[32],\"_formFields\":[32],\"goToView\":[64],\"setMetadata\":[64],\"setRecords\":[64],\"getRecords\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"updateConfig\":[64]},[[0,\"actionClick\",\"actionClickListener\"]]]]],[\"snk-attach\",[[2,\"snk-attach\",{\"fetcherType\":[1,\"fetcher-type\"],\"fetcher\":[16],\"dataUnit\":[16],\"dataUnitBuilder\":[16],\"registerKey\":[1,\"register-key\"],\"entityName\":[1,\"entity-name\"],\"messagesBuilder\":[1040],\"_currentFetcher\":[32],\"_currentDataUnit\":[32],\"crudConfig\":[32]}]]],[\"snk-form-summary\",[[2,\"snk-form-summary\",{\"fixed\":[1540],\"contracted\":[1540],\"summary\":[16]}]]],[\"snk-form-view\",[[6,\"snk-form-view\",{\"levelPath\":[1,\"level-path\"],\"label\":[1],\"name\":[1],\"fields\":[16],\"formMetadata\":[8,\"form-metadata\"],\"dataUnit\":[16],\"contracted\":[4],\"fixed\":[1540],\"summaryFields\":[16],\"canExpand\":[4,\"can-expand\"],\"canFix\":[4,\"can-fix\"],\"recordsValidator\":[16],\"fieldToFocus\":[1,\"field-to-focus\"],\"showUp\":[64]}]]],[\"snk-filter-field-search_2\",[[2,\"snk-filter-field-search\",{\"searchable\":[4],\"fieldsDataSource\":[16],\"breadcrumbItems\":[32],\"linkItems\":[32],\"fieldItems\":[32],\"searchEmpty\":[32],\"groupEmpty\":[32],\"show\":[64],\"applyFilter\":[64]}],[0,\"snk-filter-param-config\",{\"messagesBuilder\":[1040],\"_opened\":[32],\"_configType\":[32],\"_expressionItem\":[32],\"_informedInstance\":[32],\"_canSave\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-expression-group_2\",[[2,\"snk-expression-group\",{\"parentTop\":[1026,\"parent-top\"],\"group\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityURI\":[1025,\"entity-u-r-i\"],\"_conditionOperator\":[32],\"_group\":[32],\"_selfTop\":[32],\"canAddExpression\":[32],\"_showDashes\":[32],\"getExpressionGroup\":[64]},[[8,\"ezExpressionLayoutChanged\",\"todoCompletedHandler\"]]],[2,\"snk-expression-item\",{\"expression\":[16],\"canRemove\":[516,\"can-remove\"],\"messagesBuilder\":[1040],\"entityURI\":[1025,\"entity-u-r-i\"],\"_showValueVariable\":[32],\"_fieldSelected\":[32],\"_optionNotNull\":[32]}]]],[\"snk-personalized-filter\",[[2,\"snk-personalized-filter\",{\"messagesBuilder\":[1040],\"entityUri\":[1025,\"entity-uri\"],\"filterId\":[1025,\"filter-id\"],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_filterAssistentMode\":[32],\"_filterAssistent\":[32],\"createPersonalizedFilter\":[64]}]]],[\"snk-filter-item\",[[0,\"snk-filter-item\",{\"config\":[1040],\"getMessage\":[16],\"showChips\":[4,\"show-chips\"],\"detailIsVisible\":[32],\"showUp\":[64],\"hideDetail\":[64]},[[2,\"click\",\"clickListener\"],[2,\"mousedown\",\"mouseDownListener\"],[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-filter-bar\",[[2,\"snk-filter-bar\",{\"dataUnit\":[1040],\"title\":[1],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"mode\":[1],\"filterConfig\":[1040],\"messagesBuilder\":[1040],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"allowDefault\":[32],\"scrollerLocked\":[32],\"showPersonalizedFilter\":[32],\"personalizedFilterId\":[32],\"reload\":[64],\"getFilterItem\":[64],\"updateFilterItem\":[64],\"addFilterItem\":[64],\"removeFilterItem\":[64],\"showFilterModal\":[64]},[[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-grid\",[[6,\"snk-grid\",{\"columnFilterDataSource\":[1040],\"configName\":[1,\"config-name\"],\"filterBarTitle\":[1,\"filter-bar-title\"],\"resourceID\":[1,\"resource-i-d\"],\"selectionToastConfig\":[16],\"actionsList\":[16],\"isDetail\":[4,\"is-detail\"],\"taskbarManager\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"recordsValidator\":[16],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"gridHeaderCustomSlotId\":[1,\"grid-header-custom-slot-id\"],\"topTaskbarCustomSlotId\":[1,\"top-taskbar-custom-slot-id\"],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_gridConfig\":[32],\"_popUpGridConfig\":[32],\"_showSnkFilterBar\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"setConfig\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64],\"findColumn\":[64]}]]],[\"snk-configurator\",[[2,\"snk-configurator\",{\"showActionButtons\":[4,\"show-action-buttons\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"viewMode\":[2,\"view-mode\"],\"customContainerId\":[1,\"custom-container-id\"],\"messagesBuilder\":[1040],\"_opened\":[32],\"_permissions\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-data-unit\",[[2,\"snk-data-unit\",{\"dataState\":[1040],\"messagesBuilder\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"entityName\":[1,\"entity-name\"],\"pageSize\":[2,\"page-size\"],\"dataUnit\":[1040],\"beforeSave\":[16],\"afterSave\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"ignoreSaveMessage\":[4,\"ignore-save-message\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"getDataUnit\":[64],\"getSelectedRecordsIDsInfo\":[64]}]]],[\"snk-taskbar\",[[6,\"snk-taskbar\",{\"alignRigth\":[4,\"align-rigth\"],\"customSlotId\":[1,\"custom-slot-id\"],\"customContainerId\":[1,\"custom-container-id\"],\"overflowStrategy\":[1,\"overflow-strategy\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"buttons\":[1],\"customButtons\":[16],\"actionsList\":[16],\"primaryButton\":[1,\"primary-button\"],\"disabledButtons\":[16],\"dataUnit\":[16],\"presentationMode\":[1537,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_permissions\":[32],\"_overFlowedElements\":[32],\"_customElements\":[32],\"_customElementsId\":[32],\"_slotContainer\":[32],\"_hiddenActionsList\":[32],\"_lastWidth\":[32],\"_hasToUpdateOverFlow\":[32]}]]],[\"snk-filter-detail\",[[0,\"snk-filter-detail\",{\"config\":[1040],\"getMessage\":[16],\"showHardFixed\":[4,\"show-hard-fixed\"],\"show\":[64]}]]],[\"snk-config-options\",[[2,\"snk-config-options\",{\"fieldConfig\":[16],\"idConfig\":[513,\"id-config\"],\"dataUnit\":[16],\"messagesBuilder\":[1040],\"_defaultType\":[32]}]]],[\"snk-field-config\",[[2,\"snk-field-config\",{\"isConfigActive\":[16],\"fieldConfig\":[16],\"modeInsertion\":[516,\"mode-insertion\"],\"dataUnit\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-simple-bar\",[[6,\"snk-simple-bar\",{\"label\":[1],\"breadcrumbItens\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-tab-config\",[[6,\"snk-tab-config\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"tabItems\":[16],\"messagesBuilder\":[1040],\"_processedTabs\":[32],\"_activeEditText\":[32],\"_activeEditTextIndex\":[32],\"_actionsHide\":[32],\"_actionsShow\":[32]}]]],[\"snk-form-config\",[[2,\"snk-form-config\",{\"dataUnit\":[16],\"configManager\":[16],\"messagesBuilder\":[1040],\"_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-crud\",[[6,\"snk-crud\",{\"configName\":[1025,\"config-name\"],\"filterBarTitle\":[1,\"filter-bar-title\"],\"selectionToastConfig\":[16],\"showActionButtons\":[4,\"show-action-buttons\"],\"actionsList\":[16],\"taskbarManager\":[16],\"recordsValidator\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"_dataUnit\":[32],\"_dataState\":[32],\"attachmentRegisterKey\":[32],\"_currentViewMode\":[32],\"_canEdit\":[32],\"_resourceID\":[32],\"customContainerId\":[32],\"goToView\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64]}]]],[\"snk-form\",[[2,\"snk-form\",{\"configName\":[1,\"config-name\"],\"recordsValidator\":[16],\"messagesBuilder\":[1040],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_showFormConfig\":[32],\"_configManager\":[32],\"showConfig\":[64],\"hideConfig\":[64]}]]],[\"snk-data-exporter\",[[2,\"snk-data-exporter\",{\"provider\":[16],\"messagesBuilder\":[1040],\"_items\":[32],\"_showDropdown\":[32]}]]],[\"snk-guides-viewer\",[[6,\"snk-guides-viewer\",{\"dataUnit\":[16],\"dataState\":[16],\"configName\":[1,\"config-name\"],\"entityPath\":[1,\"entity-path\"],\"actionsList\":[16],\"recordsValidator\":[16],\"masterFormConfig\":[1040],\"selectedGuide\":[16],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"canEdit\":[4,\"can-edit\"],\"presentationMode\":[1,\"presentation-mode\"],\"resourceID\":[1,\"resource-i-d\"],\"detailTaskbarCustomContainerId\":[1,\"detail-taskbar-custom-container-id\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"_hasToCreateFieldSearch\":[32],\"_breadcrumbItems\":[32],\"_guides\":[32],\"_formEditorConfigManager\":[32],\"_formEditorDataUnit\":[32],\"_fieldToGetFocus\":[32],\"showFormConfig\":[64],\"findField\":[64]},[[2,\"actionClick\",\"onActionClick\"],[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-application\",[[2,\"snk-application\",{\"messagesBuilder\":[1040],\"configName\":[1,\"config-name\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"loadByPK\":[16],\"getKeyboardManager\":[64],\"isUserSup\":[64],\"addPendingAction\":[64],\"callServiceBroker\":[64],\"initOnboarding\":[64],\"hasAccess\":[64],\"getAllAccess\":[64],\"getStringParam\":[64],\"getIntParam\":[64],\"getFloatParam\":[64],\"getBooleanParam\":[64],\"getDateParam\":[64],\"showPopUp\":[64],\"showModal\":[64],\"showAlerts\":[64],\"closeModal\":[64],\"closePopUp\":[64],\"temOpcional\":[64],\"getConfig\":[64],\"saveConfig\":[64],\"getAttributeFromHTMLWrapper\":[64],\"openApp\":[64],\"webConnection\":[64],\"createDataunit\":[64],\"updateDataunitCache\":[64],\"getDataUnit\":[64],\"addClientEvent\":[64],\"removeClientEvent\":[64],\"hasClientEvent\":[64],\"getResourceID\":[64],\"getUserID\":[64],\"alert\":[64],\"error\":[64],\"success\":[64],\"message\":[64],\"confirm\":[64],\"info\":[64],\"loadTotals\":[64],\"isLoadedByPk\":[64],\"executeSearch\":[64],\"executePreparedSearch\":[64],\"isDebugMode\":[64],\"getAppLabel\":[64],\"addSearchListener\":[64],\"importScript\":[64],\"getApplicationPath\":[64],\"executeSelectDistinct\":[64],\"getDataFetcher\":[64],\"whenApplicationReady\":[64],\"setSearchFilterContext\":[64]}]]],[\"snk-filter-advanced-mode_2\",[[2,\"snk-filter-assistent-mode\",{\"filterAssistent\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityUri\":[1025,\"entity-uri\"],\"application\":[1040]}],[2,\"snk-filter-advanced-mode\",{\"filterAssistent\":[1040],\"application\":[1040]}]]],[\"snk-actions-button_4\",[[2,\"snk-grid-config\",{\"selectedIndex\":[1026,\"selected-index\"],\"columns\":[1040],\"config\":[1040],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}],[2,\"snk-actions-button\",{\"_items\":[32],\"_showDropdown\":[32],\"_actions\":[32],\"_isOrderActions\":[32]}],[1,\"snk-select-box\",{\"selectedOption\":[1,\"selected-option\"]}],[2,\"taskbar-actions-button\",{\"title\":[1],\"enabled\":[4],\"actions\":[16],\"_showDropdown\":[32],\"showActions\":[64],\"hideActions\":[64],\"isOpened\":[64]},[[8,\"keydown\",\"handleKeyDown\"],[8,\"ezOpenModal\",\"handleClose\"]]]]],[\"snk-detail-view\",[[6,\"snk-detail-view\",{\"formConfigManager\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"resourceID\":[1,\"resource-i-d\"],\"guideItemPath\":[16],\"entityName\":[1,\"entity-name\"],\"label\":[1],\"dataUnit\":[1040],\"selectedForm\":[1025,\"selected-form\"],\"dataState\":[1040],\"messagesBuilder\":[1040],\"branchGuide\":[1040],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"_disabledButtons\":[32],\"_currentView\":[32],\"attachmentRegisterKey\":[32],\"changeViewMode\":[64],\"configGrid\":[64],\"showUp\":[64]},[[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]]]"), options);
|
|
18
18
|
});
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-a7d3d3f1.js';
|
|
2
2
|
import { ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, DateUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import { D as DataFetcher } from './
|
|
3
|
+
import { D as DataFetcher } from './form-config-fetcher-13cd3285.js';
|
|
4
4
|
import { P as ParamType } from './ParamType-d5152b06.js';
|
|
5
|
-
import './pesquisa-fetcher-
|
|
5
|
+
import './pesquisa-fetcher-d785663b.js';
|
|
6
6
|
import './index-0ece87a6.js';
|
|
7
7
|
import './ISave-d8c8bc59.js';
|
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
10
10
|
import './filter-item-type.enum-d45e026f.js';
|
|
11
|
-
import './form-config-fetcher-765b8498.js';
|
|
12
11
|
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
|
13
12
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
14
13
|
import { CheckMode } from '@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode';
|
|
15
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
14
|
+
import { C as ConfigStorage } from './ConfigStorage-cc3f3dd3.js';
|
|
16
15
|
import { O as ORDER_VALUES } from './constants-8457af36.js';
|
|
17
16
|
import './PrintUtils-3e4ff0f5.js';
|
|
18
17
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
18
|
+
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
19
19
|
|
|
20
20
|
const SERVICE_ACTION_EXECUTE_JAVA = 'ActionButtonsSP.executeJava';
|
|
21
21
|
class JavaExecutor {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
|
|
2
2
|
import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ArrayUtils, SearchUtils, ElementIDUtils, ApplicationContext, DataType, ErrorTracking } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
5
|
-
import { d as dist, D as DataFetcher, U as UrlUtils } from './
|
|
6
|
-
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-
|
|
7
|
-
import { D as DataUnitFetcher, P as PesquisaFetcher } from './pesquisa-fetcher-
|
|
8
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-
|
|
9
|
-
import './form-config-fetcher-765b8498.js';
|
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-cc3f3dd3.js';
|
|
5
|
+
import { d as dist, D as DataFetcher, U as UrlUtils } from './form-config-fetcher-13cd3285.js';
|
|
6
|
+
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-11dd9cae.js';
|
|
7
|
+
import { D as DataUnitFetcher, P as PesquisaFetcher } from './pesquisa-fetcher-d785663b.js';
|
|
8
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-0a4becdd.js';
|
|
10
9
|
import './filter-item-type.enum-d45e026f.js';
|
|
11
10
|
import './PrintUtils-3e4ff0f5.js';
|
|
12
11
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
13
12
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
14
13
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
14
|
+
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
15
15
|
import './ResourceIDUtils-a114189a.js';
|
|
16
16
|
|
|
17
17
|
class AppletCaller {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-a7d3d3f1.js';
|
|
2
2
|
import { ApplicationContext, DataType, Action, UserInterface, StringUtils, DataUnit } from '@sankhyalabs/core';
|
|
3
|
-
import { D as DataFetcher } from './
|
|
4
|
-
import { a as PreloadManager, D as DataUnitFetcher } from './pesquisa-fetcher-
|
|
3
|
+
import { D as DataFetcher } from './form-config-fetcher-13cd3285.js';
|
|
4
|
+
import { a as PreloadManager, b as applyFilter, c as applySorting, d as buildPaginationInfo, D as DataUnitFetcher, I as InMemoryLoader } from './pesquisa-fetcher-d785663b.js';
|
|
5
5
|
import './index-0ece87a6.js';
|
|
6
6
|
import { S as SaveErrorsEnum } from './ISave-d8c8bc59.js';
|
|
7
7
|
import './filter-item-type.enum-d45e026f.js';
|
|
8
|
-
import './form-config-fetcher-765b8498.js';
|
|
9
8
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
|
10
|
-
import { A as AutorizationType } from './auth-fetcher-
|
|
11
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
|
9
|
+
import { A as AutorizationType } from './auth-fetcher-11dd9cae.js';
|
|
10
|
+
import { T as TaskbarElement } from './taskbar-elements-ad766858.js';
|
|
12
11
|
import './PrintUtils-3e4ff0f5.js';
|
|
13
12
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
14
13
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
15
14
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
15
|
+
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
16
16
|
import './ResourceIDUtils-a114189a.js';
|
|
17
17
|
import './index-bdf75557.js';
|
|
18
18
|
|
|
@@ -389,7 +389,7 @@ const attachFetcherMetadataBuilder = {
|
|
|
389
389
|
label: "Attach List",
|
|
390
390
|
fields: [
|
|
391
391
|
{ name: "CODATA", label: getMessage$1("snkAttach.attachMetadata.lblCode"), dataType: DataType.TEXT },
|
|
392
|
-
{ name: "DESCRICAO", label: getMessage$1("snkAttach.attachMetadata.lblDescription"), dataType: DataType.TEXT },
|
|
392
|
+
{ name: "DESCRICAO", label: getMessage$1("snkAttach.attachMetadata.lblDescription"), dataType: DataType.TEXT, readOnly: false },
|
|
393
393
|
{ name: "ARQUIVO", label: getMessage$1("snkAttach.attachMetadata.lblFileOrLink"), dataType: DataType.TEXT },
|
|
394
394
|
{ name: "USUARIO", label: getMessage$1("snkAttach.attachMetadata.lblUser"), dataType: DataType.TEXT },
|
|
395
395
|
{ name: "DTALTER", label: getMessage$1("snkAttach.attachMetadata.lblDate"), dataType: DataType.TEXT },
|
|
@@ -415,6 +415,7 @@ const SERVICE_LOAD = "Attach.load";
|
|
|
415
415
|
class AttachFetcherDataUnitFactory {
|
|
416
416
|
constructor(getMessage) {
|
|
417
417
|
this.getMessage = getMessage;
|
|
418
|
+
this._records = [];
|
|
418
419
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
419
420
|
}
|
|
420
421
|
initLoaders(dataUnit, fetcher, onSuccess) {
|
|
@@ -434,25 +435,30 @@ class AttachFetcherDataUnitFactory {
|
|
|
434
435
|
metadataLoader(_) {
|
|
435
436
|
return Promise.resolve(attachFetcherMetadataBuilder);
|
|
436
437
|
}
|
|
437
|
-
async dataLoader(
|
|
438
|
+
async dataLoader(dataUnit, request) {
|
|
438
439
|
if (!request.source) {
|
|
439
|
-
return Promise.resolve({ records:
|
|
440
|
+
return Promise.resolve({ records: this._records });
|
|
440
441
|
}
|
|
441
|
-
|
|
442
|
-
criteria
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
442
|
+
if (!Number.isNaN(Number(request.source))) {
|
|
443
|
+
const criteria = {
|
|
444
|
+
criteria: {
|
|
445
|
+
codata: request.source,
|
|
446
|
+
tipoAnexo: "N"
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
const applicationDataFetcher = await this._application.getDataFetcher();
|
|
450
|
+
const { anexos: { anexo = [] } } = await applicationDataFetcher.callServiceBroker(SERVICE_LOAD, JSON.stringify(criteria));
|
|
451
|
+
const records = [];
|
|
452
|
+
anexo.forEach((param) => {
|
|
453
|
+
records.push(Object.assign({ __record__id__: StringUtils.generateUUID(), CAMINHO_ARQUIVO: [{
|
|
454
|
+
name: param === null || param === void 0 ? void 0 : param.ARQUIVO,
|
|
455
|
+
}] }, param));
|
|
456
|
+
});
|
|
457
|
+
this._records = records;
|
|
458
|
+
}
|
|
459
|
+
let records = applyFilter(this._records, dataUnit, request.filters);
|
|
460
|
+
records = applySorting(records, dataUnit, request.sort);
|
|
461
|
+
return Promise.resolve({ records, paginationInfo: buildPaginationInfo(records, request.offset, request.limit) });
|
|
456
462
|
}
|
|
457
463
|
saveLoader(changes, fetcher) {
|
|
458
464
|
return new Promise((resolve) => {
|
|
@@ -631,7 +637,7 @@ const SnkAttach = class {
|
|
|
631
637
|
this.back.emit();
|
|
632
638
|
});
|
|
633
639
|
};
|
|
634
|
-
this.fetcherType =
|
|
640
|
+
this.fetcherType = undefined;
|
|
635
641
|
this.fetcher = undefined;
|
|
636
642
|
this.dataUnit = undefined;
|
|
637
643
|
this.dataUnitBuilder = undefined;
|
|
@@ -643,8 +649,8 @@ const SnkAttach = class {
|
|
|
643
649
|
this.crudConfig = undefined;
|
|
644
650
|
}
|
|
645
651
|
registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
|
646
|
-
var _a, _b, _c, _d;
|
|
647
|
-
if (this._currentDataUnit
|
|
652
|
+
var _a, _b, _c, _d, _e, _f;
|
|
653
|
+
if (!this._currentDataUnit) {
|
|
648
654
|
this.loadAttachmentDataUnit();
|
|
649
655
|
}
|
|
650
656
|
if (oldRegisterKey !== newRegisterKey) {
|
|
@@ -659,11 +665,7 @@ const SnkAttach = class {
|
|
|
659
665
|
if (hasMoreOneItem)
|
|
660
666
|
return;
|
|
661
667
|
}
|
|
662
|
-
return this._currentDataUnit
|
|
663
|
-
.loadMetadata()
|
|
664
|
-
.then(() => {
|
|
665
|
-
this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
|
666
|
-
});
|
|
668
|
+
return (_f = (_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadMetadata()) === null || _f === void 0 ? void 0 : _f.then(this._currentDataUnit.loadData.bind(undefined, undefined, true, this.registerKey));
|
|
667
669
|
}
|
|
668
670
|
}
|
|
669
671
|
/**
|
|
@@ -729,7 +731,7 @@ const SnkAttach = class {
|
|
|
729
731
|
if (!this._currentDataUnit.metadata) {
|
|
730
732
|
this._currentDataUnit
|
|
731
733
|
.loadMetadata()
|
|
732
|
-
.then(() => this.crudConfig = anexoSistemaCrudConfig);
|
|
734
|
+
.then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
|
|
733
735
|
}
|
|
734
736
|
this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
|
|
735
737
|
this._currentDataUnit.addFilterProvider({
|
|
@@ -741,25 +743,29 @@ const SnkAttach = class {
|
|
|
741
743
|
this._currentDataUnit.loadData().then(this.disableEditFieldsNotInForm.bind(this));
|
|
742
744
|
}
|
|
743
745
|
loadAttach() {
|
|
744
|
-
var _a;
|
|
746
|
+
var _a, _b, _c;
|
|
745
747
|
this._currentFetcher = new AttachFetcher();
|
|
746
|
-
this._currentDataUnit = new DataUnit();
|
|
748
|
+
this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
|
747
749
|
this._currentDataUnit.addInterceptor({
|
|
748
|
-
interceptAction: (action) =>
|
|
750
|
+
interceptAction: (action) => {
|
|
751
|
+
var _a;
|
|
752
|
+
if (action.type === Action.METADATA_LOADED) {
|
|
753
|
+
this.crudConfig = Object.assign({}, attachCrudConfig);
|
|
754
|
+
(_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.updateConfig();
|
|
755
|
+
}
|
|
756
|
+
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
|
757
|
+
}
|
|
749
758
|
});
|
|
750
759
|
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
|
751
760
|
(_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
|
752
|
-
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
|
753
761
|
this.returnToGridMode();
|
|
762
|
+
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
|
754
763
|
});
|
|
755
764
|
if (!this._currentDataUnit.metadata) {
|
|
756
|
-
this._currentDataUnit
|
|
757
|
-
|
|
758
|
-
.
|
|
759
|
-
this.
|
|
760
|
-
this._currentDataUnit
|
|
761
|
-
.loadData(undefined, undefined, true, this.registerKey)
|
|
762
|
-
.then(this.disableEditFieldsNotInForm.bind(this));
|
|
765
|
+
(_c = (_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata()) === null || _c === void 0 ? void 0 : _c.then(() => {
|
|
766
|
+
var _a, _b;
|
|
767
|
+
this.crudConfig = Object.assign({}, attachCrudConfig);
|
|
768
|
+
(_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData(undefined, undefined, true, this.registerKey)) === null || _b === void 0 ? void 0 : _b.then(this.disableEditFieldsNotInForm.bind(this));
|
|
763
769
|
});
|
|
764
770
|
}
|
|
765
771
|
}
|
|
@@ -777,15 +783,30 @@ const SnkAttach = class {
|
|
|
777
783
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
778
784
|
}
|
|
779
785
|
componentWillRender() {
|
|
786
|
+
if (!this.fetcherType) {
|
|
787
|
+
this.fetcherType = "AnexoSistema";
|
|
788
|
+
}
|
|
780
789
|
if (this._currentDataUnit == null) {
|
|
781
790
|
this.loadAttachmentDataUnit();
|
|
782
791
|
}
|
|
783
792
|
}
|
|
793
|
+
async handleOnDataStateChange({ detail }) {
|
|
794
|
+
if (this.fetcherType !== 'Attach')
|
|
795
|
+
return;
|
|
796
|
+
if (!detail.insertionMode) {
|
|
797
|
+
this._currentDataUnit.disableField('DESCRICAO');
|
|
798
|
+
}
|
|
799
|
+
else {
|
|
800
|
+
this._currentDataUnit.enableField('DESCRICAO');
|
|
801
|
+
}
|
|
802
|
+
await this._currentDataUnit.loadMetadata();
|
|
803
|
+
}
|
|
804
|
+
;
|
|
784
805
|
render() {
|
|
785
806
|
var _a, _b;
|
|
786
807
|
if (!this._currentDataUnit)
|
|
787
808
|
return null;
|
|
788
|
-
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary" }, this.getMessage("snkAttach.description")))))))));
|
|
809
|
+
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this) }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary" }, this.getMessage("snkAttach.description")))))))));
|
|
789
810
|
}
|
|
790
811
|
static get watchers() { return {
|
|
791
812
|
"registerKey": ["registerKeyWatcher"]
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
|
2
2
|
import { StringUtils, ElementIDUtils, ApplicationContext, JSUtils, FloatingManager } from '@sankhyalabs/core';
|
|
3
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
|
4
|
-
import './
|
|
5
|
-
import './pesquisa-fetcher-
|
|
3
|
+
import { T as TaskbarElement } from './taskbar-elements-ad766858.js';
|
|
4
|
+
import './form-config-fetcher-13cd3285.js';
|
|
5
|
+
import './pesquisa-fetcher-d785663b.js';
|
|
6
6
|
import { P as PresentationMode } from './index-0ece87a6.js';
|
|
7
7
|
import './ISave-d8c8bc59.js';
|
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
10
10
|
import './filter-item-type.enum-d45e026f.js';
|
|
11
|
-
import './form-config-fetcher-765b8498.js';
|
|
12
11
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
|
13
|
-
import { A as AutorizationType } from './auth-fetcher-
|
|
12
|
+
import { A as AutorizationType } from './auth-fetcher-11dd9cae.js';
|
|
14
13
|
import './index-bdf75557.js';
|
|
15
14
|
import './PrintUtils-3e4ff0f5.js';
|
|
16
15
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
16
|
+
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
17
17
|
import './ResourceIDUtils-a114189a.js';
|
|
18
18
|
|
|
19
19
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|