@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-78242.2 → 0.0.0-bugfix-dev-KB-80932.0

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 (175) hide show
  1. package/dist/cjs/{ConfigStorage-f079f5fd.js → ConfigStorage-d024aec8.js} +2 -2
  2. package/dist/cjs/{ContinuousInsertUtils-64e47516.js → ContinuousInsertUtils-54d44192.js} +5 -5
  3. package/dist/cjs/{DataFetcher-e059eb72.js → DataFetcher-65879b2c.js} +188 -56
  4. package/dist/cjs/{SnkFormConfigManager-63369164.js → SnkFormConfigManager-ae3185b2.js} +2 -2
  5. package/dist/cjs/{auth-fetcher-4f853233.js → auth-fetcher-8480751c.js} +1 -1
  6. package/dist/cjs/{dataunit-fetcher-228016f4.js → dataunit-fetcher-8ea97d88.js} +2 -2
  7. package/dist/cjs/{form-config-fetcher-39397ac5.js → form-config-fetcher-90126e4c.js} +38 -1
  8. package/dist/cjs/index-f9e81701.js +8 -4
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{pesquisa-fetcher-a9bfeb22.js → pesquisa-fetcher-f3454c23.js} +179 -1
  11. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +133 -0
  12. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  13. package/dist/cjs/{snk-actions-button_4.cjs.entry.js → snk-actions-button_5.cjs.entry.js} +99 -9
  14. package/dist/cjs/snk-application.cjs.entry.js +144 -21
  15. package/dist/cjs/snk-attach.cjs.entry.js +13 -9
  16. package/dist/cjs/snk-config-options_3.cjs.entry.js +4 -4
  17. package/dist/cjs/snk-crud.cjs.entry.js +8 -7
  18. package/dist/cjs/snk-data-exporter.cjs.entry.js +29 -18
  19. package/dist/cjs/{snk-data-unit-3d9b6ed4.js → snk-data-unit-72ef8777.js} +1 -1
  20. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  21. package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
  22. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +27 -11
  23. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  24. package/dist/cjs/snk-grid.cjs.entry.js +9 -8
  25. package/dist/cjs/{snk-guides-viewer-2139481c.js → snk-guides-viewer-ea5d0907.js} +5 -5
  26. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  27. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  28. package/dist/cjs/snk-pesquisa.cjs.entry.js +105 -31
  29. package/dist/cjs/snk-simple-crud.cjs.entry.js +27 -29
  30. package/dist/collection/collection-manifest.json +3 -0
  31. package/dist/collection/components/snk-actions-button/actions/index.js +4 -4
  32. package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +4 -3
  33. package/dist/collection/components/snk-application/snk-application.css +34 -0
  34. package/dist/collection/components/snk-application/snk-application.js +197 -14
  35. package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +8 -4
  36. package/dist/collection/components/snk-crud/snk-crud.js +39 -20
  37. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +11 -5
  38. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +11 -4
  39. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -1
  40. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -3
  41. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +1 -1
  42. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +3 -1
  43. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +40 -8
  44. package/dist/collection/components/snk-grid/snk-grid.js +39 -20
  45. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css +10 -0
  46. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +190 -0
  47. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css +25 -0
  48. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +179 -0
  49. package/dist/collection/components/snk-pesquisa/pesquisaHelper.js +89 -0
  50. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +24 -5
  51. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +168 -32
  52. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +56 -41
  53. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +22 -0
  54. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +181 -0
  55. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +1 -1
  56. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +41 -4
  57. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +92 -3
  58. package/dist/components/ContinuousInsertUtils.js +2 -3
  59. package/dist/components/DataFetcher.js +188 -56
  60. package/dist/components/ISave.js +346 -1
  61. package/dist/components/dataunit-fetcher.js +1 -1
  62. package/dist/components/form-config-fetcher.js +37 -0
  63. package/dist/components/index.d.ts +3 -0
  64. package/dist/components/index.js +3 -0
  65. package/dist/components/pesquisa-grid.d.ts +11 -0
  66. package/dist/components/pesquisa-grid.js +6 -0
  67. package/dist/components/pesquisa-grid2.js +86 -0
  68. package/dist/components/pesquisa-tree.d.ts +11 -0
  69. package/dist/components/pesquisa-tree.js +6 -0
  70. package/dist/components/pesquisa-tree2.js +82 -0
  71. package/dist/components/snk-actions-button2.js +4 -5
  72. package/dist/components/snk-application2.js +159 -20
  73. package/dist/components/snk-attach2.js +20 -35
  74. package/dist/components/snk-crud.js +66 -59
  75. package/dist/components/snk-data-exporter2.js +25 -15
  76. package/dist/components/snk-detail-view2.js +84 -94
  77. package/dist/components/snk-filter-bar2.js +23 -8
  78. package/dist/components/snk-filter-modal.js +3 -1
  79. package/dist/components/snk-grid2.js +5 -4
  80. package/dist/components/snk-pesquisa2.js +118 -33
  81. package/dist/components/snk-simple-crud2.js +35 -56
  82. package/dist/components/snk-simple-form-config.d.ts +11 -0
  83. package/dist/components/snk-simple-form-config.js +6 -0
  84. package/dist/components/snk-simple-form-config2.js +120 -0
  85. package/dist/components/teste-pesquisa.js +13 -1
  86. package/dist/esm/{ConfigStorage-6514d66e.js → ConfigStorage-373bb440.js} +2 -2
  87. package/dist/esm/{ContinuousInsertUtils-b62906f9.js → ContinuousInsertUtils-25e7bd9a.js} +5 -5
  88. package/dist/esm/{DataFetcher-5034df59.js → DataFetcher-5221b992.js} +188 -56
  89. package/dist/esm/{SnkFormConfigManager-b409c745.js → SnkFormConfigManager-b65e6db0.js} +2 -2
  90. package/dist/esm/{auth-fetcher-ca5d3a49.js → auth-fetcher-e32fe8a4.js} +1 -1
  91. package/dist/esm/{dataunit-fetcher-56cb648b.js → dataunit-fetcher-8dd93d8b.js} +2 -2
  92. package/dist/esm/{form-config-fetcher-a7d3e277.js → form-config-fetcher-126e2471.js} +38 -1
  93. package/dist/esm/index-a7d3d3f1.js +8 -4
  94. package/dist/esm/loader.js +1 -1
  95. package/dist/{components/pesquisa-fetcher.js → esm/pesquisa-fetcher-0af41f09.js} +180 -3
  96. package/dist/esm/pesquisa-grid_2.entry.js +128 -0
  97. package/dist/esm/sankhyablocks.js +1 -1
  98. package/dist/esm/{snk-actions-button_4.entry.js → snk-actions-button_5.entry.js} +99 -10
  99. package/dist/esm/snk-application.entry.js +146 -23
  100. package/dist/esm/snk-attach.entry.js +13 -9
  101. package/dist/esm/snk-config-options_3.entry.js +4 -4
  102. package/dist/esm/snk-crud.entry.js +8 -7
  103. package/dist/esm/snk-data-exporter.entry.js +29 -18
  104. package/dist/esm/{snk-data-unit-9fa7d2b9.js → snk-data-unit-11a49fc3.js} +1 -1
  105. package/dist/esm/snk-data-unit.entry.js +3 -3
  106. package/dist/esm/snk-detail-view.entry.js +7 -7
  107. package/dist/esm/snk-filter-bar_4.entry.js +28 -12
  108. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  109. package/dist/esm/snk-grid.entry.js +9 -8
  110. package/dist/esm/{snk-guides-viewer-b7ed39eb.js → snk-guides-viewer-830f5fb9.js} +5 -5
  111. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  112. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  113. package/dist/esm/snk-pesquisa.entry.js +105 -31
  114. package/dist/esm/snk-simple-crud.entry.js +27 -29
  115. package/dist/sankhyablocks/{p-0e206e62.js → p-05b6ff91.js} +1 -1
  116. package/dist/sankhyablocks/p-09067bee.entry.js +1 -0
  117. package/dist/sankhyablocks/p-0cda2226.entry.js +11 -0
  118. package/dist/sankhyablocks/p-1435701f.js +26 -0
  119. package/dist/sankhyablocks/{p-e97be1c8.js → p-171b7623.js} +1 -1
  120. package/dist/sankhyablocks/{p-9ffd9fc7.js → p-19dc71e9.js} +1 -1
  121. package/dist/sankhyablocks/{p-0d2a2e9e.entry.js → p-1a91d1f3.entry.js} +1 -1
  122. package/dist/sankhyablocks/{p-aa003d4e.entry.js → p-1cf39cfd.entry.js} +1 -1
  123. package/dist/sankhyablocks/{p-bb8ef149.entry.js → p-254c59d2.entry.js} +1 -1
  124. package/dist/sankhyablocks/p-422eb699.entry.js +1 -0
  125. package/dist/sankhyablocks/{p-a2c790ac.entry.js → p-469384a2.entry.js} +1 -1
  126. package/dist/sankhyablocks/p-54f5354a.entry.js +1 -0
  127. package/dist/sankhyablocks/{p-342eeb3b.js → p-60e4db34.js} +1 -1
  128. package/dist/sankhyablocks/p-618a29ed.entry.js +1 -0
  129. package/dist/sankhyablocks/p-798386c7.js +6 -0
  130. package/dist/sankhyablocks/{p-fca0e5cc.entry.js → p-82ee6dc3.entry.js} +1 -1
  131. package/dist/sankhyablocks/{p-e4391e16.js → p-8a1ee5b5.js} +1 -1
  132. package/dist/sankhyablocks/p-8bd86610.entry.js +1 -0
  133. package/dist/sankhyablocks/p-b50a0753.entry.js +1 -0
  134. package/dist/sankhyablocks/p-d62228fb.js +1 -0
  135. package/dist/sankhyablocks/p-d92d4f91.entry.js +1 -0
  136. package/dist/sankhyablocks/{p-47d24ac8.js → p-ddefbbc7.js} +1 -1
  137. package/dist/sankhyablocks/p-e5430b29.entry.js +1 -0
  138. package/dist/sankhyablocks/p-f0b9303b.js +1 -0
  139. package/dist/sankhyablocks/p-f258690a.entry.js +1 -0
  140. package/dist/sankhyablocks/{p-ec43fcc8.entry.js → p-f975370f.entry.js} +1 -1
  141. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  142. package/dist/types/components/snk-application/snk-application.d.ts +22 -4
  143. package/dist/types/components/snk-crud/snk-crud.d.ts +8 -4
  144. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +1 -0
  145. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +1 -0
  146. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +1 -1
  147. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +6 -1
  148. package/dist/types/components/snk-grid/snk-grid.d.ts +8 -4
  149. package/dist/types/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.d.ts +38 -0
  150. package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +29 -0
  151. package/dist/types/components/snk-pesquisa/pesquisaHelper.d.ts +19 -0
  152. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +35 -1
  153. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -4
  154. package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +34 -0
  155. package/dist/types/components.d.ts +244 -23
  156. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +8 -2
  157. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +10 -1
  158. package/package.json +1 -1
  159. package/react/components.d.ts +3 -0
  160. package/react/components.js +3 -0
  161. package/react/components.js.map +1 -1
  162. package/dist/esm/pesquisa-fetcher-6bc2e41a.js +0 -169
  163. package/dist/sankhyablocks/p-00278e07.js +0 -1
  164. package/dist/sankhyablocks/p-0387d9d7.entry.js +0 -1
  165. package/dist/sankhyablocks/p-126c58ea.js +0 -26
  166. package/dist/sankhyablocks/p-1d3ce0d9.entry.js +0 -1
  167. package/dist/sankhyablocks/p-341465ce.js +0 -6
  168. package/dist/sankhyablocks/p-3728d2aa.entry.js +0 -11
  169. package/dist/sankhyablocks/p-4138da61.entry.js +0 -1
  170. package/dist/sankhyablocks/p-5d9788b3.entry.js +0 -1
  171. package/dist/sankhyablocks/p-7075b789.entry.js +0 -1
  172. package/dist/sankhyablocks/p-aaf94476.js +0 -1
  173. package/dist/sankhyablocks/p-af7f7b3e.entry.js +0 -1
  174. package/dist/sankhyablocks/p-d1791da2.entry.js +0 -1
  175. package/dist/sankhyablocks/p-eb7c9cf4.entry.js +0 -1
@@ -7,19 +7,19 @@ const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const constants = require('./constants-35ddd366.js');
9
9
  const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
10
- require('./DataFetcher-e059eb72.js');
11
- require('./pesquisa-fetcher-a9bfeb22.js');
12
- const ContinuousInsertUtils = require('./ContinuousInsertUtils-64e47516.js');
10
+ require('./DataFetcher-65879b2c.js');
11
+ require('./pesquisa-fetcher-f3454c23.js');
12
+ const ContinuousInsertUtils = require('./ContinuousInsertUtils-54d44192.js');
13
13
  const index = require('./index-1dfc7a6e.js');
14
14
  require('./ISave-e91b70a7.js');
15
15
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
16
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
17
- const dataunitFetcher = require('./dataunit-fetcher-228016f4.js');
17
+ const dataunitFetcher = require('./dataunit-fetcher-8ea97d88.js');
18
18
  require('./filter-item-type.enum-a7ffdaa6.js');
19
- const formConfigFetcher = require('./form-config-fetcher-39397ac5.js');
19
+ const formConfigFetcher = require('./form-config-fetcher-90126e4c.js');
20
20
  const fieldSearch = require('./field-search-68e34bf4.js');
21
- const ConfigStorage = require('./ConfigStorage-f079f5fd.js');
22
- const SnkFormConfigManager = require('./SnkFormConfigManager-63369164.js');
21
+ const ConfigStorage = require('./ConfigStorage-d024aec8.js');
22
+ const SnkFormConfigManager = require('./SnkFormConfigManager-ae3185b2.js');
23
23
  const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
24
24
  const index$2 = require('./index-102ba62d.js');
25
25
  require('./PrintUtils-bcaeb82f.js');
@@ -110,18 +110,18 @@ const SnkSimpleCrud = class {
110
110
  "snkSimpleCrudTaskbar.finish_edition": this.getFinishEditionButtonsCallback.bind(this)
111
111
  });
112
112
  this._showPopUpGridConfig = false;
113
- this._showFormConfig = false;
114
113
  this._currentViewMode = constants.VIEW_MODE.GRID;
115
114
  this._config = undefined;
116
115
  this._fieldToGetFocus = undefined;
117
116
  this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
117
+ this.enableLockManagerLoadingComp = false;
118
+ this.enableLockManagerTaskbarClick = false;
118
119
  this.dataState = undefined;
119
120
  this.dataUnit = undefined;
120
121
  this.entityName = undefined;
121
122
  this.mode = constants.SIMPLE_CRUD_MODE.SERVER;
122
123
  this.gridConfig = undefined;
123
124
  this.formConfig = undefined;
124
- this.enableLockManger = false;
125
125
  this._formFields = [];
126
126
  this._fieldsProps = new Map();
127
127
  this._enableContinuousInsert = true;
@@ -331,15 +331,9 @@ const SnkSimpleCrud = class {
331
331
  });
332
332
  }
333
333
  async openFormConfig() {
334
- var _a, _b;
335
- //No momento não daremos suporte para configuraçao de formulário quando houver legacy config
336
- if (this.formLegacyConfigName) {
337
- const title = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.formConfigUnavaliable.title", undefined);
338
- const message = (_b = this.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage("snkSimpleCrud.formConfigUnavaliable.message", undefined);
339
- await this.application.alert(title, message);
340
- return;
334
+ if (this.formLegacyConfigName || this.configName) {
335
+ await this._snkSimpleFormConfig.show();
341
336
  }
342
- this._showFormConfig = true;
343
337
  }
344
338
  addGridLegacyConfigName() {
345
339
  if (this.gridLegacyConfigName && this.configName) {
@@ -369,7 +363,7 @@ const SnkSimpleCrud = class {
369
363
  formConfigIsLoaded() {
370
364
  return this.formConfig != undefined || this._formConfigAlreadyLoaded;
371
365
  }
372
- async loadFormConfig(forceLoad = false) {
366
+ async loadFormConfig(forceLoad = false, forceSetNewConfig = false) {
373
367
  if (this.configName === undefined) {
374
368
  return;
375
369
  }
@@ -384,7 +378,7 @@ const SnkSimpleCrud = class {
384
378
  let loadedLegacyConfig = await this._formConfigFetcher.fetchLegacyConfigurableForm(this.formLegacyConfigName);
385
379
  if (loadedLegacyConfig != undefined) {
386
380
  this._formConfigManager.setConfig(loadedLegacyConfig);
387
- this.setFormConfig(loadedLegacyConfig);
381
+ this.setFormConfig(loadedLegacyConfig, forceSetNewConfig);
388
382
  return;
389
383
  }
390
384
  this.setFormConfig(await this._formConfigManager.loadConfig());
@@ -768,9 +762,6 @@ const SnkSimpleCrud = class {
768
762
  closeGridConfig() {
769
763
  this._showPopUpGridConfig = false;
770
764
  }
771
- closeFormConfig() {
772
- this._showFormConfig = false;
773
- }
774
765
  getPageSize() {
775
766
  if (this.mode === constants.SIMPLE_CRUD_MODE.IN_MEMORY) {
776
767
  return 0;
@@ -780,10 +771,6 @@ const SnkSimpleCrud = class {
780
771
  }
781
772
  return this.pageSize;
782
773
  }
783
- //No momento não daremos suporte para configuração de formulário quando houver formLegacyConfigName
784
- handleShowFormConfig() {
785
- return this._showFormConfig && !this.formLegacyConfigName;
786
- }
787
774
  resolveResourceID() {
788
775
  return core.StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
789
776
  }
@@ -796,7 +783,10 @@ const SnkSimpleCrud = class {
796
783
  return configFromManager;
797
784
  }
798
785
  updateFormConfig() {
799
- const newConfig = Object.assign(Object.assign({}, this.formConfig), { fields: this.dataUnit.metadata.fields });
786
+ let newConfig = this.formConfig;
787
+ if (this.formLegacyConfigName == undefined) {
788
+ newConfig = Object.assign(Object.assign({}, this.formConfig), { fields: this.dataUnit.metadata.fields });
789
+ }
800
790
  this.setFormConfig(newConfig, true);
801
791
  if (this._formConfigManager == undefined) {
802
792
  this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resolveResourceID());
@@ -809,8 +799,12 @@ const SnkSimpleCrud = class {
809
799
  this.goToView(constants.VIEW_MODE.FORM);
810
800
  }
811
801
  async initKeyboardManager() {
802
+ var _a;
812
803
  const keyboardManager = new core.KeyboardManager();
813
- const dataUnit = this.dataUnit || await this._snkDataUnit.getDataUnit();
804
+ const dataUnit = this.dataUnit || await ((_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.getDataUnit());
805
+ if (dataUnit == undefined) {
806
+ return;
807
+ }
814
808
  keyboardManager
815
809
  .bind("F7", () => dataUnit.saveData(), { description: "Salva os dados.", element: this._element })
816
810
  .bind("F8", dataUnit.addRecord.bind(dataUnit), { description: "Adiciona um novo registro.", element: this._element })
@@ -824,18 +818,22 @@ const SnkSimpleCrud = class {
824
818
  description: "Cancela uma ação.", element: this._element
825
819
  });
826
820
  }
821
+ async handleFormConfigSaved() {
822
+ await this.loadFormConfig(true, true);
823
+ }
827
824
  renderTaskbarContent() {
828
825
  var _a;
829
826
  return (index$1.h("snk-taskbar", { class: this._currentViewMode === constants.VIEW_MODE.FORM && `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow-xsmall'} ez-padding--small`, dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: index.PresentationMode.SECONDARY }, index$1.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
830
827
  }
831
828
  /* istanbul ignore next */
832
829
  render() {
830
+ var _a;
833
831
  if (this.dataUnit == undefined) {
834
832
  return;
835
833
  }
836
834
  return (index$1.h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, index$1.h("header", null, index$1.h("slot", { name: "snkSimpleCrudHeader" })), index$1.h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section` }, index$1.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index$1.h("stack-item", null, index$1.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(dataunitFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
837
835
  ? undefined
838
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger, outlineMode: this.outlineMode }, this.renderTaskbarContent(), index$1.h("div", { slot: "footer" }, index$1.h("slot", { name: "snkSimpleCrudFooter" })))), index$1.h("stack-item", null, this.renderTaskbarContent(), index$1.h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && index$1.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index$1.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), index$1.h("div", { id: `${this._customContainerId}` }, index$1.h("slot", { name: "SnkConfigContainerSlot" }))), index$1.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index$1.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
836
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, this.renderTaskbarContent(), index$1.h("div", { slot: "footer" }, index$1.h("slot", { name: "snkSimpleCrudFooter" })))), index$1.h("stack-item", null, this.renderTaskbarContent(), index$1.h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), index$1.h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && index$1.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), index$1.h("div", { id: `${this._customContainerId}` }, index$1.h("slot", { name: "SnkConfigContainerSlot" }))), index$1.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index$1.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
839
837
  }
840
838
  get _element() { return index$1.getElement(this); }
841
839
  static get watchers() { return {
@@ -48,8 +48,11 @@
48
48
  "./components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js",
49
49
  "./components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js",
50
50
  "./components/snk-pesquisa/snk-pesquisa.js",
51
+ "./components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js",
52
+ "./components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js",
51
53
  "./components/snk-simple-bar/snk-simple-bar.js",
52
54
  "./components/snk-simple-crud/snk-simple-crud.js",
55
+ "./components/snk-simple-form-config/snk-simple-form-config.js",
53
56
  "./components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js",
54
57
  "./components/teste-pesquisa/teste-pesquisa.js"
55
58
  ],
@@ -87,9 +87,9 @@ export default class Actions {
87
87
  return resultParams;
88
88
  });
89
89
  }
90
- actionExecute(execSource, callback) {
90
+ async actionExecute(execSource, callback) {
91
91
  execSource.virtualPage = this.buildVirtualPage();
92
- this.prepareAndExecute(execSource, callback);
92
+ await this.prepareAndExecute(execSource, callback);
93
93
  this.recordsReloader(execSource.refreshType);
94
94
  }
95
95
  resolvePromptParams(action, execSource, hasParamsToSave) {
@@ -284,9 +284,9 @@ export default class Actions {
284
284
  async buildResourceId(actionId) {
285
285
  return this._appResourceId + '.actionconfig.' + actionId;
286
286
  }
287
- prepareAndExecute(execSource, executeAction) {
287
+ async prepareAndExecute(execSource, executeAction) {
288
288
  this.addRows(execSource);
289
- executeAction(execSource);
289
+ await executeAction(execSource);
290
290
  }
291
291
  addRows(execSource) {
292
292
  const primaryKeys = this.getPrimaryKeys();
@@ -16,11 +16,12 @@ class DebouncedRequestListener {
16
16
  }
17
17
  ;
18
18
  onRequestEnd(param) {
19
+ var _a, _b, _c;
19
20
  const timeoutId = this.requests.get(param.requestId);
20
21
  clearTimeout(timeoutId);
21
- if (this.requestsLoadingBar.includes(param.requestId)) {
22
- this.requestsLoadingBar = this.requestsLoadingBar.filter(id => id !== param.requestId);
23
- !this.requestsLoadingBar.length && this.ezLoadingBar.hide();
22
+ if ((_a = this.requestsLoadingBar) === null || _a === void 0 ? void 0 : _a.includes(param.requestId)) {
23
+ this.requestsLoadingBar = (_b = this.requestsLoadingBar) === null || _b === void 0 ? void 0 : _b.filter(id => id !== param.requestId);
24
+ !this.requestsLoadingBar.length && ((_c = this.ezLoadingBar) === null || _c === void 0 ? void 0 : _c.hide());
24
25
  }
25
26
  }
26
27
  ;
@@ -3,3 +3,37 @@
3
3
  flex-direction: column;
4
4
  height: 100%;
5
5
  }
6
+
7
+ :host > .loading-hidden {
8
+ display: none;
9
+ pointer-events: none;
10
+ }
11
+
12
+ .skeleton-content-left {
13
+ width: 300px;
14
+ padding-right: 5px;
15
+ }
16
+
17
+ .skeleton-content {
18
+ height: calc(100vh - 310px);
19
+ }
20
+
21
+ .spinner {
22
+ height: 100vh;
23
+ gap: 10px;
24
+ }
25
+ .spinner > .spin {
26
+ animation-name: spin;
27
+ animation-duration: 5000ms;
28
+ animation-iteration-count: infinite;
29
+ animation-timing-function: linear;
30
+ }
31
+
32
+ @keyframes spin {
33
+ from {
34
+ transform:rotate(0deg);
35
+ }
36
+ to {
37
+ transform:rotate(360deg);
38
+ }
39
+ }
@@ -1,6 +1,6 @@
1
- import { ApplicationContext, DataType, DependencyType, ElementIDUtils, ErrorTracking, OnboardingUtils, StringUtils, KeyboardManager, ObjectUtils, ArrayUtils, SearchUtils } from "@sankhyalabs/core";
1
+ import { LockManager, ApplicationContext, DataType, DependencyType, ElementIDUtils, ErrorTracking, OnboardingUtils, StringUtils, KeyboardManager, ObjectUtils, ArrayUtils, SearchUtils, LockManagerOperation, UserAgentUtils } from "@sankhyalabs/core";
2
2
  import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
3
- import { h } from "@stencil/core";
3
+ import { Host, h } from "@stencil/core";
4
4
  import AppletCaller from "../../lib/applet-caller/applet-caller";
5
5
  import MGEAuthorization from '../../lib/auth/mgeauthorization.module';
6
6
  import { ConfigStorage } from '../../lib/configs/ConfigStorage';
@@ -31,9 +31,13 @@ export class SnkApplication {
31
31
  this._duCache = new Map();
32
32
  this._duPromises = new Map();
33
33
  this._requestListener = RequestListenerFactory.create({ strategy: 'request_time' });
34
+ this._maxTimeLockAppLoading = 10000;
35
+ this._isBrowserTypeElectron = false;
34
36
  this._pendingActions = new Map;
35
37
  this._loadPkParameter = null;
36
38
  this._isLoadedByPk = false;
39
+ this._applicationReady = false;
40
+ this.enableLockManagerLoadingApp = undefined;
37
41
  this.messagesBuilder = undefined;
38
42
  this.configName = undefined;
39
43
  this.gridLegacyConfigName = undefined;
@@ -519,15 +523,21 @@ export class SnkApplication {
519
523
  return Promise.resolve(this._isLoadedByPk);
520
524
  }
521
525
  /**
522
- * Remove registro do cache do PreLoader do dataunit.
523
- * Deve ser usado quando existe um dataunit usando loader do application, mas o removeLoader está sendo sobrescrito.
524
- */
526
+ * Remove registro do cache do PreLoader do dataunit.
527
+ * Deve ser usado quando existe um dataunit usando loader do application, mas o removeLoader está sendo sobrescrito.
528
+ */
525
529
  async preloadMangerRemoveRecord(dataUnit, recordsIDs) {
526
530
  const records = recordsIDs.map(id => {
527
531
  return { "__record__id__": id };
528
532
  });
529
533
  PreloadManager.removeRecords(dataUnit, records);
530
534
  }
535
+ getCountSkeleton(className, skeletonHeight, spacingSkeleton) {
536
+ let containerHeight = window.innerHeight - 350;
537
+ spacingSkeleton = !spacingSkeleton ? 20 : spacingSkeleton;
538
+ let skeletonCount = Math.floor(containerHeight / (skeletonHeight + spacingSkeleton));
539
+ return skeletonCount || 1;
540
+ }
531
541
  async getAuthList(auth) {
532
542
  return await (new MGEAuthorization()).parseFromJSON(auth);
533
543
  }
@@ -569,14 +579,14 @@ export class SnkApplication {
569
579
  * Obtém as opções em componentes de pesquisa
570
580
  * Ex.: snk-config-options
571
581
  */
572
- async executeSearch(searchArgument, fieldName, dataUnit) {
582
+ async executeSearch(searchArgument, fieldName, dataUnit, ctxOptions) {
573
583
  const descriptor = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(fieldName);
574
584
  if (!descriptor) {
575
585
  //TODO: Implementar mensagem de erro
576
586
  }
577
587
  else {
578
588
  const { mode, argument } = searchArgument;
579
- const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY } = descriptor.properties;
589
+ const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY, ISHIERARCHYENTITY } = descriptor.properties;
580
590
  const dependencies = descriptor.dependencies;
581
591
  let criteria;
582
592
  const searchOptions = {
@@ -606,7 +616,16 @@ export class SnkApplication {
606
616
  }
607
617
  }
608
618
  });
609
- return this.executePreparedSearch(mode, argument, { entity: ENTITYNAME, entityDescription: DESCRIPTIONENTITY, criteria, searchOptions });
619
+ const allowsNonAnalytic = ctxOptions === null || ctxOptions === void 0 ? void 0 : ctxOptions.allowsNonAnalytic;
620
+ const options = {
621
+ entity: ENTITYNAME,
622
+ entityDescription: DESCRIPTIONENTITY,
623
+ isHierarchyEntity: ISHIERARCHYENTITY,
624
+ criteria,
625
+ searchOptions,
626
+ allowsNonAnalytic
627
+ };
628
+ return this.executePreparedSearch(mode, argument, options);
610
629
  }
611
630
  }
612
631
  filterInvalidFields(resp, item, mdByName) {
@@ -656,13 +675,19 @@ export class SnkApplication {
656
675
  */
657
676
  async executePreparedSearch(mode, argument, options) {
658
677
  const mdByName = {};
659
- const { entity, entityDescription, criteria, searchOptions } = options;
678
+ const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic } = options;
660
679
  if (mode === "ADVANCED") {
661
680
  return new Promise((accept, reject) => {
662
681
  const pesquisaContent = document.createElement("snk-pesquisa");
663
682
  pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
683
+ pesquisaContent.entityName = entity;
664
684
  pesquisaContent.argument = argument;
665
685
  pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
686
+ pesquisaContent.isHierarchyEntity = isHierarchyEntity;
687
+ if (isHierarchyEntity) {
688
+ pesquisaContent.treeLoader = (text) => this.pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
689
+ pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
690
+ }
666
691
  pesquisaContent.selectItem = (option) => {
667
692
  accept(option);
668
693
  this.clearPopUpTitle();
@@ -970,8 +995,8 @@ export class SnkApplication {
970
995
  this._errorHandler = new SnkErrorHandler(this);
971
996
  this.messagesBuilder = new SnkMessageBuilder();
972
997
  ApplicationContext.setContextValue("__EZUI__UPLOAD__ADD__URL__", `${UrlUtils.getUrlBase()}/mge/upload/file`);
973
- ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit) => {
974
- return this.executeSearch(searchArgument, fieldName, dataUnit);
998
+ ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit, ctxOptions) => {
999
+ return this.executeSearch(searchArgument, fieldName, dataUnit, ctxOptions);
975
1000
  });
976
1001
  ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
977
1002
  this.registerPkChangeListener();
@@ -985,12 +1010,15 @@ export class SnkApplication {
985
1010
  this._waitingAppReady.forEach(resolve => resolve());
986
1011
  }
987
1012
  connectedCallback() {
1013
+ this._isBrowserTypeElectron = UserAgentUtils.isElectron();
988
1014
  ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
989
1015
  DataFetcher.addRequestListener(this._requestListener);
990
1016
  }
991
1017
  disconnectedCallback() {
992
- DataFetcher.removeRequestListener(this._requestListener);
1018
+ DataFetcher === null || DataFetcher === void 0 ? void 0 : DataFetcher.removeRequestListener(this._requestListener);
993
1019
  this.removeShortcuts();
1020
+ if (this._lockManagerTimer)
1021
+ clearTimeout(this._lockManagerTimer);
994
1022
  }
995
1023
  async componentDidLoad() {
996
1024
  this.applicationLoading.emit(true);
@@ -1002,6 +1030,64 @@ export class SnkApplication {
1002
1030
  ElementIDUtils.addIDInfo(this._element, `resource_${this.applicationResourceID}`);
1003
1031
  await this.handleShowNewVersionPopup();
1004
1032
  this.initKeyboardManager();
1033
+ if (this.enableLockManagerLoadingApp) {
1034
+ LockManager.addLockManagerCtxId(this._element);
1035
+ this.resolveApplicationReady();
1036
+ }
1037
+ else {
1038
+ this._applicationReady = true;
1039
+ }
1040
+ }
1041
+ async markToReload() {
1042
+ if (!this.enableLockManagerLoadingApp)
1043
+ return;
1044
+ this._applicationReady = false;
1045
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1046
+ this.resolveApplicationReady();
1047
+ }
1048
+ async addLoadingLock(forceReady = false) {
1049
+ if (!this.enableLockManagerLoadingApp)
1050
+ return;
1051
+ if (forceReady) {
1052
+ this._applicationReady = false;
1053
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1054
+ }
1055
+ this.resolveApplicationReady();
1056
+ return await LockManager.lock(this._element, LockManagerOperation.APP_LOADING);
1057
+ }
1058
+ async resolveApplicationReady() {
1059
+ if (this._applicationReady) {
1060
+ return;
1061
+ }
1062
+ ;
1063
+ try {
1064
+ await this.checkTimeoutLimitLockManager();
1065
+ await LockManager.whenHasLock(this._element, LockManagerOperation.APP_LOADING);
1066
+ await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 1200);
1067
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1068
+ this._applicationReady = true;
1069
+ }
1070
+ catch (error) {
1071
+ console.warn(error);
1072
+ this._applicationReady = true;
1073
+ }
1074
+ }
1075
+ stopTimeoutLockManager() {
1076
+ if (this._lockManagerTimer) {
1077
+ clearTimeout(this._lockManagerTimer);
1078
+ }
1079
+ }
1080
+ async checkTimeoutLimitLockManager() {
1081
+ this.stopTimeoutLockManager();
1082
+ if (this._applicationReady)
1083
+ return;
1084
+ this._lockManagerTimer = setTimeout(async () => {
1085
+ if (!this._applicationReady) {
1086
+ await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1087
+ this.stopTimeoutLockManager();
1088
+ this._applicationReady = true;
1089
+ }
1090
+ }, this._maxTimeLockAppLoading);
1005
1091
  }
1006
1092
  initKeyboardManager() {
1007
1093
  this._keyboardManager
@@ -1015,8 +1101,40 @@ export class SnkApplication {
1015
1101
  .unbind("ctrl + d")
1016
1102
  .unbind("F1");
1017
1103
  }
1104
+ // TODO: Etapa 2 - implementar template de loading
1105
+ renderLoadingSkeleton(template) {
1106
+ if (this.enableLockManagerLoadingApp) {
1107
+ if (!this._isBrowserTypeElectron) {
1108
+ switch (template) {
1109
+ case TEMPLATES_LOADING_SKELETON.APPLICATION:
1110
+ case TEMPLATES_LOADING_SKELETON.GRID:
1111
+ return this.getSkeletonTemplateApplication();
1112
+ default:
1113
+ return this.getSkeletonTemplateApplication();
1114
+ }
1115
+ }
1116
+ else {
1117
+ return this.getSpinnerLoadingDefault();
1118
+ }
1119
+ }
1120
+ }
1121
+ getLoadingVisibilityStyle() {
1122
+ return {
1123
+ visibility: this._applicationReady ? "hidden" : "initial",
1124
+ display: this._applicationReady ? "none" : "unset"
1125
+ };
1126
+ }
1127
+ getSkeletonTemplateApplication() {
1128
+ return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-margin--medium ez-margin-top--extra-small" }, h("ez-skeleton", { count: 1, variant: "rect", width: "100%", height: "150px", animation: "progress" })), h("div", { class: "ez-flex ez-flex--align-items-stretch skeleton-content" }, h("div", { class: "skeleton-content-left ez-margin--medium" }, h("ez-skeleton", { count: 1, variant: "rect", width: "100%", height: "calc(100% - 15px)", animation: "progress", marginBottom: "20px" })), h("div", { class: "ez-flex-item--auto skeleton-content-right ez-margin--medium" }, h("ez-skeleton", { count: this.getCountSkeleton("skeleton-content-right", 50, 20), variant: "rect", width: "100%", height: "49px", animation: "progress", marginBottom: "20px" }))), h("div", { class: "skeleton-content-footer ez-margin--medium ez-margin-top--extra-small" }, h("ez-skeleton", { count: 1, variant: "rect", width: "100%", height: "100px", animation: "progress" }))));
1129
+ }
1130
+ getSpinnerLoadingDefault() {
1131
+ return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-flex ez-size-height--full ez-size-width--full ez-flex--justify-center ez-flex--align-items-center spinner" }, h("ez-icon", { iconName: "sync", size: "x-large", class: "spin" }), h("span", { class: "ez-title ez-title--secondary ez-title--extra-large" }, "Carregando..."))));
1132
+ }
1018
1133
  render() {
1019
- return (h("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 })));
1134
+ return (h(Host, { style: {
1135
+ visibility: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden",
1136
+ overflow: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden"
1137
+ } }, h("div", null, h("ez-loading-bar", { ref: (ref) => this._requestListener.ezLoadingBar = ref }), h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "small", closeOutsideClick: true, closeEsc: true }), this.renderLoadingSkeleton())));
1020
1138
  }
1021
1139
  static get is() { return "snk-application"; }
1022
1140
  static get encapsulation() { return "scoped"; }
@@ -1032,6 +1150,23 @@ export class SnkApplication {
1032
1150
  }
1033
1151
  static get properties() {
1034
1152
  return {
1153
+ "enableLockManagerLoadingApp": {
1154
+ "type": "boolean",
1155
+ "mutable": false,
1156
+ "complexType": {
1157
+ "original": "boolean",
1158
+ "resolved": "boolean",
1159
+ "references": {}
1160
+ },
1161
+ "required": false,
1162
+ "optional": false,
1163
+ "docs": {
1164
+ "tags": [],
1165
+ "text": "Define se o componente deve usar o LockManager para controle de carregamento da aplica\u00E7\u00E3o"
1166
+ },
1167
+ "attribute": "enable-lock-manager-loading-app",
1168
+ "reflect": false
1169
+ },
1035
1170
  "messagesBuilder": {
1036
1171
  "type": "unknown",
1037
1172
  "mutable": true,
@@ -1124,6 +1259,11 @@ export class SnkApplication {
1124
1259
  }
1125
1260
  };
1126
1261
  }
1262
+ static get states() {
1263
+ return {
1264
+ "_applicationReady": {}
1265
+ };
1266
+ }
1127
1267
  static get events() {
1128
1268
  return [{
1129
1269
  "method": "applicationLoaded",
@@ -2243,7 +2383,7 @@ export class SnkApplication {
2243
2383
  },
2244
2384
  "executeSearch": {
2245
2385
  "complexType": {
2246
- "signature": "(searchArgument: ISearchArgument, fieldName: string, dataUnit: DataUnit) => Promise<Array<IOption> | IOption>",
2386
+ "signature": "(searchArgument: ISearchArgument, fieldName: string, dataUnit: DataUnit, ctxOptions?: any) => Promise<Array<IOption> | IOption>",
2247
2387
  "parameters": [{
2248
2388
  "tags": [],
2249
2389
  "text": ""
@@ -2253,6 +2393,9 @@ export class SnkApplication {
2253
2393
  }, {
2254
2394
  "tags": [],
2255
2395
  "text": ""
2396
+ }, {
2397
+ "tags": [],
2398
+ "text": ""
2256
2399
  }],
2257
2400
  "references": {
2258
2401
  "Promise": {
@@ -2543,6 +2686,41 @@ export class SnkApplication {
2543
2686
  "text": "value - String convers\u00EDvel de acordo com o tipo do par\u00E2metro"
2544
2687
  }]
2545
2688
  }
2689
+ },
2690
+ "markToReload": {
2691
+ "complexType": {
2692
+ "signature": "() => Promise<void>",
2693
+ "parameters": [],
2694
+ "references": {
2695
+ "Promise": {
2696
+ "location": "global"
2697
+ }
2698
+ },
2699
+ "return": "Promise<void>"
2700
+ },
2701
+ "docs": {
2702
+ "text": "",
2703
+ "tags": []
2704
+ }
2705
+ },
2706
+ "addLoadingLock": {
2707
+ "complexType": {
2708
+ "signature": "(forceReady?: boolean) => Promise<() => void>",
2709
+ "parameters": [{
2710
+ "tags": [],
2711
+ "text": ""
2712
+ }],
2713
+ "references": {
2714
+ "Promise": {
2715
+ "location": "global"
2716
+ }
2717
+ },
2718
+ "return": "Promise<() => void>"
2719
+ },
2720
+ "docs": {
2721
+ "text": "",
2722
+ "tags": []
2723
+ }
2546
2724
  }
2547
2725
  };
2548
2726
  }
@@ -2560,3 +2738,8 @@ class PendingPromise {
2560
2738
  this.reject = reject;
2561
2739
  }
2562
2740
  }
2741
+ var TEMPLATES_LOADING_SKELETON;
2742
+ (function (TEMPLATES_LOADING_SKELETON) {
2743
+ TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["APPLICATION"] = 1] = "APPLICATION";
2744
+ TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["GRID"] = 2] = "GRID";
2745
+ })(TEMPLATES_LOADING_SKELETON || (TEMPLATES_LOADING_SKELETON = {}));
@@ -25,14 +25,18 @@ export const buildTaskBarManager = () => {
25
25
  ];
26
26
  return {
27
27
  getButtons: (_, dataState, currentButtons) => {
28
- if ((dataState === null || dataState === void 0 ? void 0 : dataState.insertionMode) || (dataState === null || dataState === void 0 ? void 0 : dataState.isDirty))
28
+ const refreshBtnIndex = currentButtons.indexOf(TaskbarElement.REFRESH);
29
+ if ((dataState === null || dataState === void 0 ? void 0 : dataState.insertionMode) || (dataState === null || dataState === void 0 ? void 0 : dataState.isDirty)) {
29
30
  return currentButtons.reverse();
30
- else
31
- currentButtons.splice(currentButtons.indexOf(TaskbarElement.REFRESH), 1);
31
+ }
32
+ else if (refreshBtnIndex !== -1) {
33
+ currentButtons.splice(refreshBtnIndex, 1);
34
+ }
32
35
  const { selectedRecord } = dataState || {};
33
36
  const taskbarTobeAdded = !!(selectedRecord === null || selectedRecord === void 0 ? void 0 : selectedRecord.LINK) ? TaskbarAttachButtons.LINK : TaskbarAttachButtons.DOWNLOAD;
34
37
  currentButtons.splice(currentButtons.indexOf(TaskbarElement.DIVIDER) + 1, 0, TaskbarElement.REMOVE, taskbarTobeAdded, TaskbarElement.DIVIDER);
35
- const updatedButtons = Array.from(new Set(currentButtons.filter(button => button !== TaskbarElement.CLONE)));
38
+ const buttonsToRemove = [TaskbarElement.CLONE, TaskbarElement.DATA_EXPORTER];
39
+ const updatedButtons = Array.from(new Set(currentButtons.filter((button) => !buttonsToRemove.includes(button))));
36
40
  updatedButtons.splice(updatedButtons.indexOf(taskbarTobeAdded) + 1, 0, TaskbarElement.DIVIDER);
37
41
  return updatedButtons;
38
42
  },