@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
@@ -34,13 +34,14 @@ export class SnkSimpleCrud {
34
34
  this._config = undefined;
35
35
  this._fieldToGetFocus = undefined;
36
36
  this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
37
+ this.enableLockManagerLoadingComp = false;
38
+ this.enableLockManagerTaskbarClick = false;
37
39
  this.dataState = undefined;
38
40
  this.dataUnit = undefined;
39
41
  this.entityName = undefined;
40
42
  this.mode = SIMPLE_CRUD_MODE.SERVER;
41
43
  this.gridConfig = undefined;
42
44
  this.formConfig = undefined;
43
- this.enableLockManger = false;
44
45
  this._formFields = [];
45
46
  this._fieldsProps = new Map();
46
47
  this._enableContinuousInsert = true;
@@ -752,7 +753,7 @@ export class SnkSimpleCrud {
752
753
  }
753
754
  return (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 === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section` }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, 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(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
754
755
  ? undefined
755
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger, outlineMode: this.outlineMode }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), 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) }), 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 && 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 })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, 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.resolveResourceID() }))));
756
+ : 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(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), 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) }), 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 && 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 })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, 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.resolveResourceID() }))));
756
757
  }
757
758
  static get is() { return "snk-simple-crud"; }
758
759
  static get encapsulation() { return "scoped"; }
@@ -768,6 +769,42 @@ export class SnkSimpleCrud {
768
769
  }
769
770
  static get properties() {
770
771
  return {
772
+ "enableLockManagerLoadingComp": {
773
+ "type": "boolean",
774
+ "mutable": false,
775
+ "complexType": {
776
+ "original": "boolean",
777
+ "resolved": "boolean",
778
+ "references": {}
779
+ },
780
+ "required": false,
781
+ "optional": true,
782
+ "docs": {
783
+ "tags": [],
784
+ "text": "Define se o componente deve usar o LockManager para controle de carregamento da aplica\u00E7\u00E3o"
785
+ },
786
+ "attribute": "enable-lock-manager-loading-comp",
787
+ "reflect": false,
788
+ "defaultValue": "false"
789
+ },
790
+ "enableLockManagerTaskbarClick": {
791
+ "type": "boolean",
792
+ "mutable": false,
793
+ "complexType": {
794
+ "original": "boolean",
795
+ "resolved": "boolean",
796
+ "references": {}
797
+ },
798
+ "required": false,
799
+ "optional": true,
800
+ "docs": {
801
+ "tags": [],
802
+ "text": "Ativa o gerenciamento de locks na grade pela Taskbar."
803
+ },
804
+ "attribute": "enable-lock-manager-taskbar-click",
805
+ "reflect": false,
806
+ "defaultValue": "false"
807
+ },
771
808
  "dataState": {
772
809
  "type": "unknown",
773
810
  "mutable": false,
@@ -888,24 +925,6 @@ export class SnkSimpleCrud {
888
925
  "text": ""
889
926
  }
890
927
  },
891
- "enableLockManger": {
892
- "type": "boolean",
893
- "mutable": false,
894
- "complexType": {
895
- "original": "boolean",
896
- "resolved": "boolean",
897
- "references": {}
898
- },
899
- "required": false,
900
- "optional": true,
901
- "docs": {
902
- "tags": [],
903
- "text": ""
904
- },
905
- "attribute": "enable-lock-manger",
906
- "reflect": false,
907
- "defaultValue": "false"
908
- },
909
928
  "multipleSelection": {
910
929
  "type": "boolean",
911
930
  "mutable": false,
@@ -1,5 +1,5 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ArrayUtils, SearchUtils, ElementIDUtils, ApplicationContext, DataType, ErrorTracking } from '@sankhyalabs/core';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
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.js';
5
5
  import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher.js';
@@ -298,11 +298,12 @@ class DebouncedRequestListener {
298
298
  }
299
299
  ;
300
300
  onRequestEnd(param) {
301
+ var _a, _b, _c;
301
302
  const timeoutId = this.requests.get(param.requestId);
302
303
  clearTimeout(timeoutId);
303
- if (this.requestsLoadingBar.includes(param.requestId)) {
304
- this.requestsLoadingBar = this.requestsLoadingBar.filter(id => id !== param.requestId);
305
- !this.requestsLoadingBar.length && this.ezLoadingBar.hide();
304
+ if ((_a = this.requestsLoadingBar) === null || _a === void 0 ? void 0 : _a.includes(param.requestId)) {
305
+ this.requestsLoadingBar = (_b = this.requestsLoadingBar) === null || _b === void 0 ? void 0 : _b.filter(id => id !== param.requestId);
306
+ !this.requestsLoadingBar.length && ((_c = this.ezLoadingBar) === null || _c === void 0 ? void 0 : _c.hide());
306
307
  }
307
308
  }
308
309
  ;
@@ -373,7 +374,7 @@ class RequestListenerFactory {
373
374
  }
374
375
  }
375
376
 
376
- const snkApplicationCss = ".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";
377
+ 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)}}";
377
378
 
378
379
  const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
379
380
  constructor() {
@@ -388,9 +389,13 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
388
389
  this._duCache = new Map();
389
390
  this._duPromises = new Map();
390
391
  this._requestListener = RequestListenerFactory.create({ strategy: 'request_time' });
392
+ this._maxTimeLockAppLoading = 10000;
393
+ this._isBrowserTypeElectron = false;
391
394
  this._pendingActions = new Map;
392
395
  this._loadPkParameter = null;
393
396
  this._isLoadedByPk = false;
397
+ this._applicationReady = false;
398
+ this.enableLockManagerLoadingApp = undefined;
394
399
  this.messagesBuilder = undefined;
395
400
  this.configName = undefined;
396
401
  this.gridLegacyConfigName = undefined;
@@ -876,15 +881,21 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
876
881
  return Promise.resolve(this._isLoadedByPk);
877
882
  }
878
883
  /**
879
- * Remove registro do cache do PreLoader do dataunit.
880
- * Deve ser usado quando existe um dataunit usando loader do application, mas o removeLoader está sendo sobrescrito.
881
- */
884
+ * Remove registro do cache do PreLoader do dataunit.
885
+ * Deve ser usado quando existe um dataunit usando loader do application, mas o removeLoader está sendo sobrescrito.
886
+ */
882
887
  async preloadMangerRemoveRecord(dataUnit, recordsIDs) {
883
888
  const records = recordsIDs.map(id => {
884
889
  return { "__record__id__": id };
885
890
  });
886
891
  PreloadManager.removeRecords(dataUnit, records);
887
892
  }
893
+ getCountSkeleton(className, skeletonHeight, spacingSkeleton) {
894
+ let containerHeight = window.innerHeight - 350;
895
+ spacingSkeleton = !spacingSkeleton ? 20 : spacingSkeleton;
896
+ let skeletonCount = Math.floor(containerHeight / (skeletonHeight + spacingSkeleton));
897
+ return skeletonCount || 1;
898
+ }
888
899
  async getAuthList(auth) {
889
900
  return await (new MGEAuthorization()).parseFromJSON(auth);
890
901
  }
@@ -1340,12 +1351,15 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1340
1351
  this._waitingAppReady.forEach(resolve => resolve());
1341
1352
  }
1342
1353
  connectedCallback() {
1354
+ this._isBrowserTypeElectron = UserAgentUtils.isElectron();
1343
1355
  ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
1344
1356
  DataFetcher.addRequestListener(this._requestListener);
1345
1357
  }
1346
1358
  disconnectedCallback() {
1347
- DataFetcher.removeRequestListener(this._requestListener);
1359
+ DataFetcher === null || DataFetcher === void 0 ? void 0 : DataFetcher.removeRequestListener(this._requestListener);
1348
1360
  this.removeShortcuts();
1361
+ if (this._lockManagerTimer)
1362
+ clearTimeout(this._lockManagerTimer);
1349
1363
  }
1350
1364
  async componentDidLoad() {
1351
1365
  this.applicationLoading.emit(true);
@@ -1357,6 +1371,63 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1357
1371
  ElementIDUtils.addIDInfo(this._element, `resource_${this.applicationResourceID}`);
1358
1372
  await this.handleShowNewVersionPopup();
1359
1373
  this.initKeyboardManager();
1374
+ if (this.enableLockManagerLoadingApp) {
1375
+ LockManager.addLockManagerCtxId(this._element);
1376
+ this.resolveApplicationReady();
1377
+ }
1378
+ else {
1379
+ this._applicationReady = true;
1380
+ }
1381
+ }
1382
+ async markToReload() {
1383
+ if (!this.enableLockManagerLoadingApp)
1384
+ return;
1385
+ this._applicationReady = false;
1386
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1387
+ this.resolveApplicationReady();
1388
+ }
1389
+ async addLoadingLock(forceReady = false) {
1390
+ if (!this.enableLockManagerLoadingApp)
1391
+ return;
1392
+ if (forceReady) {
1393
+ this._applicationReady = false;
1394
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1395
+ }
1396
+ this.resolveApplicationReady();
1397
+ return await LockManager.lock(this._element, LockManagerOperation.APP_LOADING);
1398
+ }
1399
+ async resolveApplicationReady() {
1400
+ if (this._applicationReady) {
1401
+ return;
1402
+ }
1403
+ try {
1404
+ await this.checkTimeoutLimitLockManager();
1405
+ await LockManager.whenHasLock(this._element, LockManagerOperation.APP_LOADING);
1406
+ await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 1200);
1407
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1408
+ this._applicationReady = true;
1409
+ }
1410
+ catch (error) {
1411
+ console.warn(error);
1412
+ this._applicationReady = true;
1413
+ }
1414
+ }
1415
+ stopTimeoutLockManager() {
1416
+ if (this._lockManagerTimer) {
1417
+ clearTimeout(this._lockManagerTimer);
1418
+ }
1419
+ }
1420
+ async checkTimeoutLimitLockManager() {
1421
+ this.stopTimeoutLockManager();
1422
+ if (this._applicationReady)
1423
+ return;
1424
+ this._lockManagerTimer = setTimeout(async () => {
1425
+ if (!this._applicationReady) {
1426
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1427
+ this.stopTimeoutLockManager();
1428
+ this._applicationReady = true;
1429
+ }
1430
+ }, this._maxTimeLockAppLoading);
1360
1431
  }
1361
1432
  initKeyboardManager() {
1362
1433
  this._keyboardManager
@@ -1370,8 +1441,40 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1370
1441
  .unbind("ctrl + d")
1371
1442
  .unbind("F1");
1372
1443
  }
1444
+ // TODO: Etapa 2 - implementar template de loading
1445
+ renderLoadingSkeleton(template) {
1446
+ if (this.enableLockManagerLoadingApp) {
1447
+ if (!this._isBrowserTypeElectron) {
1448
+ switch (template) {
1449
+ case TEMPLATES_LOADING_SKELETON.APPLICATION:
1450
+ case TEMPLATES_LOADING_SKELETON.GRID:
1451
+ return this.getSkeletonTemplateApplication();
1452
+ default:
1453
+ return this.getSkeletonTemplateApplication();
1454
+ }
1455
+ }
1456
+ else {
1457
+ return this.getSpinnerLoadingDefault();
1458
+ }
1459
+ }
1460
+ }
1461
+ getLoadingVisibilityStyle() {
1462
+ return {
1463
+ visibility: this._applicationReady ? "hidden" : "initial",
1464
+ display: this._applicationReady ? "none" : "unset"
1465
+ };
1466
+ }
1467
+ getSkeletonTemplateApplication() {
1468
+ 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" }))));
1469
+ }
1470
+ getSpinnerLoadingDefault() {
1471
+ 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..."))));
1472
+ }
1373
1473
  render() {
1374
- 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 })));
1474
+ return (h(Host, { style: {
1475
+ visibility: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden",
1476
+ overflow: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden"
1477
+ } }, 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())));
1375
1478
  }
1376
1479
  get _element() { return this; }
1377
1480
  static get watchers() { return {
@@ -1379,11 +1482,13 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1379
1482
  }; }
1380
1483
  static get style() { return snkApplicationCss; }
1381
1484
  }, [2, "snk-application", {
1485
+ "enableLockManagerLoadingApp": [4, "enable-lock-manager-loading-app"],
1382
1486
  "messagesBuilder": [1040],
1383
1487
  "configName": [1, "config-name"],
1384
1488
  "gridLegacyConfigName": [1, "grid-legacy-config-name"],
1385
1489
  "formLegacyConfigName": [1, "form-legacy-config-name"],
1386
1490
  "loadByPK": [16],
1491
+ "_applicationReady": [32],
1387
1492
  "getKeyboardManager": [64],
1388
1493
  "isUserSup": [64],
1389
1494
  "addPendingAction": [64],
@@ -1434,7 +1539,9 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1434
1539
  "executeSelectDistinct": [64],
1435
1540
  "getDataFetcher": [64],
1436
1541
  "whenApplicationReady": [64],
1437
- "setSearchFilterContext": [64]
1542
+ "setSearchFilterContext": [64],
1543
+ "markToReload": [64],
1544
+ "addLoadingLock": [64]
1438
1545
  }]);
1439
1546
  class PendingPromise {
1440
1547
  constructor(resolve, reject) {
@@ -1442,6 +1549,11 @@ class PendingPromise {
1442
1549
  this.reject = reject;
1443
1550
  }
1444
1551
  }
1552
+ var TEMPLATES_LOADING_SKELETON;
1553
+ (function (TEMPLATES_LOADING_SKELETON) {
1554
+ TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["APPLICATION"] = 1] = "APPLICATION";
1555
+ TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["GRID"] = 2] = "GRID";
1556
+ })(TEMPLATES_LOADING_SKELETON || (TEMPLATES_LOADING_SKELETON = {}));
1445
1557
  function defineCustomElement() {
1446
1558
  if (typeof customElements === "undefined") {
1447
1559
  return;
@@ -63,6 +63,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
63
63
  this._currentViewMode = VIEW_MODE.GRID;
64
64
  this._canEdit = undefined;
65
65
  this._resourceID = undefined;
66
+ this.enableLockManagerLoadingComp = false;
67
+ this.enableLockManagerTaskbarClick = false;
66
68
  this.configName = undefined;
67
69
  this.filterBarTitle = undefined;
68
70
  this.selectionToastConfig = undefined;
@@ -84,7 +86,6 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
84
86
  this.enableGridInsert = false;
85
87
  this.domainMessagesBuilder = undefined;
86
88
  this.ignoreReadOnlyFormFields = undefined;
87
- this.enableLockManger = false;
88
89
  this.setCustomFormTitle = undefined;
89
90
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
90
91
  }
@@ -431,7 +432,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
431
432
  return;
432
433
  }
433
434
  this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
434
- 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" }))));
435
+ 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" }))));
435
436
  }
436
437
  get _element() { return this; }
437
438
  static get watchers() { return {
@@ -439,6 +440,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
439
440
  }; }
440
441
  static get style() { return snkCrudCss; }
441
442
  }, [6, "snk-crud", {
443
+ "enableLockManagerLoadingComp": [4, "enable-lock-manager-loading-comp"],
444
+ "enableLockManagerTaskbarClick": [4, "enable-lock-manager-taskbar-click"],
442
445
  "configName": [1025, "config-name"],
443
446
  "filterBarTitle": [1, "filter-bar-title"],
444
447
  "selectionToastConfig": [16],
@@ -460,7 +463,6 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
460
463
  "enableGridInsert": [4, "enable-grid-insert"],
461
464
  "domainMessagesBuilder": [1, "domain-messages-builder"],
462
465
  "ignoreReadOnlyFormFields": [4, "ignore-read-only-form-fields"],
463
- "enableLockManger": [4, "enable-lock-manger"],
464
466
  "setCustomFormTitle": [16],
465
467
  "_dataUnit": [32],
466
468
  "_dataState": [32],
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext } from '@sankhyalabs/core';
2
+ import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext, LockManager, LockManagerOperation } from '@sankhyalabs/core';
3
3
  import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
4
4
  import { C as ConfigStorage } from './ConfigStorage.js';
5
5
  import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
@@ -266,6 +266,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
266
266
  this._firstLoad = true;
267
267
  this._pendingVariables = false;
268
268
  this._customfiltersToBeUpdated = [];
269
+ this._resolveLoading = undefined;
269
270
  this._calculateSortIndex = (item) => {
270
271
  if (!item.visible)
271
272
  return 0;
@@ -279,6 +280,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
279
280
  this._filtersComparator = (a, b) => {
280
281
  return this._calculateSortIndex(b) - this._calculateSortIndex(a);
281
282
  };
283
+ this.enableLockManagerLoadingComp = false;
282
284
  this.customFilterBarConfig = undefined;
283
285
  this.dataUnit = undefined;
284
286
  this.title = undefined;
@@ -699,14 +701,26 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
699
701
  this.personalizedFilterId = undefined;
700
702
  this.showPersonalizedFilter = false;
701
703
  }
702
- componentWillLoad() {
703
- this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
704
- if (this._application) {
705
- this.loadPermitions();
706
- this.addFilterBarLegacyConfigName();
707
- this.loadConfigFromStorage();
704
+ async componentWillLoad() {
705
+ var _a;
706
+ try {
707
+ this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
708
+ await this.attachDataUnit();
709
+ if (this._application) {
710
+ if (this._application.enableLockManagerLoadingApp && this.enableLockManagerLoadingComp) {
711
+ const appLoadLockerID = LockManager.addLockManagerCtxId(this._element);
712
+ this._resolveLoading = LockManager.lock(appLoadLockerID, LockManagerOperation.APP_LOADING);
713
+ }
714
+ await Promise.all([
715
+ this.loadPermitions(),
716
+ this.addFilterBarLegacyConfigName(),
717
+ this.loadConfigFromStorage(),
718
+ ]);
719
+ }
720
+ }
721
+ finally {
722
+ (_a = this._resolveLoading) === null || _a === void 0 ? void 0 : _a.call(this);
708
723
  }
709
- this.attachDataUnit();
710
724
  }
711
725
  componentDidRender() {
712
726
  this.processPendingFilter();
@@ -729,6 +743,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
729
743
  }; }
730
744
  static get style() { return snkFilterBarCss; }
731
745
  }, [2, "snk-filter-bar", {
746
+ "enableLockManagerLoadingComp": [4, "enable-lock-manager-loading-comp"],
732
747
  "customFilterBarConfig": [16],
733
748
  "dataUnit": [1040],
734
749
  "title": [1],
@@ -130,6 +130,8 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
130
130
  this._showSnkFilterBar = true;
131
131
  this._enableContinuousInsert = false;
132
132
  this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
133
+ this.enableLockManagerLoadingComp = false;
134
+ this.enableLockManagerTaskbarClick = false;
133
135
  this.configName = undefined;
134
136
  this.filterBarTitle = undefined;
135
137
  this.resourceID = undefined;
@@ -153,7 +155,6 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
153
155
  this.autoLoad = undefined;
154
156
  this.autoFocus = true;
155
157
  this.enableGridInsert = false;
156
- this.enableLockManger = false;
157
158
  this.outlineMode = false;
158
159
  }
159
160
  /**
@@ -543,7 +544,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
543
544
  return undefined;
544
545
  }
545
546
  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 &&
546
- 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 }))));
547
+ 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 }))));
547
548
  }
548
549
  get _element() { return this; }
549
550
  static get watchers() { return {
@@ -552,6 +553,8 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
552
553
  static get style() { return snkGridCss; }
553
554
  }, [6, "snk-grid", {
554
555
  "columnFilterDataSource": [1040],
556
+ "enableLockManagerLoadingComp": [4, "enable-lock-manager-loading-comp"],
557
+ "enableLockManagerTaskbarClick": [4, "enable-lock-manager-taskbar-click"],
555
558
  "configName": [1, "config-name"],
556
559
  "filterBarTitle": [1, "filter-bar-title"],
557
560
  "resourceID": [1, "resource-i-d"],
@@ -575,7 +578,6 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
575
578
  "autoLoad": [4, "auto-load"],
576
579
  "autoFocus": [4, "auto-focus"],
577
580
  "enableGridInsert": [4, "enable-grid-insert"],
578
- "enableLockManger": [4, "enable-lock-manger"],
579
581
  "outlineMode": [4, "outline-mode"],
580
582
  "_dataUnit": [32],
581
583
  "_dataState": [32],
@@ -113,13 +113,14 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
113
113
  this._config = undefined;
114
114
  this._fieldToGetFocus = undefined;
115
115
  this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
116
+ this.enableLockManagerLoadingComp = false;
117
+ this.enableLockManagerTaskbarClick = false;
116
118
  this.dataState = undefined;
117
119
  this.dataUnit = undefined;
118
120
  this.entityName = undefined;
119
121
  this.mode = SIMPLE_CRUD_MODE.SERVER;
120
122
  this.gridConfig = undefined;
121
123
  this.formConfig = undefined;
122
- this.enableLockManger = false;
123
124
  this._formFields = [];
124
125
  this._fieldsProps = new Map();
125
126
  this._enableContinuousInsert = true;
@@ -831,7 +832,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
831
832
  }
832
833
  return (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 === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section` }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, 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(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
833
834
  ? undefined
834
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger, outlineMode: this.outlineMode }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), 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) }), 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 && 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 })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, 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.resolveResourceID() }))));
835
+ : 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(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), 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) }), 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 && 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 })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, 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.resolveResourceID() }))));
835
836
  }
836
837
  get _element() { return this; }
837
838
  static get watchers() { return {
@@ -844,13 +845,14 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
844
845
  }; }
845
846
  static get style() { return snkSimpleCrudCss; }
846
847
  }, [6, "snk-simple-crud", {
848
+ "enableLockManagerLoadingComp": [4, "enable-lock-manager-loading-comp"],
849
+ "enableLockManagerTaskbarClick": [4, "enable-lock-manager-taskbar-click"],
847
850
  "dataState": [16],
848
851
  "dataUnit": [16],
849
852
  "entityName": [1, "entity-name"],
850
853
  "mode": [2],
851
854
  "gridConfig": [1040],
852
855
  "formConfig": [1040],
853
- "enableLockManger": [4, "enable-lock-manger"],
854
856
  "multipleSelection": [4, "multiple-selection"],
855
857
  "useCancelConfirm": [4, "use-cancel-confirm"],
856
858
  "pageSize": [2, "page-size"],