@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-74246.2 → 0.0.0-bugfix-dev-KB-80932.1
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-9b965af9.js → ConfigStorage-d024aec8.js} +2 -2
- package/dist/cjs/{ContinuousInsertUtils-42636ac1.js → ContinuousInsertUtils-54d44192.js} +5 -5
- package/dist/cjs/{DataFetcher-e059eb72.js → DataFetcher-65879b2c.js} +188 -56
- package/dist/cjs/{SnkFormConfigManager-46e90d8d.js → SnkFormConfigManager-ae3185b2.js} +6 -8
- package/dist/cjs/{auth-fetcher-a78242d1.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-91fba2b1.js → form-config-fetcher-90126e4c.js} +1 -1
- package/dist/cjs/index-f9e81701.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-2ec4811b.js → pesquisa-fetcher-f3454c23.js} +176 -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_5.cjs.entry.js +12 -10
- package/dist/cjs/snk-application.cjs.entry.js +144 -21
- package/dist/cjs/snk-attach.cjs.entry.js +5 -5
- 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 +25 -12
- 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 +24 -10
- 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-7d85e2fb.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 +123 -31
- package/dist/cjs/snk-simple-crud.cjs.entry.js +15 -10
- package/dist/collection/collection-manifest.json +2 -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-crud/snk-crud.js +39 -20
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +8 -2
- 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/utils/ParserExport.js +1 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +40 -8
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +4 -6
- 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 +186 -32
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +44 -21
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +3 -1
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +89 -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/SnkFormConfigManager.js +4 -6
- package/dist/components/dataunit-fetcher.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -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 +0 -1
- package/dist/components/snk-crud.js +5 -4
- package/dist/components/snk-data-exporter2.js +21 -9
- package/dist/components/snk-detail-view2.js +0 -1
- package/dist/components/snk-filter-bar2.js +23 -8
- package/dist/components/snk-grid2.js +5 -4
- package/dist/components/snk-pesquisa2.js +136 -33
- package/dist/components/snk-simple-crud2.js +11 -6
- package/dist/components/snk-simple-form-config2.js +4 -3
- package/dist/components/teste-pesquisa.js +13 -1
- package/dist/esm/{ConfigStorage-ff99377a.js → ConfigStorage-373bb440.js} +2 -2
- package/dist/esm/{ContinuousInsertUtils-071e0b6a.js → ContinuousInsertUtils-25e7bd9a.js} +5 -5
- package/dist/esm/{DataFetcher-5034df59.js → DataFetcher-5221b992.js} +188 -56
- package/dist/esm/{SnkFormConfigManager-035f2975.js → SnkFormConfigManager-b65e6db0.js} +6 -8
- package/dist/esm/{auth-fetcher-0b78ca31.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-0c2620ef.js → form-config-fetcher-126e2471.js} +1 -1
- package/dist/esm/index-a7d3d3f1.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/{components/pesquisa-fetcher.js → esm/pesquisa-fetcher-0af41f09.js} +177 -3
- package/dist/esm/pesquisa-grid_2.entry.js +128 -0
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_5.entry.js +12 -10
- package/dist/esm/snk-application.entry.js +146 -23
- package/dist/esm/snk-attach.entry.js +5 -5
- 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 +25 -12
- 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 +25 -11
- 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-2fd50f6b.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 +123 -31
- package/dist/esm/snk-simple-crud.entry.js +15 -10
- package/dist/sankhyablocks/p-05b6ff91.js +1 -0
- package/dist/sankhyablocks/p-09067bee.entry.js +1 -0
- package/dist/sankhyablocks/p-0cda2226.entry.js +11 -0
- package/dist/sankhyablocks/{p-acca8a69.js → p-1435701f.js} +1 -1
- package/dist/sankhyablocks/{p-4c5fde50.js → p-171b7623.js} +1 -1
- package/dist/sankhyablocks/{p-763edad2.js → p-19dc71e9.js} +1 -1
- package/dist/sankhyablocks/{p-0d2a2e9e.entry.js → p-1a91d1f3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e9432f45.entry.js → p-1cf39cfd.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e7067256.entry.js → p-254c59d2.entry.js} +1 -1
- package/dist/sankhyablocks/p-422eb699.entry.js +1 -0
- package/dist/sankhyablocks/{p-c629c07a.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-35882caf.entry.js → p-82ee6dc3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c271fbf1.js → p-8a1ee5b5.js} +1 -1
- package/dist/sankhyablocks/p-8bd86610.entry.js +1 -0
- package/dist/sankhyablocks/p-a3803d7c.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-5136d9f0.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 +36 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +8 -1
- package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +1 -0
- package/dist/types/components.d.ts +206 -23
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +10 -1
- package/package.json +1 -1
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/esm/pesquisa-fetcher-24e5bba0.js +0 -172
- package/dist/sankhyablocks/p-00278e07.js +0 -1
- package/dist/sankhyablocks/p-262583c6.entry.js +0 -1
- package/dist/sankhyablocks/p-29643bef.entry.js +0 -1
- package/dist/sankhyablocks/p-365d8ed4.entry.js +0 -1
- package/dist/sankhyablocks/p-399e1b74.entry.js +0 -1
- package/dist/sankhyablocks/p-65650e05.entry.js +0 -1
- package/dist/sankhyablocks/p-70ed0b0f.js +0 -1
- package/dist/sankhyablocks/p-82274cb0.js +0 -1
- package/dist/sankhyablocks/p-8cf0a9fe.entry.js +0 -1
- package/dist/sankhyablocks/p-d1791da2.entry.js +0 -1
- package/dist/sankhyablocks/p-e6683406.js +0 -6
- package/dist/sankhyablocks/p-eda55eef.entry.js +0 -11
- package/dist/sankhyablocks/p-ff6c8f52.entry.js +0 -1
|
@@ -4,21 +4,21 @@ 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 DataFetcher = require('./DataFetcher-
|
|
7
|
+
const DataFetcher = require('./DataFetcher-65879b2c.js');
|
|
8
8
|
const ParamType = require('./ParamType-90b440a0.js');
|
|
9
|
-
require('./pesquisa-fetcher-
|
|
9
|
+
require('./pesquisa-fetcher-f3454c23.js');
|
|
10
10
|
require('./index-1dfc7a6e.js');
|
|
11
11
|
require('./ISave-e91b70a7.js');
|
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
|
-
require('./dataunit-fetcher-
|
|
14
|
+
require('./dataunit-fetcher-8ea97d88.js');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
16
|
+
const formConfigFetcher = require('./form-config-fetcher-90126e4c.js');
|
|
17
17
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
18
18
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
|
19
19
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
20
20
|
const CheckMode = require('@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode');
|
|
21
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
21
|
+
const ConfigStorage = require('./ConfigStorage-d024aec8.js');
|
|
22
22
|
const constants = require('./constants-35ddd366.js');
|
|
23
23
|
require('./PrintUtils-bcaeb82f.js');
|
|
24
24
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -255,9 +255,9 @@ class Actions {
|
|
|
255
255
|
return resultParams;
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
|
-
actionExecute(execSource, callback) {
|
|
258
|
+
async actionExecute(execSource, callback) {
|
|
259
259
|
execSource.virtualPage = this.buildVirtualPage();
|
|
260
|
-
this.prepareAndExecute(execSource, callback);
|
|
260
|
+
await this.prepareAndExecute(execSource, callback);
|
|
261
261
|
this.recordsReloader(execSource.refreshType);
|
|
262
262
|
}
|
|
263
263
|
resolvePromptParams(action, execSource, hasParamsToSave) {
|
|
@@ -452,9 +452,9 @@ class Actions {
|
|
|
452
452
|
async buildResourceId(actionId) {
|
|
453
453
|
return this._appResourceId + '.actionconfig.' + actionId;
|
|
454
454
|
}
|
|
455
|
-
prepareAndExecute(execSource, executeAction) {
|
|
455
|
+
async prepareAndExecute(execSource, executeAction) {
|
|
456
456
|
this.addRows(execSource);
|
|
457
|
-
executeAction(execSource);
|
|
457
|
+
await executeAction(execSource);
|
|
458
458
|
}
|
|
459
459
|
addRows(execSource) {
|
|
460
460
|
const primaryKeys = this.getPrimaryKeys();
|
|
@@ -1254,6 +1254,8 @@ const SnkSimpleFormConfig = class {
|
|
|
1254
1254
|
* Responsável por abrir o configurador.
|
|
1255
1255
|
*/
|
|
1256
1256
|
async show() {
|
|
1257
|
+
var _a;
|
|
1258
|
+
await ((_a = this.ezDoubleListRef) === null || _a === void 0 ? void 0 : _a.resetSelectedLists());
|
|
1257
1259
|
await this.initializeFormConfig();
|
|
1258
1260
|
this.ezPopupRef.opened = true;
|
|
1259
1261
|
}
|
|
@@ -1319,7 +1321,7 @@ const SnkSimpleFormConfig = class {
|
|
|
1319
1321
|
this.snkConfigSaved.emit();
|
|
1320
1322
|
}
|
|
1321
1323
|
render() {
|
|
1322
|
-
return (index.h("ez-popup", { ref: (ref) => this.ezPopupRef = ref, heightMode: 'auto', size: 'auto', ezTitle: 'Configurar formul\u00E1rio' }, index.h("div", { class: 'config-container' }, index.h("div", { class: 'config-lists' }, index.h("ez-double-list", { leftList: this.avaliableFields, leftTitle: 'Campos disponíveis', rightList: this.selectedFields, rightTitle: 'Campos selecionados', onEzRightListChanged: ({ detail }) => this.fieldsToSave = [...detail], entityLabel: 'campo', entityLabelPlural: 'campos' })), index.h("div", { class: 'config-actions' }, index.h("ez-button", { label: 'Restaurar', onClick: this.handleResetConfigs.bind(this), size: 'small' }), index.h("ez-button", { label: 'Cancelar', onClick: this.handleCancel.bind(this), size: 'small' }), index.h("ez-button", { label: 'Salvar', class: 'ez-button--primary', onClick: this.handleSave.bind(this), size: 'small' })))));
|
|
1324
|
+
return (index.h("ez-popup", { ref: (ref) => this.ezPopupRef = ref, heightMode: 'auto', size: 'auto', ezTitle: 'Configurar formul\u00E1rio' }, index.h("div", { class: 'config-container' }, index.h("div", { class: 'config-lists' }, index.h("ez-double-list", { ref: (ref) => this.ezDoubleListRef = ref, leftList: this.avaliableFields, leftTitle: 'Campos disponíveis', rightList: this.selectedFields, rightTitle: 'Campos selecionados', onEzRightListChanged: ({ detail }) => this.fieldsToSave = [...detail], entityLabel: 'campo', entityLabelPlural: 'campos' })), index.h("div", { class: 'config-actions' }, index.h("ez-button", { label: 'Restaurar', onClick: this.handleResetConfigs.bind(this), size: 'small' }), index.h("ez-button", { label: 'Cancelar', onClick: this.handleCancel.bind(this), size: 'small' }), index.h("ez-button", { label: 'Salvar', class: 'ez-button--primary', onClick: this.handleSave.bind(this), size: 'small' })))));
|
|
1323
1325
|
}
|
|
1324
1326
|
};
|
|
1325
1327
|
SnkSimpleFormConfig.style = snkSimpleFormConfigCss;
|
|
@@ -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 utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
9
|
-
const DataFetcher = require('./DataFetcher-
|
|
10
|
-
const authFetcher = require('./auth-fetcher-
|
|
11
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
12
|
-
const pesquisaFetcher = require('./pesquisa-fetcher-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-d024aec8.js');
|
|
9
|
+
const DataFetcher = require('./DataFetcher-65879b2c.js');
|
|
10
|
+
const authFetcher = require('./auth-fetcher-8480751c.js');
|
|
11
|
+
const dataunitFetcher = require('./dataunit-fetcher-8ea97d88.js');
|
|
12
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-f3454c23.js');
|
|
13
13
|
const SnkMessageBuilder = require('./SnkMessageBuilder-bae64d0d.js');
|
|
14
|
-
require('./form-config-fetcher-
|
|
14
|
+
require('./form-config-fetcher-90126e4c.js');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
16
|
require('./PrintUtils-bcaeb82f.js');
|
|
17
17
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
@@ -309,11 +309,12 @@ class DebouncedRequestListener {
|
|
|
309
309
|
}
|
|
310
310
|
;
|
|
311
311
|
onRequestEnd(param) {
|
|
312
|
+
var _a, _b, _c;
|
|
312
313
|
const timeoutId = this.requests.get(param.requestId);
|
|
313
314
|
clearTimeout(timeoutId);
|
|
314
|
-
if (this.requestsLoadingBar.includes(param.requestId)) {
|
|
315
|
-
this.requestsLoadingBar = this.requestsLoadingBar.filter(id => id !== param.requestId);
|
|
316
|
-
!this.requestsLoadingBar.length && this.ezLoadingBar.hide();
|
|
315
|
+
if ((_a = this.requestsLoadingBar) === null || _a === void 0 ? void 0 : _a.includes(param.requestId)) {
|
|
316
|
+
this.requestsLoadingBar = (_b = this.requestsLoadingBar) === null || _b === void 0 ? void 0 : _b.filter(id => id !== param.requestId);
|
|
317
|
+
!this.requestsLoadingBar.length && ((_c = this.ezLoadingBar) === null || _c === void 0 ? void 0 : _c.hide());
|
|
317
318
|
}
|
|
318
319
|
}
|
|
319
320
|
;
|
|
@@ -384,7 +385,7 @@ class RequestListenerFactory {
|
|
|
384
385
|
}
|
|
385
386
|
}
|
|
386
387
|
|
|
387
|
-
const snkApplicationCss = ".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";
|
|
388
|
+
const snkApplicationCss = ".sc-snk-application-h{display:flex;flex-direction:column;height:100%}.sc-snk-application-h>.loading-hidden.sc-snk-application{display:none;pointer-events:none}.skeleton-content-left.sc-snk-application{width:300px;padding-right:5px}.skeleton-content.sc-snk-application{height:calc(100vh - 310px)}.spinner.sc-snk-application{height:100vh;gap:10px}.spinner.sc-snk-application>.spin.sc-snk-application{animation-name:spin;animation-duration:5000ms;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";
|
|
388
389
|
|
|
389
390
|
const SnkApplication = class {
|
|
390
391
|
constructor(hostRef) {
|
|
@@ -398,9 +399,13 @@ const SnkApplication = class {
|
|
|
398
399
|
this._duCache = new Map();
|
|
399
400
|
this._duPromises = new Map();
|
|
400
401
|
this._requestListener = RequestListenerFactory.create({ strategy: 'request_time' });
|
|
402
|
+
this._maxTimeLockAppLoading = 10000;
|
|
403
|
+
this._isBrowserTypeElectron = false;
|
|
401
404
|
this._pendingActions = new Map;
|
|
402
405
|
this._loadPkParameter = null;
|
|
403
406
|
this._isLoadedByPk = false;
|
|
407
|
+
this._applicationReady = false;
|
|
408
|
+
this.enableLockManagerLoadingApp = undefined;
|
|
404
409
|
this.messagesBuilder = undefined;
|
|
405
410
|
this.configName = undefined;
|
|
406
411
|
this.gridLegacyConfigName = undefined;
|
|
@@ -886,15 +891,21 @@ const SnkApplication = class {
|
|
|
886
891
|
return Promise.resolve(this._isLoadedByPk);
|
|
887
892
|
}
|
|
888
893
|
/**
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
894
|
+
* Remove registro do cache do PreLoader do dataunit.
|
|
895
|
+
* Deve ser usado quando existe um dataunit usando loader do application, mas o removeLoader está sendo sobrescrito.
|
|
896
|
+
*/
|
|
892
897
|
async preloadMangerRemoveRecord(dataUnit, recordsIDs) {
|
|
893
898
|
const records = recordsIDs.map(id => {
|
|
894
899
|
return { "__record__id__": id };
|
|
895
900
|
});
|
|
896
901
|
dataunitFetcher.PreloadManager.removeRecords(dataUnit, records);
|
|
897
902
|
}
|
|
903
|
+
getCountSkeleton(className, skeletonHeight, spacingSkeleton) {
|
|
904
|
+
let containerHeight = window.innerHeight - 350;
|
|
905
|
+
spacingSkeleton = !spacingSkeleton ? 20 : spacingSkeleton;
|
|
906
|
+
let skeletonCount = Math.floor(containerHeight / (skeletonHeight + spacingSkeleton));
|
|
907
|
+
return skeletonCount || 1;
|
|
908
|
+
}
|
|
898
909
|
async getAuthList(auth) {
|
|
899
910
|
return await (new MGEAuthorization()).parseFromJSON(auth);
|
|
900
911
|
}
|
|
@@ -936,12 +947,12 @@ const SnkApplication = class {
|
|
|
936
947
|
* Obtém as opções em componentes de pesquisa
|
|
937
948
|
* Ex.: snk-config-options
|
|
938
949
|
*/
|
|
939
|
-
async executeSearch(searchArgument, fieldName, dataUnit) {
|
|
950
|
+
async executeSearch(searchArgument, fieldName, dataUnit, ctxOptions) {
|
|
940
951
|
const descriptor = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(fieldName);
|
|
941
952
|
if (!descriptor) ;
|
|
942
953
|
else {
|
|
943
954
|
const { mode, argument } = searchArgument;
|
|
944
|
-
const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY } = descriptor.properties;
|
|
955
|
+
const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY, ISHIERARCHYENTITY } = descriptor.properties;
|
|
945
956
|
const dependencies = descriptor.dependencies;
|
|
946
957
|
let criteria;
|
|
947
958
|
const searchOptions = {
|
|
@@ -971,7 +982,16 @@ const SnkApplication = class {
|
|
|
971
982
|
}
|
|
972
983
|
}
|
|
973
984
|
});
|
|
974
|
-
|
|
985
|
+
const allowsNonAnalytic = ctxOptions === null || ctxOptions === void 0 ? void 0 : ctxOptions.allowsNonAnalytic;
|
|
986
|
+
const options = {
|
|
987
|
+
entity: ENTITYNAME,
|
|
988
|
+
entityDescription: DESCRIPTIONENTITY,
|
|
989
|
+
isHierarchyEntity: ISHIERARCHYENTITY,
|
|
990
|
+
criteria,
|
|
991
|
+
searchOptions,
|
|
992
|
+
allowsNonAnalytic
|
|
993
|
+
};
|
|
994
|
+
return this.executePreparedSearch(mode, argument, options);
|
|
975
995
|
}
|
|
976
996
|
}
|
|
977
997
|
filterInvalidFields(resp, item, mdByName) {
|
|
@@ -1021,13 +1041,19 @@ const SnkApplication = class {
|
|
|
1021
1041
|
*/
|
|
1022
1042
|
async executePreparedSearch(mode, argument, options) {
|
|
1023
1043
|
const mdByName = {};
|
|
1024
|
-
const { entity, entityDescription, criteria, searchOptions } = options;
|
|
1044
|
+
const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic } = options;
|
|
1025
1045
|
if (mode === "ADVANCED") {
|
|
1026
1046
|
return new Promise((accept, reject) => {
|
|
1027
1047
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
1028
1048
|
pesquisaContent[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
|
1049
|
+
pesquisaContent.entityName = entity;
|
|
1029
1050
|
pesquisaContent.argument = argument;
|
|
1030
1051
|
pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
|
1052
|
+
pesquisaContent.isHierarchyEntity = isHierarchyEntity;
|
|
1053
|
+
if (isHierarchyEntity) {
|
|
1054
|
+
pesquisaContent.treeLoader = (text) => this.pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
|
|
1055
|
+
pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
|
|
1056
|
+
}
|
|
1031
1057
|
pesquisaContent.selectItem = (option) => {
|
|
1032
1058
|
accept(option);
|
|
1033
1059
|
this.clearPopUpTitle();
|
|
@@ -1335,8 +1361,8 @@ const SnkApplication = class {
|
|
|
1335
1361
|
this._errorHandler = new SnkErrorHandler(this);
|
|
1336
1362
|
this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder();
|
|
1337
1363
|
core.ApplicationContext.setContextValue("__EZUI__UPLOAD__ADD__URL__", `${DataFetcher.UrlUtils.getUrlBase()}/mge/upload/file`);
|
|
1338
|
-
core.ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit) => {
|
|
1339
|
-
return this.executeSearch(searchArgument, fieldName, dataUnit);
|
|
1364
|
+
core.ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit, ctxOptions) => {
|
|
1365
|
+
return this.executeSearch(searchArgument, fieldName, dataUnit, ctxOptions);
|
|
1340
1366
|
});
|
|
1341
1367
|
core.ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
|
1342
1368
|
this.registerPkChangeListener();
|
|
@@ -1350,12 +1376,15 @@ const SnkApplication = class {
|
|
|
1350
1376
|
this._waitingAppReady.forEach(resolve => resolve());
|
|
1351
1377
|
}
|
|
1352
1378
|
connectedCallback() {
|
|
1379
|
+
this._isBrowserTypeElectron = core.UserAgentUtils.isElectron();
|
|
1353
1380
|
core.ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
|
|
1354
1381
|
DataFetcher.DataFetcher.addRequestListener(this._requestListener);
|
|
1355
1382
|
}
|
|
1356
1383
|
disconnectedCallback() {
|
|
1357
|
-
DataFetcher.DataFetcher.removeRequestListener(this._requestListener);
|
|
1384
|
+
DataFetcher.DataFetcher === null || DataFetcher.DataFetcher === void 0 ? void 0 : DataFetcher.DataFetcher.removeRequestListener(this._requestListener);
|
|
1358
1385
|
this.removeShortcuts();
|
|
1386
|
+
if (this._lockManagerTimer)
|
|
1387
|
+
clearTimeout(this._lockManagerTimer);
|
|
1359
1388
|
}
|
|
1360
1389
|
async componentDidLoad() {
|
|
1361
1390
|
this.applicationLoading.emit(true);
|
|
@@ -1367,6 +1396,63 @@ const SnkApplication = class {
|
|
|
1367
1396
|
core.ElementIDUtils.addIDInfo(this._element, `resource_${this.applicationResourceID}`);
|
|
1368
1397
|
await this.handleShowNewVersionPopup();
|
|
1369
1398
|
this.initKeyboardManager();
|
|
1399
|
+
if (this.enableLockManagerLoadingApp) {
|
|
1400
|
+
core.LockManager.addLockManagerCtxId(this._element);
|
|
1401
|
+
this.resolveApplicationReady();
|
|
1402
|
+
}
|
|
1403
|
+
else {
|
|
1404
|
+
this._applicationReady = true;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
async markToReload() {
|
|
1408
|
+
if (!this.enableLockManagerLoadingApp)
|
|
1409
|
+
return;
|
|
1410
|
+
this._applicationReady = false;
|
|
1411
|
+
await core.LockManager.resetLocks(this._element, core.LockManagerOperation.APP_LOADING);
|
|
1412
|
+
this.resolveApplicationReady();
|
|
1413
|
+
}
|
|
1414
|
+
async addLoadingLock(forceReady = false) {
|
|
1415
|
+
if (!this.enableLockManagerLoadingApp)
|
|
1416
|
+
return;
|
|
1417
|
+
if (forceReady) {
|
|
1418
|
+
this._applicationReady = false;
|
|
1419
|
+
await core.LockManager.resetLocks(this._element, core.LockManagerOperation.APP_LOADING);
|
|
1420
|
+
}
|
|
1421
|
+
this.resolveApplicationReady();
|
|
1422
|
+
return await core.LockManager.lock(this._element, core.LockManagerOperation.APP_LOADING);
|
|
1423
|
+
}
|
|
1424
|
+
async resolveApplicationReady() {
|
|
1425
|
+
if (this._applicationReady) {
|
|
1426
|
+
return;
|
|
1427
|
+
}
|
|
1428
|
+
try {
|
|
1429
|
+
await this.checkTimeoutLimitLockManager();
|
|
1430
|
+
await core.LockManager.whenHasLock(this._element, core.LockManagerOperation.APP_LOADING);
|
|
1431
|
+
await core.LockManager.whenResolve(this._element, core.LockManagerOperation.APP_LOADING, 1200);
|
|
1432
|
+
await core.LockManager.resetLocks(this._element, core.LockManagerOperation.APP_LOADING);
|
|
1433
|
+
this._applicationReady = true;
|
|
1434
|
+
}
|
|
1435
|
+
catch (error) {
|
|
1436
|
+
console.warn(error);
|
|
1437
|
+
this._applicationReady = true;
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
stopTimeoutLockManager() {
|
|
1441
|
+
if (this._lockManagerTimer) {
|
|
1442
|
+
clearTimeout(this._lockManagerTimer);
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
async checkTimeoutLimitLockManager() {
|
|
1446
|
+
this.stopTimeoutLockManager();
|
|
1447
|
+
if (this._applicationReady)
|
|
1448
|
+
return;
|
|
1449
|
+
this._lockManagerTimer = setTimeout(async () => {
|
|
1450
|
+
if (!this._applicationReady) {
|
|
1451
|
+
await core.LockManager.resetLocks(this._element, core.LockManagerOperation.APP_LOADING);
|
|
1452
|
+
this.stopTimeoutLockManager();
|
|
1453
|
+
this._applicationReady = true;
|
|
1454
|
+
}
|
|
1455
|
+
}, this._maxTimeLockAppLoading);
|
|
1370
1456
|
}
|
|
1371
1457
|
initKeyboardManager() {
|
|
1372
1458
|
this._keyboardManager
|
|
@@ -1380,8 +1466,40 @@ const SnkApplication = class {
|
|
|
1380
1466
|
.unbind("ctrl + d")
|
|
1381
1467
|
.unbind("F1");
|
|
1382
1468
|
}
|
|
1469
|
+
// TODO: Etapa 2 - implementar template de loading
|
|
1470
|
+
renderLoadingSkeleton(template) {
|
|
1471
|
+
if (this.enableLockManagerLoadingApp) {
|
|
1472
|
+
if (!this._isBrowserTypeElectron) {
|
|
1473
|
+
switch (template) {
|
|
1474
|
+
case TEMPLATES_LOADING_SKELETON.APPLICATION:
|
|
1475
|
+
case TEMPLATES_LOADING_SKELETON.GRID:
|
|
1476
|
+
return this.getSkeletonTemplateApplication();
|
|
1477
|
+
default:
|
|
1478
|
+
return this.getSkeletonTemplateApplication();
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
else {
|
|
1482
|
+
return this.getSpinnerLoadingDefault();
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
getLoadingVisibilityStyle() {
|
|
1487
|
+
return {
|
|
1488
|
+
visibility: this._applicationReady ? "hidden" : "initial",
|
|
1489
|
+
display: this._applicationReady ? "none" : "unset"
|
|
1490
|
+
};
|
|
1491
|
+
}
|
|
1492
|
+
getSkeletonTemplateApplication() {
|
|
1493
|
+
return (index.h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, index.h("div", { class: "ez-margin--medium ez-margin-top--extra-small" }, index.h("ez-skeleton", { count: 1, variant: "rect", width: "100%", height: "150px", animation: "progress" })), index.h("div", { class: "ez-flex ez-flex--align-items-stretch skeleton-content" }, index.h("div", { class: "skeleton-content-left ez-margin--medium" }, index.h("ez-skeleton", { count: 1, variant: "rect", width: "100%", height: "calc(100% - 15px)", animation: "progress", marginBottom: "20px" })), index.h("div", { class: "ez-flex-item--auto skeleton-content-right ez-margin--medium" }, index.h("ez-skeleton", { count: this.getCountSkeleton("skeleton-content-right", 50, 20), variant: "rect", width: "100%", height: "49px", animation: "progress", marginBottom: "20px" }))), index.h("div", { class: "skeleton-content-footer ez-margin--medium ez-margin-top--extra-small" }, index.h("ez-skeleton", { count: 1, variant: "rect", width: "100%", height: "100px", animation: "progress" }))));
|
|
1494
|
+
}
|
|
1495
|
+
getSpinnerLoadingDefault() {
|
|
1496
|
+
return (index.h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, index.h("div", { class: "ez-flex ez-size-height--full ez-size-width--full ez-flex--justify-center ez-flex--align-items-center spinner" }, index.h("ez-icon", { iconName: "sync", size: "x-large", class: "spin" }), index.h("span", { class: "ez-title ez-title--secondary ez-title--extra-large" }, "Carregando..."))));
|
|
1497
|
+
}
|
|
1383
1498
|
render() {
|
|
1384
|
-
return (index.h(
|
|
1499
|
+
return (index.h(index.Host, { style: {
|
|
1500
|
+
visibility: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden",
|
|
1501
|
+
overflow: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden"
|
|
1502
|
+
} }, index.h("div", null, index.h("ez-loading-bar", { ref: (ref) => this._requestListener.ezLoadingBar = ref }), index.h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), index.h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "small", closeOutsideClick: true, closeEsc: true }), this.renderLoadingSkeleton())));
|
|
1385
1503
|
}
|
|
1386
1504
|
get _element() { return index.getElement(this); }
|
|
1387
1505
|
static get watchers() { return {
|
|
@@ -1394,6 +1512,11 @@ class PendingPromise {
|
|
|
1394
1512
|
this.reject = reject;
|
|
1395
1513
|
}
|
|
1396
1514
|
}
|
|
1515
|
+
var TEMPLATES_LOADING_SKELETON;
|
|
1516
|
+
(function (TEMPLATES_LOADING_SKELETON) {
|
|
1517
|
+
TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["APPLICATION"] = 1] = "APPLICATION";
|
|
1518
|
+
TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["GRID"] = 2] = "GRID";
|
|
1519
|
+
})(TEMPLATES_LOADING_SKELETON || (TEMPLATES_LOADING_SKELETON = {}));
|
|
1397
1520
|
SnkApplication.style = snkApplicationCss;
|
|
1398
1521
|
|
|
1399
1522
|
exports.snk_application = SnkApplication;
|
|
@@ -4,15 +4,15 @@ 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 DataFetcher = require('./DataFetcher-
|
|
8
|
-
require('./pesquisa-fetcher-
|
|
7
|
+
const DataFetcher = require('./DataFetcher-65879b2c.js');
|
|
8
|
+
require('./pesquisa-fetcher-f3454c23.js');
|
|
9
9
|
require('./index-1dfc7a6e.js');
|
|
10
10
|
const ISave = require('./ISave-e91b70a7.js');
|
|
11
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
11
|
+
const dataunitFetcher = require('./dataunit-fetcher-8ea97d88.js');
|
|
12
12
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
13
|
-
require('./form-config-fetcher-
|
|
13
|
+
require('./form-config-fetcher-90126e4c.js');
|
|
14
14
|
const constants = require('./constants-35ddd366.js');
|
|
15
|
-
const authFetcher = require('./auth-fetcher-
|
|
15
|
+
const authFetcher = require('./auth-fetcher-8480751c.js');
|
|
16
16
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
17
17
|
require('./PrintUtils-bcaeb82f.js');
|
|
18
18
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
@@ -7,14 +7,14 @@ const core = require('@sankhyalabs/core');
|
|
|
7
7
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
|
10
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
10
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-ae3185b2.js');
|
|
11
11
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
|
12
12
|
const Sortable = require('./Sortable-fb1c4cbb.js');
|
|
13
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
13
|
+
const formConfigFetcher = require('./form-config-fetcher-90126e4c.js');
|
|
14
14
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
15
|
-
require('./ConfigStorage-
|
|
15
|
+
require('./ConfigStorage-d024aec8.js');
|
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
|
-
require('./DataFetcher-
|
|
17
|
+
require('./DataFetcher-65879b2c.js');
|
|
18
18
|
require('./PrintUtils-bcaeb82f.js');
|
|
19
19
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
20
20
|
|
|
@@ -5,17 +5,17 @@ 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
|
-
require('./DataFetcher-
|
|
9
|
-
require('./pesquisa-fetcher-
|
|
8
|
+
require('./DataFetcher-65879b2c.js');
|
|
9
|
+
require('./pesquisa-fetcher-f3454c23.js');
|
|
10
10
|
const index$1 = require('./index-1dfc7a6e.js');
|
|
11
11
|
require('./ISave-e91b70a7.js');
|
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
|
-
require('./dataunit-fetcher-
|
|
14
|
+
require('./dataunit-fetcher-8ea97d88.js');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
|
-
require('./form-config-fetcher-
|
|
16
|
+
require('./form-config-fetcher-90126e4c.js');
|
|
17
17
|
const constants = require('./constants-35ddd366.js');
|
|
18
|
-
const authFetcher = require('./auth-fetcher-
|
|
18
|
+
const authFetcher = require('./auth-fetcher-8480751c.js');
|
|
19
19
|
require('./index-102ba62d.js');
|
|
20
20
|
require('./PrintUtils-bcaeb82f.js');
|
|
21
21
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -42,6 +42,8 @@ const SnkCrud = class {
|
|
|
42
42
|
this._currentViewMode = constants.VIEW_MODE.GRID;
|
|
43
43
|
this._canEdit = undefined;
|
|
44
44
|
this._resourceID = undefined;
|
|
45
|
+
this.enableLockManagerLoadingComp = false;
|
|
46
|
+
this.enableLockManagerTaskbarClick = false;
|
|
45
47
|
this.configName = undefined;
|
|
46
48
|
this.filterBarTitle = undefined;
|
|
47
49
|
this.selectionToastConfig = undefined;
|
|
@@ -63,7 +65,6 @@ const SnkCrud = class {
|
|
|
63
65
|
this.enableGridInsert = false;
|
|
64
66
|
this.domainMessagesBuilder = undefined;
|
|
65
67
|
this.ignoreReadOnlyFormFields = undefined;
|
|
66
|
-
this.enableLockManger = false;
|
|
67
68
|
this.setCustomFormTitle = undefined;
|
|
68
69
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
|
|
69
70
|
}
|
|
@@ -410,7 +411,7 @@ const SnkCrud = class {
|
|
|
410
411
|
return;
|
|
411
412
|
}
|
|
412
413
|
this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === constants.VIEW_MODE.GRID && !this.enableGridInsert);
|
|
413
|
-
return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, index.h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert,
|
|
414
|
+
return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, index.h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkFormTaskBar" }))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
|
414
415
|
}
|
|
415
416
|
get _element() { return index.getElement(this); }
|
|
416
417
|
static get watchers() { return {
|
|
@@ -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,
|
|
@@ -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');
|