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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. package/dist/cjs/{ConfigStorage-a343e418.js → ConfigStorage-e49214c6.js} +2 -2
  2. package/dist/cjs/{DataFetcher-313debd8.js → DataFetcher-77729a93.js} +7 -2
  3. package/dist/cjs/{RecordIDUtils-3735135c.js → GetSelectedRecordsIDsInfo-bd50caf1.js} +10 -10
  4. package/dist/cjs/{IExporterProvider-597949f9.js → IExporterProvider-8c030a7e.js} +5 -5
  5. package/dist/cjs/{SnkFormConfigManager-166cbd1f.js → SnkFormConfigManager-beebf47a.js} +2 -2
  6. package/dist/cjs/{SnkMessageBuilder-722b104e.js → SnkMessageBuilder-cceebbae.js} +2 -2
  7. package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-29bb791c.js} +1 -1
  8. package/dist/cjs/{dataunit-fetcher-688d3f05.js → dataunit-fetcher-d4873076.js} +1 -1
  9. package/dist/cjs/{form-config-fetcher-2dd00e5b.js → form-config-fetcher-feb08214.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/{pesquisa-fetcher-680e198f.js → pesquisa-fetcher-a1d0353f.js} +1 -1
  12. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  13. package/dist/cjs/snk-actions-button_4.cjs.entry.js +17 -14
  14. package/dist/cjs/snk-application.cjs.entry.js +7 -7
  15. package/dist/cjs/snk-attach.cjs.entry.js +5 -5
  16. package/dist/cjs/snk-crud.cjs.entry.js +5 -5
  17. package/dist/cjs/snk-data-exporter.cjs.entry.js +9 -9
  18. package/dist/cjs/{snk-data-unit-04df81bf.js → snk-data-unit-c7dcfa19.js} +18 -10
  19. package/dist/cjs/snk-data-unit.cjs.entry.js +5 -5
  20. package/dist/cjs/snk-detail-view.cjs.entry.js +9 -9
  21. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  22. package/dist/cjs/snk-filter-bar.cjs.entry.js +19 -11
  23. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  24. package/dist/cjs/snk-form-config.cjs.entry.js +2 -2
  25. package/dist/cjs/snk-form.cjs.entry.js +4 -4
  26. package/dist/cjs/snk-grid.cjs.entry.js +9 -9
  27. package/dist/cjs/{snk-guides-viewer-bdc41281.js → snk-guides-viewer-69ec61af.js} +5 -5
  28. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  29. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  30. package/dist/cjs/snk-simple-crud.cjs.entry.js +9 -10
  31. package/dist/cjs/snk-taskbar.cjs.entry.js +23 -1
  32. package/dist/collection/components/snk-actions-button/actions/index.js +12 -9
  33. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +1 -1
  34. package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +1 -1
  35. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +1 -1
  36. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +1 -1
  37. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +2 -2
  38. package/dist/collection/components/snk-data-unit/snk-data-unit.js +16 -8
  39. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +16 -8
  40. package/dist/collection/components/snk-grid/snk-grid.js +1 -1
  41. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +1 -20
  42. package/dist/collection/components/snk-taskbar/snk-taskbar.js +64 -0
  43. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +2 -2
  44. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +8 -3
  45. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -1
  46. package/dist/collection/lib/message/resources/snk-exporter.msg.js +1 -1
  47. package/dist/collection/{components/snk-data-exporter/utils/RecordIDUtils.js → lib/utils/GetSelectedRecordsIDsInfo.js} +9 -9
  48. package/dist/components/DataFetcher.js +8 -3
  49. package/dist/{esm/RecordIDUtils-87d02110.js → components/GetSelectedRecordsIDsInfo.js} +10 -10
  50. package/dist/components/IExporterProvider.js +2 -2
  51. package/dist/components/SnkMessageBuilder.js +2 -2
  52. package/dist/components/snk-actions-button2.js +12 -9
  53. package/dist/components/snk-data-exporter2.js +2 -2
  54. package/dist/components/snk-data-unit2.js +18 -47
  55. package/dist/components/snk-detail-view2.js +1 -1
  56. package/dist/components/snk-exporter-email-sender2.js +1 -1
  57. package/dist/components/snk-filter-bar2.js +16 -8
  58. package/dist/components/snk-grid2.js +3 -3
  59. package/dist/components/snk-simple-crud2.js +3 -3
  60. package/dist/components/snk-taskbar2.js +24 -2
  61. package/dist/esm/{ConfigStorage-3806514e.js → ConfigStorage-e476378d.js} +2 -2
  62. package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-773a3e4b.js} +8 -3
  63. package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js +41 -0
  64. package/dist/esm/{IExporterProvider-63a188b6.js → IExporterProvider-f86019db.js} +6 -6
  65. package/dist/esm/{SnkFormConfigManager-31b24066.js → SnkFormConfigManager-298cd647.js} +2 -2
  66. package/dist/esm/{SnkMessageBuilder-89925609.js → SnkMessageBuilder-ae87b754.js} +2 -2
  67. package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-a411f73c.js} +1 -1
  68. package/dist/esm/{dataunit-fetcher-264191b2.js → dataunit-fetcher-3d2ec959.js} +1 -1
  69. package/dist/esm/{form-config-fetcher-30fb808f.js → form-config-fetcher-e0382e5a.js} +1 -1
  70. package/dist/esm/loader.js +1 -1
  71. package/dist/esm/{pesquisa-fetcher-03c8f919.js → pesquisa-fetcher-a87445a0.js} +1 -1
  72. package/dist/esm/sankhyablocks.js +1 -1
  73. package/dist/esm/snk-actions-button_4.entry.js +17 -14
  74. package/dist/esm/snk-application.entry.js +7 -7
  75. package/dist/esm/snk-attach.entry.js +5 -5
  76. package/dist/esm/snk-crud.entry.js +5 -5
  77. package/dist/esm/snk-data-exporter.entry.js +9 -9
  78. package/dist/esm/{snk-data-unit-8eec78bd.js → snk-data-unit-3276e55e.js} +18 -10
  79. package/dist/esm/snk-data-unit.entry.js +5 -5
  80. package/dist/esm/snk-detail-view.entry.js +9 -9
  81. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  82. package/dist/esm/snk-filter-bar.entry.js +19 -11
  83. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  84. package/dist/esm/snk-form-config.entry.js +2 -2
  85. package/dist/esm/snk-form.entry.js +4 -4
  86. package/dist/esm/snk-grid.entry.js +9 -9
  87. package/dist/esm/{snk-guides-viewer-dda0fede.js → snk-guides-viewer-43f21b03.js} +5 -5
  88. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  89. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  90. package/dist/esm/snk-simple-crud.entry.js +9 -10
  91. package/dist/esm/snk-taskbar.entry.js +23 -1
  92. package/dist/sankhyablocks/{p-fe79f83a.js → p-091ce761.js} +1 -1
  93. package/dist/sankhyablocks/{p-913a9979.js → p-0cd3c0a9.js} +1 -1
  94. package/dist/sankhyablocks/{p-045eae4d.entry.js → p-162b9a59.entry.js} +2 -2
  95. package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
  96. package/dist/sankhyablocks/{p-df5451c7.js → p-181975f1.js} +1 -1
  97. package/dist/sankhyablocks/p-18ed15f4.entry.js +1 -0
  98. package/dist/sankhyablocks/p-1a21b61a.entry.js +1 -0
  99. package/dist/sankhyablocks/p-1e596b15.entry.js +1 -0
  100. package/dist/sankhyablocks/{p-fa4d8cb4.js → p-1f35c795.js} +1 -1
  101. package/dist/sankhyablocks/{p-af8efd95.js → p-25f1fc39.js} +1 -1
  102. package/dist/sankhyablocks/{p-62ba211a.entry.js → p-2e9c764c.entry.js} +1 -1
  103. package/dist/sankhyablocks/{p-52920496.js → p-3287a6cc.js} +1 -1
  104. package/dist/sankhyablocks/{p-7505da04.entry.js → p-42f7b05d.entry.js} +1 -1
  105. package/dist/sankhyablocks/p-4e1b47a4.js +1 -0
  106. package/dist/sankhyablocks/{p-b05d8893.entry.js → p-53412c1d.entry.js} +1 -1
  107. package/dist/sankhyablocks/p-594bc21d.js +1 -0
  108. package/dist/sankhyablocks/p-5b26cc7c.entry.js +1 -0
  109. package/dist/sankhyablocks/{p-2a408684.js → p-5f016aed.js} +1 -1
  110. package/dist/sankhyablocks/p-6d55957a.js +1 -0
  111. package/dist/sankhyablocks/p-7b8f7242.entry.js +1 -0
  112. package/dist/sankhyablocks/p-7c4aabe2.js +1 -0
  113. package/dist/sankhyablocks/p-7dd49d15.js +1 -0
  114. package/dist/sankhyablocks/p-92ed1d24.entry.js +1 -0
  115. package/dist/sankhyablocks/{p-450c60e4.entry.js → p-939e15d3.entry.js} +1 -1
  116. package/dist/sankhyablocks/{p-47db7e88.entry.js → p-9dfda04a.entry.js} +1 -1
  117. package/dist/sankhyablocks/p-aa5b3b2c.entry.js +1 -0
  118. package/dist/sankhyablocks/{p-7a85fd49.entry.js → p-aa6d510d.entry.js} +1 -1
  119. package/dist/sankhyablocks/{p-2c68b3ae.entry.js → p-bd008859.entry.js} +1 -1
  120. package/dist/sankhyablocks/{p-c1d57831.entry.js → p-fd8a58ff.entry.js} +1 -1
  121. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  122. package/dist/types/components/snk-actions-button/actions/index.d.ts +1 -0
  123. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +1 -0
  124. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +1 -0
  125. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +0 -4
  126. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -0
  127. package/dist/types/components.d.ts +10 -2
  128. package/dist/types/lib/utils/GetSelectedRecordsIDsInfo.d.ts +3 -0
  129. package/package.json +2 -2
  130. package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
  131. package/dist/sankhyablocks/p-3a212712.js +0 -1
  132. package/dist/sankhyablocks/p-46d38387.entry.js +0 -1
  133. package/dist/sankhyablocks/p-4e5e1313.entry.js +0 -1
  134. package/dist/sankhyablocks/p-547eeac8.entry.js +0 -1
  135. package/dist/sankhyablocks/p-75e674ed.entry.js +0 -1
  136. package/dist/sankhyablocks/p-7a337364.js +0 -1
  137. package/dist/sankhyablocks/p-7b08d0f8.entry.js +0 -1
  138. package/dist/sankhyablocks/p-9863d682.js +0 -1
  139. package/dist/sankhyablocks/p-d6e26ea8.entry.js +0 -1
  140. package/dist/sankhyablocks/p-dc7c9047.js +0 -1
  141. package/dist/sankhyablocks/p-e549f7d1.js +0 -1
  142. package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
  143. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
@@ -7,19 +7,19 @@ 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-04df81bf.js');
12
- require('./pesquisa-fetcher-680e198f.js');
10
+ const DataFetcher = require('./DataFetcher-77729a93.js');
11
+ const snkDataUnit = require('./snk-data-unit-c7dcfa19.js');
12
+ require('./pesquisa-fetcher-a1d0353f.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-688d3f05.js');
16
+ require('./dataunit-fetcher-d4873076.js');
17
17
  require('./filter-item-type.enum-a7ffdaa6.js');
18
- require('./form-config-fetcher-2dd00e5b.js');
18
+ require('./form-config-fetcher-feb08214.js');
19
19
  require('./PrintUtils-bcaeb82f.js');
20
- require('./SnkMessageBuilder-722b104e.js');
21
- require('./RecordIDUtils-3735135c.js');
20
+ require('./SnkMessageBuilder-cceebbae.js');
22
21
  require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
22
+ require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
23
23
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
24
24
  require('@sankhyalabs/core/dist/utils/SortingUtils');
25
25
  require('./ResourceIDUtils-5ff86aa7.js');
@@ -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,10 +3,10 @@
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-688d3f05.js');
8
- const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
6
+ const SnkMessageBuilder = require('./SnkMessageBuilder-cceebbae.js');
7
+ const dataunitFetcher = require('./dataunit-fetcher-d4873076.js');
9
8
  const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
9
+ const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
10
10
 
11
11
  const SnkDataUnit = class {
12
12
  constructor(hostRef) {
@@ -117,7 +117,7 @@ const SnkDataUnit = class {
117
117
  * @returns Retorna a lista de IDs dos registros selecionados.
118
118
  */
119
119
  async getSelectedRecordsIDsInfo() {
120
- return Promise.resolve(RecordIDUtils.getSelectedIDs(this.dataUnit));
120
+ return GetSelectedRecordsIDsInfo.getSelectedRecordsIDsInfo(this.dataUnit);
121
121
  }
122
122
  /**
123
123
  * Retorna os campos que possuem a propriedade "rmp" (Row Metadata Provider).
@@ -547,18 +547,26 @@ const SnkDataUnit = class {
547
547
  return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName, this.resourceID);
548
548
  }
549
549
  }
550
+ updateMetadataWithRMP() {
551
+ this.fillFieldsWithRmp(this.dataUnit.metadata);
552
+ this.fillFieldsWithRmPrecision(this.dataUnit.metadata);
553
+ const dataUnitUpdatedMetadata = this.handleDULinksOnMetadataLoaded(this.dataUnit.metadata);
554
+ this.dataUnit.metadata = dataUnitUpdatedMetadata;
555
+ }
550
556
  async loadDataUnit() {
551
- var _a;
557
+ var _a, _b;
552
558
  if (this.dataUnit == null && this._application && this.entityName) {
553
559
  this.dataUnit = await this.getDataUnitParentOrChild();
554
560
  }
555
561
  if (this.dataUnit) {
556
562
  this.dataUnit.pageSize = this.pageSize;
557
563
  this.dataUnit.unsubscribe(this._dataUnitObserver);
558
- this.dataUnit.addInterceptor(this);
559
564
  this.dataUnit.subscribe(this._dataUnitObserver);
560
- await this.dataUnit.loadMetadata();
561
- if ((_a = this.dataUnit.records) === null || _a === void 0 ? void 0 : _a.length) {
565
+ if ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.metadata) {
566
+ this.updateMetadataWithRMP();
567
+ }
568
+ this.dataUnit.addInterceptor(this);
569
+ if ((_b = this.dataUnit.records) === null || _b === void 0 ? void 0 : _b.length) {
562
570
  this.getMetadataByRow(this.dataUnit);
563
571
  }
564
572
  this.dataState = this.buildDataState();
@@ -624,11 +632,11 @@ const SnkDataUnit = class {
624
632
  }
625
633
  }
626
634
  instanceMessagesBuilder() {
627
- var _a, _b;
635
+ var _a;
628
636
  if (this.messagesBuilder) {
629
637
  return;
630
638
  }
631
- this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder((_b = (_a = this.domainMessagesBuilder) !== null && _a !== void 0 ? _a : this.entityName) !== null && _b !== void 0 ? _b : 'InMemoryDomain');
639
+ this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder((_a = this.domainMessagesBuilder) !== null && _a !== void 0 ? _a : this.entityName);
632
640
  }
633
641
  //---------------------------------------------
634
642
  // Lifecycle web component
@@ -2,21 +2,21 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkDataUnit = require('./snk-data-unit-04df81bf.js');
5
+ const snkDataUnit = require('./snk-data-unit-c7dcfa19.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-688d3f05.js');
11
- require('./DataFetcher-313debd8.js');
9
+ require('./SnkMessageBuilder-cceebbae.js');
10
+ require('./dataunit-fetcher-d4873076.js');
11
+ require('./DataFetcher-77729a93.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');
15
15
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
16
16
  require('@sankhyalabs/core/dist/utils/SortingUtils');
17
17
  require('./ResourceIDUtils-5ff86aa7.js');
18
- require('./RecordIDUtils-3735135c.js');
19
18
  require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
19
+ require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
20
20
 
21
21
 
22
22
 
@@ -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-166cbd1f.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-beebf47a.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-77729a93.js');
10
+ require('./pesquisa-fetcher-a1d0353f.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-688d3f05.js');
15
+ require('./dataunit-fetcher-d4873076.js');
16
16
  require('./filter-item-type.enum-a7ffdaa6.js');
17
- require('./form-config-fetcher-2dd00e5b.js');
17
+ require('./form-config-fetcher-feb08214.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-bdc41281.js');
21
- const SnkMessageBuilder = require('./SnkMessageBuilder-722b104e.js');
22
- require('./ConfigStorage-a343e418.js');
20
+ const snkGuidesViewer = require('./snk-guides-viewer-69ec61af.js');
21
+ const SnkMessageBuilder = require('./SnkMessageBuilder-cceebbae.js');
22
+ require('./ConfigStorage-e49214c6.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');
@@ -267,7 +267,7 @@ const SnkDetailView = class {
267
267
  this.emitSwitchEvent(constants.VIEW_MODE.GRID);
268
268
  evt.stopPropagation();
269
269
  }
270
- if (evt.detail === taskbarElements.TaskbarElement.FORM_MODE) {
270
+ if (evt.detail === taskbarElements.TaskbarElement.FORM_MODE || evt.detail === taskbarElements.TaskbarElement.UPDATE) {
271
271
  this.emitSwitchEvent(constants.VIEW_MODE.FORM);
272
272
  evt.stopPropagation();
273
273
  }
@@ -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-a343e418.js');
8
+ const ConfigStorage = require('./ConfigStorage-e49214c6.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-feb08214.js');
16
+ require('./DataFetcher-77729a93.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-a343e418.js');
9
+ const ConfigStorage = require('./ConfigStorage-e49214c6.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-feb08214.js');
12
+ require('./DataFetcher-77729a93.js');
13
13
  require('./PrintUtils-bcaeb82f.js');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
15
 
@@ -7,9 +7,9 @@ const Sortable = require('./Sortable-fb1c4cbb.js');
7
7
  const core = require('@sankhyalabs/core');
8
8
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
9
9
  const constants = require('./constants-35ddd366.js');
10
- const formConfigFetcher = require('./form-config-fetcher-2dd00e5b.js');
10
+ const formConfigFetcher = require('./form-config-fetcher-feb08214.js');
11
11
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
12
- require('./DataFetcher-313debd8.js');
12
+ require('./DataFetcher-77729a93.js');
13
13
  require('./PrintUtils-bcaeb82f.js');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
15
 
@@ -4,11 +4,11 @@ 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-166cbd1f.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-beebf47a.js');
8
8
  const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
9
- require('./ConfigStorage-a343e418.js');
10
- require('./form-config-fetcher-2dd00e5b.js');
11
- require('./DataFetcher-313debd8.js');
9
+ require('./ConfigStorage-e49214c6.js');
10
+ require('./form-config-fetcher-feb08214.js');
11
+ require('./DataFetcher-77729a93.js');
12
12
  require('./PrintUtils-bcaeb82f.js');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
14
  require('./filter-item-type.enum-a7ffdaa6.js');
@@ -5,21 +5,21 @@ 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
- const ConfigStorage = require('./ConfigStorage-a343e418.js');
8
+ const ConfigStorage = require('./ConfigStorage-e49214c6.js');
9
9
  const index$1 = require('./index-1dfc7a6e.js');
10
10
  const fieldSearch = require('./field-search-f56aa7d6.js');
11
11
  const index$2 = require('./index-102ba62d.js');
12
- const IExporterProvider = require('./IExporterProvider-597949f9.js');
12
+ const IExporterProvider = require('./IExporterProvider-8c030a7e.js');
13
13
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
14
- require('./DataFetcher-313debd8.js');
15
- require('./pesquisa-fetcher-680e198f.js');
14
+ require('./DataFetcher-77729a93.js');
15
+ require('./pesquisa-fetcher-a1d0353f.js');
16
16
  require('./ISave-e91b70a7.js');
17
17
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
18
18
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
19
- require('./dataunit-fetcher-688d3f05.js');
19
+ require('./dataunit-fetcher-d4873076.js');
20
20
  require('./filter-item-type.enum-a7ffdaa6.js');
21
- require('./form-config-fetcher-2dd00e5b.js');
22
- const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
21
+ require('./form-config-fetcher-feb08214.js');
22
+ const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
23
23
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
24
24
  require('./PrintUtils-bcaeb82f.js');
25
25
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
@@ -48,7 +48,7 @@ class ServerSideExporterProvider extends IExporterProvider.CommonsExporter {
48
48
  return total !== null && total !== void 0 ? total : (_c = (_b = this.dataUnit) === null || _b === void 0 ? void 0 : _b.records) === null || _c === void 0 ? void 0 : _c.length;
49
49
  }
50
50
  getSelectedIDs() {
51
- return RecordIDUtils.getSelectedIDs(this.dataUnit);
51
+ return GetSelectedRecordsIDsInfo.getSelectedRecordsIDsInfo(this.dataUnit);
52
52
  }
53
53
  getOffset() {
54
54
  return this.getExporterOffset(this.getPaginationInfo());
@@ -383,7 +383,7 @@ const SnkGrid = class {
383
383
  const disabledButtons = [];
384
384
  if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectionInfo) {
385
385
  if (this._dataState.selectionInfo.length > 1) {
386
- disabledButtons.push(taskbarElements.TaskbarElement.CLONE, "ATTACH");
386
+ disabledButtons.push(taskbarElements.TaskbarElement.CLONE, "ATTACH", taskbarElements.TaskbarElement.UPDATE);
387
387
  }
388
388
  if (this._dataState.selectionInfo.isAllRecords()) {
389
389
  disabledButtons.push("REMOVE");
@@ -2,20 +2,20 @@
2
2
 
3
3
  const index = require('./index-f9e81701.js');
4
4
  const core = require('@sankhyalabs/core');
5
- const SnkFormConfigManager = require('./SnkFormConfigManager-166cbd1f.js');
5
+ const SnkFormConfigManager = require('./SnkFormConfigManager-beebf47a.js');
6
6
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
7
7
  const fieldSearch = require('./field-search-f56aa7d6.js');
8
8
  const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
9
9
  const constants = require('./constants-35ddd366.js');
10
- require('./DataFetcher-313debd8.js');
11
- require('./pesquisa-fetcher-680e198f.js');
10
+ require('./DataFetcher-77729a93.js');
11
+ require('./pesquisa-fetcher-a1d0353f.js');
12
12
  const index$1 = require('./index-1dfc7a6e.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-688d3f05.js');
16
+ require('./dataunit-fetcher-d4873076.js');
17
17
  require('./filter-item-type.enum-a7ffdaa6.js');
18
- require('./form-config-fetcher-2dd00e5b.js');
18
+ require('./form-config-fetcher-feb08214.js');
19
19
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
20
20
 
21
21
  const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-medium:var(--space--medium, 12px);--snk-guides-viewer__header--min-height:94px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-medium);margin-left:calc(var(--snk-guides-viewer--space-large) * -1);margin-right:calc(var(--snk-guides-viewer--space-large) * -1);margin-bottom:var(--snk-guides-viewer--space-medium)}.snk-guides-viewer__header-breadcrumb.sc-snk-guides-viewer{width:25%;display:flex}.snk-guides-viewer__header-taskbar.sc-snk-guides-viewer{width:75%}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-medium));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-medium))}.snk-guides-viewer__guide-navigator[open].sc-snk-guides-viewer{width:var(--snk-guides-viewer__guide-navigator--width);max-width:var(--snk-guides-viewer__guide-navigator--width);min-width:var(--snk-guides-viewer__guide-navigator--width)}.snk-guides-viewer__detail-content.sc-snk-guides-viewer{min-height:100%;align-items:flex-start;align-content:flex-start}";
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-bdc41281.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-69ec61af.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
- require('./SnkFormConfigManager-166cbd1f.js');
9
- require('./ConfigStorage-a343e418.js');
10
- require('./form-config-fetcher-2dd00e5b.js');
11
- require('./DataFetcher-313debd8.js');
8
+ require('./SnkFormConfigManager-beebf47a.js');
9
+ require('./ConfigStorage-e49214c6.js');
10
+ require('./form-config-fetcher-feb08214.js');
11
+ require('./DataFetcher-77729a93.js');
12
12
  require('./PrintUtils-bcaeb82f.js');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
14
  require('./filter-item-type.enum-a7ffdaa6.js');
@@ -18,10 +18,10 @@ require('./taskbar-elements-9ad1f9c0.js');
18
18
  require('./index-1dfc7a6e.js');
19
19
  require('./index-102ba62d.js');
20
20
  require('./constants-35ddd366.js');
21
- require('./pesquisa-fetcher-680e198f.js');
21
+ require('./pesquisa-fetcher-a1d0353f.js');
22
22
  require('./ISave-e91b70a7.js');
23
23
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
24
- require('./dataunit-fetcher-688d3f05.js');
24
+ require('./dataunit-fetcher-d4873076.js');
25
25
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
26
26
  require('@sankhyalabs/core/dist/utils/SortingUtils');
27
27
  require('./ResourceIDUtils-5ff86aa7.js');
@@ -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 PersonalizedFilterUtils = require('./PersonalizedFilterUtils-0184ffbb.js');
8
- const ConfigStorage = require('./ConfigStorage-a343e418.js');
8
+ const ConfigStorage = require('./ConfigStorage-e49214c6.js');
9
9
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
10
10
  const index$1 = require('./index-c5771aba.js');
11
11
  const index$2 = require('./index-102ba62d.js');
12
12
  require('./filter-item-type.enum-a7ffdaa6.js');
13
- require('./form-config-fetcher-2dd00e5b.js');
14
- require('./DataFetcher-313debd8.js');
13
+ require('./form-config-fetcher-feb08214.js');
14
+ require('./DataFetcher-77729a93.js');
15
15
  require('./PrintUtils-bcaeb82f.js');
16
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
17
17
 
@@ -7,20 +7,20 @@ const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const constants = require('./constants-35ddd366.js');
9
9
  const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
10
- require('./DataFetcher-313debd8.js');
11
- require('./pesquisa-fetcher-680e198f.js');
12
- const IExporterProvider = require('./IExporterProvider-597949f9.js');
10
+ require('./DataFetcher-77729a93.js');
11
+ require('./pesquisa-fetcher-a1d0353f.js');
12
+ const IExporterProvider = require('./IExporterProvider-8c030a7e.js');
13
13
  const index = require('./index-1dfc7a6e.js');
14
14
  require('./ISave-e91b70a7.js');
15
15
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
16
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
17
- const dataunitFetcher = require('./dataunit-fetcher-688d3f05.js');
17
+ const dataunitFetcher = require('./dataunit-fetcher-d4873076.js');
18
18
  require('./filter-item-type.enum-a7ffdaa6.js');
19
- const formConfigFetcher = require('./form-config-fetcher-2dd00e5b.js');
19
+ const formConfigFetcher = require('./form-config-fetcher-feb08214.js');
20
20
  const fieldSearch = require('./field-search-f56aa7d6.js');
21
- const ConfigStorage = require('./ConfigStorage-a343e418.js');
22
- const SnkFormConfigManager = require('./SnkFormConfigManager-166cbd1f.js');
23
- const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
21
+ const ConfigStorage = require('./ConfigStorage-e49214c6.js');
22
+ const SnkFormConfigManager = require('./SnkFormConfigManager-beebf47a.js');
23
+ const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
24
24
  const index$2 = require('./index-102ba62d.js');
25
25
  require('./PrintUtils-bcaeb82f.js');
26
26
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
@@ -41,7 +41,7 @@ class ClientSideExporterProvider extends IExporterProvider.CommonsExporter {
41
41
  return total !== null && total !== void 0 ? total : (_c = (_b = this.dataUnit) === null || _b === void 0 ? void 0 : _b.records) === null || _c === void 0 ? void 0 : _c.length;
42
42
  }
43
43
  getSelectedIDs() {
44
- return RecordIDUtils.getSelectedIDs(this.dataUnit);
44
+ return GetSelectedRecordsIDsInfo.getSelectedRecordsIDsInfo(this.dataUnit);
45
45
  }
46
46
  getRecordID() {
47
47
  var _a, _b, _c;
@@ -138,7 +138,6 @@ const SnkSimpleCrud = class {
138
138
  this.ignoreReadOnlyFormFields = false;
139
139
  this.autoFocus = true;
140
140
  this.domainMessagesBuilder = undefined;
141
- this.domainMessagesBuilder = 'InMemoryDomain';
142
141
  this.autoLoad = undefined;
143
142
  }
144
143
  /**
@@ -15,6 +15,8 @@ const SnkTaskbar = class {
15
15
  constructor(hostRef) {
16
16
  index.registerInstance(this, hostRef);
17
17
  this.actionClick = index.createEvent(this, "actionClick", 7);
18
+ this.taskbarSaveLocker = index.createEvent(this, "taskbarSaveLocker", 7);
19
+ this.taskbarSaveUnlocker = index.createEvent(this, "taskbarSaveUnlocker", 7);
18
20
  this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
19
21
  this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
20
22
  this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
@@ -38,6 +40,7 @@ const SnkTaskbar = class {
38
40
  this.onSaveEvent = (action) => {
39
41
  switch (action.type) {
40
42
  case core.Action.FIELD_INVALIDATED:
43
+ case core.Action.INVALIDATE_CLEAN:
41
44
  case core.Action.DATA_SAVED:
42
45
  case core.Action.SAVING_ERROR:
43
46
  this._isWaitingForSave = false;
@@ -76,6 +79,16 @@ const SnkTaskbar = class {
76
79
  this.getCustomElements(true);
77
80
  }
78
81
  }
82
+ handleTaskbarSaveLocker() {
83
+ if (this._isWaitingForSave !== true) {
84
+ this._isWaitingForSave = true;
85
+ }
86
+ }
87
+ handleTaskbarSaveUnlocker() {
88
+ if (this._isWaitingForSave === true) {
89
+ this._isWaitingForSave = false;
90
+ }
91
+ }
79
92
  hasToSearchCustomElements(event) {
80
93
  return this.customSlotId === event.detail && !this._slotContainer;
81
94
  }
@@ -94,6 +107,14 @@ const SnkTaskbar = class {
94
107
  this._hasToUpdateOverFlow = true;
95
108
  }
96
109
  }
110
+ observeIsWaitingForSave(newValue, oldValue) {
111
+ if (newValue == true && oldValue == false) {
112
+ this.taskbarSaveLocker.emit();
113
+ }
114
+ if (newValue == false && oldValue == true) {
115
+ this.taskbarSaveUnlocker.emit();
116
+ }
117
+ }
97
118
  // Internal methods
98
119
  elementsFromString(strButtons) {
99
120
  const elements = [];
@@ -422,7 +443,8 @@ const SnkTaskbar = class {
422
443
  static get watchers() { return {
423
444
  "buttons": ["observeButtons"],
424
445
  "disabledButtons": ["observeDisabledButtons"],
425
- "_lastWidth": ["observeLastWidth"]
446
+ "_lastWidth": ["observeLastWidth"],
447
+ "_isWaitingForSave": ["observeIsWaitingForSave"]
426
448
  }; }
427
449
  };
428
450
  SnkTaskbar.style = snkTaskbarCss;
@@ -3,9 +3,9 @@ import { RefreshType } from "./enum/RefreshType";
3
3
  import { ParamType } from "./enum/ParamType";
4
4
  import { DataFetcher } from "../../../lib";
5
5
  import { ActionsType } from "./enum/ActionsType";
6
+ import { getSelectedRecordsIDsInfo } from "../../../lib/utils/GetSelectedRecordsIDsInfo";
6
7
  const MASTER_ROW_PROPERTY = "__MASTER_ROW__";
7
8
  const ENTITY_NAME_PROPERTY = '__ENTITY_NAME__';
8
- const NUFIN_COLUMN = 'NUFIN';
9
9
  const SERVICE_GET_CONFIGURATIONS = 'SystemUtilsSP.getConf';
10
10
  export default class Actions {
11
11
  constructor(actionsExecuteInterface, dataUnit, appResourceId) {
@@ -17,6 +17,10 @@ export default class Actions {
17
17
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
18
18
  this._appResourceId = appResourceId;
19
19
  }
20
+ getPrimaryKeys() {
21
+ const ids = getSelectedRecordsIDsInfo(this._dataUnit);
22
+ return ids.map(({ name }) => name);
23
+ }
20
24
  apply(action, hasParamsToSave) {
21
25
  this._application.closePopUp();
22
26
  this._actionsExecuteInterface.execute(action, this._dataUnit)
@@ -285,6 +289,7 @@ export default class Actions {
285
289
  executeAction(execSource);
286
290
  }
287
291
  addRows(execSource) {
292
+ const primaryKeys = this.getPrimaryKeys();
288
293
  const rows = {
289
294
  row: []
290
295
  };
@@ -298,15 +303,13 @@ export default class Actions {
298
303
  delete sourceRow[MASTER_ROW_PROPERTY];
299
304
  delete sourceRow[ENTITY_NAME_PROPERTY];
300
305
  }
301
- for (const fieldName in sourceRow) {
302
- if (fieldName !== NUFIN_COLUMN)
303
- continue;
304
- if (!row.field) {
305
- row.field = [];
306
- }
306
+ if (!row.field) {
307
+ row.field = [];
308
+ }
309
+ for (const primaryKey of primaryKeys) {
307
310
  row.field.push({
308
- fieldName: fieldName,
309
- $: sourceRow[fieldName]
311
+ fieldName: primaryKey,
312
+ $: sourceRow[primaryKey]
310
313
  });
311
314
  }
312
315
  rows.row.push(row);
@@ -198,7 +198,7 @@ export class SnkDetailView {
198
198
  this.emitSwitchEvent(VIEW_MODE.GRID);
199
199
  evt.stopPropagation();
200
200
  }
201
- if (evt.detail === TaskbarElement.FORM_MODE) {
201
+ if (evt.detail === TaskbarElement.FORM_MODE || evt.detail === TaskbarElement.UPDATE) {
202
202
  this.emitSwitchEvent(VIEW_MODE.FORM);
203
203
  evt.stopPropagation();
204
204
  }
@@ -4,7 +4,7 @@ export const OptionsStep = ({ getMessage, changeInfo, data }) => {
4
4
  const selectionCount = (data === null || data === void 0 ? void 0 : data.selectedRows) || 0;
5
5
  const formatOptions = [
6
6
  { label: getMessage("snkExporter.emailSenderOptStep_formatPDF"), value: "pdf" },
7
- { label: getMessage("snkExporter.emailSenderOptStep_formatXLSX"), value: "xlsx" }
7
+ { label: getMessage("snkExporter.emailSenderOptStep_formatXLS"), value: "xls" }
8
8
  ];
9
9
  const typeOptions = [
10
10
  { label: getMessage("snkExporter.emailSenderOptStep_allData"), value: "all" },
@@ -1,6 +1,6 @@
1
1
  import { CommonsExporter } from "../interfaces/IExporterProvider";
2
2
  import { UserInterface } from "@sankhyalabs/core";
3
- import { getSelectedIDs } from "../utils/RecordIDUtils";
3
+ import { getSelectedRecordsIDsInfo as getSelectedIDs } from '../../../lib/utils/GetSelectedRecordsIDsInfo';
4
4
  import { DataExporterOption } from "../../../lib/@types";
5
5
  export default class ClientSideExporterProvider extends CommonsExporter {
6
6
  getSelectedNumber() {
@@ -1,5 +1,5 @@
1
1
  import { CommonsExporter } from "../interfaces/IExporterProvider";
2
- import { getSelectedIDs } from "../utils/RecordIDUtils";
2
+ import { getSelectedRecordsIDsInfo as getSelectedIDs } from '../../../lib/utils/GetSelectedRecordsIDsInfo';
3
3
  export default class ServerSideExporterProvider extends CommonsExporter {
4
4
  getFilters() {
5
5
  var _a;