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

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 (106) hide show
  1. package/dist/cjs/{ConfigStorage-f079f5fd.js → ConfigStorage-9b965af9.js} +1 -1
  2. package/dist/cjs/{ContinuousInsertUtils-64e47516.js → ContinuousInsertUtils-42636ac1.js} +2 -2
  3. package/dist/cjs/{SnkFormConfigManager-63369164.js → SnkFormConfigManager-46e90d8d.js} +8 -6
  4. package/dist/cjs/{auth-fetcher-4f853233.js → auth-fetcher-a78242d1.js} +1 -1
  5. package/dist/cjs/{form-config-fetcher-39397ac5.js → form-config-fetcher-91fba2b1.js} +37 -0
  6. package/dist/cjs/index-f9e81701.js +4 -4
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{pesquisa-fetcher-a9bfeb22.js → pesquisa-fetcher-2ec4811b.js} +3 -0
  9. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  10. package/dist/cjs/{snk-actions-button_4.cjs.entry.js → snk-actions-button_5.cjs.entry.js} +91 -3
  11. package/dist/cjs/snk-application.cjs.entry.js +4 -4
  12. package/dist/cjs/snk-attach.cjs.entry.js +11 -7
  13. package/dist/cjs/snk-config-options_3.cjs.entry.js +3 -3
  14. package/dist/cjs/snk-crud.cjs.entry.js +3 -3
  15. package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -8
  16. package/dist/cjs/snk-detail-view.cjs.entry.js +5 -5
  17. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +5 -3
  18. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +2 -2
  19. package/dist/cjs/snk-grid.cjs.entry.js +4 -4
  20. package/dist/cjs/{snk-guides-viewer-2139481c.js → snk-guides-viewer-7d85e2fb.js} +3 -3
  21. package/dist/cjs/snk-guides-viewer.cjs.entry.js +5 -5
  22. package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
  23. package/dist/cjs/snk-simple-crud.cjs.entry.js +18 -25
  24. package/dist/collection/collection-manifest.json +1 -0
  25. package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +8 -4
  26. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +3 -3
  27. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -3
  28. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +3 -1
  29. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -4
  30. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +13 -21
  31. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +22 -0
  32. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +179 -0
  33. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +41 -4
  34. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -1
  35. package/dist/components/SnkFormConfigManager.js +6 -4
  36. package/dist/components/form-config-fetcher.js +37 -0
  37. package/dist/components/index.d.ts +1 -0
  38. package/dist/components/index.js +1 -0
  39. package/dist/components/pesquisa-fetcher.js +4 -1
  40. package/dist/components/snk-attach2.js +20 -34
  41. package/dist/components/snk-crud.js +61 -55
  42. package/dist/components/snk-data-exporter2.js +4 -6
  43. package/dist/components/snk-detail-view2.js +84 -93
  44. package/dist/components/snk-filter-modal.js +3 -1
  45. package/dist/components/snk-simple-crud2.js +25 -51
  46. package/dist/components/snk-simple-form-config.d.ts +11 -0
  47. package/dist/components/snk-simple-form-config.js +6 -0
  48. package/dist/components/snk-simple-form-config2.js +119 -0
  49. package/dist/esm/{ConfigStorage-6514d66e.js → ConfigStorage-ff99377a.js} +1 -1
  50. package/dist/esm/{ContinuousInsertUtils-b62906f9.js → ContinuousInsertUtils-071e0b6a.js} +2 -2
  51. package/dist/esm/{SnkFormConfigManager-b409c745.js → SnkFormConfigManager-035f2975.js} +8 -6
  52. package/dist/esm/{auth-fetcher-ca5d3a49.js → auth-fetcher-0b78ca31.js} +1 -1
  53. package/dist/esm/{form-config-fetcher-a7d3e277.js → form-config-fetcher-0c2620ef.js} +37 -0
  54. package/dist/esm/index-a7d3d3f1.js +4 -4
  55. package/dist/esm/loader.js +1 -1
  56. package/dist/esm/{pesquisa-fetcher-6bc2e41a.js → pesquisa-fetcher-24e5bba0.js} +4 -1
  57. package/dist/esm/sankhyablocks.js +1 -1
  58. package/dist/esm/{snk-actions-button_4.entry.js → snk-actions-button_5.entry.js} +91 -4
  59. package/dist/esm/snk-application.entry.js +4 -4
  60. package/dist/esm/snk-attach.entry.js +11 -7
  61. package/dist/esm/snk-config-options_3.entry.js +3 -3
  62. package/dist/esm/snk-crud.entry.js +3 -3
  63. package/dist/esm/snk-data-exporter.entry.js +6 -8
  64. package/dist/esm/snk-detail-view.entry.js +5 -5
  65. package/dist/esm/snk-filter-bar_4.entry.js +5 -3
  66. package/dist/esm/snk-filter-modal-item.entry.js +2 -2
  67. package/dist/esm/snk-grid.entry.js +4 -4
  68. package/dist/esm/{snk-guides-viewer-b7ed39eb.js → snk-guides-viewer-2fd50f6b.js} +3 -3
  69. package/dist/esm/snk-guides-viewer.entry.js +5 -5
  70. package/dist/esm/snk-personalized-filter.entry.js +2 -2
  71. package/dist/esm/snk-simple-crud.entry.js +18 -25
  72. package/dist/sankhyablocks/{p-4138da61.entry.js → p-262583c6.entry.js} +1 -1
  73. package/dist/sankhyablocks/p-29643bef.entry.js +1 -0
  74. package/dist/sankhyablocks/{p-fca0e5cc.entry.js → p-35882caf.entry.js} +1 -1
  75. package/dist/sankhyablocks/{p-7075b789.entry.js → p-365d8ed4.entry.js} +1 -1
  76. package/dist/sankhyablocks/{p-5d9788b3.entry.js → p-399e1b74.entry.js} +1 -1
  77. package/dist/sankhyablocks/{p-e97be1c8.js → p-4c5fde50.js} +1 -1
  78. package/dist/sankhyablocks/{p-ec43fcc8.entry.js → p-5136d9f0.entry.js} +1 -1
  79. package/dist/sankhyablocks/{p-1d3ce0d9.entry.js → p-65650e05.entry.js} +1 -1
  80. package/dist/sankhyablocks/p-70ed0b0f.js +1 -0
  81. package/dist/sankhyablocks/{p-9ffd9fc7.js → p-763edad2.js} +1 -1
  82. package/dist/sankhyablocks/p-82274cb0.js +1 -0
  83. package/dist/sankhyablocks/{p-0387d9d7.entry.js → p-8cf0a9fe.entry.js} +1 -1
  84. package/dist/sankhyablocks/p-acca8a69.js +26 -0
  85. package/dist/sankhyablocks/{p-e4391e16.js → p-c271fbf1.js} +1 -1
  86. package/dist/sankhyablocks/{p-a2c790ac.entry.js → p-c629c07a.entry.js} +1 -1
  87. package/dist/sankhyablocks/p-e6683406.js +6 -0
  88. package/dist/sankhyablocks/{p-bb8ef149.entry.js → p-e7067256.entry.js} +1 -1
  89. package/dist/sankhyablocks/{p-aa003d4e.entry.js → p-e9432f45.entry.js} +1 -1
  90. package/dist/sankhyablocks/{p-3728d2aa.entry.js → p-eda55eef.entry.js} +3 -3
  91. package/dist/sankhyablocks/p-ff6c8f52.entry.js +1 -0
  92. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  93. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +2 -3
  94. package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +33 -0
  95. package/dist/types/components.d.ts +38 -0
  96. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +8 -2
  97. package/package.json +1 -1
  98. package/react/components.d.ts +1 -0
  99. package/react/components.js +1 -0
  100. package/react/components.js.map +1 -1
  101. package/dist/sankhyablocks/p-0e206e62.js +0 -1
  102. package/dist/sankhyablocks/p-126c58ea.js +0 -26
  103. package/dist/sankhyablocks/p-341465ce.js +0 -6
  104. package/dist/sankhyablocks/p-aaf94476.js +0 -1
  105. package/dist/sankhyablocks/p-af7f7b3e.entry.js +0 -1
  106. package/dist/sankhyablocks/p-eb7c9cf4.entry.js +0 -1
@@ -7,12 +7,12 @@ const core = require('@sankhyalabs/core');
7
7
  const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
8
8
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
9
9
  const constants = require('./constants-35ddd366.js');
10
- const SnkFormConfigManager = require('./SnkFormConfigManager-63369164.js');
10
+ const SnkFormConfigManager = require('./SnkFormConfigManager-46e90d8d.js');
11
11
  const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
12
12
  const Sortable = require('./Sortable-fb1c4cbb.js');
13
- const formConfigFetcher = require('./form-config-fetcher-39397ac5.js');
13
+ const formConfigFetcher = require('./form-config-fetcher-91fba2b1.js');
14
14
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
15
- require('./ConfigStorage-f079f5fd.js');
15
+ require('./ConfigStorage-9b965af9.js');
16
16
  require('./filter-item-type.enum-a7ffdaa6.js');
17
17
  require('./DataFetcher-e059eb72.js');
18
18
  require('./PrintUtils-bcaeb82f.js');
@@ -6,16 +6,16 @@ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
8
8
  require('./DataFetcher-e059eb72.js');
9
- require('./pesquisa-fetcher-a9bfeb22.js');
9
+ require('./pesquisa-fetcher-2ec4811b.js');
10
10
  const index$1 = require('./index-1dfc7a6e.js');
11
11
  require('./ISave-e91b70a7.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
14
  require('./dataunit-fetcher-228016f4.js');
15
15
  require('./filter-item-type.enum-a7ffdaa6.js');
16
- require('./form-config-fetcher-39397ac5.js');
16
+ require('./form-config-fetcher-91fba2b1.js');
17
17
  const constants = require('./constants-35ddd366.js');
18
- const authFetcher = require('./auth-fetcher-4f853233.js');
18
+ const authFetcher = require('./auth-fetcher-a78242d1.js');
19
19
  require('./index-102ba62d.js');
20
20
  require('./PrintUtils-bcaeb82f.js');
21
21
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
@@ -9,13 +9,13 @@ const index = require('./index-1dfc7a6e.js');
9
9
  const constants = require('./constants-35ddd366.js');
10
10
  const DataFetcher = require('./DataFetcher-e059eb72.js');
11
11
  const snkDataUnit = require('./snk-data-unit-3d9b6ed4.js');
12
- require('./pesquisa-fetcher-a9bfeb22.js');
12
+ require('./pesquisa-fetcher-2ec4811b.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
16
  require('./dataunit-fetcher-228016f4.js');
17
17
  require('./filter-item-type.enum-a7ffdaa6.js');
18
- require('./form-config-fetcher-39397ac5.js');
18
+ require('./form-config-fetcher-91fba2b1.js');
19
19
  require('./PrintUtils-bcaeb82f.js');
20
20
  require('./SnkMessageBuilder-bae64d0d.js');
21
21
  require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
@@ -394,10 +394,10 @@ class ClientSideExporterStrategy {
394
394
  "GridXLSBuilderSP.buildXLSFromJson",
395
395
  responseBody => ({
396
396
  fileSessionKey: responseBody.chaveXLS.valor,
397
- canPrint: false,
398
- canExport: false,
397
+ canPrint: true,
398
+ canExport: true,
399
+ canSendEmail: true,
399
400
  useAppPrint: false,
400
- canSendEmail: false
401
401
  })
402
402
  ];
403
403
  }
@@ -557,7 +557,6 @@ const SnkDataExporter = class {
557
557
  var _a, _b, _c;
558
558
  const optionKey = this.getOptionKey(option);
559
559
  const fileType = (_a = index.DataExporterType[optionKey]) !== null && _a !== void 0 ? _a : index.DataExporterType.EXPORT_TO_PDF;
560
- const isDownload = index.DataExporterType[optionKey] === index.DataExporterType.EXPORT_TO_XLS;
561
560
  const params = {
562
561
  methodName: index.DataExporterOption[`EXPORT_TO_${fileType}`],
563
562
  fileName: this._appLabel,
@@ -568,8 +567,7 @@ const SnkDataExporter = class {
568
567
  };
569
568
  await this.resolveExporter(params, (response) => {
570
569
  if (response.canExport || fileType === index.DataExporterType.EXPORT_TO_PDF) {
571
- fileViewer(Object.assign(Object.assign({}, response), { fileType,
572
- isDownload }));
570
+ fileViewer(Object.assign(Object.assign({}, response), { fileType }));
573
571
  }
574
572
  else {
575
573
  utils.ApplicationUtils.error(this.getMessage("snkDataExporter.title.permission"), this.getMessage("snkDataExporter.message.exportPermission"));
@@ -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-63369164.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-46e90d8d.js');
8
8
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
9
9
  require('./DataFetcher-e059eb72.js');
10
- require('./pesquisa-fetcher-a9bfeb22.js');
10
+ require('./pesquisa-fetcher-2ec4811b.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
15
  require('./dataunit-fetcher-228016f4.js');
16
16
  require('./filter-item-type.enum-a7ffdaa6.js');
17
- require('./form-config-fetcher-39397ac5.js');
17
+ require('./form-config-fetcher-91fba2b1.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-2139481c.js');
20
+ const snkGuidesViewer = require('./snk-guides-viewer-7d85e2fb.js');
21
21
  const SnkMessageBuilder = require('./SnkMessageBuilder-bae64d0d.js');
22
- require('./ConfigStorage-f079f5fd.js');
22
+ require('./ConfigStorage-9b965af9.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');
@@ -5,7 +5,7 @@ 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-f079f5fd.js');
8
+ const ConfigStorage = require('./ConfigStorage-9b965af9.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');
@@ -14,7 +14,7 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
14
14
  const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-0184ffbb.js');
15
15
  const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
16
16
  const filterType_enum = require('./filter-type.enum-b14ce507.js');
17
- require('./form-config-fetcher-39397ac5.js');
17
+ require('./form-config-fetcher-91fba2b1.js');
18
18
  require('./DataFetcher-e059eb72.js');
19
19
  require('./PrintUtils-bcaeb82f.js');
20
20
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
@@ -1319,7 +1319,9 @@ const SnkFilterModal = class {
1319
1319
  this.filters = core.ObjectUtils.copy(filterListCopy);
1320
1320
  return;
1321
1321
  }
1322
- this.filters.find(filter => filter.id === filterItem.id).value = undefined;
1322
+ const filter = this.filters.find(filter => filter.id === filterItem.id);
1323
+ filter.value = undefined;
1324
+ this.filters = core.ObjectUtils.copy(this.filters);
1323
1325
  }
1324
1326
  uncheckFilterValues(valueList) {
1325
1327
  valueList.forEach(value => {
@@ -6,9 +6,9 @@ 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-f079f5fd.js');
9
+ const ConfigStorage = require('./ConfigStorage-9b965af9.js');
10
10
  const filterType_enum = require('./filter-type.enum-b14ce507.js');
11
- require('./form-config-fetcher-39397ac5.js');
11
+ require('./form-config-fetcher-91fba2b1.js');
12
12
  require('./DataFetcher-e059eb72.js');
13
13
  require('./PrintUtils-bcaeb82f.js');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
@@ -5,20 +5,20 @@ 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-f079f5fd.js');
8
+ const ConfigStorage = require('./ConfigStorage-9b965af9.js');
9
9
  const index$1 = require('./index-1dfc7a6e.js');
10
10
  const fieldSearch = require('./field-search-68e34bf4.js');
11
11
  const index$2 = require('./index-102ba62d.js');
12
- const ContinuousInsertUtils = require('./ContinuousInsertUtils-64e47516.js');
12
+ const ContinuousInsertUtils = require('./ContinuousInsertUtils-42636ac1.js');
13
13
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
14
14
  require('./DataFetcher-e059eb72.js');
15
- require('./pesquisa-fetcher-a9bfeb22.js');
15
+ require('./pesquisa-fetcher-2ec4811b.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
19
  require('./dataunit-fetcher-228016f4.js');
20
20
  require('./filter-item-type.enum-a7ffdaa6.js');
21
- require('./form-config-fetcher-39397ac5.js');
21
+ require('./form-config-fetcher-91fba2b1.js');
22
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');
@@ -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-63369164.js');
5
+ const SnkFormConfigManager = require('./SnkFormConfigManager-46e90d8d.js');
6
6
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
7
7
  const fieldSearch = require('./field-search-68e34bf4.js');
8
8
  const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
9
9
  const constants = require('./constants-35ddd366.js');
10
10
  require('./DataFetcher-e059eb72.js');
11
- require('./pesquisa-fetcher-a9bfeb22.js');
11
+ require('./pesquisa-fetcher-2ec4811b.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
16
  require('./dataunit-fetcher-228016f4.js');
17
17
  require('./filter-item-type.enum-a7ffdaa6.js');
18
- require('./form-config-fetcher-39397ac5.js');
18
+ require('./form-config-fetcher-91fba2b1.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-small:var(--space--2xs, 8px);--snk-guides-viewer__header--min-height:68px;--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-small);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-small)}.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-small));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-small))}.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,12 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-2139481c.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-7d85e2fb.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
- require('./SnkFormConfigManager-63369164.js');
9
- require('./ConfigStorage-f079f5fd.js');
10
- require('./form-config-fetcher-39397ac5.js');
8
+ require('./SnkFormConfigManager-46e90d8d.js');
9
+ require('./ConfigStorage-9b965af9.js');
10
+ require('./form-config-fetcher-91fba2b1.js');
11
11
  require('./DataFetcher-e059eb72.js');
12
12
  require('./PrintUtils-bcaeb82f.js');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
@@ -18,7 +18,7 @@ require('./field-search-68e34bf4.js');
18
18
  require('./taskbar-elements-9ad1f9c0.js');
19
19
  require('./index-1dfc7a6e.js');
20
20
  require('./index-102ba62d.js');
21
- require('./pesquisa-fetcher-a9bfeb22.js');
21
+ require('./pesquisa-fetcher-2ec4811b.js');
22
22
  require('./ISave-e91b70a7.js');
23
23
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
24
24
  require('./dataunit-fetcher-228016f4.js');
@@ -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-f079f5fd.js');
8
+ const ConfigStorage = require('./ConfigStorage-9b965af9.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-39397ac5.js');
13
+ require('./form-config-fetcher-91fba2b1.js');
14
14
  require('./DataFetcher-e059eb72.js');
15
15
  require('./PrintUtils-bcaeb82f.js');
16
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
@@ -8,18 +8,18 @@ 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
10
  require('./DataFetcher-e059eb72.js');
11
- require('./pesquisa-fetcher-a9bfeb22.js');
12
- const ContinuousInsertUtils = require('./ContinuousInsertUtils-64e47516.js');
11
+ require('./pesquisa-fetcher-2ec4811b.js');
12
+ const ContinuousInsertUtils = require('./ContinuousInsertUtils-42636ac1.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
17
  const dataunitFetcher = require('./dataunit-fetcher-228016f4.js');
18
18
  require('./filter-item-type.enum-a7ffdaa6.js');
19
- const formConfigFetcher = require('./form-config-fetcher-39397ac5.js');
19
+ const formConfigFetcher = require('./form-config-fetcher-91fba2b1.js');
20
20
  const fieldSearch = require('./field-search-68e34bf4.js');
21
- const ConfigStorage = require('./ConfigStorage-f079f5fd.js');
22
- const SnkFormConfigManager = require('./SnkFormConfigManager-63369164.js');
21
+ const ConfigStorage = require('./ConfigStorage-9b965af9.js');
22
+ const SnkFormConfigManager = require('./SnkFormConfigManager-46e90d8d.js');
23
23
  const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
24
24
  const index$2 = require('./index-102ba62d.js');
25
25
  require('./PrintUtils-bcaeb82f.js');
@@ -110,7 +110,6 @@ const SnkSimpleCrud = class {
110
110
  "snkSimpleCrudTaskbar.finish_edition": this.getFinishEditionButtonsCallback.bind(this)
111
111
  });
112
112
  this._showPopUpGridConfig = false;
113
- this._showFormConfig = false;
114
113
  this._currentViewMode = constants.VIEW_MODE.GRID;
115
114
  this._config = undefined;
116
115
  this._fieldToGetFocus = undefined;
@@ -331,15 +330,9 @@ const SnkSimpleCrud = class {
331
330
  });
332
331
  }
333
332
  async openFormConfig() {
334
- var _a, _b;
335
- //No momento não daremos suporte para configuraçao de formulário quando houver legacy config
336
- if (this.formLegacyConfigName) {
337
- const title = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.formConfigUnavaliable.title", undefined);
338
- const message = (_b = this.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage("snkSimpleCrud.formConfigUnavaliable.message", undefined);
339
- await this.application.alert(title, message);
340
- return;
333
+ if (this.formLegacyConfigName || this.configName) {
334
+ await this._snkSimpleFormConfig.show();
341
335
  }
342
- this._showFormConfig = true;
343
336
  }
344
337
  addGridLegacyConfigName() {
345
338
  if (this.gridLegacyConfigName && this.configName) {
@@ -369,7 +362,7 @@ const SnkSimpleCrud = class {
369
362
  formConfigIsLoaded() {
370
363
  return this.formConfig != undefined || this._formConfigAlreadyLoaded;
371
364
  }
372
- async loadFormConfig(forceLoad = false) {
365
+ async loadFormConfig(forceLoad = false, forceSetNewConfig = false) {
373
366
  if (this.configName === undefined) {
374
367
  return;
375
368
  }
@@ -384,7 +377,7 @@ const SnkSimpleCrud = class {
384
377
  let loadedLegacyConfig = await this._formConfigFetcher.fetchLegacyConfigurableForm(this.formLegacyConfigName);
385
378
  if (loadedLegacyConfig != undefined) {
386
379
  this._formConfigManager.setConfig(loadedLegacyConfig);
387
- this.setFormConfig(loadedLegacyConfig);
380
+ this.setFormConfig(loadedLegacyConfig, forceSetNewConfig);
388
381
  return;
389
382
  }
390
383
  this.setFormConfig(await this._formConfigManager.loadConfig());
@@ -768,9 +761,6 @@ const SnkSimpleCrud = class {
768
761
  closeGridConfig() {
769
762
  this._showPopUpGridConfig = false;
770
763
  }
771
- closeFormConfig() {
772
- this._showFormConfig = false;
773
- }
774
764
  getPageSize() {
775
765
  if (this.mode === constants.SIMPLE_CRUD_MODE.IN_MEMORY) {
776
766
  return 0;
@@ -780,10 +770,6 @@ const SnkSimpleCrud = class {
780
770
  }
781
771
  return this.pageSize;
782
772
  }
783
- //No momento não daremos suporte para configuração de formulário quando houver formLegacyConfigName
784
- handleShowFormConfig() {
785
- return this._showFormConfig && !this.formLegacyConfigName;
786
- }
787
773
  resolveResourceID() {
788
774
  return core.StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
789
775
  }
@@ -796,7 +782,10 @@ const SnkSimpleCrud = class {
796
782
  return configFromManager;
797
783
  }
798
784
  updateFormConfig() {
799
- const newConfig = Object.assign(Object.assign({}, this.formConfig), { fields: this.dataUnit.metadata.fields });
785
+ let newConfig = this.formConfig;
786
+ if (this.formLegacyConfigName == undefined) {
787
+ newConfig = Object.assign(Object.assign({}, this.formConfig), { fields: this.dataUnit.metadata.fields });
788
+ }
800
789
  this.setFormConfig(newConfig, true);
801
790
  if (this._formConfigManager == undefined) {
802
791
  this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resolveResourceID());
@@ -824,18 +813,22 @@ const SnkSimpleCrud = class {
824
813
  description: "Cancela uma ação.", element: this._element
825
814
  });
826
815
  }
816
+ async handleFormConfigSaved() {
817
+ await this.loadFormConfig(true, true);
818
+ }
827
819
  renderTaskbarContent() {
828
820
  var _a;
829
821
  return (index$1.h("snk-taskbar", { class: this._currentViewMode === constants.VIEW_MODE.FORM && `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow-xsmall'} ez-padding--small`, dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: index.PresentationMode.SECONDARY }, index$1.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
830
822
  }
831
823
  /* istanbul ignore next */
832
824
  render() {
825
+ var _a;
833
826
  if (this.dataUnit == undefined) {
834
827
  return;
835
828
  }
836
829
  return (index$1.h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, index$1.h("header", null, index$1.h("slot", { name: "snkSimpleCrudHeader" })), index$1.h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section` }, index$1.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index$1.h("stack-item", null, index$1.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(dataunitFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
837
830
  ? undefined
838
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger, outlineMode: this.outlineMode }, this.renderTaskbarContent(), index$1.h("div", { slot: "footer" }, index$1.h("slot", { name: "snkSimpleCrudFooter" })))), index$1.h("stack-item", null, this.renderTaskbarContent(), index$1.h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && index$1.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index$1.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), index$1.h("div", { id: `${this._customContainerId}` }, index$1.h("slot", { name: "SnkConfigContainerSlot" }))), index$1.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index$1.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
831
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger, outlineMode: this.outlineMode }, this.renderTaskbarContent(), index$1.h("div", { slot: "footer" }, index$1.h("slot", { name: "snkSimpleCrudFooter" })))), index$1.h("stack-item", null, this.renderTaskbarContent(), index$1.h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), index$1.h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && index$1.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), index$1.h("div", { id: `${this._customContainerId}` }, index$1.h("slot", { name: "SnkConfigContainerSlot" }))), index$1.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index$1.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
839
832
  }
840
833
  get _element() { return index$1.getElement(this); }
841
834
  static get watchers() { return {
@@ -50,6 +50,7 @@
50
50
  "./components/snk-pesquisa/snk-pesquisa.js",
51
51
  "./components/snk-simple-bar/snk-simple-bar.js",
52
52
  "./components/snk-simple-crud/snk-simple-crud.js",
53
+ "./components/snk-simple-form-config/snk-simple-form-config.js",
53
54
  "./components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js",
54
55
  "./components/teste-pesquisa/teste-pesquisa.js"
55
56
  ],
@@ -25,14 +25,18 @@ export const buildTaskBarManager = () => {
25
25
  ];
26
26
  return {
27
27
  getButtons: (_, dataState, currentButtons) => {
28
- if ((dataState === null || dataState === void 0 ? void 0 : dataState.insertionMode) || (dataState === null || dataState === void 0 ? void 0 : dataState.isDirty))
28
+ const refreshBtnIndex = currentButtons.indexOf(TaskbarElement.REFRESH);
29
+ if ((dataState === null || dataState === void 0 ? void 0 : dataState.insertionMode) || (dataState === null || dataState === void 0 ? void 0 : dataState.isDirty)) {
29
30
  return currentButtons.reverse();
30
- else
31
- currentButtons.splice(currentButtons.indexOf(TaskbarElement.REFRESH), 1);
31
+ }
32
+ else if (refreshBtnIndex !== -1) {
33
+ currentButtons.splice(refreshBtnIndex, 1);
34
+ }
32
35
  const { selectedRecord } = dataState || {};
33
36
  const taskbarTobeAdded = !!(selectedRecord === null || selectedRecord === void 0 ? void 0 : selectedRecord.LINK) ? TaskbarAttachButtons.LINK : TaskbarAttachButtons.DOWNLOAD;
34
37
  currentButtons.splice(currentButtons.indexOf(TaskbarElement.DIVIDER) + 1, 0, TaskbarElement.REMOVE, taskbarTobeAdded, TaskbarElement.DIVIDER);
35
- const updatedButtons = Array.from(new Set(currentButtons.filter(button => button !== TaskbarElement.CLONE)));
38
+ const buttonsToRemove = [TaskbarElement.CLONE, TaskbarElement.DATA_EXPORTER];
39
+ const updatedButtons = Array.from(new Set(currentButtons.filter((button) => !buttonsToRemove.includes(button))));
36
40
  updatedButtons.splice(updatedButtons.indexOf(taskbarTobeAdded) + 1, 0, TaskbarElement.DIVIDER);
37
41
  return updatedButtons;
38
42
  },
@@ -51,10 +51,10 @@ export default class ClientSideExporterStrategy {
51
51
  "GridXLSBuilderSP.buildXLSFromJson",
52
52
  responseBody => ({
53
53
  fileSessionKey: responseBody.chaveXLS.valor,
54
- canPrint: false,
55
- canExport: false,
54
+ canPrint: true,
55
+ canExport: true,
56
+ canSendEmail: true,
56
57
  useAppPrint: false,
57
- canSendEmail: false
58
58
  })
59
59
  ];
60
60
  }
@@ -126,7 +126,6 @@ export class SnkDataExporter {
126
126
  var _a, _b, _c;
127
127
  const optionKey = this.getOptionKey(option);
128
128
  const fileType = (_a = DataExporterType[optionKey]) !== null && _a !== void 0 ? _a : DataExporterType.EXPORT_TO_PDF;
129
- const isDownload = DataExporterType[optionKey] === DataExporterType.EXPORT_TO_XLS;
130
129
  const params = {
131
130
  methodName: DataExporterOption[`EXPORT_TO_${fileType}`],
132
131
  fileName: this._appLabel,
@@ -137,8 +136,7 @@ export class SnkDataExporter {
137
136
  };
138
137
  await this.resolveExporter(params, (response) => {
139
138
  if (response.canExport || fileType === DataExporterType.EXPORT_TO_PDF) {
140
- fileViewer(Object.assign(Object.assign({}, response), { fileType,
141
- isDownload }));
139
+ fileViewer(Object.assign(Object.assign({}, response), { fileType }));
142
140
  }
143
141
  else {
144
142
  ApplicationUtils.error(this.getMessage("snkDataExporter.title.permission"), this.getMessage("snkDataExporter.message.exportPermission"));
@@ -144,7 +144,9 @@ export class SnkFilterModal {
144
144
  this.filters = ObjectUtils.copy(filterListCopy);
145
145
  return;
146
146
  }
147
- this.filters.find(filter => filter.id === filterItem.id).value = undefined;
147
+ const filter = this.filters.find(filter => filter.id === filterItem.id);
148
+ filter.value = undefined;
149
+ this.filters = ObjectUtils.copy(this.filters);
148
150
  }
149
151
  uncheckFilterValues(valueList) {
150
152
  valueList.forEach(value => {
@@ -87,13 +87,15 @@ export class SnkFormConfigManager {
87
87
  const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
88
88
  const hasConfig = this.hasConfig();
89
89
  if (hasConfig && !forceEmptyConfig) {
90
- return fields.map(({ label, name, readOnly, visible, required, tab }) => {
90
+ return fields.map(({ label, name, readOnly, visible, required, tab, group }) => {
91
91
  var _a;
92
92
  if (label == undefined) {
93
93
  const currentField = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(name);
94
- return Object.assign(Object.assign({}, currentField), { name: name !== null && name !== void 0 ? name : currentField.name, readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : currentField.readOnly, visible: visible !== null && visible !== void 0 ? visible : currentField.visible, required: required !== null && required !== void 0 ? required : currentField.required, tab: tab });
94
+ if (!currentField)
95
+ return;
96
+ return Object.assign(Object.assign({}, currentField), { name: name !== null && name !== void 0 ? name : currentField.name, readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : currentField.readOnly, visible: visible !== null && visible !== void 0 ? visible : currentField.visible, required: required !== null && required !== void 0 ? required : currentField.required, tab: tab, group: group });
95
97
  }
96
- return { name, label, readOnly, visible, required, tab };
98
+ return { name, label, readOnly, visible, required, tab, group };
97
99
  })
98
100
  .filter(field => this.isFieldVisible(field, descriptionFilter));
99
101
  }
@@ -106,7 +108,7 @@ export class SnkFormConfigManager {
106
108
  return filteredFields;
107
109
  }
108
110
  isFieldVisible(field, descriptionFilter) {
109
- if (field.visible === false) {
111
+ if (field === undefined || field.visible === false) {
110
112
  return false;
111
113
  }
112
114
  if (descriptionFilter == undefined) {
@@ -30,7 +30,6 @@ export class SnkSimpleCrud {
30
30
  "snkSimpleCrudTaskbar.finish_edition": this.getFinishEditionButtonsCallback.bind(this)
31
31
  });
32
32
  this._showPopUpGridConfig = false;
33
- this._showFormConfig = false;
34
33
  this._currentViewMode = VIEW_MODE.GRID;
35
34
  this._config = undefined;
36
35
  this._fieldToGetFocus = undefined;
@@ -251,15 +250,9 @@ export class SnkSimpleCrud {
251
250
  });
252
251
  }
253
252
  async openFormConfig() {
254
- var _a, _b;
255
- //No momento não daremos suporte para configuraçao de formulário quando houver legacy config
256
- if (this.formLegacyConfigName) {
257
- const title = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.formConfigUnavaliable.title", undefined);
258
- const message = (_b = this.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage("snkSimpleCrud.formConfigUnavaliable.message", undefined);
259
- await this.application.alert(title, message);
260
- return;
253
+ if (this.formLegacyConfigName || this.configName) {
254
+ await this._snkSimpleFormConfig.show();
261
255
  }
262
- this._showFormConfig = true;
263
256
  }
264
257
  addGridLegacyConfigName() {
265
258
  if (this.gridLegacyConfigName && this.configName) {
@@ -289,7 +282,7 @@ export class SnkSimpleCrud {
289
282
  formConfigIsLoaded() {
290
283
  return this.formConfig != undefined || this._formConfigAlreadyLoaded;
291
284
  }
292
- async loadFormConfig(forceLoad = false) {
285
+ async loadFormConfig(forceLoad = false, forceSetNewConfig = false) {
293
286
  if (this.configName === undefined) {
294
287
  return;
295
288
  }
@@ -304,7 +297,7 @@ export class SnkSimpleCrud {
304
297
  let loadedLegacyConfig = await this._formConfigFetcher.fetchLegacyConfigurableForm(this.formLegacyConfigName);
305
298
  if (loadedLegacyConfig != undefined) {
306
299
  this._formConfigManager.setConfig(loadedLegacyConfig);
307
- this.setFormConfig(loadedLegacyConfig);
300
+ this.setFormConfig(loadedLegacyConfig, forceSetNewConfig);
308
301
  return;
309
302
  }
310
303
  this.setFormConfig(await this._formConfigManager.loadConfig());
@@ -688,9 +681,6 @@ export class SnkSimpleCrud {
688
681
  closeGridConfig() {
689
682
  this._showPopUpGridConfig = false;
690
683
  }
691
- closeFormConfig() {
692
- this._showFormConfig = false;
693
- }
694
684
  getPageSize() {
695
685
  if (this.mode === SIMPLE_CRUD_MODE.IN_MEMORY) {
696
686
  return 0;
@@ -700,10 +690,6 @@ export class SnkSimpleCrud {
700
690
  }
701
691
  return this.pageSize;
702
692
  }
703
- //No momento não daremos suporte para configuração de formulário quando houver formLegacyConfigName
704
- handleShowFormConfig() {
705
- return this._showFormConfig && !this.formLegacyConfigName;
706
- }
707
693
  resolveResourceID() {
708
694
  return StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
709
695
  }
@@ -716,7 +702,10 @@ export class SnkSimpleCrud {
716
702
  return configFromManager;
717
703
  }
718
704
  updateFormConfig() {
719
- const newConfig = Object.assign(Object.assign({}, this.formConfig), { fields: this.dataUnit.metadata.fields });
705
+ let newConfig = this.formConfig;
706
+ if (this.formLegacyConfigName == undefined) {
707
+ newConfig = Object.assign(Object.assign({}, this.formConfig), { fields: this.dataUnit.metadata.fields });
708
+ }
720
709
  this.setFormConfig(newConfig, true);
721
710
  if (this._formConfigManager == undefined) {
722
711
  this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
@@ -744,18 +733,22 @@ export class SnkSimpleCrud {
744
733
  description: "Cancela uma ação.", element: this._element
745
734
  });
746
735
  }
736
+ async handleFormConfigSaved() {
737
+ await this.loadFormConfig(true, true);
738
+ }
747
739
  renderTaskbarContent() {
748
740
  var _a;
749
741
  return (h("snk-taskbar", { class: this._currentViewMode === VIEW_MODE.FORM && `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow-xsmall'} ez-padding--small`, dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
750
742
  }
751
743
  /* istanbul ignore next */
752
744
  render() {
745
+ var _a;
753
746
  if (this.dataUnit == undefined) {
754
747
  return;
755
748
  }
756
749
  return (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 === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section` }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, 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(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
757
750
  ? undefined
758
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger, outlineMode: this.outlineMode }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && 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 })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
751
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger, outlineMode: this.outlineMode }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), 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) }), 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 && 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 })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
759
752
  }
760
753
  static get is() { return "snk-simple-crud"; }
761
754
  static get encapsulation() { return "scoped"; }
@@ -1239,7 +1232,6 @@ export class SnkSimpleCrud {
1239
1232
  static get states() {
1240
1233
  return {
1241
1234
  "_showPopUpGridConfig": {},
1242
- "_showFormConfig": {},
1243
1235
  "_currentViewMode": {},
1244
1236
  "_config": {},
1245
1237
  "_fieldToGetFocus": {},