@sankhyalabs/sankhyablocks 10.1.0-dev.57 → 10.1.0-dev.59

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 (150) hide show
  1. package/dist/cjs/{ConfigStorage-a28eceb2.js → ConfigStorage-156bfcac.js} +2 -2
  2. package/dist/cjs/{DataFetcher-98d95e8f.js → DataFetcher-d13b4637.js} +12 -0
  3. package/dist/cjs/{ISave-a9815bb3.js → ISave-55d9dcc3.js} +1 -1
  4. package/dist/cjs/{SnkFormConfigManager-af47ba2f.js → SnkFormConfigManager-5cb9a39c.js} +2 -2
  5. package/dist/cjs/{SnkMultiSelectionListDataSource-13774e5f.js → SnkMultiSelectionListDataSource-5c5badfc.js} +5 -5
  6. package/dist/cjs/{auth-fetcher-9c257a1f.js → auth-fetcher-d1715459.js} +1 -1
  7. package/dist/cjs/{dataunit-fetcher-afc246d8.js → dataunit-fetcher-fae710c5.js} +1 -1
  8. package/dist/cjs/{form-config-fetcher-1ce4125c.js → form-config-fetcher-bbebdcb8.js} +1 -1
  9. package/dist/cjs/{index-e3e39724.js → index-bc950921.js} +6 -0
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -5
  12. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  13. package/dist/cjs/snk-actions-button_9.cjs.entry.js +9 -9
  14. package/dist/cjs/snk-application.cjs.entry.js +7 -7
  15. package/dist/cjs/snk-attach_11.cjs.entry.js +14 -12
  16. package/dist/cjs/snk-crud.cjs.entry.js +14 -10
  17. package/dist/cjs/snk-data-exporter.cjs.entry.js +59 -14
  18. package/dist/cjs/{snk-data-unit-ab570f87.js → snk-data-unit-32237a2d.js} +2 -2
  19. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  20. package/dist/cjs/snk-detail-view.cjs.entry.js +9 -9
  21. package/dist/cjs/snk-dynaform-detail-view_2.cjs.entry.js +33 -10
  22. package/dist/cjs/{snk-dynaform-guides-view-30ce5a8c.js → snk-dynaform-guides-view-2c7c6ce4.js} +389 -42
  23. package/dist/cjs/snk-dynaform-guides-view.cjs.entry.js +6 -6
  24. package/dist/cjs/snk-dynaform.cjs.entry.js +14 -10
  25. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +4 -4
  26. package/dist/cjs/snk-form_2.cjs.entry.js +4 -4
  27. package/dist/cjs/snk-grid.cjs.entry.js +8 -8
  28. package/dist/cjs/{snk-guides-viewer-2a55fa3a.js → snk-guides-viewer-67b9cca9.js} +2 -2
  29. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  30. package/dist/cjs/snk-layout-form-config.cjs.entry.js +5 -5
  31. package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -5
  32. package/dist/cjs/snk-taskbar.cjs.entry.js +2 -2
  33. package/dist/cjs/{taskbar-elements-80eddec8.js → taskbar-elements-25f800b3.js} +1 -1
  34. package/dist/cjs/{taskbarUtils-4ca4235e.js → taskbarUtils-99aaa01f.js} +11 -6
  35. package/dist/collection/components/snk-actions-button/snk-actions-button.js +3 -3
  36. package/dist/collection/components/snk-crud/snk-crud.css +9 -4
  37. package/dist/collection/components/snk-crud/snk-crud.js +5 -1
  38. package/dist/collection/components/snk-crud/utils/taskbarUtils.js +5 -0
  39. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +2 -2
  40. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +8 -4
  41. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +43 -2
  42. package/dist/collection/components/snk-dynaform/snk-dynaform.css +9 -4
  43. package/dist/collection/components/snk-dynaform/snk-dynaform.js +5 -1
  44. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.css +71 -1
  45. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.js +23 -0
  46. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.css +35 -1
  47. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.js +3 -1
  48. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.css +229 -6
  49. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.js +458 -38
  50. package/dist/collection/components/snk-dynaform-form-config/SnkFormConfigManager.js +8 -1
  51. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +1 -1
  52. package/dist/collection/lib/@types/index.js +6 -0
  53. package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +4 -0
  54. package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +4 -0
  55. package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +4 -0
  56. package/dist/components/ISave.js +6 -0
  57. package/dist/components/SnkMessageBuilder.js +12 -0
  58. package/dist/components/snk-actions-button2.js +3 -3
  59. package/dist/components/snk-crud.js +6 -2
  60. package/dist/components/snk-data-exporter2.js +53 -8
  61. package/dist/components/snk-dynaform-detail-view2.js +419 -41
  62. package/dist/components/snk-dynaform-form-view2.js +4 -2
  63. package/dist/components/snk-dynaform.js +6 -2
  64. package/dist/components/snk-filter-bar2.js +1 -1
  65. package/dist/components/taskbarUtils.js +5 -0
  66. package/dist/esm/{ConfigStorage-346d781d.js → ConfigStorage-0d1c0695.js} +2 -2
  67. package/dist/esm/{DataFetcher-7d8df5a2.js → DataFetcher-70de9419.js} +12 -0
  68. package/dist/esm/{ISave-2117075a.js → ISave-f5704813.js} +1 -1
  69. package/dist/esm/{SnkFormConfigManager-066d370b.js → SnkFormConfigManager-e7f05f79.js} +2 -2
  70. package/dist/esm/{SnkMultiSelectionListDataSource-7c5ffcd4.js → SnkMultiSelectionListDataSource-6ac291a9.js} +5 -5
  71. package/dist/esm/{auth-fetcher-5891e22c.js → auth-fetcher-e34880e5.js} +1 -1
  72. package/dist/esm/{dataunit-fetcher-5dcb0e89.js → dataunit-fetcher-d26e4a08.js} +1 -1
  73. package/dist/esm/{form-config-fetcher-8e2082f3.js → form-config-fetcher-98c42169.js} +1 -1
  74. package/dist/esm/{index-b40568ff.js → index-c6721886.js} +6 -0
  75. package/dist/esm/loader.js +1 -1
  76. package/dist/esm/pesquisa-grid_2.entry.js +5 -5
  77. package/dist/esm/sankhyablocks.js +1 -1
  78. package/dist/esm/snk-actions-button_9.entry.js +9 -9
  79. package/dist/esm/snk-application.entry.js +7 -7
  80. package/dist/esm/snk-attach_11.entry.js +14 -12
  81. package/dist/esm/snk-crud.entry.js +14 -10
  82. package/dist/esm/snk-data-exporter.entry.js +59 -14
  83. package/dist/esm/{snk-data-unit-f697345b.js → snk-data-unit-ff57ac90.js} +2 -2
  84. package/dist/esm/snk-data-unit.entry.js +3 -3
  85. package/dist/esm/snk-detail-view.entry.js +9 -9
  86. package/dist/esm/snk-dynaform-detail-view_2.entry.js +33 -10
  87. package/dist/esm/{snk-dynaform-guides-view-6aae38f7.js → snk-dynaform-guides-view-0dfbefc1.js} +390 -43
  88. package/dist/esm/snk-dynaform-guides-view.entry.js +6 -6
  89. package/dist/esm/snk-dynaform.entry.js +14 -10
  90. package/dist/esm/snk-filter-bar_4.entry.js +4 -4
  91. package/dist/esm/snk-form_2.entry.js +4 -4
  92. package/dist/esm/snk-grid.entry.js +8 -8
  93. package/dist/esm/{snk-guides-viewer-3ea7e312.js → snk-guides-viewer-31a0a23d.js} +2 -2
  94. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  95. package/dist/esm/snk-layout-form-config.entry.js +5 -5
  96. package/dist/esm/snk-pesquisa.entry.js +5 -5
  97. package/dist/esm/snk-taskbar.entry.js +2 -2
  98. package/dist/esm/{taskbar-elements-63651ca7.js → taskbar-elements-ba9d6889.js} +1 -1
  99. package/dist/esm/{taskbarUtils-a43e4bba.js → taskbarUtils-cb9db0d9.js} +11 -6
  100. package/dist/sankhyablocks/{p-3190ac29.js → p-097d75b3.js} +2 -2
  101. package/dist/sankhyablocks/{p-aa9d61fa.entry.js → p-12579574.entry.js} +1 -1
  102. package/dist/sankhyablocks/{p-741f1ad0.entry.js → p-1d31aec3.entry.js} +1 -1
  103. package/dist/sankhyablocks/{p-6f2de911.entry.js → p-250b273e.entry.js} +1 -1
  104. package/dist/sankhyablocks/p-2a83f20e.entry.js +1 -0
  105. package/dist/sankhyablocks/p-2c4f7fdd.entry.js +1 -0
  106. package/dist/sankhyablocks/{p-3072136e.js → p-2ec98523.js} +1 -1
  107. package/dist/sankhyablocks/{p-10d883b0.js → p-4dd574d6.js} +1 -1
  108. package/dist/sankhyablocks/{p-7827871d.entry.js → p-541c72ec.entry.js} +1 -1
  109. package/dist/sankhyablocks/p-5aeae67f.js +1 -0
  110. package/dist/sankhyablocks/p-5ef0e9a8.entry.js +1 -0
  111. package/dist/sankhyablocks/{p-9e97fabb.entry.js → p-6d3bcabf.entry.js} +1 -1
  112. package/dist/sankhyablocks/p-6f60df43.js +1 -0
  113. package/dist/sankhyablocks/{p-58e0f14b.entry.js → p-846d8f79.entry.js} +1 -1
  114. package/dist/sankhyablocks/{p-77f608bc.entry.js → p-885262ce.entry.js} +1 -1
  115. package/dist/sankhyablocks/{p-c1e168a2.js → p-8d1ef77a.js} +1 -1
  116. package/dist/sankhyablocks/{p-13f91e7e.js → p-8d81c8d3.js} +1 -1
  117. package/dist/sankhyablocks/{p-ee192f06.entry.js → p-8f5dd87d.entry.js} +1 -1
  118. package/dist/sankhyablocks/{p-c5889dae.js → p-90037547.js} +1 -1
  119. package/dist/sankhyablocks/p-9e02a785.js +1 -0
  120. package/dist/sankhyablocks/{p-5a8390f9.entry.js → p-a25ab2ff.entry.js} +1 -1
  121. package/dist/sankhyablocks/p-a696bbcd.entry.js +1 -0
  122. package/dist/sankhyablocks/{p-b3762105.entry.js → p-a9012341.entry.js} +1 -1
  123. package/dist/sankhyablocks/p-abcb646d.js +1 -0
  124. package/dist/sankhyablocks/{p-733eba69.js → p-bd2a845c.js} +1 -1
  125. package/dist/sankhyablocks/p-bfce617e.entry.js +1 -0
  126. package/dist/sankhyablocks/{p-3630a5ae.entry.js → p-c4b34e2b.entry.js} +1 -1
  127. package/dist/sankhyablocks/{p-8d513b64.js → p-c9440c8a.js} +1 -1
  128. package/dist/sankhyablocks/p-cd153f71.entry.js +1 -0
  129. package/dist/sankhyablocks/{p-e91bd00e.js → p-eac48627.js} +1 -1
  130. package/dist/sankhyablocks/{p-d7657667.js → p-ec7c87bb.js} +1 -1
  131. package/dist/sankhyablocks/p-fb6e3c65.entry.js +1 -0
  132. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  133. package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +16 -0
  134. package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.d.ts +11 -0
  135. package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.d.ts +1 -0
  136. package/dist/types/components.d.ts +32 -0
  137. package/dist/types/lib/@types/index.d.ts +6 -0
  138. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +2 -0
  139. package/package.json +1 -1
  140. package/dist/sankhyablocks/p-0f3698af.js +0 -1
  141. package/dist/sankhyablocks/p-1bc6849e.js +0 -1
  142. package/dist/sankhyablocks/p-2c65dc01.entry.js +0 -1
  143. package/dist/sankhyablocks/p-3cc67d50.entry.js +0 -1
  144. package/dist/sankhyablocks/p-4a53fbeb.entry.js +0 -1
  145. package/dist/sankhyablocks/p-7e63af25.entry.js +0 -1
  146. package/dist/sankhyablocks/p-a8a93568.entry.js +0 -1
  147. package/dist/sankhyablocks/p-acd3adf9.entry.js +0 -1
  148. package/dist/sankhyablocks/p-c3bc693a.js +0 -1
  149. package/dist/sankhyablocks/p-c6b6567f.entry.js +0 -1
  150. package/dist/sankhyablocks/p-ed1b1b14.js +0 -1
@@ -5,8 +5,12 @@ import { Fragment, h } from '@stencil/core';
5
5
  import { TAB_NAMES, VIEW_MODE } from '../../../../lib/utils/constants';
6
6
  import { SnkFormConfigManager } from '../../../snk-dynaform-form-config/SnkFormConfigManager';
7
7
  import { TaskbarElement } from '../../../snk-taskbar/elements/taskbar-elements';
8
+ /** Tamanho inicial (px) do painel master no split; ajustável arrastando o divisor. */
9
+ const MASTER_INITIAL_SIZE = "300px";
8
10
  export class SnkDynaformGuidesViewer {
9
11
  constructor() {
12
+ /** Refs das abas de detalhe já montadas, por id de guia. */
13
+ this._detailRefs = new Map();
10
14
  this.dataUnit = undefined;
11
15
  this.dataState = undefined;
12
16
  this.configName = undefined;
@@ -37,25 +41,87 @@ export class SnkDynaformGuidesViewer {
37
41
  this._mainFormName = undefined;
38
42
  this._errorTabs = new Set();
39
43
  this._hasToCreateFieldSearch = true;
44
+ this.collapsibleMaster = true;
45
+ this.masterSummaryFieldCount = 12;
46
+ this.masterCollapseThreshold = 700;
47
+ this.maxOpenedGuides = 4;
48
+ this._masterCollapsed = false;
49
+ this._hostTight = false;
50
+ this._visibleSummaryCount = Number.MAX_SAFE_INTEGER;
51
+ this._openedGuideIds = [];
52
+ }
53
+ /** Aba de detalhe atualmente selecionada (derivada do mapa de refs). */
54
+ get _currentDetail() {
55
+ var _a;
56
+ const id = (_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id;
57
+ return id ? this._detailRefs.get(id) : undefined;
40
58
  }
41
59
  observeDataUnit() {
42
60
  this.loadGuides(true);
43
61
  }
44
- async observeFormConfigManager(value) {
45
- var _a, _b;
46
- const showFormConfig = !!value;
47
- await ((_a = this._viewStack) === null || _a === void 0 ? void 0 : _a.show(showFormConfig ?
48
- GUIDES_VIEWER_VIEW_MODE.CONFIG :
49
- GUIDES_VIEWER_VIEW_MODE.GUIDES));
50
- (_b = this.formConfigVisibilityChanged) === null || _b === void 0 ? void 0 : _b.emit(showFormConfig);
62
+ observeSelectedGuide(newGuide) {
63
+ const id = newGuide === null || newGuide === void 0 ? void 0 : newGuide.id;
64
+ if (!id) {
65
+ return;
66
+ }
67
+ if (!this._openedGuideIds.includes(id)) {
68
+ this._openedGuideIds = [...this._openedGuideIds, id];
69
+ }
70
+ this.enforceOpenedGuidesCap(id);
71
+ }
72
+ /**
73
+ * Aplica o teto `maxOpenedGuides` mantendo a ordem de inserção (não reordena
74
+ * — reordenar moveria os nós no DOM e remontaria as abas sobreviventes,
75
+ * anulando o cache). Retém a aba ativa + as inseridas mais recentemente;
76
+ * desmonta as mais antigas e limpa seus refs. `<= 0` desliga o teto.
77
+ */
78
+ enforceOpenedGuidesCap(activeId) {
79
+ const cap = this.maxOpenedGuides;
80
+ if (cap <= 0 || this._openedGuideIds.length <= cap) {
81
+ return;
82
+ }
83
+ // Marca p/ manter: a ativa + as mais recentes (varrendo do fim), até o teto.
84
+ const keep = new Set([activeId]);
85
+ for (let i = this._openedGuideIds.length - 1; i >= 0 && keep.size < cap; i--) {
86
+ keep.add(this._openedGuideIds[i]);
87
+ }
88
+ this._openedGuideIds.forEach(gid => {
89
+ if (!keep.has(gid)) {
90
+ this._detailRefs.delete(gid);
91
+ }
92
+ });
93
+ this._openedGuideIds = this._openedGuideIds.filter(gid => keep.has(gid));
94
+ }
95
+ /**
96
+ * Ao recolher/expandir, o master permanece montado; só muda o tamanho do
97
+ * seu painel (auto quando recolhido, {@link MASTER_INITIAL_SIZE} quando
98
+ * expandido). Reconstrói o split para aplicar o novo template.
99
+ */
100
+ observeMasterCollapsed() {
101
+ if (typeof requestAnimationFrame !== 'undefined') {
102
+ requestAnimationFrame(() => { var _a; return (_a = this._splitPanel) === null || _a === void 0 ? void 0 : _a.rebuildLayout(); });
103
+ }
104
+ }
105
+ observeFormConfigManager(value) {
106
+ var _a;
107
+ (_a = this.formConfigVisibilityChanged) === null || _a === void 0 ? void 0 : _a.emit(!!value);
51
108
  }
52
109
  observeDataState(newValue, oldValue) {
53
110
  var _a, _b, _c, _d, _e, _f;
54
111
  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__'];
55
112
  const oldRecordsIds = (_e = (_d = oldValue === null || oldValue === void 0 ? void 0 : oldValue.selectionInfo) === null || _d === void 0 ? void 0 : _d.recordIds) !== null && _e !== void 0 ? _e : (_f = oldValue === null || oldValue === void 0 ? void 0 : oldValue.selectedRecord) === null || _f === void 0 ? void 0 : _f['__record__id__'];
56
113
  if (!ObjectUtils.equals(newRecordsIds, oldRecordsIds)) {
114
+ if ((newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode) && !(oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode)) {
115
+ this._manualOverride = undefined;
116
+ }
57
117
  this.loadGuides((oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) != (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode));
58
118
  }
119
+ else if ((oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) !== (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode)) {
120
+ if (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode) {
121
+ this._manualOverride = undefined;
122
+ }
123
+ this.recomputeMasterCollapse();
124
+ }
59
125
  }
60
126
  observeMasterFormConfig() {
61
127
  var _a;
@@ -106,6 +172,7 @@ export class SnkDynaformGuidesViewer {
106
172
  * Recarrega os guias baseada nos metadados atuais.
107
173
  */
108
174
  async reloadGuides() {
175
+ this._manualOverride = undefined;
109
176
  this.loadGuides(false);
110
177
  }
111
178
  exitViewer() {
@@ -192,11 +259,24 @@ export class SnkDynaformGuidesViewer {
192
259
  });
193
260
  this._mainFormName = mainFormName;
194
261
  this._guides = guides;
262
+ this.pruneOpenedGuides();
195
263
  const currentStillExists = this.selectedGuide
196
264
  && this._guides.some(g => g.id === this.selectedGuide.id);
197
265
  if (changeSelection || !currentStillExists) {
198
266
  this.selectedGuide = this._guides && this._guides.length > 0 ? this._guides[0] : undefined;
199
267
  }
268
+ this.recomputeMasterCollapse();
269
+ }
270
+ /** Remove das guias abertas (e dos refs) ids que não existem mais. */
271
+ pruneOpenedGuides() {
272
+ const validIds = new Set(this._guides.map(g => g.id));
273
+ const filtered = this._openedGuideIds.filter(id => validIds.has(id));
274
+ if (filtered.length !== this._openedGuideIds.length) {
275
+ this._openedGuideIds = filtered;
276
+ }
277
+ Array.from(this._detailRefs.keys())
278
+ .filter(id => !validIds.has(id))
279
+ .forEach(id => this._detailRefs.delete(id));
200
280
  }
201
281
  hasToDisableDetails(currentRecord) {
202
282
  return !currentRecord
@@ -208,14 +288,18 @@ export class SnkDynaformGuidesViewer {
208
288
  return FormMetadata.getDetailName(formId) != undefined;
209
289
  }
210
290
  buildTabItems() {
211
- return this._guides.map((guide, index) => ({
212
- tabKey: guide.id,
213
- label: guide.label,
214
- index,
215
- disabled: guide.disabled,
216
- rightIcon: this._errorTabs.has(guide.id) ? 'alert-circle-inverted' : undefined,
217
- leftIcon: this.getTabLeftIcon(guide),
218
- }));
291
+ return this._guides.map((guide, index) => {
292
+ const hasError = this._errorTabs.has(guide.id);
293
+ return {
294
+ tabKey: guide.id,
295
+ label: guide.label,
296
+ index,
297
+ disabled: guide.disabled,
298
+ rightIcon: hasError ? 'alert-circle-inverted' : undefined,
299
+ rightIconError: hasError,
300
+ leftIcon: this.getTabLeftIcon(guide),
301
+ };
302
+ });
219
303
  }
220
304
  getTabLeftIcon(guide) {
221
305
  var _a, _b;
@@ -243,6 +327,7 @@ export class SnkDynaformGuidesViewer {
243
327
  return;
244
328
  }
245
329
  this.selectedGuide = targetGuide;
330
+ this.recomputeMasterCollapse();
246
331
  }
247
332
  static updateContentCard(formName, cardConfig, propertyChanged, configManager) {
248
333
  return configManager.saveCardState(formName, cardConfig, propertyChanged);
@@ -281,12 +366,38 @@ export class SnkDynaformGuidesViewer {
281
366
  return h("snk-dynaform-form-view", { label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); }, customEditors: params.propsCustomEditor, fieldsProps: params.fieldsProps, entityPath: params.entityPath });
282
367
  })));
283
368
  }
284
- getContent() {
285
- var _a;
369
+ /**
370
+ * Renderiza o conteúdo de TODAS as guias já abertas, mantendo-as montadas.
371
+ * Apenas a guia ativa fica visível (as demais recebem `--hidden` via CSS),
372
+ * então voltar a uma aba já visitada não a recarrega.
373
+ */
374
+ buildGuidesContent() {
286
375
  if (!this.selectedGuide) {
287
376
  return undefined;
288
377
  }
289
- const guideId = this.selectedGuide.id;
378
+ const activeId = this.selectedGuide.id;
379
+ // Garante que a aba ativa sempre renderiza, mesmo se o watch não a registrou ainda.
380
+ const ids = this._openedGuideIds.includes(activeId)
381
+ ? this._openedGuideIds
382
+ : [...this._openedGuideIds, activeId];
383
+ return (h(Fragment, null, ids.map((guideId) => {
384
+ const guide = this._guides.find(g => g.id === guideId);
385
+ if (!guide) {
386
+ return undefined;
387
+ }
388
+ const content = this.renderGuideContent(guide);
389
+ if (content == undefined) {
390
+ return undefined;
391
+ }
392
+ return (h("div", { key: `guide_${guideId}`, class: {
393
+ "snk-guides-viewer__guide-content": true,
394
+ "snk-guides-viewer__guide-content--hidden": guideId !== activeId
395
+ } }, content));
396
+ })));
397
+ }
398
+ renderGuideContent(guide) {
399
+ var _a;
400
+ const guideId = guide.id;
290
401
  if (this.isCustomGuide(guideId)) {
291
402
  return h("slot", { name: guideId });
292
403
  }
@@ -294,8 +405,8 @@ export class SnkDynaformGuidesViewer {
294
405
  if (childEntityName) {
295
406
  return (h("snk-dynaform-detail-view", { ref: (ref) => {
296
407
  if (ref)
297
- this._currentDetail = ref;
298
- }, dataUnitName: `${this.entityPath}/${childEntityName}`, entityName: childEntityName, label: this.selectedGuide.label, key: `detail_${guideId}`, canEdit: this.canEdit, resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders, presentationMode: this.presentationMode, messagesBuilder: this.messagesBuilder }));
408
+ this._detailRefs.set(guideId, ref);
409
+ }, dataUnitName: `${this.entityPath}/${childEntityName}`, entityName: childEntityName, label: guide.label, key: `detail_${guideId}`, canEdit: this.canEdit, resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders, presentationMode: this.presentationMode, messagesBuilder: this.messagesBuilder }));
299
410
  }
300
411
  if (guideId === this._mainFormName) {
301
412
  return undefined;
@@ -334,6 +445,184 @@ export class SnkDynaformGuidesViewer {
334
445
  var _a;
335
446
  return this.selectedGuide === undefined || TAB_NAMES.main === ((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id);
336
447
  }
448
+ /**
449
+ * Indica se a aba ativa disputa espaço vertical com o formulário principal.
450
+ * Vale para qualquer aba diferente da principal: detalhes E abas nomeadas
451
+ * (ex.: "Identificação"). Nesses casos o master pode ser recolhido.
452
+ */
453
+ isCollapsibleGuideActive() {
454
+ var _a;
455
+ const id = (_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id;
456
+ if (!id) {
457
+ return false;
458
+ }
459
+ return id !== this._mainFormName;
460
+ }
461
+ hasRecordToSummarize() {
462
+ var _a;
463
+ return ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectedRecord()) != undefined;
464
+ }
465
+ hasMainFormFields() {
466
+ var _a, _b;
467
+ if (!this._masterFormMetadata || !this._mainFormName) {
468
+ return false;
469
+ }
470
+ const sheet = this._masterFormMetadata.getSheet(this._mainFormName);
471
+ return ((_b = (_a = sheet === null || sheet === void 0 ? void 0 : sheet.fields) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
472
+ }
473
+ recomputeMasterCollapse() {
474
+ var _a;
475
+ if (!this.collapsibleMaster || !this.isCollapsibleGuideActive() || !this.hasRecordToSummarize()) {
476
+ this._masterCollapsed = false;
477
+ return;
478
+ }
479
+ if (this._manualOverride != undefined) {
480
+ this._masterCollapsed = this._manualOverride;
481
+ return;
482
+ }
483
+ this._masterCollapsed = ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode) ? false : this._hostTight;
484
+ }
485
+ /** Pool de campos candidatos (todos do form principal, até o limite máximo). */
486
+ getSummaryFields() {
487
+ var _a;
488
+ if (!this._masterFormMetadata || !this._mainFormName) {
489
+ return [];
490
+ }
491
+ const sheet = this._masterFormMetadata.getSheet(this._mainFormName);
492
+ const fields = (_a = sheet === null || sheet === void 0 ? void 0 : sheet.fields) !== null && _a !== void 0 ? _a : [];
493
+ return fields.slice(0, this.masterSummaryFieldCount);
494
+ }
495
+ /** Record atual (para consultar campos inválidos no DataUnit). */
496
+ getCurrentRecordId() {
497
+ var _a, _b;
498
+ return (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectedRecord()) === null || _b === void 0 ? void 0 : _b["__record__id__"];
499
+ }
500
+ /** Mensagem de invalidez do campo no registro atual, se houver. */
501
+ getFieldInvalidMessage(fieldName) {
502
+ var _a;
503
+ const recordId = this.getCurrentRecordId();
504
+ return recordId == undefined ? undefined : (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getInvalidMessage(recordId, fieldName);
505
+ }
506
+ renderSummaryItem(field) {
507
+ var _a;
508
+ const invalidMessage = this.getFieldInvalidMessage(field.name);
509
+ return (h("span", { class: {
510
+ "snk-guides-viewer__master-summary-item": true,
511
+ "snk-guides-viewer__master-summary-item--invalid": invalidMessage != undefined
512
+ }, key: field.name, title: invalidMessage }, h("span", { class: "snk-guides-viewer__master-summary-label" }, h("span", { class: "snk-guides-viewer__master-summary-label-text" }, (_a = field.label) !== null && _a !== void 0 ? _a : field.name), field.required &&
513
+ h("span", { class: "snk-guides-viewer__master-summary-required", "aria-hidden": "true" }, "*")), h("span", { class: "snk-guides-viewer__master-summary-value" }, this.formatSummaryValue(field.name))));
514
+ }
515
+ buildMasterSummary() {
516
+ var _a;
517
+ const fields = this.getSummaryFields();
518
+ const visible = fields.slice(0, this._visibleSummaryCount);
519
+ return (h("button", { type: "button", class: "snk-guides-viewer__master-summary", "aria-expanded": "false", "aria-label": (_a = this.getMessage("snkCrud.master.expand")) !== null && _a !== void 0 ? _a : "Expandir formulário principal", onClick: () => this.toggleMasterCollapse() }, h("div", { class: "snk-guides-viewer__master-summary-fields", ref: (el) => this.bindSummaryFields(el) }, visible.map((field) => this.renderSummaryItem(field))), h("div", { class: "snk-guides-viewer__master-summary-measure", "aria-hidden": "true", ref: (el) => { this._summaryMeasureEl = el; } }, fields.map((field) => this.renderSummaryItem(field))), h("ez-icon", { iconName: "chevron-down", class: "snk-guides-viewer__master-summary-chevron" })));
520
+ }
521
+ bindSummaryFields(el) {
522
+ var _a;
523
+ if (!el || el === this._summaryFieldsEl) {
524
+ return;
525
+ }
526
+ this._summaryFieldsEl = el;
527
+ (_a = this._summaryResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
528
+ if (typeof ResizeObserver === 'undefined') {
529
+ return;
530
+ }
531
+ this._summaryResizeObserver = new ResizeObserver(() => this.recomputeVisibleSummary());
532
+ this._summaryResizeObserver.observe(el);
533
+ }
534
+ /**
535
+ * Mede as larguras naturais (via row-fantasma) e calcula quantos campos
536
+ * cabem na largura visível. Só grava no estado quando o número muda, então
537
+ * não há loop de renderização.
538
+ */
539
+ recomputeVisibleSummary() {
540
+ const wrap = this._summaryFieldsEl;
541
+ const ghost = this._summaryMeasureEl;
542
+ if (!wrap || !ghost) {
543
+ return;
544
+ }
545
+ const avail = wrap.clientWidth;
546
+ if (avail <= 0) {
547
+ return;
548
+ }
549
+ const items = Array.from(ghost.children);
550
+ if (items.length === 0) {
551
+ return;
552
+ }
553
+ const gapStr = getComputedStyle(ghost).columnGap || getComputedStyle(ghost).gap || "0";
554
+ const gap = parseFloat(gapStr) || 0;
555
+ let used = 0;
556
+ let count = 0;
557
+ for (let i = 0; i < items.length; i++) {
558
+ const add = items[i].offsetWidth + (i > 0 ? gap : 0);
559
+ if (used + add > avail && count >= 1) {
560
+ break;
561
+ }
562
+ used += add;
563
+ count++;
564
+ }
565
+ count = Math.max(1, Math.min(count, items.length));
566
+ if (count !== this._visibleSummaryCount) {
567
+ this._visibleSummaryCount = count;
568
+ }
569
+ }
570
+ formatSummaryValue(fieldName) {
571
+ var _a;
572
+ const formatted = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getFormattedValue(fieldName);
573
+ return (formatted == undefined || formatted === "") ? "-" : formatted;
574
+ }
575
+ toggleMasterCollapse() {
576
+ this._masterCollapsed = !this._masterCollapsed;
577
+ this._manualOverride = this._masterCollapsed;
578
+ }
579
+ buildCollapseControl() {
580
+ var _a;
581
+ const label = (_a = this.getMessage("snkCrud.master.collapse")) !== null && _a !== void 0 ? _a : "Recolher";
582
+ return (h("div", { class: "snk-guides-viewer__master-collapse-btn" }, h("ez-tooltip", { message: label }, h("ez-button", { mode: "icon", iconName: "chevron-up", size: "x-small", variant: "secondary", "aria-label": label, onClick: () => this.toggleMasterCollapse() }))));
583
+ }
584
+ /** Bloco master (resumo + form), sempre montado; recolhe só via CSS. */
585
+ renderMaster(params, canCollapseMaster) {
586
+ return (h("div", { class: {
587
+ "snk-guides-viewer__master": true,
588
+ "snk-guides-viewer__master--collapsed": canCollapseMaster && this._masterCollapsed
589
+ } }, canCollapseMaster && this.buildMasterSummary(), h("div", { class: "snk-guides-viewer__master-expanded" }, SnkDynaformGuidesViewer.buildMainForm(params), canCollapseMaster && this.buildCollapseControl())));
590
+ }
591
+ /** Abas (quando houver) + container de detalhe. */
592
+ renderTabsAndDetail(params, showTabs) {
593
+ var _a;
594
+ return (h("div", { class: "snk-guides-viewer__panel" }, showTabs &&
595
+ h("ez-tabselector", Object.assign({ class: "snk-guides-viewer__tabselector", tabs: this.buildTabItems(), selectedTab: (_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id, onEzChange: (evt) => this.onTabChange(evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("tabselector")}` })), h("div", { class: "snk-guides-viewer__detail-container" }, SnkDynaformGuidesViewer.buildFixedForms(params), this.buildGuidesContent())));
596
+ }
597
+ /**
598
+ * Vincula o container e (re)inicia o observador de tamanho. Chamado pelo
599
+ * `ref` da section — o `componentDidLoad` não serve porque o config carrega
600
+ * de forma assíncrona e a section só monta depois de `isLoaded`.
601
+ */
602
+ bindContainer(el) {
603
+ if (!el || el === this._container) {
604
+ return;
605
+ }
606
+ this._container = el;
607
+ this.setupResizeObserver();
608
+ }
609
+ setupResizeObserver() {
610
+ var _a;
611
+ if (!this._container || typeof ResizeObserver === 'undefined') {
612
+ return;
613
+ }
614
+ (_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
615
+ this._resizeObserver = new ResizeObserver((entries) => {
616
+ var _a, _b, _c;
617
+ const height = (_c = (_b = (_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect) === null || _b === void 0 ? void 0 : _b.height) !== null && _c !== void 0 ? _c : 0;
618
+ const tight = height > 0 && height < this.masterCollapseThreshold;
619
+ if (tight !== this._hostTight) {
620
+ this._hostTight = tight;
621
+ this.recomputeMasterCollapse();
622
+ }
623
+ });
624
+ this._resizeObserver.observe(this._container);
625
+ }
337
626
  addFormLegacyConfigName() {
338
627
  var _a;
339
628
  if (this.formLegacyConfigName) {
@@ -353,10 +642,11 @@ export class SnkDynaformGuidesViewer {
353
642
  this._configManager.loadConfig();
354
643
  }
355
644
  async dataUnitActionHandler(action) {
356
- var _a, _b;
645
+ var _a;
357
646
  switch (action.type) {
358
647
  case DUAction.EDITION_CANCELED:
359
648
  case DUAction.DATA_SAVED:
649
+ this.refreshValidationState();
360
650
  if ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.isMultipleEdition) {
361
651
  this.exitViewer();
362
652
  if (this.dataUnit) {
@@ -365,10 +655,9 @@ export class SnkDynaformGuidesViewer {
365
655
  }
366
656
  break;
367
657
  case DUAction.FIELD_INVALIDATED:
368
- const guideName = this.getGuideName((_b = action.payload) === null || _b === void 0 ? void 0 : _b.fieldName);
369
- if (guideName) {
370
- this._errorTabs = new Set([...this._errorTabs, guideName]);
371
- }
658
+ case DUAction.INVALIDATE_CLEAN:
659
+ case DUAction.SAVING_CANCELED:
660
+ this.refreshValidationState();
372
661
  break;
373
662
  case DUAction.METADATA_LOADED:
374
663
  case DUAction.MULTIPLE_EDITION_CHANGED:
@@ -376,6 +665,37 @@ export class SnkDynaformGuidesViewer {
376
665
  break;
377
666
  }
378
667
  }
668
+ /**
669
+ * Reavalia abas com erro e o realce da tira-resumo a partir do estado atual
670
+ * de campos inválidos do DataUnit. Marca abas cujos campos ainda estão
671
+ * inválidos e DESMARCA as que foram preenchidas/limpas ou canceladas.
672
+ */
673
+ refreshValidationState() {
674
+ var _a, _b, _c;
675
+ const recordId = this.getCurrentRecordId();
676
+ const sheets = (_a = this._masterFormMetadata) === null || _a === void 0 ? void 0 : _a.getAllSheets();
677
+ const errored = new Set();
678
+ if (recordId != undefined && sheets) {
679
+ for (const sheet of sheets) {
680
+ const guideName = sheet[0];
681
+ const fields = (_b = sheet[1]) === null || _b === void 0 ? void 0 : _b.fields;
682
+ if (!fields) {
683
+ continue;
684
+ }
685
+ for (const field of fields) {
686
+ if (((_c = this.dataUnit) === null || _c === void 0 ? void 0 : _c.getInvalidMessage(recordId, field.name)) != undefined) {
687
+ errored.add(guideName);
688
+ break;
689
+ }
690
+ }
691
+ }
692
+ }
693
+ const prev = this._errorTabs;
694
+ if (prev.size === errored.size && [...errored].every(id => prev.has(id))) {
695
+ return;
696
+ }
697
+ this._errorTabs = errored;
698
+ }
379
699
  getGuideName(fieldName) {
380
700
  var _a, _b;
381
701
  const sheets = (_a = this._masterFormMetadata) === null || _a === void 0 ? void 0 : _a.getAllSheets();
@@ -456,9 +776,18 @@ export class SnkDynaformGuidesViewer {
456
776
  this.initKeyboardManager();
457
777
  this.getFieldsSearch();
458
778
  }
779
+ componentDidRender() {
780
+ if (this._masterCollapsed) {
781
+ this.recomputeVisibleSummary();
782
+ }
783
+ }
459
784
  disconnectedCallback() {
460
- var _a;
785
+ var _a, _b, _c;
461
786
  (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
787
+ (_b = this._resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
788
+ this._resizeObserver = undefined;
789
+ (_c = this._summaryResizeObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
790
+ this._summaryResizeObserver = undefined;
462
791
  }
463
792
  async initKeyboardManager() {
464
793
  this._keyboardManager = new KeyboardManager({ propagate: false, element: this._element });
@@ -472,7 +801,7 @@ export class SnkDynaformGuidesViewer {
472
801
  }
473
802
  }
474
803
  render() {
475
- var _a, _b, _c;
804
+ var _a, _b;
476
805
  if (this._formEditorConfigManager != undefined) {
477
806
  return (h("snk-dynaform-form-config", { ref: (ref) => {
478
807
  if (ref)
@@ -483,6 +812,11 @@ export class SnkDynaformGuidesViewer {
483
812
  return undefined;
484
813
  }
485
814
  const showTabs = this._guides && this._guides.length > 0;
815
+ const showMaster = this.hasMainFormFields();
816
+ const canCollapseMaster = showMaster && this.collapsibleMaster
817
+ && this.isCollapsibleGuideActive()
818
+ && this.hasRecordToSummarize();
819
+ const masterExpandedVisible = !(canCollapseMaster && this._masterCollapsed);
486
820
  const fixedFormsParams = {
487
821
  formConfig: this.masterFormConfig,
488
822
  formMetadata: this._masterFormMetadata,
@@ -498,14 +832,23 @@ export class SnkDynaformGuidesViewer {
498
832
  fieldSearch: this._fieldSearch,
499
833
  onMainFormRef: (ref) => { this._mainForm = ref; }
500
834
  };
501
- return (h("section", { class: "snk-guides-viewer", ref: (ref) => {
835
+ return (h("section", { class: "snk-guides-viewer", ref: (ref) => this.bindContainer(ref), tabindex: -1 }, this.getTitle() && (h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center", key: "header" }, h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()))))), h("div", { class: "snk-guides-viewer__container" }, showTabs && showMaster ? (
836
+ /* Master e abas: split redimensionável. Master alterna resumo/expandido via CSS
837
+ sem remontar o snk-dynaform-form-view (evita recarga/lentidão). */
838
+ h("ez-split-panel", { direction: "row", structural: true, showGutter: masterExpandedVisible, class: {
839
+ "snk-guides-viewer__split": true,
840
+ "snk-guides-viewer__split--collapsed": !masterExpandedVisible
841
+ }, ref: (ref) => {
502
842
  if (ref)
503
- this._container = ref;
504
- }, tabindex: -1 }, this.getTitle() && (h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center", key: "header" }, h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()))))), h("div", { class: "snk-guides-viewer__container" }, SnkDynaformGuidesViewer.buildMainForm(fixedFormsParams), showTabs &&
505
- h("ez-tabselector", Object.assign({ class: "snk-guides-viewer__tabselector", tabs: this.buildTabItems(), selectedTab: (_c = this.selectedGuide) === null || _c === void 0 ? void 0 : _c.id, onEzChange: (evt) => this.onTabChange(evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("tabselector")}` })), h("div", { class: "snk-guides-viewer__detail-container" }, SnkDynaformGuidesViewer.buildFixedForms(fixedFormsParams), this.getContent())), h("snk-configurator", { ref: (ref) => {
843
+ this._splitPanel = ref;
844
+ } }, h("ez-split-item", { class: "snk-guides-viewer__split-master", structural: true, enableExpand: false, size: masterExpandedVisible ? MASTER_INITIAL_SIZE : "auto" }, this.renderMaster(fixedFormsParams, canCollapseMaster)), h("ez-split-item", { class: "snk-guides-viewer__split-content", structural: true, outline: true, enableExpand: false }, this.renderTabsAndDetail(fixedFormsParams, true)))) : showTabs ? (
845
+ /* Sem campos no master: abas ocupam toda a área. */
846
+ this.renderTabsAndDetail(fixedFormsParams, true)) : (
847
+ /* Sem abas: master ocupa toda a área. */
848
+ this.renderMaster(fixedFormsParams, canCollapseMaster))), h("snk-configurator", { ref: (ref) => {
506
849
  if (ref)
507
850
  this._snkConfigurator = ref;
508
- }, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
851
+ }, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID, layoutFormConfig: false, showActionButtons: true })));
509
852
  }
510
853
  static get is() { return "snk-dynaform-guides-view"; }
511
854
  static get encapsulation() { return "scoped"; }
@@ -882,6 +1225,78 @@ export class SnkDynaformGuidesViewer {
882
1225
  "text": "Fornece as informa\u00E7\u00F5es das guias personalizadas. Cada guia personalizada\nser\u00E1 adicionada como uma aba do tabselector. O conte\u00FAdo de cada aba \u00E9\nrenderizado atrav\u00E9s de um slot cujo nome corresponde ao `id` da guia."
883
1226
  },
884
1227
  "defaultValue": "[]"
1228
+ },
1229
+ "collapsibleMaster": {
1230
+ "type": "boolean",
1231
+ "mutable": false,
1232
+ "complexType": {
1233
+ "original": "boolean",
1234
+ "resolved": "boolean",
1235
+ "references": {}
1236
+ },
1237
+ "required": false,
1238
+ "optional": false,
1239
+ "docs": {
1240
+ "tags": [],
1241
+ "text": "Habilita o recolhimento autom\u00E1tico do formul\u00E1rio master quando uma aba de\ndetalhe est\u00E1 ativa e o espa\u00E7o vertical est\u00E1 apertado (zoom alto)."
1242
+ },
1243
+ "attribute": "collapsible-master",
1244
+ "reflect": false,
1245
+ "defaultValue": "true"
1246
+ },
1247
+ "masterSummaryFieldCount": {
1248
+ "type": "number",
1249
+ "mutable": false,
1250
+ "complexType": {
1251
+ "original": "number",
1252
+ "resolved": "number",
1253
+ "references": {}
1254
+ },
1255
+ "required": false,
1256
+ "optional": false,
1257
+ "docs": {
1258
+ "tags": [],
1259
+ "text": "M\u00E1ximo de campos considerados para a tira-resumo do master recolhido.\nA quantidade realmente exibida \u00E9 din\u00E2mica: mostra quantos couberem na\nlargura dispon\u00EDvel, at\u00E9 este limite."
1260
+ },
1261
+ "attribute": "master-summary-field-count",
1262
+ "reflect": false,
1263
+ "defaultValue": "12"
1264
+ },
1265
+ "masterCollapseThreshold": {
1266
+ "type": "number",
1267
+ "mutable": false,
1268
+ "complexType": {
1269
+ "original": "number",
1270
+ "resolved": "number",
1271
+ "references": {}
1272
+ },
1273
+ "required": false,
1274
+ "optional": false,
1275
+ "docs": {
1276
+ "tags": [],
1277
+ "text": "Altura (px) do container abaixo da qual o espa\u00E7o \u00E9 considerado \"apertado\".\nEm zoom alto o viewport encolhe em px de CSS, disparando o recolhimento."
1278
+ },
1279
+ "attribute": "master-collapse-threshold",
1280
+ "reflect": false,
1281
+ "defaultValue": "700"
1282
+ },
1283
+ "maxOpenedGuides": {
1284
+ "type": "number",
1285
+ "mutable": false,
1286
+ "complexType": {
1287
+ "original": "number",
1288
+ "resolved": "number",
1289
+ "references": {}
1290
+ },
1291
+ "required": false,
1292
+ "optional": false,
1293
+ "docs": {
1294
+ "tags": [],
1295
+ "text": "M\u00E1ximo de abas mantidas montadas ao mesmo tempo.\nAbas ficam montadas p/ voltar sem recarregar, mas cada aba de detalhe\nmant\u00E9m um DataUnit vivo que recarrega ao navegar o registro master.\nSem limite, visitar N abas gera N recargas em segundo plano por navega\u00E7\u00E3o.\nEste teto ret\u00E9m a aba ativa + as inseridas mais recentemente (ordem de\ninser\u00E7\u00E3o, n\u00E3o de uso \u2014 a lista n\u00E3o \u00E9 reordenada ao reabrir uma aba); as\ndemais s\u00E3o desmontadas (voltar a elas recarrega). Use <= 0 para n\u00E3o limitar."
1296
+ },
1297
+ "attribute": "max-opened-guides",
1298
+ "reflect": false,
1299
+ "defaultValue": "4"
885
1300
  }
886
1301
  };
887
1302
  }
@@ -897,7 +1312,11 @@ export class SnkDynaformGuidesViewer {
897
1312
  "_mainForm": {},
898
1313
  "_mainFormName": {},
899
1314
  "_errorTabs": {},
900
- "_hasToCreateFieldSearch": {}
1315
+ "_hasToCreateFieldSearch": {},
1316
+ "_masterCollapsed": {},
1317
+ "_hostTight": {},
1318
+ "_visibleSummaryCount": {},
1319
+ "_openedGuideIds": {}
901
1320
  };
902
1321
  }
903
1322
  static get events() {
@@ -1133,6 +1552,12 @@ export class SnkDynaformGuidesViewer {
1133
1552
  return [{
1134
1553
  "propName": "dataUnit",
1135
1554
  "methodName": "observeDataUnit"
1555
+ }, {
1556
+ "propName": "selectedGuide",
1557
+ "methodName": "observeSelectedGuide"
1558
+ }, {
1559
+ "propName": "_masterCollapsed",
1560
+ "methodName": "observeMasterCollapsed"
1136
1561
  }, {
1137
1562
  "propName": "_formEditorConfigManager",
1138
1563
  "methodName": "observeFormConfigManager"
@@ -1160,8 +1585,3 @@ export class SnkDynaformGuidesViewer {
1160
1585
  }];
1161
1586
  }
1162
1587
  }
1163
- var GUIDES_VIEWER_VIEW_MODE;
1164
- (function (GUIDES_VIEWER_VIEW_MODE) {
1165
- GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["GUIDES"] = 0] = "GUIDES";
1166
- GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["CONFIG"] = 1] = "CONFIG";
1167
- })(GUIDES_VIEWER_VIEW_MODE || (GUIDES_VIEWER_VIEW_MODE = {}));