@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-78242.2 → 0.0.0-bugfix-dev-KB-80932.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-f079f5fd.js → ConfigStorage-d024aec8.js} +2 -2
- package/dist/cjs/{ContinuousInsertUtils-64e47516.js → ContinuousInsertUtils-54d44192.js} +5 -5
- package/dist/cjs/{DataFetcher-e059eb72.js → DataFetcher-65879b2c.js} +188 -56
- package/dist/cjs/{SnkFormConfigManager-63369164.js → SnkFormConfigManager-ae3185b2.js} +2 -2
- package/dist/cjs/{auth-fetcher-4f853233.js → auth-fetcher-8480751c.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-228016f4.js → dataunit-fetcher-8ea97d88.js} +2 -2
- package/dist/cjs/{form-config-fetcher-39397ac5.js → form-config-fetcher-90126e4c.js} +38 -1
- package/dist/cjs/index-f9e81701.js +8 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-a9bfeb22.js → pesquisa-fetcher-f3454c23.js} +179 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +133 -0
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_4.cjs.entry.js → snk-actions-button_5.cjs.entry.js} +99 -9
- package/dist/cjs/snk-application.cjs.entry.js +144 -21
- package/dist/cjs/snk-attach.cjs.entry.js +13 -9
- package/dist/cjs/snk-config-options_3.cjs.entry.js +4 -4
- package/dist/cjs/snk-crud.cjs.entry.js +8 -7
- package/dist/cjs/snk-data-exporter.cjs.entry.js +29 -18
- package/dist/cjs/{snk-data-unit-3d9b6ed4.js → snk-data-unit-72ef8777.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +27 -11
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-grid.cjs.entry.js +9 -8
- package/dist/cjs/{snk-guides-viewer-2139481c.js → snk-guides-viewer-ea5d0907.js} +5 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +105 -31
- package/dist/cjs/snk-simple-crud.cjs.entry.js +27 -29
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/snk-actions-button/actions/index.js +4 -4
- package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +4 -3
- package/dist/collection/components/snk-application/snk-application.css +34 -0
- package/dist/collection/components/snk-application/snk-application.js +197 -14
- package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +8 -4
- package/dist/collection/components/snk-crud/snk-crud.js +39 -20
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +11 -5
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +11 -4
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -3
- package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +3 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +40 -8
- package/dist/collection/components/snk-grid/snk-grid.js +39 -20
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css +10 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +190 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css +25 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +179 -0
- package/dist/collection/components/snk-pesquisa/pesquisaHelper.js +89 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +24 -5
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +168 -32
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +56 -41
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +22 -0
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +181 -0
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +41 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +92 -3
- package/dist/components/ContinuousInsertUtils.js +2 -3
- package/dist/components/DataFetcher.js +188 -56
- package/dist/components/ISave.js +346 -1
- package/dist/components/dataunit-fetcher.js +1 -1
- package/dist/components/form-config-fetcher.js +37 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/pesquisa-grid.d.ts +11 -0
- package/dist/components/pesquisa-grid.js +6 -0
- package/dist/components/pesquisa-grid2.js +86 -0
- package/dist/components/pesquisa-tree.d.ts +11 -0
- package/dist/components/pesquisa-tree.js +6 -0
- package/dist/components/pesquisa-tree2.js +82 -0
- package/dist/components/snk-actions-button2.js +4 -5
- package/dist/components/snk-application2.js +159 -20
- package/dist/components/snk-attach2.js +20 -35
- package/dist/components/snk-crud.js +66 -59
- package/dist/components/snk-data-exporter2.js +25 -15
- package/dist/components/snk-detail-view2.js +84 -94
- package/dist/components/snk-filter-bar2.js +23 -8
- package/dist/components/snk-filter-modal.js +3 -1
- package/dist/components/snk-grid2.js +5 -4
- package/dist/components/snk-pesquisa2.js +118 -33
- package/dist/components/snk-simple-crud2.js +35 -56
- package/dist/components/snk-simple-form-config.d.ts +11 -0
- package/dist/components/snk-simple-form-config.js +6 -0
- package/dist/components/snk-simple-form-config2.js +120 -0
- package/dist/components/teste-pesquisa.js +13 -1
- package/dist/esm/{ConfigStorage-6514d66e.js → ConfigStorage-373bb440.js} +2 -2
- package/dist/esm/{ContinuousInsertUtils-b62906f9.js → ContinuousInsertUtils-25e7bd9a.js} +5 -5
- package/dist/esm/{DataFetcher-5034df59.js → DataFetcher-5221b992.js} +188 -56
- package/dist/esm/{SnkFormConfigManager-b409c745.js → SnkFormConfigManager-b65e6db0.js} +2 -2
- package/dist/esm/{auth-fetcher-ca5d3a49.js → auth-fetcher-e32fe8a4.js} +1 -1
- package/dist/esm/{dataunit-fetcher-56cb648b.js → dataunit-fetcher-8dd93d8b.js} +2 -2
- package/dist/esm/{form-config-fetcher-a7d3e277.js → form-config-fetcher-126e2471.js} +38 -1
- package/dist/esm/index-a7d3d3f1.js +8 -4
- package/dist/esm/loader.js +1 -1
- package/dist/{components/pesquisa-fetcher.js → esm/pesquisa-fetcher-0af41f09.js} +180 -3
- package/dist/esm/pesquisa-grid_2.entry.js +128 -0
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_4.entry.js → snk-actions-button_5.entry.js} +99 -10
- package/dist/esm/snk-application.entry.js +146 -23
- package/dist/esm/snk-attach.entry.js +13 -9
- package/dist/esm/snk-config-options_3.entry.js +4 -4
- package/dist/esm/snk-crud.entry.js +8 -7
- package/dist/esm/snk-data-exporter.entry.js +29 -18
- package/dist/esm/{snk-data-unit-9fa7d2b9.js → snk-data-unit-11a49fc3.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +7 -7
- package/dist/esm/snk-filter-bar_4.entry.js +28 -12
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-grid.entry.js +9 -8
- package/dist/esm/{snk-guides-viewer-b7ed39eb.js → snk-guides-viewer-830f5fb9.js} +5 -5
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +105 -31
- package/dist/esm/snk-simple-crud.entry.js +27 -29
- package/dist/sankhyablocks/{p-0e206e62.js → p-05b6ff91.js} +1 -1
- package/dist/sankhyablocks/p-09067bee.entry.js +1 -0
- package/dist/sankhyablocks/p-0cda2226.entry.js +11 -0
- package/dist/sankhyablocks/p-1435701f.js +26 -0
- package/dist/sankhyablocks/{p-e97be1c8.js → p-171b7623.js} +1 -1
- package/dist/sankhyablocks/{p-9ffd9fc7.js → p-19dc71e9.js} +1 -1
- package/dist/sankhyablocks/{p-0d2a2e9e.entry.js → p-1a91d1f3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-aa003d4e.entry.js → p-1cf39cfd.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bb8ef149.entry.js → p-254c59d2.entry.js} +1 -1
- package/dist/sankhyablocks/p-422eb699.entry.js +1 -0
- package/dist/sankhyablocks/{p-a2c790ac.entry.js → p-469384a2.entry.js} +1 -1
- package/dist/sankhyablocks/p-54f5354a.entry.js +1 -0
- package/dist/sankhyablocks/{p-342eeb3b.js → p-60e4db34.js} +1 -1
- package/dist/sankhyablocks/p-618a29ed.entry.js +1 -0
- package/dist/sankhyablocks/p-798386c7.js +6 -0
- package/dist/sankhyablocks/{p-fca0e5cc.entry.js → p-82ee6dc3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e4391e16.js → p-8a1ee5b5.js} +1 -1
- package/dist/sankhyablocks/p-8bd86610.entry.js +1 -0
- package/dist/sankhyablocks/p-b50a0753.entry.js +1 -0
- package/dist/sankhyablocks/p-d62228fb.js +1 -0
- package/dist/sankhyablocks/p-d92d4f91.entry.js +1 -0
- package/dist/sankhyablocks/{p-47d24ac8.js → p-ddefbbc7.js} +1 -1
- package/dist/sankhyablocks/p-e5430b29.entry.js +1 -0
- package/dist/sankhyablocks/p-f0b9303b.js +1 -0
- package/dist/sankhyablocks/p-f258690a.entry.js +1 -0
- package/dist/sankhyablocks/{p-ec43fcc8.entry.js → p-f975370f.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +22 -4
- package/dist/types/components/snk-crud/snk-crud.d.ts +8 -4
- package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +6 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +8 -4
- package/dist/types/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.d.ts +38 -0
- package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +29 -0
- package/dist/types/components/snk-pesquisa/pesquisaHelper.d.ts +19 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +35 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -4
- package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +34 -0
- package/dist/types/components.d.ts +244 -23
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +8 -2
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +10 -1
- package/package.json +1 -1
- package/react/components.d.ts +3 -0
- package/react/components.js +3 -0
- package/react/components.js.map +1 -1
- package/dist/esm/pesquisa-fetcher-6bc2e41a.js +0 -169
- package/dist/sankhyablocks/p-00278e07.js +0 -1
- package/dist/sankhyablocks/p-0387d9d7.entry.js +0 -1
- package/dist/sankhyablocks/p-126c58ea.js +0 -26
- package/dist/sankhyablocks/p-1d3ce0d9.entry.js +0 -1
- package/dist/sankhyablocks/p-341465ce.js +0 -6
- package/dist/sankhyablocks/p-3728d2aa.entry.js +0 -11
- package/dist/sankhyablocks/p-4138da61.entry.js +0 -1
- package/dist/sankhyablocks/p-5d9788b3.entry.js +0 -1
- package/dist/sankhyablocks/p-7075b789.entry.js +0 -1
- package/dist/sankhyablocks/p-aaf94476.js +0 -1
- package/dist/sankhyablocks/p-af7f7b3e.entry.js +0 -1
- package/dist/sankhyablocks/p-d1791da2.entry.js +0 -1
- package/dist/sankhyablocks/p-eb7c9cf4.entry.js +0 -1
|
@@ -7,15 +7,15 @@ const core = require('@sankhyalabs/core');
|
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const index = require('./index-1dfc7a6e.js');
|
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
|
10
|
-
const DataFetcher = require('./DataFetcher-
|
|
11
|
-
const snkDataUnit = require('./snk-data-unit-
|
|
12
|
-
require('./pesquisa-fetcher-
|
|
10
|
+
const DataFetcher = require('./DataFetcher-65879b2c.js');
|
|
11
|
+
const snkDataUnit = require('./snk-data-unit-72ef8777.js');
|
|
12
|
+
require('./pesquisa-fetcher-f3454c23.js');
|
|
13
13
|
require('./ISave-e91b70a7.js');
|
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
16
|
-
require('./dataunit-fetcher-
|
|
16
|
+
require('./dataunit-fetcher-8ea97d88.js');
|
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
|
-
require('./form-config-fetcher-
|
|
18
|
+
require('./form-config-fetcher-90126e4c.js');
|
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
|
20
20
|
require('./SnkMessageBuilder-bae64d0d.js');
|
|
21
21
|
require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
@@ -254,7 +254,7 @@ function getFormatResponse(result) {
|
|
|
254
254
|
return core.ObjectUtils.stringToObject(response);
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
const DOC_MAX_WIDTH =
|
|
257
|
+
const DOC_MAX_WIDTH = 760;
|
|
258
258
|
function getVisibleColumns(columns) {
|
|
259
259
|
const visibleColumns = [];
|
|
260
260
|
let totalWidth = 0;
|
|
@@ -294,12 +294,19 @@ class ServerSideExporterStrategy {
|
|
|
294
294
|
const visibleColumns = getVisibleColumns(columns);
|
|
295
295
|
return visibleColumns;
|
|
296
296
|
}
|
|
297
|
+
async getColumns(resolveProps) {
|
|
298
|
+
var _a;
|
|
299
|
+
if ((_a = getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) === null || _a === void 0 ? void 0 : _a.includes("PDF")) {
|
|
300
|
+
return await this.getParsedColumns();
|
|
301
|
+
}
|
|
302
|
+
return await this._provider.getColumnsMetadata();
|
|
303
|
+
}
|
|
297
304
|
async getParams(resolveProps) {
|
|
298
|
-
var _a, _b, _c, _d, _e, _f
|
|
305
|
+
var _a, _b, _c, _d, _e, _f;
|
|
299
306
|
const filters = (_b = (_a = this._provider).getFilters) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
300
|
-
const columns =
|
|
301
|
-
const sort = (
|
|
302
|
-
const resourceURI = (
|
|
307
|
+
const columns = await this.getColumns(resolveProps);
|
|
308
|
+
const sort = (_d = (_c = this._provider).getOrders) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
309
|
+
const resourceURI = (_f = (_e = this._provider).getResourceURI) === null || _f === void 0 ? void 0 : _f.call(_e);
|
|
303
310
|
const selectedIDs = this._provider.getSelectedIDs();
|
|
304
311
|
const option = resolveProps.exportOption;
|
|
305
312
|
const currentPageOptions = [
|
|
@@ -353,11 +360,17 @@ class ClientSideExporterStrategy {
|
|
|
353
360
|
const visibleColumns = getVisibleColumns(columns);
|
|
354
361
|
return visibleColumns;
|
|
355
362
|
}
|
|
356
|
-
async
|
|
363
|
+
async getColumns(resolveProps) {
|
|
357
364
|
var _a;
|
|
365
|
+
if ((_a = getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) === null || _a === void 0 ? void 0 : _a.includes("PDF")) {
|
|
366
|
+
return await this.getParsedColumns();
|
|
367
|
+
}
|
|
368
|
+
return await this._provider.getColumnsMetadata();
|
|
369
|
+
}
|
|
370
|
+
async executeExport(resolveProps) {
|
|
358
371
|
const { methodName, gridTitle } = resolveProps;
|
|
359
372
|
const records = await this._provider.getRecords();
|
|
360
|
-
const columns =
|
|
373
|
+
const columns = await this.getColumns(resolveProps);
|
|
361
374
|
const [serviceName, processor] = this.getExecutor(methodName);
|
|
362
375
|
const payload = {
|
|
363
376
|
serviceName,
|
|
@@ -394,10 +407,10 @@ class ClientSideExporterStrategy {
|
|
|
394
407
|
"GridXLSBuilderSP.buildXLSFromJson",
|
|
395
408
|
responseBody => ({
|
|
396
409
|
fileSessionKey: responseBody.chaveXLS.valor,
|
|
397
|
-
canPrint:
|
|
398
|
-
canExport:
|
|
410
|
+
canPrint: true,
|
|
411
|
+
canExport: true,
|
|
412
|
+
canSendEmail: true,
|
|
399
413
|
useAppPrint: false,
|
|
400
|
-
canSendEmail: false
|
|
401
414
|
})
|
|
402
415
|
];
|
|
403
416
|
}
|
|
@@ -557,7 +570,6 @@ const SnkDataExporter = class {
|
|
|
557
570
|
var _a, _b, _c;
|
|
558
571
|
const optionKey = this.getOptionKey(option);
|
|
559
572
|
const fileType = (_a = index.DataExporterType[optionKey]) !== null && _a !== void 0 ? _a : index.DataExporterType.EXPORT_TO_PDF;
|
|
560
|
-
const isDownload = index.DataExporterType[optionKey] === index.DataExporterType.EXPORT_TO_XLS;
|
|
561
573
|
const params = {
|
|
562
574
|
methodName: index.DataExporterOption[`EXPORT_TO_${fileType}`],
|
|
563
575
|
fileName: this._appLabel,
|
|
@@ -568,8 +580,7 @@ const SnkDataExporter = class {
|
|
|
568
580
|
};
|
|
569
581
|
await this.resolveExporter(params, (response) => {
|
|
570
582
|
if (response.canExport || fileType === index.DataExporterType.EXPORT_TO_PDF) {
|
|
571
|
-
fileViewer(Object.assign(Object.assign({}, response), { fileType
|
|
572
|
-
isDownload }));
|
|
583
|
+
fileViewer(Object.assign(Object.assign({}, response), { fileType }));
|
|
573
584
|
}
|
|
574
585
|
else {
|
|
575
586
|
utils.ApplicationUtils.error(this.getMessage("snkDataExporter.title.permission"), this.getMessage("snkDataExporter.message.exportPermission"));
|
|
@@ -4,7 +4,7 @@ const index = require('./index-f9e81701.js');
|
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
5
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
6
6
|
const SnkMessageBuilder = require('./SnkMessageBuilder-bae64d0d.js');
|
|
7
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
7
|
+
const dataunitFetcher = require('./dataunit-fetcher-8ea97d88.js');
|
|
8
8
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
9
9
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
10
10
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const snkDataUnit = require('./snk-data-unit-
|
|
5
|
+
const snkDataUnit = require('./snk-data-unit-72ef8777.js');
|
|
6
6
|
require('./index-f9e81701.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
8
|
require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
9
|
require('./SnkMessageBuilder-bae64d0d.js');
|
|
10
|
-
require('./dataunit-fetcher-
|
|
11
|
-
require('./DataFetcher-
|
|
10
|
+
require('./dataunit-fetcher-8ea97d88.js');
|
|
11
|
+
require('./DataFetcher-65879b2c.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
@@ -4,22 +4,22 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-ae3185b2.js');
|
|
8
8
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
9
|
-
require('./DataFetcher-
|
|
10
|
-
require('./pesquisa-fetcher-
|
|
9
|
+
require('./DataFetcher-65879b2c.js');
|
|
10
|
+
require('./pesquisa-fetcher-f3454c23.js');
|
|
11
11
|
const index$1 = require('./index-1dfc7a6e.js');
|
|
12
12
|
require('./ISave-e91b70a7.js');
|
|
13
13
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
|
-
require('./dataunit-fetcher-
|
|
15
|
+
require('./dataunit-fetcher-8ea97d88.js');
|
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
|
-
require('./form-config-fetcher-
|
|
17
|
+
require('./form-config-fetcher-90126e4c.js');
|
|
18
18
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
19
19
|
const constants = require('./constants-35ddd366.js');
|
|
20
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
|
20
|
+
const snkGuidesViewer = require('./snk-guides-viewer-ea5d0907.js');
|
|
21
21
|
const SnkMessageBuilder = require('./SnkMessageBuilder-bae64d0d.js');
|
|
22
|
-
require('./ConfigStorage-
|
|
22
|
+
require('./ConfigStorage-d024aec8.js');
|
|
23
23
|
require('./PrintUtils-bcaeb82f.js');
|
|
24
24
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
25
25
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index$1 = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-d024aec8.js');
|
|
9
9
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
10
10
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
11
11
|
const index = require('./index-c5771aba.js');
|
|
@@ -14,8 +14,8 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
|
14
14
|
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-0184ffbb.js');
|
|
15
15
|
const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
|
|
16
16
|
const filterType_enum = require('./filter-type.enum-b14ce507.js');
|
|
17
|
-
require('./form-config-fetcher-
|
|
18
|
-
require('./DataFetcher-
|
|
17
|
+
require('./form-config-fetcher-90126e4c.js');
|
|
18
|
+
require('./DataFetcher-65879b2c.js');
|
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
|
20
20
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
21
21
|
|
|
@@ -266,6 +266,7 @@ const SnkFilterBar = class {
|
|
|
266
266
|
this._firstLoad = true;
|
|
267
267
|
this._pendingVariables = false;
|
|
268
268
|
this._customfiltersToBeUpdated = [];
|
|
269
|
+
this._resolveLoading = undefined;
|
|
269
270
|
this._calculateSortIndex = (item) => {
|
|
270
271
|
if (!item.visible)
|
|
271
272
|
return 0;
|
|
@@ -279,6 +280,7 @@ const SnkFilterBar = class {
|
|
|
279
280
|
this._filtersComparator = (a, b) => {
|
|
280
281
|
return this._calculateSortIndex(b) - this._calculateSortIndex(a);
|
|
281
282
|
};
|
|
283
|
+
this.enableLockManagerLoadingComp = false;
|
|
282
284
|
this.customFilterBarConfig = undefined;
|
|
283
285
|
this.dataUnit = undefined;
|
|
284
286
|
this.title = undefined;
|
|
@@ -699,14 +701,26 @@ const SnkFilterBar = class {
|
|
|
699
701
|
this.personalizedFilterId = undefined;
|
|
700
702
|
this.showPersonalizedFilter = false;
|
|
701
703
|
}
|
|
702
|
-
componentWillLoad() {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
this.
|
|
706
|
-
this.
|
|
707
|
-
this.
|
|
704
|
+
async componentWillLoad() {
|
|
705
|
+
var _a;
|
|
706
|
+
try {
|
|
707
|
+
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
708
|
+
await this.attachDataUnit();
|
|
709
|
+
if (this._application) {
|
|
710
|
+
if (this._application.enableLockManagerLoadingApp && this.enableLockManagerLoadingComp) {
|
|
711
|
+
const appLoadLockerID = core.LockManager.addLockManagerCtxId(this._element);
|
|
712
|
+
this._resolveLoading = core.LockManager.lock(appLoadLockerID, core.LockManagerOperation.APP_LOADING);
|
|
713
|
+
}
|
|
714
|
+
await Promise.all([
|
|
715
|
+
this.loadPermitions(),
|
|
716
|
+
this.addFilterBarLegacyConfigName(),
|
|
717
|
+
this.loadConfigFromStorage(),
|
|
718
|
+
]);
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
finally {
|
|
722
|
+
(_a = this._resolveLoading) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
708
723
|
}
|
|
709
|
-
this.attachDataUnit();
|
|
710
724
|
}
|
|
711
725
|
componentDidRender() {
|
|
712
726
|
this.processPendingFilter();
|
|
@@ -1319,7 +1333,9 @@ const SnkFilterModal = class {
|
|
|
1319
1333
|
this.filters = core.ObjectUtils.copy(filterListCopy);
|
|
1320
1334
|
return;
|
|
1321
1335
|
}
|
|
1322
|
-
this.filters.find(filter => filter.id === filterItem.id)
|
|
1336
|
+
const filter = this.filters.find(filter => filter.id === filterItem.id);
|
|
1337
|
+
filter.value = undefined;
|
|
1338
|
+
this.filters = core.ObjectUtils.copy(this.filters);
|
|
1323
1339
|
}
|
|
1324
1340
|
uncheckFilterValues(valueList) {
|
|
1325
1341
|
valueList.forEach(value => {
|
|
@@ -6,10 +6,10 @@ const index = require('./index-f9e81701.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
8
8
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
|
9
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
9
|
+
const ConfigStorage = require('./ConfigStorage-d024aec8.js');
|
|
10
10
|
const filterType_enum = require('./filter-type.enum-b14ce507.js');
|
|
11
|
-
require('./form-config-fetcher-
|
|
12
|
-
require('./DataFetcher-
|
|
11
|
+
require('./form-config-fetcher-90126e4c.js');
|
|
12
|
+
require('./DataFetcher-65879b2c.js');
|
|
13
13
|
require('./PrintUtils-bcaeb82f.js');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
15
|
|
|
@@ -5,20 +5,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-d024aec8.js');
|
|
9
9
|
const index$1 = require('./index-1dfc7a6e.js');
|
|
10
10
|
const fieldSearch = require('./field-search-68e34bf4.js');
|
|
11
11
|
const index$2 = require('./index-102ba62d.js');
|
|
12
|
-
const ContinuousInsertUtils = require('./ContinuousInsertUtils-
|
|
12
|
+
const ContinuousInsertUtils = require('./ContinuousInsertUtils-54d44192.js');
|
|
13
13
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
14
|
-
require('./DataFetcher-
|
|
15
|
-
require('./pesquisa-fetcher-
|
|
14
|
+
require('./DataFetcher-65879b2c.js');
|
|
15
|
+
require('./pesquisa-fetcher-f3454c23.js');
|
|
16
16
|
require('./ISave-e91b70a7.js');
|
|
17
17
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
18
18
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
19
|
-
require('./dataunit-fetcher-
|
|
19
|
+
require('./dataunit-fetcher-8ea97d88.js');
|
|
20
20
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
21
|
-
require('./form-config-fetcher-
|
|
21
|
+
require('./form-config-fetcher-90126e4c.js');
|
|
22
22
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
24
24
|
require('./PrintUtils-bcaeb82f.js');
|
|
@@ -123,6 +123,8 @@ const SnkGrid = class {
|
|
|
123
123
|
this._showSnkFilterBar = true;
|
|
124
124
|
this._enableContinuousInsert = false;
|
|
125
125
|
this.columnFilterDataSource = new ContinuousInsertUtils.SnkMultiSelectionListDataSource();
|
|
126
|
+
this.enableLockManagerLoadingComp = false;
|
|
127
|
+
this.enableLockManagerTaskbarClick = false;
|
|
126
128
|
this.configName = undefined;
|
|
127
129
|
this.filterBarTitle = undefined;
|
|
128
130
|
this.resourceID = undefined;
|
|
@@ -146,7 +148,6 @@ const SnkGrid = class {
|
|
|
146
148
|
this.autoLoad = undefined;
|
|
147
149
|
this.autoFocus = true;
|
|
148
150
|
this.enableGridInsert = false;
|
|
149
|
-
this.enableLockManger = false;
|
|
150
151
|
this.outlineMode = false;
|
|
151
152
|
}
|
|
152
153
|
/**
|
|
@@ -536,7 +537,7 @@ const SnkGrid = class {
|
|
|
536
537
|
return undefined;
|
|
537
538
|
}
|
|
538
539
|
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
|
|
539
|
-
index.h(index.Fragment, null, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert,
|
|
540
|
+
index.h(index.Fragment, null, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, index.h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
|
540
541
|
}
|
|
541
542
|
get _element() { return index.getElement(this); }
|
|
542
543
|
static get watchers() { return {
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index-f9e81701.js');
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
5
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-ae3185b2.js');
|
|
6
6
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
7
7
|
const fieldSearch = require('./field-search-68e34bf4.js');
|
|
8
8
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
|
10
|
-
require('./DataFetcher-
|
|
11
|
-
require('./pesquisa-fetcher-
|
|
10
|
+
require('./DataFetcher-65879b2c.js');
|
|
11
|
+
require('./pesquisa-fetcher-f3454c23.js');
|
|
12
12
|
const index$1 = require('./index-1dfc7a6e.js');
|
|
13
13
|
require('./ISave-e91b70a7.js');
|
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
16
|
-
require('./dataunit-fetcher-
|
|
16
|
+
require('./dataunit-fetcher-8ea97d88.js');
|
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
|
-
require('./form-config-fetcher-
|
|
18
|
+
require('./form-config-fetcher-90126e4c.js');
|
|
19
19
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
20
20
|
|
|
21
21
|
const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-small:var(--space--2xs, 8px);--snk-guides-viewer__header--min-height:68px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-small);margin-left:calc(var(--snk-guides-viewer--space-large) * -1);margin-right:calc(var(--snk-guides-viewer--space-large) * -1);margin-bottom:var(--snk-guides-viewer--space-small)}.snk-guides-viewer__header-breadcrumb.sc-snk-guides-viewer{width:25%;display:flex}.snk-guides-viewer__header-taskbar.sc-snk-guides-viewer{width:75%}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-small));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-small))}.snk-guides-viewer__guide-navigator[open].sc-snk-guides-viewer{width:var(--snk-guides-viewer__guide-navigator--width);max-width:var(--snk-guides-viewer__guide-navigator--width);min-width:var(--snk-guides-viewer__guide-navigator--width)}.snk-guides-viewer__detail-content.sc-snk-guides-viewer{min-height:100%;align-items:flex-start;align-content:flex-start}";
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
|
5
|
+
const snkGuidesViewer = require('./snk-guides-viewer-ea5d0907.js');
|
|
6
6
|
require('./index-f9e81701.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
|
-
require('./SnkFormConfigManager-
|
|
9
|
-
require('./ConfigStorage-
|
|
10
|
-
require('./form-config-fetcher-
|
|
11
|
-
require('./DataFetcher-
|
|
8
|
+
require('./SnkFormConfigManager-ae3185b2.js');
|
|
9
|
+
require('./ConfigStorage-d024aec8.js');
|
|
10
|
+
require('./form-config-fetcher-90126e4c.js');
|
|
11
|
+
require('./DataFetcher-65879b2c.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
@@ -18,10 +18,10 @@ require('./field-search-68e34bf4.js');
|
|
|
18
18
|
require('./taskbar-elements-9ad1f9c0.js');
|
|
19
19
|
require('./index-1dfc7a6e.js');
|
|
20
20
|
require('./index-102ba62d.js');
|
|
21
|
-
require('./pesquisa-fetcher-
|
|
21
|
+
require('./pesquisa-fetcher-f3454c23.js');
|
|
22
22
|
require('./ISave-e91b70a7.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
24
|
-
require('./dataunit-fetcher-
|
|
24
|
+
require('./dataunit-fetcher-8ea97d88.js');
|
|
25
25
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
26
26
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
27
27
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-0184ffbb.js');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-d024aec8.js');
|
|
9
9
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
10
10
|
const index$1 = require('./index-c5771aba.js');
|
|
11
11
|
const index$2 = require('./index-102ba62d.js');
|
|
12
12
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
13
|
-
require('./form-config-fetcher-
|
|
14
|
-
require('./DataFetcher-
|
|
13
|
+
require('./form-config-fetcher-90126e4c.js');
|
|
14
|
+
require('./DataFetcher-65879b2c.js');
|
|
15
15
|
require('./PrintUtils-bcaeb82f.js');
|
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
17
17
|
|
|
@@ -4,8 +4,22 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-f3454c23.js');
|
|
8
|
+
require('./DataFetcher-65879b2c.js');
|
|
9
|
+
require('./index-1dfc7a6e.js');
|
|
10
|
+
require('./ISave-e91b70a7.js');
|
|
11
|
+
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
12
|
+
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
13
|
+
require('./dataunit-fetcher-8ea97d88.js');
|
|
14
|
+
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
15
|
+
require('./form-config-fetcher-90126e4c.js');
|
|
16
|
+
const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
|
|
17
|
+
require('./PrintUtils-bcaeb82f.js');
|
|
18
|
+
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
19
|
+
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
20
|
+
require('./ResourceIDUtils-5ff86aa7.js');
|
|
7
21
|
|
|
8
|
-
const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--medium, 12px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:
|
|
22
|
+
const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--color-secondary:var(--text--secondary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--medium, 12px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records-label.sc-snk-pesquisa{display:flex;flex-direction:row;justify-content:space-between;font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__records.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color)}.snk-pesquisa__records-limit.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color-secondary)}.snk-pesquisa__records-limit.hidden.sc-snk-pesquisa,.snk-pesquisa__records.hidden.sc-snk-pesquisa{visibility:hidden}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}";
|
|
9
23
|
|
|
10
24
|
const SnkPesquisa = class {
|
|
11
25
|
constructor(hostRef) {
|
|
@@ -19,11 +33,18 @@ const SnkPesquisa = class {
|
|
|
19
33
|
this._changeDeboucingTimeout = null;
|
|
20
34
|
this._limitCharsToSearch = 3;
|
|
21
35
|
this._deboucingTime = 450;
|
|
36
|
+
this._gridDataSource = [];
|
|
37
|
+
this.pesquisaFetcher = new pesquisaFetcher.PesquisaFetcher();
|
|
22
38
|
this._itemList = undefined;
|
|
23
39
|
this._startLoading = false;
|
|
40
|
+
this._presentationMode = "list";
|
|
24
41
|
this.searchLoader = undefined;
|
|
42
|
+
this.treeLoader = undefined;
|
|
25
43
|
this.selectItem = undefined;
|
|
44
|
+
this.entityName = undefined;
|
|
26
45
|
this.argument = undefined;
|
|
46
|
+
this.isHierarchyEntity = false;
|
|
47
|
+
this.allowsNonAnalytic = false;
|
|
27
48
|
}
|
|
28
49
|
observeArgument() {
|
|
29
50
|
if (this._textInput) {
|
|
@@ -61,36 +82,42 @@ const SnkPesquisa = class {
|
|
|
61
82
|
this._startLoading = true;
|
|
62
83
|
this.searchLoader(argument)
|
|
63
84
|
.then((resp) => {
|
|
85
|
+
if (!resp)
|
|
86
|
+
return;
|
|
87
|
+
this.processSearchResponse(resp);
|
|
88
|
+
}).finally(() => {
|
|
64
89
|
this._startLoading = false;
|
|
65
|
-
if (resp) {
|
|
66
|
-
resp = core.ObjectUtils.stringToObject(resp.json.$);
|
|
67
|
-
let descriptionField = resp.descriptionField;
|
|
68
|
-
let pkField = resp.pkField;
|
|
69
|
-
if (pkField) {
|
|
70
|
-
let newItemList = [];
|
|
71
|
-
resp.data.forEach((item) => {
|
|
72
|
-
var _a;
|
|
73
|
-
let fieldsMetadata = this.filterFieldsMetadata(resp, item);
|
|
74
|
-
let fields = this.buildFirstFields(item['__matchFields'], fieldsMetadata);
|
|
75
|
-
let exibitionItem = {
|
|
76
|
-
key: this.highlightValue(item['__matchFields'], (_a = item[pkField]) === null || _a === void 0 ? void 0 : _a.toString(), fields, true),
|
|
77
|
-
title: descriptionField ? this.highlightValue(item['__matchFields'], item[descriptionField], fields, true) : "",
|
|
78
|
-
details: this.buildDetails(fields, item)
|
|
79
|
-
};
|
|
80
|
-
newItemList.push(exibitionItem);
|
|
81
|
-
});
|
|
82
|
-
this._itemList = newItemList;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}).catch((error) => {
|
|
86
|
-
this._startLoading = false;
|
|
87
|
-
this._itemList = [];
|
|
88
|
-
console.warn(error);
|
|
89
90
|
});
|
|
90
91
|
}
|
|
91
92
|
}
|
|
93
|
+
processSearchResponse(resp) {
|
|
94
|
+
resp = core.ObjectUtils.stringToObject(resp.json.$);
|
|
95
|
+
let descriptionField = resp.descriptionField;
|
|
96
|
+
let pkField = resp.pkField;
|
|
97
|
+
if (!pkField)
|
|
98
|
+
return;
|
|
99
|
+
this._gridMetadata = pesquisaFetcher.buildGridMetadata(resp);
|
|
100
|
+
this._gridDataSource = [...resp.data];
|
|
101
|
+
this._pkField = pkField;
|
|
102
|
+
this._descriptionField = descriptionField;
|
|
103
|
+
this._itemList = this.buildCardItemList(resp, pkField, descriptionField);
|
|
104
|
+
}
|
|
105
|
+
buildCardItemList(resp, pkField, descriptionField) {
|
|
106
|
+
var _a;
|
|
107
|
+
let newItemList = (_a = resp.data) === null || _a === void 0 ? void 0 : _a.map((item) => {
|
|
108
|
+
var _a;
|
|
109
|
+
let fieldsMetadata = this.filterFieldsMetadata(resp, item);
|
|
110
|
+
let fields = this.buildFirstFields(item['__matchFields'], fieldsMetadata);
|
|
111
|
+
return {
|
|
112
|
+
key: this.highlightValue(item['__matchFields'], (_a = item[pkField]) === null || _a === void 0 ? void 0 : _a.toString(), fields, true),
|
|
113
|
+
title: descriptionField ? this.highlightValue(item['__matchFields'], item[descriptionField], fields, true) : '',
|
|
114
|
+
details: this.buildDetails(fields, item),
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
return newItemList;
|
|
118
|
+
}
|
|
92
119
|
filterFieldsMetadata(resp, item) {
|
|
93
|
-
|
|
120
|
+
return resp.fieldsMetadata.filter((field) => {
|
|
94
121
|
let accept = !core.StringUtils.isEmpty(item[field.fieldName]) &&
|
|
95
122
|
field.visible !== false &&
|
|
96
123
|
field.type !== 'B' &&
|
|
@@ -107,7 +134,6 @@ const SnkPesquisa = class {
|
|
|
107
134
|
}
|
|
108
135
|
return accept;
|
|
109
136
|
});
|
|
110
|
-
return fieldsMetadata;
|
|
111
137
|
}
|
|
112
138
|
removeAtIndex(array, index) {
|
|
113
139
|
if (index >= 0 && index < array.length) {
|
|
@@ -265,6 +291,7 @@ const SnkPesquisa = class {
|
|
|
265
291
|
this.selectItem(option);
|
|
266
292
|
}
|
|
267
293
|
onChangeValue(event) {
|
|
294
|
+
var _a;
|
|
268
295
|
this.clearDeboucingTimeout();
|
|
269
296
|
if (this._startLoading) {
|
|
270
297
|
this._changeDeboucingTimeout = setTimeout(() => {
|
|
@@ -273,6 +300,10 @@ const SnkPesquisa = class {
|
|
|
273
300
|
return;
|
|
274
301
|
}
|
|
275
302
|
this.argument = (event.detail || "").trim();
|
|
303
|
+
if (this.isHierarchyEntity && this._presentationMode === 'list') {
|
|
304
|
+
(_a = this._pesquisaTree) === null || _a === void 0 ? void 0 : _a.applyFilter();
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
276
307
|
const argumentNumber = this.getArgumentNumber();
|
|
277
308
|
if (this.argument && (!isNaN(argumentNumber) || this.argument.length >= this._limitCharsToSearch)) {
|
|
278
309
|
this._changeDeboucingTimeout = setTimeout(() => {
|
|
@@ -303,16 +334,59 @@ const SnkPesquisa = class {
|
|
|
303
334
|
: 'Nenhum registro encontrado'
|
|
304
335
|
: 'Os resultados de sua pesquisa aparecerão aqui...';
|
|
305
336
|
}
|
|
306
|
-
|
|
337
|
+
async componentWillLoad() {
|
|
338
|
+
const mode = await this.pesquisaFetcher.loadPresentationConfig(this.entityName);
|
|
339
|
+
this._presentationMode = mode === 'list' ? 'list' : 'table';
|
|
340
|
+
}
|
|
341
|
+
async componentDidLoad() {
|
|
307
342
|
core.ElementIDUtils.addIDInfo(this._element);
|
|
308
343
|
}
|
|
344
|
+
async onClickList() {
|
|
345
|
+
this._presentationMode = this._presentationMode === 'list' ? 'table' : 'list';
|
|
346
|
+
await this.pesquisaFetcher.savePresentationConfig(this.entityName, this._presentationMode);
|
|
347
|
+
}
|
|
348
|
+
enableListButton() {
|
|
349
|
+
var _a;
|
|
350
|
+
return ((_a = this._itemList) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
351
|
+
}
|
|
352
|
+
//Os limites de exibição são diferentes para lista e grade
|
|
353
|
+
hideLimitMessage() {
|
|
354
|
+
if (!this._itemList)
|
|
355
|
+
return true;
|
|
356
|
+
if (this._presentationMode === "list") {
|
|
357
|
+
if (this.isHierarchyEntity)
|
|
358
|
+
return true;
|
|
359
|
+
return this._itemList.length <= 100;
|
|
360
|
+
}
|
|
361
|
+
return this._itemList.length <= 150;
|
|
362
|
+
}
|
|
363
|
+
hideRecordsMessage() {
|
|
364
|
+
return (this._presentationMode === "list" && this.isHierarchyEntity);
|
|
365
|
+
}
|
|
366
|
+
renderContent() {
|
|
367
|
+
if (!this._itemList)
|
|
368
|
+
return;
|
|
369
|
+
if (this._presentationMode === 'list') {
|
|
370
|
+
return this.isHierarchyEntity ? this.renderTree() : this.renderCards();
|
|
371
|
+
}
|
|
372
|
+
return this.renderPesquisaGrid();
|
|
373
|
+
}
|
|
374
|
+
renderTree() {
|
|
375
|
+
return index.h("ez-scroller", { direction: EzScrollDirection.EzScrollDirection.VERTICAL }, index.h("pesquisa-tree", { ref: (element) => this._pesquisaTree = element, argument: this.argument, treeLoader: this.treeLoader, allowsNonAnalytic: this.allowsNonAnalytic, onPesquisaTreeSelectItem: ({ detail }) => this.selectItem(detail) }));
|
|
376
|
+
}
|
|
377
|
+
renderCards() {
|
|
378
|
+
return (index.h("ez-scroller", { direction: EzScrollDirection.EzScrollDirection.VERTICAL }, index.h("div", { class: "snk-pesquisa__cards-container" }, this._itemList.map((item) => {
|
|
379
|
+
return (index.h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
|
|
380
|
+
}))));
|
|
381
|
+
}
|
|
382
|
+
renderPesquisaGrid() {
|
|
383
|
+
return index.h("pesquisa-grid", { metadata: this._gridMetadata, dataSource: this._gridDataSource, pkField: this._pkField, descriptionField: this._descriptionField, entityName: this.entityName, onPesquisaGridSelectItem: ({ detail }) => this.selectItem(detail) });
|
|
384
|
+
}
|
|
309
385
|
render() {
|
|
310
386
|
var _a;
|
|
311
387
|
return (index.h(index.Host, null, index.h("div", { class: "snk-pesquisa" }, index.h("div", { class: "snk-pesquisa__input" }, index.h("ez-text-input", { label: "Buscar", class: "ez-margin-right--medium", canShowError: false, ref: (ref) => this._textInput = ref, onEzChange: (event) => this.onChangeValue(event), value: this.argument, "data-element-id": "searchInput" }, index.h("ez-icon", { slot: "leftIcon", iconName: "search" }), this.argument && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)
|
|
312
388
|
? index.h("button", { slot: "rightIcon", class: "snk-pesquisa__btn", onClick: () => this.clearSearch() }, index.h("ez-icon", { iconName: "close" }))
|
|
313
|
-
: undefined), index.h("ez-button", { class: "ez-button--primary", label: "Pesquisar", onClick: () => this.onClickSearch() })
|
|
314
|
-
return (index.h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
|
|
315
|
-
})))));
|
|
389
|
+
: undefined), index.h("ez-button", { class: "ez-button--primary", label: "Pesquisar", onClick: () => this.onClickSearch() }), index.h("ez-button", { class: "ez-margin-left--medium", mode: "icon", iconName: this._presentationMode === 'list' ? 'table' : 'list', title: this._presentationMode === 'list' ? 'Modo grade' : 'Modo lista', onClick: async () => await this.onClickList(), enabled: this.enableListButton() })), index.h("div", { class: "snk-pesquisa__records-label" }, index.h("label", { class: `snk-pesquisa__records ${this.hideRecordsMessage() ? "hidden" : ""}` }, this.getMessageView()), index.h("label", { class: `snk-pesquisa__records-limit ${this.hideLimitMessage() ? "hidden" : ""}` }, "Essa pesquisa foi limitada, existem mais resultados.")), index.h("div", { class: "snk-pesquisa__content" }, this.renderContent()))));
|
|
316
390
|
}
|
|
317
391
|
get _element() { return index.getElement(this); }
|
|
318
392
|
static get watchers() { return {
|