@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,6 +1,6 @@
|
|
1
|
-
import { ApplicationContext, DataType, DependencyType, ElementIDUtils, ErrorTracking, OnboardingUtils, StringUtils, KeyboardManager, ObjectUtils, ArrayUtils, SearchUtils } from "@sankhyalabs/core";
|
1
|
+
import { LockManager, ApplicationContext, DataType, DependencyType, ElementIDUtils, ErrorTracking, OnboardingUtils, StringUtils, KeyboardManager, ObjectUtils, ArrayUtils, SearchUtils, LockManagerOperation, UserAgentUtils } from "@sankhyalabs/core";
|
2
2
|
import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
|
3
|
-
import { h } from "@stencil/core";
|
3
|
+
import { Host, h } from "@stencil/core";
|
4
4
|
import AppletCaller from "../../lib/applet-caller/applet-caller";
|
5
5
|
import MGEAuthorization from '../../lib/auth/mgeauthorization.module';
|
6
6
|
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
@@ -31,9 +31,13 @@ export class SnkApplication {
|
|
31
31
|
this._duCache = new Map();
|
32
32
|
this._duPromises = new Map();
|
33
33
|
this._requestListener = RequestListenerFactory.create({ strategy: 'request_time' });
|
34
|
+
this._maxTimeLockAppLoading = 10000;
|
35
|
+
this._isBrowserTypeElectron = false;
|
34
36
|
this._pendingActions = new Map;
|
35
37
|
this._loadPkParameter = null;
|
36
38
|
this._isLoadedByPk = false;
|
39
|
+
this._applicationReady = false;
|
40
|
+
this.enableLockManagerLoadingApp = undefined;
|
37
41
|
this.messagesBuilder = undefined;
|
38
42
|
this.configName = undefined;
|
39
43
|
this.gridLegacyConfigName = undefined;
|
@@ -519,15 +523,21 @@ export class SnkApplication {
|
|
519
523
|
return Promise.resolve(this._isLoadedByPk);
|
520
524
|
}
|
521
525
|
/**
|
522
|
-
|
523
|
-
|
524
|
-
|
526
|
+
* Remove registro do cache do PreLoader do dataunit.
|
527
|
+
* Deve ser usado quando existe um dataunit usando loader do application, mas o removeLoader está sendo sobrescrito.
|
528
|
+
*/
|
525
529
|
async preloadMangerRemoveRecord(dataUnit, recordsIDs) {
|
526
530
|
const records = recordsIDs.map(id => {
|
527
531
|
return { "__record__id__": id };
|
528
532
|
});
|
529
533
|
PreloadManager.removeRecords(dataUnit, records);
|
530
534
|
}
|
535
|
+
getCountSkeleton(className, skeletonHeight, spacingSkeleton) {
|
536
|
+
let containerHeight = window.innerHeight - 350;
|
537
|
+
spacingSkeleton = !spacingSkeleton ? 20 : spacingSkeleton;
|
538
|
+
let skeletonCount = Math.floor(containerHeight / (skeletonHeight + spacingSkeleton));
|
539
|
+
return skeletonCount || 1;
|
540
|
+
}
|
531
541
|
async getAuthList(auth) {
|
532
542
|
return await (new MGEAuthorization()).parseFromJSON(auth);
|
533
543
|
}
|
@@ -569,14 +579,14 @@ export class SnkApplication {
|
|
569
579
|
* Obtém as opções em componentes de pesquisa
|
570
580
|
* Ex.: snk-config-options
|
571
581
|
*/
|
572
|
-
async executeSearch(searchArgument, fieldName, dataUnit) {
|
582
|
+
async executeSearch(searchArgument, fieldName, dataUnit, ctxOptions) {
|
573
583
|
const descriptor = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(fieldName);
|
574
584
|
if (!descriptor) {
|
575
585
|
//TODO: Implementar mensagem de erro
|
576
586
|
}
|
577
587
|
else {
|
578
588
|
const { mode, argument } = searchArgument;
|
579
|
-
const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY } = descriptor.properties;
|
589
|
+
const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY, ISHIERARCHYENTITY } = descriptor.properties;
|
580
590
|
const dependencies = descriptor.dependencies;
|
581
591
|
let criteria;
|
582
592
|
const searchOptions = {
|
@@ -606,7 +616,16 @@ export class SnkApplication {
|
|
606
616
|
}
|
607
617
|
}
|
608
618
|
});
|
609
|
-
|
619
|
+
const allowsNonAnalytic = ctxOptions === null || ctxOptions === void 0 ? void 0 : ctxOptions.allowsNonAnalytic;
|
620
|
+
const options = {
|
621
|
+
entity: ENTITYNAME,
|
622
|
+
entityDescription: DESCRIPTIONENTITY,
|
623
|
+
isHierarchyEntity: ISHIERARCHYENTITY,
|
624
|
+
criteria,
|
625
|
+
searchOptions,
|
626
|
+
allowsNonAnalytic
|
627
|
+
};
|
628
|
+
return this.executePreparedSearch(mode, argument, options);
|
610
629
|
}
|
611
630
|
}
|
612
631
|
filterInvalidFields(resp, item, mdByName) {
|
@@ -656,13 +675,19 @@ export class SnkApplication {
|
|
656
675
|
*/
|
657
676
|
async executePreparedSearch(mode, argument, options) {
|
658
677
|
const mdByName = {};
|
659
|
-
const { entity, entityDescription, criteria, searchOptions } = options;
|
678
|
+
const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic } = options;
|
660
679
|
if (mode === "ADVANCED") {
|
661
680
|
return new Promise((accept, reject) => {
|
662
681
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
663
682
|
pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
683
|
+
pesquisaContent.entityName = entity;
|
664
684
|
pesquisaContent.argument = argument;
|
665
685
|
pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
686
|
+
pesquisaContent.isHierarchyEntity = isHierarchyEntity;
|
687
|
+
if (isHierarchyEntity) {
|
688
|
+
pesquisaContent.treeLoader = (text) => this.pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
|
689
|
+
pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
|
690
|
+
}
|
666
691
|
pesquisaContent.selectItem = (option) => {
|
667
692
|
accept(option);
|
668
693
|
this.clearPopUpTitle();
|
@@ -970,8 +995,8 @@ export class SnkApplication {
|
|
970
995
|
this._errorHandler = new SnkErrorHandler(this);
|
971
996
|
this.messagesBuilder = new SnkMessageBuilder();
|
972
997
|
ApplicationContext.setContextValue("__EZUI__UPLOAD__ADD__URL__", `${UrlUtils.getUrlBase()}/mge/upload/file`);
|
973
|
-
ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit) => {
|
974
|
-
return this.executeSearch(searchArgument, fieldName, dataUnit);
|
998
|
+
ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit, ctxOptions) => {
|
999
|
+
return this.executeSearch(searchArgument, fieldName, dataUnit, ctxOptions);
|
975
1000
|
});
|
976
1001
|
ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
977
1002
|
this.registerPkChangeListener();
|
@@ -985,12 +1010,15 @@ export class SnkApplication {
|
|
985
1010
|
this._waitingAppReady.forEach(resolve => resolve());
|
986
1011
|
}
|
987
1012
|
connectedCallback() {
|
1013
|
+
this._isBrowserTypeElectron = UserAgentUtils.isElectron();
|
988
1014
|
ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
|
989
1015
|
DataFetcher.addRequestListener(this._requestListener);
|
990
1016
|
}
|
991
1017
|
disconnectedCallback() {
|
992
|
-
DataFetcher.removeRequestListener(this._requestListener);
|
1018
|
+
DataFetcher === null || DataFetcher === void 0 ? void 0 : DataFetcher.removeRequestListener(this._requestListener);
|
993
1019
|
this.removeShortcuts();
|
1020
|
+
if (this._lockManagerTimer)
|
1021
|
+
clearTimeout(this._lockManagerTimer);
|
994
1022
|
}
|
995
1023
|
async componentDidLoad() {
|
996
1024
|
this.applicationLoading.emit(true);
|
@@ -1002,6 +1030,64 @@ export class SnkApplication {
|
|
1002
1030
|
ElementIDUtils.addIDInfo(this._element, `resource_${this.applicationResourceID}`);
|
1003
1031
|
await this.handleShowNewVersionPopup();
|
1004
1032
|
this.initKeyboardManager();
|
1033
|
+
if (this.enableLockManagerLoadingApp) {
|
1034
|
+
LockManager.addLockManagerCtxId(this._element);
|
1035
|
+
this.resolveApplicationReady();
|
1036
|
+
}
|
1037
|
+
else {
|
1038
|
+
this._applicationReady = true;
|
1039
|
+
}
|
1040
|
+
}
|
1041
|
+
async markToReload() {
|
1042
|
+
if (!this.enableLockManagerLoadingApp)
|
1043
|
+
return;
|
1044
|
+
this._applicationReady = false;
|
1045
|
+
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
1046
|
+
this.resolveApplicationReady();
|
1047
|
+
}
|
1048
|
+
async addLoadingLock(forceReady = false) {
|
1049
|
+
if (!this.enableLockManagerLoadingApp)
|
1050
|
+
return;
|
1051
|
+
if (forceReady) {
|
1052
|
+
this._applicationReady = false;
|
1053
|
+
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
1054
|
+
}
|
1055
|
+
this.resolveApplicationReady();
|
1056
|
+
return await LockManager.lock(this._element, LockManagerOperation.APP_LOADING);
|
1057
|
+
}
|
1058
|
+
async resolveApplicationReady() {
|
1059
|
+
if (this._applicationReady) {
|
1060
|
+
return;
|
1061
|
+
}
|
1062
|
+
;
|
1063
|
+
try {
|
1064
|
+
await this.checkTimeoutLimitLockManager();
|
1065
|
+
await LockManager.whenHasLock(this._element, LockManagerOperation.APP_LOADING);
|
1066
|
+
await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 1200);
|
1067
|
+
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
1068
|
+
this._applicationReady = true;
|
1069
|
+
}
|
1070
|
+
catch (error) {
|
1071
|
+
console.warn(error);
|
1072
|
+
this._applicationReady = true;
|
1073
|
+
}
|
1074
|
+
}
|
1075
|
+
stopTimeoutLockManager() {
|
1076
|
+
if (this._lockManagerTimer) {
|
1077
|
+
clearTimeout(this._lockManagerTimer);
|
1078
|
+
}
|
1079
|
+
}
|
1080
|
+
async checkTimeoutLimitLockManager() {
|
1081
|
+
this.stopTimeoutLockManager();
|
1082
|
+
if (this._applicationReady)
|
1083
|
+
return;
|
1084
|
+
this._lockManagerTimer = setTimeout(async () => {
|
1085
|
+
if (!this._applicationReady) {
|
1086
|
+
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
1087
|
+
this.stopTimeoutLockManager();
|
1088
|
+
this._applicationReady = true;
|
1089
|
+
}
|
1090
|
+
}, this._maxTimeLockAppLoading);
|
1005
1091
|
}
|
1006
1092
|
initKeyboardManager() {
|
1007
1093
|
this._keyboardManager
|
@@ -1015,8 +1101,40 @@ export class SnkApplication {
|
|
1015
1101
|
.unbind("ctrl + d")
|
1016
1102
|
.unbind("F1");
|
1017
1103
|
}
|
1104
|
+
// TODO: Etapa 2 - implementar template de loading
|
1105
|
+
renderLoadingSkeleton(template) {
|
1106
|
+
if (this.enableLockManagerLoadingApp) {
|
1107
|
+
if (!this._isBrowserTypeElectron) {
|
1108
|
+
switch (template) {
|
1109
|
+
case TEMPLATES_LOADING_SKELETON.APPLICATION:
|
1110
|
+
case TEMPLATES_LOADING_SKELETON.GRID:
|
1111
|
+
return this.getSkeletonTemplateApplication();
|
1112
|
+
default:
|
1113
|
+
return this.getSkeletonTemplateApplication();
|
1114
|
+
}
|
1115
|
+
}
|
1116
|
+
else {
|
1117
|
+
return this.getSpinnerLoadingDefault();
|
1118
|
+
}
|
1119
|
+
}
|
1120
|
+
}
|
1121
|
+
getLoadingVisibilityStyle() {
|
1122
|
+
return {
|
1123
|
+
visibility: this._applicationReady ? "hidden" : "initial",
|
1124
|
+
display: this._applicationReady ? "none" : "unset"
|
1125
|
+
};
|
1126
|
+
}
|
1127
|
+
getSkeletonTemplateApplication() {
|
1128
|
+
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" }))));
|
1129
|
+
}
|
1130
|
+
getSpinnerLoadingDefault() {
|
1131
|
+
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..."))));
|
1132
|
+
}
|
1018
1133
|
render() {
|
1019
|
-
return (h(
|
1134
|
+
return (h(Host, { style: {
|
1135
|
+
visibility: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden",
|
1136
|
+
overflow: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden"
|
1137
|
+
} }, 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())));
|
1020
1138
|
}
|
1021
1139
|
static get is() { return "snk-application"; }
|
1022
1140
|
static get encapsulation() { return "scoped"; }
|
@@ -1032,6 +1150,23 @@ export class SnkApplication {
|
|
1032
1150
|
}
|
1033
1151
|
static get properties() {
|
1034
1152
|
return {
|
1153
|
+
"enableLockManagerLoadingApp": {
|
1154
|
+
"type": "boolean",
|
1155
|
+
"mutable": false,
|
1156
|
+
"complexType": {
|
1157
|
+
"original": "boolean",
|
1158
|
+
"resolved": "boolean",
|
1159
|
+
"references": {}
|
1160
|
+
},
|
1161
|
+
"required": false,
|
1162
|
+
"optional": false,
|
1163
|
+
"docs": {
|
1164
|
+
"tags": [],
|
1165
|
+
"text": "Define se o componente deve usar o LockManager para controle de carregamento da aplica\u00E7\u00E3o"
|
1166
|
+
},
|
1167
|
+
"attribute": "enable-lock-manager-loading-app",
|
1168
|
+
"reflect": false
|
1169
|
+
},
|
1035
1170
|
"messagesBuilder": {
|
1036
1171
|
"type": "unknown",
|
1037
1172
|
"mutable": true,
|
@@ -1124,6 +1259,11 @@ export class SnkApplication {
|
|
1124
1259
|
}
|
1125
1260
|
};
|
1126
1261
|
}
|
1262
|
+
static get states() {
|
1263
|
+
return {
|
1264
|
+
"_applicationReady": {}
|
1265
|
+
};
|
1266
|
+
}
|
1127
1267
|
static get events() {
|
1128
1268
|
return [{
|
1129
1269
|
"method": "applicationLoaded",
|
@@ -2243,7 +2383,7 @@ export class SnkApplication {
|
|
2243
2383
|
},
|
2244
2384
|
"executeSearch": {
|
2245
2385
|
"complexType": {
|
2246
|
-
"signature": "(searchArgument: ISearchArgument, fieldName: string, dataUnit: DataUnit) => Promise<Array<IOption> | IOption>",
|
2386
|
+
"signature": "(searchArgument: ISearchArgument, fieldName: string, dataUnit: DataUnit, ctxOptions?: any) => Promise<Array<IOption> | IOption>",
|
2247
2387
|
"parameters": [{
|
2248
2388
|
"tags": [],
|
2249
2389
|
"text": ""
|
@@ -2253,6 +2393,9 @@ export class SnkApplication {
|
|
2253
2393
|
}, {
|
2254
2394
|
"tags": [],
|
2255
2395
|
"text": ""
|
2396
|
+
}, {
|
2397
|
+
"tags": [],
|
2398
|
+
"text": ""
|
2256
2399
|
}],
|
2257
2400
|
"references": {
|
2258
2401
|
"Promise": {
|
@@ -2543,6 +2686,41 @@ export class SnkApplication {
|
|
2543
2686
|
"text": "value - String convers\u00EDvel de acordo com o tipo do par\u00E2metro"
|
2544
2687
|
}]
|
2545
2688
|
}
|
2689
|
+
},
|
2690
|
+
"markToReload": {
|
2691
|
+
"complexType": {
|
2692
|
+
"signature": "() => Promise<void>",
|
2693
|
+
"parameters": [],
|
2694
|
+
"references": {
|
2695
|
+
"Promise": {
|
2696
|
+
"location": "global"
|
2697
|
+
}
|
2698
|
+
},
|
2699
|
+
"return": "Promise<void>"
|
2700
|
+
},
|
2701
|
+
"docs": {
|
2702
|
+
"text": "",
|
2703
|
+
"tags": []
|
2704
|
+
}
|
2705
|
+
},
|
2706
|
+
"addLoadingLock": {
|
2707
|
+
"complexType": {
|
2708
|
+
"signature": "(forceReady?: boolean) => Promise<() => void>",
|
2709
|
+
"parameters": [{
|
2710
|
+
"tags": [],
|
2711
|
+
"text": ""
|
2712
|
+
}],
|
2713
|
+
"references": {
|
2714
|
+
"Promise": {
|
2715
|
+
"location": "global"
|
2716
|
+
}
|
2717
|
+
},
|
2718
|
+
"return": "Promise<() => void>"
|
2719
|
+
},
|
2720
|
+
"docs": {
|
2721
|
+
"text": "",
|
2722
|
+
"tags": []
|
2723
|
+
}
|
2546
2724
|
}
|
2547
2725
|
};
|
2548
2726
|
}
|
@@ -2560,3 +2738,8 @@ class PendingPromise {
|
|
2560
2738
|
this.reject = reject;
|
2561
2739
|
}
|
2562
2740
|
}
|
2741
|
+
var TEMPLATES_LOADING_SKELETON;
|
2742
|
+
(function (TEMPLATES_LOADING_SKELETON) {
|
2743
|
+
TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["APPLICATION"] = 1] = "APPLICATION";
|
2744
|
+
TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["GRID"] = 2] = "GRID";
|
2745
|
+
})(TEMPLATES_LOADING_SKELETON || (TEMPLATES_LOADING_SKELETON = {}));
|
@@ -21,6 +21,8 @@ export class SnkCrud {
|
|
21
21
|
this._currentViewMode = VIEW_MODE.GRID;
|
22
22
|
this._canEdit = undefined;
|
23
23
|
this._resourceID = undefined;
|
24
|
+
this.enableLockManagerLoadingComp = false;
|
25
|
+
this.enableLockManagerTaskbarClick = false;
|
24
26
|
this.configName = undefined;
|
25
27
|
this.filterBarTitle = undefined;
|
26
28
|
this.selectionToastConfig = undefined;
|
@@ -42,7 +44,6 @@ export class SnkCrud {
|
|
42
44
|
this.enableGridInsert = false;
|
43
45
|
this.domainMessagesBuilder = undefined;
|
44
46
|
this.ignoreReadOnlyFormFields = undefined;
|
45
|
-
this.enableLockManger = false;
|
46
47
|
this.setCustomFormTitle = undefined;
|
47
48
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
48
49
|
}
|
@@ -390,7 +391,7 @@ export class SnkCrud {
|
|
390
391
|
return;
|
391
392
|
}
|
392
393
|
this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
|
393
|
-
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,
|
394
|
+
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" }))));
|
394
395
|
}
|
395
396
|
static get is() { return "snk-crud"; }
|
396
397
|
static get encapsulation() { return "scoped"; }
|
@@ -406,6 +407,42 @@ export class SnkCrud {
|
|
406
407
|
}
|
407
408
|
static get properties() {
|
408
409
|
return {
|
410
|
+
"enableLockManagerLoadingComp": {
|
411
|
+
"type": "boolean",
|
412
|
+
"mutable": false,
|
413
|
+
"complexType": {
|
414
|
+
"original": "boolean",
|
415
|
+
"resolved": "boolean",
|
416
|
+
"references": {}
|
417
|
+
},
|
418
|
+
"required": false,
|
419
|
+
"optional": true,
|
420
|
+
"docs": {
|
421
|
+
"tags": [],
|
422
|
+
"text": "Define se o componente deve usar o LockManager para controle de carregamento da aplica\u00E7\u00E3o"
|
423
|
+
},
|
424
|
+
"attribute": "enable-lock-manager-loading-comp",
|
425
|
+
"reflect": false,
|
426
|
+
"defaultValue": "false"
|
427
|
+
},
|
428
|
+
"enableLockManagerTaskbarClick": {
|
429
|
+
"type": "boolean",
|
430
|
+
"mutable": false,
|
431
|
+
"complexType": {
|
432
|
+
"original": "boolean",
|
433
|
+
"resolved": "boolean",
|
434
|
+
"references": {}
|
435
|
+
},
|
436
|
+
"required": false,
|
437
|
+
"optional": true,
|
438
|
+
"docs": {
|
439
|
+
"tags": [],
|
440
|
+
"text": "Ativa o gerenciamento de locks na grade pela Taskbar."
|
441
|
+
},
|
442
|
+
"attribute": "enable-lock-manager-taskbar-click",
|
443
|
+
"reflect": false,
|
444
|
+
"defaultValue": "false"
|
445
|
+
},
|
409
446
|
"configName": {
|
410
447
|
"type": "string",
|
411
448
|
"mutable": true,
|
@@ -799,24 +836,6 @@ export class SnkCrud {
|
|
799
836
|
"attribute": "ignore-read-only-form-fields",
|
800
837
|
"reflect": false
|
801
838
|
},
|
802
|
-
"enableLockManger": {
|
803
|
-
"type": "boolean",
|
804
|
-
"mutable": false,
|
805
|
-
"complexType": {
|
806
|
-
"original": "boolean",
|
807
|
-
"resolved": "boolean",
|
808
|
-
"references": {}
|
809
|
-
},
|
810
|
-
"required": false,
|
811
|
-
"optional": true,
|
812
|
-
"docs": {
|
813
|
-
"tags": [],
|
814
|
-
"text": "Ativa o gerenciamento de locks na grade."
|
815
|
-
},
|
816
|
-
"attribute": "enable-lock-manger",
|
817
|
-
"reflect": false,
|
818
|
-
"defaultValue": "false"
|
819
|
-
},
|
820
839
|
"setCustomFormTitle": {
|
821
840
|
"type": "unknown",
|
822
841
|
"mutable": false,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ApplicationContext, ElementIDUtils, ObjectUtils, ErrorException } from '@sankhyalabs/core';
|
1
|
+
import { ApplicationContext, ElementIDUtils, ObjectUtils, ErrorException, LockManager, LockManagerOperation } from '@sankhyalabs/core';
|
2
2
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
3
3
|
import { h, Host } from '@stencil/core';
|
4
4
|
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
@@ -14,6 +14,7 @@ export class SnkFilterBar {
|
|
14
14
|
this._firstLoad = true;
|
15
15
|
this._pendingVariables = false;
|
16
16
|
this._customfiltersToBeUpdated = [];
|
17
|
+
this._resolveLoading = undefined;
|
17
18
|
this._calculateSortIndex = (item) => {
|
18
19
|
if (!item.visible)
|
19
20
|
return 0;
|
@@ -27,6 +28,7 @@ export class SnkFilterBar {
|
|
27
28
|
this._filtersComparator = (a, b) => {
|
28
29
|
return this._calculateSortIndex(b) - this._calculateSortIndex(a);
|
29
30
|
};
|
31
|
+
this.enableLockManagerLoadingComp = false;
|
30
32
|
this.customFilterBarConfig = undefined;
|
31
33
|
this.dataUnit = undefined;
|
32
34
|
this.title = undefined;
|
@@ -448,14 +450,26 @@ export class SnkFilterBar {
|
|
448
450
|
this.personalizedFilterId = undefined;
|
449
451
|
this.showPersonalizedFilter = false;
|
450
452
|
}
|
451
|
-
componentWillLoad() {
|
452
|
-
|
453
|
-
|
454
|
-
this.
|
455
|
-
this.
|
456
|
-
this.
|
453
|
+
async componentWillLoad() {
|
454
|
+
var _a;
|
455
|
+
try {
|
456
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
457
|
+
await this.attachDataUnit();
|
458
|
+
if (this._application) {
|
459
|
+
if (this._application.enableLockManagerLoadingApp && this.enableLockManagerLoadingComp) {
|
460
|
+
const appLoadLockerID = LockManager.addLockManagerCtxId(this._element);
|
461
|
+
this._resolveLoading = LockManager.lock(appLoadLockerID, LockManagerOperation.APP_LOADING);
|
462
|
+
}
|
463
|
+
await Promise.all([
|
464
|
+
this.loadPermitions(),
|
465
|
+
this.addFilterBarLegacyConfigName(),
|
466
|
+
this.loadConfigFromStorage(),
|
467
|
+
]);
|
468
|
+
}
|
469
|
+
}
|
470
|
+
finally {
|
471
|
+
(_a = this._resolveLoading) === null || _a === void 0 ? void 0 : _a.call(this);
|
457
472
|
}
|
458
|
-
this.attachDataUnit();
|
459
473
|
}
|
460
474
|
componentDidRender() {
|
461
475
|
this.processPendingFilter();
|
@@ -486,6 +500,24 @@ export class SnkFilterBar {
|
|
486
500
|
}
|
487
501
|
static get properties() {
|
488
502
|
return {
|
503
|
+
"enableLockManagerLoadingComp": {
|
504
|
+
"type": "boolean",
|
505
|
+
"mutable": false,
|
506
|
+
"complexType": {
|
507
|
+
"original": "boolean",
|
508
|
+
"resolved": "boolean",
|
509
|
+
"references": {}
|
510
|
+
},
|
511
|
+
"required": false,
|
512
|
+
"optional": true,
|
513
|
+
"docs": {
|
514
|
+
"tags": [],
|
515
|
+
"text": "Define se o componente deve usar o LockManager para controle de carregamento"
|
516
|
+
},
|
517
|
+
"attribute": "enable-lock-manager-loading-comp",
|
518
|
+
"reflect": false,
|
519
|
+
"defaultValue": "false"
|
520
|
+
},
|
489
521
|
"customFilterBarConfig": {
|
490
522
|
"type": "unknown",
|
491
523
|
"mutable": false,
|
@@ -50,6 +50,8 @@ export class SnkGrid {
|
|
50
50
|
this._showSnkFilterBar = true;
|
51
51
|
this._enableContinuousInsert = false;
|
52
52
|
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
53
|
+
this.enableLockManagerLoadingComp = false;
|
54
|
+
this.enableLockManagerTaskbarClick = false;
|
53
55
|
this.configName = undefined;
|
54
56
|
this.filterBarTitle = undefined;
|
55
57
|
this.resourceID = undefined;
|
@@ -73,7 +75,6 @@ export class SnkGrid {
|
|
73
75
|
this.autoLoad = undefined;
|
74
76
|
this.autoFocus = true;
|
75
77
|
this.enableGridInsert = false;
|
76
|
-
this.enableLockManger = false;
|
77
78
|
this.outlineMode = false;
|
78
79
|
}
|
79
80
|
/**
|
@@ -463,7 +464,7 @@ export class SnkGrid {
|
|
463
464
|
return undefined;
|
464
465
|
}
|
465
466
|
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 &&
|
466
|
-
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,
|
467
|
+
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 }))));
|
467
468
|
}
|
468
469
|
static get is() { return "snk-grid"; }
|
469
470
|
static get encapsulation() { return "scoped"; }
|
@@ -500,6 +501,42 @@ export class SnkGrid {
|
|
500
501
|
},
|
501
502
|
"defaultValue": "new SnkMultiSelectionListDataSource()"
|
502
503
|
},
|
504
|
+
"enableLockManagerLoadingComp": {
|
505
|
+
"type": "boolean",
|
506
|
+
"mutable": false,
|
507
|
+
"complexType": {
|
508
|
+
"original": "boolean",
|
509
|
+
"resolved": "boolean",
|
510
|
+
"references": {}
|
511
|
+
},
|
512
|
+
"required": false,
|
513
|
+
"optional": true,
|
514
|
+
"docs": {
|
515
|
+
"tags": [],
|
516
|
+
"text": "Define se o componente deve usar o LockManager para controle de carregamento da aplica\u00E7\u00E3o"
|
517
|
+
},
|
518
|
+
"attribute": "enable-lock-manager-loading-comp",
|
519
|
+
"reflect": false,
|
520
|
+
"defaultValue": "false"
|
521
|
+
},
|
522
|
+
"enableLockManagerTaskbarClick": {
|
523
|
+
"type": "boolean",
|
524
|
+
"mutable": false,
|
525
|
+
"complexType": {
|
526
|
+
"original": "boolean",
|
527
|
+
"resolved": "boolean",
|
528
|
+
"references": {}
|
529
|
+
},
|
530
|
+
"required": false,
|
531
|
+
"optional": true,
|
532
|
+
"docs": {
|
533
|
+
"tags": [],
|
534
|
+
"text": "Ativa o gerenciamento de locks na grade pela Taskbar."
|
535
|
+
},
|
536
|
+
"attribute": "enable-lock-manager-taskbar-click",
|
537
|
+
"reflect": false,
|
538
|
+
"defaultValue": "false"
|
539
|
+
},
|
503
540
|
"configName": {
|
504
541
|
"type": "string",
|
505
542
|
"mutable": false,
|
@@ -928,24 +965,6 @@ export class SnkGrid {
|
|
928
965
|
"reflect": false,
|
929
966
|
"defaultValue": "false"
|
930
967
|
},
|
931
|
-
"enableLockManger": {
|
932
|
-
"type": "boolean",
|
933
|
-
"mutable": false,
|
934
|
-
"complexType": {
|
935
|
-
"original": "boolean",
|
936
|
-
"resolved": "boolean",
|
937
|
-
"references": {}
|
938
|
-
},
|
939
|
-
"required": false,
|
940
|
-
"optional": true,
|
941
|
-
"docs": {
|
942
|
-
"tags": [],
|
943
|
-
"text": "Ativa o gerenciamento de locks na grade."
|
944
|
-
},
|
945
|
-
"attribute": "enable-lock-manger",
|
946
|
-
"reflect": false,
|
947
|
-
"defaultValue": "false"
|
948
|
-
},
|
949
968
|
"outlineMode": {
|
950
969
|
"type": "boolean",
|
951
970
|
"mutable": false,
|