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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. package/dist/cjs/{ContinuousInsertUtils-414b772c.js → ContinuousInsertUtils-a6139f3d.js} +2 -2
  2. package/dist/cjs/{dataunit-fetcher-228016f4.js → dataunit-fetcher-0121621c.js} +1 -1
  3. package/dist/cjs/index-f9e81701.js +4 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{pesquisa-fetcher-2ec4811b.js → pesquisa-fetcher-a85d6935.js} +175 -0
  6. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +127 -0
  7. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  8. package/dist/cjs/snk-actions-button_5.cjs.entry.js +2 -2
  9. package/dist/cjs/snk-application.cjs.entry.js +140 -17
  10. package/dist/cjs/snk-attach.cjs.entry.js +2 -2
  11. package/dist/cjs/snk-crud.cjs.entry.js +5 -4
  12. package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -3
  13. package/dist/cjs/{snk-data-unit-3d9b6ed4.js → snk-data-unit-c699179d.js} +1 -1
  14. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  15. package/dist/cjs/snk-detail-view.cjs.entry.js +3 -3
  16. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +21 -7
  17. package/dist/cjs/snk-grid.cjs.entry.js +6 -5
  18. package/dist/cjs/{snk-guides-viewer-421555af.js → snk-guides-viewer-575596a2.js} +2 -2
  19. package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -3
  20. package/dist/cjs/snk-pesquisa.cjs.entry.js +105 -31
  21. package/dist/cjs/snk-simple-crud.cjs.entry.js +6 -5
  22. package/dist/collection/collection-manifest.json +2 -0
  23. package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +4 -3
  24. package/dist/collection/components/snk-application/snk-application.css +34 -0
  25. package/dist/collection/components/snk-application/snk-application.js +197 -14
  26. package/dist/collection/components/snk-crud/snk-crud.js +39 -20
  27. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +40 -8
  28. package/dist/collection/components/snk-grid/snk-grid.js +39 -20
  29. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css +10 -0
  30. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +190 -0
  31. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css +25 -0
  32. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +173 -0
  33. package/dist/collection/components/snk-pesquisa/pesquisaHelper.js +89 -0
  34. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +24 -5
  35. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +168 -32
  36. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +39 -20
  37. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +1 -1
  38. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +89 -3
  39. package/dist/components/ContinuousInsertUtils.js +1 -2
  40. package/dist/components/ISave.js +346 -1
  41. package/dist/components/dataunit-fetcher.js +1 -1
  42. package/dist/components/index.d.ts +2 -0
  43. package/dist/components/index.js +2 -0
  44. package/dist/components/pesquisa-grid.d.ts +11 -0
  45. package/dist/components/pesquisa-grid.js +6 -0
  46. package/dist/components/pesquisa-grid2.js +86 -0
  47. package/dist/components/pesquisa-tree.d.ts +11 -0
  48. package/dist/components/pesquisa-tree.js +6 -0
  49. package/dist/components/pesquisa-tree2.js +76 -0
  50. package/dist/components/snk-actions-button2.js +0 -1
  51. package/dist/components/snk-application2.js +159 -20
  52. package/dist/components/snk-attach2.js +0 -1
  53. package/dist/components/snk-crud.js +5 -4
  54. package/dist/components/snk-data-exporter2.js +1 -2
  55. package/dist/components/snk-detail-view2.js +0 -1
  56. package/dist/components/snk-filter-bar2.js +23 -8
  57. package/dist/components/snk-grid2.js +5 -4
  58. package/dist/components/snk-pesquisa2.js +118 -33
  59. package/dist/components/snk-simple-crud2.js +6 -5
  60. package/dist/components/snk-simple-form-config2.js +1 -2
  61. package/dist/components/teste-pesquisa.js +13 -1
  62. package/dist/esm/{ContinuousInsertUtils-bab45060.js → ContinuousInsertUtils-15b5f1da.js} +2 -2
  63. package/dist/esm/{dataunit-fetcher-56cb648b.js → dataunit-fetcher-481e159d.js} +1 -1
  64. package/dist/esm/index-a7d3d3f1.js +4 -0
  65. package/dist/esm/loader.js +1 -1
  66. package/dist/esm/{pesquisa-fetcher-24e5bba0.js → pesquisa-fetcher-c437c9b1.js} +176 -2
  67. package/dist/esm/pesquisa-grid_2.entry.js +122 -0
  68. package/dist/esm/sankhyablocks.js +1 -1
  69. package/dist/esm/snk-actions-button_5.entry.js +2 -2
  70. package/dist/esm/snk-application.entry.js +142 -19
  71. package/dist/esm/snk-attach.entry.js +2 -2
  72. package/dist/esm/snk-crud.entry.js +5 -4
  73. package/dist/esm/snk-data-exporter.entry.js +3 -3
  74. package/dist/esm/{snk-data-unit-9fa7d2b9.js → snk-data-unit-d4ba54d7.js} +1 -1
  75. package/dist/esm/snk-data-unit.entry.js +2 -2
  76. package/dist/esm/snk-detail-view.entry.js +3 -3
  77. package/dist/esm/snk-filter-bar_4.entry.js +22 -8
  78. package/dist/esm/snk-grid.entry.js +6 -5
  79. package/dist/esm/{snk-guides-viewer-b740a1fe.js → snk-guides-viewer-3043422d.js} +2 -2
  80. package/dist/esm/snk-guides-viewer.entry.js +3 -3
  81. package/dist/esm/snk-pesquisa.entry.js +105 -31
  82. package/dist/esm/snk-simple-crud.entry.js +6 -5
  83. package/dist/sankhyablocks/{p-c629c07a.entry.js → p-08242e3f.entry.js} +1 -1
  84. package/dist/sankhyablocks/{p-342eeb3b.js → p-0f3b2a32.js} +1 -1
  85. package/dist/sankhyablocks/{p-72a451c8.js → p-229c3615.js} +1 -1
  86. package/dist/sankhyablocks/p-22d04eac.entry.js +1 -0
  87. package/dist/sankhyablocks/{p-b619ee23.js → p-36598f95.js} +1 -1
  88. package/dist/sankhyablocks/p-4895f6e4.entry.js +1 -0
  89. package/dist/sankhyablocks/p-4be4cdac.js +6 -0
  90. package/dist/sankhyablocks/{p-47d24ac8.js → p-58fd3017.js} +1 -1
  91. package/dist/sankhyablocks/p-70cb4e36.entry.js +11 -0
  92. package/dist/sankhyablocks/{p-64ff0fb6.entry.js → p-73fc8ec5.entry.js} +1 -1
  93. package/dist/sankhyablocks/{p-50306605.entry.js → p-7d09f66c.entry.js} +1 -1
  94. package/dist/sankhyablocks/{p-53ae0296.entry.js → p-a33e803a.entry.js} +1 -1
  95. package/dist/sankhyablocks/{p-89da2953.entry.js → p-b299dc14.entry.js} +1 -1
  96. package/dist/sankhyablocks/p-badbd2ca.entry.js +1 -0
  97. package/dist/sankhyablocks/p-c9bd54e6.entry.js +1 -0
  98. package/dist/sankhyablocks/{p-0d2a2e9e.entry.js → p-e2bd42c0.entry.js} +1 -1
  99. package/dist/sankhyablocks/p-e8512d4b.entry.js +1 -0
  100. package/dist/sankhyablocks/p-f71d043b.entry.js +1 -0
  101. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  102. package/dist/types/components/snk-application/snk-application.d.ts +22 -4
  103. package/dist/types/components/snk-crud/snk-crud.d.ts +8 -4
  104. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +6 -1
  105. package/dist/types/components/snk-grid/snk-grid.d.ts +8 -4
  106. package/dist/types/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.d.ts +38 -0
  107. package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +28 -0
  108. package/dist/types/components/snk-pesquisa/pesquisaHelper.d.ts +19 -0
  109. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +35 -1
  110. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +8 -1
  111. package/dist/types/components.d.ts +206 -23
  112. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +10 -1
  113. package/package.json +1 -1
  114. package/react/components.d.ts +2 -0
  115. package/react/components.js +2 -0
  116. package/react/components.js.map +1 -1
  117. package/dist/components/pesquisa-fetcher.js +0 -172
  118. package/dist/sankhyablocks/p-0c55538b.entry.js +0 -1
  119. package/dist/sankhyablocks/p-65650e05.entry.js +0 -1
  120. package/dist/sankhyablocks/p-690b4311.entry.js +0 -1
  121. package/dist/sankhyablocks/p-8cf0a9fe.entry.js +0 -1
  122. package/dist/sankhyablocks/p-d1791da2.entry.js +0 -1
  123. package/dist/sankhyablocks/p-e6683406.js +0 -6
  124. package/dist/sankhyablocks/p-eda55eef.entry.js +0 -11
@@ -1,12 +1,14 @@
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';
6
6
  import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher.js';
7
7
  import { P as PreloadManager, D as DataUnitFetcher } from './dataunit-fetcher.js';
8
- import { P as PesquisaFetcher } from './pesquisa-fetcher.js';
8
+ import { a as PesquisaFetcher } from './ISave.js';
9
9
  import { S as SnkMessageBuilder } from './SnkMessageBuilder.js';
10
+ import { d as defineCustomElement$3 } from './pesquisa-grid2.js';
11
+ import { d as defineCustomElement$2 } from './pesquisa-tree2.js';
10
12
  import { d as defineCustomElement$1 } from './snk-pesquisa2.js';
11
13
 
12
14
  class TotalsFetcher {
@@ -298,11 +300,12 @@ class DebouncedRequestListener {
298
300
  }
299
301
  ;
300
302
  onRequestEnd(param) {
303
+ var _a, _b, _c;
301
304
  const timeoutId = this.requests.get(param.requestId);
302
305
  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();
306
+ if ((_a = this.requestsLoadingBar) === null || _a === void 0 ? void 0 : _a.includes(param.requestId)) {
307
+ this.requestsLoadingBar = (_b = this.requestsLoadingBar) === null || _b === void 0 ? void 0 : _b.filter(id => id !== param.requestId);
308
+ !this.requestsLoadingBar.length && ((_c = this.ezLoadingBar) === null || _c === void 0 ? void 0 : _c.hide());
306
309
  }
307
310
  }
308
311
  ;
@@ -373,7 +376,7 @@ class RequestListenerFactory {
373
376
  }
374
377
  }
375
378
 
376
- const snkApplicationCss = ".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";
379
+ 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
380
 
378
381
  const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
379
382
  constructor() {
@@ -388,9 +391,13 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
388
391
  this._duCache = new Map();
389
392
  this._duPromises = new Map();
390
393
  this._requestListener = RequestListenerFactory.create({ strategy: 'request_time' });
394
+ this._maxTimeLockAppLoading = 10000;
395
+ this._isBrowserTypeElectron = false;
391
396
  this._pendingActions = new Map;
392
397
  this._loadPkParameter = null;
393
398
  this._isLoadedByPk = false;
399
+ this._applicationReady = false;
400
+ this.enableLockManagerLoadingApp = undefined;
394
401
  this.messagesBuilder = undefined;
395
402
  this.configName = undefined;
396
403
  this.gridLegacyConfigName = undefined;
@@ -876,15 +883,21 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
876
883
  return Promise.resolve(this._isLoadedByPk);
877
884
  }
878
885
  /**
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
- */
886
+ * Remove registro do cache do PreLoader do dataunit.
887
+ * Deve ser usado quando existe um dataunit usando loader do application, mas o removeLoader está sendo sobrescrito.
888
+ */
882
889
  async preloadMangerRemoveRecord(dataUnit, recordsIDs) {
883
890
  const records = recordsIDs.map(id => {
884
891
  return { "__record__id__": id };
885
892
  });
886
893
  PreloadManager.removeRecords(dataUnit, records);
887
894
  }
895
+ getCountSkeleton(className, skeletonHeight, spacingSkeleton) {
896
+ let containerHeight = window.innerHeight - 350;
897
+ spacingSkeleton = !spacingSkeleton ? 20 : spacingSkeleton;
898
+ let skeletonCount = Math.floor(containerHeight / (skeletonHeight + spacingSkeleton));
899
+ return skeletonCount || 1;
900
+ }
888
901
  async getAuthList(auth) {
889
902
  return await (new MGEAuthorization()).parseFromJSON(auth);
890
903
  }
@@ -926,12 +939,12 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
926
939
  * Obtém as opções em componentes de pesquisa
927
940
  * Ex.: snk-config-options
928
941
  */
929
- async executeSearch(searchArgument, fieldName, dataUnit) {
942
+ async executeSearch(searchArgument, fieldName, dataUnit, ctxOptions) {
930
943
  const descriptor = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(fieldName);
931
944
  if (!descriptor) ;
932
945
  else {
933
946
  const { mode, argument } = searchArgument;
934
- const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY } = descriptor.properties;
947
+ const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY, ISHIERARCHYENTITY } = descriptor.properties;
935
948
  const dependencies = descriptor.dependencies;
936
949
  let criteria;
937
950
  const searchOptions = {
@@ -961,7 +974,16 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
961
974
  }
962
975
  }
963
976
  });
964
- return this.executePreparedSearch(mode, argument, { entity: ENTITYNAME, entityDescription: DESCRIPTIONENTITY, criteria, searchOptions });
977
+ const allowsNonAnalytic = ctxOptions === null || ctxOptions === void 0 ? void 0 : ctxOptions.allowsNonAnalytic;
978
+ const options = {
979
+ entity: ENTITYNAME,
980
+ entityDescription: DESCRIPTIONENTITY,
981
+ isHierarchyEntity: ISHIERARCHYENTITY,
982
+ criteria,
983
+ searchOptions,
984
+ allowsNonAnalytic
985
+ };
986
+ return this.executePreparedSearch(mode, argument, options);
965
987
  }
966
988
  }
967
989
  filterInvalidFields(resp, item, mdByName) {
@@ -1011,13 +1033,19 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1011
1033
  */
1012
1034
  async executePreparedSearch(mode, argument, options) {
1013
1035
  const mdByName = {};
1014
- const { entity, entityDescription, criteria, searchOptions } = options;
1036
+ const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic } = options;
1015
1037
  if (mode === "ADVANCED") {
1016
1038
  return new Promise((accept, reject) => {
1017
1039
  const pesquisaContent = document.createElement("snk-pesquisa");
1018
1040
  pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
1041
+ pesquisaContent.entityName = entity;
1019
1042
  pesquisaContent.argument = argument;
1020
1043
  pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
1044
+ pesquisaContent.isHierarchyEntity = isHierarchyEntity;
1045
+ if (isHierarchyEntity) {
1046
+ pesquisaContent.treeLoader = (text) => this.pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
1047
+ pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
1048
+ }
1021
1049
  pesquisaContent.selectItem = (option) => {
1022
1050
  accept(option);
1023
1051
  this.clearPopUpTitle();
@@ -1325,8 +1353,8 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1325
1353
  this._errorHandler = new SnkErrorHandler(this);
1326
1354
  this.messagesBuilder = new SnkMessageBuilder();
1327
1355
  ApplicationContext.setContextValue("__EZUI__UPLOAD__ADD__URL__", `${UrlUtils.getUrlBase()}/mge/upload/file`);
1328
- ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit) => {
1329
- return this.executeSearch(searchArgument, fieldName, dataUnit);
1356
+ ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit, ctxOptions) => {
1357
+ return this.executeSearch(searchArgument, fieldName, dataUnit, ctxOptions);
1330
1358
  });
1331
1359
  ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
1332
1360
  this.registerPkChangeListener();
@@ -1340,12 +1368,15 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1340
1368
  this._waitingAppReady.forEach(resolve => resolve());
1341
1369
  }
1342
1370
  connectedCallback() {
1371
+ this._isBrowserTypeElectron = UserAgentUtils.isElectron();
1343
1372
  ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
1344
1373
  DataFetcher.addRequestListener(this._requestListener);
1345
1374
  }
1346
1375
  disconnectedCallback() {
1347
- DataFetcher.removeRequestListener(this._requestListener);
1376
+ DataFetcher === null || DataFetcher === void 0 ? void 0 : DataFetcher.removeRequestListener(this._requestListener);
1348
1377
  this.removeShortcuts();
1378
+ if (this._lockManagerTimer)
1379
+ clearTimeout(this._lockManagerTimer);
1349
1380
  }
1350
1381
  async componentDidLoad() {
1351
1382
  this.applicationLoading.emit(true);
@@ -1357,6 +1388,63 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1357
1388
  ElementIDUtils.addIDInfo(this._element, `resource_${this.applicationResourceID}`);
1358
1389
  await this.handleShowNewVersionPopup();
1359
1390
  this.initKeyboardManager();
1391
+ if (this.enableLockManagerLoadingApp) {
1392
+ LockManager.addLockManagerCtxId(this._element);
1393
+ this.resolveApplicationReady();
1394
+ }
1395
+ else {
1396
+ this._applicationReady = true;
1397
+ }
1398
+ }
1399
+ async markToReload() {
1400
+ if (!this.enableLockManagerLoadingApp)
1401
+ return;
1402
+ this._applicationReady = false;
1403
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1404
+ this.resolveApplicationReady();
1405
+ }
1406
+ async addLoadingLock(forceReady = false) {
1407
+ if (!this.enableLockManagerLoadingApp)
1408
+ return;
1409
+ if (forceReady) {
1410
+ this._applicationReady = false;
1411
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1412
+ }
1413
+ this.resolveApplicationReady();
1414
+ return await LockManager.lock(this._element, LockManagerOperation.APP_LOADING);
1415
+ }
1416
+ async resolveApplicationReady() {
1417
+ if (this._applicationReady) {
1418
+ return;
1419
+ }
1420
+ try {
1421
+ await this.checkTimeoutLimitLockManager();
1422
+ await LockManager.whenHasLock(this._element, LockManagerOperation.APP_LOADING);
1423
+ await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 1200);
1424
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1425
+ this._applicationReady = true;
1426
+ }
1427
+ catch (error) {
1428
+ console.warn(error);
1429
+ this._applicationReady = true;
1430
+ }
1431
+ }
1432
+ stopTimeoutLockManager() {
1433
+ if (this._lockManagerTimer) {
1434
+ clearTimeout(this._lockManagerTimer);
1435
+ }
1436
+ }
1437
+ async checkTimeoutLimitLockManager() {
1438
+ this.stopTimeoutLockManager();
1439
+ if (this._applicationReady)
1440
+ return;
1441
+ this._lockManagerTimer = setTimeout(async () => {
1442
+ if (!this._applicationReady) {
1443
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1444
+ this.stopTimeoutLockManager();
1445
+ this._applicationReady = true;
1446
+ }
1447
+ }, this._maxTimeLockAppLoading);
1360
1448
  }
1361
1449
  initKeyboardManager() {
1362
1450
  this._keyboardManager
@@ -1370,8 +1458,40 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1370
1458
  .unbind("ctrl + d")
1371
1459
  .unbind("F1");
1372
1460
  }
1461
+ // TODO: Etapa 2 - implementar template de loading
1462
+ renderLoadingSkeleton(template) {
1463
+ if (this.enableLockManagerLoadingApp) {
1464
+ if (!this._isBrowserTypeElectron) {
1465
+ switch (template) {
1466
+ case TEMPLATES_LOADING_SKELETON.APPLICATION:
1467
+ case TEMPLATES_LOADING_SKELETON.GRID:
1468
+ return this.getSkeletonTemplateApplication();
1469
+ default:
1470
+ return this.getSkeletonTemplateApplication();
1471
+ }
1472
+ }
1473
+ else {
1474
+ return this.getSpinnerLoadingDefault();
1475
+ }
1476
+ }
1477
+ }
1478
+ getLoadingVisibilityStyle() {
1479
+ return {
1480
+ visibility: this._applicationReady ? "hidden" : "initial",
1481
+ display: this._applicationReady ? "none" : "unset"
1482
+ };
1483
+ }
1484
+ getSkeletonTemplateApplication() {
1485
+ 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" }))));
1486
+ }
1487
+ getSpinnerLoadingDefault() {
1488
+ 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..."))));
1489
+ }
1373
1490
  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 })));
1491
+ return (h(Host, { style: {
1492
+ visibility: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden",
1493
+ overflow: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden"
1494
+ } }, 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
1495
  }
1376
1496
  get _element() { return this; }
1377
1497
  static get watchers() { return {
@@ -1379,11 +1499,13 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1379
1499
  }; }
1380
1500
  static get style() { return snkApplicationCss; }
1381
1501
  }, [2, "snk-application", {
1502
+ "enableLockManagerLoadingApp": [4, "enable-lock-manager-loading-app"],
1382
1503
  "messagesBuilder": [1040],
1383
1504
  "configName": [1, "config-name"],
1384
1505
  "gridLegacyConfigName": [1, "grid-legacy-config-name"],
1385
1506
  "formLegacyConfigName": [1, "form-legacy-config-name"],
1386
1507
  "loadByPK": [16],
1508
+ "_applicationReady": [32],
1387
1509
  "getKeyboardManager": [64],
1388
1510
  "isUserSup": [64],
1389
1511
  "addPendingAction": [64],
@@ -1434,7 +1556,9 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1434
1556
  "executeSelectDistinct": [64],
1435
1557
  "getDataFetcher": [64],
1436
1558
  "whenApplicationReady": [64],
1437
- "setSearchFilterContext": [64]
1559
+ "setSearchFilterContext": [64],
1560
+ "markToReload": [64],
1561
+ "addLoadingLock": [64]
1438
1562
  }]);
1439
1563
  class PendingPromise {
1440
1564
  constructor(resolve, reject) {
@@ -1442,17 +1566,32 @@ class PendingPromise {
1442
1566
  this.reject = reject;
1443
1567
  }
1444
1568
  }
1569
+ var TEMPLATES_LOADING_SKELETON;
1570
+ (function (TEMPLATES_LOADING_SKELETON) {
1571
+ TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["APPLICATION"] = 1] = "APPLICATION";
1572
+ TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["GRID"] = 2] = "GRID";
1573
+ })(TEMPLATES_LOADING_SKELETON || (TEMPLATES_LOADING_SKELETON = {}));
1445
1574
  function defineCustomElement() {
1446
1575
  if (typeof customElements === "undefined") {
1447
1576
  return;
1448
1577
  }
1449
- const components = ["snk-application", "snk-pesquisa"];
1578
+ const components = ["snk-application", "pesquisa-grid", "pesquisa-tree", "snk-pesquisa"];
1450
1579
  components.forEach(tagName => { switch (tagName) {
1451
1580
  case "snk-application":
1452
1581
  if (!customElements.get(tagName)) {
1453
1582
  customElements.define(tagName, SnkApplication);
1454
1583
  }
1455
1584
  break;
1585
+ case "pesquisa-grid":
1586
+ if (!customElements.get(tagName)) {
1587
+ defineCustomElement$3();
1588
+ }
1589
+ break;
1590
+ case "pesquisa-tree":
1591
+ if (!customElements.get(tagName)) {
1592
+ defineCustomElement$2();
1593
+ }
1594
+ break;
1456
1595
  case "snk-pesquisa":
1457
1596
  if (!customElements.get(tagName)) {
1458
1597
  defineCustomElement$1();
@@ -1,7 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { ApplicationContext, DataType, Action, UserInterface, StringUtils, DataUnit } from '@sankhyalabs/core';
3
3
  import { D as DataFetcher } from './DataFetcher.js';
4
- import './pesquisa-fetcher.js';
5
4
  import { S as SaveErrorsEnum } from './ISave.js';
6
5
  import { P as PreloadManager, b as buildLoadDataResponse, D as DataUnitFetcher, I as InMemoryLoader } from './dataunit-fetcher.js';
7
6
  import './filter-item-type.enum.js';
@@ -2,7 +2,6 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
2
2
  import { StringUtils, ElementIDUtils, ApplicationContext, JSUtils, FloatingManager } from '@sankhyalabs/core';
3
3
  import { T as TaskbarElement, d as defineCustomElement$3 } from './snk-taskbar2.js';
4
4
  import './DataFetcher.js';
5
- import './pesquisa-fetcher.js';
6
5
  import { P as PresentationMode } from './ISave.js';
7
6
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
8
7
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -63,6 +62,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
63
62
  this._currentViewMode = VIEW_MODE.GRID;
64
63
  this._canEdit = undefined;
65
64
  this._resourceID = undefined;
65
+ this.enableLockManagerLoadingComp = false;
66
+ this.enableLockManagerTaskbarClick = false;
66
67
  this.configName = undefined;
67
68
  this.filterBarTitle = undefined;
68
69
  this.selectionToastConfig = undefined;
@@ -84,7 +85,6 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
84
85
  this.enableGridInsert = false;
85
86
  this.domainMessagesBuilder = undefined;
86
87
  this.ignoreReadOnlyFormFields = undefined;
87
- this.enableLockManger = false;
88
88
  this.setCustomFormTitle = undefined;
89
89
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
90
90
  }
@@ -431,7 +431,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
431
431
  return;
432
432
  }
433
433
  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" }))));
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, 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
435
  }
436
436
  get _element() { return this; }
437
437
  static get watchers() { return {
@@ -439,6 +439,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
439
439
  }; }
440
440
  static get style() { return snkCrudCss; }
441
441
  }, [6, "snk-crud", {
442
+ "enableLockManagerLoadingComp": [4, "enable-lock-manager-loading-comp"],
443
+ "enableLockManagerTaskbarClick": [4, "enable-lock-manager-taskbar-click"],
442
444
  "configName": [1025, "config-name"],
443
445
  "filterBarTitle": [1, "filter-bar-title"],
444
446
  "selectionToastConfig": [16],
@@ -460,7 +462,6 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
460
462
  "enableGridInsert": [4, "enable-grid-insert"],
461
463
  "domainMessagesBuilder": [1, "domain-messages-builder"],
462
464
  "ignoreReadOnlyFormFields": [4, "ignore-read-only-form-fields"],
463
- "enableLockManger": [4, "enable-lock-manger"],
464
465
  "setCustomFormTitle": [16],
465
466
  "_dataUnit": [32],
466
467
  "_dataState": [32],
@@ -1,11 +1,10 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { ApplicationContext, ObjectUtils, UserInterface, DataType, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
4
- import { D as DataExporterOption, a as DataExporterType, b as DataExporterFormat } from './ISave.js';
4
+ import { D as DataExporterOption, b as DataExporterType, c as DataExporterFormat } from './ISave.js';
5
5
  import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants.js';
6
6
  import { D as DataFetcher } from './DataFetcher.js';
7
7
  import { S as SnkDataUnit } from './snk-data-unit2.js';
8
- import './pesquisa-fetcher.js';
9
8
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
10
9
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
11
10
  import './dataunit-fetcher.js';
@@ -3,7 +3,6 @@ import { Action, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { S as SnkFormConfigManager } from './SnkFormConfigManager.js';
4
4
  import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
5
5
  import './DataFetcher.js';
6
- import './pesquisa-fetcher.js';
7
6
  import { P as PresentationMode } from './ISave.js';
8
7
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
9
8
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -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],
@@ -7,7 +7,6 @@ import { C as CommonsExporter, T as TaskbarProcessor, S as SnkMultiSelectionList
7
7
  import { s as store } from './index2.js';
8
8
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
9
9
  import './DataFetcher.js';
10
- import './pesquisa-fetcher.js';
11
10
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
12
11
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
13
12
  import './dataunit-fetcher.js';
@@ -130,6 +129,8 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
130
129
  this._showSnkFilterBar = true;
131
130
  this._enableContinuousInsert = false;
132
131
  this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
132
+ this.enableLockManagerLoadingComp = false;
133
+ this.enableLockManagerTaskbarClick = false;
133
134
  this.configName = undefined;
134
135
  this.filterBarTitle = undefined;
135
136
  this.resourceID = undefined;
@@ -153,7 +154,6 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
153
154
  this.autoLoad = undefined;
154
155
  this.autoFocus = true;
155
156
  this.enableGridInsert = false;
156
- this.enableLockManger = false;
157
157
  this.outlineMode = false;
158
158
  }
159
159
  /**
@@ -543,7 +543,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
543
543
  return undefined;
544
544
  }
545
545
  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 }))));
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, 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
547
  }
548
548
  get _element() { return this; }
549
549
  static get watchers() { return {
@@ -552,6 +552,8 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
552
552
  static get style() { return snkGridCss; }
553
553
  }, [6, "snk-grid", {
554
554
  "columnFilterDataSource": [1040],
555
+ "enableLockManagerLoadingComp": [4, "enable-lock-manager-loading-comp"],
556
+ "enableLockManagerTaskbarClick": [4, "enable-lock-manager-taskbar-click"],
555
557
  "configName": [1, "config-name"],
556
558
  "filterBarTitle": [1, "filter-bar-title"],
557
559
  "resourceID": [1, "resource-i-d"],
@@ -575,7 +577,6 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
575
577
  "autoLoad": [4, "auto-load"],
576
578
  "autoFocus": [4, "auto-focus"],
577
579
  "enableGridInsert": [4, "enable-grid-insert"],
578
- "enableLockManger": [4, "enable-lock-manger"],
579
580
  "outlineMode": [4, "outline-mode"],
580
581
  "_dataUnit": [32],
581
582
  "_dataState": [32],