@sankhyalabs/sankhyablocks 8.16.0-dev.2 → 8.16.0-dev.21

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 (156) hide show
  1. package/dist/cjs/{ConfigStorage-942ce74b.js → ConfigStorage-ecc0ed20.js} +3 -2
  2. package/dist/cjs/{DataFetcher-313debd8.js → DataFetcher-cadeef8e.js} +21 -15
  3. package/dist/cjs/{IExporterProvider-9479f618.js → IExporterProvider-9ac15aaf.js} +4 -4
  4. package/dist/cjs/{SnkFormConfigManager-1b13bacd.js → SnkFormConfigManager-f1c92f79.js} +74 -20
  5. package/dist/cjs/{SnkMessageBuilder-722b104e.js → SnkMessageBuilder-cceebbae.js} +2 -2
  6. package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-d68841bc.js} +1 -1
  7. package/dist/cjs/{dataunit-fetcher-0c7106a0.js → dataunit-fetcher-4b12f70c.js} +8 -4
  8. package/dist/cjs/{form-config-fetcher-2dd00e5b.js → form-config-fetcher-ed497282.js} +5 -2
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{pesquisa-fetcher-680e198f.js → pesquisa-fetcher-ca89181c.js} +1 -1
  11. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  12. package/dist/cjs/snk-actions-button_4.cjs.entry.js +5 -5
  13. package/dist/cjs/snk-application.cjs.entry.js +7 -7
  14. package/dist/cjs/snk-attach.cjs.entry.js +36 -25
  15. package/dist/cjs/snk-crud.cjs.entry.js +11 -6
  16. package/dist/cjs/snk-data-exporter.cjs.entry.js +8 -8
  17. package/dist/cjs/{snk-data-unit-16791a2f.js → snk-data-unit-c095fb1a.js} +23 -11
  18. package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
  19. package/dist/cjs/snk-detail-view.cjs.entry.js +11 -12
  20. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  21. package/dist/cjs/snk-filter-bar.cjs.entry.js +19 -11
  22. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  23. package/dist/cjs/snk-form-config.cjs.entry.js +16 -5
  24. package/dist/cjs/snk-form.cjs.entry.js +7 -6
  25. package/dist/cjs/snk-grid.cjs.entry.js +9 -9
  26. package/dist/cjs/{snk-guides-viewer-d82746e8.js → snk-guides-viewer-866447ab.js} +17 -9
  27. package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -8
  28. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  29. package/dist/cjs/snk-simple-crud.cjs.entry.js +14 -12
  30. package/dist/cjs/snk-taskbar.cjs.entry.js +23 -1
  31. package/dist/collection/components/snk-attach/snk-attach.js +24 -15
  32. package/dist/collection/components/snk-crud/snk-crud.js +57 -1
  33. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +3 -4
  34. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +27 -4
  35. package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +1 -1
  36. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +2 -2
  37. package/dist/collection/components/snk-data-unit/snk-data-unit.js +38 -9
  38. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +16 -8
  39. package/dist/collection/components/snk-form/snk-form.js +2 -2
  40. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +72 -18
  41. package/dist/collection/components/snk-form-config/snk-form-config.js +14 -3
  42. package/dist/collection/components/snk-grid/snk-grid.css +2 -0
  43. package/dist/collection/components/snk-grid/snk-grid.js +2 -2
  44. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +24 -5
  45. package/dist/collection/components/snk-taskbar/snk-taskbar.js +64 -0
  46. package/dist/collection/lib/configs/ConfigStorage.js +1 -0
  47. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +7 -3
  48. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +22 -16
  49. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js +7 -5
  50. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +4 -1
  51. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -1
  52. package/dist/collection/lib/message/resources/snk-exporter.msg.js +1 -1
  53. package/dist/components/ConfigStorage.js +1 -0
  54. package/dist/components/DataFetcher.js +22 -16
  55. package/dist/components/SnkFormConfigManager.js +72 -18
  56. package/dist/components/SnkMessageBuilder.js +2 -2
  57. package/dist/components/dataunit-fetcher.js +7 -3
  58. package/dist/components/form-config-fetcher.js +4 -1
  59. package/dist/components/snk-attach2.js +31 -20
  60. package/dist/components/snk-crud.js +8 -1
  61. package/dist/components/snk-data-exporter2.js +2 -2
  62. package/dist/components/snk-data-unit2.js +22 -9
  63. package/dist/components/snk-detail-view2.js +16 -8
  64. package/dist/components/snk-exporter-email-sender2.js +1 -1
  65. package/dist/components/snk-filter-bar2.js +16 -8
  66. package/dist/components/snk-form-config2.js +14 -3
  67. package/dist/components/snk-form.js +2 -2
  68. package/dist/components/snk-grid2.js +3 -3
  69. package/dist/components/snk-simple-crud2.js +8 -5
  70. package/dist/components/snk-taskbar2.js +24 -2
  71. package/dist/esm/{ConfigStorage-86187da3.js → ConfigStorage-7b36d041.js} +3 -2
  72. package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-a9c598f2.js} +22 -16
  73. package/dist/esm/{IExporterProvider-5a858363.js → IExporterProvider-09df2e3e.js} +4 -4
  74. package/dist/esm/{SnkFormConfigManager-d4554df9.js → SnkFormConfigManager-139f09fa.js} +74 -20
  75. package/dist/esm/{SnkMessageBuilder-89925609.js → SnkMessageBuilder-ae87b754.js} +2 -2
  76. package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-749d880f.js} +1 -1
  77. package/dist/esm/{dataunit-fetcher-f7e0ffc0.js → dataunit-fetcher-3aac1a53.js} +8 -4
  78. package/dist/esm/{form-config-fetcher-30fb808f.js → form-config-fetcher-adbe5d34.js} +5 -2
  79. package/dist/esm/loader.js +1 -1
  80. package/dist/esm/{pesquisa-fetcher-03c8f919.js → pesquisa-fetcher-8edaa8cd.js} +1 -1
  81. package/dist/esm/sankhyablocks.js +1 -1
  82. package/dist/esm/snk-actions-button_4.entry.js +5 -5
  83. package/dist/esm/snk-application.entry.js +7 -7
  84. package/dist/esm/snk-attach.entry.js +36 -25
  85. package/dist/esm/snk-crud.entry.js +11 -6
  86. package/dist/esm/snk-data-exporter.entry.js +8 -8
  87. package/dist/esm/{snk-data-unit-a327d22c.js → snk-data-unit-75fc8910.js} +23 -11
  88. package/dist/esm/snk-data-unit.entry.js +4 -4
  89. package/dist/esm/snk-detail-view.entry.js +11 -12
  90. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  91. package/dist/esm/snk-filter-bar.entry.js +19 -11
  92. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  93. package/dist/esm/snk-form-config.entry.js +16 -5
  94. package/dist/esm/snk-form.entry.js +7 -6
  95. package/dist/esm/snk-grid.entry.js +9 -9
  96. package/dist/esm/{snk-guides-viewer-874da66f.js → snk-guides-viewer-cb8a0b48.js} +17 -9
  97. package/dist/esm/snk-guides-viewer.entry.js +8 -8
  98. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  99. package/dist/esm/snk-simple-crud.entry.js +14 -12
  100. package/dist/esm/snk-taskbar.entry.js +23 -1
  101. package/dist/sankhyablocks/{p-df5451c7.js → p-06421fdb.js} +2 -2
  102. package/dist/sankhyablocks/p-16969508.entry.js +1 -0
  103. package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
  104. package/dist/sankhyablocks/p-17aba142.entry.js +1 -0
  105. package/dist/sankhyablocks/p-18ed15f4.entry.js +1 -0
  106. package/dist/sankhyablocks/{p-e6210aec.js → p-1ab19772.js} +1 -1
  107. package/dist/sankhyablocks/{p-af8efd95.js → p-1bf06cd3.js} +2 -2
  108. package/dist/sankhyablocks/p-1f47a0b2.entry.js +1 -0
  109. package/dist/sankhyablocks/{p-a1d72395.entry.js → p-212213d9.entry.js} +1 -1
  110. package/dist/sankhyablocks/p-3757394b.entry.js +1 -0
  111. package/dist/sankhyablocks/p-41556e8a.entry.js +1 -0
  112. package/dist/sankhyablocks/{p-aff76a53.js → p-4d9549cf.js} +2 -2
  113. package/dist/sankhyablocks/p-60b29483.entry.js +1 -0
  114. package/dist/sankhyablocks/{p-60e46675.entry.js → p-640140b3.entry.js} +2 -2
  115. package/dist/sankhyablocks/p-73185e58.entry.js +1 -0
  116. package/dist/sankhyablocks/p-7c4aabe2.js +1 -0
  117. package/dist/sankhyablocks/p-a31e761f.js +1 -0
  118. package/dist/sankhyablocks/p-afbb070d.js +1 -0
  119. package/dist/sankhyablocks/p-b2caaaf9.entry.js +1 -0
  120. package/dist/sankhyablocks/p-bc4b94d2.entry.js +1 -0
  121. package/dist/sankhyablocks/{p-913a9979.js → p-ca5ec380.js} +1 -1
  122. package/dist/sankhyablocks/{p-b7c4feeb.entry.js → p-d137ae48.entry.js} +1 -1
  123. package/dist/sankhyablocks/p-df8f4c4f.js +1 -0
  124. package/dist/sankhyablocks/{p-7d9baaf4.entry.js → p-e2a1273a.entry.js} +1 -1
  125. package/dist/sankhyablocks/p-f3434fc4.js +1 -0
  126. package/dist/sankhyablocks/{p-6d4f4614.js → p-f8698ad3.js} +1 -1
  127. package/dist/sankhyablocks/{p-b8cde0d8.entry.js → p-fb0313db.entry.js} +1 -1
  128. package/dist/sankhyablocks/{p-eae7a817.entry.js → p-fb34e0cf.entry.js} +1 -1
  129. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  130. package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
  131. package/dist/types/components/snk-crud/snk-crud.d.ts +9 -0
  132. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +6 -0
  133. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +6 -1
  134. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +1 -0
  135. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +9 -4
  136. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -0
  137. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -0
  138. package/dist/types/components.d.ts +49 -0
  139. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.d.ts +3 -2
  140. package/package.json +2 -2
  141. package/dist/sankhyablocks/p-0046959e.entry.js +0 -1
  142. package/dist/sankhyablocks/p-0e11ee18.entry.js +0 -1
  143. package/dist/sankhyablocks/p-14a08904.entry.js +0 -1
  144. package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
  145. package/dist/sankhyablocks/p-47b60deb.entry.js +0 -1
  146. package/dist/sankhyablocks/p-6ded2076.entry.js +0 -1
  147. package/dist/sankhyablocks/p-7a337364.js +0 -1
  148. package/dist/sankhyablocks/p-829d4045.js +0 -1
  149. package/dist/sankhyablocks/p-8c6b44ea.entry.js +0 -1
  150. package/dist/sankhyablocks/p-8fc470e5.entry.js +0 -1
  151. package/dist/sankhyablocks/p-a4b1f1eb.js +0 -1
  152. package/dist/sankhyablocks/p-c7cbad38.js +0 -1
  153. package/dist/sankhyablocks/p-dc7c9047.js +0 -1
  154. package/dist/sankhyablocks/p-e0b9f59a.entry.js +0 -1
  155. package/dist/sankhyablocks/p-e9bbc3d5.entry.js +0 -1
  156. package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
@@ -4,20 +4,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const DataFetcher = require('./DataFetcher-313debd8.js');
7
+ const DataFetcher = require('./DataFetcher-cadeef8e.js');
8
8
  const ParamType = require('./ParamType-90b440a0.js');
9
- require('./pesquisa-fetcher-680e198f.js');
9
+ require('./pesquisa-fetcher-ca89181c.js');
10
10
  require('./index-1dfc7a6e.js');
11
11
  require('./ISave-e91b70a7.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
- require('./dataunit-fetcher-0c7106a0.js');
14
+ require('./dataunit-fetcher-4b12f70c.js');
15
15
  require('./filter-item-type.enum-a7ffdaa6.js');
16
- require('./form-config-fetcher-2dd00e5b.js');
16
+ require('./form-config-fetcher-ed497282.js');
17
17
  const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
18
18
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
19
19
  const CheckMode = require('@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode');
20
- const ConfigStorage = require('./ConfigStorage-942ce74b.js');
20
+ const ConfigStorage = require('./ConfigStorage-ecc0ed20.js');
21
21
  const constants = require('./constants-35ddd366.js');
22
22
  require('./PrintUtils-bcaeb82f.js');
23
23
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
- const ConfigStorage = require('./ConfigStorage-942ce74b.js');
9
- const DataFetcher = require('./DataFetcher-313debd8.js');
10
- const authFetcher = require('./auth-fetcher-54f5ff9d.js');
11
- const dataunitFetcher = require('./dataunit-fetcher-0c7106a0.js');
12
- const pesquisaFetcher = require('./pesquisa-fetcher-680e198f.js');
13
- const SnkMessageBuilder = require('./SnkMessageBuilder-722b104e.js');
14
- require('./form-config-fetcher-2dd00e5b.js');
8
+ const ConfigStorage = require('./ConfigStorage-ecc0ed20.js');
9
+ const DataFetcher = require('./DataFetcher-cadeef8e.js');
10
+ const authFetcher = require('./auth-fetcher-d68841bc.js');
11
+ const dataunitFetcher = require('./dataunit-fetcher-4b12f70c.js');
12
+ const pesquisaFetcher = require('./pesquisa-fetcher-ca89181c.js');
13
+ const SnkMessageBuilder = require('./SnkMessageBuilder-cceebbae.js');
14
+ require('./form-config-fetcher-ed497282.js');
15
15
  require('./filter-item-type.enum-a7ffdaa6.js');
16
16
  require('./PrintUtils-bcaeb82f.js');
17
17
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
@@ -4,15 +4,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const DataFetcher = require('./DataFetcher-313debd8.js');
8
- require('./pesquisa-fetcher-680e198f.js');
7
+ const DataFetcher = require('./DataFetcher-cadeef8e.js');
8
+ require('./pesquisa-fetcher-ca89181c.js');
9
9
  require('./index-1dfc7a6e.js');
10
10
  const ISave = require('./ISave-e91b70a7.js');
11
- const dataunitFetcher = require('./dataunit-fetcher-0c7106a0.js');
11
+ const dataunitFetcher = require('./dataunit-fetcher-4b12f70c.js');
12
12
  require('./filter-item-type.enum-a7ffdaa6.js');
13
- require('./form-config-fetcher-2dd00e5b.js');
13
+ require('./form-config-fetcher-ed497282.js');
14
14
  const constants = require('./constants-35ddd366.js');
15
- const authFetcher = require('./auth-fetcher-54f5ff9d.js');
15
+ const authFetcher = require('./auth-fetcher-d68841bc.js');
16
16
  const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
17
17
  require('./PrintUtils-bcaeb82f.js');
18
18
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
@@ -117,21 +117,23 @@ const SERVICE = {
117
117
  download: "AnexoSistemaSP.baixar",
118
118
  };
119
119
  class AnexoSistemaFetcher {
120
- constructor(entityName, registerKey, dataUnitName) {
120
+ constructor(entityName, dataUnitName) {
121
121
  var _a;
122
122
  this.entityName = entityName;
123
- this.registerKey = registerKey;
124
123
  this.dataUnitName = dataUnitName;
125
124
  this.validateFields = (fields) => {
126
125
  if (!!fields.LINK && !!fields.NOMEARQUIVO)
127
126
  throw new Error(ISave.SaveErrorsEnum.LINK_AND_FILE_AT_THE_SAME_TIME);
128
127
  if (!fields.LINK && !fields.NOMEARQUIVO)
129
128
  throw new Error(ISave.SaveErrorsEnum.ANY_LINK_OR_FILE_FILLED);
130
- if (!this.registerKey)
129
+ if (!this._registerKey)
131
130
  throw new Error('Register key can not be null');
132
131
  };
133
132
  this.resourceID = (window["resourceID"] || ((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID));
134
133
  }
134
+ set registerKey(registerKey) {
135
+ this._registerKey = registerKey;
136
+ }
135
137
  async save(change) {
136
138
  var _a, _b;
137
139
  let { updatingFields: fields } = change;
@@ -150,7 +152,7 @@ class AnexoSistemaFetcher {
150
152
  nameAttach: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name,
151
153
  link: fields.LINK,
152
154
  nameEntity: this.entityName,
153
- pkEntity: this.registerKey,
155
+ pkEntity: this._registerKey,
154
156
  typeAcess: fields.TIPOACESSO,
155
157
  typeApres: fields.TIPOAPRES,
156
158
  }
@@ -190,7 +192,7 @@ class AnexoSistemaFetcher {
190
192
  nameAttach: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name,
191
193
  link: fields.LINK,
192
194
  nameEntity: this.entityName,
193
- pkEntity: this.registerKey,
195
+ pkEntity: this._registerKey,
194
196
  typeAcess: fields.TIPOACESSO,
195
197
  typeApres: fields.TIPOAPRES,
196
198
  }
@@ -660,11 +662,20 @@ const SnkAttach = class {
660
662
  this.loadAttachmentDataUnit();
661
663
  }
662
664
  if (oldRegisterKey !== newRegisterKey) {
665
+ if (this._currentFetcher instanceof AnexoSistemaFetcher) {
666
+ this._currentFetcher.registerKey = newRegisterKey;
667
+ }
663
668
  await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData());
664
669
  }
665
670
  }
671
+ getAnexoSistemaFetcherInstance() {
672
+ var _a;
673
+ const anexoSistemaFetcher = new AnexoSistemaFetcher(this.entityName, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
674
+ anexoSistemaFetcher.registerKey = this.registerKey;
675
+ return anexoSistemaFetcher;
676
+ }
666
677
  async initAttach() {
667
- var _a, _b, _c, _d, _e, _f;
678
+ var _a, _b, _c, _d, _e;
668
679
  if (!this.fetcherType && !this.registerKey)
669
680
  return;
670
681
  if (!this.fetcherType) {
@@ -672,18 +683,18 @@ const SnkAttach = class {
672
683
  }
673
684
  this.returnToGridMode();
674
685
  if (this.fetcherType === "AnexoSistema") {
675
- this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
676
- (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
677
- await ((_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData());
686
+ this._currentFetcher = this.getAnexoSistemaFetcherInstance();
687
+ (_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
688
+ await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
678
689
  return;
679
690
  }
680
691
  if (this.fetcherType === "Attach") {
681
- const hasMoreOneItem = ((_d = this.registerKey) === null || _d === void 0 ? void 0 : _d.split("_").length) > 1;
692
+ const hasMoreOneItem = ((_c = this.registerKey) === null || _c === void 0 ? void 0 : _c.split("_").length) > 1;
682
693
  if (hasMoreOneItem)
683
694
  return;
684
695
  }
685
- await ((_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadMetadata());
686
- await ((_f = this._currentDataUnit) === null || _f === void 0 ? void 0 : _f.loadData(undefined, undefined, true, this.registerKey));
696
+ await ((_d = this._currentDataUnit) === null || _d === void 0 ? void 0 : _d.loadMetadata());
697
+ await ((_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadData(undefined, undefined, true, this.registerKey));
687
698
  }
688
699
  /**
689
700
  * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
@@ -742,11 +753,11 @@ const SnkAttach = class {
742
753
  }
743
754
  }
744
755
  async loadAnexoSistema() {
745
- var _a, _b, _c;
756
+ var _a, _b;
746
757
  this._currentDataUnit = new dataunitFetcher.DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
747
- this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
758
+ this._currentFetcher = this.getAnexoSistemaFetcherInstance();
748
759
  if (!this._currentDataUnit.metadata) {
749
- await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata());
760
+ await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
750
761
  this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
751
762
  }
752
763
  this.initDataUnitLoaders();
@@ -756,7 +767,7 @@ const SnkAttach = class {
756
767
  this._currentDataUnit.addInterceptor({
757
768
  interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
758
769
  });
759
- await ((_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData());
770
+ await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
760
771
  this.disableEditFieldsNotInForm();
761
772
  }
762
773
  async loadAttach() {
@@ -782,16 +793,16 @@ const SnkAttach = class {
782
793
  }
783
794
  }
784
795
  initDataUnitLoaders() {
785
- var _a, _b, _c;
796
+ var _a, _b;
786
797
  if (this.fetcherType === "AnexoSistema") {
787
- this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
798
+ this._currentFetcher = this.getAnexoSistemaFetcherInstance();
788
799
  this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
789
- (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
800
+ (_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
790
801
  }
791
802
  if (this.fetcherType === "Attach") {
792
803
  this._currentFetcher = new AttachFetcher();
793
804
  this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
794
- (_c = this._currentDataUnitBuilder) === null || _c === void 0 ? void 0 : _c.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
805
+ (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
795
806
  this.returnToGridMode();
796
807
  await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
797
808
  });
@@ -5,17 +5,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
8
- require('./DataFetcher-313debd8.js');
9
- require('./pesquisa-fetcher-680e198f.js');
8
+ require('./DataFetcher-cadeef8e.js');
9
+ require('./pesquisa-fetcher-ca89181c.js');
10
10
  const index$1 = require('./index-1dfc7a6e.js');
11
11
  require('./ISave-e91b70a7.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
- require('./dataunit-fetcher-0c7106a0.js');
14
+ require('./dataunit-fetcher-4b12f70c.js');
15
15
  require('./filter-item-type.enum-a7ffdaa6.js');
16
- require('./form-config-fetcher-2dd00e5b.js');
16
+ require('./form-config-fetcher-ed497282.js');
17
17
  const constants = require('./constants-35ddd366.js');
18
- const authFetcher = require('./auth-fetcher-54f5ff9d.js');
18
+ const authFetcher = require('./auth-fetcher-d68841bc.js');
19
19
  require('./index-102ba62d.js');
20
20
  require('./PrintUtils-bcaeb82f.js');
21
21
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
@@ -31,6 +31,7 @@ const SnkCrud = class {
31
31
  this.configuratorSave = index.createEvent(this, "configuratorSave", 7);
32
32
  this.configuratorCancel = index.createEvent(this, "configuratorCancel", 7);
33
33
  this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
34
+ this.viewModeChanged = index.createEvent(this, "viewModeChanged", 7);
34
35
  this._keyDownHandler = async (event) => this.keyDownListener(event);
35
36
  this._viewHistory = [];
36
37
  this._customEditors = new Map();
@@ -59,6 +60,8 @@ const SnkCrud = class {
59
60
  this.disablePersonalizedFilter = undefined;
60
61
  this.autoLoad = undefined;
61
62
  this.autoFocus = true;
63
+ this.domainMessagesBuilder = undefined;
64
+ this.setCustomFormTitle = undefined;
62
65
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
63
66
  }
64
67
  /**
@@ -167,6 +170,7 @@ const SnkCrud = class {
167
170
  else if (viewMode === constants.VIEW_MODE.FORM) {
168
171
  this._guidesViewer.setFocus();
169
172
  }
173
+ this.viewModeChanged.emit(viewMode);
170
174
  }
171
175
  openConfig(viewMode) {
172
176
  this._snkConfigurator.close();
@@ -230,6 +234,7 @@ const SnkCrud = class {
230
234
  this._snkDataUnit = parent;
231
235
  this._snkDataUnit.addEventListener("insertionMode", () => this.insertionModeHandler());
232
236
  this._snkDataUnit.addEventListener("cancelEdition", () => this.cancelHandler());
237
+ this._snkDataUnit.domainMessagesBuilder = this.domainMessagesBuilder;
233
238
  this._dataUnit = this._snkDataUnit.dataUnit;
234
239
  this._dataState = this._snkDataUnit.dataState;
235
240
  if (!this._dataUnit) {
@@ -395,7 +400,7 @@ const SnkCrud = class {
395
400
  return;
396
401
  }
397
402
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === constants.VIEW_MODE.GRID;
398
- return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.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 }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.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 }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkFormTaskBar" }))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), index.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 })), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
403
+ return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.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 }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.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, getCustomTitle: this.setCustomFormTitle }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkFormTaskBar" }))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), index.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 })), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
399
404
  }
400
405
  get _element() { return index.getElement(this); }
401
406
  static get watchers() { return {
@@ -7,17 +7,17 @@ const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const index = require('./index-1dfc7a6e.js');
9
9
  const constants = require('./constants-35ddd366.js');
10
- const DataFetcher = require('./DataFetcher-313debd8.js');
11
- const snkDataUnit = require('./snk-data-unit-16791a2f.js');
12
- require('./pesquisa-fetcher-680e198f.js');
10
+ const DataFetcher = require('./DataFetcher-cadeef8e.js');
11
+ const snkDataUnit = require('./snk-data-unit-c095fb1a.js');
12
+ require('./pesquisa-fetcher-ca89181c.js');
13
13
  require('./ISave-e91b70a7.js');
14
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
15
15
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
16
- require('./dataunit-fetcher-0c7106a0.js');
16
+ require('./dataunit-fetcher-4b12f70c.js');
17
17
  require('./filter-item-type.enum-a7ffdaa6.js');
18
- require('./form-config-fetcher-2dd00e5b.js');
18
+ require('./form-config-fetcher-ed497282.js');
19
19
  require('./PrintUtils-bcaeb82f.js');
20
- require('./SnkMessageBuilder-722b104e.js');
20
+ require('./SnkMessageBuilder-cceebbae.js');
21
21
  require('./RecordIDUtils-3735135c.js');
22
22
  require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
23
23
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
@@ -135,7 +135,7 @@ class ItemBuilder {
135
135
  getExportToXLS(groupName) {
136
136
  return {
137
137
  id: index.DataExporterOption.EXPORT_TO_XLS,
138
- label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`,
138
+ label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`,
139
139
  group: groupName
140
140
  };
141
141
  }
@@ -178,7 +178,7 @@ class ItemBuilder {
178
178
  getExportPageToXLS() {
179
179
  return {
180
180
  id: index.DataExporterOption.EXPORT_PAGE_TO_XLS,
181
- label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`
181
+ label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`
182
182
  };
183
183
  }
184
184
  /**
@@ -3,8 +3,8 @@
3
3
  const index = require('./index-f9e81701.js');
4
4
  const core = require('@sankhyalabs/core');
5
5
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
6
- const SnkMessageBuilder = require('./SnkMessageBuilder-722b104e.js');
7
- const dataunitFetcher = require('./dataunit-fetcher-0c7106a0.js');
6
+ const SnkMessageBuilder = require('./SnkMessageBuilder-cceebbae.js');
7
+ const dataunitFetcher = require('./dataunit-fetcher-4b12f70c.js');
8
8
  const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
9
9
  const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
10
10
 
@@ -61,6 +61,7 @@ const SnkDataUnit = class {
61
61
  this.ignoreSaveMessage = undefined;
62
62
  this.configName = undefined;
63
63
  this.resourceID = undefined;
64
+ this.domainMessagesBuilder = undefined;
64
65
  }
65
66
  observePageSize() {
66
67
  if (this.dataUnit) {
@@ -477,7 +478,8 @@ const SnkDataUnit = class {
477
478
  if (this.ignoreSaveMessage) {
478
479
  return;
479
480
  }
480
- const msg = this.getMessage("snkDataUnit.saveInfo", action.payload.records[0]);
481
+ const saveOperation = action.payload.changes[0]._operation.toLowerCase();
482
+ const msg = this.getMessage("snkDataUnit.saveInfo", action.payload.records[0], saveOperation);
481
483
  if (msg != undefined) {
482
484
  this.showSuccessMessage(msg);
483
485
  }
@@ -508,10 +510,13 @@ const SnkDataUnit = class {
508
510
  * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
509
511
  * Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-data-unit.msg.ts"
510
512
  */
511
- getMessage(key, params = undefined) {
513
+ getMessage(key, params = undefined, customOperation) {
512
514
  if (!params) {
513
515
  params = this.getMessageParams();
514
516
  }
517
+ if (customOperation) {
518
+ this.messagesBuilder.currentOperation = customOperation;
519
+ }
515
520
  return this.messagesBuilder.getMessage(key, params);
516
521
  }
517
522
  getMessageParams() {
@@ -542,7 +547,7 @@ const SnkDataUnit = class {
542
547
  return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName, this.resourceID);
543
548
  }
544
549
  }
545
- async loadDataUnit() {
550
+ async loadDataUnit(forceMetadataLoad = true) {
546
551
  var _a;
547
552
  if (this.dataUnit == null && this._application && this.entityName) {
548
553
  this.dataUnit = await this.getDataUnitParentOrChild();
@@ -552,9 +557,11 @@ const SnkDataUnit = class {
552
557
  this.dataUnit.unsubscribe(this._dataUnitObserver);
553
558
  this.dataUnit.addInterceptor(this);
554
559
  this.dataUnit.subscribe(this._dataUnitObserver);
555
- await this.dataUnit.loadMetadata();
560
+ if (forceMetadataLoad || !this.dataUnit.metadata)
561
+ await this.dataUnit.loadMetadata();
556
562
  if ((_a = this.dataUnit.records) === null || _a === void 0 ? void 0 : _a.length) {
557
- this.getMetadataByRow(this.dataUnit);
563
+ const { records } = this.getMetadataByRow(this.dataUnit);
564
+ this.dataUnit.records = records;
558
565
  }
559
566
  this.dataState = this.buildDataState();
560
567
  let resolver;
@@ -618,6 +625,13 @@ const SnkDataUnit = class {
618
625
  parent = parent.parentElement;
619
626
  }
620
627
  }
628
+ instanceMessagesBuilder() {
629
+ var _a;
630
+ if (this.messagesBuilder) {
631
+ return;
632
+ }
633
+ this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder((_a = this.domainMessagesBuilder) !== null && _a !== void 0 ? _a : this.entityName);
634
+ }
621
635
  //---------------------------------------------
622
636
  // Lifecycle web component
623
637
  //---------------------------------------------
@@ -625,9 +639,7 @@ const SnkDataUnit = class {
625
639
  this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
626
640
  this._application.getAllAccess(this.resourceID).then(access => this._permissions = access);
627
641
  this._parentSnkDataUnit = this.getParentSnkDataUnit();
628
- if (this.messagesBuilder == undefined) {
629
- this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder(this.entityName);
630
- }
642
+ this.instanceMessagesBuilder();
631
643
  }
632
644
  disconnectedCallback() {
633
645
  if (this.dataUnit) {
@@ -635,7 +647,7 @@ const SnkDataUnit = class {
635
647
  }
636
648
  }
637
649
  async componentDidLoad() {
638
- await this.loadDataUnit();
650
+ await this.loadDataUnit(false);
639
651
  this.handlerLinkFields();
640
652
  }
641
653
  render() {
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkDataUnit = require('./snk-data-unit-16791a2f.js');
5
+ const snkDataUnit = require('./snk-data-unit-c095fb1a.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
8
  require('@sankhyalabs/ezui/dist/collection/utils');
9
- require('./SnkMessageBuilder-722b104e.js');
10
- require('./dataunit-fetcher-0c7106a0.js');
11
- require('./DataFetcher-313debd8.js');
9
+ require('./SnkMessageBuilder-cceebbae.js');
10
+ require('./dataunit-fetcher-4b12f70c.js');
11
+ require('./DataFetcher-cadeef8e.js');
12
12
  require('./PrintUtils-bcaeb82f.js');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
@@ -4,22 +4,22 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const SnkFormConfigManager = require('./SnkFormConfigManager-1b13bacd.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-f1c92f79.js');
8
8
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
9
- require('./DataFetcher-313debd8.js');
10
- require('./pesquisa-fetcher-680e198f.js');
9
+ require('./DataFetcher-cadeef8e.js');
10
+ require('./pesquisa-fetcher-ca89181c.js');
11
11
  const index$1 = require('./index-1dfc7a6e.js');
12
12
  require('./ISave-e91b70a7.js');
13
13
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
- require('./dataunit-fetcher-0c7106a0.js');
15
+ require('./dataunit-fetcher-4b12f70c.js');
16
16
  require('./filter-item-type.enum-a7ffdaa6.js');
17
- require('./form-config-fetcher-2dd00e5b.js');
17
+ require('./form-config-fetcher-ed497282.js');
18
18
  const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
19
19
  const constants = require('./constants-35ddd366.js');
20
- const snkGuidesViewer = require('./snk-guides-viewer-d82746e8.js');
21
- const SnkMessageBuilder = require('./SnkMessageBuilder-722b104e.js');
22
- require('./ConfigStorage-942ce74b.js');
20
+ const snkGuidesViewer = require('./snk-guides-viewer-866447ab.js');
21
+ const SnkMessageBuilder = require('./SnkMessageBuilder-cceebbae.js');
22
+ require('./ConfigStorage-ecc0ed20.js');
23
23
  require('./PrintUtils-bcaeb82f.js');
24
24
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
25
25
  require('@sankhyalabs/core/dist/utils/SortingUtils');
@@ -227,14 +227,13 @@ const SnkDetailView = class {
227
227
  return guideId.replace(SnkDetailView.REGEX_FORM_ID, "");
228
228
  }
229
229
  loadMetadata() {
230
- var _a;
231
230
  if (!this.dataUnit) {
232
231
  return;
233
232
  }
234
233
  if (!this.formConfigManager.isLoaded) {
235
234
  return;
236
235
  }
237
- const formConfig = this.formConfigManager.getConfig((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode, this.dataUnit);
236
+ const formConfig = this.formConfigManager.getConfig(this.dataUnit);
238
237
  //this._cardsState = formConfig?.cardsState;
239
238
  this._formMetadata = form.buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
240
239
  }
@@ -268,7 +267,7 @@ const SnkDetailView = class {
268
267
  this.emitSwitchEvent(constants.VIEW_MODE.GRID);
269
268
  evt.stopPropagation();
270
269
  }
271
- if (evt.detail === taskbarElements.TaskbarElement.FORM_MODE) {
270
+ if (evt.detail === taskbarElements.TaskbarElement.FORM_MODE || evt.detail === taskbarElements.TaskbarElement.UPDATE) {
272
271
  this.emitSwitchEvent(constants.VIEW_MODE.FORM);
273
272
  evt.stopPropagation();
274
273
  }
@@ -292,7 +291,7 @@ const SnkDetailView = class {
292
291
  }
293
292
  componentWillLoad() {
294
293
  this._configName = `dynaform.${this.entityName}`;
295
- this.formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this._configName, this.resourceID, () => this.loadMetadata());
294
+ this.formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this._configName, this.resourceID, () => this.loadMetadata(), this.dataUnit);
296
295
  this.formConfigManager.loadConfig();
297
296
  if (this.messagesBuilder == undefined) {
298
297
  this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder(this.entityName);
@@ -20,7 +20,7 @@ const OptionsStep = ({ getMessage, changeInfo, data }) => {
20
20
  const selectionCount = (data === null || data === void 0 ? void 0 : data.selectedRows) || 0;
21
21
  const formatOptions = [
22
22
  { label: getMessage("snkExporter.emailSenderOptStep_formatPDF"), value: "pdf" },
23
- { label: getMessage("snkExporter.emailSenderOptStep_formatXLSX"), value: "xlsx" }
23
+ { label: getMessage("snkExporter.emailSenderOptStep_formatXLS"), value: "xls" }
24
24
  ];
25
25
  const typeOptions = [
26
26
  { label: getMessage("snkExporter.emailSenderOptStep_allData"), value: "all" },
@@ -5,15 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index$1 = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
8
- const ConfigStorage = require('./ConfigStorage-942ce74b.js');
8
+ const ConfigStorage = require('./ConfigStorage-ecc0ed20.js');
9
9
  const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
10
10
  const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
11
11
  const index = require('./index-c5771aba.js');
12
12
  const filterNumberVariation = require('./filterNumberVariation-d65332da.js');
13
13
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
14
14
  const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-0184ffbb.js');
15
- require('./form-config-fetcher-2dd00e5b.js');
16
- require('./DataFetcher-313debd8.js');
15
+ require('./form-config-fetcher-ed497282.js');
16
+ require('./DataFetcher-cadeef8e.js');
17
17
  require('./PrintUtils-bcaeb82f.js');
18
18
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
19
19
 
@@ -265,13 +265,13 @@ const SnkFilterBar = class {
265
265
  this._pendingVariables = false;
266
266
  this._customfiltersToBeUpdated = [];
267
267
  this._calculateSortIndex = (item) => {
268
- let index = item.hardFixed ? 1000000 : 0;
269
- //campos Hard Fixed não variam a ordem
270
- if (!item.hardFixed) {
271
- index += item.fixed ? 100000 : 0;
272
- index += item.value == undefined ? 0 : 10000;
273
- index += this._updateSequence.lastIndexOf(item.id) + 1;
274
- }
268
+ if (!item.visible)
269
+ return 0;
270
+ if (item.hardFixed)
271
+ return 1000000; //campos Hard Fixed não variam a ordem
272
+ let index = item.fixed ? 100000 : 0;
273
+ index += this.hasValidValue(item) ? 10000 : 0;
274
+ index += this._updateSequence.lastIndexOf(item.id) + 1;
275
275
  return index;
276
276
  };
277
277
  this._filtersComparator = (a, b) => {
@@ -292,6 +292,13 @@ const SnkFilterBar = class {
292
292
  this.showPersonalizedFilter = false;
293
293
  this.personalizedFilterId = undefined;
294
294
  }
295
+ hasValidValue(item) {
296
+ if (item.value === undefined || item.value === null)
297
+ return false;
298
+ if (!Array.isArray(item.value))
299
+ return true;
300
+ return item.value.some(filterItem => filterItem.check === true);
301
+ }
295
302
  observeFilterConfig(newValue, oldValue) {
296
303
  if (core.ObjectUtils.equals(newValue, oldValue))
297
304
  return;
@@ -517,7 +524,7 @@ const SnkFilterBar = class {
517
524
  getFilterItems() {
518
525
  const pinnedItems = [];
519
526
  const unpinnedItems = [];
520
- this.filterConfig
527
+ this.filterConfig.sort((a, b) => this._filtersComparator(a, b))
521
528
  .filter(this.filterActiveFilter)
522
529
  .forEach((item, index) => {
523
530
  item = core.ObjectUtils.copy(item);
@@ -587,6 +594,7 @@ const SnkFilterBar = class {
587
594
  .then((filters) => {
588
595
  accept();
589
596
  this.filterConfig = filters.map(item => this.normalizeItem(item));
597
+ this.filterConfig.sort((a, b) => this._filtersComparator(a, b));
590
598
  })
591
599
  .catch(reason => {
592
600
  throw new core.ErrorException(this.getMessage("snkFilterBar.failToLoadConfig"), reason);
@@ -6,10 +6,10 @@ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
8
8
  const presentationMode = require('./presentationMode-52ec3bdd.js');
9
- const ConfigStorage = require('./ConfigStorage-942ce74b.js');
9
+ const ConfigStorage = require('./ConfigStorage-ecc0ed20.js');
10
10
  const filterType_enum = require('./filter-type.enum-b14ce507.js');
11
- require('./form-config-fetcher-2dd00e5b.js');
12
- require('./DataFetcher-313debd8.js');
11
+ require('./form-config-fetcher-ed497282.js');
12
+ require('./DataFetcher-cadeef8e.js');
13
13
  require('./PrintUtils-bcaeb82f.js');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
15