@sankhyalabs/sankhyablocks 8.16.0-dev.63 → 8.16.0-dev.65
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -1,11 +1,11 @@
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
|
2
|
-
import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ArrayUtils, SearchUtils, ElementIDUtils, ApplicationContext, DataType, ErrorTracking } from '@sankhyalabs/core';
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
|
+
import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ArrayUtils, SearchUtils, ElementIDUtils, ApplicationContext, DataType, ErrorTracking, UserAgentUtils, LockManager, LockManagerOperation } from '@sankhyalabs/core';
|
3
3
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
4
|
import { C as ConfigStorage } from './ConfigStorage-ff99377a.js';
|
5
5
|
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-5034df59.js';
|
6
6
|
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-0b78ca31.js';
|
7
|
-
import { P as PreloadManager, D as DataUnitFetcher } from './dataunit-fetcher-
|
8
|
-
import { P as PesquisaFetcher } from './pesquisa-fetcher-
|
7
|
+
import { P as PreloadManager, D as DataUnitFetcher } from './dataunit-fetcher-481e159d.js';
|
8
|
+
import { P as PesquisaFetcher } from './pesquisa-fetcher-c437c9b1.js';
|
9
9
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-6fff4a4c.js';
|
10
10
|
import './form-config-fetcher-0c2620ef.js';
|
11
11
|
import './filter-item-type.enum-d45e026f.js';
|
@@ -305,11 +305,12 @@ class DebouncedRequestListener {
|
|
305
305
|
}
|
306
306
|
;
|
307
307
|
onRequestEnd(param) {
|
308
|
+
var _a, _b, _c;
|
308
309
|
const timeoutId = this.requests.get(param.requestId);
|
309
310
|
clearTimeout(timeoutId);
|
310
|
-
if (this.requestsLoadingBar.includes(param.requestId)) {
|
311
|
-
this.requestsLoadingBar = this.requestsLoadingBar.filter(id => id !== param.requestId);
|
312
|
-
!this.requestsLoadingBar.length && this.ezLoadingBar.hide();
|
311
|
+
if ((_a = this.requestsLoadingBar) === null || _a === void 0 ? void 0 : _a.includes(param.requestId)) {
|
312
|
+
this.requestsLoadingBar = (_b = this.requestsLoadingBar) === null || _b === void 0 ? void 0 : _b.filter(id => id !== param.requestId);
|
313
|
+
!this.requestsLoadingBar.length && ((_c = this.ezLoadingBar) === null || _c === void 0 ? void 0 : _c.hide());
|
313
314
|
}
|
314
315
|
}
|
315
316
|
;
|
@@ -380,7 +381,7 @@ class RequestListenerFactory {
|
|
380
381
|
}
|
381
382
|
}
|
382
383
|
|
383
|
-
const snkApplicationCss = ".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";
|
384
|
+
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)}}";
|
384
385
|
|
385
386
|
const SnkApplication = class {
|
386
387
|
constructor(hostRef) {
|
@@ -394,9 +395,13 @@ const SnkApplication = class {
|
|
394
395
|
this._duCache = new Map();
|
395
396
|
this._duPromises = new Map();
|
396
397
|
this._requestListener = RequestListenerFactory.create({ strategy: 'request_time' });
|
398
|
+
this._maxTimeLockAppLoading = 10000;
|
399
|
+
this._isBrowserTypeElectron = false;
|
397
400
|
this._pendingActions = new Map;
|
398
401
|
this._loadPkParameter = null;
|
399
402
|
this._isLoadedByPk = false;
|
403
|
+
this._applicationReady = false;
|
404
|
+
this.enableLockManagerLoadingApp = undefined;
|
400
405
|
this.messagesBuilder = undefined;
|
401
406
|
this.configName = undefined;
|
402
407
|
this.gridLegacyConfigName = undefined;
|
@@ -882,15 +887,21 @@ const SnkApplication = class {
|
|
882
887
|
return Promise.resolve(this._isLoadedByPk);
|
883
888
|
}
|
884
889
|
/**
|
885
|
-
|
886
|
-
|
887
|
-
|
890
|
+
* Remove registro do cache do PreLoader do dataunit.
|
891
|
+
* Deve ser usado quando existe um dataunit usando loader do application, mas o removeLoader está sendo sobrescrito.
|
892
|
+
*/
|
888
893
|
async preloadMangerRemoveRecord(dataUnit, recordsIDs) {
|
889
894
|
const records = recordsIDs.map(id => {
|
890
895
|
return { "__record__id__": id };
|
891
896
|
});
|
892
897
|
PreloadManager.removeRecords(dataUnit, records);
|
893
898
|
}
|
899
|
+
getCountSkeleton(className, skeletonHeight, spacingSkeleton) {
|
900
|
+
let containerHeight = window.innerHeight - 350;
|
901
|
+
spacingSkeleton = !spacingSkeleton ? 20 : spacingSkeleton;
|
902
|
+
let skeletonCount = Math.floor(containerHeight / (skeletonHeight + spacingSkeleton));
|
903
|
+
return skeletonCount || 1;
|
904
|
+
}
|
894
905
|
async getAuthList(auth) {
|
895
906
|
return await (new MGEAuthorization()).parseFromJSON(auth);
|
896
907
|
}
|
@@ -932,12 +943,12 @@ const SnkApplication = class {
|
|
932
943
|
* Obtém as opções em componentes de pesquisa
|
933
944
|
* Ex.: snk-config-options
|
934
945
|
*/
|
935
|
-
async executeSearch(searchArgument, fieldName, dataUnit) {
|
946
|
+
async executeSearch(searchArgument, fieldName, dataUnit, ctxOptions) {
|
936
947
|
const descriptor = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(fieldName);
|
937
948
|
if (!descriptor) ;
|
938
949
|
else {
|
939
950
|
const { mode, argument } = searchArgument;
|
940
|
-
const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY } = descriptor.properties;
|
951
|
+
const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY, ISHIERARCHYENTITY } = descriptor.properties;
|
941
952
|
const dependencies = descriptor.dependencies;
|
942
953
|
let criteria;
|
943
954
|
const searchOptions = {
|
@@ -967,7 +978,16 @@ const SnkApplication = class {
|
|
967
978
|
}
|
968
979
|
}
|
969
980
|
});
|
970
|
-
|
981
|
+
const allowsNonAnalytic = ctxOptions === null || ctxOptions === void 0 ? void 0 : ctxOptions.allowsNonAnalytic;
|
982
|
+
const options = {
|
983
|
+
entity: ENTITYNAME,
|
984
|
+
entityDescription: DESCRIPTIONENTITY,
|
985
|
+
isHierarchyEntity: ISHIERARCHYENTITY,
|
986
|
+
criteria,
|
987
|
+
searchOptions,
|
988
|
+
allowsNonAnalytic
|
989
|
+
};
|
990
|
+
return this.executePreparedSearch(mode, argument, options);
|
971
991
|
}
|
972
992
|
}
|
973
993
|
filterInvalidFields(resp, item, mdByName) {
|
@@ -1017,13 +1037,19 @@ const SnkApplication = class {
|
|
1017
1037
|
*/
|
1018
1038
|
async executePreparedSearch(mode, argument, options) {
|
1019
1039
|
const mdByName = {};
|
1020
|
-
const { entity, entityDescription, criteria, searchOptions } = options;
|
1040
|
+
const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic } = options;
|
1021
1041
|
if (mode === "ADVANCED") {
|
1022
1042
|
return new Promise((accept, reject) => {
|
1023
1043
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
1024
1044
|
pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
1045
|
+
pesquisaContent.entityName = entity;
|
1025
1046
|
pesquisaContent.argument = argument;
|
1026
1047
|
pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
1048
|
+
pesquisaContent.isHierarchyEntity = isHierarchyEntity;
|
1049
|
+
if (isHierarchyEntity) {
|
1050
|
+
pesquisaContent.treeLoader = (text) => this.pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
|
1051
|
+
pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
|
1052
|
+
}
|
1027
1053
|
pesquisaContent.selectItem = (option) => {
|
1028
1054
|
accept(option);
|
1029
1055
|
this.clearPopUpTitle();
|
@@ -1331,8 +1357,8 @@ const SnkApplication = class {
|
|
1331
1357
|
this._errorHandler = new SnkErrorHandler(this);
|
1332
1358
|
this.messagesBuilder = new SnkMessageBuilder();
|
1333
1359
|
ApplicationContext.setContextValue("__EZUI__UPLOAD__ADD__URL__", `${UrlUtils.getUrlBase()}/mge/upload/file`);
|
1334
|
-
ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit) => {
|
1335
|
-
return this.executeSearch(searchArgument, fieldName, dataUnit);
|
1360
|
+
ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit, ctxOptions) => {
|
1361
|
+
return this.executeSearch(searchArgument, fieldName, dataUnit, ctxOptions);
|
1336
1362
|
});
|
1337
1363
|
ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
1338
1364
|
this.registerPkChangeListener();
|
@@ -1346,12 +1372,15 @@ const SnkApplication = class {
|
|
1346
1372
|
this._waitingAppReady.forEach(resolve => resolve());
|
1347
1373
|
}
|
1348
1374
|
connectedCallback() {
|
1375
|
+
this._isBrowserTypeElectron = UserAgentUtils.isElectron();
|
1349
1376
|
ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
|
1350
1377
|
DataFetcher.addRequestListener(this._requestListener);
|
1351
1378
|
}
|
1352
1379
|
disconnectedCallback() {
|
1353
|
-
DataFetcher.removeRequestListener(this._requestListener);
|
1380
|
+
DataFetcher === null || DataFetcher === void 0 ? void 0 : DataFetcher.removeRequestListener(this._requestListener);
|
1354
1381
|
this.removeShortcuts();
|
1382
|
+
if (this._lockManagerTimer)
|
1383
|
+
clearTimeout(this._lockManagerTimer);
|
1355
1384
|
}
|
1356
1385
|
async componentDidLoad() {
|
1357
1386
|
this.applicationLoading.emit(true);
|
@@ -1363,6 +1392,63 @@ const SnkApplication = class {
|
|
1363
1392
|
ElementIDUtils.addIDInfo(this._element, `resource_${this.applicationResourceID}`);
|
1364
1393
|
await this.handleShowNewVersionPopup();
|
1365
1394
|
this.initKeyboardManager();
|
1395
|
+
if (this.enableLockManagerLoadingApp) {
|
1396
|
+
LockManager.addLockManagerCtxId(this._element);
|
1397
|
+
this.resolveApplicationReady();
|
1398
|
+
}
|
1399
|
+
else {
|
1400
|
+
this._applicationReady = true;
|
1401
|
+
}
|
1402
|
+
}
|
1403
|
+
async markToReload() {
|
1404
|
+
if (!this.enableLockManagerLoadingApp)
|
1405
|
+
return;
|
1406
|
+
this._applicationReady = false;
|
1407
|
+
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
1408
|
+
this.resolveApplicationReady();
|
1409
|
+
}
|
1410
|
+
async addLoadingLock(forceReady = false) {
|
1411
|
+
if (!this.enableLockManagerLoadingApp)
|
1412
|
+
return;
|
1413
|
+
if (forceReady) {
|
1414
|
+
this._applicationReady = false;
|
1415
|
+
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
1416
|
+
}
|
1417
|
+
this.resolveApplicationReady();
|
1418
|
+
return await LockManager.lock(this._element, LockManagerOperation.APP_LOADING);
|
1419
|
+
}
|
1420
|
+
async resolveApplicationReady() {
|
1421
|
+
if (this._applicationReady) {
|
1422
|
+
return;
|
1423
|
+
}
|
1424
|
+
try {
|
1425
|
+
await this.checkTimeoutLimitLockManager();
|
1426
|
+
await LockManager.whenHasLock(this._element, LockManagerOperation.APP_LOADING);
|
1427
|
+
await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 1200);
|
1428
|
+
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
1429
|
+
this._applicationReady = true;
|
1430
|
+
}
|
1431
|
+
catch (error) {
|
1432
|
+
console.warn(error);
|
1433
|
+
this._applicationReady = true;
|
1434
|
+
}
|
1435
|
+
}
|
1436
|
+
stopTimeoutLockManager() {
|
1437
|
+
if (this._lockManagerTimer) {
|
1438
|
+
clearTimeout(this._lockManagerTimer);
|
1439
|
+
}
|
1440
|
+
}
|
1441
|
+
async checkTimeoutLimitLockManager() {
|
1442
|
+
this.stopTimeoutLockManager();
|
1443
|
+
if (this._applicationReady)
|
1444
|
+
return;
|
1445
|
+
this._lockManagerTimer = setTimeout(async () => {
|
1446
|
+
if (!this._applicationReady) {
|
1447
|
+
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
1448
|
+
this.stopTimeoutLockManager();
|
1449
|
+
this._applicationReady = true;
|
1450
|
+
}
|
1451
|
+
}, this._maxTimeLockAppLoading);
|
1366
1452
|
}
|
1367
1453
|
initKeyboardManager() {
|
1368
1454
|
this._keyboardManager
|
@@ -1376,8 +1462,40 @@ const SnkApplication = class {
|
|
1376
1462
|
.unbind("ctrl + d")
|
1377
1463
|
.unbind("F1");
|
1378
1464
|
}
|
1465
|
+
// TODO: Etapa 2 - implementar template de loading
|
1466
|
+
renderLoadingSkeleton(template) {
|
1467
|
+
if (this.enableLockManagerLoadingApp) {
|
1468
|
+
if (!this._isBrowserTypeElectron) {
|
1469
|
+
switch (template) {
|
1470
|
+
case TEMPLATES_LOADING_SKELETON.APPLICATION:
|
1471
|
+
case TEMPLATES_LOADING_SKELETON.GRID:
|
1472
|
+
return this.getSkeletonTemplateApplication();
|
1473
|
+
default:
|
1474
|
+
return this.getSkeletonTemplateApplication();
|
1475
|
+
}
|
1476
|
+
}
|
1477
|
+
else {
|
1478
|
+
return this.getSpinnerLoadingDefault();
|
1479
|
+
}
|
1480
|
+
}
|
1481
|
+
}
|
1482
|
+
getLoadingVisibilityStyle() {
|
1483
|
+
return {
|
1484
|
+
visibility: this._applicationReady ? "hidden" : "initial",
|
1485
|
+
display: this._applicationReady ? "none" : "unset"
|
1486
|
+
};
|
1487
|
+
}
|
1488
|
+
getSkeletonTemplateApplication() {
|
1489
|
+
return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-margin--medium ez-margin-top--extra-small" }, h("ez-skeleton", { count: 1, variant: "rect", width: "100%", height: "150px", animation: "progress" })), h("div", { class: "ez-flex ez-flex--align-items-stretch skeleton-content" }, h("div", { class: "skeleton-content-left ez-margin--medium" }, h("ez-skeleton", { count: 1, variant: "rect", width: "100%", height: "calc(100% - 15px)", animation: "progress", marginBottom: "20px" })), h("div", { class: "ez-flex-item--auto skeleton-content-right ez-margin--medium" }, h("ez-skeleton", { count: this.getCountSkeleton("skeleton-content-right", 50, 20), variant: "rect", width: "100%", height: "49px", animation: "progress", marginBottom: "20px" }))), h("div", { class: "skeleton-content-footer ez-margin--medium ez-margin-top--extra-small" }, h("ez-skeleton", { count: 1, variant: "rect", width: "100%", height: "100px", animation: "progress" }))));
|
1490
|
+
}
|
1491
|
+
getSpinnerLoadingDefault() {
|
1492
|
+
return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-flex ez-size-height--full ez-size-width--full ez-flex--justify-center ez-flex--align-items-center spinner" }, h("ez-icon", { iconName: "sync", size: "x-large", class: "spin" }), h("span", { class: "ez-title ez-title--secondary ez-title--extra-large" }, "Carregando..."))));
|
1493
|
+
}
|
1379
1494
|
render() {
|
1380
|
-
return (h(
|
1495
|
+
return (h(Host, { style: {
|
1496
|
+
visibility: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden",
|
1497
|
+
overflow: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden"
|
1498
|
+
} }, h("div", null, h("ez-loading-bar", { ref: (ref) => this._requestListener.ezLoadingBar = ref }), h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "small", closeOutsideClick: true, closeEsc: true }), this.renderLoadingSkeleton())));
|
1381
1499
|
}
|
1382
1500
|
get _element() { return getElement(this); }
|
1383
1501
|
static get watchers() { return {
|
@@ -1390,6 +1508,11 @@ class PendingPromise {
|
|
1390
1508
|
this.reject = reject;
|
1391
1509
|
}
|
1392
1510
|
}
|
1511
|
+
var TEMPLATES_LOADING_SKELETON;
|
1512
|
+
(function (TEMPLATES_LOADING_SKELETON) {
|
1513
|
+
TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["APPLICATION"] = 1] = "APPLICATION";
|
1514
|
+
TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["GRID"] = 2] = "GRID";
|
1515
|
+
})(TEMPLATES_LOADING_SKELETON || (TEMPLATES_LOADING_SKELETON = {}));
|
1393
1516
|
SnkApplication.style = snkApplicationCss;
|
1394
1517
|
|
1395
1518
|
export { SnkApplication as snk_application };
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-a7d3d3f1.js';
|
2
2
|
import { ApplicationContext, DataType, Action, UserInterface, StringUtils, DataUnit } from '@sankhyalabs/core';
|
3
3
|
import { D as DataFetcher } from './DataFetcher-5034df59.js';
|
4
|
-
import './pesquisa-fetcher-
|
4
|
+
import './pesquisa-fetcher-c437c9b1.js';
|
5
5
|
import './index-3aa4977a.js';
|
6
6
|
import { S as SaveErrorsEnum } from './ISave-d8c8bc59.js';
|
7
|
-
import { P as PreloadManager, b as buildLoadDataResponse, D as DataUnitFetcher, I as InMemoryLoader } from './dataunit-fetcher-
|
7
|
+
import { P as PreloadManager, b as buildLoadDataResponse, D as DataUnitFetcher, I as InMemoryLoader } from './dataunit-fetcher-481e159d.js';
|
8
8
|
import './filter-item-type.enum-d45e026f.js';
|
9
9
|
import './form-config-fetcher-0c2620ef.js';
|
10
10
|
import { V as VIEW_MODE } from './constants-7302ee87.js';
|
@@ -2,12 +2,12 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
|
|
2
2
|
import { StringUtils, ElementIDUtils, ApplicationContext, JSUtils, FloatingManager } from '@sankhyalabs/core';
|
3
3
|
import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
|
4
4
|
import './DataFetcher-5034df59.js';
|
5
|
-
import './pesquisa-fetcher-
|
5
|
+
import './pesquisa-fetcher-c437c9b1.js';
|
6
6
|
import { P as PresentationMode } from './index-3aa4977a.js';
|
7
7
|
import './ISave-d8c8bc59.js';
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
-
import './dataunit-fetcher-
|
10
|
+
import './dataunit-fetcher-481e159d.js';
|
11
11
|
import './filter-item-type.enum-d45e026f.js';
|
12
12
|
import './form-config-fetcher-0c2620ef.js';
|
13
13
|
import { V as VIEW_MODE } from './constants-7302ee87.js';
|
@@ -38,6 +38,8 @@ const SnkCrud = class {
|
|
38
38
|
this._currentViewMode = VIEW_MODE.GRID;
|
39
39
|
this._canEdit = undefined;
|
40
40
|
this._resourceID = undefined;
|
41
|
+
this.enableLockManagerLoadingComp = false;
|
42
|
+
this.enableLockManagerTaskbarClick = false;
|
41
43
|
this.configName = undefined;
|
42
44
|
this.filterBarTitle = undefined;
|
43
45
|
this.selectionToastConfig = undefined;
|
@@ -59,7 +61,6 @@ const SnkCrud = class {
|
|
59
61
|
this.enableGridInsert = false;
|
60
62
|
this.domainMessagesBuilder = undefined;
|
61
63
|
this.ignoreReadOnlyFormFields = undefined;
|
62
|
-
this.enableLockManger = false;
|
63
64
|
this.setCustomFormTitle = undefined;
|
64
65
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
65
66
|
}
|
@@ -406,7 +407,7 @@ const SnkCrud = class {
|
|
406
407
|
return;
|
407
408
|
}
|
408
409
|
this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
|
409
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, 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,
|
410
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, 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 }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(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 }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), 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 })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
410
411
|
}
|
411
412
|
get _element() { return getElement(this); }
|
412
413
|
static get watchers() { return {
|
@@ -4,12 +4,12 @@ import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/
|
|
4
4
|
import { D as DataExporterOption, a as DataExporterType, b as DataExporterFormat } from './index-3aa4977a.js';
|
5
5
|
import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants-7302ee87.js';
|
6
6
|
import { D as DataFetcher } from './DataFetcher-5034df59.js';
|
7
|
-
import { S as SnkDataUnit } from './snk-data-unit-
|
8
|
-
import './pesquisa-fetcher-
|
7
|
+
import { S as SnkDataUnit } from './snk-data-unit-d4ba54d7.js';
|
8
|
+
import './pesquisa-fetcher-c437c9b1.js';
|
9
9
|
import './ISave-d8c8bc59.js';
|
10
10
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
11
11
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
12
|
-
import './dataunit-fetcher-
|
12
|
+
import './dataunit-fetcher-481e159d.js';
|
13
13
|
import './filter-item-type.enum-d45e026f.js';
|
14
14
|
import './form-config-fetcher-0c2620ef.js';
|
15
15
|
import './PrintUtils-3e4ff0f5.js';
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, g as getElement, H as Host
|
|
2
2
|
import { Action, ObjectUtils, DataUnitAction, StringUtils, ApplicationContext } from '@sankhyalabs/core';
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
4
|
import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder-6fff4a4c.js';
|
5
|
-
import { g as getRecordValue, a as DatasetStrategy } from './dataunit-fetcher-
|
5
|
+
import { g as getRecordValue, a as DatasetStrategy } from './dataunit-fetcher-481e159d.js';
|
6
6
|
import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
7
7
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
8
8
|
|
@@ -1,9 +1,9 @@
|
|
1
|
-
export { S as snk_data_unit } from './snk-data-unit-
|
1
|
+
export { S as snk_data_unit } from './snk-data-unit-d4ba54d7.js';
|
2
2
|
import './index-a7d3d3f1.js';
|
3
3
|
import '@sankhyalabs/core';
|
4
4
|
import '@sankhyalabs/ezui/dist/collection/utils';
|
5
5
|
import './SnkMessageBuilder-6fff4a4c.js';
|
6
|
-
import './dataunit-fetcher-
|
6
|
+
import './dataunit-fetcher-481e159d.js';
|
7
7
|
import './DataFetcher-5034df59.js';
|
8
8
|
import './PrintUtils-3e4ff0f5.js';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
@@ -3,17 +3,17 @@ import { Action } from '@sankhyalabs/core';
|
|
3
3
|
import { S as SnkFormConfigManager } from './SnkFormConfigManager-a7770e24.js';
|
4
4
|
import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
5
5
|
import './DataFetcher-5034df59.js';
|
6
|
-
import './pesquisa-fetcher-
|
6
|
+
import './pesquisa-fetcher-c437c9b1.js';
|
7
7
|
import { P as PresentationMode } from './index-3aa4977a.js';
|
8
8
|
import './ISave-d8c8bc59.js';
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
|
-
import './dataunit-fetcher-
|
11
|
+
import './dataunit-fetcher-481e159d.js';
|
12
12
|
import './filter-item-type.enum-d45e026f.js';
|
13
13
|
import './form-config-fetcher-0c2620ef.js';
|
14
14
|
import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
|
15
15
|
import { V as VIEW_MODE } from './constants-7302ee87.js';
|
16
|
-
import { S as SnkGuidesViewer } from './snk-guides-viewer-
|
16
|
+
import { S as SnkGuidesViewer } from './snk-guides-viewer-3043422d.js';
|
17
17
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-6fff4a4c.js';
|
18
18
|
import './ConfigStorage-ff99377a.js';
|
19
19
|
import './PrintUtils-3e4ff0f5.js';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
|
-
import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext, FloatingManager, DateUtils, MaskFormatter, ArrayUtils } from '@sankhyalabs/core';
|
2
|
+
import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext, LockManager, LockManagerOperation, FloatingManager, DateUtils, MaskFormatter, ArrayUtils } from '@sankhyalabs/core';
|
3
3
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
4
4
|
import { C as ConfigStorage } from './ConfigStorage-ff99377a.js';
|
5
5
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
@@ -262,6 +262,7 @@ const SnkFilterBar = class {
|
|
262
262
|
this._firstLoad = true;
|
263
263
|
this._pendingVariables = false;
|
264
264
|
this._customfiltersToBeUpdated = [];
|
265
|
+
this._resolveLoading = undefined;
|
265
266
|
this._calculateSortIndex = (item) => {
|
266
267
|
if (!item.visible)
|
267
268
|
return 0;
|
@@ -275,6 +276,7 @@ const SnkFilterBar = class {
|
|
275
276
|
this._filtersComparator = (a, b) => {
|
276
277
|
return this._calculateSortIndex(b) - this._calculateSortIndex(a);
|
277
278
|
};
|
279
|
+
this.enableLockManagerLoadingComp = false;
|
278
280
|
this.customFilterBarConfig = undefined;
|
279
281
|
this.dataUnit = undefined;
|
280
282
|
this.title = undefined;
|
@@ -695,14 +697,26 @@ const SnkFilterBar = class {
|
|
695
697
|
this.personalizedFilterId = undefined;
|
696
698
|
this.showPersonalizedFilter = false;
|
697
699
|
}
|
698
|
-
componentWillLoad() {
|
699
|
-
|
700
|
-
|
701
|
-
this.
|
702
|
-
this.
|
703
|
-
this.
|
700
|
+
async componentWillLoad() {
|
701
|
+
var _a;
|
702
|
+
try {
|
703
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
704
|
+
await this.attachDataUnit();
|
705
|
+
if (this._application) {
|
706
|
+
if (this._application.enableLockManagerLoadingApp && this.enableLockManagerLoadingComp) {
|
707
|
+
const appLoadLockerID = LockManager.addLockManagerCtxId(this._element);
|
708
|
+
this._resolveLoading = LockManager.lock(appLoadLockerID, LockManagerOperation.APP_LOADING);
|
709
|
+
}
|
710
|
+
await Promise.all([
|
711
|
+
this.loadPermitions(),
|
712
|
+
this.addFilterBarLegacyConfigName(),
|
713
|
+
this.loadConfigFromStorage(),
|
714
|
+
]);
|
715
|
+
}
|
716
|
+
}
|
717
|
+
finally {
|
718
|
+
(_a = this._resolveLoading) === null || _a === void 0 ? void 0 : _a.call(this);
|
704
719
|
}
|
705
|
-
this.attachDataUnit();
|
706
720
|
}
|
707
721
|
componentDidRender() {
|
708
722
|
this.processPendingFilter();
|
@@ -5,14 +5,14 @@ import { C as ConfigStorage } from './ConfigStorage-ff99377a.js';
|
|
5
5
|
import { P as PresentationMode } from './index-3aa4977a.js';
|
6
6
|
import { T as TaskbarProcessor, o as openFieldSearch, b as buildFieldSearch } from './field-search-f8b1d91e.js';
|
7
7
|
import { s as store } from './index-bdf75557.js';
|
8
|
-
import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils } from './ContinuousInsertUtils-
|
8
|
+
import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils } from './ContinuousInsertUtils-15b5f1da.js';
|
9
9
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
10
10
|
import './DataFetcher-5034df59.js';
|
11
|
-
import './pesquisa-fetcher-
|
11
|
+
import './pesquisa-fetcher-c437c9b1.js';
|
12
12
|
import './ISave-d8c8bc59.js';
|
13
13
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
14
14
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
15
|
-
import './dataunit-fetcher-
|
15
|
+
import './dataunit-fetcher-481e159d.js';
|
16
16
|
import './filter-item-type.enum-d45e026f.js';
|
17
17
|
import './form-config-fetcher-0c2620ef.js';
|
18
18
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
@@ -119,6 +119,8 @@ const SnkGrid = class {
|
|
119
119
|
this._showSnkFilterBar = true;
|
120
120
|
this._enableContinuousInsert = false;
|
121
121
|
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
122
|
+
this.enableLockManagerLoadingComp = false;
|
123
|
+
this.enableLockManagerTaskbarClick = false;
|
122
124
|
this.configName = undefined;
|
123
125
|
this.filterBarTitle = undefined;
|
124
126
|
this.resourceID = undefined;
|
@@ -142,7 +144,6 @@ const SnkGrid = class {
|
|
142
144
|
this.autoLoad = undefined;
|
143
145
|
this.autoFocus = true;
|
144
146
|
this.enableGridInsert = false;
|
145
|
-
this.enableLockManger = false;
|
146
147
|
this.outlineMode = false;
|
147
148
|
}
|
148
149
|
/**
|
@@ -532,7 +533,7 @@ const SnkGrid = class {
|
|
532
533
|
return undefined;
|
533
534
|
}
|
534
535
|
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
|
535
|
-
h(Fragment, null, 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 }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), 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' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === 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,
|
536
|
+
h(Fragment, null, 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 }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), 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' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === 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 }, 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 }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
536
537
|
}
|
537
538
|
get _element() { return getElement(this); }
|
538
539
|
static get watchers() { return {
|
@@ -6,12 +6,12 @@ import { o as openFieldSearch, T as TaskbarProcessor, b as buildFieldSearch } fr
|
|
6
6
|
import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
|
7
7
|
import { V as VIEW_MODE } from './constants-7302ee87.js';
|
8
8
|
import './DataFetcher-5034df59.js';
|
9
|
-
import './pesquisa-fetcher-
|
9
|
+
import './pesquisa-fetcher-c437c9b1.js';
|
10
10
|
import { P as PresentationMode } from './index-3aa4977a.js';
|
11
11
|
import './ISave-d8c8bc59.js';
|
12
12
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
13
13
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
14
|
-
import './dataunit-fetcher-
|
14
|
+
import './dataunit-fetcher-481e159d.js';
|
15
15
|
import './filter-item-type.enum-d45e026f.js';
|
16
16
|
import './form-config-fetcher-0c2620ef.js';
|
17
17
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { S as snk_guides_viewer } from './snk-guides-viewer-
|
1
|
+
export { S as snk_guides_viewer } from './snk-guides-viewer-3043422d.js';
|
2
2
|
import './index-a7d3d3f1.js';
|
3
3
|
import '@sankhyalabs/core';
|
4
4
|
import './SnkFormConfigManager-a7770e24.js';
|
@@ -14,10 +14,10 @@ import './field-search-f8b1d91e.js';
|
|
14
14
|
import './taskbar-elements-d59867f1.js';
|
15
15
|
import './index-3aa4977a.js';
|
16
16
|
import './index-bdf75557.js';
|
17
|
-
import './pesquisa-fetcher-
|
17
|
+
import './pesquisa-fetcher-c437c9b1.js';
|
18
18
|
import './ISave-d8c8bc59.js';
|
19
19
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
20
|
-
import './dataunit-fetcher-
|
20
|
+
import './dataunit-fetcher-481e159d.js';
|
21
21
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
22
22
|
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
23
23
|
import './ResourceIDUtils-a114189a.js';
|