@sankhyalabs/sankhyablocks 10.1.0-dev.1 → 10.1.0-dev.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 (195) hide show
  1. package/dist/cjs/{ConfigStorage-5a73e979.js → ConfigStorage-5c0590b3.js} +2 -2
  2. package/dist/cjs/{DataFetcher-eeb3b0b7.js → DataFetcher-5181a917.js} +23 -2
  3. package/dist/cjs/{FormConfigHelper-ebb77625.js → FormConfigHelper-28fe4668.js} +44 -0
  4. package/dist/cjs/{ISave-861e9d6d.js → ISave-0f98a457.js} +4 -4
  5. package/dist/cjs/{SnkFormConfigManager-8d4fded8.js → SnkFormConfigManager-1907ffed.js} +7 -7
  6. package/dist/cjs/{SnkMultiSelectionListDataSource-3b93f6a6.js → SnkMultiSelectionListDataSource-e4e38139.js} +4 -4
  7. package/dist/cjs/{auth-fetcher-8d8acd69.js → auth-fetcher-cff55b1f.js} +1 -1
  8. package/dist/cjs/{dataunit-fetcher-1cea0695.js → dataunit-fetcher-1ba5e2cc.js} +1 -1
  9. package/dist/cjs/field-config_2.cjs.entry.js +1 -1
  10. package/dist/cjs/fields-layout.cjs.entry.js +6 -3
  11. package/dist/cjs/fields-selector.cjs.entry.js +1 -1
  12. package/dist/cjs/{form-config-fetcher-f347f884.js → form-config-fetcher-4a679e23.js} +1 -1
  13. package/dist/cjs/guides-configurator.cjs.entry.js +5 -3
  14. package/dist/cjs/index-1cf293c1.js +4 -0
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
  17. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  18. package/dist/cjs/snk-actions-button_9.cjs.entry.js +14 -7
  19. package/dist/cjs/snk-application.cjs.entry.js +81 -69
  20. package/dist/cjs/snk-attach.cjs.entry.js +5 -5
  21. package/dist/cjs/snk-crud.cjs.entry.js +97 -6
  22. package/dist/cjs/snk-custom-slot-guide.cjs.entry.js +40 -0
  23. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
  24. package/dist/cjs/{snk-data-unit-de248308.js → snk-data-unit-061487a8.js} +4 -2
  25. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  26. package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
  27. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
  28. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  29. package/dist/cjs/snk-form-view.cjs.entry.js +2 -6
  30. package/dist/cjs/snk-form_2.cjs.entry.js +32 -9
  31. package/dist/cjs/snk-grid.cjs.entry.js +13 -10
  32. package/dist/cjs/{snk-guides-viewer-4ec3e7e1.js → snk-guides-viewer-2efe60a7.js} +84 -38
  33. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  34. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  35. package/dist/cjs/snk-pesquisa.cjs.entry.js +16 -5
  36. package/dist/cjs/snk-simple-crud.cjs.entry.js +7 -7
  37. package/dist/cjs/snk-taskbar.cjs.entry.js +64 -48
  38. package/dist/collection/collection-manifest.json +2 -1
  39. package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.js +27 -0
  40. package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +5 -25
  41. package/dist/collection/components/snk-application/snk-application.js +87 -44
  42. package/dist/collection/components/snk-attach/snk-attach.js +1 -1
  43. package/dist/collection/components/snk-crud/snk-crud.js +151 -2
  44. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +2 -6
  45. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +133 -34
  46. package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.css +3 -0
  47. package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.js +95 -0
  48. package/dist/collection/components/snk-data-unit/snk-data-unit.js +2 -0
  49. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +1 -1
  50. package/dist/collection/components/snk-form-config/FormConfigHelper.js +42 -0
  51. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -6
  52. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +16 -0
  53. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +6 -3
  54. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +3 -3
  55. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +5 -3
  56. package/dist/collection/components/snk-form-config/snk-form-config.js +53 -6
  57. package/dist/collection/components/snk-grid/snk-grid.css +14 -0
  58. package/dist/collection/components/snk-grid/snk-grid.js +26 -4
  59. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +9 -2
  60. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +5 -1
  61. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +43 -0
  62. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +1 -1
  63. package/dist/collection/components/snk-taskbar/snk-taskbar.js +87 -48
  64. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +3 -3
  65. package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +7 -0
  66. package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +7 -0
  67. package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +8 -1
  68. package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +1 -1
  69. package/dist/components/DataFetcher.js +23 -2
  70. package/dist/components/ISave.js +3 -3
  71. package/dist/components/SnkFormConfigManager.js +6 -6
  72. package/dist/components/field-config2.js +43 -1
  73. package/dist/components/fields-layout2.js +6 -3
  74. package/dist/components/guides-configurator2.js +5 -3
  75. package/dist/components/index.d.ts +1 -0
  76. package/dist/components/index.js +1 -0
  77. package/dist/components/snk-application2.js +76 -63
  78. package/dist/components/snk-attach2.js +1 -1
  79. package/dist/components/snk-crud.js +96 -1
  80. package/dist/components/snk-custom-slot-guide.d.ts +11 -0
  81. package/dist/components/snk-custom-slot-guide.js +55 -0
  82. package/dist/components/snk-data-unit2.js +2 -0
  83. package/dist/components/snk-detail-view2.js +81 -34
  84. package/dist/components/snk-filter-number.js +1 -1
  85. package/dist/components/snk-form-config2.js +29 -5
  86. package/dist/components/snk-form-view2.js +2 -6
  87. package/dist/components/snk-grid2.js +9 -4
  88. package/dist/components/snk-layout-form-config2.js +9 -2
  89. package/dist/components/snk-pesquisa2.js +14 -2
  90. package/dist/components/snk-simple-crud2.js +1 -1
  91. package/dist/components/snk-taskbar2.js +66 -49
  92. package/dist/esm/{ConfigStorage-568dc227.js → ConfigStorage-bd096633.js} +2 -2
  93. package/dist/esm/{DataFetcher-743feb3b.js → DataFetcher-5780ad39.js} +23 -2
  94. package/dist/esm/{FormConfigHelper-4e42f0b6.js → FormConfigHelper-d09669f3.js} +43 -1
  95. package/dist/esm/{ISave-345481c1.js → ISave-8a22ec18.js} +4 -4
  96. package/dist/esm/{SnkFormConfigManager-d61df0c8.js → SnkFormConfigManager-437e98bb.js} +7 -7
  97. package/dist/esm/{SnkMultiSelectionListDataSource-ca8d7a09.js → SnkMultiSelectionListDataSource-42125ef4.js} +4 -4
  98. package/dist/esm/{auth-fetcher-c353127d.js → auth-fetcher-28b9d0db.js} +1 -1
  99. package/dist/esm/{dataunit-fetcher-7f2c61ca.js → dataunit-fetcher-c4251d80.js} +1 -1
  100. package/dist/esm/field-config_2.entry.js +1 -1
  101. package/dist/esm/fields-layout.entry.js +6 -3
  102. package/dist/esm/fields-selector.entry.js +1 -1
  103. package/dist/esm/{form-config-fetcher-898d2dd1.js → form-config-fetcher-d0536a71.js} +1 -1
  104. package/dist/esm/guides-configurator.entry.js +5 -3
  105. package/dist/esm/index-479e1293.js +4 -0
  106. package/dist/esm/loader.js +1 -1
  107. package/dist/esm/pesquisa-grid_2.entry.js +4 -4
  108. package/dist/esm/sankhyablocks.js +1 -1
  109. package/dist/esm/snk-actions-button_9.entry.js +14 -7
  110. package/dist/esm/snk-application.entry.js +81 -69
  111. package/dist/esm/snk-attach.entry.js +5 -5
  112. package/dist/esm/snk-crud.entry.js +97 -6
  113. package/dist/esm/snk-custom-slot-guide.entry.js +36 -0
  114. package/dist/esm/snk-data-exporter.entry.js +5 -5
  115. package/dist/esm/{snk-data-unit-60b338c5.js → snk-data-unit-4a1ef77f.js} +4 -2
  116. package/dist/esm/snk-data-unit.entry.js +3 -3
  117. package/dist/esm/snk-detail-view.entry.js +7 -7
  118. package/dist/esm/snk-filter-bar_4.entry.js +3 -3
  119. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  120. package/dist/esm/snk-form-view.entry.js +2 -6
  121. package/dist/esm/snk-form_2.entry.js +32 -9
  122. package/dist/esm/snk-grid.entry.js +13 -10
  123. package/dist/esm/{snk-guides-viewer-339e10b3.js → snk-guides-viewer-c182d058.js} +84 -38
  124. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  125. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  126. package/dist/esm/snk-pesquisa.entry.js +16 -5
  127. package/dist/esm/snk-simple-crud.entry.js +7 -7
  128. package/dist/esm/snk-taskbar.entry.js +65 -49
  129. package/dist/sankhyablocks/{p-e6b1c769.entry.js → p-01ca59fc.entry.js} +1 -1
  130. package/dist/sankhyablocks/p-028fb380.entry.js +11 -0
  131. package/dist/sankhyablocks/{p-1f8cb438.entry.js → p-03f02b12.entry.js} +1 -1
  132. package/dist/sankhyablocks/{p-1788d191.js → p-0e4f8b86.js} +1 -1
  133. package/dist/sankhyablocks/p-1037ea7b.entry.js +1 -0
  134. package/dist/sankhyablocks/{p-6d241415.js → p-1b1373b6.js} +1 -1
  135. package/dist/sankhyablocks/{p-27005fac.entry.js → p-2e882241.entry.js} +1 -1
  136. package/dist/sankhyablocks/p-30a58e29.entry.js +1 -0
  137. package/dist/sankhyablocks/{p-9f2cdaab.entry.js → p-35974f5f.entry.js} +1 -1
  138. package/dist/sankhyablocks/p-3b167a03.entry.js +1 -0
  139. package/dist/sankhyablocks/{p-e8c49c12.js → p-3c046287.js} +2 -2
  140. package/dist/sankhyablocks/{p-bd203e8d.entry.js → p-42272de8.entry.js} +1 -1
  141. package/dist/sankhyablocks/{p-11346b8d.entry.js → p-4c2e2767.entry.js} +1 -1
  142. package/dist/sankhyablocks/{p-7fc46290.js → p-4db9dbf8.js} +1 -1
  143. package/dist/sankhyablocks/{p-626b7a17.js → p-55d7abe7.js} +1 -1
  144. package/dist/sankhyablocks/p-5d408e7e.entry.js +1 -0
  145. package/dist/sankhyablocks/{p-9b6d4950.entry.js → p-6e5af618.entry.js} +1 -1
  146. package/dist/sankhyablocks/{p-144da1d1.entry.js → p-78d4b3e3.entry.js} +1 -1
  147. package/dist/sankhyablocks/p-8b4d6719.js +1 -0
  148. package/dist/sankhyablocks/{p-e64958ba.entry.js → p-903fa0b4.entry.js} +1 -1
  149. package/dist/sankhyablocks/p-987cd79d.entry.js +1 -0
  150. package/dist/sankhyablocks/{p-88ed2793.js → p-9ab6ae1e.js} +2 -2
  151. package/dist/sankhyablocks/{p-c90f337a.entry.js → p-9f16d33e.entry.js} +1 -1
  152. package/dist/sankhyablocks/p-a1d23fef.js +1 -0
  153. package/dist/sankhyablocks/{p-bb0de89c.entry.js → p-a64ffe30.entry.js} +1 -1
  154. package/dist/sankhyablocks/p-aca74b21.js +1 -0
  155. package/dist/sankhyablocks/p-b7e891cc.entry.js +1 -0
  156. package/dist/sankhyablocks/{p-1d585081.js → p-b9699067.js} +1 -1
  157. package/dist/sankhyablocks/p-c98c79c3.entry.js +1 -0
  158. package/dist/sankhyablocks/p-d2ec9a24.entry.js +1 -0
  159. package/dist/sankhyablocks/{p-59b8f277.js → p-d3534985.js} +1 -1
  160. package/dist/sankhyablocks/{p-7b3ca294.entry.js → p-f3027bc9.entry.js} +1 -1
  161. package/dist/sankhyablocks/{p-f8f29e1a.entry.js → p-f35f2eb3.entry.js} +1 -1
  162. package/dist/sankhyablocks/p-fd05e31d.entry.js +1 -0
  163. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  164. package/dist/types/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.d.ts +5 -0
  165. package/dist/types/components/snk-application/snk-application.d.ts +9 -0
  166. package/dist/types/components/snk-crud/snk-crud.d.ts +22 -0
  167. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +23 -0
  168. package/dist/types/components/snk-custom-slot-guide/snk-custom-slot-guide.d.ts +16 -0
  169. package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +6 -1
  170. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +1 -1
  171. package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +2 -2
  172. package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +1 -1
  173. package/dist/types/components/snk-form-config/snk-form-config.d.ts +9 -2
  174. package/dist/types/components/snk-grid/snk-grid.d.ts +5 -0
  175. package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +2 -2
  176. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +8 -0
  177. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +12 -4
  178. package/dist/types/components.d.ts +105 -0
  179. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
  180. package/package.json +1 -1
  181. package/react/components.d.ts +1 -0
  182. package/react/components.js +1 -0
  183. package/react/components.js.map +1 -1
  184. package/dist/sankhyablocks/p-0cf9aa38.js +0 -1
  185. package/dist/sankhyablocks/p-1649f51e.entry.js +0 -1
  186. package/dist/sankhyablocks/p-2c86cfab.entry.js +0 -1
  187. package/dist/sankhyablocks/p-4759912d.entry.js +0 -1
  188. package/dist/sankhyablocks/p-56948f00.entry.js +0 -11
  189. package/dist/sankhyablocks/p-8f73da95.js +0 -1
  190. package/dist/sankhyablocks/p-95c71f5e.entry.js +0 -1
  191. package/dist/sankhyablocks/p-9fe91526.js +0 -1
  192. package/dist/sankhyablocks/p-a5108625.entry.js +0 -1
  193. package/dist/sankhyablocks/p-aae4258d.entry.js +0 -1
  194. package/dist/sankhyablocks/p-af9d79e0.entry.js +0 -1
  195. package/dist/sankhyablocks/p-f25c50f7.entry.js +0 -1
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-1cf293c1.js');
6
+
7
+ const snkCustomSlotGuideCss = ".sc-snk-custom-slot-guide-h{display:none}";
8
+
9
+ const SnkCustomSlotGuide = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.snkCustomSlotGuideLoaded = index.createEvent(this, "snkCustomSlotGuideLoaded", 7);
13
+ this.slotName = 'CUSTOM_SLOT_GUIDE';
14
+ }
15
+ onGuideChange(evt) {
16
+ const guideName = evt.detail;
17
+ if (guideName === this.slotName) {
18
+ this._element.style.setProperty('display', 'block');
19
+ }
20
+ else {
21
+ this._element.style.setProperty('display', 'none');
22
+ }
23
+ }
24
+ onFormConfigVisibilityChange(evt) {
25
+ const isFormConfigVisible = evt.detail;
26
+ if (isFormConfigVisible) {
27
+ this._element.style.setProperty('display', 'none');
28
+ }
29
+ }
30
+ componentDidLoad() {
31
+ this.snkCustomSlotGuideLoaded.emit(this.slotName);
32
+ }
33
+ render() {
34
+ return (index.h(index.Host, { slot: this.slotName, id: this.slotName, class: "custom-slot-guide-container" }, index.h("slot", null)));
35
+ }
36
+ get _element() { return index.getElement(this); }
37
+ };
38
+ SnkCustomSlotGuide.style = snkCustomSlotGuideCss;
39
+
40
+ exports.snk_custom_slot_guide = SnkCustomSlotGuide;
@@ -8,14 +8,14 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const IFetchDataExporterParams = require('./IFetchDataExporterParams-e78ec415.js');
9
9
  const index = require('./index-e3e39724.js');
10
10
  const constants = require('./constants-6d82e405.js');
11
- const DataFetcher = require('./DataFetcher-eeb3b0b7.js');
12
- const snkDataUnit = require('./snk-data-unit-de248308.js');
13
- require('./ISave-861e9d6d.js');
11
+ const DataFetcher = require('./DataFetcher-5181a917.js');
12
+ const snkDataUnit = require('./snk-data-unit-061487a8.js');
13
+ require('./ISave-0f98a457.js');
14
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
15
15
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
16
- require('./dataunit-fetcher-1cea0695.js');
16
+ require('./dataunit-fetcher-1ba5e2cc.js');
17
17
  require('./filter-item-type.enum-a7ffdaa6.js');
18
- require('./form-config-fetcher-f347f884.js');
18
+ require('./form-config-fetcher-4a679e23.js');
19
19
  require('./PrintUtils-bcaeb82f.js');
20
20
  require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
21
21
  require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
@@ -3,8 +3,8 @@
3
3
  const index = require('./index-1cf293c1.js');
4
4
  const core = require('@sankhyalabs/core');
5
5
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
6
- const DataFetcher = require('./DataFetcher-eeb3b0b7.js');
7
- const dataunitFetcher = require('./dataunit-fetcher-1cea0695.js');
6
+ const DataFetcher = require('./DataFetcher-5181a917.js');
7
+ const dataunitFetcher = require('./dataunit-fetcher-1ba5e2cc.js');
8
8
  const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
9
9
  const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
10
10
 
@@ -616,6 +616,8 @@ const SnkDataUnit = class {
616
616
  return records;
617
617
  const parentSelectedRecord = parentDataUnit.getSelectedRecord();
618
618
  const selfInfo = parentDataUnit === null || parentDataUnit === void 0 ? void 0 : parentDataUnit.getChildInfo(this.getCleanDataUnitName());
619
+ if (!selfInfo)
620
+ return records;
619
621
  const { links } = selfInfo;
620
622
  if (!links || links.length === 0)
621
623
  return records;
@@ -2,14 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkDataUnit = require('./snk-data-unit-de248308.js');
5
+ const snkDataUnit = require('./snk-data-unit-061487a8.js');
6
6
  require('./index-1cf293c1.js');
7
7
  require('@sankhyalabs/core');
8
8
  require('@sankhyalabs/ezui/dist/collection/utils');
9
- require('./DataFetcher-eeb3b0b7.js');
9
+ require('./DataFetcher-5181a917.js');
10
10
  require('./PrintUtils-bcaeb82f.js');
11
11
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
12
- require('./dataunit-fetcher-1cea0695.js');
12
+ require('./dataunit-fetcher-1ba5e2cc.js');
13
13
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
14
14
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
15
15
  require('@sankhyalabs/core/dist/utils/SortingUtils');
@@ -4,21 +4,21 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1cf293c1.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const SnkFormConfigManager = require('./SnkFormConfigManager-8d4fded8.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-1907ffed.js');
8
8
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
9
- const DataFetcher = require('./DataFetcher-eeb3b0b7.js');
10
- require('./ISave-861e9d6d.js');
9
+ const DataFetcher = require('./DataFetcher-5181a917.js');
10
+ require('./ISave-0f98a457.js');
11
11
  const index$1 = require('./index-e3e39724.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
- require('./dataunit-fetcher-1cea0695.js');
14
+ require('./dataunit-fetcher-1ba5e2cc.js');
15
15
  require('./filter-item-type.enum-a7ffdaa6.js');
16
- require('./form-config-fetcher-f347f884.js');
16
+ require('./form-config-fetcher-4a679e23.js');
17
17
  const constants = require('./constants-6d82e405.js');
18
18
  const taskbarElements = require('./taskbar-elements-fb5d1e08.js');
19
- const snkGuidesViewer = require('./snk-guides-viewer-4ec3e7e1.js');
19
+ const snkGuidesViewer = require('./snk-guides-viewer-2efe60a7.js');
20
20
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
21
- require('./ConfigStorage-5a73e979.js');
21
+ require('./ConfigStorage-5c0590b3.js');
22
22
  require('./PrintUtils-bcaeb82f.js');
23
23
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
24
24
  require('@sankhyalabs/core/dist/utils/SortingUtils');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index$1 = require('./index-1cf293c1.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-5a73e979.js');
8
+ const ConfigStorage = require('./ConfigStorage-5c0590b3.js');
9
9
  const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-7259cf65.js');
10
10
  const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
11
11
  const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
@@ -16,8 +16,8 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
16
16
  const defaultFilters = require('./default-filters-a09bf82b.js');
17
17
  const filterType_enum = require('./filter-type.enum-2bb46d2a.js');
18
18
  const filterValidate = require('./filter-validate-cb4ed41a.js');
19
- require('./form-config-fetcher-f347f884.js');
20
- require('./DataFetcher-eeb3b0b7.js');
19
+ require('./form-config-fetcher-4a679e23.js');
20
+ require('./DataFetcher-5181a917.js');
21
21
  require('./PrintUtils-bcaeb82f.js');
22
22
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
23
23
 
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1cf293c1.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const ConfigStorage = require('./ConfigStorage-5a73e979.js');
7
+ const ConfigStorage = require('./ConfigStorage-5c0590b3.js');
8
8
  const presentationMode = require('./presentationMode-52ec3bdd.js');
9
9
  const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
10
10
  const filterType_enum = require('./filter-type.enum-2bb46d2a.js');
11
- require('./form-config-fetcher-f347f884.js');
12
- require('./DataFetcher-eeb3b0b7.js');
11
+ require('./form-config-fetcher-4a679e23.js');
12
+ require('./DataFetcher-5181a917.js');
13
13
  require('./PrintUtils-bcaeb82f.js');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
15
 
@@ -17,7 +17,7 @@ const SnkFormView = class {
17
17
  this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
18
18
  this._customEditors = new Map();
19
19
  this._fieldProps = new Map();
20
- this._singleColumn = true;
20
+ this._singleColumn = false;
21
21
  this.levelPath = undefined;
22
22
  this.fieldSearch = undefined;
23
23
  this.label = undefined;
@@ -155,11 +155,7 @@ const SnkFormView = class {
155
155
  }
156
156
  }
157
157
  setSingleColumn(layoutFormConfig) {
158
- if (!(layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config)) {
159
- this._singleColumn = true;
160
- return;
161
- }
162
- this._singleColumn = (layoutFormConfig.config === utils.FormLayout.CASCADE);
158
+ this._singleColumn = (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === utils.FormLayout.CASCADE;
163
159
  }
164
160
  registerNotifyListeners(layoutFormConfig) {
165
161
  if (!layoutFormConfig)
@@ -4,15 +4,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1cf293c1.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const SnkFormConfigManager = require('./SnkFormConfigManager-8d4fded8.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-1907ffed.js');
8
8
  const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
9
9
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
10
- const FormConfigHelper = require('./FormConfigHelper-ebb77625.js');
11
- const constants = require('./constants-6d82e405.js');
12
10
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
13
- const formConfigFetcher = require('./form-config-fetcher-f347f884.js');
14
- require('./ConfigStorage-5a73e979.js');
15
- require('./DataFetcher-eeb3b0b7.js');
11
+ const formConfigFetcher = require('./form-config-fetcher-4a679e23.js');
12
+ const constants = require('./constants-6d82e405.js');
13
+ const FormConfigHelper = require('./FormConfigHelper-28fe4668.js');
14
+ require('./ConfigStorage-5c0590b3.js');
15
+ require('./DataFetcher-5181a917.js');
16
16
  require('./PrintUtils-bcaeb82f.js');
17
17
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
18
18
  require('./filter-item-type.enum-a7ffdaa6.js');
@@ -192,6 +192,7 @@ const SnkFormConfig = class {
192
192
  this.configManager = undefined;
193
193
  this.ignoreReadOnlyFormFields = undefined;
194
194
  this.messagesBuilder = undefined;
195
+ this.customGuidesConfig = [];
195
196
  }
196
197
  handleFieldConfigChanged() {
197
198
  this.hasChanges = true;
@@ -211,6 +212,10 @@ const SnkFormConfig = class {
211
212
  this.showNoGuideSelectedDialog();
212
213
  return;
213
214
  }
215
+ if (this.selectedGuide.isCustom || this.selectedGuide.isDetail) {
216
+ this.showCanNotAddFieldToGuideDialog();
217
+ return;
218
+ }
214
219
  this.availableFields = [...this.availableFields.filter(f => f.name !== fieldItem.name)];
215
220
  await ((_a = this.refFieldsLayout) === null || _a === void 0 ? void 0 : _a.addFieldToLayout(fieldItem));
216
221
  }
@@ -236,6 +241,11 @@ const SnkFormConfig = class {
236
241
  const message = this.getMessage('snkFormConfig.noGuideSelected.message');
237
242
  utils.ApplicationUtils.alert(title, message);
238
243
  }
244
+ showCanNotAddFieldToGuideDialog() {
245
+ const title = this.getMessage('snkFormConfig.canNotAddFieldToGuide.title');
246
+ const message = this.getMessage('snkFormConfig.canNotAddFieldToGuide.message');
247
+ utils.ApplicationUtils.alert(title, message);
248
+ }
239
249
  /**
240
250
  * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
241
251
  * através de um pequeno modulo na estrutura da aplicação:
@@ -253,8 +263,8 @@ const SnkFormConfig = class {
253
263
  this.configOptions = userConfig;
254
264
  const isDefault = this._formConfig != undefined ? this._formConfig.defaultConfiguration : true;
255
265
  const origin = (isDefault ? formConfigFetcher.UserConfigType.DEFAULT : formConfigFetcher.UserConfigType.USER);
256
- this.configSelected = userConfig.find((config) => config.origin === origin);
257
- this.originalConfigSelected = userConfig.find((config) => config.origin === origin);
266
+ this.configSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
267
+ this.originalConfigSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
258
268
  }
259
269
  catch (error) {
260
270
  console.error(this.getMessage('snkFormConfig.errors.failFetchUserConfig'));
@@ -307,9 +317,22 @@ const SnkFormConfig = class {
307
317
  return fieldVisible === true && hasCfg === false;
308
318
  });
309
319
  }
320
+ getInitialOrder(guidesList) {
321
+ var _a, _b;
322
+ if (Array.isArray((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.tabs)) {
323
+ return (_b = this._formConfig.tabs) === null || _b === void 0 ? void 0 : _b.length;
324
+ }
325
+ if (guidesList.length > 0) {
326
+ return Math.max(...guidesList.map(g => g.order));
327
+ }
328
+ return 0;
329
+ }
310
330
  loadGuides() {
311
331
  var _a;
312
- this.guidesList = [...FormConfigHelper.buildGuides(this._formConfig, this.getMessage('snkFormConfig.form.mainArea'))];
332
+ this.guidesList = [];
333
+ this.guidesList.push(...FormConfigHelper.buildGuides(this._formConfig, this.getMessage('snkFormConfig.form.mainArea')));
334
+ this.guidesList.push(...FormConfigHelper.buildChildrenGuides(this.dataUnit, this.getInitialOrder(this.guidesList), this.guidesList));
335
+ this.guidesList.push(...FormConfigHelper.buildCustomGuides(this.customGuidesConfig, this.guidesList));
313
336
  this.guidesMap = FormConfigHelper.buildGuidesMap((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields, this.guidesList, this.dataUnit, this.getMessage('snkFormConfig.form.tabGeneral'));
314
337
  }
315
338
  getConfig() {
@@ -6,17 +6,17 @@ const index = require('./index-1cf293c1.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
8
8
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
9
- require('./DataFetcher-eeb3b0b7.js');
10
- require('./ISave-861e9d6d.js');
11
- const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-3b93f6a6.js');
9
+ require('./DataFetcher-5181a917.js');
10
+ require('./ISave-0f98a457.js');
11
+ const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-e4e38139.js');
12
12
  const index$1 = require('./index-e3e39724.js');
13
13
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
- require('./dataunit-fetcher-1cea0695.js');
15
+ require('./dataunit-fetcher-1ba5e2cc.js');
16
16
  require('./filter-item-type.enum-a7ffdaa6.js');
17
- require('./form-config-fetcher-f347f884.js');
17
+ require('./form-config-fetcher-4a679e23.js');
18
18
  require('./constants-6d82e405.js');
19
- const ConfigStorage = require('./ConfigStorage-5a73e979.js');
19
+ const ConfigStorage = require('./ConfigStorage-5c0590b3.js');
20
20
  const index$2 = require('./index-13d05f03.js');
21
21
  const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
22
22
  const filterValidate = require('./filter-validate-cb4ed41a.js');
@@ -83,7 +83,7 @@ class ServerSideExporterProvider extends SnkMultiSelectionListDataSource.Commons
83
83
  }
84
84
  }
85
85
 
86
- const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding);outline:none}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";
86
+ const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding);outline:none;--snk-grid-header--min-height:40px}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:flex-start;min-height:var(--snk-grid-header--min-height)}.snk-grid__filter-bar.sc-snk-grid{width:100%;display:flex;align-items:flex-start}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium);margin-top:var(--space--small);align-self:stretch}.snk-grid__header.sc-snk-grid snk-taskbar.sc-snk-grid{display:flex;align-items:flex-start;min-height:var(--snk-grid-header--min-height)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";
87
87
 
88
88
  const SnkGrid = class {
89
89
  constructor(hostRef) {
@@ -130,6 +130,7 @@ const SnkGrid = class {
130
130
  this._popUpGridConfig = false;
131
131
  this._showSnkFilterBar = true;
132
132
  this._enableContinuousInsert = false;
133
+ this._filterMode = 'regular';
133
134
  this.columnFilterDataSource = new SnkMultiSelectionListDataSource.SnkMultiSelectionListDataSource();
134
135
  this.enableLockManagerLoadingComp = false;
135
136
  this.enableLockManagerTaskbarClick = false;
@@ -149,6 +150,7 @@ const SnkGrid = class {
149
150
  this.canEdit = true;
150
151
  this.taskbarCustomContainerId = undefined;
151
152
  this.gridHeaderCustomSlotId = 'GRID_HEADER_CUSTOM_ELEMENTS';
153
+ this.gridHeaderDynamicSearchSlotId = 'GRID_HEADER_DYNAMIC_SEARCH';
152
154
  this.topTaskbarCustomSlotId = 'GRID_TASKBAR_CUSTOM_ELEMENTS';
153
155
  this.disablePersonalizedFilter = undefined;
154
156
  this.gridLegacyConfigName = undefined;
@@ -647,7 +649,8 @@ const SnkGrid = class {
647
649
  return;
648
650
  }
649
651
  if (filterConfig.length === 1 && filterConfig[0].id === 'PERSONALIZED_FILTER_GROUP') {
650
- this._showSnkFilterBar = filterConfig[0].groupedItems.length > 0;
652
+ this._showSnkFilterBar = true;
653
+ this._filterMode = filterConfig[0].groupedItems.length > 0 ? 'regular' : 'button';
651
654
  return;
652
655
  }
653
656
  this._showSnkFilterBar = true;
@@ -665,9 +668,9 @@ const SnkGrid = class {
665
668
  return undefined;
666
669
  }
667
670
  return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline", tabindex: "0" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
668
- index.h(index.Fragment, null, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, filterCustomConfig: this.filterCustomConfig, filterCustomConfigInterceptor: this.filterCustomConfigInterceptor }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.h("snk-taskbar", { class: "ez-padding-left--medium ez-padding-top--extra-small", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none', actionsSettingsList: this.getActionsSettingsList() }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? 'snk-grid-container__without-shadow ' : '') + 'snk-grid__table', "data-element-id": "embedded", dataUnit: this._dataUnit, key: 'grid-' + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => {
671
+ index.h(index.Fragment, null, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, filterCustomConfig: this.filterCustomConfig, filterCustomConfigInterceptor: this.filterCustomConfigInterceptor, mode: this._filterMode }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.h("snk-taskbar", { class: "ez-padding-left--medium ez-padding-top--extra-small", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none', actionsSettingsList: this.getActionsSettingsList() }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? 'snk-grid-container__without-shadow ' : '') + 'snk-grid__table', "data-element-id": "embedded", dataUnit: this._dataUnit, key: 'grid-' + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => {
669
672
  this.gridConfigChangeHandler(evt);
670
- }, onEzColumnFilterChanged: async () => await this.dataExporterProviderStore(), onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, useSearchColumn: this.useSearchColumn, suppressHorizontalScroll: this.suppressHorizontalScroll, paginationCounterMode: this.paginationCounterMode, suppressCheckboxColumn: this.suppressCheckboxColumn, suppressFilterColumn: this.suppressFilterColumn, compact: this.compact }, index.h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId, actionsSettingsList: this.getActionsSettingsList() }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._popUpGridConfig, onEzClosePopup: () => 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.resourceID }))));
673
+ }, onEzColumnFilterChanged: async () => await this.dataExporterProviderStore(), onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, useSearchColumn: this.useSearchColumn, suppressHorizontalScroll: this.suppressHorizontalScroll, paginationCounterMode: this.paginationCounterMode, suppressCheckboxColumn: this.suppressCheckboxColumn, suppressFilterColumn: this.suppressFilterColumn, compact: this.compact }, index.h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId, additionalSlotId: this.gridHeaderDynamicSearchSlotId, actionsSettingsList: this.getActionsSettingsList() }, index.h("slot", { name: this.gridHeaderCustomSlotId }), index.h("slot", { name: this.gridHeaderDynamicSearchSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._popUpGridConfig, onEzClosePopup: () => 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.resourceID }))));
671
674
  }
672
675
  get _element() { return index.getElement(this); }
673
676
  static get watchers() { return {
@@ -5,16 +5,16 @@ const core = require('@sankhyalabs/core');
5
5
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
6
6
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
7
7
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
8
- require('./DataFetcher-eeb3b0b7.js');
9
- require('./ISave-861e9d6d.js');
8
+ require('./DataFetcher-5181a917.js');
9
+ require('./ISave-0f98a457.js');
10
10
  const index$1 = require('./index-e3e39724.js');
11
11
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
12
12
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
13
- require('./dataunit-fetcher-1cea0695.js');
13
+ require('./dataunit-fetcher-1ba5e2cc.js');
14
14
  require('./filter-item-type.enum-a7ffdaa6.js');
15
- require('./form-config-fetcher-f347f884.js');
15
+ require('./form-config-fetcher-4a679e23.js');
16
16
  const constants = require('./constants-6d82e405.js');
17
- const SnkFormConfigManager = require('./SnkFormConfigManager-8d4fded8.js');
17
+ const SnkFormConfigManager = require('./SnkFormConfigManager-1907ffed.js');
18
18
  const taskbarElements = require('./taskbar-elements-fb5d1e08.js');
19
19
  const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
20
20
 
@@ -24,7 +24,9 @@ const FORM_NAME_PREFIX = "__FORM:";
24
24
  const SnkGuidesViewer = class {
25
25
  constructor(hostRef) {
26
26
  index.registerInstance(this, hostRef);
27
+ this.snkShowGuide = index.createEvent(this, "snkShowGuide", 7);
27
28
  this.snkMasterFormConfigChange = index.createEvent(this, "snkMasterFormConfigChange", 7);
29
+ this.formConfigVisibilityChanged = index.createEvent(this, "formConfigVisibilityChanged", 7);
28
30
  this.exit = index.createEvent(this, "exit", 7);
29
31
  this.actionClick = index.createEvent(this, "actionClick", 7);
30
32
  this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
@@ -47,6 +49,7 @@ const SnkGuidesViewer = class {
47
49
  this.enableGridInsert = false;
48
50
  this.ignoreReadOnlyFormFields = undefined;
49
51
  this.getCustomTitle = undefined;
52
+ this.customGuidesConfig = [];
50
53
  this._hasToCreateFieldSearch = true;
51
54
  this._breadcrumbItems = [];
52
55
  this._guides = undefined;
@@ -61,6 +64,13 @@ const SnkGuidesViewer = class {
61
64
  observeDataUnit() {
62
65
  this.loadGuides(true);
63
66
  }
67
+ async observeFormConfigManager(value) {
68
+ const showFormConfig = !!value;
69
+ await this._viewStack.show(showFormConfig ?
70
+ GUIDES_VIEWER_VIEW_MODE.CONFIG :
71
+ GUIDES_VIEWER_VIEW_MODE.GUIDES);
72
+ this.formConfigVisibilityChanged.emit(showFormConfig);
73
+ }
64
74
  observeDataState(newValue, oldValue) {
65
75
  var _a, _b, _c, _d, _e, _f;
66
76
  const newRecordsIds = (_b = (_a = newValue === null || newValue === void 0 ? void 0 : newValue.selectionInfo) === null || _a === void 0 ? void 0 : _a.recordIds) !== null && _b !== void 0 ? _b : (_c = newValue === null || newValue === void 0 ? void 0 : newValue.selectedRecord) === null || _c === void 0 ? void 0 : _c['__record__id__'];
@@ -109,7 +119,8 @@ const SnkGuidesViewer = class {
109
119
  * Atribui o foco para o componente.
110
120
  */
111
121
  async setFocus() {
112
- this._container.focus();
122
+ var _a;
123
+ (_a = this._container) === null || _a === void 0 ? void 0 : _a.focus();
113
124
  }
114
125
  /**
115
126
  * Recarrega os guias baseada nos metadados atuais.
@@ -159,7 +170,7 @@ const SnkGuidesViewer = class {
159
170
  if (!this._configManager.isLoaded) {
160
171
  return;
161
172
  }
162
- this._masterFormMetadata = form.buildFormMetadata(this.masterFormConfig, this.dataUnit, true);
173
+ this._masterFormMetadata = form.buildFormMetadata(this.masterFormConfig, this.dataUnit, true, this.customGuidesConfig);
163
174
  const allSheets = this._masterFormMetadata.getAllSheets();
164
175
  const currentRecord = this.dataUnit.getSelectedRecord();
165
176
  const disableDetails = this.hasToDisableDetails(currentRecord);
@@ -170,6 +181,13 @@ const SnkGuidesViewer = class {
170
181
  item.tooltip = this.getMessage("snkCrud.detail.tooltip.needSingleSelection");
171
182
  item.disabled = true;
172
183
  }
184
+ if (sheet.isCustom && sheet.ctxProps) {
185
+ Object.entries(sheet.ctxProps).forEach(([key, value]) => {
186
+ if (value !== undefined) {
187
+ item[key] = value;
188
+ }
189
+ });
190
+ }
173
191
  guides.push(item);
174
192
  });
175
193
  this._guides = guides;
@@ -305,38 +323,52 @@ const SnkGuidesViewer = class {
305
323
  return `${this.entityPath}/${entityName}`;
306
324
  }
307
325
  getContent() {
308
- var _a, _b, _c, _d, _e;
309
326
  if (!this.selectedGuide) {
327
+ this.snkShowGuide.emit(undefined);
310
328
  return;
311
329
  }
312
330
  const guideId = this.selectedGuide.id;
313
- let content;
331
+ this.snkShowGuide.emit(guideId);
332
+ if (this.isCustomGuide(guideId)) {
333
+ return index.h("slot", { name: guideId });
334
+ }
314
335
  const levels = guideId.split("::");
315
336
  const currentLevel = levels.pop();
316
337
  const childEntityName = form.FormMetadata.getDetailName(currentLevel);
317
338
  let detailId = guideId;
318
- if (childEntityName || levels.length > 0) {
319
- let formName;
320
- let detailBranch;
321
- if (guideId.includes(FORM_NAME_PREFIX)) {
322
- [detailId, formName] = guideId.split(FORM_NAME_PREFIX);
323
- const pathSize = ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) || 0;
324
- detailBranch = pathSize > 1 ? this._breadcrumbItems[pathSize - 2] : this.selectedGuide;
325
- }
326
- else {
327
- detailBranch = this.selectedGuide;
328
- }
329
- content = this.wrapDetail(levels, index.h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders, presentationMode: this.presentationMode }));
339
+ if (this.isDetailGuide(childEntityName, levels)) {
340
+ return this.buildDetailGuideContent(guideId, detailId, levels, childEntityName);
341
+ }
342
+ return this.buildFormViewGuideContent(guideId);
343
+ }
344
+ buildFormViewGuideContent(cardId) {
345
+ var _a, _b, _c, _d;
346
+ const sheet = this._masterFormMetadata.getSheet(cardId);
347
+ if (!sheet)
348
+ return;
349
+ const cardConfig = (_b = (_a = this.masterFormConfig) === null || _a === void 0 ? void 0 : _a.cardsState) === null || _b === void 0 ? void 0 : _b.get(cardId);
350
+ return (index.h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_d = (_c = this.masterFormConfig) === null || _c === void 0 ? void 0 : _c.summary) === null || _d === void 0 ? void 0 : _d.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: cardId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps, fieldSearch: this._fieldSearch }, this.presentationMode == index$1.PresentationMode.SECONDARY && this.buildTaskBar()));
351
+ }
352
+ isDetailGuide(childEntityName, levels) {
353
+ return childEntityName || levels.length > 0;
354
+ }
355
+ buildDetailGuideContent(guideId, detailId, levels, childEntityName) {
356
+ var _a;
357
+ let formName;
358
+ let detailBranch;
359
+ if (guideId.includes(FORM_NAME_PREFIX)) {
360
+ [detailId, formName] = guideId.split(FORM_NAME_PREFIX);
361
+ const pathSize = ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) || 0;
362
+ detailBranch = pathSize > 1 ? this._breadcrumbItems[pathSize - 2] : this.selectedGuide;
330
363
  }
331
364
  else {
332
- const cardId = this.selectedGuide.id;
333
- const sheet = this._masterFormMetadata.getSheet(cardId);
334
- if (sheet) {
335
- const cardConfig = (_c = (_b = this.masterFormConfig) === null || _b === void 0 ? void 0 : _b.cardsState) === null || _c === void 0 ? void 0 : _c.get(cardId);
336
- content = index.h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: guideId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps, fieldSearch: this._fieldSearch }, this.presentationMode == index$1.PresentationMode.SECONDARY && this.buildTaskBar());
337
- }
365
+ detailBranch = this.selectedGuide;
338
366
  }
339
- return content;
367
+ return this.wrapDetail(levels, index.h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders, presentationMode: this.presentationMode }));
368
+ }
369
+ isCustomGuide(guideId) {
370
+ var _a;
371
+ return (_a = this.customGuidesConfig) === null || _a === void 0 ? void 0 : _a.map(g => g.id).includes(guideId);
340
372
  }
341
373
  onBreadcrumbClickHandler(item) {
342
374
  if ((item === null || item === void 0 ? void 0 : item.id) == undefined) {
@@ -474,7 +506,7 @@ const SnkGuidesViewer = class {
474
506
  }
475
507
  buildTaskBar() {
476
508
  var _a;
477
- return index.h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != index$1.PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, index.h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.getActionsList(), actionsSettingsList: this.getSettingsListForm(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? taskbarElements.TaskbarElement.SAVE : taskbarElements.TaskbarElement.INSERT, "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS", alignRigth: true }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
509
+ return index.h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != index$1.PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, index.h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.getActionsList(), actionsSettingsList: this.getSettingsListForm(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? taskbarElements.TaskbarElement.SAVE : taskbarElements.TaskbarElement.INSERT, "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS", additionalSlotId: "GUIDES_VIEWER_DYNAMIC_SEARCH", alignRigth: true }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GUIDES_VIEWER_DYNAMIC_SEARCH" })));
478
510
  }
479
511
  async dataUnitActionHandler(action) {
480
512
  var _a;
@@ -548,6 +580,9 @@ const SnkGuidesViewer = class {
548
580
  const labels = selectedRecords.map(record => this.messagesBuilder.getMessage("snkCrud.title", record));
549
581
  return `[${labels.join(", ")}]`;
550
582
  }
583
+ getCustomGuidesConfig() {
584
+ return this._currentDetail ? [] : this.customGuidesConfig;
585
+ }
551
586
  componentDidLoad() {
552
587
  this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
553
588
  this.initKeyboardManager();
@@ -564,17 +599,14 @@ const SnkGuidesViewer = class {
564
599
  await this._mainForm.showSearchField();
565
600
  }, { description: this.getMessage("snkSimpleCrud.findFields"), element: this._element });
566
601
  }
567
- render() {
568
- var _a, _b;
602
+ renderFormConfig() {
569
603
  if (this._formEditorConfigManager != undefined) {
570
- return (index.h("snk-form-config", { ref: ref => this._container = ref, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = null }));
604
+ return (index.h("snk-form-config", { ref: ref => this._container = ref, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = null, customGuidesConfig: this.getCustomGuidesConfig() }));
571
605
  }
572
- if (!this.dataUnit || !this._configManager.isLoaded) {
573
- return;
574
- }
575
- this.loadTaskbarProcessor();
576
- const showGuides = this._guides && (this._guides.length > 1);
577
- return (index.h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, index.h("div", { class: "ez-row snk-guides-viewer__header" }, index.h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, index.h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), index.h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, index.h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
606
+ }
607
+ renderGuidesNavigator(showGuides) {
608
+ var _a, _b;
609
+ return (index.h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabIndex: -1 }, index.h("div", { class: "ez-row snk-guides-viewer__header" }, index.h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, index.h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), index.h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, index.h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
578
610
  index.h("div", { class: "ez-margin-top--extra-small" }, index.h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != index$1.PresentationMode.SECONDARY && this.buildTaskBar()), index.h("div", { class: "snk-guides-viewer__container" }, showGuides ?
579
611
  index.h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
580
612
  :
@@ -590,9 +622,18 @@ const SnkGuidesViewer = class {
590
622
  fieldsProps: this._fieldsProps
591
623
  }), this.getContent())), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
592
624
  }
625
+ render() {
626
+ if (!this.dataUnit || !this._configManager.isLoaded) {
627
+ return;
628
+ }
629
+ this.loadTaskbarProcessor();
630
+ const showGuides = this._guides && (this._guides.length > 1);
631
+ return (index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "guides-viewer-stack" }, index.h("stack-item", null, this.renderGuidesNavigator(showGuides)), index.h("stack-item", null, this.renderFormConfig())));
632
+ }
593
633
  get _element() { return index.getElement(this); }
594
634
  static get watchers() { return {
595
635
  "dataUnit": ["observeDataUnit"],
636
+ "_formEditorConfigManager": ["observeFormConfigManager"],
596
637
  "dataState": ["observeDataState"],
597
638
  "masterFormConfig": ["observeMasterFormConfig"]
598
639
  }; }
@@ -603,6 +644,11 @@ var TASKBAR_ID;
603
644
  TASKBAR_ID["MUTIPLE_EDITION"] = "snkGuideViewer.multiple_edition";
604
645
  TASKBAR_ID["REGULAR"] = "snkGuideViewer.regular";
605
646
  })(TASKBAR_ID || (TASKBAR_ID = {}));
647
+ var GUIDES_VIEWER_VIEW_MODE;
648
+ (function (GUIDES_VIEWER_VIEW_MODE) {
649
+ GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["GUIDES"] = 0] = "GUIDES";
650
+ GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["CONFIG"] = 1] = "CONFIG";
651
+ })(GUIDES_VIEWER_VIEW_MODE || (GUIDES_VIEWER_VIEW_MODE = {}));
606
652
  SnkGuidesViewer.style = snkGuidesViewerCss;
607
653
 
608
654
  exports.SnkGuidesViewer = SnkGuidesViewer;