@sankhyalabs/sankhyablocks 8.16.0-dev.99 → 8.16.0-ms.10

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 (172) hide show
  1. package/dist/cjs/{ClientSideExporterProvider-cc82b68a.js → ClientSideExporterProvider-fe52f7cf.js} +11 -4
  2. package/dist/cjs/{ConfigStorage-2235f35e.js → ConfigStorage-6b633b10.js} +1 -1
  3. package/dist/cjs/ISave-e91b70a7.js +9 -0
  4. package/dist/cjs/{SnkFormConfigManager-6637cd6b.js → SnkFormConfigManager-d680be08.js} +2 -2
  5. package/dist/cjs/{auth-fetcher-abad589f.js → auth-fetcher-24ba4135.js} +1 -1
  6. package/dist/cjs/{form-config-fetcher-db332748.js → form-config-fetcher-e0a512c3.js} +0 -14
  7. package/dist/cjs/{index-102ba62d.js → index-ab1cfb44.js} +3 -4
  8. package/dist/cjs/index-f9e81701.js +2 -2
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{ISave-62fbb1dd.js → pesquisa-fetcher-30cab386.js} +0 -8
  11. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -4
  12. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  13. package/dist/cjs/{snk-actions-button_7.cjs.entry.js → snk-actions-button_5.cjs.entry.js} +4 -63
  14. package/dist/cjs/snk-application.cjs.entry.js +5 -48
  15. package/dist/cjs/snk-attach.cjs.entry.js +49 -19
  16. package/dist/cjs/snk-config-options_3.cjs.entry.js +3 -3
  17. package/dist/cjs/snk-configurator.cjs.entry.js +1 -8
  18. package/dist/cjs/snk-crud.cjs.entry.js +8 -7
  19. package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -2
  20. package/dist/cjs/snk-detail-view.cjs.entry.js +10 -10
  21. package/dist/cjs/snk-expression-group_2.cjs.entry.js +1 -1
  22. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
  23. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +2 -2
  24. package/dist/cjs/snk-grid.cjs.entry.js +10 -8
  25. package/dist/cjs/{snk-guides-viewer-0e4f3b1a.js → snk-guides-viewer-b6002ea7.js} +6 -5
  26. package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -7
  27. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  28. package/dist/cjs/snk-pesquisa.cjs.entry.js +16 -9
  29. package/dist/cjs/snk-simple-crud.cjs.entry.js +11 -10
  30. package/dist/cjs/snk-taskbar.cjs.entry.js +6 -3
  31. package/dist/cjs/{taskbar-elements-7e19882d.js → taskbar-elements-ebddaef4.js} +1 -1
  32. package/dist/collection/collection-manifest.json +0 -2
  33. package/dist/collection/components/snk-application/snk-application.js +0 -41
  34. package/dist/collection/components/snk-attach/snk-attach.js +27 -1
  35. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +17 -13
  36. package/dist/collection/components/snk-configurator/snk-configurator.js +1 -26
  37. package/dist/collection/components/snk-crud/snk-crud.js +10 -10
  38. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css +1 -10
  39. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +1 -25
  40. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
  41. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -0
  42. package/dist/collection/components/snk-grid/snk-grid.css +1 -0
  43. package/dist/collection/components/snk-grid/snk-grid.js +20 -1
  44. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +1 -1
  45. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +9 -2
  46. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +21 -21
  47. package/dist/collection/components/snk-taskbar/snk-taskbar.js +4 -1
  48. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +8 -2
  49. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +0 -14
  50. package/dist/components/ContinuousInsertUtils.js +8 -2
  51. package/dist/components/form-config-fetcher.js +0 -14
  52. package/dist/components/index.d.ts +0 -2
  53. package/dist/components/index.js +0 -2
  54. package/dist/components/index2.js +3 -4
  55. package/dist/components/pesquisa-grid2.js +1 -1
  56. package/dist/components/snk-application2.js +0 -45
  57. package/dist/components/snk-attach2.js +65 -48
  58. package/dist/components/snk-configurator2.js +2 -22
  59. package/dist/components/snk-crud.js +64 -76
  60. package/dist/components/snk-detail-view2.js +86 -110
  61. package/dist/components/snk-filter-bar2.js +1 -1
  62. package/dist/components/snk-grid2.js +4 -2
  63. package/dist/components/snk-pesquisa2.js +9 -2
  64. package/dist/components/snk-simple-crud2.js +22 -34
  65. package/dist/components/snk-taskbar2.js +4 -1
  66. package/dist/esm/{ClientSideExporterProvider-8191676b.js → ClientSideExporterProvider-bd24a4b3.js} +11 -4
  67. package/dist/esm/{ConfigStorage-9bd805d6.js → ConfigStorage-e5c1f4c0.js} +1 -1
  68. package/dist/esm/ISave-d8c8bc59.js +9 -0
  69. package/dist/esm/{SnkFormConfigManager-fbc6a9a8.js → SnkFormConfigManager-1efd102b.js} +2 -2
  70. package/dist/esm/{auth-fetcher-07d33333.js → auth-fetcher-9987c66e.js} +1 -1
  71. package/dist/esm/{form-config-fetcher-ac17cff4.js → form-config-fetcher-34becd23.js} +0 -14
  72. package/dist/esm/index-a7d3d3f1.js +2 -2
  73. package/dist/esm/{index-bdf75557.js → index-c57e49af.js} +3 -4
  74. package/dist/esm/loader.js +1 -1
  75. package/dist/esm/{ISave-7d546dce.js → pesquisa-fetcher-e26c3295.js} +1 -9
  76. package/dist/esm/pesquisa-grid_2.entry.js +4 -3
  77. package/dist/esm/sankhyablocks.js +1 -1
  78. package/dist/esm/{snk-actions-button_7.entry.js → snk-actions-button_5.entry.js} +6 -63
  79. package/dist/esm/snk-application.entry.js +4 -47
  80. package/dist/esm/snk-attach.entry.js +49 -19
  81. package/dist/esm/snk-config-options_3.entry.js +3 -3
  82. package/dist/esm/snk-configurator.entry.js +1 -8
  83. package/dist/esm/snk-crud.entry.js +8 -7
  84. package/dist/esm/snk-data-exporter.entry.js +3 -2
  85. package/dist/esm/snk-detail-view.entry.js +10 -10
  86. package/dist/esm/snk-expression-group_2.entry.js +1 -1
  87. package/dist/esm/snk-filter-bar_4.entry.js +3 -3
  88. package/dist/esm/snk-filter-modal-item.entry.js +2 -2
  89. package/dist/esm/snk-grid.entry.js +10 -8
  90. package/dist/esm/{snk-guides-viewer-80a8709c.js → snk-guides-viewer-39fae8d5.js} +6 -5
  91. package/dist/esm/snk-guides-viewer.entry.js +8 -7
  92. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  93. package/dist/esm/snk-pesquisa.entry.js +10 -3
  94. package/dist/esm/snk-simple-crud.entry.js +11 -10
  95. package/dist/esm/snk-taskbar.entry.js +6 -3
  96. package/dist/esm/{taskbar-elements-d2353c64.js → taskbar-elements-ed51e143.js} +1 -1
  97. package/dist/sankhyablocks/p-11afea24.entry.js +1 -0
  98. package/dist/sankhyablocks/p-18389343.entry.js +1 -0
  99. package/dist/sankhyablocks/p-21749402.js +1 -0
  100. package/dist/sankhyablocks/p-22ddc147.js +26 -0
  101. package/dist/sankhyablocks/p-240ac47f.entry.js +1 -0
  102. package/dist/sankhyablocks/{p-cb9d725a.js → p-3ce68be5.js} +1 -1
  103. package/dist/sankhyablocks/{p-13f17dab.js → p-3fcb90d6.js} +1 -1
  104. package/dist/sankhyablocks/p-43769aa9.js +1 -0
  105. package/dist/sankhyablocks/p-4b01cbad.entry.js +11 -0
  106. package/dist/sankhyablocks/p-4c9adf1c.entry.js +1 -0
  107. package/dist/sankhyablocks/{p-3fc82614.js → p-517efc93.js} +1 -1
  108. package/dist/sankhyablocks/p-5e9fbd76.js +1 -0
  109. package/dist/sankhyablocks/p-6b898a51.entry.js +1 -0
  110. package/dist/sankhyablocks/p-77168ab4.entry.js +1 -0
  111. package/dist/sankhyablocks/p-91708c3d.entry.js +1 -0
  112. package/dist/sankhyablocks/p-9523fc40.entry.js +1 -0
  113. package/dist/sankhyablocks/p-9887a437.entry.js +1 -0
  114. package/dist/sankhyablocks/p-9ebc3f3b.entry.js +1 -0
  115. package/dist/sankhyablocks/p-a5bdcb3f.entry.js +1 -0
  116. package/dist/sankhyablocks/{p-0bcd4757.entry.js → p-a61bbe18.entry.js} +1 -1
  117. package/dist/sankhyablocks/{p-48729c8c.js → p-a77bdadc.js} +1 -1
  118. package/dist/sankhyablocks/{p-9d3a025a.entry.js → p-bfdf92e9.entry.js} +1 -1
  119. package/dist/sankhyablocks/p-cb1e77e0.entry.js +1 -0
  120. package/dist/sankhyablocks/{p-340e2447.entry.js → p-d3b9b377.entry.js} +1 -1
  121. package/dist/sankhyablocks/p-e289826a.js +1 -0
  122. package/dist/sankhyablocks/p-e51c52cf.entry.js +1 -0
  123. package/dist/sankhyablocks/{p-f467153c.entry.js → p-e66bcb5c.entry.js} +1 -1
  124. package/dist/sankhyablocks/{p-108fee57.js → p-ef076eea.js} +2 -2
  125. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  126. package/dist/types/components/snk-application/snk-application.d.ts +0 -10
  127. package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
  128. package/dist/types/components/snk-configurator/snk-configurator.d.ts +0 -6
  129. package/dist/types/components/snk-crud/snk-crud.d.ts +2 -2
  130. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +0 -5
  131. package/dist/types/components/snk-grid/snk-grid.d.ts +4 -0
  132. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +1 -0
  133. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -4
  134. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +1 -0
  135. package/dist/types/components.d.ts +25 -77
  136. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +0 -6
  137. package/package.json +1 -1
  138. package/react/components.d.ts +0 -2
  139. package/react/components.js +0 -2
  140. package/react/components.js.map +1 -1
  141. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.css +0 -3
  142. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +0 -73
  143. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.css +0 -78
  144. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +0 -57
  145. package/dist/collection/lib/configs/LayoutFormConfig.js +0 -25
  146. package/dist/components/snk-layout-form-config.d.ts +0 -11
  147. package/dist/components/snk-layout-form-config.js +0 -6
  148. package/dist/components/snk-layout-form-config2.js +0 -73
  149. package/dist/components/snk-view-representation.d.ts +0 -11
  150. package/dist/components/snk-view-representation.js +0 -6
  151. package/dist/components/snk-view-representation2.js +0 -41
  152. package/dist/sankhyablocks/p-01512409.js +0 -26
  153. package/dist/sankhyablocks/p-02c6dc9f.entry.js +0 -1
  154. package/dist/sankhyablocks/p-35fcf37e.js +0 -1
  155. package/dist/sankhyablocks/p-3a36d4b3.entry.js +0 -1
  156. package/dist/sankhyablocks/p-513af002.entry.js +0 -1
  157. package/dist/sankhyablocks/p-5fea0816.entry.js +0 -1
  158. package/dist/sankhyablocks/p-6dc031de.js +0 -1
  159. package/dist/sankhyablocks/p-950e3cbe.entry.js +0 -1
  160. package/dist/sankhyablocks/p-9907cf67.entry.js +0 -1
  161. package/dist/sankhyablocks/p-a962a3e4.entry.js +0 -1
  162. package/dist/sankhyablocks/p-af58c9d7.entry.js +0 -1
  163. package/dist/sankhyablocks/p-c5acb7ba.entry.js +0 -11
  164. package/dist/sankhyablocks/p-c7c6eab7.entry.js +0 -1
  165. package/dist/sankhyablocks/p-d1f04e2c.js +0 -1
  166. package/dist/sankhyablocks/p-d2065bb4.entry.js +0 -1
  167. package/dist/sankhyablocks/p-dc617b0c.entry.js +0 -1
  168. package/dist/sankhyablocks/p-e5d8891d.entry.js +0 -1
  169. package/dist/sankhyablocks/p-f861bfcb.entry.js +0 -1
  170. package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +0 -15
  171. package/dist/types/components/snk-layout-form-config/snk-view-representation/snk-view-representation.d.ts +0 -10
  172. package/dist/types/lib/configs/LayoutFormConfig.d.ts +0 -11
@@ -2,12 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-0e4f3b1a.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-b6002ea7.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
- require('./SnkFormConfigManager-6637cd6b.js');
9
- require('./ConfigStorage-2235f35e.js');
10
- require('./form-config-fetcher-db332748.js');
8
+ require('./SnkFormConfigManager-d680be08.js');
9
+ require('./ConfigStorage-6b633b10.js');
10
+ require('./form-config-fetcher-e0a512c3.js');
11
11
  require('./DataFetcher-875371e9.js');
12
12
  require('./PrintUtils-bcaeb82f.js');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
@@ -15,10 +15,11 @@ require('./filter-item-type.enum-a7ffdaa6.js');
15
15
  require('./constants-241934b3.js');
16
16
  require('@sankhyalabs/ezui/dist/collection/utils/form');
17
17
  require('./field-search-68e34bf4.js');
18
- require('./taskbar-elements-7e19882d.js');
18
+ require('./taskbar-elements-ebddaef4.js');
19
19
  require('./index-e3e39724.js');
20
- require('./index-102ba62d.js');
21
- require('./ISave-62fbb1dd.js');
20
+ require('./index-ab1cfb44.js');
21
+ require('./pesquisa-fetcher-30cab386.js');
22
+ require('./ISave-e91b70a7.js');
22
23
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
23
24
  require('./dataunit-fetcher-b95768e8.js');
24
25
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
@@ -5,12 +5,12 @@ 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-2235f35e.js');
8
+ const ConfigStorage = require('./ConfigStorage-6b633b10.js');
9
9
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
10
10
  const index$1 = require('./index-c5771aba.js');
11
- const index$2 = require('./index-102ba62d.js');
11
+ const index$2 = require('./index-ab1cfb44.js');
12
12
  require('./filter-item-type.enum-a7ffdaa6.js');
13
- require('./form-config-fetcher-db332748.js');
13
+ require('./form-config-fetcher-e0a512c3.js');
14
14
  require('./DataFetcher-875371e9.js');
15
15
  require('./PrintUtils-bcaeb82f.js');
16
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
@@ -4,14 +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 ISave = require('./ISave-62fbb1dd.js');
7
+ const pesquisaFetcher = require('./pesquisa-fetcher-30cab386.js');
8
8
  require('./DataFetcher-875371e9.js');
9
9
  require('./index-e3e39724.js');
10
+ require('./ISave-e91b70a7.js');
10
11
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
11
12
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
12
13
  require('./dataunit-fetcher-b95768e8.js');
13
14
  require('./filter-item-type.enum-a7ffdaa6.js');
14
- require('./form-config-fetcher-db332748.js');
15
+ require('./form-config-fetcher-e0a512c3.js');
15
16
  require('./constants-241934b3.js');
16
17
  require('./PrintUtils-bcaeb82f.js');
17
18
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
@@ -33,11 +34,12 @@ const SnkPesquisa = class {
33
34
  this._limitCharsToSearch = 3;
34
35
  this._deboucingTime = 450;
35
36
  this._gridDataSource = [];
36
- this.pesquisaFetcher = new ISave.PesquisaFetcher();
37
+ this.pesquisaFetcher = new pesquisaFetcher.PesquisaFetcher();
37
38
  this._itemList = undefined;
38
39
  this._startLoading = false;
39
40
  this._presentationMode = "list";
40
41
  this._currentView = undefined;
42
+ this._valideDataSource = false;
41
43
  this.searchLoader = undefined;
42
44
  this.treeLoader = undefined;
43
45
  this.selectItem = undefined;
@@ -96,7 +98,7 @@ const SnkPesquisa = class {
96
98
  let pkField = resp.pkField;
97
99
  if (!pkField)
98
100
  return;
99
- this._gridMetadata = ISave.buildGridMetadata(resp);
101
+ this._gridMetadata = pesquisaFetcher.buildGridMetadata(resp);
100
102
  this._gridDataSource = [...resp.data];
101
103
  this._pkField = pkField;
102
104
  this._descriptionField = descriptionField;
@@ -308,10 +310,13 @@ const SnkPesquisa = class {
308
310
  if (this.argument && (!isNaN(argumentNumber) || this.argument.length >= this._limitCharsToSearch)) {
309
311
  this._changeDeboucingTimeout = setTimeout(() => {
310
312
  this.doSearch(isNaN(argumentNumber) ? this.argument : argumentNumber.toString());
313
+ this._valideDataSource = true;
311
314
  }, this._deboucingTime);
312
315
  }
313
316
  else {
314
317
  this._itemList = undefined;
318
+ this._gridDataSource = [];
319
+ this._valideDataSource = false;
315
320
  }
316
321
  }
317
322
  clearDeboucingTimeout() {
@@ -322,6 +327,7 @@ const SnkPesquisa = class {
322
327
  }
323
328
  onClickSearch() {
324
329
  this.doSearch((this.argument || "").trim());
330
+ this._valideDataSource = true;
325
331
  }
326
332
  getMessageView() {
327
333
  return this._startLoading
@@ -350,11 +356,11 @@ const SnkPesquisa = class {
350
356
  async chooseViewMode() {
351
357
  var _a, _b;
352
358
  if (this._presentationMode !== 'list') {
353
- await ((_a = this._viewStack) === null || _a === void 0 ? void 0 : _a.show(ISave.PESQUISA_VIEW_MODE.GRID));
354
- this._currentView = ISave.PESQUISA_VIEW_MODE.GRID;
359
+ await ((_a = this._viewStack) === null || _a === void 0 ? void 0 : _a.show(pesquisaFetcher.PESQUISA_VIEW_MODE.GRID));
360
+ this._currentView = pesquisaFetcher.PESQUISA_VIEW_MODE.GRID;
355
361
  return;
356
362
  }
357
- const view = this.isHierarchyEntity ? ISave.PESQUISA_VIEW_MODE.TREE : ISave.PESQUISA_VIEW_MODE.CARDS;
363
+ const view = this.isHierarchyEntity ? pesquisaFetcher.PESQUISA_VIEW_MODE.TREE : pesquisaFetcher.PESQUISA_VIEW_MODE.CARDS;
358
364
  await ((_b = this._viewStack) === null || _b === void 0 ? void 0 : _b.show(view));
359
365
  this._currentView = view;
360
366
  }
@@ -389,9 +395,10 @@ const SnkPesquisa = class {
389
395
  var _a, _b;
390
396
  return (index.h(index.Host, null, index.h("div", { class: "snk-pesquisa" }, index.h("div", { class: "snk-pesquisa__input" }, index.h("ez-text-input", { label: "Buscar", class: "ez-margin-right--medium", canShowError: false, ref: (ref) => this._textInput = ref, onEzChange: (event) => this.onChangeValue(event), value: this.argument, "data-element-id": "searchInput" }, index.h("ez-icon", { slot: "leftIcon", iconName: "search" }), this.argument && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)
391
397
  ? index.h("button", { slot: "rightIcon", class: "snk-pesquisa__btn", onClick: () => this.clearSearch() }, index.h("ez-icon", { iconName: "close" }))
392
- : undefined), index.h("ez-button", { class: "ez-button--primary", label: "Pesquisar", onClick: () => this.onClickSearch() }), index.h("ez-button", { class: "ez-margin-left--medium", mode: "icon", iconName: this.getButtonModeInfo().iconName, title: this.getButtonModeInfo().title, onClick: async () => await this.handleChangeViewMode() })), index.h("div", { class: `snk-pesquisa__records-label ${this._currentView === ISave.PESQUISA_VIEW_MODE.TREE ? 'hidden' : ''}` }, index.h("label", { class: `snk-pesquisa__records ${this.hideRecordsMessage() ? "hidden" : ""}` }, this.getMessageView()), index.h("label", { class: `snk-pesquisa__records-limit ${this.hideLimitMessage() ? "hidden" : ""}` }, "Essa pesquisa foi limitada, existem mais resultados.")), index.h("div", { class: "snk-pesquisa__content" }, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index.h("stack-item", null, index.h("pesquisa-grid", { metadata: this._gridMetadata, dataSource: this._gridDataSource, pkField: this._pkField, descriptionField: this._descriptionField, entityName: this.entityName, shouldLoadConfig: this._currentView === ISave.PESQUISA_VIEW_MODE.GRID, onPesquisaGridSelectItem: ({ detail }) => this.selectItem(detail) })), index.h("stack-item", null, index.h("div", { class: 'snk-pesquisa__cards-container' }, (_b = this._itemList) === null || _b === void 0 ? void 0 : _b.map((item) => {
398
+ : undefined), index.h("ez-button", { class: "ez-button--primary", label: "Pesquisar", onClick: () => this.onClickSearch() }), index.h("ez-button", { class: "ez-margin-left--medium", mode: "icon", iconName: this.getButtonModeInfo().iconName, title: this.getButtonModeInfo().title, onClick: async () => await this.handleChangeViewMode() })), index.h("div", { class: `snk-pesquisa__records-label ${this._currentView === pesquisaFetcher.PESQUISA_VIEW_MODE.TREE ? 'hidden' : ''}` }, index.h("label", { class: `snk-pesquisa__records ${this.hideRecordsMessage() ? "hidden" : ""}` }, this.getMessageView()), index.h("label", { class: `snk-pesquisa__records-limit ${this.hideLimitMessage() ? "hidden" : ""}` }, "Essa pesquisa foi limitada, existem mais resultados.")), index.h("div", { class: "snk-pesquisa__content" }, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index.h("stack-item", null, this._valideDataSource &&
399
+ index.h("pesquisa-grid", { metadata: this._gridMetadata, dataSource: this._gridDataSource, pkField: this._pkField, descriptionField: this._descriptionField, entityName: this.entityName, shouldLoadConfig: this._currentView === pesquisaFetcher.PESQUISA_VIEW_MODE.GRID, onPesquisaGridSelectItem: ({ detail }) => this.selectItem(detail) })), index.h("stack-item", null, index.h("div", { class: 'snk-pesquisa__cards-container' }, (_b = this._itemList) === null || _b === void 0 ? void 0 : _b.map((item) => {
393
400
  return (index.h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
394
- }))), index.h("stack-item", null, index.h("pesquisa-tree", { ref: (element) => this._pesquisaTree = element, argument: this.argument, treeLoader: this.treeLoader, allowsNonAnalytic: this.allowsNonAnalytic, shouldLoadTree: this._currentView === ISave.PESQUISA_VIEW_MODE.TREE, onPesquisaTreeSelectItem: ({ detail }) => this.selectItem(detail) })))))));
401
+ }))), index.h("stack-item", null, index.h("pesquisa-tree", { ref: (element) => this._pesquisaTree = element, argument: this.argument, treeLoader: this.treeLoader, allowsNonAnalytic: this.allowsNonAnalytic, shouldLoadTree: this._currentView === pesquisaFetcher.PESQUISA_VIEW_MODE.TREE, onPesquisaTreeSelectItem: ({ detail }) => this.selectItem(detail) })))))));
395
402
  }
396
403
  get _element() { return index.getElement(this); }
397
404
  static get watchers() { return {
@@ -6,20 +6,21 @@ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const constants = require('./constants-241934b3.js');
9
- const taskbarElements = require('./taskbar-elements-7e19882d.js');
9
+ const taskbarElements = require('./taskbar-elements-ebddaef4.js');
10
10
  require('./DataFetcher-875371e9.js');
11
- require('./ISave-62fbb1dd.js');
12
- const ClientSideExporterProvider = require('./ClientSideExporterProvider-cc82b68a.js');
11
+ require('./pesquisa-fetcher-30cab386.js');
12
+ const ClientSideExporterProvider = require('./ClientSideExporterProvider-fe52f7cf.js');
13
13
  const index$1 = require('./index-e3e39724.js');
14
+ require('./ISave-e91b70a7.js');
14
15
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
15
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
16
17
  const dataunitFetcher = require('./dataunit-fetcher-b95768e8.js');
17
18
  require('./filter-item-type.enum-a7ffdaa6.js');
18
- const formConfigFetcher = require('./form-config-fetcher-db332748.js');
19
+ const formConfigFetcher = require('./form-config-fetcher-e0a512c3.js');
19
20
  const fieldSearch = require('./field-search-68e34bf4.js');
20
- const ConfigStorage = require('./ConfigStorage-2235f35e.js');
21
- const SnkFormConfigManager = require('./SnkFormConfigManager-6637cd6b.js');
22
- const index$2 = require('./index-102ba62d.js');
21
+ const ConfigStorage = require('./ConfigStorage-6b633b10.js');
22
+ const SnkFormConfigManager = require('./SnkFormConfigManager-d680be08.js');
23
+ const index$2 = require('./index-ab1cfb44.js');
23
24
  require('./PrintUtils-bcaeb82f.js');
24
25
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
25
26
  require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
@@ -75,6 +76,7 @@ const SnkSimpleCrud = class {
75
76
  this.pageSize = 150;
76
77
  this.resourceID = undefined;
77
78
  this.enableGridInsert = false;
79
+ this.paginationCounterMode = 'auto';
78
80
  this.taskbarManager = undefined;
79
81
  this.messagesBuilder = undefined;
80
82
  this.useEnterLikeTab = false;
@@ -86,7 +88,6 @@ const SnkSimpleCrud = class {
86
88
  this.ignoreReadOnlyFormFields = false;
87
89
  this.autoFocus = true;
88
90
  this.domainMessagesBuilder = undefined;
89
- this.layoutFormConfig = false;
90
91
  this.autoLoad = undefined;
91
92
  this.outlineMode = false;
92
93
  }
@@ -777,9 +778,9 @@ const SnkSimpleCrud = class {
777
778
  if (this.dataUnit == undefined) {
778
779
  return;
779
780
  }
780
- return (index.h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, index.h("header", null, index.h("slot", { name: "snkSimpleCrudHeader" })), index.h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section` }, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index.h("stack-item", null, index.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(dataunitFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
781
+ return (index.h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, index.h("header", null, index.h("slot", { name: "snkSimpleCrudHeader" })), index.h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section` }, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index.h("stack-item", null, index.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(dataunitFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
781
782
  ? undefined
782
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, this.renderTaskbarContent(), index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, this.renderTaskbarContent(), index.h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), index.h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId, layoutFormConfig: this.layoutFormConfig })), index.h("div", { id: `${this._customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }))), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
783
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, paginationCounterMode: this.paginationCounterMode }, this.renderTaskbarContent(), index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, this.renderTaskbarContent(), index.h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), index.h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), index.h("div", { id: `${this._customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }))), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
783
784
  }
784
785
  get _element() { return index.getElement(this); }
785
786
  static get watchers() { return {
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
8
- const taskbarElements = require('./taskbar-elements-7e19882d.js');
8
+ const taskbarElements = require('./taskbar-elements-ebddaef4.js');
9
9
  const index$1 = require('./index-e3e39724.js');
10
- require('./index-102ba62d.js');
10
+ require('./index-ab1cfb44.js');
11
11
 
12
12
  const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex;flex-wrap:wrap}.no-wrap.sc-snk-taskbar-h{flex-wrap:nowrap}.full-width.sc-snk-taskbar-h{width:100%}.align-right.sc-snk-taskbar-h{justify-content:flex-end}.overflowed.sc-snk-taskbar{display:none}";
13
13
 
@@ -21,6 +21,7 @@ const SnkTaskbar = class {
21
21
  this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
22
22
  this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
23
23
  this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
24
+ this.TASKBAR_CUSTOM_ELEMENTS = 'taskbar-custom-elements-container';
24
25
  this._titleKeyByElement = {
25
26
  [taskbarElements.TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
26
27
  [taskbarElements.TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
@@ -424,6 +425,7 @@ const SnkTaskbar = class {
424
425
  this._slotContainer.appendChild(customElement);
425
426
  }
426
427
  render() {
428
+ var _a;
427
429
  if (this._definitions === undefined) {
428
430
  return undefined;
429
431
  }
@@ -442,7 +444,8 @@ const SnkTaskbar = class {
442
444
  }
443
445
  (_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
444
446
  return index.h("slot", { name: elem });
445
- })), index.h("div", { class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, index.h("slot", { name: this.customSlotId }))));
447
+ })), index.h("div", { id: this.TASKBAR_CUSTOM_ELEMENTS, class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, index.h("slot", { name: this.customSlotId }), (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 :
448
+ _a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS))));
446
449
  }
447
450
  getHostClasses() {
448
451
  if (this.overflowStrategy !== 'hiddenItems')
@@ -2,7 +2,7 @@
2
2
 
3
3
  const index = require('./index-f9e81701.js');
4
4
  const index$2 = require('./index-e3e39724.js');
5
- const index$1 = require('./index-102ba62d.js');
5
+ const index$1 = require('./index-ab1cfb44.js');
6
6
 
7
7
  exports.TaskbarElement = void 0;
8
8
  (function (TaskbarElement) {
@@ -41,8 +41,6 @@
41
41
  "./components/snk-grid/snk-grid.js",
42
42
  "./components/snk-grid-config/snk-grid-config.js",
43
43
  "./components/snk-grid-config/snk-select-box/snk-select-box.js",
44
- "./components/snk-layout-form-config/snk-layout-form-config.js",
45
- "./components/snk-layout-form-config/snk-view-representation/snk-view-representation.js",
46
44
  "./components/snk-personalized-filter/snk-personalized-filter.js",
47
45
  "./components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js",
48
46
  "./components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js",
@@ -18,8 +18,6 @@ import { SnkErrorHandler } from "./errorhandler/snk-error-handler";
18
18
  import RequestListenerFactory from "./request-listener/RequestListenerFactory";
19
19
  import PreloadManager from "../../lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager";
20
20
  import { TEMPLATES_SKELETON } from "../../lib/utils/constants";
21
- import { LayoutFormConfig } from "../../lib/configs/LayoutFormConfig";
22
- import { FormConfigFetcher } from "../../lib";
23
21
  /**
24
22
  * É possível customizar as mensagens dos blocos de construção através de um pequeno modulo na estrutura da aplicação:
25
23
  * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
@@ -39,8 +37,6 @@ export class SnkApplication {
39
37
  this._pendingActions = new Map;
40
38
  this._loadPkParameter = null;
41
39
  this._isLoadedByPk = false;
42
- this._formConfigFetcher = new FormConfigFetcher();
43
- this._LayoutFormConfigSingleton = LayoutFormConfig.getInstance();
44
40
  this._applicationReady = false;
45
41
  this._templateSkeleton = TEMPLATES_SKELETON.GRID;
46
42
  this._activeScrimWindow = false;
@@ -115,14 +111,6 @@ export class SnkApplication {
115
111
  async getKeyboardManager() {
116
112
  return Promise.resolve(this._keyboardManager);
117
113
  }
118
- /**
119
- * Obtém o notificador de Layout de formulario.
120
- *
121
- * @return {LayoutFormConfig} the Configurador de Layout do Formulario
122
- */
123
- async getLayoutFormConfig() {
124
- return Promise.resolve(this._LayoutFormConfigSingleton);
125
- }
126
114
  /**
127
115
  * Obtém `true` caso o usuário logado seja o SUP.
128
116
  */
@@ -1038,12 +1026,6 @@ export class SnkApplication {
1038
1026
  ConfigStorage.preload(this.applicationResourceID, this.configName, legacyConfig);
1039
1027
  document.addEventListener("click", () => Workspace.applicationClick());
1040
1028
  this._waitingAppReady.forEach(resolve => resolve());
1041
- this.setLayoutFormConfig();
1042
- }
1043
- async setLayoutFormConfig() {
1044
- const response = await this._formConfigFetcher.fetchLayoutFormConfig('formColCfg.' + this.applicationResourceID);
1045
- const config = isNaN(Number(response === null || response === void 0 ? void 0 : response.config)) ? null : Number(response === null || response === void 0 ? void 0 : response.config);
1046
- this._LayoutFormConfigSingleton.setConfig(config);
1047
1029
  }
1048
1030
  connectedCallback() {
1049
1031
  this._isBrowserTypeElectron = UserAgentUtils.isElectron();
@@ -1397,29 +1379,6 @@ export class SnkApplication {
1397
1379
  }]
1398
1380
  }
1399
1381
  },
1400
- "getLayoutFormConfig": {
1401
- "complexType": {
1402
- "signature": "() => Promise<LayoutFormConfig>",
1403
- "parameters": [],
1404
- "references": {
1405
- "Promise": {
1406
- "location": "global"
1407
- },
1408
- "LayoutFormConfig": {
1409
- "location": "import",
1410
- "path": "../../lib/configs/LayoutFormConfig"
1411
- }
1412
- },
1413
- "return": "Promise<LayoutFormConfig>"
1414
- },
1415
- "docs": {
1416
- "text": "Obt\u00E9m o notificador de Layout de formulario.",
1417
- "tags": [{
1418
- "name": "return",
1419
- "text": "the Configurador de Layout do Formulario"
1420
- }]
1421
- }
1422
- },
1423
1382
  "isUserSup": {
1424
1383
  "complexType": {
1425
1384
  "signature": "() => Promise<boolean>",
@@ -4,6 +4,7 @@ import { AnexoSistemaFetcher, AttachFetcher, DataUnitFetcher } from '../../lib';
4
4
  import { VIEW_MODE } from '../../lib/utils/constants';
5
5
  import { anexoSistemaCrudConfig, AnexoSistemaDataUnitFactory, attachCrudConfig, AttachFetcherDataUnitFactory, buildTaskBarManager, } from './structure';
6
6
  import InMemoryLoader from '../../lib/dataUnit/InMemoryLoader';
7
+ import { SaveErrorsEnum } from '../../lib/http/data-fetcher/fetchers/AttachFetcher/interfaces';
7
8
  const RESOURCE_ID = 'AnexoSistema';
8
9
  const DATA_UNIT_NAME = 'br.com.sankhya.core.v3.anexoSistema';
9
10
  export class SnkAttach {
@@ -24,6 +25,9 @@ export class SnkAttach {
24
25
  this.handleFinish = () => {
25
26
  if (!this._currentDataUnit.isDirty())
26
27
  return this.back.emit();
28
+ if (!this.validateAnexoSistema()) {
29
+ return;
30
+ }
27
31
  this._currentDataUnit.saveData().then(() => {
28
32
  this.showFinishedToast();
29
33
  this.back.emit();
@@ -158,6 +162,7 @@ export class SnkAttach {
158
162
  var _a, _b;
159
163
  this._currentFetcher = new AttachFetcher();
160
164
  this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
165
+ this._currentDataUnit.pageSize = 150;
161
166
  this.initDataUnitLoaders();
162
167
  this._currentDataUnit.addInterceptor({
163
168
  interceptAction: (action) => {
@@ -202,6 +207,27 @@ export class SnkAttach {
202
207
  }
203
208
  });
204
209
  }
210
+ validateAnexoSistema() {
211
+ var _a;
212
+ if (this._currentFetcher instanceof AnexoSistemaFetcher) {
213
+ try {
214
+ let fields = this._currentDataUnit.getSelectedRecord();
215
+ fields = Object.assign(Object.assign({}, fields), { NOMEARQUIVO: (_a = fields.NOMEARQUIVO) === null || _a === void 0 ? void 0 : _a[0] });
216
+ this._currentFetcher.validateFields(fields);
217
+ }
218
+ catch (error) {
219
+ if (error.message === SaveErrorsEnum.LINK_AND_FILE_AT_THE_SAME_TIME) {
220
+ this._application.alert(this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.title'), this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.message'));
221
+ return false;
222
+ }
223
+ if (error.message === SaveErrorsEnum.ANY_LINK_OR_FILE_FILLED) {
224
+ this._application.alert(this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.title'), this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.message'));
225
+ return false;
226
+ }
227
+ }
228
+ }
229
+ return true;
230
+ }
205
231
  async componentWillLoad() {
206
232
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
207
233
  await this.initAttach();
@@ -230,7 +256,7 @@ export class SnkAttach {
230
256
  var _a, _b;
231
257
  if (!this._currentDataUnit)
232
258
  return null;
233
- return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this) }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
259
+ return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
234
260
  }
235
261
  static get is() { return "snk-attach"; }
236
262
  static get encapsulation() { return "scoped"; }
@@ -94,20 +94,24 @@ export class AttachFetcherDataUnitFactory {
94
94
  }
95
95
  getInterceptions(dataUnit, action, crudRef) {
96
96
  return new Promise((resolve) => {
97
- if (action.type === Action.EDITION_CANCELED) {
98
- if (!dataUnit.isDirty())
99
- return resolve(action);
100
- return this._application.confirm(this.getMessage('snkAttach.cancelConfirmation.title'), this.getMessage('snkAttach.cancelConfirmation.message')).then((cancellationConfirmed) => {
101
- if (cancellationConfirmed) {
102
- crudRef.goToView(VIEW_MODE.GRID);
97
+ var _a, _b, _c, _d, _e, _f;
98
+ switch (action.type) {
99
+ case Action.EDITION_CANCELED:
100
+ if (!dataUnit.isDirty())
103
101
  return resolve(action);
104
- }
105
- return resolve(undefined);
106
- });
107
- }
108
- if (action.type === Action.DATA_SAVED) {
109
- dataUnit.loadData();
110
- return resolve(action);
102
+ return this._application.confirm(this.getMessage('snkAttach.cancelConfirmation.title'), this.getMessage('snkAttach.cancelConfirmation.message')).then((cancellationConfirmed) => {
103
+ if (cancellationConfirmed) {
104
+ crudRef.goToView(VIEW_MODE.GRID);
105
+ return resolve(action);
106
+ }
107
+ return resolve(undefined);
108
+ });
109
+ case Action.DATA_SAVED:
110
+ dataUnit.loadData(undefined, undefined, false, (_c = (_b = (_a = action === null || action === void 0 ? void 0 : action.payload) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.REGISTER_KEY);
111
+ return resolve(action);
112
+ case Action.RECORDS_REMOVED:
113
+ dataUnit.loadData(undefined, undefined, false, (_f = (_e = (_d = action === null || action === void 0 ? void 0 : action.payload) === null || _d === void 0 ? void 0 : _d.cachedRecords) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.CODATA);
114
+ return resolve(action);
111
115
  }
112
116
  resolve(action);
113
117
  });
@@ -11,7 +11,6 @@ export class SnkConfigurator {
11
11
  this.resourceID = undefined;
12
12
  this.viewMode = VIEW_MODE.GRID;
13
13
  this.customContainerId = undefined;
14
- this.layoutFormConfig = false;
15
14
  this.messagesBuilder = undefined;
16
15
  }
17
16
  /**
@@ -72,12 +71,6 @@ export class SnkConfigurator {
72
71
  var _a;
73
72
  return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, {});
74
73
  }
75
- handleSave() {
76
- if (this.layoutFormConfig) {
77
- this._snkLayoutFormConfig.save();
78
- }
79
- this.save.emit();
80
- }
81
74
  componentWillLoad() {
82
75
  this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
83
76
  if (this._application) {
@@ -101,7 +94,7 @@ export class SnkConfigurator {
101
94
  insideCustomElementsContainer === null || insideCustomElementsContainer === void 0 ? void 0 : insideCustomElementsContainer.appendChild(configuratorCustomElement);
102
95
  }
103
96
  render() {
104
- return (h("ez-modal", { ref: (element) => (this.modal = element), opened: this._opened, "close-esc": false, "close-outside-click": false, "modal-size": "small", scrim: "light" }, h("div", { class: "snk-configurator" }, h("div", { class: "snk-configurator__header" }, h("label", { class: "snk-configurator__title" }, this.getMessage('snkConfigurator.titleConfigurations')), h("div", { class: "snk-configurator__button-close" }, h("ez-button", { mode: "icon", iconName: "close", size: "medium", onClick: () => this.closeConfig() }))), h("div", { class: "snk-configurator__main" }, h("ez-collapsible-box", { boxBordered: true, label: "Modo de visualiza\u00E7\u00E3o ", headerSize: "medium", class: "snk-configurator__collapsable-box" }, h("ez-radio-button", { value: this.getViewModeValue().toString(), onEzChange: (evt) => this.onViewModeChanged(evt), enabled: this.enableModeConfig() }, h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelGrid'), value: VIEW_MODE.GRID }), h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelForm'), value: VIEW_MODE.FORM })), h("div", { class: "snk-configurator__collsable-box-action" }, h("ez-button", { label: this.viewMode === VIEW_MODE.GRID ? this.getMessage('snkConfigurator.labelConfigGrid') : this.getMessage('snkConfigurator.labelConfigForm'), class: "snk-configurator__button-config ez-button--secondary", onClick: () => this.onClickOpenConfig(), id: "openConfigurator" }))), this.layoutFormConfig && h("ez-collapsible-box", { boxBordered: true, value: true, label: "Layout do formul\u00E1rio", headerSize: "medium", class: "snk-configurator__collapsable-box ez-margin-top--medium" }, h("div", { class: 'ez-flex ez-flex--column ez-size-width--full' }, h("snk-layout-form-config", { ref: (ref) => this._snkLayoutFormConfig = ref }))), h("div", { id: "slotContainer", class: "snk-configurator__outline" })), this.showActionButtons && (h("div", { class: "snk-configurator__action-buttons" }, h("ez-button", { label: "Cancelar", onClick: () => this.cancel.emit() }), h("ez-button", { label: "Salvar", onClick: () => this.handleSave(), class: "ez-button--primary" }))))));
97
+ return (h("ez-modal", { ref: (element) => (this.modal = element), opened: this._opened, "close-esc": false, "close-outside-click": false, "modal-size": "small", scrim: "light" }, h("div", { class: "snk-configurator" }, h("div", { class: "snk-configurator__header" }, h("label", { class: "snk-configurator__title" }, this.getMessage('snkConfigurator.titleConfigurations')), h("div", { class: "snk-configurator__button-close" }, h("ez-button", { mode: "icon", iconName: "close", size: "medium", onClick: () => this.closeConfig() }))), h("div", { class: "snk-configurator__main" }, h("ez-collapsible-box", { boxBordered: true, label: "Modo de visualiza\u00E7\u00E3o ", headerSize: "medium", class: "snk-configurator__collapsable-box" }, h("ez-radio-button", { value: this.getViewModeValue().toString(), onEzChange: (evt) => this.onViewModeChanged(evt), enabled: this.enableModeConfig() }, h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelGrid'), value: VIEW_MODE.GRID }), h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelForm'), value: VIEW_MODE.FORM })), h("div", { class: "snk-configurator__collsable-box-action" }, h("ez-button", { label: this.viewMode === VIEW_MODE.GRID ? this.getMessage('snkConfigurator.labelConfigGrid') : this.getMessage('snkConfigurator.labelConfigForm'), class: "snk-configurator__button-config ez-button--secondary", onClick: () => this.onClickOpenConfig(), id: "openConfigurator" }))), h("div", { id: "slotContainer", class: "snk-configurator__outline" })), this.showActionButtons && (h("div", { class: "snk-configurator__action-buttons" }, h("ez-button", { label: "Cancelar", onClick: () => this.cancel.emit() }), h("ez-button", { label: "Salvar", onClick: () => this.save.emit(), class: "ez-button--primary" }))))));
105
98
  }
106
99
  static get is() { return "snk-configurator"; }
107
100
  static get encapsulation() { return "scoped"; }
@@ -209,24 +202,6 @@ export class SnkConfigurator {
209
202
  "attribute": "custom-container-id",
210
203
  "reflect": false
211
204
  },
212
- "layoutFormConfig": {
213
- "type": "boolean",
214
- "mutable": false,
215
- "complexType": {
216
- "original": "boolean",
217
- "resolved": "boolean",
218
- "references": {}
219
- },
220
- "required": false,
221
- "optional": false,
222
- "docs": {
223
- "tags": [],
224
- "text": "Define se o LayoutFormConfig ser\u00E1 exibido no configurador."
225
- },
226
- "attribute": "layout-form-config",
227
- "reflect": false,
228
- "defaultValue": "false"
229
- },
230
205
  "messagesBuilder": {
231
206
  "type": "unknown",
232
207
  "mutable": true,
@@ -47,7 +47,7 @@ export class SnkCrud {
47
47
  this.ignoreReadOnlyFormFields = undefined;
48
48
  this.setCustomFormTitle = undefined;
49
49
  this.strategyExporter = ExporterStrategy.SERVER_SIDE;
50
- this.layoutFormConfig = false;
50
+ this.paginationCounterMode = 'auto';
51
51
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
52
52
  }
53
53
  /**
@@ -383,7 +383,7 @@ export class SnkCrud {
383
383
  return;
384
384
  }
385
385
  this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
386
- return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig })), 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" }))));
386
+ return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, paginationCounterMode: this.paginationCounterMode }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
387
387
  }
388
388
  static get is() { return "snk-crud"; }
389
389
  static get encapsulation() { return "scoped"; }
@@ -866,23 +866,23 @@ export class SnkCrud {
866
866
  "reflect": false,
867
867
  "defaultValue": "ExporterStrategy.SERVER_SIDE"
868
868
  },
869
- "layoutFormConfig": {
870
- "type": "boolean",
869
+ "paginationCounterMode": {
870
+ "type": "string",
871
871
  "mutable": false,
872
872
  "complexType": {
873
- "original": "boolean",
874
- "resolved": "boolean",
873
+ "original": "'show' | 'hidden' | 'auto'",
874
+ "resolved": "\"auto\" | \"hidden\" | \"show\"",
875
875
  "references": {}
876
876
  },
877
877
  "required": false,
878
- "optional": false,
878
+ "optional": true,
879
879
  "docs": {
880
880
  "tags": [],
881
- "text": "Define se o LayoutFormConfig ser\u00E1 exibido no configurador."
881
+ "text": "Define se a grid ser\u00E1 focada ao ser carregada."
882
882
  },
883
- "attribute": "layout-form-config",
883
+ "attribute": "pagination-counter-mode",
884
884
  "reflect": false,
885
- "defaultValue": "false"
885
+ "defaultValue": "'auto'"
886
886
  }
887
887
  };
888
888
  }
@@ -19,17 +19,8 @@
19
19
  .grid-container{
20
20
  background-color: #FFF;
21
21
  min-height: 100px;
22
- height: 100%;
23
22
  }
24
23
 
25
24
  .detail-header{
26
25
  padding-bottom: 0;
27
- }
28
-
29
- snk-data-unit {
30
- flex: 1;
31
- }
32
-
33
- snk-grid{
34
- height: calc(100% - 43px);
35
- }
26
+ }