@sankhyalabs/sankhyablocks 8.16.0-rc.1 → 8.16.0-rc.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. package/dist/cjs/{ConfigStorage-a343e418.js → ConfigStorage-ecc0ed20.js} +2 -2
  2. package/dist/cjs/{IExporterProvider-597949f9.js → ContinuousInsertUtils-807730a8.js} +39 -6
  3. package/dist/cjs/{DataFetcher-313debd8.js → DataFetcher-cadeef8e.js} +21 -15
  4. package/dist/cjs/{RecordIDUtils-3735135c.js → GetSelectedRecordsIDsInfo-bd50caf1.js} +10 -10
  5. package/dist/cjs/{SnkFormConfigManager-166cbd1f.js → SnkFormConfigManager-f1c92f79.js} +72 -16
  6. package/dist/cjs/{SnkMessageBuilder-722b104e.js → SnkMessageBuilder-bae64d0d.js} +7 -3
  7. package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-d68841bc.js} +1 -1
  8. package/dist/cjs/{dataunit-fetcher-688d3f05.js → dataunit-fetcher-f89461c1.js} +46 -18
  9. package/dist/cjs/{field-search-f56aa7d6.js → field-search-68e34bf4.js} +5 -1
  10. package/dist/cjs/{form-config-fetcher-2dd00e5b.js → form-config-fetcher-ed497282.js} +5 -2
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/{pesquisa-fetcher-680e198f.js → pesquisa-fetcher-ca89181c.js} +1 -1
  13. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  14. package/dist/cjs/snk-actions-button_4.cjs.entry.js +17 -14
  15. package/dist/cjs/snk-application.cjs.entry.js +7 -7
  16. package/dist/cjs/snk-attach.cjs.entry.js +37 -28
  17. package/dist/cjs/snk-crud.cjs.entry.js +12 -6
  18. package/dist/cjs/snk-data-exporter.cjs.entry.js +9 -9
  19. package/dist/cjs/{snk-data-unit-04df81bf.js → snk-data-unit-47202e42.js} +20 -11
  20. package/dist/cjs/snk-data-unit.cjs.entry.js +5 -5
  21. package/dist/cjs/snk-detail-view.cjs.entry.js +11 -11
  22. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  23. package/dist/cjs/snk-filter-bar.cjs.entry.js +37 -25
  24. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
  25. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  26. package/dist/cjs/snk-form-config.cjs.entry.js +15 -4
  27. package/dist/cjs/snk-form.cjs.entry.js +7 -6
  28. package/dist/cjs/snk-grid.cjs.entry.js +61 -21
  29. package/dist/cjs/{snk-guides-viewer-bdc41281.js → snk-guides-viewer-68777d37.js} +23 -11
  30. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
  31. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  32. package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
  33. package/dist/cjs/snk-simple-crud.cjs.entry.js +53 -21
  34. package/dist/cjs/snk-taskbar.cjs.entry.js +23 -1
  35. package/dist/collection/components/snk-actions-button/actions/index.js +12 -9
  36. package/dist/collection/components/snk-attach/snk-attach.js +24 -15
  37. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +2 -4
  38. package/dist/collection/components/snk-crud/snk-crud.js +59 -1
  39. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
  40. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +50 -5
  41. package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +1 -1
  42. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +1 -1
  43. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +1 -1
  44. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +2 -2
  45. package/dist/collection/components/snk-data-unit/snk-data-unit.js +18 -9
  46. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +1 -1
  47. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -1
  48. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +59 -21
  49. package/dist/collection/components/snk-form/snk-form.js +2 -2
  50. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +70 -14
  51. package/dist/collection/components/snk-form-config/snk-form-config.js +13 -2
  52. package/dist/collection/components/snk-grid/snk-grid.css +2 -0
  53. package/dist/collection/components/snk-grid/snk-grid.js +68 -8
  54. package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +1 -1
  55. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +0 -1
  56. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +62 -29
  57. package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +5 -1
  58. package/dist/collection/components/snk-taskbar/snk-taskbar.js +64 -0
  59. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +3 -3
  60. package/dist/collection/lib/dataUnit/InMemoryLoader.js +2 -4
  61. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +34 -9
  62. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +22 -16
  63. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js +7 -5
  64. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +9 -2
  65. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +4 -1
  66. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -1
  67. package/dist/collection/lib/message/resources/snk-exporter.msg.js +1 -1
  68. package/dist/collection/lib/message/resources/snk-grid.msg.js +5 -1
  69. package/dist/collection/lib/utils/ContinuousInsertUtils.js +31 -0
  70. package/dist/collection/{components/snk-data-exporter/utils/RecordIDUtils.js → lib/utils/GetSelectedRecordsIDsInfo.js} +9 -9
  71. package/dist/components/{IExporterProvider.js → ContinuousInsertUtils.js} +40 -5
  72. package/dist/components/DataFetcher.js +22 -16
  73. package/dist/{esm/RecordIDUtils-87d02110.js → components/GetSelectedRecordsIDsInfo.js} +10 -10
  74. package/dist/components/SnkFormConfigManager.js +70 -14
  75. package/dist/components/SnkMessageBuilder.js +7 -3
  76. package/dist/components/dataunit-fetcher.js +45 -15
  77. package/dist/components/form-config-fetcher.js +4 -1
  78. package/dist/components/snk-actions-button2.js +12 -9
  79. package/dist/components/snk-attach2.js +33 -24
  80. package/dist/components/snk-crud.js +9 -1
  81. package/dist/components/snk-data-exporter2.js +2 -2
  82. package/dist/components/snk-data-unit2.js +21 -49
  83. package/dist/components/snk-detail-view2.js +22 -8
  84. package/dist/components/snk-exporter-email-sender2.js +1 -1
  85. package/dist/components/snk-filter-bar2.js +35 -22
  86. package/dist/components/snk-filter-checkbox-list.js +1 -1
  87. package/dist/components/snk-form-config2.js +13 -2
  88. package/dist/components/snk-form.js +2 -2
  89. package/dist/components/snk-grid2.js +53 -11
  90. package/dist/components/snk-simple-bar2.js +1 -1
  91. package/dist/components/snk-simple-crud2.js +45 -10
  92. package/dist/components/snk-taskbar2.js +24 -2
  93. package/dist/esm/{ConfigStorage-3806514e.js → ConfigStorage-7b36d041.js} +2 -2
  94. package/dist/esm/{IExporterProvider-63a188b6.js → ContinuousInsertUtils-1a82a768.js} +40 -8
  95. package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-a9c598f2.js} +22 -16
  96. package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js +41 -0
  97. package/dist/esm/{SnkFormConfigManager-31b24066.js → SnkFormConfigManager-139f09fa.js} +72 -16
  98. package/dist/esm/{SnkMessageBuilder-89925609.js → SnkMessageBuilder-6fff4a4c.js} +7 -3
  99. package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-749d880f.js} +1 -1
  100. package/dist/esm/{dataunit-fetcher-264191b2.js → dataunit-fetcher-c24c76c6.js} +46 -16
  101. package/dist/esm/{field-search-efbe307f.js → field-search-f8b1d91e.js} +5 -1
  102. package/dist/esm/{form-config-fetcher-30fb808f.js → form-config-fetcher-adbe5d34.js} +5 -2
  103. package/dist/esm/loader.js +1 -1
  104. package/dist/esm/{pesquisa-fetcher-03c8f919.js → pesquisa-fetcher-8edaa8cd.js} +1 -1
  105. package/dist/esm/sankhyablocks.js +1 -1
  106. package/dist/esm/snk-actions-button_4.entry.js +17 -14
  107. package/dist/esm/snk-application.entry.js +7 -7
  108. package/dist/esm/snk-attach.entry.js +37 -28
  109. package/dist/esm/snk-crud.entry.js +12 -6
  110. package/dist/esm/snk-data-exporter.entry.js +9 -9
  111. package/dist/esm/{snk-data-unit-8eec78bd.js → snk-data-unit-de45e0e1.js} +20 -11
  112. package/dist/esm/snk-data-unit.entry.js +5 -5
  113. package/dist/esm/snk-detail-view.entry.js +11 -11
  114. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  115. package/dist/esm/snk-filter-bar.entry.js +37 -25
  116. package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
  117. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  118. package/dist/esm/snk-form-config.entry.js +15 -4
  119. package/dist/esm/snk-form.entry.js +7 -6
  120. package/dist/esm/snk-grid.entry.js +56 -16
  121. package/dist/esm/{snk-guides-viewer-dda0fede.js → snk-guides-viewer-b5dd30e6.js} +23 -11
  122. package/dist/esm/snk-guides-viewer.entry.js +9 -9
  123. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  124. package/dist/esm/snk-simple-bar.entry.js +1 -1
  125. package/dist/esm/snk-simple-crud.entry.js +49 -17
  126. package/dist/esm/snk-taskbar.entry.js +23 -1
  127. package/dist/sankhyablocks/p-0035ad6e.entry.js +1 -0
  128. package/dist/sankhyablocks/{p-df5451c7.js → p-06421fdb.js} +2 -2
  129. package/dist/sankhyablocks/p-0911e61a.entry.js +1 -0
  130. package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
  131. package/dist/sankhyablocks/p-17425c72.js +1 -0
  132. package/dist/sankhyablocks/p-18ed15f4.entry.js +1 -0
  133. package/dist/sankhyablocks/{p-af8efd95.js → p-1bf06cd3.js} +2 -2
  134. package/dist/sankhyablocks/{p-47db7e88.entry.js → p-212213d9.entry.js} +1 -1
  135. package/dist/sankhyablocks/p-23736d75.js +1 -0
  136. package/dist/sankhyablocks/p-3ae9d08a.js +1 -0
  137. package/dist/sankhyablocks/p-3e3cc017.js +1 -0
  138. package/dist/sankhyablocks/{p-52920496.js → p-4d9549cf.js} +1 -1
  139. package/dist/sankhyablocks/p-50779ad3.entry.js +1 -0
  140. package/dist/sankhyablocks/{p-aaa3ee68.entry.js → p-5f157b09.entry.js} +1 -1
  141. package/dist/sankhyablocks/p-60b29483.entry.js +1 -0
  142. package/dist/sankhyablocks/p-62e048c6.entry.js +1 -0
  143. package/dist/sankhyablocks/{p-c1d57831.entry.js → p-694e1c4a.entry.js} +1 -1
  144. package/dist/sankhyablocks/p-73185e58.entry.js +1 -0
  145. package/dist/sankhyablocks/p-7ac7932c.js +60 -0
  146. package/dist/sankhyablocks/p-7dd49d15.js +1 -0
  147. package/dist/sankhyablocks/p-7eef0898.entry.js +1 -0
  148. package/dist/sankhyablocks/{p-045eae4d.entry.js → p-a42e7a1e.entry.js} +2 -2
  149. package/dist/sankhyablocks/p-afbb070d.js +1 -0
  150. package/dist/sankhyablocks/p-b9679243.entry.js +1 -0
  151. package/dist/sankhyablocks/p-bccfc262.js +1 -0
  152. package/dist/sankhyablocks/p-c2e468c9.entry.js +1 -0
  153. package/dist/sankhyablocks/{p-913a9979.js → p-ca5ec380.js} +1 -1
  154. package/dist/sankhyablocks/p-da34270e.entry.js +1 -0
  155. package/dist/sankhyablocks/p-e16e87fc.entry.js +1 -0
  156. package/dist/sankhyablocks/p-eb9f0407.entry.js +1 -0
  157. package/dist/sankhyablocks/p-f3434fc4.js +1 -0
  158. package/dist/sankhyablocks/{p-2c68b3ae.entry.js → p-fb34e0cf.entry.js} +1 -1
  159. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  160. package/dist/types/components/snk-actions-button/actions/index.d.ts +1 -0
  161. package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
  162. package/dist/types/components/snk-crud/snk-crud.d.ts +9 -0
  163. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +11 -0
  164. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +1 -0
  165. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +5 -0
  166. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +7 -2
  167. package/dist/types/components/snk-grid/snk-grid.d.ts +12 -0
  168. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -4
  169. package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +1 -0
  170. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -0
  171. package/dist/types/components.d.ts +67 -2
  172. package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +12 -2
  173. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.d.ts +3 -2
  174. package/dist/types/lib/utils/ContinuousInsertUtils.d.ts +10 -0
  175. package/dist/types/lib/utils/GetSelectedRecordsIDsInfo.d.ts +3 -0
  176. package/package.json +2 -2
  177. package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
  178. package/dist/sankhyablocks/p-2a408684.js +0 -1
  179. package/dist/sankhyablocks/p-3a212712.js +0 -1
  180. package/dist/sankhyablocks/p-450c60e4.entry.js +0 -1
  181. package/dist/sankhyablocks/p-46d38387.entry.js +0 -1
  182. package/dist/sankhyablocks/p-4e5e1313.entry.js +0 -1
  183. package/dist/sankhyablocks/p-547eeac8.entry.js +0 -1
  184. package/dist/sankhyablocks/p-62ba211a.entry.js +0 -1
  185. package/dist/sankhyablocks/p-7505da04.entry.js +0 -1
  186. package/dist/sankhyablocks/p-75e674ed.entry.js +0 -1
  187. package/dist/sankhyablocks/p-7a337364.js +0 -1
  188. package/dist/sankhyablocks/p-7a85fd49.entry.js +0 -1
  189. package/dist/sankhyablocks/p-7b08d0f8.entry.js +0 -1
  190. package/dist/sankhyablocks/p-88aa931b.entry.js +0 -1
  191. package/dist/sankhyablocks/p-9863d682.js +0 -1
  192. package/dist/sankhyablocks/p-b05d8893.entry.js +0 -1
  193. package/dist/sankhyablocks/p-c2495304.js +0 -1
  194. package/dist/sankhyablocks/p-d6e26ea8.entry.js +0 -1
  195. package/dist/sankhyablocks/p-dc7c9047.js +0 -1
  196. package/dist/sankhyablocks/p-e549f7d1.js +0 -1
  197. package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
  198. package/dist/sankhyablocks/p-fa4d8cb4.js +0 -1
  199. package/dist/sankhyablocks/p-fe79f83a.js +0 -60
  200. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
@@ -3,7 +3,7 @@ import { ApplicationContext, DataType, Action, UserInterface, StringUtils, DataU
3
3
  import { D as DataFetcher } from './DataFetcher.js';
4
4
  import './pesquisa-fetcher.js';
5
5
  import { S as SaveErrorsEnum } from './ISave.js';
6
- import { P as PreloadManager, a as applyFilter, b as applySorting, c as buildPaginationInfo, D as DataUnitFetcher, I as InMemoryLoader } from './dataunit-fetcher.js';
6
+ import { P as PreloadManager, b as buildLoadDataResponse, D as DataUnitFetcher, I as InMemoryLoader } from './dataunit-fetcher.js';
7
7
  import './filter-item-type.enum.js';
8
8
  import './form-config-fetcher.js';
9
9
  import { V as VIEW_MODE } from './constants.js';
@@ -119,21 +119,23 @@ const SERVICE = {
119
119
  download: "AnexoSistemaSP.baixar",
120
120
  };
121
121
  class AnexoSistemaFetcher {
122
- constructor(entityName, registerKey, dataUnitName) {
122
+ constructor(entityName, dataUnitName) {
123
123
  var _a;
124
124
  this.entityName = entityName;
125
- this.registerKey = registerKey;
126
125
  this.dataUnitName = dataUnitName;
127
126
  this.validateFields = (fields) => {
128
127
  if (!!fields.LINK && !!fields.NOMEARQUIVO)
129
128
  throw new Error(SaveErrorsEnum.LINK_AND_FILE_AT_THE_SAME_TIME);
130
129
  if (!fields.LINK && !fields.NOMEARQUIVO)
131
130
  throw new Error(SaveErrorsEnum.ANY_LINK_OR_FILE_FILLED);
132
- if (!this.registerKey)
131
+ if (!this._registerKey)
133
132
  throw new Error('Register key can not be null');
134
133
  };
135
134
  this.resourceID = (window["resourceID"] || ((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID));
136
135
  }
136
+ set registerKey(registerKey) {
137
+ this._registerKey = registerKey;
138
+ }
137
139
  async save(change) {
138
140
  var _a, _b;
139
141
  let { updatingFields: fields } = change;
@@ -152,7 +154,7 @@ class AnexoSistemaFetcher {
152
154
  nameAttach: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name,
153
155
  link: fields.LINK,
154
156
  nameEntity: this.entityName,
155
- pkEntity: this.registerKey,
157
+ pkEntity: this._registerKey,
156
158
  typeAcess: fields.TIPOACESSO,
157
159
  typeApres: fields.TIPOAPRES,
158
160
  }
@@ -192,7 +194,7 @@ class AnexoSistemaFetcher {
192
194
  nameAttach: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name,
193
195
  link: fields.LINK,
194
196
  nameEntity: this.entityName,
195
- pkEntity: this.registerKey,
197
+ pkEntity: this._registerKey,
196
198
  typeAcess: fields.TIPOACESSO,
197
199
  typeApres: fields.TIPOAPRES,
198
200
  }
@@ -464,9 +466,7 @@ class AttachFetcherDataUnitFactory {
464
466
  });
465
467
  this._records = records;
466
468
  }
467
- let records = applyFilter(this._records, dataUnit, request.filters);
468
- records = applySorting(records, dataUnit, request.sort);
469
- return Promise.resolve({ records, paginationInfo: buildPaginationInfo(records, request.offset, request.limit) });
469
+ return buildLoadDataResponse(this._records, dataUnit, request);
470
470
  }
471
471
  saveLoader(changes, fetcher) {
472
472
  return new Promise((resolve) => {
@@ -663,11 +663,20 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
663
663
  this.loadAttachmentDataUnit();
664
664
  }
665
665
  if (oldRegisterKey !== newRegisterKey) {
666
+ if (this._currentFetcher instanceof AnexoSistemaFetcher) {
667
+ this._currentFetcher.registerKey = newRegisterKey;
668
+ }
666
669
  await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData());
667
670
  }
668
671
  }
672
+ getAnexoSistemaFetcherInstance() {
673
+ var _a;
674
+ const anexoSistemaFetcher = new AnexoSistemaFetcher(this.entityName, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
675
+ anexoSistemaFetcher.registerKey = this.registerKey;
676
+ return anexoSistemaFetcher;
677
+ }
669
678
  async initAttach() {
670
- var _a, _b, _c, _d, _e, _f;
679
+ var _a, _b, _c, _d, _e;
671
680
  if (!this.fetcherType && !this.registerKey)
672
681
  return;
673
682
  if (!this.fetcherType) {
@@ -675,18 +684,18 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
675
684
  }
676
685
  this.returnToGridMode();
677
686
  if (this.fetcherType === "AnexoSistema") {
678
- this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
679
- (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
680
- await ((_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData());
687
+ this._currentFetcher = this.getAnexoSistemaFetcherInstance();
688
+ (_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
689
+ await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
681
690
  return;
682
691
  }
683
692
  if (this.fetcherType === "Attach") {
684
- const hasMoreOneItem = ((_d = this.registerKey) === null || _d === void 0 ? void 0 : _d.split("_").length) > 1;
693
+ const hasMoreOneItem = ((_c = this.registerKey) === null || _c === void 0 ? void 0 : _c.split("_").length) > 1;
685
694
  if (hasMoreOneItem)
686
695
  return;
687
696
  }
688
- await ((_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadMetadata());
689
- await ((_f = this._currentDataUnit) === null || _f === void 0 ? void 0 : _f.loadData(undefined, undefined, true, this.registerKey));
697
+ await ((_d = this._currentDataUnit) === null || _d === void 0 ? void 0 : _d.loadMetadata());
698
+ await ((_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadData(undefined, undefined, true, this.registerKey));
690
699
  }
691
700
  /**
692
701
  * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
@@ -745,11 +754,11 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
745
754
  }
746
755
  }
747
756
  async loadAnexoSistema() {
748
- var _a, _b, _c;
757
+ var _a, _b;
749
758
  this._currentDataUnit = new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
750
- this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
759
+ this._currentFetcher = this.getAnexoSistemaFetcherInstance();
751
760
  if (!this._currentDataUnit.metadata) {
752
- await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata());
761
+ await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
753
762
  this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
754
763
  }
755
764
  this.initDataUnitLoaders();
@@ -759,7 +768,7 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
759
768
  this._currentDataUnit.addInterceptor({
760
769
  interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
761
770
  });
762
- await ((_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData());
771
+ await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
763
772
  this.disableEditFieldsNotInForm();
764
773
  }
765
774
  async loadAttach() {
@@ -785,16 +794,16 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
785
794
  }
786
795
  }
787
796
  initDataUnitLoaders() {
788
- var _a, _b, _c;
797
+ var _a, _b;
789
798
  if (this.fetcherType === "AnexoSistema") {
790
- this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
799
+ this._currentFetcher = this.getAnexoSistemaFetcherInstance();
791
800
  this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
792
- (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
801
+ (_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
793
802
  }
794
803
  if (this.fetcherType === "Attach") {
795
804
  this._currentFetcher = new AttachFetcher();
796
805
  this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
797
- (_c = this._currentDataUnitBuilder) === null || _c === void 0 ? void 0 : _c.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
806
+ (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
798
807
  this.returnToGridMode();
799
808
  await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
800
809
  });
@@ -51,6 +51,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
51
51
  this.configuratorSave = createEvent(this, "configuratorSave", 7);
52
52
  this.configuratorCancel = createEvent(this, "configuratorCancel", 7);
53
53
  this.formItemsReady = createEvent(this, "formItemsReady", 7);
54
+ this.viewModeChanged = createEvent(this, "viewModeChanged", 7);
54
55
  this._keyDownHandler = async (event) => this.keyDownListener(event);
55
56
  this._viewHistory = [];
56
57
  this._customEditors = new Map();
@@ -79,7 +80,9 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
79
80
  this.disablePersonalizedFilter = undefined;
80
81
  this.autoLoad = undefined;
81
82
  this.autoFocus = true;
83
+ this.enableGridInsert = false;
82
84
  this.domainMessagesBuilder = undefined;
85
+ this.setCustomFormTitle = undefined;
83
86
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
84
87
  }
85
88
  /**
@@ -188,6 +191,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
188
191
  else if (viewMode === VIEW_MODE.FORM) {
189
192
  this._guidesViewer.setFocus();
190
193
  }
194
+ this.viewModeChanged.emit(viewMode);
191
195
  }
192
196
  openConfig(viewMode) {
193
197
  this._snkConfigurator.close();
@@ -203,6 +207,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
203
207
  ElementIDUtils.addIDInfo(this._element, null, dataInfo);
204
208
  }
205
209
  insertionModeHandler() {
210
+ if (this.enableGridInsert)
211
+ return;
206
212
  this.gridToForm();
207
213
  }
208
214
  cancelHandler() {
@@ -417,7 +423,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
417
423
  return;
418
424
  }
419
425
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
420
- return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, 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 }, 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 }, 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" }))));
426
+ return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, 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 }, 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 }, 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" }))));
421
427
  }
422
428
  get _element() { return this; }
423
429
  static get watchers() { return {
@@ -443,7 +449,9 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
443
449
  "disablePersonalizedFilter": [4, "disable-personalized-filter"],
444
450
  "autoLoad": [4, "auto-load"],
445
451
  "autoFocus": [4, "auto-focus"],
452
+ "enableGridInsert": [4, "enable-grid-insert"],
446
453
  "domainMessagesBuilder": [1, "domain-messages-builder"],
454
+ "setCustomFormTitle": [16],
447
455
  "_dataUnit": [32],
448
456
  "_dataState": [32],
449
457
  "attachmentRegisterKey": [32],
@@ -124,7 +124,7 @@ class ItemBuilder {
124
124
  getExportToXLS(groupName) {
125
125
  return {
126
126
  id: DataExporterOption.EXPORT_TO_XLS,
127
- label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`,
127
+ label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`,
128
128
  group: groupName
129
129
  };
130
130
  }
@@ -167,7 +167,7 @@ class ItemBuilder {
167
167
  getExportPageToXLS() {
168
168
  return {
169
169
  id: DataExporterOption.EXPORT_PAGE_TO_XLS,
170
- label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`
170
+ label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`
171
171
  };
172
172
  }
173
173
  /**
@@ -1,47 +1,10 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { JSUtils, DataType, Action, ObjectUtils, DataUnitAction, StringUtils, ApplicationContext } from '@sankhyalabs/core';
2
+ import { Action, ObjectUtils, DataUnitAction, StringUtils, ApplicationContext } from '@sankhyalabs/core';
3
3
  import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
4
4
  import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder.js';
5
- import { g as getRecordValue, d as DatasetStrategy } from './dataunit-fetcher.js';
5
+ import { g as getRecordValue, a as DatasetStrategy } from './dataunit-fetcher.js';
6
6
  import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
7
-
8
- const getSelectedIDs = (dataUnit) => {
9
- const selectionInfo = dataUnit.getSelectionInfo();
10
- if (selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.isAllRecords()) {
11
- return [];
12
- }
13
- const selectedRecordsIDsInfo = [];
14
- const selectedRecords = selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.recordIds;
15
- if ((selectedRecords === null || selectedRecords === void 0 ? void 0 : selectedRecords.length) > 0) {
16
- selectedRecords.forEach(recordId => {
17
- if (!dataUnit.isNewRecord(recordId)) {
18
- /*
19
- Esse if foi necessário para tratar corretamente o ID
20
- do record quando está sendo utilizado no modo standAlone
21
- isso não faz a exportação da grid funcionar no modo standAlone
22
- mas deixa de causar erro nas oprações de CRUD.
23
- */
24
- if (!JSUtils.isBase64(recordId)) {
25
- selectedRecordsIDsInfo.push({
26
- name: "__record__id__",
27
- type: DataType.TEXT,
28
- value: recordId
29
- });
30
- return;
31
- }
32
- const revertBase64ToObject = JSON.parse(window.atob(recordId));
33
- Object.entries(revertBase64ToObject).forEach(([name, value]) => {
34
- const metadataField = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(name);
35
- if (metadataField == undefined) {
36
- return;
37
- }
38
- selectedRecordsIDsInfo.push(Object.assign({ name, type: metadataField.dataType }, value));
39
- });
40
- }
41
- });
42
- }
43
- return selectedRecordsIDsInfo;
44
- };
7
+ import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo.js';
45
8
 
46
9
  const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
47
10
  constructor() {
@@ -153,7 +116,7 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
153
116
  * @returns Retorna a lista de IDs dos registros selecionados.
154
117
  */
155
118
  async getSelectedRecordsIDsInfo() {
156
- return Promise.resolve(getSelectedIDs(this.dataUnit));
119
+ return getSelectedRecordsIDsInfo(this.dataUnit);
157
120
  }
158
121
  /**
159
122
  * Retorna os campos que possuem a propriedade "rmp" (Row Metadata Provider).
@@ -583,19 +546,28 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
583
546
  return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName, this.resourceID);
584
547
  }
585
548
  }
549
+ updateMetadataWithRMP() {
550
+ this.fillFieldsWithRmp(this.dataUnit.metadata);
551
+ this.fillFieldsWithRmPrecision(this.dataUnit.metadata);
552
+ const dataUnitUpdatedMetadata = this.handleDULinksOnMetadataLoaded(this.dataUnit.metadata);
553
+ this.dataUnit.metadata = dataUnitUpdatedMetadata;
554
+ }
586
555
  async loadDataUnit() {
587
- var _a;
556
+ var _a, _b;
588
557
  if (this.dataUnit == null && this._application && this.entityName) {
589
558
  this.dataUnit = await this.getDataUnitParentOrChild();
590
559
  }
591
560
  if (this.dataUnit) {
592
561
  this.dataUnit.pageSize = this.pageSize;
593
562
  this.dataUnit.unsubscribe(this._dataUnitObserver);
594
- this.dataUnit.addInterceptor(this);
595
563
  this.dataUnit.subscribe(this._dataUnitObserver);
596
- await this.dataUnit.loadMetadata();
597
- if ((_a = this.dataUnit.records) === null || _a === void 0 ? void 0 : _a.length) {
598
- this.getMetadataByRow(this.dataUnit);
564
+ if ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.metadata) {
565
+ this.updateMetadataWithRMP();
566
+ }
567
+ this.dataUnit.addInterceptor(this);
568
+ if ((_b = this.dataUnit.records) === null || _b === void 0 ? void 0 : _b.length) {
569
+ const { records } = this.getMetadataByRow(this.dataUnit);
570
+ this.dataUnit.records = records;
599
571
  }
600
572
  this.dataState = this.buildDataState();
601
573
  let resolver;
@@ -660,11 +632,11 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
660
632
  }
661
633
  }
662
634
  instanceMessagesBuilder() {
663
- var _a, _b;
635
+ var _a;
664
636
  if (this.messagesBuilder) {
665
637
  return;
666
638
  }
667
- this.messagesBuilder = new SnkMessageBuilder((_b = (_a = this.domainMessagesBuilder) !== null && _a !== void 0 ? _a : this.entityName) !== null && _b !== void 0 ? _b : 'InMemoryDomain');
639
+ this.messagesBuilder = new SnkMessageBuilder((_a = this.domainMessagesBuilder) !== null && _a !== void 0 ? _a : this.entityName);
668
640
  }
669
641
  //---------------------------------------------
670
642
  // Lifecycle web component
@@ -755,4 +727,4 @@ function defineCustomElement() {
755
727
  } });
756
728
  }
757
729
 
758
- export { SnkDataUnit as S, defineCustomElement as d, getSelectedIDs as g };
730
+ export { SnkDataUnit as S, defineCustomElement as d };
@@ -12,7 +12,7 @@ import './filter-item-type.enum.js';
12
12
  import './form-config-fetcher.js';
13
13
  import { T as TaskbarElement, d as defineCustomElement$3 } from './snk-taskbar2.js';
14
14
  import { V as VIEW_MODE } from './constants.js';
15
- import { o as openFieldSearch, T as TaskbarProcessor, b as buildFieldSearch } from './IExporterProvider.js';
15
+ import { o as openFieldSearch, T as TaskbarProcessor, b as buildFieldSearch } from './ContinuousInsertUtils.js';
16
16
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
17
17
  import { d as defineCustomElement$u } from './snk-actions-button2.js';
18
18
  import { d as defineCustomElement$t } from './snk-attach2.js';
@@ -70,6 +70,8 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
70
70
  this.resourceID = undefined;
71
71
  this.detailTaskbarCustomContainerId = undefined;
72
72
  this.formLegacyConfigName = undefined;
73
+ this.enableGridInsert = false;
74
+ this.getCustomTitle = undefined;
73
75
  this._hasToCreateFieldSearch = true;
74
76
  this._breadcrumbItems = [];
75
77
  this._guides = undefined;
@@ -138,7 +140,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
138
140
  this._container.focus();
139
141
  }
140
142
  exitViewer() {
141
- if (this.dataUnit.isDirty()) {
143
+ if (!this.enableGridInsert && this.dataUnit.isDirty()) {
142
144
  this.dataUnit.cancelEdition({ after: () => this.exit.emit() });
143
145
  }
144
146
  else {
@@ -247,10 +249,13 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
247
249
  const invisibleButtons = this.getInvisibleButtons();
248
250
  this._taskbarProcessor = new TaskbarProcessor({
249
251
  "snkGuideViewer.regular": btnsRegularMode,
250
- "snkGuideViewer.finish_edition": ["CANCEL", "SAVE"],
252
+ "snkGuideViewer.finish_edition": ["CANCEL", "SAVE", this.handleAddGridMode()],
251
253
  });
252
254
  this._taskbarProcessor.process(taskbarId, this.taskbarManager, this.dataState, disabledButtons, invisibleButtons);
253
255
  }
256
+ handleAddGridMode() {
257
+ return this.enableGridInsert ? TaskbarElement.GRID_MODE : "";
258
+ }
254
259
  getInvisibleButtons() {
255
260
  const invisibleButtons = [];
256
261
  if (this.dataState && this.dataState.selectionInfo.mode === SelectionMode.ALL_RECORDS)
@@ -403,11 +408,14 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
403
408
  this._configManager.addFormLegacyConfig(this.formLegacyConfigName);
404
409
  }
405
410
  }
411
+ setMasterFormConfig(config) {
412
+ this.masterFormConfig = config;
413
+ }
406
414
  componentWillLoad() {
407
415
  if (this.resourceID == undefined) {
408
416
  throw new Error("Erro interno: resourceID não informado");
409
417
  }
410
- this._configManager = new SnkFormConfigManager(this.configName, this.resourceID, config => this.masterFormConfig = config);
418
+ this._configManager = new SnkFormConfigManager(this.configName, this.resourceID, this.setMasterFormConfig.bind(this), this.dataUnit);
411
419
  this.addFormLegacyConfigName();
412
420
  this._configManager.loadConfig();
413
421
  }
@@ -435,7 +443,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
435
443
  return this._fieldSearch;
436
444
  }
437
445
  fieldsOptionLoader(argument) {
438
- return Promise.resolve(this._configManager.getFieldsList(this.dataUnit, argument)
446
+ return Promise.resolve(this._configManager.getFieldsList(argument)
439
447
  .map(field => ({ value: field.name, label: field.label })));
440
448
  }
441
449
  onSelectField(option, actionButton) {
@@ -507,6 +515,10 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
507
515
  }
508
516
  return "";
509
517
  }
518
+ getTitle() {
519
+ var _a, _b;
520
+ return (_b = (_a = this.getCustomTitle) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : this.getMessage("snkCrud.title");
521
+ }
510
522
  componentDidLoad() {
511
523
  this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
512
524
  }
@@ -520,7 +532,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
520
532
  }
521
533
  this.loadTaskbarProcessor();
522
534
  const showGuides = this._guides && (this._guides.length > 1);
523
- return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.getMessage("snkCrud.title")), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
535
+ return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
524
536
  h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
525
537
  h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
526
538
  :
@@ -558,6 +570,8 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
558
570
  "resourceID": [1, "resource-i-d"],
559
571
  "detailTaskbarCustomContainerId": [1, "detail-taskbar-custom-container-id"],
560
572
  "formLegacyConfigName": [1, "form-legacy-config-name"],
573
+ "enableGridInsert": [4, "enable-grid-insert"],
574
+ "getCustomTitle": [16],
561
575
  "_hasToCreateFieldSearch": [32],
562
576
  "_breadcrumbItems": [32],
563
577
  "_guides": [32],
@@ -978,7 +992,7 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
978
992
  this.emitSwitchEvent(VIEW_MODE.GRID);
979
993
  evt.stopPropagation();
980
994
  }
981
- if (evt.detail === TaskbarElement.FORM_MODE) {
995
+ if (evt.detail === TaskbarElement.FORM_MODE || evt.detail === TaskbarElement.UPDATE) {
982
996
  this.emitSwitchEvent(VIEW_MODE.FORM);
983
997
  evt.stopPropagation();
984
998
  }
@@ -1002,7 +1016,7 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
1002
1016
  }
1003
1017
  componentWillLoad() {
1004
1018
  this._configName = `dynaform.${this.entityName}`;
1005
- this.formConfigManager = new SnkFormConfigManager(this._configName, this.resourceID, () => this.loadMetadata());
1019
+ this.formConfigManager = new SnkFormConfigManager(this._configName, this.resourceID, () => this.loadMetadata(), this.dataUnit);
1006
1020
  this.formConfigManager.loadConfig();
1007
1021
  if (this.messagesBuilder == undefined) {
1008
1022
  this.messagesBuilder = new SnkMessageBuilder(this.entityName);
@@ -16,7 +16,7 @@ const OptionsStep = ({ getMessage, changeInfo, data }) => {
16
16
  const selectionCount = (data === null || data === void 0 ? void 0 : data.selectedRows) || 0;
17
17
  const formatOptions = [
18
18
  { label: getMessage("snkExporter.emailSenderOptStep_formatPDF"), value: "pdf" },
19
- { label: getMessage("snkExporter.emailSenderOptStep_formatXLSX"), value: "xlsx" }
19
+ { label: getMessage("snkExporter.emailSenderOptStep_formatXLS"), value: "xls" }
20
20
  ];
21
21
  const typeOptions = [
22
22
  { label: getMessage("snkExporter.emailSenderOptStep_allData"), value: "all" },
@@ -253,7 +253,7 @@ class SnkFilterModalFactory {
253
253
  }
254
254
  }
255
255
 
256
- const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:8px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{width:0px;height:0px}[data-mode=\"button\"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__scroller.sc-snk-filter-bar{height:calc(100% + var(--space-extra-small, 3px))}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-self:center}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
256
+ const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:8px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{width:0px;height:0px}[data-mode=\"button\"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__scroller.sc-snk-filter-bar{height:calc(100% + var(--space-extra-small, 3px))}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-items:start}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
257
257
 
258
258
  const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
259
259
  constructor() {
@@ -267,18 +267,19 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
267
267
  this._pendingVariables = false;
268
268
  this._customfiltersToBeUpdated = [];
269
269
  this._calculateSortIndex = (item) => {
270
- let index = item.hardFixed ? 1000000 : 0;
271
- //campos Hard Fixed não variam a ordem
272
- if (!item.hardFixed) {
273
- index += item.fixed ? 100000 : 0;
274
- index += item.value == undefined ? 0 : 10000;
275
- index += this._updateSequence.lastIndexOf(item.id) + 1;
276
- }
270
+ if (!item.visible)
271
+ return 0;
272
+ if (item.hardFixed)
273
+ return 1000000; //campos Hard Fixed não variam a ordem
274
+ let index = item.fixed ? 100000 : 0;
275
+ index += this.hasValidValue(item) ? 10000 : 0;
276
+ index += this._updateSequence.lastIndexOf(item.id) + 1;
277
277
  return index;
278
278
  };
279
279
  this._filtersComparator = (a, b) => {
280
280
  return this._calculateSortIndex(b) - this._calculateSortIndex(a);
281
281
  };
282
+ this.customFilterBarConfig = undefined;
282
283
  this.dataUnit = undefined;
283
284
  this.title = undefined;
284
285
  this.configName = undefined;
@@ -294,6 +295,13 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
294
295
  this.showPersonalizedFilter = false;
295
296
  this.personalizedFilterId = undefined;
296
297
  }
298
+ hasValidValue(item) {
299
+ if (item.value === undefined || item.value === null)
300
+ return false;
301
+ if (!Array.isArray(item.value))
302
+ return true;
303
+ return item.value.some(filterItem => filterItem.check === true);
304
+ }
297
305
  observeFilterConfig(newValue, oldValue) {
298
306
  if (ObjectUtils.equals(newValue, oldValue))
299
307
  return;
@@ -519,7 +527,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
519
527
  getFilterItems() {
520
528
  const pinnedItems = [];
521
529
  const unpinnedItems = [];
522
- this.filterConfig
530
+ this.filterConfig.sort((a, b) => this._filtersComparator(a, b))
523
531
  .filter(this.filterActiveFilter)
524
532
  .forEach((item, index) => {
525
533
  item = ObjectUtils.copy(item);
@@ -581,19 +589,23 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
581
589
  }
582
590
  }
583
591
  async loadConfigFromStorage(clearCache) {
584
- if (clearCache) {
585
- await ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
586
- }
587
- return new Promise(accept => {
588
- ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name })
589
- .then((filters) => {
590
- accept();
591
- this.filterConfig = filters.map(item => this.normalizeItem(item));
592
- })
593
- .catch(reason => {
594
- throw new ErrorException(this.getMessage("snkFilterBar.failToLoadConfig"), reason);
595
- });
596
- });
592
+ try {
593
+ if (clearCache) {
594
+ await ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
595
+ }
596
+ let config;
597
+ if (this.customFilterBarConfig) {
598
+ config = await this.customFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name });
599
+ }
600
+ else {
601
+ config = await ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name });
602
+ }
603
+ this.filterConfig = config.map(item => this.normalizeItem(item));
604
+ this.filterConfig.sort((a, b) => this._filtersComparator(a, b));
605
+ }
606
+ catch (e) {
607
+ throw new ErrorException(this.getMessage("snkFilterBar.failToLoadConfig"), e);
608
+ }
597
609
  }
598
610
  attachDataUnit() {
599
611
  if (this.dataUnit == undefined) {
@@ -712,6 +724,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
712
724
  }; }
713
725
  static get style() { return snkFilterBarCss; }
714
726
  }, [2, "snk-filter-bar", {
727
+ "customFilterBarConfig": [16],
715
728
  "dataUnit": [1040],
716
729
  "title": [1],
717
730
  "configName": [1, "config-name"],
@@ -23,7 +23,7 @@ const SnkFilterCheckboxList$1 = /*@__PURE__*/ proxyCustomElement(class extends H
23
23
  this.valueChanged.emit((_b = this.config) === null || _b === void 0 ? void 0 : _b.value);
24
24
  }
25
25
  renderOptions() {
26
- return this.optionsList.map(option => (h("ez-check", { label: option.label, compact: true, onEzChange: (event) => this.handleToggleCheck(option, event.detail), value: !!this.isChecked(option.name) })));
26
+ return this.optionsList.map(option => (h("ez-check", { label: option.label, onEzChange: (event) => this.handleToggleCheck(option, event.detail), value: !!this.isChecked(option.name) })));
27
27
  }
28
28
  isChecked(itemName) {
29
29
  var _a;
@@ -202,6 +202,11 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
202
202
  this.configManager.saveConfig(this.buildConfigToSave())
203
203
  .then(savedConfig => {
204
204
  ApplicationUtils.info(this.getMessage("snkFormConfig.info.successfullyConfigSaved"), { iconName: "check" });
205
+ const userOption = this._formConfigOptions
206
+ .find((config) => {
207
+ return config.origin === UserConfigType.USER;
208
+ });
209
+ this.setFormConfig(userOption);
205
210
  this.configChange.emit(savedConfig);
206
211
  });
207
212
  }
@@ -535,9 +540,12 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
535
540
  switch (this._optionFormConfigSelected.origin) {
536
541
  case UserConfigType.DEFAULT:
537
542
  config = await this.configManager.fetchDefaultConfig();
543
+ if (!config) {
544
+ config = this.configManager.getEmptyConfig();
545
+ }
538
546
  break;
539
- case UserConfigType.DEFAULT:
540
- config = await this.configManager.fetchDefaultConfig();
547
+ default:
548
+ config = this.getConfig();
541
549
  break;
542
550
  }
543
551
  if (config != undefined) {
@@ -740,6 +748,9 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
740
748
  if (layoutFormConfig == undefined) {
741
749
  layoutFormConfig = [];
742
750
  }
751
+ if (this._formConfig.defaultConfiguration) {
752
+ return layoutFormConfig;
753
+ }
743
754
  return this._formConfig.tabs.map((tab) => {
744
755
  return layoutFormConfig.find(config => { var _a, _b; return ((_a = tab.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = config.tab) === null || _b === void 0 ? void 0 : _b.toLowerCase()); })
745
756
  || { tab: tab.label, groups: [], visible: tab.visible };