@sankhyalabs/sankhyablocks 8.16.0-dev.63 → 8.16.0-dev.65
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/{ContinuousInsertUtils-414b772c.js → ContinuousInsertUtils-a6139f3d.js} +2 -2
- package/dist/cjs/{dataunit-fetcher-228016f4.js → dataunit-fetcher-0121621c.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-a85d6935.js} +175 -0
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +127 -0
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_5.cjs.entry.js +2 -2
- package/dist/cjs/snk-application.cjs.entry.js +140 -17
- package/dist/cjs/snk-attach.cjs.entry.js +2 -2
- package/dist/cjs/snk-crud.cjs.entry.js +5 -4
- package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -3
- package/dist/cjs/{snk-data-unit-3d9b6ed4.js → snk-data-unit-c699179d.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +21 -7
- package/dist/cjs/snk-grid.cjs.entry.js +6 -5
- package/dist/cjs/{snk-guides-viewer-421555af.js → snk-guides-viewer-575596a2.js} +2 -2
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +105 -31
- package/dist/cjs/snk-simple-crud.cjs.entry.js +6 -5
- package/dist/collection/collection-manifest.json +2 -0
- 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-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 +173 -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 +39 -20
- 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 +1 -2
- package/dist/components/ISave.js +346 -1
- 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 +76 -0
- package/dist/components/snk-actions-button2.js +0 -1
- 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 +1 -2
- 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 +118 -33
- package/dist/components/snk-simple-crud2.js +6 -5
- package/dist/components/snk-simple-form-config2.js +1 -2
- package/dist/components/teste-pesquisa.js +13 -1
- package/dist/esm/{ContinuousInsertUtils-bab45060.js → ContinuousInsertUtils-15b5f1da.js} +2 -2
- package/dist/esm/{dataunit-fetcher-56cb648b.js → dataunit-fetcher-481e159d.js} +1 -1
- package/dist/esm/index-a7d3d3f1.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-24e5bba0.js → pesquisa-fetcher-c437c9b1.js} +176 -2
- package/dist/esm/pesquisa-grid_2.entry.js +122 -0
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_5.entry.js +2 -2
- package/dist/esm/snk-application.entry.js +142 -19
- package/dist/esm/snk-attach.entry.js +2 -2
- package/dist/esm/snk-crud.entry.js +5 -4
- package/dist/esm/snk-data-exporter.entry.js +3 -3
- package/dist/esm/{snk-data-unit-9fa7d2b9.js → snk-data-unit-d4ba54d7.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +3 -3
- package/dist/esm/snk-filter-bar_4.entry.js +22 -8
- package/dist/esm/snk-grid.entry.js +6 -5
- package/dist/esm/{snk-guides-viewer-b740a1fe.js → snk-guides-viewer-3043422d.js} +2 -2
- package/dist/esm/snk-guides-viewer.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +105 -31
- package/dist/esm/snk-simple-crud.entry.js +6 -5
- package/dist/sankhyablocks/{p-c629c07a.entry.js → p-08242e3f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-342eeb3b.js → p-0f3b2a32.js} +1 -1
- package/dist/sankhyablocks/{p-72a451c8.js → p-229c3615.js} +1 -1
- package/dist/sankhyablocks/p-22d04eac.entry.js +1 -0
- package/dist/sankhyablocks/{p-b619ee23.js → p-36598f95.js} +1 -1
- package/dist/sankhyablocks/p-4895f6e4.entry.js +1 -0
- package/dist/sankhyablocks/p-4be4cdac.js +6 -0
- package/dist/sankhyablocks/{p-47d24ac8.js → p-58fd3017.js} +1 -1
- package/dist/sankhyablocks/p-70cb4e36.entry.js +11 -0
- package/dist/sankhyablocks/{p-64ff0fb6.entry.js → p-73fc8ec5.entry.js} +1 -1
- package/dist/sankhyablocks/{p-50306605.entry.js → p-7d09f66c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-53ae0296.entry.js → p-a33e803a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-89da2953.entry.js → p-b299dc14.entry.js} +1 -1
- package/dist/sankhyablocks/p-badbd2ca.entry.js +1 -0
- package/dist/sankhyablocks/p-c9bd54e6.entry.js +1 -0
- package/dist/sankhyablocks/{p-0d2a2e9e.entry.js → p-e2bd42c0.entry.js} +1 -1
- package/dist/sankhyablocks/p-e8512d4b.entry.js +1 -0
- package/dist/sankhyablocks/p-f71d043b.entry.js +1 -0
- 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-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 +28 -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 +8 -1
- 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/components/pesquisa-fetcher.js +0 -172
- package/dist/sankhyablocks/p-0c55538b.entry.js +0 -1
- package/dist/sankhyablocks/p-65650e05.entry.js +0 -1
- package/dist/sankhyablocks/p-690b4311.entry.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
|
@@ -6,12 +6,12 @@ const index = require('./index-f9e81701.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const DataFetcher = require('./DataFetcher-e059eb72.js');
|
|
8
8
|
const ParamType = require('./ParamType-90b440a0.js');
|
|
9
|
-
require('./pesquisa-fetcher-
|
|
9
|
+
require('./pesquisa-fetcher-a85d6935.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-0121621c.js');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
16
|
const formConfigFetcher = require('./form-config-fetcher-91fba2b1.js');
|
|
17
17
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
@@ -8,8 +8,8 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
|
8
8
|
const ConfigStorage = require('./ConfigStorage-9b965af9.js');
|
|
9
9
|
const DataFetcher = require('./DataFetcher-e059eb72.js');
|
|
10
10
|
const authFetcher = require('./auth-fetcher-a78242d1.js');
|
|
11
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
12
|
-
const pesquisaFetcher = require('./pesquisa-fetcher-
|
|
11
|
+
const dataunitFetcher = require('./dataunit-fetcher-0121621c.js');
|
|
12
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-a85d6935.js');
|
|
13
13
|
const SnkMessageBuilder = require('./SnkMessageBuilder-bae64d0d.js');
|
|
14
14
|
require('./form-config-fetcher-91fba2b1.js');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
@@ -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;
|
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const DataFetcher = require('./DataFetcher-e059eb72.js');
|
|
8
|
-
require('./pesquisa-fetcher-
|
|
8
|
+
require('./pesquisa-fetcher-a85d6935.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-0121621c.js');
|
|
12
12
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
13
13
|
require('./form-config-fetcher-91fba2b1.js');
|
|
14
14
|
const constants = require('./constants-35ddd366.js');
|
|
@@ -6,12 +6,12 @@ const index = require('./index-f9e81701.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
8
8
|
require('./DataFetcher-e059eb72.js');
|
|
9
|
-
require('./pesquisa-fetcher-
|
|
9
|
+
require('./pesquisa-fetcher-a85d6935.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-0121621c.js');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
16
|
require('./form-config-fetcher-91fba2b1.js');
|
|
17
17
|
const constants = require('./constants-35ddd366.js');
|
|
@@ -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 {
|
|
@@ -8,12 +8,12 @@ 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
10
|
const DataFetcher = require('./DataFetcher-e059eb72.js');
|
|
11
|
-
const snkDataUnit = require('./snk-data-unit-
|
|
12
|
-
require('./pesquisa-fetcher-
|
|
11
|
+
const snkDataUnit = require('./snk-data-unit-c699179d.js');
|
|
12
|
+
require('./pesquisa-fetcher-a85d6935.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-0121621c.js');
|
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
18
|
require('./form-config-fetcher-91fba2b1.js');
|
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
|
@@ -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-0121621c.js');
|
|
8
8
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
9
9
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
10
10
|
|
|
@@ -2,12 +2,12 @@
|
|
|
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-c699179d.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-
|
|
10
|
+
require('./dataunit-fetcher-0121621c.js');
|
|
11
11
|
require('./DataFetcher-e059eb72.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
@@ -7,17 +7,17 @@ const core = require('@sankhyalabs/core');
|
|
|
7
7
|
const SnkFormConfigManager = require('./SnkFormConfigManager-51caf3d0.js');
|
|
8
8
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
9
9
|
require('./DataFetcher-e059eb72.js');
|
|
10
|
-
require('./pesquisa-fetcher-
|
|
10
|
+
require('./pesquisa-fetcher-a85d6935.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-0121621c.js');
|
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
17
|
require('./form-config-fetcher-91fba2b1.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-575596a2.js');
|
|
21
21
|
const SnkMessageBuilder = require('./SnkMessageBuilder-bae64d0d.js');
|
|
22
22
|
require('./ConfigStorage-9b965af9.js');
|
|
23
23
|
require('./PrintUtils-bcaeb82f.js');
|
|
@@ -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();
|
|
@@ -9,14 +9,14 @@ const ConfigStorage = require('./ConfigStorage-9b965af9.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-a6139f3d.js');
|
|
13
13
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
14
14
|
require('./DataFetcher-e059eb72.js');
|
|
15
|
-
require('./pesquisa-fetcher-
|
|
15
|
+
require('./pesquisa-fetcher-a85d6935.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-0121621c.js');
|
|
20
20
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
21
21
|
require('./form-config-fetcher-91fba2b1.js');
|
|
22
22
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.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 {
|
|
@@ -8,12 +8,12 @@ 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
10
|
require('./DataFetcher-e059eb72.js');
|
|
11
|
-
require('./pesquisa-fetcher-
|
|
11
|
+
require('./pesquisa-fetcher-a85d6935.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-0121621c.js');
|
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
18
|
require('./form-config-fetcher-91fba2b1.js');
|
|
19
19
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
@@ -2,7 +2,7 @@
|
|
|
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-575596a2.js');
|
|
6
6
|
require('./index-f9e81701.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
8
|
require('./SnkFormConfigManager-51caf3d0.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-a85d6935.js');
|
|
22
22
|
require('./ISave-e91b70a7.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
24
|
-
require('./dataunit-fetcher-
|
|
24
|
+
require('./dataunit-fetcher-0121621c.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');
|