@sankhyalabs/sankhyablocks 8.16.0-dev.63 → 8.16.0-dev.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  3. package/dist/cjs/snk-application.cjs.entry.js +117 -9
  4. package/dist/cjs/snk-crud.cjs.entry.js +3 -2
  5. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +21 -7
  6. package/dist/cjs/snk-grid.cjs.entry.js +3 -2
  7. package/dist/cjs/snk-simple-crud.cjs.entry.js +3 -2
  8. package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +4 -3
  9. package/dist/collection/components/snk-application/snk-application.css +34 -0
  10. package/dist/collection/components/snk-application/snk-application.js +172 -7
  11. package/dist/collection/components/snk-crud/snk-crud.js +39 -20
  12. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +40 -8
  13. package/dist/collection/components/snk-grid/snk-grid.js +39 -20
  14. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +39 -20
  15. package/dist/components/snk-application2.js +124 -12
  16. package/dist/components/snk-crud.js +5 -3
  17. package/dist/components/snk-filter-bar2.js +23 -8
  18. package/dist/components/snk-grid2.js +5 -3
  19. package/dist/components/snk-simple-crud2.js +5 -3
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/esm/sankhyablocks.js +1 -1
  22. package/dist/esm/snk-application.entry.js +119 -11
  23. package/dist/esm/snk-crud.entry.js +3 -2
  24. package/dist/esm/snk-filter-bar_4.entry.js +22 -8
  25. package/dist/esm/snk-grid.entry.js +3 -2
  26. package/dist/esm/snk-simple-crud.entry.js +3 -2
  27. package/dist/sankhyablocks/p-098f8cfa.entry.js +1 -0
  28. package/dist/sankhyablocks/p-22d04eac.entry.js +1 -0
  29. package/dist/sankhyablocks/p-2b7432e8.entry.js +1 -0
  30. package/dist/sankhyablocks/p-442367ab.entry.js +11 -0
  31. package/dist/sankhyablocks/p-9a9681d1.entry.js +1 -0
  32. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  33. package/dist/types/components/snk-application/snk-application.d.ts +21 -3
  34. package/dist/types/components/snk-crud/snk-crud.d.ts +8 -4
  35. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +6 -1
  36. package/dist/types/components/snk-grid/snk-grid.d.ts +8 -4
  37. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +8 -1
  38. package/dist/types/components.d.ts +58 -10
  39. package/package.json +1 -1
  40. package/dist/sankhyablocks/p-0c55538b.entry.js +0 -1
  41. package/dist/sankhyablocks/p-65650e05.entry.js +0 -1
  42. package/dist/sankhyablocks/p-690b4311.entry.js +0 -1
  43. package/dist/sankhyablocks/p-8cf0a9fe.entry.js +0 -1
  44. package/dist/sankhyablocks/p-eda55eef.entry.js +0 -11
@@ -114,13 +114,14 @@ const SnkSimpleCrud = class {
114
114
  this._config = undefined;
115
115
  this._fieldToGetFocus = undefined;
116
116
  this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
117
+ this.enableLockManagerLoadingComp = false;
118
+ this.enableLockManagerTaskbarClick = false;
117
119
  this.dataState = undefined;
118
120
  this.dataUnit = undefined;
119
121
  this.entityName = undefined;
120
122
  this.mode = constants.SIMPLE_CRUD_MODE.SERVER;
121
123
  this.gridConfig = undefined;
122
124
  this.formConfig = undefined;
123
- this.enableLockManger = false;
124
125
  this._formFields = [];
125
126
  this._fieldsProps = new Map();
126
127
  this._enableContinuousInsert = true;
@@ -832,7 +833,7 @@ const SnkSimpleCrud = class {
832
833
  }
833
834
  return (index$1.h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, index$1.h("header", null, index$1.h("slot", { name: "snkSimpleCrudHeader" })), index$1.h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section` }, index$1.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index$1.h("stack-item", null, index$1.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(dataunitFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
834
835
  ? undefined
835
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger, outlineMode: this.outlineMode }, this.renderTaskbarContent(), index$1.h("div", { slot: "footer" }, index$1.h("slot", { name: "snkSimpleCrudFooter" })))), index$1.h("stack-item", null, this.renderTaskbarContent(), index$1.h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), index$1.h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && index$1.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), index$1.h("div", { id: `${this._customContainerId}` }, index$1.h("slot", { name: "SnkConfigContainerSlot" }))), index$1.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index$1.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
836
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, this.renderTaskbarContent(), index$1.h("div", { slot: "footer" }, index$1.h("slot", { name: "snkSimpleCrudFooter" })))), index$1.h("stack-item", null, this.renderTaskbarContent(), index$1.h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), index$1.h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && index$1.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), index$1.h("div", { id: `${this._customContainerId}` }, index$1.h("slot", { name: "SnkConfigContainerSlot" }))), index$1.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index$1.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
836
837
  }
837
838
  get _element() { return index$1.getElement(this); }
838
839
  static get watchers() { return {
@@ -16,11 +16,12 @@ class DebouncedRequestListener {
16
16
  }
17
17
  ;
18
18
  onRequestEnd(param) {
19
+ var _a, _b, _c;
19
20
  const timeoutId = this.requests.get(param.requestId);
20
21
  clearTimeout(timeoutId);
21
- if (this.requestsLoadingBar.includes(param.requestId)) {
22
- this.requestsLoadingBar = this.requestsLoadingBar.filter(id => id !== param.requestId);
23
- !this.requestsLoadingBar.length && this.ezLoadingBar.hide();
22
+ if ((_a = this.requestsLoadingBar) === null || _a === void 0 ? void 0 : _a.includes(param.requestId)) {
23
+ this.requestsLoadingBar = (_b = this.requestsLoadingBar) === null || _b === void 0 ? void 0 : _b.filter(id => id !== param.requestId);
24
+ !this.requestsLoadingBar.length && ((_c = this.ezLoadingBar) === null || _c === void 0 ? void 0 : _c.hide());
24
25
  }
25
26
  }
26
27
  ;
@@ -3,3 +3,37 @@
3
3
  flex-direction: column;
4
4
  height: 100%;
5
5
  }
6
+
7
+ :host > .loading-hidden {
8
+ display: none;
9
+ pointer-events: none;
10
+ }
11
+
12
+ .skeleton-content-left {
13
+ width: 300px;
14
+ padding-right: 5px;
15
+ }
16
+
17
+ .skeleton-content {
18
+ height: calc(100vh - 310px);
19
+ }
20
+
21
+ .spinner {
22
+ height: 100vh;
23
+ gap: 10px;
24
+ }
25
+ .spinner > .spin {
26
+ animation-name: spin;
27
+ animation-duration: 5000ms;
28
+ animation-iteration-count: infinite;
29
+ animation-timing-function: linear;
30
+ }
31
+
32
+ @keyframes spin {
33
+ from {
34
+ transform:rotate(0deg);
35
+ }
36
+ to {
37
+ transform:rotate(360deg);
38
+ }
39
+ }
@@ -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
- * Remove registro do cache do PreLoader do dataunit.
523
- * Deve ser usado quando existe um dataunit usando loader do application, mas o removeLoader está sendo sobrescrito.
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
  }
@@ -985,12 +995,15 @@ export class SnkApplication {
985
995
  this._waitingAppReady.forEach(resolve => resolve());
986
996
  }
987
997
  connectedCallback() {
998
+ this._isBrowserTypeElectron = UserAgentUtils.isElectron();
988
999
  ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
989
1000
  DataFetcher.addRequestListener(this._requestListener);
990
1001
  }
991
1002
  disconnectedCallback() {
992
- DataFetcher.removeRequestListener(this._requestListener);
1003
+ DataFetcher === null || DataFetcher === void 0 ? void 0 : DataFetcher.removeRequestListener(this._requestListener);
993
1004
  this.removeShortcuts();
1005
+ if (this._lockManagerTimer)
1006
+ clearTimeout(this._lockManagerTimer);
994
1007
  }
995
1008
  async componentDidLoad() {
996
1009
  this.applicationLoading.emit(true);
@@ -1002,6 +1015,64 @@ export class SnkApplication {
1002
1015
  ElementIDUtils.addIDInfo(this._element, `resource_${this.applicationResourceID}`);
1003
1016
  await this.handleShowNewVersionPopup();
1004
1017
  this.initKeyboardManager();
1018
+ if (this.enableLockManagerLoadingApp) {
1019
+ LockManager.addLockManagerCtxId(this._element);
1020
+ this.resolveApplicationReady();
1021
+ }
1022
+ else {
1023
+ this._applicationReady = true;
1024
+ }
1025
+ }
1026
+ async markToReload() {
1027
+ if (!this.enableLockManagerLoadingApp)
1028
+ return;
1029
+ this._applicationReady = false;
1030
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1031
+ this.resolveApplicationReady();
1032
+ }
1033
+ async addLoadingLock(forceReady = false) {
1034
+ if (!this.enableLockManagerLoadingApp)
1035
+ return;
1036
+ if (forceReady) {
1037
+ this._applicationReady = false;
1038
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1039
+ }
1040
+ this.resolveApplicationReady();
1041
+ return await LockManager.lock(this._element, LockManagerOperation.APP_LOADING);
1042
+ }
1043
+ async resolveApplicationReady() {
1044
+ if (this._applicationReady) {
1045
+ return;
1046
+ }
1047
+ ;
1048
+ try {
1049
+ await this.checkTimeoutLimitLockManager();
1050
+ await LockManager.whenHasLock(this._element, LockManagerOperation.APP_LOADING);
1051
+ await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 1200);
1052
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1053
+ this._applicationReady = true;
1054
+ }
1055
+ catch (error) {
1056
+ console.warn(error);
1057
+ this._applicationReady = true;
1058
+ }
1059
+ }
1060
+ stopTimeoutLockManager() {
1061
+ if (this._lockManagerTimer) {
1062
+ clearTimeout(this._lockManagerTimer);
1063
+ }
1064
+ }
1065
+ async checkTimeoutLimitLockManager() {
1066
+ this.stopTimeoutLockManager();
1067
+ if (this._applicationReady)
1068
+ return;
1069
+ this._lockManagerTimer = setTimeout(async () => {
1070
+ if (!this._applicationReady) {
1071
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1072
+ this.stopTimeoutLockManager();
1073
+ this._applicationReady = true;
1074
+ }
1075
+ }, this._maxTimeLockAppLoading);
1005
1076
  }
1006
1077
  initKeyboardManager() {
1007
1078
  this._keyboardManager
@@ -1015,8 +1086,40 @@ export class SnkApplication {
1015
1086
  .unbind("ctrl + d")
1016
1087
  .unbind("F1");
1017
1088
  }
1089
+ // TODO: Etapa 2 - implementar template de loading
1090
+ renderLoadingSkeleton(template) {
1091
+ if (this.enableLockManagerLoadingApp) {
1092
+ if (!this._isBrowserTypeElectron) {
1093
+ switch (template) {
1094
+ case TEMPLATES_LOADING_SKELETON.APPLICATION:
1095
+ case TEMPLATES_LOADING_SKELETON.GRID:
1096
+ return this.getSkeletonTemplateApplication();
1097
+ default:
1098
+ return this.getSkeletonTemplateApplication();
1099
+ }
1100
+ }
1101
+ else {
1102
+ return this.getSpinnerLoadingDefault();
1103
+ }
1104
+ }
1105
+ }
1106
+ getLoadingVisibilityStyle() {
1107
+ return {
1108
+ visibility: this._applicationReady ? "hidden" : "initial",
1109
+ display: this._applicationReady ? "none" : "unset"
1110
+ };
1111
+ }
1112
+ getSkeletonTemplateApplication() {
1113
+ 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" }))));
1114
+ }
1115
+ getSpinnerLoadingDefault() {
1116
+ 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..."))));
1117
+ }
1018
1118
  render() {
1019
- return (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 })));
1119
+ return (h(Host, { style: {
1120
+ visibility: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden",
1121
+ overflow: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden"
1122
+ } }, 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
1123
  }
1021
1124
  static get is() { return "snk-application"; }
1022
1125
  static get encapsulation() { return "scoped"; }
@@ -1032,6 +1135,23 @@ export class SnkApplication {
1032
1135
  }
1033
1136
  static get properties() {
1034
1137
  return {
1138
+ "enableLockManagerLoadingApp": {
1139
+ "type": "boolean",
1140
+ "mutable": false,
1141
+ "complexType": {
1142
+ "original": "boolean",
1143
+ "resolved": "boolean",
1144
+ "references": {}
1145
+ },
1146
+ "required": false,
1147
+ "optional": false,
1148
+ "docs": {
1149
+ "tags": [],
1150
+ "text": "Define se o componente deve usar o LockManager para controle de carregamento da aplica\u00E7\u00E3o"
1151
+ },
1152
+ "attribute": "enable-lock-manager-loading-app",
1153
+ "reflect": false
1154
+ },
1035
1155
  "messagesBuilder": {
1036
1156
  "type": "unknown",
1037
1157
  "mutable": true,
@@ -1124,6 +1244,11 @@ export class SnkApplication {
1124
1244
  }
1125
1245
  };
1126
1246
  }
1247
+ static get states() {
1248
+ return {
1249
+ "_applicationReady": {}
1250
+ };
1251
+ }
1127
1252
  static get events() {
1128
1253
  return [{
1129
1254
  "method": "applicationLoaded",
@@ -2543,6 +2668,41 @@ export class SnkApplication {
2543
2668
  "text": "value - String convers\u00EDvel de acordo com o tipo do par\u00E2metro"
2544
2669
  }]
2545
2670
  }
2671
+ },
2672
+ "markToReload": {
2673
+ "complexType": {
2674
+ "signature": "() => Promise<void>",
2675
+ "parameters": [],
2676
+ "references": {
2677
+ "Promise": {
2678
+ "location": "global"
2679
+ }
2680
+ },
2681
+ "return": "Promise<void>"
2682
+ },
2683
+ "docs": {
2684
+ "text": "",
2685
+ "tags": []
2686
+ }
2687
+ },
2688
+ "addLoadingLock": {
2689
+ "complexType": {
2690
+ "signature": "(forceReady?: boolean) => Promise<() => void>",
2691
+ "parameters": [{
2692
+ "tags": [],
2693
+ "text": ""
2694
+ }],
2695
+ "references": {
2696
+ "Promise": {
2697
+ "location": "global"
2698
+ }
2699
+ },
2700
+ "return": "Promise<() => void>"
2701
+ },
2702
+ "docs": {
2703
+ "text": "",
2704
+ "tags": []
2705
+ }
2546
2706
  }
2547
2707
  };
2548
2708
  }
@@ -2560,3 +2720,8 @@ class PendingPromise {
2560
2720
  this.reject = reject;
2561
2721
  }
2562
2722
  }
2723
+ var TEMPLATES_LOADING_SKELETON;
2724
+ (function (TEMPLATES_LOADING_SKELETON) {
2725
+ TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["APPLICATION"] = 1] = "APPLICATION";
2726
+ TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["GRID"] = 2] = "GRID";
2727
+ })(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, enableLockManger: this.enableLockManger }, 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
+ 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
- this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
453
- if (this._application) {
454
- this.loadPermitions();
455
- this.addFilterBarLegacyConfigName();
456
- this.loadConfigFromStorage();
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, enableLockManger: this.enableLockManger, 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
+ 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,