@praxisui/tabs 10.0.0-rc.8 → 10.0.0-rc.81
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.
- package/README.md +6 -1
- package/ai/component-registry.json +604 -55
- package/fesm2022/praxisui-tabs.mjs +1558 -262
- package/package.json +5 -5
- package/src/lib/praxis-tabs-config-editor.json-api.md +12 -1
- package/src/lib/praxis-tabs.json-api.md +26 -1
- package/types/praxisui-tabs.d.ts +109 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Input, Inject, Component, ChangeDetectorRef, effect,
|
|
2
|
+
import { inject, Input, Inject, Component, ChangeDetectorRef, signal, computed, effect, untracked, EventEmitter, ElementRef, DestroyRef, afterEveryRender, HostListener, ViewChild, Output, ChangeDetectionStrategy, ENVIRONMENT_INITIALIZER } from '@angular/core';
|
|
3
3
|
import { ActivatedRoute } from '@angular/router';
|
|
4
4
|
import * as i1$1 from '@angular/common';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
@@ -7,11 +7,11 @@ import * as i3 from '@angular/material/tabs';
|
|
|
7
7
|
import { MatTabsModule, MatTabGroup, MatTabNav } from '@angular/material/tabs';
|
|
8
8
|
import * as i4$1 from '@angular/material/icon';
|
|
9
9
|
import { MatIconModule } from '@angular/material/icon';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i11 from '@angular/material/tooltip';
|
|
11
11
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
12
12
|
import * as i1 from '@praxisui/core';
|
|
13
|
-
import { providePraxisI18n, PraxisI18nService, PraxisIconDirective, PraxisIconButtonComponent, providePraxisI18nConfig, deepMerge, ASYNC_CONFIG_STORAGE, ComponentKeyService, LoggerService, EmptyStateCardComponent, DynamicWidgetLoaderDirective, ComponentMetadataRegistry } from '@praxisui/core';
|
|
14
|
-
import * as i6 from '@angular/material/button';
|
|
13
|
+
import { providePraxisI18n, PraxisI18nService, PraxisIconDirective, PraxisIconButtonComponent, providePraxisI18nConfig, deepMerge, ASYNC_CONFIG_STORAGE, ComponentKeyService, LoggerService, PRAXIS_WIDGET_SHELL_VIEWPORT, normalizeConfigPersistenceStrategy, EmptyStateCardComponent, DynamicWidgetLoaderDirective, ComponentMetadataRegistry } from '@praxisui/core';
|
|
14
|
+
import * as i6$1 from '@angular/material/button';
|
|
15
15
|
import { MatButtonModule } from '@angular/material/button';
|
|
16
16
|
import * as i2_1 from '@angular/forms';
|
|
17
17
|
import { FormsModule, FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
@@ -21,9 +21,11 @@ import * as i4 from '@angular/material/form-field';
|
|
|
21
21
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
22
22
|
import * as i5 from '@angular/material/input';
|
|
23
23
|
import { MatInputModule } from '@angular/material/input';
|
|
24
|
-
import * as
|
|
24
|
+
import * as i6 from '@angular/material/select';
|
|
25
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
26
|
+
import * as i9 from '@angular/material/slide-toggle';
|
|
25
27
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
26
|
-
import * as
|
|
28
|
+
import * as i10 from '@angular/cdk/drag-drop';
|
|
27
29
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
28
30
|
import { BehaviorSubject, firstValueFrom, Subject, Subscription } from 'rxjs';
|
|
29
31
|
import { produce } from 'immer';
|
|
@@ -53,8 +55,11 @@ function validateTabsAuthoringDocument(doc, _context) {
|
|
|
53
55
|
const normalized = normalizeTabsAuthoringDocument(doc);
|
|
54
56
|
const diagnostics = [];
|
|
55
57
|
validateModeAmbiguity(normalized.config, diagnostics);
|
|
58
|
+
validateAppearanceVariant(normalized.config, diagnostics);
|
|
59
|
+
validateItemTones(normalized.config, diagnostics);
|
|
56
60
|
validateDuplicateTabIds(normalized.config, diagnostics);
|
|
57
61
|
validateDuplicateLinkIds(normalized.config, diagnostics);
|
|
62
|
+
validateDuplicateChildWidgetKeys(normalized.config, diagnostics);
|
|
58
63
|
validateUnsupportedGuidedFields(normalized.config, diagnostics);
|
|
59
64
|
return diagnostics;
|
|
60
65
|
}
|
|
@@ -86,11 +91,28 @@ function buildTabsApplyPlan(doc, runtime, options) {
|
|
|
86
91
|
function serializeTabsAuthoringDocument(doc) {
|
|
87
92
|
return normalizeTabsAuthoringDocument(doc);
|
|
88
93
|
}
|
|
94
|
+
function buildUniqueChildWidgetKey(containerId, widgetId, existingKeys) {
|
|
95
|
+
const used = new Set(Array.from(existingKeys)
|
|
96
|
+
.map((key) => key.trim())
|
|
97
|
+
.filter(Boolean));
|
|
98
|
+
const ownerSlug = slugifyIdentifier(containerId) || 'item';
|
|
99
|
+
const widgetSlug = slugifyIdentifier((widgetId || 'widget').replace(/^praxis-/i, '')) || 'widget';
|
|
100
|
+
const base = `${ownerSlug}-${widgetSlug}`;
|
|
101
|
+
let candidate = base;
|
|
102
|
+
let suffix = 2;
|
|
103
|
+
while (used.has(candidate)) {
|
|
104
|
+
candidate = `${base}-${suffix++}`;
|
|
105
|
+
}
|
|
106
|
+
return candidate;
|
|
107
|
+
}
|
|
89
108
|
function normalizeTabsConfig(config) {
|
|
90
109
|
const next = cloneJson(config ?? {});
|
|
91
110
|
if (!Array.isArray(next.tabs) || next.tabs.length === 0) {
|
|
92
111
|
delete next.tabs;
|
|
93
112
|
}
|
|
113
|
+
else {
|
|
114
|
+
next.tabs = next.tabs.map((tab, index) => normalizeContainerWidgets(tab, `tab${index + 1}`));
|
|
115
|
+
}
|
|
94
116
|
if (!next.nav || typeof next.nav !== 'object') {
|
|
95
117
|
delete next.nav;
|
|
96
118
|
}
|
|
@@ -104,8 +126,8 @@ function normalizeTabsConfig(config) {
|
|
|
104
126
|
next.nav.selectedIndex = clampIndex(next.nav.selectedIndex, next.nav.links?.length ?? 0);
|
|
105
127
|
}
|
|
106
128
|
if (Array.isArray(next.nav?.links)) {
|
|
107
|
-
next.nav.links = next.nav.links.map((link) => {
|
|
108
|
-
const copy = { ...link };
|
|
129
|
+
next.nav.links = next.nav.links.map((link, index) => {
|
|
130
|
+
const copy = normalizeContainerWidgets({ ...link }, `link${index + 1}`);
|
|
109
131
|
delete copy.active;
|
|
110
132
|
return copy;
|
|
111
133
|
});
|
|
@@ -166,6 +188,95 @@ function validateDuplicateLinkIds(config, diagnostics) {
|
|
|
166
188
|
seen.add(id);
|
|
167
189
|
});
|
|
168
190
|
}
|
|
191
|
+
function validateDuplicateChildWidgetKeys(config, diagnostics) {
|
|
192
|
+
(config.tabs ?? []).forEach((tab, tabIndex) => {
|
|
193
|
+
const seen = new Set();
|
|
194
|
+
(tab.widgets ?? []).forEach((widget, widgetIndex) => {
|
|
195
|
+
const key = normalizeId(widget?.childWidgetKey);
|
|
196
|
+
if (!key)
|
|
197
|
+
return;
|
|
198
|
+
if (seen.has(key)) {
|
|
199
|
+
diagnostics.push(errorDiagnostic('tabs.config.widgets.childWidgetKey.duplicate', 'Duplicate childWidgetKey detected within the same tab.', `config.tabs[${tabIndex}].widgets[${widgetIndex}].childWidgetKey`));
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
seen.add(key);
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
(config.nav?.links ?? []).forEach((link, linkIndex) => {
|
|
206
|
+
const seen = new Set();
|
|
207
|
+
(link.widgets ?? []).forEach((widget, widgetIndex) => {
|
|
208
|
+
const key = normalizeId(widget?.childWidgetKey);
|
|
209
|
+
if (!key)
|
|
210
|
+
return;
|
|
211
|
+
if (seen.has(key)) {
|
|
212
|
+
diagnostics.push(errorDiagnostic('tabs.config.widgets.childWidgetKey.duplicate', 'Duplicate childWidgetKey detected within the same nav link.', `config.nav.links[${linkIndex}].widgets[${widgetIndex}].childWidgetKey`));
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
seen.add(key);
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
function normalizeContainerWidgets(container, fallbackContainerId) {
|
|
220
|
+
if (!container || typeof container !== 'object' || !Array.isArray(container.widgets)) {
|
|
221
|
+
return container;
|
|
222
|
+
}
|
|
223
|
+
const usedKeys = new Set();
|
|
224
|
+
for (const widget of container.widgets) {
|
|
225
|
+
const explicitKey = normalizeId(widget?.childWidgetKey);
|
|
226
|
+
if (explicitKey) {
|
|
227
|
+
usedKeys.add(explicitKey);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return {
|
|
231
|
+
...container,
|
|
232
|
+
widgets: container.widgets.map((widget) => {
|
|
233
|
+
if (!widget || typeof widget !== 'object') {
|
|
234
|
+
return widget;
|
|
235
|
+
}
|
|
236
|
+
const explicitKey = normalizeId(widget.childWidgetKey);
|
|
237
|
+
if (explicitKey) {
|
|
238
|
+
return {
|
|
239
|
+
...widget,
|
|
240
|
+
childWidgetKey: explicitKey,
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
const generatedKey = buildUniqueChildWidgetKey(container.id || fallbackContainerId, widget.id, usedKeys);
|
|
244
|
+
usedKeys.add(generatedKey);
|
|
245
|
+
return {
|
|
246
|
+
...widget,
|
|
247
|
+
childWidgetKey: generatedKey,
|
|
248
|
+
};
|
|
249
|
+
}),
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
function slugifyIdentifier(value) {
|
|
253
|
+
return String(value ?? '')
|
|
254
|
+
.trim()
|
|
255
|
+
.toLowerCase()
|
|
256
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
257
|
+
.replace(/^-|-$/g, '');
|
|
258
|
+
}
|
|
259
|
+
function validateAppearanceVariant(config, diagnostics) {
|
|
260
|
+
const variant = config.appearance?.variant;
|
|
261
|
+
if (variant === undefined)
|
|
262
|
+
return;
|
|
263
|
+
if (variant !== 'underline' && variant !== 'pill' && variant !== 'segmented') {
|
|
264
|
+
diagnostics.push(errorDiagnostic('tabs.config.appearance.variant.invalid', 'appearance.variant must be one of "underline", "pill", or "segmented".', 'config.appearance.variant'));
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
function validateItemTones(config, diagnostics) {
|
|
268
|
+
const validTones = new Set(['default', 'primary', 'accent', 'outlined']);
|
|
269
|
+
(config.tabs ?? []).forEach((tab, index) => {
|
|
270
|
+
if (tab?.tone !== undefined && !validTones.has(tab.tone)) {
|
|
271
|
+
diagnostics.push(errorDiagnostic('tabs.config.item.tone.invalid', `tabs[${index}].tone must be one of "default", "primary", "accent", or "outlined".`, `config.tabs[${index}].tone`));
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
(config.nav?.links ?? []).forEach((link, index) => {
|
|
275
|
+
if (link?.tone !== undefined && !validTones.has(link.tone)) {
|
|
276
|
+
diagnostics.push(errorDiagnostic('tabs.config.item.tone.invalid', `nav.links[${index}].tone must be one of "default", "primary", "accent", or "outlined".`, `config.nav.links[${index}].tone`));
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
}
|
|
169
280
|
function validateUnsupportedGuidedFields(config, diagnostics) {
|
|
170
281
|
if (config.group?.contentTabIndex !== undefined) {
|
|
171
282
|
diagnostics.push(infoDiagnostic('tabs.config.group.contentTabIndex.unsupported', 'group.contentTabIndex is outside the supported authoring surface.', 'config.group.contentTabIndex'));
|
|
@@ -257,6 +368,10 @@ const PRAXIS_TABS_PT_BR = {
|
|
|
257
368
|
'chrome.moveTabLeft': 'Mover aba para esquerda',
|
|
258
369
|
'chrome.moveTabRight': 'Mover aba para direita',
|
|
259
370
|
'chrome.editTabs': 'Editar abas',
|
|
371
|
+
'chrome.allTabs': 'Todas ({{count}})',
|
|
372
|
+
'chrome.allTabsAria': 'Abrir índice de todas as {{count}} abas',
|
|
373
|
+
'chrome.filterTabsPlaceholder': 'Filtrar abas...',
|
|
374
|
+
'chrome.noMatchingTabs': 'Nenhuma aba encontrada',
|
|
260
375
|
'defaults.newTabLabel': 'Nova Aba',
|
|
261
376
|
'defaults.newLinkLabel': 'Novo Link',
|
|
262
377
|
'editor.tabs.behavior': 'Comportamento',
|
|
@@ -293,7 +408,9 @@ const PRAXIS_TABS_PT_BR = {
|
|
|
293
408
|
'editor.fields.ariaLabelledby': 'aria-labelledby',
|
|
294
409
|
'editor.fields.jsonConfig': 'Configuração JSON',
|
|
295
410
|
'editor.fields.themeClass': 'Classe de tema (opcional)',
|
|
411
|
+
'editor.fields.variant': 'Variante visual',
|
|
296
412
|
'editor.fields.density': 'Densidade',
|
|
413
|
+
'editor.fields.tone': 'Tom do item',
|
|
297
414
|
'editor.fields.customCss': 'CSS a ser injetado no componente',
|
|
298
415
|
'editor.fields.addLabel': 'Adicionar rótulo',
|
|
299
416
|
'editor.fields.inputsJson': 'Inputs (JSON)',
|
|
@@ -330,6 +447,14 @@ const PRAXIS_TABS_PT_BR = {
|
|
|
330
447
|
'editor.presets.primary': 'Primário',
|
|
331
448
|
'editor.presets.neutral': 'Neutro',
|
|
332
449
|
'editor.presets.highContrast': 'Alto contraste',
|
|
450
|
+
'editor.presets.pill': 'Pill (cápsula)',
|
|
451
|
+
'editor.variant.underline': 'Sublinhado (Underline)',
|
|
452
|
+
'editor.variant.pill': 'Cápsula (Pill)',
|
|
453
|
+
'editor.variant.segmented': 'Segmentado (Segmented)',
|
|
454
|
+
'editor.tone.default': 'Padrão',
|
|
455
|
+
'editor.tone.primary': 'Primário',
|
|
456
|
+
'editor.tone.accent': 'Destaque (Accent)',
|
|
457
|
+
'editor.tone.outlined': 'Contorno ativo (Outlined)',
|
|
333
458
|
'editor.density.default': 'Padrão',
|
|
334
459
|
'editor.density.compact': 'Compacta',
|
|
335
460
|
'editor.density.comfortable': 'Confortável',
|
|
@@ -362,6 +487,11 @@ const PRAXIS_TABS_PT_BR = {
|
|
|
362
487
|
'editor.tokens.paginationIcon': 'Ícones de paginação',
|
|
363
488
|
'editor.tokens.divider': 'Divisor/linha',
|
|
364
489
|
'editor.tokens.headerBackground': 'Fundo do cabeçalho (header)',
|
|
490
|
+
'editor.tokens.trackBackground': 'Fundo da trilha (pill)',
|
|
491
|
+
'editor.tokens.trackBorder': 'Borda da trilha (pill)',
|
|
492
|
+
'editor.tokens.activeTabBackground': 'Fundo da aba ativa (pill)',
|
|
493
|
+
'editor.tokens.activeTabOutline': 'Contorno/foco da aba (pill)',
|
|
494
|
+
'editor.tokens.pillRadius': 'Raio da borda (pill)',
|
|
365
495
|
'editor.toggles.closeable': 'Fechável',
|
|
366
496
|
'editor.toggles.lazyLoad': 'Carregar sob demanda',
|
|
367
497
|
'editor.toggles.reorderable': 'Reordenável',
|
|
@@ -409,6 +539,10 @@ const PRAXIS_TABS_EN_US = {
|
|
|
409
539
|
'chrome.moveTabLeft': 'Move tab left',
|
|
410
540
|
'chrome.moveTabRight': 'Move tab right',
|
|
411
541
|
'chrome.editTabs': 'Edit tabs',
|
|
542
|
+
'chrome.allTabs': 'All ({{count}})',
|
|
543
|
+
'chrome.allTabsAria': 'Open index of all {{count}} tabs',
|
|
544
|
+
'chrome.filterTabsPlaceholder': 'Filter tabs...',
|
|
545
|
+
'chrome.noMatchingTabs': 'No matching tabs',
|
|
412
546
|
'defaults.newTabLabel': 'New Tab',
|
|
413
547
|
'defaults.newLinkLabel': 'New Link',
|
|
414
548
|
'editor.tabs.behavior': 'Behavior',
|
|
@@ -445,7 +579,9 @@ const PRAXIS_TABS_EN_US = {
|
|
|
445
579
|
'editor.fields.ariaLabelledby': 'aria-labelledby',
|
|
446
580
|
'editor.fields.jsonConfig': 'JSON configuration',
|
|
447
581
|
'editor.fields.themeClass': 'Theme class (optional)',
|
|
582
|
+
'editor.fields.variant': 'Visual variant',
|
|
448
583
|
'editor.fields.density': 'Density',
|
|
584
|
+
'editor.fields.tone': 'Item tone',
|
|
449
585
|
'editor.fields.customCss': 'CSS injected into the component',
|
|
450
586
|
'editor.fields.addLabel': 'Add label',
|
|
451
587
|
'editor.fields.inputsJson': 'Inputs (JSON)',
|
|
@@ -482,6 +618,14 @@ const PRAXIS_TABS_EN_US = {
|
|
|
482
618
|
'editor.presets.primary': 'Primary',
|
|
483
619
|
'editor.presets.neutral': 'Neutral',
|
|
484
620
|
'editor.presets.highContrast': 'High contrast',
|
|
621
|
+
'editor.presets.pill': 'Pill (capsule)',
|
|
622
|
+
'editor.variant.underline': 'Underline',
|
|
623
|
+
'editor.variant.pill': 'Pill (capsule)',
|
|
624
|
+
'editor.variant.segmented': 'Segmented',
|
|
625
|
+
'editor.tone.default': 'Default',
|
|
626
|
+
'editor.tone.primary': 'Primary',
|
|
627
|
+
'editor.tone.accent': 'Accent',
|
|
628
|
+
'editor.tone.outlined': 'Outlined',
|
|
485
629
|
'editor.density.default': 'Default',
|
|
486
630
|
'editor.density.compact': 'Compact',
|
|
487
631
|
'editor.density.comfortable': 'Comfortable',
|
|
@@ -514,6 +658,11 @@ const PRAXIS_TABS_EN_US = {
|
|
|
514
658
|
'editor.tokens.paginationIcon': 'Pagination icons',
|
|
515
659
|
'editor.tokens.divider': 'Divider',
|
|
516
660
|
'editor.tokens.headerBackground': 'Header background',
|
|
661
|
+
'editor.tokens.trackBackground': 'Track background (pill)',
|
|
662
|
+
'editor.tokens.trackBorder': 'Track border (pill)',
|
|
663
|
+
'editor.tokens.activeTabBackground': 'Active tab background (pill)',
|
|
664
|
+
'editor.tokens.activeTabOutline': 'Tab outline/focus ring (pill)',
|
|
665
|
+
'editor.tokens.pillRadius': 'Pill border radius',
|
|
517
666
|
'editor.toggles.closeable': 'Closeable',
|
|
518
667
|
'editor.toggles.lazyLoad': 'Lazy load',
|
|
519
668
|
'editor.toggles.reorderable': 'Reorderable',
|
|
@@ -607,6 +756,11 @@ class PraxisTabsConfigEditor {
|
|
|
607
756
|
{ key: 'pagination-icon-color', labelKey: 'editor.tokens.paginationIcon', fallback: 'Icones de paginacao' },
|
|
608
757
|
{ key: 'divider-color', labelKey: 'editor.tokens.divider', fallback: 'Divisor/linha' },
|
|
609
758
|
{ key: 'background-color', labelKey: 'editor.tokens.headerBackground', fallback: 'Fundo do header' },
|
|
759
|
+
{ key: 'track-background-color', labelKey: 'editor.tokens.trackBackground', fallback: 'Fundo da trilha (pill)' },
|
|
760
|
+
{ key: 'track-border-color', labelKey: 'editor.tokens.trackBorder', fallback: 'Borda da trilha (pill)' },
|
|
761
|
+
{ key: 'active-tab-background-color', labelKey: 'editor.tokens.activeTabBackground', fallback: 'Fundo da aba ativa (pill)' },
|
|
762
|
+
{ key: 'active-tab-outline-color', labelKey: 'editor.tokens.activeTabOutline', fallback: 'Contorno/foco da aba (pill)' },
|
|
763
|
+
{ key: 'pill-radius', labelKey: 'editor.tokens.pillRadius', fallback: 'Raio da borda (pill)' },
|
|
610
764
|
];
|
|
611
765
|
presets = {
|
|
612
766
|
primary: {
|
|
@@ -635,6 +789,15 @@ class PraxisTabsConfigEditor {
|
|
|
635
789
|
'divider-color': 'var(--md-sys-color-outline)',
|
|
636
790
|
'background-color': 'var(--md-sys-color-surface)',
|
|
637
791
|
'pagination-icon-color': 'var(--md-sys-color-on-surface)'
|
|
792
|
+
},
|
|
793
|
+
pill: {
|
|
794
|
+
'track-background-color': '#18191b',
|
|
795
|
+
'track-border-color': '#2c2e33',
|
|
796
|
+
'active-tab-background-color': '#28292c',
|
|
797
|
+
'active-tab-outline-color': '#8ab4f8',
|
|
798
|
+
'active-label-text-color': '#f1f3f4',
|
|
799
|
+
'inactive-label-text-color': '#9aa0a6',
|
|
800
|
+
'pill-radius': '9999px',
|
|
638
801
|
}
|
|
639
802
|
};
|
|
640
803
|
isDirty$ = new BehaviorSubject(false);
|
|
@@ -777,6 +940,9 @@ class PraxisTabsConfigEditor {
|
|
|
777
940
|
if (!preset)
|
|
778
941
|
return;
|
|
779
942
|
const ap = this.appearance;
|
|
943
|
+
if (id === 'pill') {
|
|
944
|
+
ap.variant = 'pill';
|
|
945
|
+
}
|
|
780
946
|
const tokens = (ap.tokens = ap.tokens || {});
|
|
781
947
|
for (const [k, v] of Object.entries(preset)) {
|
|
782
948
|
tokens[k] = v;
|
|
@@ -789,8 +955,36 @@ class PraxisTabsConfigEditor {
|
|
|
789
955
|
const selector = this.editedConfig.appearance?.themeClass
|
|
790
956
|
? `.${this.editedConfig.appearance.themeClass}`
|
|
791
957
|
: ':root';
|
|
792
|
-
const
|
|
793
|
-
|
|
958
|
+
const pillTokenMap = {
|
|
959
|
+
'track-background-color': '--p-tabs-track-bg',
|
|
960
|
+
'track-border-color': '--p-tabs-track-border',
|
|
961
|
+
'active-tab-background-color': '--p-tabs-active-bg',
|
|
962
|
+
'active-tab-outline-color': '--p-tabs-active-outline',
|
|
963
|
+
'pill-radius': '--p-tabs-pill-radius',
|
|
964
|
+
};
|
|
965
|
+
const matEntries = [];
|
|
966
|
+
const pillVars = [];
|
|
967
|
+
for (const [key, value] of entries) {
|
|
968
|
+
if (!value) {
|
|
969
|
+
continue;
|
|
970
|
+
}
|
|
971
|
+
const cssVar = pillTokenMap[key];
|
|
972
|
+
if (cssVar) {
|
|
973
|
+
pillVars.push([cssVar, value]);
|
|
974
|
+
}
|
|
975
|
+
else {
|
|
976
|
+
matEntries.push([key, value]);
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
const blocks = [];
|
|
980
|
+
if (matEntries.length > 0 || entries.length === 0) {
|
|
981
|
+
const map = matEntries.map(([k, v]) => ` ${k}: ${v},`).join('\n');
|
|
982
|
+
blocks.push(` @include mat.tabs-overrides((\n${map}\n ));`);
|
|
983
|
+
}
|
|
984
|
+
for (const [cssVar, value] of pillVars) {
|
|
985
|
+
blocks.push(` ${cssVar}: ${value};`);
|
|
986
|
+
}
|
|
987
|
+
return `${selector} {\n${blocks.join('\n')}\n}`;
|
|
794
988
|
}
|
|
795
989
|
// Group/Nav helpers and list editors
|
|
796
990
|
get group() {
|
|
@@ -849,7 +1043,14 @@ class PraxisTabsConfigEditor {
|
|
|
849
1043
|
return;
|
|
850
1044
|
const t = this.editedConfig.tabs[tabIndex];
|
|
851
1045
|
t.widgets = t.widgets || [];
|
|
852
|
-
t.
|
|
1046
|
+
const childWidgetKey = this.nextChildWidgetKey(t.id || `tab${tabIndex + 1}`, id, t.widgets);
|
|
1047
|
+
const rp = (this.quickResourcePathTab[tabIndex] || '').trim();
|
|
1048
|
+
const defaultInputs = this.buildDefaultWidgetInputs(id, rp);
|
|
1049
|
+
t.widgets.push({
|
|
1050
|
+
id,
|
|
1051
|
+
childWidgetKey,
|
|
1052
|
+
...(defaultInputs ? { inputs: defaultInputs } : {}),
|
|
1053
|
+
});
|
|
853
1054
|
this.onAppearanceChange();
|
|
854
1055
|
}
|
|
855
1056
|
removeWidgetFromTab(tabIndex, widgetIndex) {
|
|
@@ -859,6 +1060,20 @@ class PraxisTabsConfigEditor {
|
|
|
859
1060
|
t.widgets.splice(widgetIndex, 1);
|
|
860
1061
|
this.onAppearanceChange();
|
|
861
1062
|
}
|
|
1063
|
+
updateWidgetKeyTab(tabIndex, widgetIndex, key) {
|
|
1064
|
+
const t = this.editedConfig.tabs?.[tabIndex];
|
|
1065
|
+
const widget = t?.widgets?.[widgetIndex];
|
|
1066
|
+
if (!widget)
|
|
1067
|
+
return;
|
|
1068
|
+
const trimmed = String(key ?? '').trim();
|
|
1069
|
+
if (trimmed) {
|
|
1070
|
+
widget.childWidgetKey = trimmed;
|
|
1071
|
+
}
|
|
1072
|
+
else {
|
|
1073
|
+
delete widget.childWidgetKey;
|
|
1074
|
+
}
|
|
1075
|
+
this.onAppearanceChange();
|
|
1076
|
+
}
|
|
862
1077
|
updateWidgetInputsTab(tabIndex, widgetIndex, text) {
|
|
863
1078
|
const t = this.editedConfig.tabs[tabIndex];
|
|
864
1079
|
try {
|
|
@@ -883,14 +1098,30 @@ class PraxisTabsConfigEditor {
|
|
|
883
1098
|
return;
|
|
884
1099
|
const t = this.editedConfig.tabs[tabIndex];
|
|
885
1100
|
t.widgets = t.widgets || [];
|
|
1101
|
+
const containerId = t.id || `tab${tabIndex + 1}`;
|
|
886
1102
|
if (type === 'form') {
|
|
887
|
-
|
|
1103
|
+
const id = 'praxis-dynamic-form';
|
|
1104
|
+
t.widgets.push({
|
|
1105
|
+
id,
|
|
1106
|
+
childWidgetKey: this.nextChildWidgetKey(containerId, id, t.widgets),
|
|
1107
|
+
inputs: { resourcePath: rp },
|
|
1108
|
+
});
|
|
888
1109
|
}
|
|
889
1110
|
else if (type === 'table') {
|
|
890
|
-
|
|
1111
|
+
const id = 'praxis-table';
|
|
1112
|
+
t.widgets.push({
|
|
1113
|
+
id,
|
|
1114
|
+
childWidgetKey: this.nextChildWidgetKey(containerId, id, t.widgets),
|
|
1115
|
+
inputs: { resourcePath: rp, tableId: rp },
|
|
1116
|
+
});
|
|
891
1117
|
}
|
|
892
1118
|
else {
|
|
893
|
-
|
|
1119
|
+
const id = 'praxis-crud';
|
|
1120
|
+
t.widgets.push({
|
|
1121
|
+
id,
|
|
1122
|
+
childWidgetKey: this.nextChildWidgetKey(containerId, id, t.widgets),
|
|
1123
|
+
inputs: { crudId: rp, metadata: { resource: { path: rp } } },
|
|
1124
|
+
});
|
|
894
1125
|
}
|
|
895
1126
|
this.onAppearanceChange();
|
|
896
1127
|
}
|
|
@@ -927,7 +1158,14 @@ class PraxisTabsConfigEditor {
|
|
|
927
1158
|
return;
|
|
928
1159
|
const l = this.nav.links[linkIndex];
|
|
929
1160
|
l.widgets = l.widgets || [];
|
|
930
|
-
l.
|
|
1161
|
+
const childWidgetKey = this.nextChildWidgetKey(l.id || `link${linkIndex + 1}`, id, l.widgets);
|
|
1162
|
+
const rp = (this.quickResourcePathLink[linkIndex] || '').trim();
|
|
1163
|
+
const defaultInputs = this.buildDefaultWidgetInputs(id, rp);
|
|
1164
|
+
l.widgets.push({
|
|
1165
|
+
id,
|
|
1166
|
+
childWidgetKey,
|
|
1167
|
+
...(defaultInputs ? { inputs: defaultInputs } : {}),
|
|
1168
|
+
});
|
|
931
1169
|
this.onAppearanceChange();
|
|
932
1170
|
}
|
|
933
1171
|
removeWidgetFromLink(linkIndex, widgetIndex) {
|
|
@@ -937,6 +1175,20 @@ class PraxisTabsConfigEditor {
|
|
|
937
1175
|
l.widgets.splice(widgetIndex, 1);
|
|
938
1176
|
this.onAppearanceChange();
|
|
939
1177
|
}
|
|
1178
|
+
updateWidgetKeyLink(linkIndex, widgetIndex, key) {
|
|
1179
|
+
const l = this.nav.links?.[linkIndex];
|
|
1180
|
+
const widget = l?.widgets?.[widgetIndex];
|
|
1181
|
+
if (!widget)
|
|
1182
|
+
return;
|
|
1183
|
+
const trimmed = String(key ?? '').trim();
|
|
1184
|
+
if (trimmed) {
|
|
1185
|
+
widget.childWidgetKey = trimmed;
|
|
1186
|
+
}
|
|
1187
|
+
else {
|
|
1188
|
+
delete widget.childWidgetKey;
|
|
1189
|
+
}
|
|
1190
|
+
this.onAppearanceChange();
|
|
1191
|
+
}
|
|
940
1192
|
updateWidgetInputsLink(linkIndex, widgetIndex, text) {
|
|
941
1193
|
const l = this.nav.links[linkIndex];
|
|
942
1194
|
try {
|
|
@@ -961,17 +1213,58 @@ class PraxisTabsConfigEditor {
|
|
|
961
1213
|
return;
|
|
962
1214
|
const l = this.nav.links[linkIndex];
|
|
963
1215
|
l.widgets = l.widgets || [];
|
|
1216
|
+
const containerId = l.id || `link${linkIndex + 1}`;
|
|
964
1217
|
if (type === 'form') {
|
|
965
|
-
|
|
1218
|
+
const id = 'praxis-dynamic-form';
|
|
1219
|
+
l.widgets.push({
|
|
1220
|
+
id,
|
|
1221
|
+
childWidgetKey: this.nextChildWidgetKey(containerId, id, l.widgets),
|
|
1222
|
+
inputs: { resourcePath: rp },
|
|
1223
|
+
});
|
|
966
1224
|
}
|
|
967
1225
|
else if (type === 'table') {
|
|
968
|
-
|
|
1226
|
+
const id = 'praxis-table';
|
|
1227
|
+
l.widgets.push({
|
|
1228
|
+
id,
|
|
1229
|
+
childWidgetKey: this.nextChildWidgetKey(containerId, id, l.widgets),
|
|
1230
|
+
inputs: { resourcePath: rp, tableId: rp },
|
|
1231
|
+
});
|
|
969
1232
|
}
|
|
970
1233
|
else {
|
|
971
|
-
|
|
1234
|
+
const id = 'praxis-crud';
|
|
1235
|
+
l.widgets.push({
|
|
1236
|
+
id,
|
|
1237
|
+
childWidgetKey: this.nextChildWidgetKey(containerId, id, l.widgets),
|
|
1238
|
+
inputs: { crudId: rp, metadata: { resource: { path: rp } } },
|
|
1239
|
+
});
|
|
972
1240
|
}
|
|
973
1241
|
this.onAppearanceChange();
|
|
974
1242
|
}
|
|
1243
|
+
nextChildWidgetKey(containerId, widgetId, widgets) {
|
|
1244
|
+
const existingKeys = (widgets ?? [])
|
|
1245
|
+
.map((widget) => String(widget?.childWidgetKey ?? '').trim())
|
|
1246
|
+
.filter(Boolean);
|
|
1247
|
+
return buildUniqueChildWidgetKey(containerId, widgetId, existingKeys);
|
|
1248
|
+
}
|
|
1249
|
+
buildDefaultWidgetInputs(widgetId, resourcePath) {
|
|
1250
|
+
if (widgetId === 'praxis-related-resource-outlet') {
|
|
1251
|
+
return {
|
|
1252
|
+
parentResourcePath: resourcePath,
|
|
1253
|
+
surfaceId: '',
|
|
1254
|
+
mode: 'inline',
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
if (!resourcePath) {
|
|
1258
|
+
return undefined;
|
|
1259
|
+
}
|
|
1260
|
+
if (widgetId === 'praxis-table') {
|
|
1261
|
+
return { resourcePath, tableId: resourcePath };
|
|
1262
|
+
}
|
|
1263
|
+
if (widgetId === 'praxis-dynamic-form') {
|
|
1264
|
+
return { resourcePath };
|
|
1265
|
+
}
|
|
1266
|
+
return undefined;
|
|
1267
|
+
}
|
|
975
1268
|
stringify(v) { try {
|
|
976
1269
|
return v ? JSON.stringify(v, null, 2) : '';
|
|
977
1270
|
}
|
|
@@ -1000,17 +1293,17 @@ class PraxisTabsConfigEditor {
|
|
|
1000
1293
|
<div class="editor-topbar">
|
|
1001
1294
|
<mat-form-field appearance="outline" class="editor-mode-field">
|
|
1002
1295
|
<mat-label>{{ t('editor.fields.mode', 'Modo principal') }}</mat-label>
|
|
1003
|
-
<select
|
|
1004
|
-
<option value="group">{{ t('editor.mode.group', 'Grupo de abas') }}</option>
|
|
1005
|
-
<option value="nav">{{ t('editor.mode.nav', 'Navegacao por links') }}</option>
|
|
1006
|
-
</select>
|
|
1296
|
+
<mat-select [ngModel]="primaryMode" (ngModelChange)="setPrimaryMode($event)">
|
|
1297
|
+
<mat-option value="group">{{ t('editor.mode.group', 'Grupo de abas') }}</mat-option>
|
|
1298
|
+
<mat-option value="nav">{{ t('editor.mode.nav', 'Navegacao por links') }}</mat-option>
|
|
1299
|
+
</mat-select>
|
|
1007
1300
|
</mat-form-field>
|
|
1008
1301
|
</div>
|
|
1009
1302
|
|
|
1010
1303
|
@if (diagnostics.length) {
|
|
1011
1304
|
<div class="editor-diagnostics">
|
|
1012
1305
|
<div class="editor-diagnostics-title">{{ t('editor.diagnostics.title', 'Diagnosticos de authoring') }}</div>
|
|
1013
|
-
@for (diagnostic of diagnostics; track
|
|
1306
|
+
@for (diagnostic of diagnostics; track $index) {
|
|
1014
1307
|
<div
|
|
1015
1308
|
class="editor-diagnostic"
|
|
1016
1309
|
[class.level-error]="diagnostic.level === 'error'"
|
|
@@ -1041,19 +1334,19 @@ class PraxisTabsConfigEditor {
|
|
|
1041
1334
|
<div class="editor-section">
|
|
1042
1335
|
<div class="editor-grid two">
|
|
1043
1336
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.groupAlignTabs', 'Alinhamento das abas') }}</mat-label>
|
|
1044
|
-
<select
|
|
1045
|
-
<option [
|
|
1046
|
-
<option value="start">{{ t('editor.options.start', 'Inicio') }}</option>
|
|
1047
|
-
<option value="center">{{ t('editor.options.center', 'Centro') }}</option>
|
|
1048
|
-
<option value="end">{{ t('editor.options.end', 'Fim') }}</option>
|
|
1049
|
-
</select>
|
|
1337
|
+
<mat-select [(ngModel)]="group.alignTabs" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.options.default', 'Padrao')">
|
|
1338
|
+
<mat-option [value]="undefined">{{ t('editor.options.default', 'Padrao') }}</mat-option>
|
|
1339
|
+
<mat-option value="start">{{ t('editor.options.start', 'Inicio') }}</mat-option>
|
|
1340
|
+
<mat-option value="center">{{ t('editor.options.center', 'Centro') }}</mat-option>
|
|
1341
|
+
<mat-option value="end">{{ t('editor.options.end', 'Fim') }}</mat-option>
|
|
1342
|
+
</mat-select>
|
|
1050
1343
|
</mat-form-field>
|
|
1051
1344
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.groupHeaderPosition', 'Posicao do header') }}</mat-label>
|
|
1052
|
-
<select
|
|
1053
|
-
<option [
|
|
1054
|
-
<option value="above">{{ t('editor.options.above', 'Acima') }}</option>
|
|
1055
|
-
<option value="below">{{ t('editor.options.below', 'Abaixo') }}</option>
|
|
1056
|
-
</select>
|
|
1345
|
+
<mat-select [(ngModel)]="group.headerPosition" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.options.aboveDefault', 'Acima (padrao)')">
|
|
1346
|
+
<mat-option [value]="undefined">{{ t('editor.options.aboveDefault', 'Acima (padrao)') }}</mat-option>
|
|
1347
|
+
<mat-option value="above">{{ t('editor.options.above', 'Acima') }}</mat-option>
|
|
1348
|
+
<mat-option value="below">{{ t('editor.options.below', 'Abaixo') }}</mat-option>
|
|
1349
|
+
</mat-select>
|
|
1057
1350
|
</mat-form-field>
|
|
1058
1351
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.selectedIndex', 'Indice selecionado') }}</mat-label>
|
|
1059
1352
|
<input matInput type="number" [(ngModel)]="group.selectedIndex" (ngModelChange)="onAppearanceChange()" />
|
|
@@ -1080,12 +1373,12 @@ class PraxisTabsConfigEditor {
|
|
|
1080
1373
|
></button>
|
|
1081
1374
|
</mat-form-field>
|
|
1082
1375
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.color', 'Cor (M2)') }}</mat-label>
|
|
1083
|
-
<select
|
|
1084
|
-
<option [
|
|
1085
|
-
<option value="primary">{{ t('editor.options.primary', 'Primary') }}</option>
|
|
1086
|
-
<option value="accent">{{ t('editor.options.accent', 'Accent') }}</option>
|
|
1087
|
-
<option value="warn">{{ t('editor.options.warn', 'Warn') }}</option>
|
|
1088
|
-
</select>
|
|
1376
|
+
<mat-select [(ngModel)]="group.color" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.options.none', '(nenhuma)')">
|
|
1377
|
+
<mat-option [value]="undefined">{{ t('editor.options.none', '(nenhuma)') }}</mat-option>
|
|
1378
|
+
<mat-option value="primary">{{ t('editor.options.primary', 'Primary') }}</mat-option>
|
|
1379
|
+
<mat-option value="accent">{{ t('editor.options.accent', 'Accent') }}</mat-option>
|
|
1380
|
+
<mat-option value="warn">{{ t('editor.options.warn', 'Warn') }}</mat-option>
|
|
1381
|
+
</mat-select>
|
|
1089
1382
|
<button
|
|
1090
1383
|
praxisIconButton="help_outline"
|
|
1091
1384
|
size="dense"
|
|
@@ -1097,12 +1390,12 @@ class PraxisTabsConfigEditor {
|
|
|
1097
1390
|
></button>
|
|
1098
1391
|
</mat-form-field>
|
|
1099
1392
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.backgroundColor', 'Cor de fundo (M2)') }}</mat-label>
|
|
1100
|
-
<select
|
|
1101
|
-
<option [
|
|
1102
|
-
<option value="primary">{{ t('editor.options.primary', 'Primary') }}</option>
|
|
1103
|
-
<option value="accent">{{ t('editor.options.accent', 'Accent') }}</option>
|
|
1104
|
-
<option value="warn">{{ t('editor.options.warn', 'Warn') }}</option>
|
|
1105
|
-
</select>
|
|
1393
|
+
<mat-select [(ngModel)]="group.backgroundColor" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.options.none', '(nenhuma)')">
|
|
1394
|
+
<mat-option [value]="undefined">{{ t('editor.options.none', '(nenhuma)') }}</mat-option>
|
|
1395
|
+
<mat-option value="primary">{{ t('editor.options.primary', 'Primary') }}</mat-option>
|
|
1396
|
+
<mat-option value="accent">{{ t('editor.options.accent', 'Accent') }}</mat-option>
|
|
1397
|
+
<mat-option value="warn">{{ t('editor.options.warn', 'Warn') }}</mat-option>
|
|
1398
|
+
</mat-select>
|
|
1106
1399
|
<button
|
|
1107
1400
|
praxisIconButton="help_outline"
|
|
1108
1401
|
size="dense"
|
|
@@ -1166,12 +1459,12 @@ class PraxisTabsConfigEditor {
|
|
|
1166
1459
|
<input matInput [(ngModel)]="nav.ariaLabelledby" (ngModelChange)="onAppearanceChange()" />
|
|
1167
1460
|
</mat-form-field>
|
|
1168
1461
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.color', 'Cor (M2)') }}</mat-label>
|
|
1169
|
-
<select
|
|
1170
|
-
<option [
|
|
1171
|
-
<option value="primary">{{ t('editor.options.primary', 'Primary') }}</option>
|
|
1172
|
-
<option value="accent">{{ t('editor.options.accent', 'Accent') }}</option>
|
|
1173
|
-
<option value="warn">{{ t('editor.options.warn', 'Warn') }}</option>
|
|
1174
|
-
</select>
|
|
1462
|
+
<mat-select [(ngModel)]="nav.color" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.options.none', '(nenhuma)')">
|
|
1463
|
+
<mat-option [value]="undefined">{{ t('editor.options.none', '(nenhuma)') }}</mat-option>
|
|
1464
|
+
<mat-option value="primary">{{ t('editor.options.primary', 'Primary') }}</mat-option>
|
|
1465
|
+
<mat-option value="accent">{{ t('editor.options.accent', 'Accent') }}</mat-option>
|
|
1466
|
+
<mat-option value="warn">{{ t('editor.options.warn', 'Warn') }}</mat-option>
|
|
1467
|
+
</mat-select>
|
|
1175
1468
|
<button
|
|
1176
1469
|
praxisIconButton="help_outline"
|
|
1177
1470
|
size="dense"
|
|
@@ -1183,12 +1476,12 @@ class PraxisTabsConfigEditor {
|
|
|
1183
1476
|
></button>
|
|
1184
1477
|
</mat-form-field>
|
|
1185
1478
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.backgroundColor', 'Cor de fundo (M2)') }}</mat-label>
|
|
1186
|
-
<select
|
|
1187
|
-
<option [
|
|
1188
|
-
<option value="primary">{{ t('editor.options.primary', 'Primary') }}</option>
|
|
1189
|
-
<option value="accent">{{ t('editor.options.accent', 'Accent') }}</option>
|
|
1190
|
-
<option value="warn">{{ t('editor.options.warn', 'Warn') }}</option>
|
|
1191
|
-
</select>
|
|
1479
|
+
<mat-select [(ngModel)]="nav.backgroundColor" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.options.none', '(nenhuma)')">
|
|
1480
|
+
<mat-option [value]="undefined">{{ t('editor.options.none', '(nenhuma)') }}</mat-option>
|
|
1481
|
+
<mat-option value="primary">{{ t('editor.options.primary', 'Primary') }}</mat-option>
|
|
1482
|
+
<mat-option value="accent">{{ t('editor.options.accent', 'Accent') }}</mat-option>
|
|
1483
|
+
<mat-option value="warn">{{ t('editor.options.warn', 'Warn') }}</mat-option>
|
|
1484
|
+
</mat-select>
|
|
1192
1485
|
<button
|
|
1193
1486
|
praxisIconButton="help_outline"
|
|
1194
1487
|
size="dense"
|
|
@@ -1256,6 +1549,10 @@ class PraxisTabsConfigEditor {
|
|
|
1256
1549
|
<mat-icon [praxisIcon]="'visibility'"></mat-icon>
|
|
1257
1550
|
{{ t('editor.presets.highContrast', 'Alto contraste') }}
|
|
1258
1551
|
</button>
|
|
1552
|
+
<button mat-button (click)="applyPreset('pill')">
|
|
1553
|
+
<mat-icon [praxisIcon]="'pill'"></mat-icon>
|
|
1554
|
+
{{ t('editor.presets.pill', 'Pill (cápsula)') }}
|
|
1555
|
+
</button>
|
|
1259
1556
|
<button mat-button (click)="clearTokens()">
|
|
1260
1557
|
<mat-icon [praxisIcon]="'backspace'"></mat-icon>
|
|
1261
1558
|
{{ t('editor.actions.clearTokens', 'Limpar tokens') }}
|
|
@@ -1263,6 +1560,16 @@ class PraxisTabsConfigEditor {
|
|
|
1263
1560
|
</div>
|
|
1264
1561
|
|
|
1265
1562
|
<div class="editor-grid two tight">
|
|
1563
|
+
<mat-form-field appearance="outline">
|
|
1564
|
+
<mat-label>{{ t('editor.fields.variant', 'Variante visual') }}</mat-label>
|
|
1565
|
+
<mat-select [(ngModel)]="appearance.variant" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.variant.underline', 'Sublinhado (Underline)')">
|
|
1566
|
+
<mat-option [value]="undefined">{{ t('editor.options.default', 'Padrao') }}</mat-option>
|
|
1567
|
+
<mat-option value="underline">{{ t('editor.variant.underline', 'Sublinhado (Underline)') }}</mat-option>
|
|
1568
|
+
<mat-option value="pill">{{ t('editor.variant.pill', 'Capsula (Pill)') }}</mat-option>
|
|
1569
|
+
<mat-option value="segmented">{{ t('editor.variant.segmented', 'Segmentado (Segmented)') }}</mat-option>
|
|
1570
|
+
</mat-select>
|
|
1571
|
+
</mat-form-field>
|
|
1572
|
+
|
|
1266
1573
|
<mat-form-field appearance="outline">
|
|
1267
1574
|
<mat-label>{{ t('editor.fields.themeClass', 'Classe de tema (opcional)') }}</mat-label>
|
|
1268
1575
|
<input matInput [(ngModel)]="appearance.themeClass" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.fields.placeholder.themeClass', 'ex.: tabs-accented')" />
|
|
@@ -1270,12 +1577,12 @@ class PraxisTabsConfigEditor {
|
|
|
1270
1577
|
|
|
1271
1578
|
<mat-form-field appearance="outline">
|
|
1272
1579
|
<mat-label>{{ t('editor.fields.density', 'Densidade') }}</mat-label>
|
|
1273
|
-
<select
|
|
1274
|
-
<option [
|
|
1275
|
-
<option value="compact">{{ t('editor.density.compact', 'Compacta') }}</option>
|
|
1276
|
-
<option value="comfortable">{{ t('editor.density.comfortable', 'Confortavel') }}</option>
|
|
1277
|
-
<option value="spacious">{{ t('editor.density.spacious', 'Espacosa') }}</option>
|
|
1278
|
-
</select>
|
|
1580
|
+
<mat-select [(ngModel)]="appearance.density" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.density.default', 'Padrao')">
|
|
1581
|
+
<mat-option [value]="undefined">{{ t('editor.density.default', 'Padrao') }}</mat-option>
|
|
1582
|
+
<mat-option value="compact">{{ t('editor.density.compact', 'Compacta') }}</mat-option>
|
|
1583
|
+
<mat-option value="comfortable">{{ t('editor.density.comfortable', 'Confortavel') }}</mat-option>
|
|
1584
|
+
<mat-option value="spacious">{{ t('editor.density.spacious', 'Espacosa') }}</mat-option>
|
|
1585
|
+
</mat-select>
|
|
1279
1586
|
</mat-form-field>
|
|
1280
1587
|
</div>
|
|
1281
1588
|
|
|
@@ -1292,7 +1599,7 @@ class PraxisTabsConfigEditor {
|
|
|
1292
1599
|
></button>
|
|
1293
1600
|
</div>
|
|
1294
1601
|
<div class="editor-grid two">
|
|
1295
|
-
@for (token of tokenList; track token) {
|
|
1602
|
+
@for (token of tokenList; track token.key) {
|
|
1296
1603
|
<mat-form-field appearance="outline">
|
|
1297
1604
|
<mat-label>{{ t(token.labelKey, token.fallback) }}</mat-label>
|
|
1298
1605
|
<input matInput [placeholder]="t('editor.placeholders.tokenValue', 'var(--md-sys-color-primary) / #RRGGBB')" [ngModel]="appearance.tokens?.[token.key]" (ngModelChange)="onTokenChange(token.key, $event)" />
|
|
@@ -1324,7 +1631,7 @@ class PraxisTabsConfigEditor {
|
|
|
1324
1631
|
<button mat-stroked-button color="primary" (click)="addTab()"><mat-icon [praxisIcon]="'add'"></mat-icon>{{ t('editor.actions.addTab', 'Adicionar aba') }}</button>
|
|
1325
1632
|
@if (editedConfig.tabs?.length) {
|
|
1326
1633
|
<div class="editor-grid">
|
|
1327
|
-
@for (tab of editedConfig.tabs; track
|
|
1634
|
+
@for (tab of editedConfig.tabs; track $index; let i = $index) {
|
|
1328
1635
|
<div class="editor-card">
|
|
1329
1636
|
<div class="editor-card-header">
|
|
1330
1637
|
<strong class="editor-card-title">{{ t('editor.cards.tab', 'Aba') }} #{{ i+1 }}</strong>
|
|
@@ -1354,6 +1661,16 @@ class PraxisTabsConfigEditor {
|
|
|
1354
1661
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.ariaLabelledby', 'aria-labelledby') }}</mat-label>
|
|
1355
1662
|
<input matInput [(ngModel)]="tab.ariaLabelledby" (ngModelChange)="onAppearanceChange()" />
|
|
1356
1663
|
</mat-form-field>
|
|
1664
|
+
<mat-form-field appearance="outline">
|
|
1665
|
+
<mat-label>{{ t('editor.fields.tone', 'Tom do item') }}</mat-label>
|
|
1666
|
+
<mat-select [(ngModel)]="tab.tone" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.tone.default', 'Padrao')">
|
|
1667
|
+
<mat-option [value]="undefined">{{ t('editor.tone.default', 'Padrao') }}</mat-option>
|
|
1668
|
+
<mat-option value="default">{{ t('editor.tone.default', 'Padrao') }}</mat-option>
|
|
1669
|
+
<mat-option value="primary">{{ t('editor.tone.primary', 'Primario') }}</mat-option>
|
|
1670
|
+
<mat-option value="accent">{{ t('editor.tone.accent', 'Destaque (Accent)') }}</mat-option>
|
|
1671
|
+
<mat-option value="outlined">{{ t('editor.tone.outlined', 'Contorno ativo (Outlined)') }}</mat-option>
|
|
1672
|
+
</mat-select>
|
|
1673
|
+
</mat-form-field>
|
|
1357
1674
|
</div>
|
|
1358
1675
|
<div class="editor-row">
|
|
1359
1676
|
<mat-slide-toggle [(ngModel)]="tab.disabled" (ngModelChange)="onAppearanceChange()">{{ t('editor.toggles.disabled', 'Desativada') }}</mat-slide-toggle>
|
|
@@ -1364,12 +1681,12 @@ class PraxisTabsConfigEditor {
|
|
|
1364
1681
|
<div class="editor-row">
|
|
1365
1682
|
<mat-form-field appearance="outline" class="editor-field-min">
|
|
1366
1683
|
<mat-label>{{ t('editor.fields.addComponent', 'Adicionar componente') }}</mat-label>
|
|
1367
|
-
<select
|
|
1368
|
-
<option [
|
|
1369
|
-
@for (c of componentOptions; track c) {
|
|
1370
|
-
<option [
|
|
1684
|
+
<mat-select [(ngModel)]="selectedTabWidgetId[i]" [placeholder]="t('editor.fields.selectPlaceholder', '(selecione)')">
|
|
1685
|
+
<mat-option [value]="''">{{ t('editor.fields.selectPlaceholder', '(selecione)') }}</mat-option>
|
|
1686
|
+
@for (c of componentOptions; track c.id) {
|
|
1687
|
+
<mat-option [value]="c.id">{{ c.friendlyName || c.id }}</mat-option>
|
|
1371
1688
|
}
|
|
1372
|
-
</select>
|
|
1689
|
+
</mat-select>
|
|
1373
1690
|
</mat-form-field>
|
|
1374
1691
|
<button mat-stroked-button (click)="addWidgetToTab(i)"><mat-icon [praxisIcon]="'add'"></mat-icon>{{ t('editor.actions.add', 'Adicionar') }}</button>
|
|
1375
1692
|
<span class="editor-spacer"></span>
|
|
@@ -1383,13 +1700,17 @@ class PraxisTabsConfigEditor {
|
|
|
1383
1700
|
</div>
|
|
1384
1701
|
@if (tab.widgets?.length) {
|
|
1385
1702
|
<div class="editor-grid" cdkDropList [cdkDropListData]="tab.widgets || []" (cdkDropListDropped)="onTabWidgetDrop(i, $event)">
|
|
1386
|
-
@for (w of tab.widgets; track
|
|
1703
|
+
@for (w of tab.widgets; track $index; let wi = $index) {
|
|
1387
1704
|
<div cdkDrag class="editor-card dashed">
|
|
1388
1705
|
<div class="editor-card-header">
|
|
1389
1706
|
<button praxisIconButton="drag_indicator" size="compact" type="button" cdkDragHandle [matTooltip]="t('editor.actions.dragToReorder', 'Arrastar para reordenar')" [attr.aria-label]="t('editor.actions.dragToReorder', 'Arrastar para reordenar')"></button>
|
|
1390
1707
|
<strong class="editor-card-title">{{ getCompName(w.id) }}</strong>
|
|
1391
1708
|
<button praxisIconButton="delete" size="compact" type="button" class="editor-icon-action--danger" (click)="removeWidgetFromTab(i, wi)" [matTooltip]="t('editor.actions.removeComponent', 'Remover componente')" [attr.aria-label]="t('editor.actions.removeComponent', 'Remover componente')"></button>
|
|
1392
1709
|
</div>
|
|
1710
|
+
<mat-form-field appearance="outline">
|
|
1711
|
+
<mat-label>{{ t('editor.fields.childWidgetKey', 'Chave da instancia (childWidgetKey)') }}</mat-label>
|
|
1712
|
+
<input matInput [ngModel]="w.childWidgetKey || ''" (ngModelChange)="updateWidgetKeyTab(i, wi, $event)" />
|
|
1713
|
+
</mat-form-field>
|
|
1393
1714
|
<div class="editor-grid two tight">
|
|
1394
1715
|
<mat-form-field appearance="outline">
|
|
1395
1716
|
<mat-label>{{ t('editor.fields.inputsJson', 'Inputs (JSON)') }}</mat-label>
|
|
@@ -1428,7 +1749,7 @@ class PraxisTabsConfigEditor {
|
|
|
1428
1749
|
<button mat-stroked-button color="primary" (click)="addLink()"><mat-icon [praxisIcon]="'add_link'"></mat-icon>{{ t('editor.actions.addLink', 'Adicionar link') }}</button>
|
|
1429
1750
|
@if (nav.links?.length) {
|
|
1430
1751
|
<div class="editor-grid">
|
|
1431
|
-
@for (l of nav.links; track
|
|
1752
|
+
@for (l of nav.links; track $index; let i = $index) {
|
|
1432
1753
|
<div class="editor-card">
|
|
1433
1754
|
<div class="editor-card-header">
|
|
1434
1755
|
<strong class="editor-card-title">{{ t('editor.cards.link', 'Link') }} #{{ i+1 }}</strong>
|
|
@@ -1446,6 +1767,19 @@ class PraxisTabsConfigEditor {
|
|
|
1446
1767
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.icon', 'Icone') }}</mat-label>
|
|
1447
1768
|
<input matInput [(ngModel)]="l.icon" (ngModelChange)="onAppearanceChange()" />
|
|
1448
1769
|
</mat-form-field>
|
|
1770
|
+
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.labelClass', 'Classe do rotulo') }}</mat-label>
|
|
1771
|
+
<input matInput [(ngModel)]="l.labelClass" (ngModelChange)="onAppearanceChange()" />
|
|
1772
|
+
</mat-form-field>
|
|
1773
|
+
<mat-form-field appearance="outline">
|
|
1774
|
+
<mat-label>{{ t('editor.fields.tone', 'Tom do item') }}</mat-label>
|
|
1775
|
+
<mat-select [(ngModel)]="l.tone" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.tone.default', 'Padrao')">
|
|
1776
|
+
<mat-option [value]="undefined">{{ t('editor.tone.default', 'Padrao') }}</mat-option>
|
|
1777
|
+
<mat-option value="default">{{ t('editor.tone.default', 'Padrao') }}</mat-option>
|
|
1778
|
+
<mat-option value="primary">{{ t('editor.tone.primary', 'Primario') }}</mat-option>
|
|
1779
|
+
<mat-option value="accent">{{ t('editor.tone.accent', 'Destaque (Accent)') }}</mat-option>
|
|
1780
|
+
<mat-option value="outlined">{{ t('editor.tone.outlined', 'Contorno ativo (Outlined)') }}</mat-option>
|
|
1781
|
+
</mat-select>
|
|
1782
|
+
</mat-form-field>
|
|
1449
1783
|
</div>
|
|
1450
1784
|
<div class="editor-row">
|
|
1451
1785
|
<mat-slide-toggle [(ngModel)]="l.disabled" (ngModelChange)="onAppearanceChange()">{{ t('editor.toggles.linkDisabled', 'Desativado') }}</mat-slide-toggle>
|
|
@@ -1458,12 +1792,12 @@ class PraxisTabsConfigEditor {
|
|
|
1458
1792
|
<div class="editor-row">
|
|
1459
1793
|
<mat-form-field appearance="outline" class="editor-field-min">
|
|
1460
1794
|
<mat-label>{{ t('editor.fields.addComponent', 'Adicionar componente') }}</mat-label>
|
|
1461
|
-
<select
|
|
1462
|
-
<option [
|
|
1463
|
-
@for (c of componentOptions; track c) {
|
|
1464
|
-
<option [
|
|
1795
|
+
<mat-select [(ngModel)]="selectedLinkWidgetId[i]" [placeholder]="t('editor.fields.selectPlaceholder', '(selecione)')">
|
|
1796
|
+
<mat-option [value]="''">{{ t('editor.fields.selectPlaceholder', '(selecione)') }}</mat-option>
|
|
1797
|
+
@for (c of componentOptions; track c.id) {
|
|
1798
|
+
<mat-option [value]="c.id">{{ c.friendlyName || c.id }}</mat-option>
|
|
1465
1799
|
}
|
|
1466
|
-
</select>
|
|
1800
|
+
</mat-select>
|
|
1467
1801
|
</mat-form-field>
|
|
1468
1802
|
<button mat-stroked-button (click)="addWidgetToLink(i)"><mat-icon [praxisIcon]="'add'"></mat-icon>{{ t('editor.actions.add', 'Adicionar') }}</button>
|
|
1469
1803
|
<span class="editor-spacer"></span>
|
|
@@ -1477,13 +1811,17 @@ class PraxisTabsConfigEditor {
|
|
|
1477
1811
|
</div>
|
|
1478
1812
|
@if (l.widgets?.length) {
|
|
1479
1813
|
<div class="editor-grid" cdkDropList [cdkDropListData]="l.widgets || []" (cdkDropListDropped)="onLinkWidgetDrop(i, $event)">
|
|
1480
|
-
@for (w of l.widgets; track
|
|
1814
|
+
@for (w of l.widgets; track $index; let wi = $index) {
|
|
1481
1815
|
<div cdkDrag class="editor-card dashed">
|
|
1482
1816
|
<div class="editor-card-header">
|
|
1483
1817
|
<button praxisIconButton="drag_indicator" size="compact" type="button" cdkDragHandle [matTooltip]="t('editor.actions.dragToReorder', 'Arrastar para reordenar')" [attr.aria-label]="t('editor.actions.dragToReorder', 'Arrastar para reordenar')"></button>
|
|
1484
1818
|
<strong class="editor-card-title">{{ getCompName(w.id) }}</strong>
|
|
1485
1819
|
<button praxisIconButton="delete" size="compact" type="button" class="editor-icon-action--danger" (click)="removeWidgetFromLink(i, wi)" [matTooltip]="t('editor.actions.removeComponent', 'Remover componente')" [attr.aria-label]="t('editor.actions.removeComponent', 'Remover componente')"></button>
|
|
1486
1820
|
</div>
|
|
1821
|
+
<mat-form-field appearance="outline">
|
|
1822
|
+
<mat-label>{{ t('editor.fields.childWidgetKey', 'Chave da instancia (childWidgetKey)') }}</mat-label>
|
|
1823
|
+
<input matInput [ngModel]="w.childWidgetKey || ''" (ngModelChange)="updateWidgetKeyLink(i, wi, $event)" />
|
|
1824
|
+
</mat-form-field>
|
|
1487
1825
|
<div class="editor-grid two tight">
|
|
1488
1826
|
<mat-form-field appearance="outline">
|
|
1489
1827
|
<mat-label>{{ t('editor.fields.inputsJson', 'Inputs (JSON)') }}</mat-label>
|
|
@@ -1509,7 +1847,7 @@ class PraxisTabsConfigEditor {
|
|
|
1509
1847
|
</mat-tab>
|
|
1510
1848
|
</mat-tab-group>
|
|
1511
1849
|
</div>
|
|
1512
|
-
`, isInline: true, styles: [":host{display:block;color:var(--md-sys-color-on-surface)}.editor-shell{display:grid;gap:12px}.editor-topbar{display:flex;align-items:start;justify-content:flex-start}.editor-mode-field{width:min(320px,100%)}.editor-diagnostics{display:grid;gap:8px}.editor-diagnostics-title{font-size:.95rem;font-weight:600;color:var(--md-sys-color-on-surface)}.editor-diagnostic{display:grid;gap:4px;padding:10px 12px;border-radius:10px;border:1px solid var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container);color:var(--md-sys-color-on-surface)}.editor-diagnostic code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;color:var(--md-sys-color-on-surface-variant)}.editor-diagnostic.level-error{background:var(--md-sys-color-error-container);color:var(--md-sys-color-on-error-container);border-color:var(--md-sys-color-error)}.editor-diagnostic.level-warning{background:var(--md-sys-color-tertiary-container, var(--md-sys-color-surface-container));color:var(--md-sys-color-on-tertiary-container, var(--md-sys-color-on-surface));border-color:var(--md-sys-color-outline-variant)}.editor-tabs{--editor-surface: var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface));--editor-border: 1px solid var(--md-sys-color-outline-variant);--editor-radius: 12px;--editor-muted: var(--md-sys-color-on-surface-variant)}.editor-section{padding:12px;display:grid;gap:12px;background:var(--editor-surface);border:var(--editor-border);border-radius:var(--editor-radius)}.editor-section-lg{gap:16px}.editor-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.editor-grid{display:grid;gap:12px}.editor-grid.two{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.editor-grid.tight{gap:8px}.editor-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.editor-muted{color:var(--editor-muted)}.editor-title{margin:6px 0 8px;font-size:1rem}.editor-title-row{display:flex;align-items:center;gap:8px}.editor-code{white-space:pre-wrap;background:var(--md-sys-color-surface-container);padding:8px;border-radius:6px;border:1px solid var(--md-sys-color-outline-variant)}.editor-card{border:1px solid var(--md-sys-color-outline-variant);padding:10px;border-radius:10px;display:grid;gap:8px;background:var(--md-sys-color-surface)}.editor-card.dashed{border-style:dashed}.editor-card-header{display:flex;align-items:center;gap:8px}.editor-card-title{flex:1;font-weight:600}.editor-divider{border-top:1px solid var(--md-sys-color-outline-variant);padding-top:8px}.editor-spacer{flex:1}.editor-field-min{min-width:260px}.editor-section .editor-field-min{width:260px;max-width:260px}.editor-field-240{width:240px}.editor-section .editor-field-240{width:240px;max-width:240px}.editor-json{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.editor-section .mat-mdc-form-field{width:100%;max-width:520px;--mdc-outlined-text-field-container-height: 48px;--mdc-outlined-text-field-outline-color: var(--md-sys-color-outline-variant);--mdc-outlined-text-field-hover-outline-color: var(--md-sys-color-outline);--mdc-outlined-text-field-focus-outline-color: var(--md-sys-color-primary);--mdc-outlined-text-field-error-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-error-focus-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-error-hover-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-label-text-color: var(--md-sys-color-on-surface-variant);--mdc-outlined-text-field-input-text-color: var(--md-sys-color-on-surface);--mdc-outlined-text-field-supporting-text-color: var(--md-sys-color-on-surface-variant)}.editor-section .mat-mdc-form-field.full{max-width:none}.editor-icon-action--danger{color:var(--md-sys-color-error)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2_1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2_1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2_1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2_1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2_1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2_1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2_1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i8.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i9.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i9.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i9.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
|
|
1850
|
+
`, isInline: true, styles: [":host{display:block;container-type:inline-size;color:var(--pfx-settings-panel-text-primary, var(--md-sys-color-on-surface))}.editor-shell{display:grid;gap:12px}.editor-topbar{display:flex;align-items:start;justify-content:flex-start}.editor-mode-field{width:min(320px,100%)}.editor-diagnostics{display:grid;gap:8px}.editor-diagnostics-title{font-size:.95rem;font-weight:600;color:var(--md-sys-color-on-surface)}.editor-diagnostic{display:grid;gap:4px;padding:10px 12px;border-radius:10px;border:1px solid var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container);color:var(--md-sys-color-on-surface)}.editor-diagnostic code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;color:var(--md-sys-color-on-surface-variant)}.editor-diagnostic.level-error{background:var(--md-sys-color-error-container);color:var(--md-sys-color-on-error-container);border-color:var(--md-sys-color-error)}.editor-diagnostic.level-warning{background:var(--md-sys-color-tertiary-container, var(--md-sys-color-surface-container));color:var(--md-sys-color-on-tertiary-container, var(--md-sys-color-on-surface));border-color:var(--md-sys-color-outline-variant)}.editor-tabs{--editor-surface: var(--pfx-settings-panel-surface-elevated, var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface)));--editor-border: 1px solid var(--pfx-settings-panel-border, var(--md-sys-color-outline-variant));--editor-radius: 12px;--editor-muted: var(--pfx-settings-panel-text-secondary, var(--md-sys-color-on-surface-variant))}.editor-section{padding:12px;display:grid;gap:12px;background:var(--editor-surface);border:var(--editor-border);border-radius:var(--editor-radius)}.editor-section-lg{gap:16px}.editor-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.editor-grid{display:grid;gap:12px}.editor-grid.two{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.editor-grid.tight{gap:8px}.editor-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.editor-muted{color:var(--editor-muted)}.editor-title{margin:6px 0 8px;font-size:1rem}.editor-title-row{display:flex;align-items:center;gap:8px}.editor-code{white-space:pre-wrap;background:var(--md-sys-color-surface-container);padding:8px;border-radius:6px;border:1px solid var(--md-sys-color-outline-variant)}.editor-card{border:1px solid var(--pfx-settings-panel-border, var(--md-sys-color-outline-variant));padding:10px;border-radius:10px;display:grid;gap:8px;background:var(--pfx-settings-panel-surface, var(--md-sys-color-surface))}.editor-card.dashed{border-style:dashed}.editor-card-header{display:flex;align-items:center;gap:8px}.editor-card-title{flex:1;font-weight:600}.editor-divider{border-top:1px solid var(--pfx-settings-panel-border, var(--md-sys-color-outline-variant));padding-top:8px}.editor-spacer{flex:1}.editor-field-min{min-width:260px}.editor-section .editor-field-min{width:260px;max-width:260px}.editor-field-240{width:240px}.editor-section .editor-field-240{width:240px;max-width:240px}@container (max-width: 640px){.editor-grid.two{grid-template-columns:1fr}.editor-field-min,.editor-section .editor-field-min,.editor-field-240,.editor-section .editor-field-240{min-width:0;width:100%;max-width:100%}}.editor-json{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.editor-section .mat-mdc-form-field{width:100%;max-width:520px;--mdc-outlined-text-field-container-height: 48px;--mdc-outlined-text-field-outline-color: var(--md-sys-color-outline-variant);--mdc-outlined-text-field-hover-outline-color: var(--md-sys-color-outline);--mdc-outlined-text-field-focus-outline-color: var(--md-sys-color-primary);--mdc-outlined-text-field-error-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-error-focus-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-error-hover-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-label-text-color: var(--md-sys-color-on-surface-variant);--mdc-outlined-text-field-input-text-color: var(--md-sys-color-on-surface);--mdc-outlined-text-field-supporting-text-color: var(--md-sys-color-on-surface-variant)}.editor-section .mat-mdc-form-field.full{max-width:none}.editor-icon-action--danger{color:var(--md-sys-color-error)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2_1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2_1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2_1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2_1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i9.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i10.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i10.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i10.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i11.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
|
|
1513
1851
|
}
|
|
1514
1852
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisTabsConfigEditor, decorators: [{
|
|
1515
1853
|
type: Component,
|
|
@@ -1518,6 +1856,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1518
1856
|
MatTabsModule,
|
|
1519
1857
|
MatFormFieldModule,
|
|
1520
1858
|
MatInputModule,
|
|
1859
|
+
MatSelectModule,
|
|
1521
1860
|
MatIconModule,
|
|
1522
1861
|
PraxisIconDirective,
|
|
1523
1862
|
PraxisIconButtonComponent,
|
|
@@ -1530,17 +1869,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1530
1869
|
<div class="editor-topbar">
|
|
1531
1870
|
<mat-form-field appearance="outline" class="editor-mode-field">
|
|
1532
1871
|
<mat-label>{{ t('editor.fields.mode', 'Modo principal') }}</mat-label>
|
|
1533
|
-
<select
|
|
1534
|
-
<option value="group">{{ t('editor.mode.group', 'Grupo de abas') }}</option>
|
|
1535
|
-
<option value="nav">{{ t('editor.mode.nav', 'Navegacao por links') }}</option>
|
|
1536
|
-
</select>
|
|
1872
|
+
<mat-select [ngModel]="primaryMode" (ngModelChange)="setPrimaryMode($event)">
|
|
1873
|
+
<mat-option value="group">{{ t('editor.mode.group', 'Grupo de abas') }}</mat-option>
|
|
1874
|
+
<mat-option value="nav">{{ t('editor.mode.nav', 'Navegacao por links') }}</mat-option>
|
|
1875
|
+
</mat-select>
|
|
1537
1876
|
</mat-form-field>
|
|
1538
1877
|
</div>
|
|
1539
1878
|
|
|
1540
1879
|
@if (diagnostics.length) {
|
|
1541
1880
|
<div class="editor-diagnostics">
|
|
1542
1881
|
<div class="editor-diagnostics-title">{{ t('editor.diagnostics.title', 'Diagnosticos de authoring') }}</div>
|
|
1543
|
-
@for (diagnostic of diagnostics; track
|
|
1882
|
+
@for (diagnostic of diagnostics; track $index) {
|
|
1544
1883
|
<div
|
|
1545
1884
|
class="editor-diagnostic"
|
|
1546
1885
|
[class.level-error]="diagnostic.level === 'error'"
|
|
@@ -1571,19 +1910,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1571
1910
|
<div class="editor-section">
|
|
1572
1911
|
<div class="editor-grid two">
|
|
1573
1912
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.groupAlignTabs', 'Alinhamento das abas') }}</mat-label>
|
|
1574
|
-
<select
|
|
1575
|
-
<option [
|
|
1576
|
-
<option value="start">{{ t('editor.options.start', 'Inicio') }}</option>
|
|
1577
|
-
<option value="center">{{ t('editor.options.center', 'Centro') }}</option>
|
|
1578
|
-
<option value="end">{{ t('editor.options.end', 'Fim') }}</option>
|
|
1579
|
-
</select>
|
|
1913
|
+
<mat-select [(ngModel)]="group.alignTabs" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.options.default', 'Padrao')">
|
|
1914
|
+
<mat-option [value]="undefined">{{ t('editor.options.default', 'Padrao') }}</mat-option>
|
|
1915
|
+
<mat-option value="start">{{ t('editor.options.start', 'Inicio') }}</mat-option>
|
|
1916
|
+
<mat-option value="center">{{ t('editor.options.center', 'Centro') }}</mat-option>
|
|
1917
|
+
<mat-option value="end">{{ t('editor.options.end', 'Fim') }}</mat-option>
|
|
1918
|
+
</mat-select>
|
|
1580
1919
|
</mat-form-field>
|
|
1581
1920
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.groupHeaderPosition', 'Posicao do header') }}</mat-label>
|
|
1582
|
-
<select
|
|
1583
|
-
<option [
|
|
1584
|
-
<option value="above">{{ t('editor.options.above', 'Acima') }}</option>
|
|
1585
|
-
<option value="below">{{ t('editor.options.below', 'Abaixo') }}</option>
|
|
1586
|
-
</select>
|
|
1921
|
+
<mat-select [(ngModel)]="group.headerPosition" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.options.aboveDefault', 'Acima (padrao)')">
|
|
1922
|
+
<mat-option [value]="undefined">{{ t('editor.options.aboveDefault', 'Acima (padrao)') }}</mat-option>
|
|
1923
|
+
<mat-option value="above">{{ t('editor.options.above', 'Acima') }}</mat-option>
|
|
1924
|
+
<mat-option value="below">{{ t('editor.options.below', 'Abaixo') }}</mat-option>
|
|
1925
|
+
</mat-select>
|
|
1587
1926
|
</mat-form-field>
|
|
1588
1927
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.selectedIndex', 'Indice selecionado') }}</mat-label>
|
|
1589
1928
|
<input matInput type="number" [(ngModel)]="group.selectedIndex" (ngModelChange)="onAppearanceChange()" />
|
|
@@ -1610,12 +1949,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1610
1949
|
></button>
|
|
1611
1950
|
</mat-form-field>
|
|
1612
1951
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.color', 'Cor (M2)') }}</mat-label>
|
|
1613
|
-
<select
|
|
1614
|
-
<option [
|
|
1615
|
-
<option value="primary">{{ t('editor.options.primary', 'Primary') }}</option>
|
|
1616
|
-
<option value="accent">{{ t('editor.options.accent', 'Accent') }}</option>
|
|
1617
|
-
<option value="warn">{{ t('editor.options.warn', 'Warn') }}</option>
|
|
1618
|
-
</select>
|
|
1952
|
+
<mat-select [(ngModel)]="group.color" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.options.none', '(nenhuma)')">
|
|
1953
|
+
<mat-option [value]="undefined">{{ t('editor.options.none', '(nenhuma)') }}</mat-option>
|
|
1954
|
+
<mat-option value="primary">{{ t('editor.options.primary', 'Primary') }}</mat-option>
|
|
1955
|
+
<mat-option value="accent">{{ t('editor.options.accent', 'Accent') }}</mat-option>
|
|
1956
|
+
<mat-option value="warn">{{ t('editor.options.warn', 'Warn') }}</mat-option>
|
|
1957
|
+
</mat-select>
|
|
1619
1958
|
<button
|
|
1620
1959
|
praxisIconButton="help_outline"
|
|
1621
1960
|
size="dense"
|
|
@@ -1627,12 +1966,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1627
1966
|
></button>
|
|
1628
1967
|
</mat-form-field>
|
|
1629
1968
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.backgroundColor', 'Cor de fundo (M2)') }}</mat-label>
|
|
1630
|
-
<select
|
|
1631
|
-
<option [
|
|
1632
|
-
<option value="primary">{{ t('editor.options.primary', 'Primary') }}</option>
|
|
1633
|
-
<option value="accent">{{ t('editor.options.accent', 'Accent') }}</option>
|
|
1634
|
-
<option value="warn">{{ t('editor.options.warn', 'Warn') }}</option>
|
|
1635
|
-
</select>
|
|
1969
|
+
<mat-select [(ngModel)]="group.backgroundColor" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.options.none', '(nenhuma)')">
|
|
1970
|
+
<mat-option [value]="undefined">{{ t('editor.options.none', '(nenhuma)') }}</mat-option>
|
|
1971
|
+
<mat-option value="primary">{{ t('editor.options.primary', 'Primary') }}</mat-option>
|
|
1972
|
+
<mat-option value="accent">{{ t('editor.options.accent', 'Accent') }}</mat-option>
|
|
1973
|
+
<mat-option value="warn">{{ t('editor.options.warn', 'Warn') }}</mat-option>
|
|
1974
|
+
</mat-select>
|
|
1636
1975
|
<button
|
|
1637
1976
|
praxisIconButton="help_outline"
|
|
1638
1977
|
size="dense"
|
|
@@ -1696,12 +2035,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1696
2035
|
<input matInput [(ngModel)]="nav.ariaLabelledby" (ngModelChange)="onAppearanceChange()" />
|
|
1697
2036
|
</mat-form-field>
|
|
1698
2037
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.color', 'Cor (M2)') }}</mat-label>
|
|
1699
|
-
<select
|
|
1700
|
-
<option [
|
|
1701
|
-
<option value="primary">{{ t('editor.options.primary', 'Primary') }}</option>
|
|
1702
|
-
<option value="accent">{{ t('editor.options.accent', 'Accent') }}</option>
|
|
1703
|
-
<option value="warn">{{ t('editor.options.warn', 'Warn') }}</option>
|
|
1704
|
-
</select>
|
|
2038
|
+
<mat-select [(ngModel)]="nav.color" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.options.none', '(nenhuma)')">
|
|
2039
|
+
<mat-option [value]="undefined">{{ t('editor.options.none', '(nenhuma)') }}</mat-option>
|
|
2040
|
+
<mat-option value="primary">{{ t('editor.options.primary', 'Primary') }}</mat-option>
|
|
2041
|
+
<mat-option value="accent">{{ t('editor.options.accent', 'Accent') }}</mat-option>
|
|
2042
|
+
<mat-option value="warn">{{ t('editor.options.warn', 'Warn') }}</mat-option>
|
|
2043
|
+
</mat-select>
|
|
1705
2044
|
<button
|
|
1706
2045
|
praxisIconButton="help_outline"
|
|
1707
2046
|
size="dense"
|
|
@@ -1713,12 +2052,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1713
2052
|
></button>
|
|
1714
2053
|
</mat-form-field>
|
|
1715
2054
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.backgroundColor', 'Cor de fundo (M2)') }}</mat-label>
|
|
1716
|
-
<select
|
|
1717
|
-
<option [
|
|
1718
|
-
<option value="primary">{{ t('editor.options.primary', 'Primary') }}</option>
|
|
1719
|
-
<option value="accent">{{ t('editor.options.accent', 'Accent') }}</option>
|
|
1720
|
-
<option value="warn">{{ t('editor.options.warn', 'Warn') }}</option>
|
|
1721
|
-
</select>
|
|
2055
|
+
<mat-select [(ngModel)]="nav.backgroundColor" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.options.none', '(nenhuma)')">
|
|
2056
|
+
<mat-option [value]="undefined">{{ t('editor.options.none', '(nenhuma)') }}</mat-option>
|
|
2057
|
+
<mat-option value="primary">{{ t('editor.options.primary', 'Primary') }}</mat-option>
|
|
2058
|
+
<mat-option value="accent">{{ t('editor.options.accent', 'Accent') }}</mat-option>
|
|
2059
|
+
<mat-option value="warn">{{ t('editor.options.warn', 'Warn') }}</mat-option>
|
|
2060
|
+
</mat-select>
|
|
1722
2061
|
<button
|
|
1723
2062
|
praxisIconButton="help_outline"
|
|
1724
2063
|
size="dense"
|
|
@@ -1786,6 +2125,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1786
2125
|
<mat-icon [praxisIcon]="'visibility'"></mat-icon>
|
|
1787
2126
|
{{ t('editor.presets.highContrast', 'Alto contraste') }}
|
|
1788
2127
|
</button>
|
|
2128
|
+
<button mat-button (click)="applyPreset('pill')">
|
|
2129
|
+
<mat-icon [praxisIcon]="'pill'"></mat-icon>
|
|
2130
|
+
{{ t('editor.presets.pill', 'Pill (cápsula)') }}
|
|
2131
|
+
</button>
|
|
1789
2132
|
<button mat-button (click)="clearTokens()">
|
|
1790
2133
|
<mat-icon [praxisIcon]="'backspace'"></mat-icon>
|
|
1791
2134
|
{{ t('editor.actions.clearTokens', 'Limpar tokens') }}
|
|
@@ -1793,6 +2136,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1793
2136
|
</div>
|
|
1794
2137
|
|
|
1795
2138
|
<div class="editor-grid two tight">
|
|
2139
|
+
<mat-form-field appearance="outline">
|
|
2140
|
+
<mat-label>{{ t('editor.fields.variant', 'Variante visual') }}</mat-label>
|
|
2141
|
+
<mat-select [(ngModel)]="appearance.variant" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.variant.underline', 'Sublinhado (Underline)')">
|
|
2142
|
+
<mat-option [value]="undefined">{{ t('editor.options.default', 'Padrao') }}</mat-option>
|
|
2143
|
+
<mat-option value="underline">{{ t('editor.variant.underline', 'Sublinhado (Underline)') }}</mat-option>
|
|
2144
|
+
<mat-option value="pill">{{ t('editor.variant.pill', 'Capsula (Pill)') }}</mat-option>
|
|
2145
|
+
<mat-option value="segmented">{{ t('editor.variant.segmented', 'Segmentado (Segmented)') }}</mat-option>
|
|
2146
|
+
</mat-select>
|
|
2147
|
+
</mat-form-field>
|
|
2148
|
+
|
|
1796
2149
|
<mat-form-field appearance="outline">
|
|
1797
2150
|
<mat-label>{{ t('editor.fields.themeClass', 'Classe de tema (opcional)') }}</mat-label>
|
|
1798
2151
|
<input matInput [(ngModel)]="appearance.themeClass" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.fields.placeholder.themeClass', 'ex.: tabs-accented')" />
|
|
@@ -1800,12 +2153,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1800
2153
|
|
|
1801
2154
|
<mat-form-field appearance="outline">
|
|
1802
2155
|
<mat-label>{{ t('editor.fields.density', 'Densidade') }}</mat-label>
|
|
1803
|
-
<select
|
|
1804
|
-
<option [
|
|
1805
|
-
<option value="compact">{{ t('editor.density.compact', 'Compacta') }}</option>
|
|
1806
|
-
<option value="comfortable">{{ t('editor.density.comfortable', 'Confortavel') }}</option>
|
|
1807
|
-
<option value="spacious">{{ t('editor.density.spacious', 'Espacosa') }}</option>
|
|
1808
|
-
</select>
|
|
2156
|
+
<mat-select [(ngModel)]="appearance.density" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.density.default', 'Padrao')">
|
|
2157
|
+
<mat-option [value]="undefined">{{ t('editor.density.default', 'Padrao') }}</mat-option>
|
|
2158
|
+
<mat-option value="compact">{{ t('editor.density.compact', 'Compacta') }}</mat-option>
|
|
2159
|
+
<mat-option value="comfortable">{{ t('editor.density.comfortable', 'Confortavel') }}</mat-option>
|
|
2160
|
+
<mat-option value="spacious">{{ t('editor.density.spacious', 'Espacosa') }}</mat-option>
|
|
2161
|
+
</mat-select>
|
|
1809
2162
|
</mat-form-field>
|
|
1810
2163
|
</div>
|
|
1811
2164
|
|
|
@@ -1822,7 +2175,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1822
2175
|
></button>
|
|
1823
2176
|
</div>
|
|
1824
2177
|
<div class="editor-grid two">
|
|
1825
|
-
@for (token of tokenList; track token) {
|
|
2178
|
+
@for (token of tokenList; track token.key) {
|
|
1826
2179
|
<mat-form-field appearance="outline">
|
|
1827
2180
|
<mat-label>{{ t(token.labelKey, token.fallback) }}</mat-label>
|
|
1828
2181
|
<input matInput [placeholder]="t('editor.placeholders.tokenValue', 'var(--md-sys-color-primary) / #RRGGBB')" [ngModel]="appearance.tokens?.[token.key]" (ngModelChange)="onTokenChange(token.key, $event)" />
|
|
@@ -1854,7 +2207,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1854
2207
|
<button mat-stroked-button color="primary" (click)="addTab()"><mat-icon [praxisIcon]="'add'"></mat-icon>{{ t('editor.actions.addTab', 'Adicionar aba') }}</button>
|
|
1855
2208
|
@if (editedConfig.tabs?.length) {
|
|
1856
2209
|
<div class="editor-grid">
|
|
1857
|
-
@for (tab of editedConfig.tabs; track
|
|
2210
|
+
@for (tab of editedConfig.tabs; track $index; let i = $index) {
|
|
1858
2211
|
<div class="editor-card">
|
|
1859
2212
|
<div class="editor-card-header">
|
|
1860
2213
|
<strong class="editor-card-title">{{ t('editor.cards.tab', 'Aba') }} #{{ i+1 }}</strong>
|
|
@@ -1884,6 +2237,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1884
2237
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.ariaLabelledby', 'aria-labelledby') }}</mat-label>
|
|
1885
2238
|
<input matInput [(ngModel)]="tab.ariaLabelledby" (ngModelChange)="onAppearanceChange()" />
|
|
1886
2239
|
</mat-form-field>
|
|
2240
|
+
<mat-form-field appearance="outline">
|
|
2241
|
+
<mat-label>{{ t('editor.fields.tone', 'Tom do item') }}</mat-label>
|
|
2242
|
+
<mat-select [(ngModel)]="tab.tone" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.tone.default', 'Padrao')">
|
|
2243
|
+
<mat-option [value]="undefined">{{ t('editor.tone.default', 'Padrao') }}</mat-option>
|
|
2244
|
+
<mat-option value="default">{{ t('editor.tone.default', 'Padrao') }}</mat-option>
|
|
2245
|
+
<mat-option value="primary">{{ t('editor.tone.primary', 'Primario') }}</mat-option>
|
|
2246
|
+
<mat-option value="accent">{{ t('editor.tone.accent', 'Destaque (Accent)') }}</mat-option>
|
|
2247
|
+
<mat-option value="outlined">{{ t('editor.tone.outlined', 'Contorno ativo (Outlined)') }}</mat-option>
|
|
2248
|
+
</mat-select>
|
|
2249
|
+
</mat-form-field>
|
|
1887
2250
|
</div>
|
|
1888
2251
|
<div class="editor-row">
|
|
1889
2252
|
<mat-slide-toggle [(ngModel)]="tab.disabled" (ngModelChange)="onAppearanceChange()">{{ t('editor.toggles.disabled', 'Desativada') }}</mat-slide-toggle>
|
|
@@ -1894,12 +2257,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1894
2257
|
<div class="editor-row">
|
|
1895
2258
|
<mat-form-field appearance="outline" class="editor-field-min">
|
|
1896
2259
|
<mat-label>{{ t('editor.fields.addComponent', 'Adicionar componente') }}</mat-label>
|
|
1897
|
-
<select
|
|
1898
|
-
<option [
|
|
1899
|
-
@for (c of componentOptions; track c) {
|
|
1900
|
-
<option [
|
|
2260
|
+
<mat-select [(ngModel)]="selectedTabWidgetId[i]" [placeholder]="t('editor.fields.selectPlaceholder', '(selecione)')">
|
|
2261
|
+
<mat-option [value]="''">{{ t('editor.fields.selectPlaceholder', '(selecione)') }}</mat-option>
|
|
2262
|
+
@for (c of componentOptions; track c.id) {
|
|
2263
|
+
<mat-option [value]="c.id">{{ c.friendlyName || c.id }}</mat-option>
|
|
1901
2264
|
}
|
|
1902
|
-
</select>
|
|
2265
|
+
</mat-select>
|
|
1903
2266
|
</mat-form-field>
|
|
1904
2267
|
<button mat-stroked-button (click)="addWidgetToTab(i)"><mat-icon [praxisIcon]="'add'"></mat-icon>{{ t('editor.actions.add', 'Adicionar') }}</button>
|
|
1905
2268
|
<span class="editor-spacer"></span>
|
|
@@ -1913,13 +2276,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1913
2276
|
</div>
|
|
1914
2277
|
@if (tab.widgets?.length) {
|
|
1915
2278
|
<div class="editor-grid" cdkDropList [cdkDropListData]="tab.widgets || []" (cdkDropListDropped)="onTabWidgetDrop(i, $event)">
|
|
1916
|
-
@for (w of tab.widgets; track
|
|
2279
|
+
@for (w of tab.widgets; track $index; let wi = $index) {
|
|
1917
2280
|
<div cdkDrag class="editor-card dashed">
|
|
1918
2281
|
<div class="editor-card-header">
|
|
1919
2282
|
<button praxisIconButton="drag_indicator" size="compact" type="button" cdkDragHandle [matTooltip]="t('editor.actions.dragToReorder', 'Arrastar para reordenar')" [attr.aria-label]="t('editor.actions.dragToReorder', 'Arrastar para reordenar')"></button>
|
|
1920
2283
|
<strong class="editor-card-title">{{ getCompName(w.id) }}</strong>
|
|
1921
2284
|
<button praxisIconButton="delete" size="compact" type="button" class="editor-icon-action--danger" (click)="removeWidgetFromTab(i, wi)" [matTooltip]="t('editor.actions.removeComponent', 'Remover componente')" [attr.aria-label]="t('editor.actions.removeComponent', 'Remover componente')"></button>
|
|
1922
2285
|
</div>
|
|
2286
|
+
<mat-form-field appearance="outline">
|
|
2287
|
+
<mat-label>{{ t('editor.fields.childWidgetKey', 'Chave da instancia (childWidgetKey)') }}</mat-label>
|
|
2288
|
+
<input matInput [ngModel]="w.childWidgetKey || ''" (ngModelChange)="updateWidgetKeyTab(i, wi, $event)" />
|
|
2289
|
+
</mat-form-field>
|
|
1923
2290
|
<div class="editor-grid two tight">
|
|
1924
2291
|
<mat-form-field appearance="outline">
|
|
1925
2292
|
<mat-label>{{ t('editor.fields.inputsJson', 'Inputs (JSON)') }}</mat-label>
|
|
@@ -1958,7 +2325,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1958
2325
|
<button mat-stroked-button color="primary" (click)="addLink()"><mat-icon [praxisIcon]="'add_link'"></mat-icon>{{ t('editor.actions.addLink', 'Adicionar link') }}</button>
|
|
1959
2326
|
@if (nav.links?.length) {
|
|
1960
2327
|
<div class="editor-grid">
|
|
1961
|
-
@for (l of nav.links; track
|
|
2328
|
+
@for (l of nav.links; track $index; let i = $index) {
|
|
1962
2329
|
<div class="editor-card">
|
|
1963
2330
|
<div class="editor-card-header">
|
|
1964
2331
|
<strong class="editor-card-title">{{ t('editor.cards.link', 'Link') }} #{{ i+1 }}</strong>
|
|
@@ -1976,6 +2343,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1976
2343
|
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.icon', 'Icone') }}</mat-label>
|
|
1977
2344
|
<input matInput [(ngModel)]="l.icon" (ngModelChange)="onAppearanceChange()" />
|
|
1978
2345
|
</mat-form-field>
|
|
2346
|
+
<mat-form-field appearance="outline"><mat-label>{{ t('editor.fields.labelClass', 'Classe do rotulo') }}</mat-label>
|
|
2347
|
+
<input matInput [(ngModel)]="l.labelClass" (ngModelChange)="onAppearanceChange()" />
|
|
2348
|
+
</mat-form-field>
|
|
2349
|
+
<mat-form-field appearance="outline">
|
|
2350
|
+
<mat-label>{{ t('editor.fields.tone', 'Tom do item') }}</mat-label>
|
|
2351
|
+
<mat-select [(ngModel)]="l.tone" (ngModelChange)="onAppearanceChange()" [placeholder]="t('editor.tone.default', 'Padrao')">
|
|
2352
|
+
<mat-option [value]="undefined">{{ t('editor.tone.default', 'Padrao') }}</mat-option>
|
|
2353
|
+
<mat-option value="default">{{ t('editor.tone.default', 'Padrao') }}</mat-option>
|
|
2354
|
+
<mat-option value="primary">{{ t('editor.tone.primary', 'Primario') }}</mat-option>
|
|
2355
|
+
<mat-option value="accent">{{ t('editor.tone.accent', 'Destaque (Accent)') }}</mat-option>
|
|
2356
|
+
<mat-option value="outlined">{{ t('editor.tone.outlined', 'Contorno ativo (Outlined)') }}</mat-option>
|
|
2357
|
+
</mat-select>
|
|
2358
|
+
</mat-form-field>
|
|
1979
2359
|
</div>
|
|
1980
2360
|
<div class="editor-row">
|
|
1981
2361
|
<mat-slide-toggle [(ngModel)]="l.disabled" (ngModelChange)="onAppearanceChange()">{{ t('editor.toggles.linkDisabled', 'Desativado') }}</mat-slide-toggle>
|
|
@@ -1988,12 +2368,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1988
2368
|
<div class="editor-row">
|
|
1989
2369
|
<mat-form-field appearance="outline" class="editor-field-min">
|
|
1990
2370
|
<mat-label>{{ t('editor.fields.addComponent', 'Adicionar componente') }}</mat-label>
|
|
1991
|
-
<select
|
|
1992
|
-
<option [
|
|
1993
|
-
@for (c of componentOptions; track c) {
|
|
1994
|
-
<option [
|
|
2371
|
+
<mat-select [(ngModel)]="selectedLinkWidgetId[i]" [placeholder]="t('editor.fields.selectPlaceholder', '(selecione)')">
|
|
2372
|
+
<mat-option [value]="''">{{ t('editor.fields.selectPlaceholder', '(selecione)') }}</mat-option>
|
|
2373
|
+
@for (c of componentOptions; track c.id) {
|
|
2374
|
+
<mat-option [value]="c.id">{{ c.friendlyName || c.id }}</mat-option>
|
|
1995
2375
|
}
|
|
1996
|
-
</select>
|
|
2376
|
+
</mat-select>
|
|
1997
2377
|
</mat-form-field>
|
|
1998
2378
|
<button mat-stroked-button (click)="addWidgetToLink(i)"><mat-icon [praxisIcon]="'add'"></mat-icon>{{ t('editor.actions.add', 'Adicionar') }}</button>
|
|
1999
2379
|
<span class="editor-spacer"></span>
|
|
@@ -2007,13 +2387,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
2007
2387
|
</div>
|
|
2008
2388
|
@if (l.widgets?.length) {
|
|
2009
2389
|
<div class="editor-grid" cdkDropList [cdkDropListData]="l.widgets || []" (cdkDropListDropped)="onLinkWidgetDrop(i, $event)">
|
|
2010
|
-
@for (w of l.widgets; track
|
|
2390
|
+
@for (w of l.widgets; track $index; let wi = $index) {
|
|
2011
2391
|
<div cdkDrag class="editor-card dashed">
|
|
2012
2392
|
<div class="editor-card-header">
|
|
2013
2393
|
<button praxisIconButton="drag_indicator" size="compact" type="button" cdkDragHandle [matTooltip]="t('editor.actions.dragToReorder', 'Arrastar para reordenar')" [attr.aria-label]="t('editor.actions.dragToReorder', 'Arrastar para reordenar')"></button>
|
|
2014
2394
|
<strong class="editor-card-title">{{ getCompName(w.id) }}</strong>
|
|
2015
2395
|
<button praxisIconButton="delete" size="compact" type="button" class="editor-icon-action--danger" (click)="removeWidgetFromLink(i, wi)" [matTooltip]="t('editor.actions.removeComponent', 'Remover componente')" [attr.aria-label]="t('editor.actions.removeComponent', 'Remover componente')"></button>
|
|
2016
2396
|
</div>
|
|
2397
|
+
<mat-form-field appearance="outline">
|
|
2398
|
+
<mat-label>{{ t('editor.fields.childWidgetKey', 'Chave da instancia (childWidgetKey)') }}</mat-label>
|
|
2399
|
+
<input matInput [ngModel]="w.childWidgetKey || ''" (ngModelChange)="updateWidgetKeyLink(i, wi, $event)" />
|
|
2400
|
+
</mat-form-field>
|
|
2017
2401
|
<div class="editor-grid two tight">
|
|
2018
2402
|
<mat-form-field appearance="outline">
|
|
2019
2403
|
<mat-label>{{ t('editor.fields.inputsJson', 'Inputs (JSON)') }}</mat-label>
|
|
@@ -2039,7 +2423,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
2039
2423
|
</mat-tab>
|
|
2040
2424
|
</mat-tab-group>
|
|
2041
2425
|
</div>
|
|
2042
|
-
`, styles: [":host{display:block;color:var(--md-sys-color-on-surface)}.editor-shell{display:grid;gap:12px}.editor-topbar{display:flex;align-items:start;justify-content:flex-start}.editor-mode-field{width:min(320px,100%)}.editor-diagnostics{display:grid;gap:8px}.editor-diagnostics-title{font-size:.95rem;font-weight:600;color:var(--md-sys-color-on-surface)}.editor-diagnostic{display:grid;gap:4px;padding:10px 12px;border-radius:10px;border:1px solid var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container);color:var(--md-sys-color-on-surface)}.editor-diagnostic code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;color:var(--md-sys-color-on-surface-variant)}.editor-diagnostic.level-error{background:var(--md-sys-color-error-container);color:var(--md-sys-color-on-error-container);border-color:var(--md-sys-color-error)}.editor-diagnostic.level-warning{background:var(--md-sys-color-tertiary-container, var(--md-sys-color-surface-container));color:var(--md-sys-color-on-tertiary-container, var(--md-sys-color-on-surface));border-color:var(--md-sys-color-outline-variant)}.editor-tabs{--editor-surface: var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface));--editor-border: 1px solid var(--md-sys-color-outline-variant);--editor-radius: 12px;--editor-muted: var(--md-sys-color-on-surface-variant)}.editor-section{padding:12px;display:grid;gap:12px;background:var(--editor-surface);border:var(--editor-border);border-radius:var(--editor-radius)}.editor-section-lg{gap:16px}.editor-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.editor-grid{display:grid;gap:12px}.editor-grid.two{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.editor-grid.tight{gap:8px}.editor-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.editor-muted{color:var(--editor-muted)}.editor-title{margin:6px 0 8px;font-size:1rem}.editor-title-row{display:flex;align-items:center;gap:8px}.editor-code{white-space:pre-wrap;background:var(--md-sys-color-surface-container);padding:8px;border-radius:6px;border:1px solid var(--md-sys-color-outline-variant)}.editor-card{border:1px solid var(--md-sys-color-outline-variant);padding:10px;border-radius:10px;display:grid;gap:8px;background:var(--md-sys-color-surface)}.editor-card.dashed{border-style:dashed}.editor-card-header{display:flex;align-items:center;gap:8px}.editor-card-title{flex:1;font-weight:600}.editor-divider{border-top:1px solid var(--md-sys-color-outline-variant);padding-top:8px}.editor-spacer{flex:1}.editor-field-min{min-width:260px}.editor-section .editor-field-min{width:260px;max-width:260px}.editor-field-240{width:240px}.editor-section .editor-field-240{width:240px;max-width:240px}.editor-json{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.editor-section .mat-mdc-form-field{width:100%;max-width:520px;--mdc-outlined-text-field-container-height: 48px;--mdc-outlined-text-field-outline-color: var(--md-sys-color-outline-variant);--mdc-outlined-text-field-hover-outline-color: var(--md-sys-color-outline);--mdc-outlined-text-field-focus-outline-color: var(--md-sys-color-primary);--mdc-outlined-text-field-error-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-error-focus-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-error-hover-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-label-text-color: var(--md-sys-color-on-surface-variant);--mdc-outlined-text-field-input-text-color: var(--md-sys-color-on-surface);--mdc-outlined-text-field-supporting-text-color: var(--md-sys-color-on-surface-variant)}.editor-section .mat-mdc-form-field.full{max-width:none}.editor-icon-action--danger{color:var(--md-sys-color-error)}\n"] }]
|
|
2426
|
+
`, styles: [":host{display:block;container-type:inline-size;color:var(--pfx-settings-panel-text-primary, var(--md-sys-color-on-surface))}.editor-shell{display:grid;gap:12px}.editor-topbar{display:flex;align-items:start;justify-content:flex-start}.editor-mode-field{width:min(320px,100%)}.editor-diagnostics{display:grid;gap:8px}.editor-diagnostics-title{font-size:.95rem;font-weight:600;color:var(--md-sys-color-on-surface)}.editor-diagnostic{display:grid;gap:4px;padding:10px 12px;border-radius:10px;border:1px solid var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container);color:var(--md-sys-color-on-surface)}.editor-diagnostic code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;color:var(--md-sys-color-on-surface-variant)}.editor-diagnostic.level-error{background:var(--md-sys-color-error-container);color:var(--md-sys-color-on-error-container);border-color:var(--md-sys-color-error)}.editor-diagnostic.level-warning{background:var(--md-sys-color-tertiary-container, var(--md-sys-color-surface-container));color:var(--md-sys-color-on-tertiary-container, var(--md-sys-color-on-surface));border-color:var(--md-sys-color-outline-variant)}.editor-tabs{--editor-surface: var(--pfx-settings-panel-surface-elevated, var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface)));--editor-border: 1px solid var(--pfx-settings-panel-border, var(--md-sys-color-outline-variant));--editor-radius: 12px;--editor-muted: var(--pfx-settings-panel-text-secondary, var(--md-sys-color-on-surface-variant))}.editor-section{padding:12px;display:grid;gap:12px;background:var(--editor-surface);border:var(--editor-border);border-radius:var(--editor-radius)}.editor-section-lg{gap:16px}.editor-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.editor-grid{display:grid;gap:12px}.editor-grid.two{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.editor-grid.tight{gap:8px}.editor-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.editor-muted{color:var(--editor-muted)}.editor-title{margin:6px 0 8px;font-size:1rem}.editor-title-row{display:flex;align-items:center;gap:8px}.editor-code{white-space:pre-wrap;background:var(--md-sys-color-surface-container);padding:8px;border-radius:6px;border:1px solid var(--md-sys-color-outline-variant)}.editor-card{border:1px solid var(--pfx-settings-panel-border, var(--md-sys-color-outline-variant));padding:10px;border-radius:10px;display:grid;gap:8px;background:var(--pfx-settings-panel-surface, var(--md-sys-color-surface))}.editor-card.dashed{border-style:dashed}.editor-card-header{display:flex;align-items:center;gap:8px}.editor-card-title{flex:1;font-weight:600}.editor-divider{border-top:1px solid var(--pfx-settings-panel-border, var(--md-sys-color-outline-variant));padding-top:8px}.editor-spacer{flex:1}.editor-field-min{min-width:260px}.editor-section .editor-field-min{width:260px;max-width:260px}.editor-field-240{width:240px}.editor-section .editor-field-240{width:240px;max-width:240px}@container (max-width: 640px){.editor-grid.two{grid-template-columns:1fr}.editor-field-min,.editor-section .editor-field-min,.editor-field-240,.editor-section .editor-field-240{min-width:0;width:100%;max-width:100%}}.editor-json{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.editor-section .mat-mdc-form-field{width:100%;max-width:520px;--mdc-outlined-text-field-container-height: 48px;--mdc-outlined-text-field-outline-color: var(--md-sys-color-outline-variant);--mdc-outlined-text-field-hover-outline-color: var(--md-sys-color-outline);--mdc-outlined-text-field-focus-outline-color: var(--md-sys-color-primary);--mdc-outlined-text-field-error-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-error-focus-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-error-hover-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-label-text-color: var(--md-sys-color-on-surface-variant);--mdc-outlined-text-field-input-text-color: var(--md-sys-color-on-surface);--mdc-outlined-text-field-supporting-text-color: var(--md-sys-color-on-surface-variant)}.editor-section .mat-mdc-form-field.full{max-width:none}.editor-icon-action--danger{color:var(--md-sys-color-error)}\n"] }]
|
|
2043
2427
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2044
2428
|
type: Inject,
|
|
2045
2429
|
args: [SETTINGS_PANEL_DATA]
|
|
@@ -2184,7 +2568,7 @@ class TabsQuickSetupComponent {
|
|
|
2184
2568
|
<mat-slide-toggle [(ngModel)]="model.stretchTabs" (ngModelChange)="updateState()">{{ t('editor.toggles.stretchTabs', 'Esticar abas') }}</mat-slide-toggle>
|
|
2185
2569
|
</div>
|
|
2186
2570
|
</div>
|
|
2187
|
-
`, isInline: true, styles: [":host{display:block;color:var(--md-sys-color-on-surface)}.setup-root{display:grid;gap:12px;padding:8px;background:var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface));border:1px solid var(--md-sys-color-outline-variant);border-radius:12px}.setup-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.setup-row.wrap{flex-wrap:wrap}.setup-grid{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:start}.setup-root .mat-mdc-form-field{width:100%;max-width:520px;--mdc-outlined-text-field-container-height: 48px;--mdc-outlined-text-field-outline-color: var(--md-sys-color-outline-variant);--mdc-outlined-text-field-hover-outline-color: var(--md-sys-color-outline);--mdc-outlined-text-field-focus-outline-color: var(--md-sys-color-primary);--mdc-outlined-text-field-error-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-error-focus-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-error-hover-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-label-text-color: var(--md-sys-color-on-surface-variant);--mdc-outlined-text-field-input-text-color: var(--md-sys-color-on-surface);--mdc-outlined-text-field-supporting-text-color: var(--md-sys-color-on-surface-variant)}.chip{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid var(--md-sys-color-outline-variant);border-radius:16px;background:var(--md-sys-color-surface)}.hint{color:var(--md-sys-color-on-surface-variant)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2_1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2_1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2_1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type:
|
|
2571
|
+
`, isInline: true, styles: [":host{display:block;color:var(--md-sys-color-on-surface)}.setup-root{display:grid;gap:12px;padding:8px;background:var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface));border:1px solid var(--md-sys-color-outline-variant);border-radius:12px}.setup-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.setup-row.wrap{flex-wrap:wrap}.setup-grid{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:start}.setup-root .mat-mdc-form-field{width:100%;max-width:520px;--mdc-outlined-text-field-container-height: 48px;--mdc-outlined-text-field-outline-color: var(--md-sys-color-outline-variant);--mdc-outlined-text-field-hover-outline-color: var(--md-sys-color-outline);--mdc-outlined-text-field-focus-outline-color: var(--md-sys-color-primary);--mdc-outlined-text-field-error-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-error-focus-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-error-hover-outline-color: var(--md-sys-color-error);--mdc-outlined-text-field-label-text-color: var(--md-sys-color-on-surface-variant);--mdc-outlined-text-field-input-text-color: var(--md-sys-color-on-surface);--mdc-outlined-text-field-supporting-text-color: var(--md-sys-color-on-surface-variant)}.chip{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid var(--md-sys-color-outline-variant);border-radius:16px;background:var(--md-sys-color-surface)}.hint{color:var(--md-sys-color-on-surface-variant)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2_1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2_1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2_1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i9.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] });
|
|
2188
2572
|
}
|
|
2189
2573
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TabsQuickSetupComponent, decorators: [{
|
|
2190
2574
|
type: Component,
|
|
@@ -2250,7 +2634,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
2250
2634
|
* Paths follow TabsMetadata shape (patches are merged at config root).
|
|
2251
2635
|
*/
|
|
2252
2636
|
const ENUMS = {
|
|
2637
|
+
appearanceVariant: ['underline', 'pill', 'segmented'],
|
|
2253
2638
|
appearanceDensity: ['compact', 'comfortable', 'spacious'],
|
|
2639
|
+
tabTone: ['default', 'primary', 'accent', 'outlined'],
|
|
2254
2640
|
alignTabs: ['start', 'center', 'end'],
|
|
2255
2641
|
headerPosition: ['above', 'below'],
|
|
2256
2642
|
matColor: ['primary', 'accent', 'warn'],
|
|
@@ -2269,6 +2655,11 @@ const TOKENS = [
|
|
|
2269
2655
|
'pagination-icon-color',
|
|
2270
2656
|
'divider-color',
|
|
2271
2657
|
'background-color',
|
|
2658
|
+
'track-background-color',
|
|
2659
|
+
'track-border-color',
|
|
2660
|
+
'active-tab-background-color',
|
|
2661
|
+
'active-tab-outline-color',
|
|
2662
|
+
'pill-radius',
|
|
2272
2663
|
];
|
|
2273
2664
|
const TOKEN_CAPS = TOKENS.map((t) => ({
|
|
2274
2665
|
path: `appearance.tokens.${t}`,
|
|
@@ -2279,6 +2670,7 @@ const TOKEN_CAPS = TOKENS.map((t) => ({
|
|
|
2279
2670
|
const CAPS = [
|
|
2280
2671
|
{ path: 'meta', category: 'meta', valueKind: 'object', description: 'Metadata bag for tabs.' },
|
|
2281
2672
|
{ path: 'appearance', category: 'appearance', valueKind: 'object', description: 'Appearance settings.' },
|
|
2673
|
+
{ path: 'appearance.variant', category: 'appearance', valueKind: 'enum', allowedValues: ENUMS.appearanceVariant, description: 'Visual tab strip variant (underline, pill, segmented).' },
|
|
2282
2674
|
{ path: 'appearance.density', category: 'appearance', valueKind: 'enum', allowedValues: ENUMS.appearanceDensity, description: 'Density preset.' },
|
|
2283
2675
|
{ path: 'appearance.themeClass', category: 'appearance', valueKind: 'string', description: 'Theme CSS class applied to root.' },
|
|
2284
2676
|
{ path: 'appearance.customCss', category: 'appearance', valueKind: 'string', description: 'Custom CSS injected into component.', safetyNotes: 'CSS is injected as raw string.' },
|
|
@@ -2320,6 +2712,8 @@ const CAPS = [
|
|
|
2320
2712
|
{ path: 'nav.links', category: 'nav', valueKind: 'array', description: 'Nav links array.' },
|
|
2321
2713
|
{ path: 'nav.links[].id', category: 'nav', valueKind: 'string', description: 'Link id.' },
|
|
2322
2714
|
{ path: 'nav.links[].label', category: 'nav', valueKind: 'string', description: 'Link label.' },
|
|
2715
|
+
{ path: 'nav.links[].labelClass', category: 'nav', valueKind: 'string', description: 'Label class (string or string[]).' },
|
|
2716
|
+
{ path: 'nav.links[].tone', category: 'nav', valueKind: 'enum', allowedValues: ENUMS.tabTone, description: 'Per-link emphasis tone (default, primary, accent, outlined).' },
|
|
2323
2717
|
{ path: 'nav.links[].active', category: 'nav', valueKind: 'boolean', description: 'Link active flag.' },
|
|
2324
2718
|
{ path: 'nav.links[].disabled', category: 'nav', valueKind: 'boolean', description: 'Disable link.' },
|
|
2325
2719
|
{ path: 'nav.links[].disableRipple', category: 'nav', valueKind: 'boolean', description: 'Disable ripple on link.' },
|
|
@@ -2331,6 +2725,7 @@ const CAPS = [
|
|
|
2331
2725
|
{ path: 'tabs[].textLabel', category: 'tabs', valueKind: 'string', description: 'Tab label.' },
|
|
2332
2726
|
{ path: 'tabs[].labelClass', category: 'tabs', valueKind: 'string', description: 'Label class (string or string[]).' },
|
|
2333
2727
|
{ path: 'tabs[].bodyClass', category: 'tabs', valueKind: 'string', description: 'Body class (string or string[]).' },
|
|
2728
|
+
{ path: 'tabs[].tone', category: 'tabs', valueKind: 'enum', allowedValues: ENUMS.tabTone, description: 'Per-tab emphasis tone (default, primary, accent, outlined).' },
|
|
2334
2729
|
{ path: 'tabs[].ariaLabel', category: 'tabs', valueKind: 'string', description: 'aria-label for tab.' },
|
|
2335
2730
|
{ path: 'tabs[].ariaLabelledby', category: 'tabs', valueKind: 'string', description: 'aria-labelledby for tab.' },
|
|
2336
2731
|
{ path: 'tabs[].disabled', category: 'tabs', valueKind: 'boolean', description: 'Disable tab.' },
|
|
@@ -2378,6 +2773,7 @@ class TabsAiAdapter extends BaseAiAdapter {
|
|
|
2378
2773
|
}
|
|
2379
2774
|
const current = this.getCurrentConfig();
|
|
2380
2775
|
const tabsPatch = [];
|
|
2776
|
+
const rootPatch = {};
|
|
2381
2777
|
const warnings = [];
|
|
2382
2778
|
for (const operationCandidate of operations) {
|
|
2383
2779
|
const operation = this.toRecord(operationCandidate);
|
|
@@ -2418,17 +2814,30 @@ class TabsAiAdapter extends BaseAiAdapter {
|
|
|
2418
2814
|
tabsPatch.push(contentPatch);
|
|
2419
2815
|
continue;
|
|
2420
2816
|
}
|
|
2817
|
+
if (operationId === 'layout.variant.set') {
|
|
2818
|
+
const layoutPatch = this.resolveLayoutVariantInput(operation, current);
|
|
2819
|
+
if (!layoutPatch) {
|
|
2820
|
+
warnings.push('tabs-component-edit-plan-layout-variant-input-invalid');
|
|
2821
|
+
continue;
|
|
2822
|
+
}
|
|
2823
|
+
Object.assign(rootPatch, deepMerge(rootPatch, layoutPatch));
|
|
2824
|
+
continue;
|
|
2825
|
+
}
|
|
2421
2826
|
warnings.push(`tabs-component-edit-plan-operation-unsupported:${operationId || '<missing>'}`);
|
|
2422
2827
|
}
|
|
2423
|
-
if (tabsPatch.length === 0) {
|
|
2828
|
+
if (tabsPatch.length === 0 && Object.keys(rootPatch).length === 0) {
|
|
2424
2829
|
return {
|
|
2425
2830
|
type: 'error',
|
|
2426
2831
|
message: this.t('ai.review.unsupportedPlan', 'O componentEditPlan das abas não possui operações suportadas para aplicar.'),
|
|
2427
2832
|
warnings,
|
|
2428
2833
|
};
|
|
2429
2834
|
}
|
|
2835
|
+
const patch = { ...rootPatch };
|
|
2836
|
+
if (tabsPatch.length > 0) {
|
|
2837
|
+
patch['tabs'] = tabsPatch;
|
|
2838
|
+
}
|
|
2430
2839
|
return {
|
|
2431
|
-
patch
|
|
2840
|
+
patch,
|
|
2432
2841
|
explanation: this.summarizeOperations(operations, tabsPatch)
|
|
2433
2842
|
?? (typeof response['explanation'] === 'string'
|
|
2434
2843
|
? response['explanation']
|
|
@@ -2630,13 +3039,66 @@ class TabsAiAdapter extends BaseAiAdapter {
|
|
|
2630
3039
|
return null;
|
|
2631
3040
|
}
|
|
2632
3041
|
const tab = { id, textLabel };
|
|
2633
|
-
for (const key of ['icon', 'disabled', 'visible', 'content', 'widgets']) {
|
|
3042
|
+
for (const key of ['icon', 'labelClass', 'tone', 'disabled', 'visible', 'content', 'widgets']) {
|
|
2634
3043
|
if (input[key] !== undefined) {
|
|
2635
3044
|
tab[key] = input[key];
|
|
2636
3045
|
}
|
|
2637
3046
|
}
|
|
2638
3047
|
return tab;
|
|
2639
3048
|
}
|
|
3049
|
+
resolveLayoutVariantInput(operation, current) {
|
|
3050
|
+
const input = this.toRecord(operation['input'])
|
|
3051
|
+
?? this.toRecord(operation['params'])
|
|
3052
|
+
?? this.toRecord(operation['payload']);
|
|
3053
|
+
if (!input) {
|
|
3054
|
+
return null;
|
|
3055
|
+
}
|
|
3056
|
+
const patch = {};
|
|
3057
|
+
const appearance = {};
|
|
3058
|
+
const group = {};
|
|
3059
|
+
const nav = {};
|
|
3060
|
+
const behavior = {};
|
|
3061
|
+
const variant = this.toText(input['variant']);
|
|
3062
|
+
if (variant === 'underline' || variant === 'pill' || variant === 'segmented') {
|
|
3063
|
+
appearance['variant'] = variant;
|
|
3064
|
+
}
|
|
3065
|
+
const density = this.toText(input['density']);
|
|
3066
|
+
if (density === 'compact' || density === 'comfortable' || density === 'spacious') {
|
|
3067
|
+
appearance['density'] = density;
|
|
3068
|
+
}
|
|
3069
|
+
if (Object.keys(appearance).length > 0) {
|
|
3070
|
+
patch['appearance'] = appearance;
|
|
3071
|
+
}
|
|
3072
|
+
const mode = this.toText(input['mode']);
|
|
3073
|
+
const isNav = mode === 'nav' || (mode !== 'group' && !!current.nav?.links?.length);
|
|
3074
|
+
const headerPosition = this.toText(input['headerPosition']);
|
|
3075
|
+
if (headerPosition === 'above' || headerPosition === 'below') {
|
|
3076
|
+
group['headerPosition'] = headerPosition;
|
|
3077
|
+
}
|
|
3078
|
+
const alignTabs = this.toText(input['alignTabs']);
|
|
3079
|
+
if (alignTabs === 'start' || alignTabs === 'center' || alignTabs === 'end') {
|
|
3080
|
+
group['alignTabs'] = alignTabs;
|
|
3081
|
+
}
|
|
3082
|
+
if (typeof input['stretchTabs'] === 'boolean') {
|
|
3083
|
+
if (isNav) {
|
|
3084
|
+
nav['stretchTabs'] = input['stretchTabs'];
|
|
3085
|
+
}
|
|
3086
|
+
else {
|
|
3087
|
+
group['stretchTabs'] = input['stretchTabs'];
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
if (Object.keys(group).length > 0) {
|
|
3091
|
+
patch['group'] = group;
|
|
3092
|
+
}
|
|
3093
|
+
if (Object.keys(nav).length > 0) {
|
|
3094
|
+
patch['nav'] = nav;
|
|
3095
|
+
}
|
|
3096
|
+
if (typeof input['lazyLoad'] === 'boolean') {
|
|
3097
|
+
behavior['lazyLoad'] = input['lazyLoad'];
|
|
3098
|
+
patch['behavior'] = behavior;
|
|
3099
|
+
}
|
|
3100
|
+
return Object.keys(patch).length > 0 ? patch : null;
|
|
3101
|
+
}
|
|
2640
3102
|
resolveTabContentInput(operation, current) {
|
|
2641
3103
|
const targetId = this.resolveTargetId(operation, current);
|
|
2642
3104
|
if (!targetId) {
|
|
@@ -2687,6 +3149,13 @@ class TabsAiAdapter extends BaseAiAdapter {
|
|
|
2687
3149
|
if (contentPatch?.id) {
|
|
2688
3150
|
summaries.push(this.t('ai.review.setTabContent', 'Atualizar conteúdo da aba: {{label}}.', { label: contentPatch.textLabel || contentPatch.id }));
|
|
2689
3151
|
}
|
|
3152
|
+
continue;
|
|
3153
|
+
}
|
|
3154
|
+
if (operationId === 'layout.variant.set') {
|
|
3155
|
+
const layoutPatch = this.resolveLayoutVariantInput(operation, this.getCurrentConfig());
|
|
3156
|
+
if (layoutPatch) {
|
|
3157
|
+
summaries.push(this.t('ai.review.setLayoutVariant', 'Atualizar variante/layout das abas.'));
|
|
3158
|
+
}
|
|
2690
3159
|
}
|
|
2691
3160
|
}
|
|
2692
3161
|
if (summaries.length === 1) {
|
|
@@ -3123,23 +3592,95 @@ class PraxisTabs {
|
|
|
3123
3592
|
aiApi = inject(AiBackendApiService);
|
|
3124
3593
|
assistantSessions = inject(PraxisAssistantSessionRegistryService);
|
|
3125
3594
|
aiTurnOrchestrator = inject(PraxisAssistantTurnOrchestratorService);
|
|
3595
|
+
parentShellViewport = (() => {
|
|
3596
|
+
try {
|
|
3597
|
+
return inject(PRAXIS_WIDGET_SHELL_VIEWPORT, { skipSelf: true, optional: true }) ?? undefined;
|
|
3598
|
+
}
|
|
3599
|
+
catch {
|
|
3600
|
+
return undefined;
|
|
3601
|
+
}
|
|
3602
|
+
})();
|
|
3126
3603
|
route = (() => { try {
|
|
3127
3604
|
return inject(ActivatedRoute);
|
|
3128
3605
|
}
|
|
3129
3606
|
catch {
|
|
3130
3607
|
return undefined;
|
|
3131
3608
|
} })();
|
|
3609
|
+
aiAssistantSessionDismissed = false;
|
|
3610
|
+
lastSyncedAiAssistantSessionId = null;
|
|
3611
|
+
lastHandledDismissalSeq = this.assistantSessions.lastDismissedSession()?.seq ?? 0;
|
|
3612
|
+
viewportConfigVersion = signal(0, ...(ngDevMode ? [{ debugName: "viewportConfigVersion" }] : /* istanbul ignore next */ []));
|
|
3613
|
+
// Signals to manage local state for selection in Nav mode and Group mode
|
|
3614
|
+
currentNavIndex = signal(0, ...(ngDevMode ? [{ debugName: "currentNavIndex" }] : /* istanbul ignore next */ []));
|
|
3615
|
+
selectedIndexSignal = signal(0, ...(ngDevMode ? [{ debugName: "selectedIndexSignal" }] : /* istanbul ignore next */ []));
|
|
3616
|
+
activeTabSingleFillWidget = computed(() => {
|
|
3617
|
+
this.viewportConfigVersion();
|
|
3618
|
+
const currentNav = this.currentNavIndex();
|
|
3619
|
+
const currentGroup = this.selectedIndexSignal();
|
|
3620
|
+
const currentConfig = this._config;
|
|
3621
|
+
if (!currentConfig || this.isEmptyGlobal()) {
|
|
3622
|
+
return false;
|
|
3623
|
+
}
|
|
3624
|
+
if (this.isNavMode()) {
|
|
3625
|
+
if (!this.shouldRenderNavBody()) {
|
|
3626
|
+
return false;
|
|
3627
|
+
}
|
|
3628
|
+
const activeLink = currentConfig.nav?.links?.[currentNav];
|
|
3629
|
+
if (!activeLink || !this.navContentReady(currentNav)) {
|
|
3630
|
+
return false;
|
|
3631
|
+
}
|
|
3632
|
+
return (!activeLink.content?.length &&
|
|
3633
|
+
this.safeWidgetDefinitions(activeLink.widgets).length === 1);
|
|
3634
|
+
}
|
|
3635
|
+
if (!this.shouldRenderGroupBody()) {
|
|
3636
|
+
return false;
|
|
3637
|
+
}
|
|
3638
|
+
const visibleTabs = this.visibleTabEntries();
|
|
3639
|
+
const selectedVisibleIdx = visibleTabs.findIndex((entry) => entry.index === currentGroup);
|
|
3640
|
+
const activeEntry = visibleTabs[selectedVisibleIdx >= 0 ? selectedVisibleIdx : 0];
|
|
3641
|
+
if (!activeEntry) {
|
|
3642
|
+
return false;
|
|
3643
|
+
}
|
|
3644
|
+
return (!activeEntry.tab.content?.length &&
|
|
3645
|
+
this.safeWidgetDefinitions(activeEntry.tab.widgets).length === 1);
|
|
3646
|
+
}, ...(ngDevMode ? [{ debugName: "activeTabSingleFillWidget" }] : /* istanbul ignore next */ []));
|
|
3647
|
+
viewportMode = computed(() => this.activeTabSingleFillWidget() ? 'fill' : 'flow', ...(ngDevMode ? [{ debugName: "viewportMode" }] : /* istanbul ignore next */ []));
|
|
3648
|
+
isFillViewport = computed(() => Boolean(this.parentShellViewport?.fillAvailable()) && this.viewportMode() === 'fill', ...(ngDevMode ? [{ debugName: "isFillViewport" }] : /* istanbul ignore next */ []));
|
|
3132
3649
|
aiAssistantSessionEffect = effect(() => {
|
|
3133
3650
|
const session = this.assistantSessions.activeSession();
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
this.
|
|
3138
|
-
|
|
3651
|
+
untracked(() => {
|
|
3652
|
+
if (!session || session.id !== this.reconcileAiAssistantSessionIdentity())
|
|
3653
|
+
return;
|
|
3654
|
+
if (!this.aiAssistantOpen) {
|
|
3655
|
+
this.openAiAssistantFromSession(session);
|
|
3656
|
+
}
|
|
3657
|
+
});
|
|
3139
3658
|
}, ...(ngDevMode ? [{ debugName: "aiAssistantSessionEffect" }] : /* istanbul ignore next */ []));
|
|
3659
|
+
aiAssistantDismissEffect = effect(() => {
|
|
3660
|
+
const dismissedSeqs = this.assistantSessions.dismissedSessionSeqs();
|
|
3661
|
+
untracked(() => {
|
|
3662
|
+
const seq = dismissedSeqs[this.reconcileAiAssistantSessionIdentity()] ?? 0;
|
|
3663
|
+
if (seq <= this.lastHandledDismissalSeq)
|
|
3664
|
+
return;
|
|
3665
|
+
this.lastHandledDismissalSeq = seq;
|
|
3666
|
+
if (this.aiAssistantOpen || !this.aiAssistantSessionDismissed) {
|
|
3667
|
+
this.closeAiAssistant();
|
|
3668
|
+
}
|
|
3669
|
+
});
|
|
3670
|
+
}, ...(ngDevMode ? [{ debugName: "aiAssistantDismissEffect" }] : /* istanbul ignore next */ []));
|
|
3140
3671
|
warnedMissingId = false;
|
|
3672
|
+
storageInitialized = false;
|
|
3141
3673
|
loadedStorageKey = null;
|
|
3142
|
-
|
|
3674
|
+
storageLoad;
|
|
3675
|
+
hostInputBaselineConfig;
|
|
3676
|
+
_config = null;
|
|
3677
|
+
get config() {
|
|
3678
|
+
return this._config;
|
|
3679
|
+
}
|
|
3680
|
+
set config(value) {
|
|
3681
|
+
this._config = value;
|
|
3682
|
+
this.viewportConfigVersion.update((v) => v + 1);
|
|
3683
|
+
}
|
|
3143
3684
|
tabsId;
|
|
3144
3685
|
componentInstanceId;
|
|
3145
3686
|
configPersistenceStrategy = 'storage-first';
|
|
@@ -3150,6 +3691,7 @@ class PraxisTabs {
|
|
|
3150
3691
|
this.applySelectedIndex(index, false, false);
|
|
3151
3692
|
}
|
|
3152
3693
|
enableCustomization = false;
|
|
3694
|
+
showOverflowIndex = 'auto';
|
|
3153
3695
|
form = null;
|
|
3154
3696
|
context = null;
|
|
3155
3697
|
animationDone = new EventEmitter();
|
|
@@ -3176,9 +3718,9 @@ class PraxisTabs {
|
|
|
3176
3718
|
};
|
|
3177
3719
|
aiAssistantController = null;
|
|
3178
3720
|
aiAssistantStateSubscription = null;
|
|
3179
|
-
//
|
|
3180
|
-
|
|
3181
|
-
|
|
3721
|
+
// Overflow & lazy tracking signals (nav/selectedIndex declared above)
|
|
3722
|
+
overflowIndexOpen = signal(false, ...(ngDevMode ? [{ debugName: "overflowIndexOpen" }] : /* istanbul ignore next */ []));
|
|
3723
|
+
overflowIndexFilter = signal('', ...(ngDevMode ? [{ debugName: "overflowIndexFilter" }] : /* istanbul ignore next */ []));
|
|
3182
3724
|
groupLoaded = new Set();
|
|
3183
3725
|
navLoaded = new Set();
|
|
3184
3726
|
controlledSelectedIndex;
|
|
@@ -3186,6 +3728,7 @@ class PraxisTabs {
|
|
|
3186
3728
|
groupComponent;
|
|
3187
3729
|
navComponent;
|
|
3188
3730
|
hostElement = inject(ElementRef);
|
|
3731
|
+
destroyRef = inject(DestroyRef);
|
|
3189
3732
|
headerResizeObserver;
|
|
3190
3733
|
observedHeader;
|
|
3191
3734
|
headerResizeFrame;
|
|
@@ -3196,13 +3739,35 @@ class PraxisTabs {
|
|
|
3196
3739
|
destroy$ = new Subject();
|
|
3197
3740
|
widgetDefinitionCache = new WeakMap();
|
|
3198
3741
|
generatedContentForm = new FormGroup({});
|
|
3742
|
+
runtimeStyleEl;
|
|
3743
|
+
lastRuntimeCss = '';
|
|
3199
3744
|
ngOnInit() {
|
|
3745
|
+
this.storageInitialized = true;
|
|
3746
|
+
if (this.config != null && this.hostInputBaselineConfig === undefined) {
|
|
3747
|
+
this.hostInputBaselineConfig = this.cloneTabsMetadata(this.config);
|
|
3748
|
+
}
|
|
3200
3749
|
this.syncSelectionFromConfig();
|
|
3201
3750
|
this.syncGeneratedContentForm();
|
|
3202
3751
|
this.loadStoredConfigForCurrentIdentity({ warnMissingId: false });
|
|
3752
|
+
this.syncRuntimeStyleElement();
|
|
3203
3753
|
}
|
|
3204
3754
|
ngOnChanges(changes) {
|
|
3205
|
-
if (
|
|
3755
|
+
if ('config' in changes) {
|
|
3756
|
+
const incoming = changes['config'].currentValue;
|
|
3757
|
+
this.hostInputBaselineConfig =
|
|
3758
|
+
incoming != null ? this.cloneTabsMetadata(incoming) : null;
|
|
3759
|
+
if (this.usesInputFirstConfig()) {
|
|
3760
|
+
this.storageLoad?.unsubscribe();
|
|
3761
|
+
this.storageLoad = undefined;
|
|
3762
|
+
}
|
|
3763
|
+
}
|
|
3764
|
+
if (this.storageInitialized &&
|
|
3765
|
+
(changes['tabsId'] || changes['componentInstanceId'] || changes['configPersistenceStrategy'])) {
|
|
3766
|
+
this.loadedStorageKey = null;
|
|
3767
|
+
if (this.isVolatilePersistence() || this.usesInputFirstConfig()) {
|
|
3768
|
+
this.storageLoad?.unsubscribe();
|
|
3769
|
+
this.storageLoad = undefined;
|
|
3770
|
+
}
|
|
3206
3771
|
this.loadStoredConfigForCurrentIdentity({ warnMissingId: false });
|
|
3207
3772
|
}
|
|
3208
3773
|
if (changes['config'] && this.config) {
|
|
@@ -3211,23 +3776,31 @@ class PraxisTabs {
|
|
|
3211
3776
|
// previous inputs in that case (for example, a newly selected parent
|
|
3212
3777
|
// identity projected into a related-resource outlet).
|
|
3213
3778
|
this.widgetDefinitionCache = new WeakMap();
|
|
3214
|
-
//
|
|
3215
|
-
// nested child input. Preserve the user's active tab when the incoming
|
|
3216
|
-
// document did not author a different selectedIndex explicitly.
|
|
3779
|
+
// Sync selection/content without mutating remote storage on input hydration/recomputation.
|
|
3217
3780
|
this.syncSelectionFromConfigChange(changes['config']);
|
|
3218
3781
|
this.syncGeneratedContentForm();
|
|
3219
|
-
// Persist when tabsId provided and the instance is storage-owned.
|
|
3220
|
-
this.persistConfig(this.config);
|
|
3221
3782
|
this.reapplyControlledSelectedIndex();
|
|
3222
3783
|
}
|
|
3784
|
+
this.syncRuntimeStyleElement();
|
|
3785
|
+
}
|
|
3786
|
+
ngDoCheck() {
|
|
3787
|
+
if (!this.destroyed) {
|
|
3788
|
+
this.syncRuntimeStyleElement();
|
|
3789
|
+
}
|
|
3223
3790
|
}
|
|
3224
3791
|
ngOnDestroy() {
|
|
3225
3792
|
this.destroyed = true;
|
|
3793
|
+
this.storageLoad?.unsubscribe();
|
|
3794
|
+
this.storageLoad = undefined;
|
|
3226
3795
|
this.headerResizeObserver?.disconnect();
|
|
3227
3796
|
if (this.headerResizeFrame !== undefined) {
|
|
3228
3797
|
this.hostElement.nativeElement.ownerDocument.defaultView?.cancelAnimationFrame(this.headerResizeFrame);
|
|
3229
3798
|
}
|
|
3799
|
+
this.runtimeStyleEl?.remove();
|
|
3800
|
+
this.runtimeStyleEl = undefined;
|
|
3801
|
+
this.reconcileAiAssistantSessionIdentity();
|
|
3230
3802
|
this.assistantSessions.removeContextSession(this.buildAiAssistantContextSnapshot().identity);
|
|
3803
|
+
this.lastSyncedAiAssistantSessionId = null;
|
|
3231
3804
|
this.aiAssistantStateSubscription?.unsubscribe();
|
|
3232
3805
|
this.destroy$.next();
|
|
3233
3806
|
this.destroy$.complete();
|
|
@@ -3323,6 +3896,130 @@ class PraxisTabs {
|
|
|
3323
3896
|
const index = entries.findIndex((entry) => entry.index === this.selectedIndexSignal());
|
|
3324
3897
|
return index >= 0 ? index : 0;
|
|
3325
3898
|
}
|
|
3899
|
+
shouldShowOverflowIndex() {
|
|
3900
|
+
if (this.showOverflowIndex === false) {
|
|
3901
|
+
return false;
|
|
3902
|
+
}
|
|
3903
|
+
const visibleCount = this.isNavMode()
|
|
3904
|
+
? this.visibleNavLinkEntries().length
|
|
3905
|
+
: this.visibleTabEntries().length;
|
|
3906
|
+
if (this.showOverflowIndex === true) {
|
|
3907
|
+
return visibleCount > 1;
|
|
3908
|
+
}
|
|
3909
|
+
return visibleCount >= 8;
|
|
3910
|
+
}
|
|
3911
|
+
overflowIndexItems() {
|
|
3912
|
+
if (this.isNavMode()) {
|
|
3913
|
+
const selectedIdx = this.selectedVisibleNavIndex();
|
|
3914
|
+
return this.visibleNavLinkEntries().map((entry, visibleIndex) => ({
|
|
3915
|
+
key: entry.link.id || `nav-${entry.index}`,
|
|
3916
|
+
visibleIndex,
|
|
3917
|
+
label: entry.link.label || `Link ${entry.index + 1}`,
|
|
3918
|
+
icon: entry.link.icon,
|
|
3919
|
+
disabled: entry.link.disabled === true,
|
|
3920
|
+
active: visibleIndex === selectedIdx,
|
|
3921
|
+
}));
|
|
3922
|
+
}
|
|
3923
|
+
const selectedIdx = this.selectedVisibleTabIndex();
|
|
3924
|
+
return this.visibleTabEntries().map((entry, visibleIndex) => ({
|
|
3925
|
+
key: entry.tab.id || `tab-${entry.index}`,
|
|
3926
|
+
visibleIndex,
|
|
3927
|
+
label: entry.tab.textLabel || `Tab ${entry.index + 1}`,
|
|
3928
|
+
icon: entry.tab.icon,
|
|
3929
|
+
disabled: entry.tab.disabled === true,
|
|
3930
|
+
active: visibleIndex === selectedIdx,
|
|
3931
|
+
}));
|
|
3932
|
+
}
|
|
3933
|
+
filteredOverflowIndexItems() {
|
|
3934
|
+
const items = this.overflowIndexItems();
|
|
3935
|
+
const rawQuery = this.overflowIndexFilter().trim();
|
|
3936
|
+
if (!rawQuery) {
|
|
3937
|
+
return items;
|
|
3938
|
+
}
|
|
3939
|
+
const normalize = (value) => value
|
|
3940
|
+
.normalize('NFD')
|
|
3941
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
3942
|
+
.toLowerCase();
|
|
3943
|
+
const needle = normalize(rawQuery);
|
|
3944
|
+
return items.filter((item) => normalize(item.label).includes(needle));
|
|
3945
|
+
}
|
|
3946
|
+
toggleOverflowIndex(event) {
|
|
3947
|
+
event.stopPropagation();
|
|
3948
|
+
const next = !this.overflowIndexOpen();
|
|
3949
|
+
this.overflowIndexOpen.set(next);
|
|
3950
|
+
if (next) {
|
|
3951
|
+
this.overflowIndexFilter.set('');
|
|
3952
|
+
queueMicrotask(() => {
|
|
3953
|
+
if (this.destroyed || !this.overflowIndexOpen())
|
|
3954
|
+
return;
|
|
3955
|
+
const input = this.hostElement.nativeElement.querySelector('[data-testid="praxis-tabs-overflow-index-search"]');
|
|
3956
|
+
input?.focus({ preventScroll: true });
|
|
3957
|
+
});
|
|
3958
|
+
}
|
|
3959
|
+
}
|
|
3960
|
+
closeOverflowIndex(restoreFocus = false) {
|
|
3961
|
+
if (!this.overflowIndexOpen()) {
|
|
3962
|
+
return;
|
|
3963
|
+
}
|
|
3964
|
+
this.overflowIndexOpen.set(false);
|
|
3965
|
+
this.overflowIndexFilter.set('');
|
|
3966
|
+
if (restoreFocus) {
|
|
3967
|
+
queueMicrotask(() => {
|
|
3968
|
+
if (this.destroyed)
|
|
3969
|
+
return;
|
|
3970
|
+
const trigger = this.hostElement.nativeElement.querySelector('[data-testid="praxis-tabs-overflow-index-trigger"]');
|
|
3971
|
+
trigger?.focus({ preventScroll: true });
|
|
3972
|
+
});
|
|
3973
|
+
}
|
|
3974
|
+
}
|
|
3975
|
+
onOverflowIndexFilterInput(event) {
|
|
3976
|
+
const target = event.target;
|
|
3977
|
+
this.overflowIndexFilter.set(target?.value ?? '');
|
|
3978
|
+
}
|
|
3979
|
+
onOverflowIndexSearchKeydown(event) {
|
|
3980
|
+
if (event.isComposing) {
|
|
3981
|
+
return;
|
|
3982
|
+
}
|
|
3983
|
+
if (event.key === 'Enter') {
|
|
3984
|
+
const first = this.filteredOverflowIndexItems().find((item) => !item.disabled);
|
|
3985
|
+
if (first) {
|
|
3986
|
+
event.preventDefault();
|
|
3987
|
+
this.selectTabFromOverflowIndex(first.visibleIndex);
|
|
3988
|
+
}
|
|
3989
|
+
}
|
|
3990
|
+
}
|
|
3991
|
+
selectTabFromOverflowIndex(visibleIndex) {
|
|
3992
|
+
if (this.isNavMode()) {
|
|
3993
|
+
const entry = this.visibleNavLinkEntries()[visibleIndex];
|
|
3994
|
+
if (!entry || entry.link.disabled)
|
|
3995
|
+
return;
|
|
3996
|
+
this.onNavClick(entry.index);
|
|
3997
|
+
}
|
|
3998
|
+
else {
|
|
3999
|
+
const entry = this.visibleTabEntries()[visibleIndex];
|
|
4000
|
+
if (!entry || entry.tab.disabled)
|
|
4001
|
+
return;
|
|
4002
|
+
this.onVisibleTabIndexChange(visibleIndex);
|
|
4003
|
+
}
|
|
4004
|
+
this.closeOverflowIndex(false);
|
|
4005
|
+
}
|
|
4006
|
+
onDocumentClickCloseOverflowIndex(event) {
|
|
4007
|
+
if (!this.overflowIndexOpen()) {
|
|
4008
|
+
return;
|
|
4009
|
+
}
|
|
4010
|
+
const target = event.target;
|
|
4011
|
+
const container = this.hostElement.nativeElement.querySelector('.praxis-tabs-overflow-index');
|
|
4012
|
+
if (!container || (target && !container.contains(target))) {
|
|
4013
|
+
this.closeOverflowIndex(false);
|
|
4014
|
+
}
|
|
4015
|
+
}
|
|
4016
|
+
onDocumentEscapeCloseOverflowIndex(event) {
|
|
4017
|
+
if (!this.overflowIndexOpen() || event.defaultPrevented) {
|
|
4018
|
+
return;
|
|
4019
|
+
}
|
|
4020
|
+
event.preventDefault();
|
|
4021
|
+
this.closeOverflowIndex(true);
|
|
4022
|
+
}
|
|
3326
4023
|
effectiveContentForm() {
|
|
3327
4024
|
return this.form || this.generatedContentForm;
|
|
3328
4025
|
}
|
|
@@ -3539,20 +4236,71 @@ class PraxisTabs {
|
|
|
3539
4236
|
this.persistConfig(this.config);
|
|
3540
4237
|
}
|
|
3541
4238
|
openEditor() {
|
|
3542
|
-
const
|
|
4239
|
+
const storageKey = this.storageKey({ warnMissingId: false });
|
|
4240
|
+
const idSuffix = storageKey || this.tabsId || 'default';
|
|
4241
|
+
const hasHostBaseline = this.hostInputBaselineConfig != null;
|
|
4242
|
+
const baselineConfig = hasHostBaseline
|
|
4243
|
+
? this.cloneTabsMetadata(this.hostInputBaselineConfig)
|
|
4244
|
+
: undefined;
|
|
4245
|
+
const canPersist = () => Boolean(storageKey) && !this.isVolatilePersistence() && !this.usesInputFirstConfig();
|
|
4246
|
+
let savedViaHandler = false;
|
|
4247
|
+
let resetViaHandler = false;
|
|
4248
|
+
let committed = false;
|
|
4249
|
+
let appliedPreview = false;
|
|
3543
4250
|
const initialDocument = createTabsAuthoringDocument({
|
|
3544
4251
|
config: this.config ?? {},
|
|
3545
4252
|
bindings: this.currentTabsBindings(),
|
|
3546
4253
|
});
|
|
3547
4254
|
const ref = this.settings.open({
|
|
3548
|
-
id: `praxis-tabs-editor:${
|
|
4255
|
+
id: `praxis-tabs-editor:${idSuffix}`,
|
|
4256
|
+
owner: this.destroyRef,
|
|
3549
4257
|
title: this.t('settings.title', 'Configurar abas'),
|
|
4258
|
+
configStorageKey: canPersist() ? (storageKey ?? undefined) : undefined,
|
|
4259
|
+
onSave: canPersist() && storageKey
|
|
4260
|
+
? async (value) => {
|
|
4261
|
+
if (!canPersist() || this.storageKey({ warnMissingId: false }) !== storageKey) {
|
|
4262
|
+
throw new Error('Tabs configuration persistence target is no longer active.');
|
|
4263
|
+
}
|
|
4264
|
+
const document = normalizeTabsAuthoringDocument(value);
|
|
4265
|
+
const plan = buildTabsApplyPlan(document, {
|
|
4266
|
+
currentBindings: this.currentTabsBindings(),
|
|
4267
|
+
currentConfig: this.config,
|
|
4268
|
+
}, {
|
|
4269
|
+
saveConfig: true,
|
|
4270
|
+
saveBindings: false,
|
|
4271
|
+
});
|
|
4272
|
+
if (plan.diagnostics.some((item) => item.level === 'error')) {
|
|
4273
|
+
throw new Error('Invalid tabs configuration');
|
|
4274
|
+
}
|
|
4275
|
+
await firstValueFrom(this.storage.saveConfig(storageKey, this.cloneTabsMetadata(plan.canonicalConfig)));
|
|
4276
|
+
savedViaHandler = true;
|
|
4277
|
+
}
|
|
4278
|
+
: undefined,
|
|
4279
|
+
onReset: canPersist() && storageKey
|
|
4280
|
+
? async () => {
|
|
4281
|
+
if (!canPersist() || this.storageKey({ warnMissingId: false }) !== storageKey) {
|
|
4282
|
+
throw new Error('Tabs configuration persistence target is no longer active.');
|
|
4283
|
+
}
|
|
4284
|
+
await firstValueFrom(this.storage.clearConfig(storageKey));
|
|
4285
|
+
resetViaHandler = true;
|
|
4286
|
+
}
|
|
4287
|
+
: undefined,
|
|
3550
4288
|
content: {
|
|
3551
4289
|
component: PraxisTabsConfigEditor,
|
|
3552
4290
|
inputs: { document: initialDocument },
|
|
3553
4291
|
},
|
|
3554
4292
|
});
|
|
3555
|
-
const
|
|
4293
|
+
const restoreBaseline = () => {
|
|
4294
|
+
this.config =
|
|
4295
|
+
hasHostBaseline && baselineConfig
|
|
4296
|
+
? this.cloneTabsMetadata(baselineConfig)
|
|
4297
|
+
: {};
|
|
4298
|
+
this.syncSelectionFromConfig();
|
|
4299
|
+
this.syncGeneratedContentForm();
|
|
4300
|
+
this.syncRuntimeStyleElement();
|
|
4301
|
+
this.configChange.emit({ inputPatch: { config: this.cloneTabsMetadata(this.config) } });
|
|
4302
|
+
};
|
|
4303
|
+
const applyDocument = (value, options) => {
|
|
3556
4304
|
const document = normalizeTabsAuthoringDocument(value);
|
|
3557
4305
|
const plan = buildTabsApplyPlan(document, {
|
|
3558
4306
|
currentBindings: this.currentTabsBindings(),
|
|
@@ -3561,12 +4309,47 @@ class PraxisTabs {
|
|
|
3561
4309
|
saveConfig: true,
|
|
3562
4310
|
saveBindings: false,
|
|
3563
4311
|
});
|
|
3564
|
-
this.applyTabsAuthoringPlan(plan);
|
|
4312
|
+
this.applyTabsAuthoringPlan(plan, options);
|
|
3565
4313
|
};
|
|
3566
|
-
ref.applied$.pipe(takeUntil(this.destroy$)).subscribe(
|
|
3567
|
-
|
|
4314
|
+
ref.applied$.pipe(takeUntil(this.destroy$)).subscribe((val) => {
|
|
4315
|
+
if (!val)
|
|
4316
|
+
return;
|
|
4317
|
+
appliedPreview = true;
|
|
4318
|
+
applyDocument(val, { skipStoragePersist: true });
|
|
4319
|
+
});
|
|
4320
|
+
ref.saved$.pipe(takeUntil(this.destroy$)).subscribe((val) => {
|
|
4321
|
+
const skipStoragePersist = savedViaHandler;
|
|
4322
|
+
savedViaHandler = false;
|
|
4323
|
+
if (!val)
|
|
4324
|
+
return;
|
|
4325
|
+
committed = true;
|
|
4326
|
+
appliedPreview = false;
|
|
4327
|
+
applyDocument(val, { skipStoragePersist });
|
|
4328
|
+
});
|
|
4329
|
+
ref.reset$?.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
4330
|
+
const skipClear = resetViaHandler;
|
|
4331
|
+
resetViaHandler = false;
|
|
4332
|
+
committed = true;
|
|
4333
|
+
appliedPreview = false;
|
|
4334
|
+
if (!skipClear && canPersist() && storageKey) {
|
|
4335
|
+
this.storage.clearConfig(storageKey).pipe(take(1)).subscribe({
|
|
4336
|
+
error: (error) => this.logger.warn('[PraxisTabs] Failed to clear tabs configuration.', {
|
|
4337
|
+
context: { lib: 'praxis-tabs', component: 'PraxisTabs' },
|
|
4338
|
+
data: { key: storageKey, error },
|
|
4339
|
+
}),
|
|
4340
|
+
});
|
|
4341
|
+
}
|
|
4342
|
+
restoreBaseline();
|
|
4343
|
+
});
|
|
4344
|
+
ref.closed$?.pipe(take(1), takeUntil(this.destroy$)).subscribe(() => {
|
|
4345
|
+
if (appliedPreview && !committed) {
|
|
4346
|
+
restoreBaseline();
|
|
4347
|
+
}
|
|
4348
|
+
});
|
|
3568
4349
|
}
|
|
3569
4350
|
openAiAssistant() {
|
|
4351
|
+
this.reconcileAiAssistantSessionIdentity();
|
|
4352
|
+
this.aiAssistantSessionDismissed = false;
|
|
3570
4353
|
this.initializeAiAssistantController();
|
|
3571
4354
|
this.aiAssistantOpen = true;
|
|
3572
4355
|
this.aiAssistantController?.setContextItems(this.buildAiAssistantContextItems());
|
|
@@ -3574,19 +4357,39 @@ class PraxisTabs {
|
|
|
3574
4357
|
this.cdr.markForCheck();
|
|
3575
4358
|
}
|
|
3576
4359
|
openAiAssistantFromSession(session) {
|
|
3577
|
-
if (session.id !== this.
|
|
4360
|
+
if (session.id !== this.reconcileAiAssistantSessionIdentity())
|
|
3578
4361
|
return;
|
|
4362
|
+
this.aiAssistantSessionDismissed = false;
|
|
3579
4363
|
this.initializeAiAssistantController();
|
|
3580
4364
|
this.aiAssistantOpen = true;
|
|
3581
4365
|
this.aiAssistantController?.setContextItems(this.buildAiAssistantContextItems());
|
|
3582
4366
|
this.syncAiAssistantSession('active');
|
|
3583
4367
|
this.cdr.markForCheck();
|
|
3584
4368
|
}
|
|
3585
|
-
|
|
4369
|
+
minimizeAiAssistant() {
|
|
4370
|
+
this.reconcileAiAssistantSessionIdentity();
|
|
4371
|
+
this.aiAssistantSessionDismissed = false;
|
|
3586
4372
|
this.aiAssistantOpen = false;
|
|
3587
4373
|
this.syncAiAssistantSession('minimized');
|
|
3588
4374
|
this.cdr.markForCheck();
|
|
3589
4375
|
}
|
|
4376
|
+
closeAiAssistant() {
|
|
4377
|
+
const sessionId = this.reconcileAiAssistantSessionIdentity();
|
|
4378
|
+
this.aiAssistantSessionDismissed = true;
|
|
4379
|
+
this.aiAssistantOpen = false;
|
|
4380
|
+
this.lastSyncedAiAssistantSessionId = null;
|
|
4381
|
+
this.assistantSessions.removeSession(sessionId);
|
|
4382
|
+
if (this.aiAssistantViewState?.state === 'processing' || this.aiAssistantViewState?.state === 'applying') {
|
|
4383
|
+
this.aiAssistantController?.cancel().subscribe({
|
|
4384
|
+
next: (state) => {
|
|
4385
|
+
this.aiAssistantViewState = state;
|
|
4386
|
+
this.cdr.markForCheck();
|
|
4387
|
+
},
|
|
4388
|
+
error: () => undefined,
|
|
4389
|
+
});
|
|
4390
|
+
}
|
|
4391
|
+
this.cdr.markForCheck();
|
|
4392
|
+
}
|
|
3590
4393
|
onAiAssistantPromptChange(prompt) {
|
|
3591
4394
|
this.aiAssistantPrompt = prompt;
|
|
3592
4395
|
this.syncAiAssistantSession();
|
|
@@ -3785,7 +4588,10 @@ class PraxisTabs {
|
|
|
3785
4588
|
syncAiAssistantSession(visibility = null) {
|
|
3786
4589
|
if (!this.enableCustomization)
|
|
3787
4590
|
return;
|
|
3788
|
-
|
|
4591
|
+
const sessionId = this.reconcileAiAssistantSessionIdentity();
|
|
4592
|
+
if (visibility !== 'active' && !this.aiAssistantOpen && this.aiAssistantSessionDismissed)
|
|
4593
|
+
return;
|
|
4594
|
+
if (!this.aiAssistantOpen && !this.hasAiAssistantSessionState() && visibility !== 'minimized')
|
|
3789
4595
|
return;
|
|
3790
4596
|
const state = this.aiAssistantViewState;
|
|
3791
4597
|
this.assistantSessions.upsertContextSession(this.buildAiAssistantContextSnapshot(), {
|
|
@@ -3797,6 +4603,16 @@ class PraxisTabs {
|
|
|
3797
4603
|
badge: this.resolveAiAssistantBadge(),
|
|
3798
4604
|
icon: this.resolveAiAssistantIcon(),
|
|
3799
4605
|
});
|
|
4606
|
+
this.lastSyncedAiAssistantSessionId = sessionId;
|
|
4607
|
+
}
|
|
4608
|
+
reconcileAiAssistantSessionIdentity() {
|
|
4609
|
+
const sessionId = this.resolveAiAssistantSessionId();
|
|
4610
|
+
if (this.lastSyncedAiAssistantSessionId && this.lastSyncedAiAssistantSessionId !== sessionId) {
|
|
4611
|
+
this.assistantSessions.removeSession(this.lastSyncedAiAssistantSessionId);
|
|
4612
|
+
this.lastSyncedAiAssistantSessionId = null;
|
|
4613
|
+
this.aiAssistantSessionDismissed = false;
|
|
4614
|
+
}
|
|
4615
|
+
return sessionId;
|
|
3800
4616
|
}
|
|
3801
4617
|
hasAiAssistantSessionState() {
|
|
3802
4618
|
return !!this.aiAssistantPrompt.trim()
|
|
@@ -3894,39 +4710,101 @@ class PraxisTabs {
|
|
|
3894
4710
|
});
|
|
3895
4711
|
this.config = next;
|
|
3896
4712
|
this.syncGeneratedContentForm();
|
|
4713
|
+
this.syncRuntimeStyleElement();
|
|
3897
4714
|
this.persistConfig(this.config);
|
|
3898
4715
|
this.selectedIndexSignal.set(this.config?.group?.selectedIndex ?? 0);
|
|
3899
4716
|
}
|
|
3900
4717
|
/** Clears persisted tabs configuration to fallback to defaults */
|
|
3901
4718
|
resetPreferences() {
|
|
4719
|
+
if (this.isVolatilePersistence() || this.usesInputFirstConfig()) {
|
|
4720
|
+
return;
|
|
4721
|
+
}
|
|
3902
4722
|
const key = this.storageKey();
|
|
3903
4723
|
if (!key)
|
|
3904
4724
|
return;
|
|
3905
4725
|
try {
|
|
3906
|
-
this.storage.clearConfig(key).pipe(take(1)).subscribe({
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
4726
|
+
this.storage.clearConfig(key).pipe(take(1)).subscribe({
|
|
4727
|
+
next: () => {
|
|
4728
|
+
try {
|
|
4729
|
+
this.snack.open(this.t('settings.resetDone', 'Preferencias de abas redefinidas'), undefined, { duration: 2000 });
|
|
4730
|
+
}
|
|
4731
|
+
catch { }
|
|
4732
|
+
},
|
|
4733
|
+
error: (error) => this.logger.warn('[PraxisTabs] Failed to clear tabs configuration.', {
|
|
4734
|
+
context: { lib: 'praxis-tabs', component: 'PraxisTabs' },
|
|
4735
|
+
data: { key, error },
|
|
4736
|
+
}),
|
|
4737
|
+
});
|
|
3911
4738
|
}
|
|
3912
4739
|
catch { }
|
|
3913
4740
|
// keep current in-memory config; caller may choose to reload
|
|
3914
4741
|
}
|
|
3915
4742
|
openQuickSetup() {
|
|
3916
|
-
const
|
|
4743
|
+
const storageKey = this.storageKey({ warnMissingId: false });
|
|
4744
|
+
const idSuffix = storageKey || this.tabsId || 'default';
|
|
4745
|
+
const hasHostBaseline = this.hostInputBaselineConfig != null;
|
|
4746
|
+
const baselineConfig = hasHostBaseline
|
|
4747
|
+
? this.cloneTabsMetadata(this.hostInputBaselineConfig)
|
|
4748
|
+
: undefined;
|
|
4749
|
+
const canPersist = () => Boolean(storageKey) && !this.isVolatilePersistence() && !this.usesInputFirstConfig();
|
|
4750
|
+
let savedViaHandler = false;
|
|
4751
|
+
let resetViaHandler = false;
|
|
4752
|
+
let committed = false;
|
|
4753
|
+
let appliedPreview = false;
|
|
3917
4754
|
const initialDocument = createTabsAuthoringDocument({
|
|
3918
4755
|
config: this.config ?? {},
|
|
3919
4756
|
bindings: this.currentTabsBindings(),
|
|
3920
4757
|
});
|
|
3921
4758
|
const ref = this.settings.open({
|
|
3922
|
-
id: `praxis-tabs-quick-setup:${
|
|
4759
|
+
id: `praxis-tabs-quick-setup:${idSuffix}`,
|
|
4760
|
+
owner: this.destroyRef,
|
|
3923
4761
|
title: this.t('quickSetup.title', 'Criar abas rapidamente'),
|
|
4762
|
+
configStorageKey: canPersist() ? (storageKey ?? undefined) : undefined,
|
|
4763
|
+
onSave: canPersist() && storageKey
|
|
4764
|
+
? async (value) => {
|
|
4765
|
+
if (!canPersist() || this.storageKey({ warnMissingId: false }) !== storageKey) {
|
|
4766
|
+
throw new Error('Tabs configuration persistence target is no longer active.');
|
|
4767
|
+
}
|
|
4768
|
+
const document = normalizeTabsAuthoringDocument(value);
|
|
4769
|
+
const plan = buildTabsApplyPlan(document, {
|
|
4770
|
+
currentBindings: this.currentTabsBindings(),
|
|
4771
|
+
currentConfig: this.config,
|
|
4772
|
+
}, {
|
|
4773
|
+
saveConfig: true,
|
|
4774
|
+
saveBindings: false,
|
|
4775
|
+
});
|
|
4776
|
+
if (plan.diagnostics.some((item) => item.level === 'error')) {
|
|
4777
|
+
throw new Error('Invalid tabs configuration');
|
|
4778
|
+
}
|
|
4779
|
+
await firstValueFrom(this.storage.saveConfig(storageKey, this.cloneTabsMetadata(plan.canonicalConfig)));
|
|
4780
|
+
savedViaHandler = true;
|
|
4781
|
+
}
|
|
4782
|
+
: undefined,
|
|
4783
|
+
onReset: canPersist() && storageKey
|
|
4784
|
+
? async () => {
|
|
4785
|
+
if (!canPersist() || this.storageKey({ warnMissingId: false }) !== storageKey) {
|
|
4786
|
+
throw new Error('Tabs configuration persistence target is no longer active.');
|
|
4787
|
+
}
|
|
4788
|
+
await firstValueFrom(this.storage.clearConfig(storageKey));
|
|
4789
|
+
resetViaHandler = true;
|
|
4790
|
+
}
|
|
4791
|
+
: undefined,
|
|
3924
4792
|
content: {
|
|
3925
4793
|
component: TabsQuickSetupComponent,
|
|
3926
4794
|
inputs: { document: initialDocument },
|
|
3927
4795
|
},
|
|
3928
4796
|
});
|
|
3929
|
-
const
|
|
4797
|
+
const restoreBaseline = () => {
|
|
4798
|
+
this.config =
|
|
4799
|
+
hasHostBaseline && baselineConfig
|
|
4800
|
+
? this.cloneTabsMetadata(baselineConfig)
|
|
4801
|
+
: {};
|
|
4802
|
+
this.syncSelectionFromConfig();
|
|
4803
|
+
this.syncGeneratedContentForm();
|
|
4804
|
+
this.syncRuntimeStyleElement();
|
|
4805
|
+
this.configChange.emit({ inputPatch: { config: this.cloneTabsMetadata(this.config) } });
|
|
4806
|
+
};
|
|
4807
|
+
const applyDocument = (value, options) => {
|
|
3930
4808
|
const document = normalizeTabsAuthoringDocument(value);
|
|
3931
4809
|
const plan = buildTabsApplyPlan(document, {
|
|
3932
4810
|
currentBindings: this.currentTabsBindings(),
|
|
@@ -3935,10 +4813,43 @@ class PraxisTabs {
|
|
|
3935
4813
|
saveConfig: true,
|
|
3936
4814
|
saveBindings: false,
|
|
3937
4815
|
});
|
|
3938
|
-
this.applyTabsAuthoringPlan(plan);
|
|
4816
|
+
this.applyTabsAuthoringPlan(plan, options);
|
|
3939
4817
|
};
|
|
3940
|
-
ref.applied$.pipe(takeUntil(this.destroy$)).subscribe(
|
|
3941
|
-
|
|
4818
|
+
ref.applied$.pipe(takeUntil(this.destroy$)).subscribe((val) => {
|
|
4819
|
+
if (!val)
|
|
4820
|
+
return;
|
|
4821
|
+
appliedPreview = true;
|
|
4822
|
+
applyDocument(val, { skipStoragePersist: true });
|
|
4823
|
+
});
|
|
4824
|
+
ref.saved$.pipe(takeUntil(this.destroy$)).subscribe((val) => {
|
|
4825
|
+
const skipStoragePersist = savedViaHandler;
|
|
4826
|
+
savedViaHandler = false;
|
|
4827
|
+
if (!val)
|
|
4828
|
+
return;
|
|
4829
|
+
committed = true;
|
|
4830
|
+
appliedPreview = false;
|
|
4831
|
+
applyDocument(val, { skipStoragePersist });
|
|
4832
|
+
});
|
|
4833
|
+
ref.reset$?.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
4834
|
+
const skipClear = resetViaHandler;
|
|
4835
|
+
resetViaHandler = false;
|
|
4836
|
+
committed = true;
|
|
4837
|
+
appliedPreview = false;
|
|
4838
|
+
if (!skipClear && canPersist() && storageKey) {
|
|
4839
|
+
this.storage.clearConfig(storageKey).pipe(take(1)).subscribe({
|
|
4840
|
+
error: (error) => this.logger.warn('[PraxisTabs] Failed to clear tabs configuration.', {
|
|
4841
|
+
context: { lib: 'praxis-tabs', component: 'PraxisTabs' },
|
|
4842
|
+
data: { key: storageKey, error },
|
|
4843
|
+
}),
|
|
4844
|
+
});
|
|
4845
|
+
}
|
|
4846
|
+
restoreBaseline();
|
|
4847
|
+
});
|
|
4848
|
+
ref.closed$?.pipe(take(1), takeUntil(this.destroy$)).subscribe(() => {
|
|
4849
|
+
if (appliedPreview && !committed) {
|
|
4850
|
+
restoreBaseline();
|
|
4851
|
+
}
|
|
4852
|
+
});
|
|
3942
4853
|
}
|
|
3943
4854
|
currentTabsBindings() {
|
|
3944
4855
|
return {
|
|
@@ -3946,16 +4857,17 @@ class PraxisTabs {
|
|
|
3946
4857
|
componentInstanceId: this.componentInstanceId ?? null,
|
|
3947
4858
|
};
|
|
3948
4859
|
}
|
|
3949
|
-
t(key, fallback) {
|
|
3950
|
-
return this.i18n.t(key,
|
|
4860
|
+
t(key, fallback, params) {
|
|
4861
|
+
return this.i18n.t(key, params, fallback, PRAXIS_TABS_I18N_NAMESPACE);
|
|
3951
4862
|
}
|
|
3952
|
-
applyTabsAuthoringPlan(plan) {
|
|
4863
|
+
applyTabsAuthoringPlan(plan, options) {
|
|
3953
4864
|
if (plan.diagnostics.some((item) => item.level === 'error')) {
|
|
3954
4865
|
return;
|
|
3955
4866
|
}
|
|
3956
4867
|
this.config = plan.canonicalConfig;
|
|
3957
4868
|
this.syncSelectionFromConfig();
|
|
3958
4869
|
this.syncGeneratedContentForm();
|
|
4870
|
+
this.syncRuntimeStyleElement();
|
|
3959
4871
|
if (plan.runtime.rebuildLazyState) {
|
|
3960
4872
|
this.groupLoaded.clear();
|
|
3961
4873
|
this.navLoaded.clear();
|
|
@@ -3968,29 +4880,49 @@ class PraxisTabs {
|
|
|
3968
4880
|
this.navLoaded.add(navIndex);
|
|
3969
4881
|
}
|
|
3970
4882
|
}
|
|
3971
|
-
if (plan.persistence.saveConfig) {
|
|
4883
|
+
if (plan.persistence.saveConfig && !options?.skipStoragePersist) {
|
|
3972
4884
|
this.persistConfig(this.config);
|
|
3973
4885
|
}
|
|
4886
|
+
this.configChange.emit({ inputPatch: { config: this.cloneTabsMetadata(this.config) } });
|
|
3974
4887
|
}
|
|
3975
4888
|
storageKey(options = {}) {
|
|
3976
4889
|
const id = this.componentKeyId(options);
|
|
3977
4890
|
return id ? `tabs:${id}` : null;
|
|
3978
4891
|
}
|
|
3979
4892
|
loadStoredConfigForCurrentIdentity(options = {}) {
|
|
3980
|
-
|
|
4893
|
+
this.storageLoad?.unsubscribe();
|
|
4894
|
+
this.storageLoad = undefined;
|
|
4895
|
+
if (this.isVolatilePersistence() || this.usesInputFirstConfig()) {
|
|
3981
4896
|
return;
|
|
3982
4897
|
}
|
|
3983
4898
|
const key = this.storageKey(options);
|
|
3984
4899
|
if (!key || key === this.loadedStorageKey)
|
|
3985
4900
|
return;
|
|
3986
4901
|
this.loadedStorageKey = key;
|
|
3987
|
-
this.storage.loadConfig(key).pipe(take(1)).subscribe(
|
|
3988
|
-
|
|
3989
|
-
this.
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
4902
|
+
this.storageLoad = this.storage.loadConfig(key).pipe(take(1)).subscribe({
|
|
4903
|
+
next: (stored) => {
|
|
4904
|
+
if (this.destroyed || this.isVolatilePersistence() || this.usesInputFirstConfig()) {
|
|
4905
|
+
return;
|
|
4906
|
+
}
|
|
4907
|
+
if (key !== this.storageKey({ warnMissingId: false })) {
|
|
4908
|
+
return;
|
|
4909
|
+
}
|
|
4910
|
+
if (stored) {
|
|
4911
|
+
this.config = stored;
|
|
4912
|
+
this.syncGeneratedContentForm();
|
|
4913
|
+
this.syncRuntimeStyleElement();
|
|
4914
|
+
this.configChange.emit({ inputPatch: { config: this.cloneTabsMetadata(this.config) } });
|
|
4915
|
+
}
|
|
4916
|
+
this.syncSelectionFromConfig();
|
|
4917
|
+
this.reapplyControlledSelectedIndex();
|
|
4918
|
+
},
|
|
4919
|
+
error: () => {
|
|
4920
|
+
if (this.destroyed) {
|
|
4921
|
+
return;
|
|
4922
|
+
}
|
|
4923
|
+
this.syncSelectionFromConfig();
|
|
4924
|
+
this.reapplyControlledSelectedIndex();
|
|
4925
|
+
},
|
|
3994
4926
|
});
|
|
3995
4927
|
}
|
|
3996
4928
|
syncSelectionFromConfig() {
|
|
@@ -4050,15 +4982,25 @@ class PraxisTabs {
|
|
|
4050
4982
|
}
|
|
4051
4983
|
}
|
|
4052
4984
|
persistConfig(config) {
|
|
4053
|
-
if (this.usesInputFirstConfig())
|
|
4985
|
+
if (this.isVolatilePersistence() || this.usesInputFirstConfig())
|
|
4054
4986
|
return;
|
|
4055
4987
|
const key = this.storageKey();
|
|
4056
4988
|
if (!key || !config)
|
|
4057
4989
|
return;
|
|
4058
|
-
this.storage.saveConfig(key, config).pipe(take(1)).subscribe({
|
|
4990
|
+
this.storage.saveConfig(key, config).pipe(take(1)).subscribe({
|
|
4991
|
+
error: (error) => this.logger.warn('[PraxisTabs] Failed to persist tabs configuration.', {
|
|
4992
|
+
context: { lib: 'praxis-tabs', component: 'PraxisTabs' },
|
|
4993
|
+
data: { key, error },
|
|
4994
|
+
}),
|
|
4995
|
+
});
|
|
4996
|
+
}
|
|
4997
|
+
isVolatilePersistence() {
|
|
4998
|
+
return (normalizeConfigPersistenceStrategy(this.configPersistenceStrategy, 'local-first') ===
|
|
4999
|
+
'volatile');
|
|
4059
5000
|
}
|
|
4060
5001
|
usesInputFirstConfig() {
|
|
4061
|
-
|
|
5002
|
+
const normalized = normalizeConfigPersistenceStrategy(this.configPersistenceStrategy, 'local-first');
|
|
5003
|
+
return normalized === 'volatile' || (normalized === 'input-first' && this.hostInputBaselineConfig != null);
|
|
4062
5004
|
}
|
|
4063
5005
|
componentKeyId(options = {}) {
|
|
4064
5006
|
const key = this.componentKeys.buildComponentId({
|
|
@@ -4100,6 +5042,7 @@ class PraxisTabs {
|
|
|
4100
5042
|
this.config = next;
|
|
4101
5043
|
this.syncSelectionFromConfig();
|
|
4102
5044
|
this.syncGeneratedContentForm();
|
|
5045
|
+
this.syncRuntimeStyleElement();
|
|
4103
5046
|
this.persistConfig(this.config);
|
|
4104
5047
|
this.configChange.emit({ inputPatch: { config: this.cloneTabsMetadata(this.config) } });
|
|
4105
5048
|
}
|
|
@@ -4230,6 +5173,67 @@ class PraxisTabs {
|
|
|
4230
5173
|
{ kind: 'link', id: linkId, index: linkIndex },
|
|
4231
5174
|
];
|
|
4232
5175
|
}
|
|
5176
|
+
effectiveVariant() {
|
|
5177
|
+
const variant = this.config?.appearance?.variant;
|
|
5178
|
+
if (variant === 'pill' || variant === 'segmented') {
|
|
5179
|
+
return variant;
|
|
5180
|
+
}
|
|
5181
|
+
return 'underline';
|
|
5182
|
+
}
|
|
5183
|
+
resolveTabLabelClass(tab) {
|
|
5184
|
+
return this.buildTabClassList(tab?.labelClass, tab?.tone);
|
|
5185
|
+
}
|
|
5186
|
+
resolveLinkClass(link) {
|
|
5187
|
+
return this.buildTabClassList(link?.labelClass, link?.tone);
|
|
5188
|
+
}
|
|
5189
|
+
buildTabClassList(labelClass, tone) {
|
|
5190
|
+
const classes = [];
|
|
5191
|
+
if (Array.isArray(labelClass)) {
|
|
5192
|
+
for (const item of labelClass) {
|
|
5193
|
+
if (typeof item === 'string' && item.trim()) {
|
|
5194
|
+
classes.push(...item.trim().split(/[\s,]+/).filter(Boolean));
|
|
5195
|
+
}
|
|
5196
|
+
}
|
|
5197
|
+
}
|
|
5198
|
+
else if (typeof labelClass === 'string' && labelClass.trim()) {
|
|
5199
|
+
classes.push(...labelClass.trim().split(/[\s,]+/).filter(Boolean));
|
|
5200
|
+
}
|
|
5201
|
+
if (tone && tone !== 'default') {
|
|
5202
|
+
classes.push(`praxis-tab-tone--${tone}`);
|
|
5203
|
+
}
|
|
5204
|
+
return Array.from(new Set(classes)).join(' ');
|
|
5205
|
+
}
|
|
5206
|
+
syncRuntimeStyleElement() {
|
|
5207
|
+
const cssParts = [this.safeCustomCss(), this.styleCss()].filter((part) => typeof part === 'string' && !!part.trim());
|
|
5208
|
+
const nextCss = cssParts.join('\n');
|
|
5209
|
+
if (nextCss === this.lastRuntimeCss) {
|
|
5210
|
+
if (!nextCss || this.runtimeStyleEl?.isConnected) {
|
|
5211
|
+
return;
|
|
5212
|
+
}
|
|
5213
|
+
}
|
|
5214
|
+
this.lastRuntimeCss = nextCss;
|
|
5215
|
+
const host = this.hostElement?.nativeElement;
|
|
5216
|
+
const doc = host?.ownerDocument;
|
|
5217
|
+
if (!host || !doc)
|
|
5218
|
+
return;
|
|
5219
|
+
if (!nextCss) {
|
|
5220
|
+
this.runtimeStyleEl?.remove();
|
|
5221
|
+
this.runtimeStyleEl = undefined;
|
|
5222
|
+
return;
|
|
5223
|
+
}
|
|
5224
|
+
if (!this.runtimeStyleEl) {
|
|
5225
|
+
const styleEl = doc.createElement('style');
|
|
5226
|
+
styleEl.setAttribute('data-praxis-tabs-runtime-style', this.styleScopeId());
|
|
5227
|
+
host.prepend(styleEl);
|
|
5228
|
+
this.runtimeStyleEl = styleEl;
|
|
5229
|
+
}
|
|
5230
|
+
else {
|
|
5231
|
+
this.runtimeStyleEl.setAttribute('data-praxis-tabs-runtime-style', this.styleScopeId());
|
|
5232
|
+
}
|
|
5233
|
+
if (this.runtimeStyleEl.textContent !== nextCss) {
|
|
5234
|
+
this.runtimeStyleEl.textContent = nextCss;
|
|
5235
|
+
}
|
|
5236
|
+
}
|
|
4233
5237
|
styleScopeId() {
|
|
4234
5238
|
const scopeSeed = [this.tabsId, this.componentInstanceId]
|
|
4235
5239
|
.filter((v) => typeof v === 'string' && !!v.trim())
|
|
@@ -4284,69 +5288,86 @@ class PraxisTabs {
|
|
|
4284
5288
|
if (!t)
|
|
4285
5289
|
return null;
|
|
4286
5290
|
const scope = `.praxis-tabs-root[data-tabs-id="${this.styleScopeId()}"]`;
|
|
5291
|
+
const groupHeader = `${scope} > .praxis-tabs-group > .mat-mdc-tab-header`;
|
|
5292
|
+
const navHeader = `${scope} > .praxis-tabs-nav-bar`;
|
|
5293
|
+
const headerContainers = `${groupHeader}, ${navHeader}`;
|
|
4287
5294
|
const rules = [];
|
|
5295
|
+
const headerVars = [];
|
|
4288
5296
|
const push = (selector, decls) => {
|
|
4289
|
-
|
|
5297
|
+
const s = selector.trim();
|
|
5298
|
+
rules.push(`${groupHeader} ${s}, ${navHeader} ${s}{${decls.join('')}}`);
|
|
5299
|
+
};
|
|
5300
|
+
const pushHeaderContainer = (decls) => {
|
|
5301
|
+
rules.push(`${headerContainers}{${decls.join('')}}`);
|
|
5302
|
+
};
|
|
5303
|
+
const pushVariantHeader = (variantClass, decls) => {
|
|
5304
|
+
rules.push(`${scope}.${variantClass} > .praxis-tabs-group > .mat-mdc-tab-header, ${scope}.${variantClass} > .praxis-tabs-nav-bar{${decls.join('')}}`);
|
|
5305
|
+
};
|
|
5306
|
+
const pushVariantTab = (variantClass, selector, decls) => {
|
|
5307
|
+
const s = selector.trim();
|
|
5308
|
+
rules.push(`${scope}.${variantClass} > .praxis-tabs-group > .mat-mdc-tab-header ${s}, ${scope}.${variantClass} > .praxis-tabs-nav-bar ${s}{${decls.join('')}}`);
|
|
4290
5309
|
};
|
|
4291
|
-
// Active indicator underline
|
|
5310
|
+
// Active indicator underline (group + nav)
|
|
4292
5311
|
const activeIndicatorColor = this.sanitizeCssValue(t['active-indicator-color']);
|
|
4293
5312
|
if (activeIndicatorColor) {
|
|
4294
|
-
push('
|
|
5313
|
+
push('.mdc-tab .mdc-tab-indicator__content--underline', [`background-color:${activeIndicatorColor}!important;`]);
|
|
4295
5314
|
}
|
|
4296
5315
|
// Active label
|
|
4297
5316
|
const activeLabelColor = this.sanitizeCssValue(t['active-label-text-color']);
|
|
4298
5317
|
if (activeLabelColor) {
|
|
4299
|
-
push(
|
|
5318
|
+
headerVars.push(`--p-tabs-active-label-color:${activeLabelColor};`);
|
|
5319
|
+
push('.mdc-tab--active .mdc-tab__text-label', [
|
|
4300
5320
|
`color:${activeLabelColor}!important;`,
|
|
4301
5321
|
]);
|
|
4302
5322
|
}
|
|
4303
5323
|
const activeHoverLabelColor = this.sanitizeCssValue(t['active-hover-label-text-color']);
|
|
4304
5324
|
if (activeHoverLabelColor) {
|
|
4305
|
-
push('
|
|
5325
|
+
push('.mdc-tab--active:hover .mdc-tab__text-label', [
|
|
4306
5326
|
`color:${activeHoverLabelColor}!important;`,
|
|
4307
5327
|
]);
|
|
4308
5328
|
}
|
|
4309
5329
|
const activeFocusLabelColor = this.sanitizeCssValue(t['active-focus-label-text-color']);
|
|
4310
5330
|
if (activeFocusLabelColor) {
|
|
4311
|
-
push('
|
|
5331
|
+
push('.mdc-tab--active:focus .mdc-tab__text-label', [
|
|
4312
5332
|
`color:${activeFocusLabelColor}!important;`,
|
|
4313
5333
|
]);
|
|
4314
5334
|
}
|
|
4315
5335
|
const activeFocusIndicatorColor = this.sanitizeCssValue(t['active-focus-indicator-color']);
|
|
4316
5336
|
if (activeFocusIndicatorColor) {
|
|
4317
|
-
push('
|
|
5337
|
+
push('.mdc-tab--active:focus .mdc-tab-indicator__content--underline', [
|
|
4318
5338
|
`background-color:${activeFocusIndicatorColor}!important;`,
|
|
4319
5339
|
]);
|
|
4320
5340
|
}
|
|
4321
5341
|
const activeHoverIndicatorColor = this.sanitizeCssValue(t['active-hover-indicator-color']);
|
|
4322
5342
|
if (activeHoverIndicatorColor) {
|
|
4323
|
-
push('
|
|
5343
|
+
push('.mdc-tab--active:hover .mdc-tab-indicator__content--underline', [
|
|
4324
5344
|
`background-color:${activeHoverIndicatorColor}!important;`,
|
|
4325
5345
|
]);
|
|
4326
5346
|
}
|
|
4327
5347
|
// Inactive label
|
|
4328
5348
|
const inactiveLabelColor = this.sanitizeCssValue(t['inactive-label-text-color']);
|
|
4329
5349
|
if (inactiveLabelColor) {
|
|
4330
|
-
push(
|
|
5350
|
+
headerVars.push(`--p-tabs-inactive-label-color:${inactiveLabelColor};`);
|
|
5351
|
+
push('.mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label', [
|
|
4331
5352
|
`color:${inactiveLabelColor}!important;`,
|
|
4332
5353
|
]);
|
|
4333
5354
|
}
|
|
4334
5355
|
const inactiveHoverLabelColor = this.sanitizeCssValue(t['inactive-hover-label-text-color']);
|
|
4335
5356
|
if (inactiveHoverLabelColor) {
|
|
4336
|
-
push('
|
|
5357
|
+
push('.mdc-tab:not(.mdc-tab--active):hover .mdc-tab__text-label', [
|
|
4337
5358
|
`color:${inactiveHoverLabelColor}!important;`,
|
|
4338
5359
|
]);
|
|
4339
5360
|
}
|
|
4340
5361
|
const inactiveFocusLabelColor = this.sanitizeCssValue(t['inactive-focus-label-text-color']);
|
|
4341
5362
|
if (inactiveFocusLabelColor) {
|
|
4342
|
-
push('
|
|
5363
|
+
push('.mdc-tab:not(.mdc-tab--active):focus .mdc-tab__text-label', [
|
|
4343
5364
|
`color:${inactiveFocusLabelColor}!important;`,
|
|
4344
5365
|
]);
|
|
4345
5366
|
}
|
|
4346
5367
|
// Pagination chevrons
|
|
4347
5368
|
const paginationIconColor = this.sanitizeCssValue(t['pagination-icon-color']);
|
|
4348
5369
|
if (paginationIconColor) {
|
|
4349
|
-
push('
|
|
5370
|
+
push('.mat-mdc-tab-header-pagination-chevron', [
|
|
4350
5371
|
`color:${paginationIconColor}!important;`,
|
|
4351
5372
|
]);
|
|
4352
5373
|
}
|
|
@@ -4357,13 +5378,49 @@ class PraxisTabs {
|
|
|
4357
5378
|
containerDecls.push(`border-bottom-color:${dividerColor}!important;`);
|
|
4358
5379
|
}
|
|
4359
5380
|
if (containerDecls.length) {
|
|
4360
|
-
|
|
4361
|
-
push(' .mat-mdc-tab-nav-bar', containerDecls);
|
|
5381
|
+
pushHeaderContainer(containerDecls);
|
|
4362
5382
|
}
|
|
4363
5383
|
const backgroundColor = this.sanitizeCssValue(t['background-color']);
|
|
4364
5384
|
if (backgroundColor) {
|
|
4365
|
-
|
|
4366
|
-
|
|
5385
|
+
pushHeaderContainer([`background:${backgroundColor}!important;`]);
|
|
5386
|
+
}
|
|
5387
|
+
// Pill & Segmented surface tokens
|
|
5388
|
+
const trackBackgroundColor = this.sanitizeCssValue(t['track-background-color']);
|
|
5389
|
+
if (trackBackgroundColor) {
|
|
5390
|
+
headerVars.push(`--p-tabs-track-bg:${trackBackgroundColor};`);
|
|
5391
|
+
pushVariantHeader('variant-pill', [`background:${trackBackgroundColor}!important;`]);
|
|
5392
|
+
pushVariantHeader('variant-segmented', [`background:${trackBackgroundColor}!important;`]);
|
|
5393
|
+
}
|
|
5394
|
+
const trackBorderColor = this.sanitizeCssValue(t['track-border-color']);
|
|
5395
|
+
if (trackBorderColor) {
|
|
5396
|
+
headerVars.push(`--p-tabs-track-border:${trackBorderColor};`);
|
|
5397
|
+
pushVariantHeader('variant-pill', [`border-color:${trackBorderColor}!important;`]);
|
|
5398
|
+
pushVariantHeader('variant-segmented', [`border-color:${trackBorderColor}!important;`]);
|
|
5399
|
+
}
|
|
5400
|
+
const activeTabBackgroundColor = this.sanitizeCssValue(t['active-tab-background-color']);
|
|
5401
|
+
if (activeTabBackgroundColor) {
|
|
5402
|
+
headerVars.push(`--p-tabs-active-bg:${activeTabBackgroundColor};`);
|
|
5403
|
+
pushVariantTab('variant-pill', '.mdc-tab.mdc-tab--active', [`background-color:${activeTabBackgroundColor}!important;`]);
|
|
5404
|
+
pushVariantTab('variant-segmented', '.mdc-tab.mdc-tab--active', [`background-color:${activeTabBackgroundColor}!important;`]);
|
|
5405
|
+
}
|
|
5406
|
+
const activeTabOutlineColor = this.sanitizeCssValue(t['active-tab-outline-color']);
|
|
5407
|
+
if (activeTabOutlineColor) {
|
|
5408
|
+
headerVars.push(`--p-tabs-active-outline:${activeTabOutlineColor};`);
|
|
5409
|
+
pushVariantTab('variant-pill', '.mdc-tab.praxis-tab-tone--outlined', [`border-color:${activeTabOutlineColor}!important;`]);
|
|
5410
|
+
pushVariantTab('variant-pill', '.mdc-tab:focus-visible', [`border-color:${activeTabOutlineColor}!important;`]);
|
|
5411
|
+
pushVariantTab('variant-segmented', '.mdc-tab.praxis-tab-tone--outlined', [`border-color:${activeTabOutlineColor}!important;`]);
|
|
5412
|
+
pushVariantTab('variant-segmented', '.mdc-tab:focus-visible', [`border-color:${activeTabOutlineColor}!important;`]);
|
|
5413
|
+
}
|
|
5414
|
+
const pillRadius = this.sanitizeCssValue(t['pill-radius']);
|
|
5415
|
+
if (pillRadius) {
|
|
5416
|
+
headerVars.push(`--p-tabs-pill-radius:${pillRadius};`);
|
|
5417
|
+
pushVariantHeader('variant-pill', [`border-radius:${pillRadius}!important;`]);
|
|
5418
|
+
pushVariantTab('variant-pill', '.mdc-tab', [`border-radius:${pillRadius}!important;`]);
|
|
5419
|
+
pushVariantHeader('variant-segmented', [`border-radius:${pillRadius}!important;`]);
|
|
5420
|
+
pushVariantTab('variant-segmented', '.mdc-tab', [`border-radius:${pillRadius}!important;`]);
|
|
5421
|
+
}
|
|
5422
|
+
if (headerVars.length) {
|
|
5423
|
+
rules.unshift(`${headerContainers}{${headerVars.join('')}}`);
|
|
4367
5424
|
}
|
|
4368
5425
|
return rules.length ? rules.join('\n') : null;
|
|
4369
5426
|
}
|
|
@@ -4386,25 +5443,22 @@ class PraxisTabs {
|
|
|
4386
5443
|
return JSON.parse(JSON.stringify(config));
|
|
4387
5444
|
}
|
|
4388
5445
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisTabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4389
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PraxisTabs, isStandalone: true, selector: "praxis-tabs", inputs: { config: "config", tabsId: "tabsId", componentInstanceId: "componentInstanceId", configPersistenceStrategy: "configPersistenceStrategy", selectedIndex: "selectedIndex", enableCustomization: "enableCustomization", form: "form", context: "context" }, outputs: { animationDone: "animationDone", focusChange: "focusChange", selectedIndexChange: "selectedIndexChange", selectedTabChange: "selectedTabChange", indexFocused: "indexFocused", selectFocusedIndex: "selectFocusedIndex", configChange: "configChange", widgetEvent: "widgetEvent" }, providers: [providePraxisI18nConfig(PRAXIS_TABS_I18N_CONFIG)], viewQueries: [{ propertyName: "groupComponent", first: true, predicate: MatTabGroup, descendants: true }, { propertyName: "navComponent", first: true, predicate: MatTabNav, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
5446
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PraxisTabs, isStandalone: true, selector: "praxis-tabs", inputs: { config: "config", tabsId: "tabsId", componentInstanceId: "componentInstanceId", configPersistenceStrategy: "configPersistenceStrategy", selectedIndex: "selectedIndex", enableCustomization: "enableCustomization", showOverflowIndex: "showOverflowIndex", form: "form", context: "context" }, outputs: { animationDone: "animationDone", focusChange: "focusChange", selectedIndexChange: "selectedIndexChange", selectedTabChange: "selectedTabChange", indexFocused: "indexFocused", selectFocusedIndex: "selectFocusedIndex", configChange: "configChange", widgetEvent: "widgetEvent" }, host: { listeners: { "document:click": "onDocumentClickCloseOverflowIndex($event)", "document:keydown.escape": "onDocumentEscapeCloseOverflowIndex($event)" }, properties: { "attr.data-pdx-viewport-mode": "viewportMode()", "class.praxis-tabs-host--fill": "isFillViewport()" } }, providers: [providePraxisI18nConfig(PRAXIS_TABS_I18N_CONFIG)], viewQueries: [{ propertyName: "groupComponent", first: true, predicate: MatTabGroup, descendants: true }, { propertyName: "navComponent", first: true, predicate: MatTabNav, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
4390
5447
|
<div
|
|
4391
5448
|
class="praxis-tabs-root"
|
|
5449
|
+
[class.variant-underline]="effectiveVariant() === 'underline'"
|
|
5450
|
+
[class.variant-pill]="effectiveVariant() === 'pill'"
|
|
5451
|
+
[class.variant-segmented]="effectiveVariant() === 'segmented'"
|
|
4392
5452
|
[class.density-compact]="config?.appearance?.density === 'compact'"
|
|
4393
5453
|
[class.density-comfortable]="config?.appearance?.density === 'comfortable'"
|
|
4394
5454
|
[class.density-spacious]="config?.appearance?.density === 'spacious'"
|
|
4395
5455
|
[class.high-contrast]="config?.accessibility?.highContrast"
|
|
4396
5456
|
[class.reduce-motion]="config?.accessibility?.reduceMotion"
|
|
5457
|
+
[class.praxis-tabs-root--has-overflow-index]="!isEmptyGlobal() && shouldShowOverflowIndex()"
|
|
5458
|
+
[class.praxis-tabs-root--header-below]="!isNavMode() && config?.group?.headerPosition === 'below'"
|
|
4397
5459
|
[ngClass]="config?.appearance?.themeClass || ''"
|
|
4398
5460
|
[attr.data-tabs-id]="styleScopeId()"
|
|
4399
5461
|
>
|
|
4400
|
-
<!-- Inline custom CSS, if provided -->
|
|
4401
|
-
@if (safeCustomCss(); as css) {
|
|
4402
|
-
<style [innerHTML]="css"></style>
|
|
4403
|
-
}
|
|
4404
|
-
<!-- Runtime style derived from tokens -->
|
|
4405
|
-
@if (styleCss(); as s) {
|
|
4406
|
-
<style [innerHTML]="s"></style>
|
|
4407
|
-
}
|
|
4408
5462
|
|
|
4409
5463
|
@if (enableCustomization) {
|
|
4410
5464
|
<div class="tabs-ai-assistant">
|
|
@@ -4438,6 +5492,7 @@ class PraxisTabs {
|
|
|
4438
5492
|
[busy]="aiAssistantViewState.state === 'processing' || aiAssistantViewState.state === 'applying'"
|
|
4439
5493
|
[canApply]="aiAssistantViewState.canApply"
|
|
4440
5494
|
[layout]="aiAssistantLayout"
|
|
5495
|
+
[showMinimize]="true"
|
|
4441
5496
|
testIdPrefix="praxis-tabs-ai-assistant"
|
|
4442
5497
|
panelTestId="praxis-tabs-ai-assistant-panel"
|
|
4443
5498
|
submitTestId="praxis-tabs-ai-assistant-submit"
|
|
@@ -4451,6 +5506,7 @@ class PraxisTabs {
|
|
|
4451
5506
|
(editMessage)="onAiAssistantEditMessage($event)"
|
|
4452
5507
|
(resendMessage)="onAiAssistantResendMessage($event)"
|
|
4453
5508
|
(layoutChange)="onAiAssistantLayoutChange($event)"
|
|
5509
|
+
(minimize)="minimizeAiAssistant()"
|
|
4454
5510
|
(close)="closeAiAssistant()"
|
|
4455
5511
|
></praxis-ai-assistant-shell>
|
|
4456
5512
|
}
|
|
@@ -4472,6 +5528,8 @@ class PraxisTabs {
|
|
|
4472
5528
|
@if (isNavMode()) {
|
|
4473
5529
|
<nav
|
|
4474
5530
|
mat-tab-nav-bar
|
|
5531
|
+
[class.praxis-tabs-nav-bar]="true"
|
|
5532
|
+
[class.praxis-tabs-stretch]="!!config?.nav?.stretchTabs"
|
|
4475
5533
|
[tabPanel]="tabPanel"
|
|
4476
5534
|
cdkDropList
|
|
4477
5535
|
cdkDropListOrientation="horizontal"
|
|
@@ -4499,6 +5557,7 @@ class PraxisTabs {
|
|
|
4499
5557
|
[disabled]="entry.link.disabled"
|
|
4500
5558
|
[disableRipple]="config?.nav?.disableRipple || entry.link.disableRipple"
|
|
4501
5559
|
[fitInkBarToContent]="entry.link.fitInkBarToContent || false"
|
|
5560
|
+
[ngClass]="resolveLinkClass(entry.link)"
|
|
4502
5561
|
[id]="entry.link.id || ''"
|
|
4503
5562
|
(click)="onNavClick(entry.index)"
|
|
4504
5563
|
>
|
|
@@ -4559,6 +5618,10 @@ class PraxisTabs {
|
|
|
4559
5618
|
} @else {
|
|
4560
5619
|
<mat-tab-group
|
|
4561
5620
|
[class.praxis-tabs-group--header-only]="!shouldRenderGroupBody()"
|
|
5621
|
+
[class.praxis-tabs-stretch]="!!config?.group?.stretchTabs"
|
|
5622
|
+
[class.align-start]="(config?.group?.alignTabs || 'start') === 'start'"
|
|
5623
|
+
[class.align-center]="config?.group?.alignTabs === 'center'"
|
|
5624
|
+
[class.align-end]="config?.group?.alignTabs === 'end'"
|
|
4562
5625
|
[dynamicHeight]="config?.group?.dynamicHeight"
|
|
4563
5626
|
[disableRipple]="config?.group?.disableRipple"
|
|
4564
5627
|
[disablePagination]="config?.group?.disablePagination"
|
|
@@ -4583,7 +5646,7 @@ class PraxisTabs {
|
|
|
4583
5646
|
@for (entry of visibleTabEntries(); track trackVisibleTab(i, entry); let i = $index) {
|
|
4584
5647
|
<mat-tab
|
|
4585
5648
|
[disabled]="entry.tab.disabled"
|
|
4586
|
-
[labelClass]="entry.tab
|
|
5649
|
+
[labelClass]="resolveTabLabelClass(entry.tab)"
|
|
4587
5650
|
[bodyClass]="entry.tab.bodyClass ?? ''"
|
|
4588
5651
|
[id]="entry.tab.id || ''"
|
|
4589
5652
|
[attr.aria-label]="entry.tab.ariaLabel || null"
|
|
@@ -4666,6 +5729,73 @@ class PraxisTabs {
|
|
|
4666
5729
|
</mat-tab-group>
|
|
4667
5730
|
}
|
|
4668
5731
|
<!-- Tab Group variant -->
|
|
5732
|
+
@if (shouldShowOverflowIndex()) {
|
|
5733
|
+
<div
|
|
5734
|
+
class="praxis-tabs-overflow-index"
|
|
5735
|
+
data-testid="praxis-tabs-overflow-index"
|
|
5736
|
+
(click)="$event.stopPropagation()"
|
|
5737
|
+
>
|
|
5738
|
+
<button
|
|
5739
|
+
type="button"
|
|
5740
|
+
class="praxis-tabs-overflow-index__trigger"
|
|
5741
|
+
data-testid="praxis-tabs-overflow-index-trigger"
|
|
5742
|
+
aria-haspopup="listbox"
|
|
5743
|
+
[attr.aria-expanded]="overflowIndexOpen()"
|
|
5744
|
+
[attr.aria-label]="t('chrome.allTabsAria', 'Abrir índice de todas as {{count}} abas', { count: overflowIndexItems().length })"
|
|
5745
|
+
(click)="toggleOverflowIndex($event)"
|
|
5746
|
+
>
|
|
5747
|
+
<mat-icon aria-hidden="true" [praxisIcon]="'view_list'"></mat-icon>
|
|
5748
|
+
<span>{{ t('chrome.allTabs', 'Todas ({{count}})', { count: overflowIndexItems().length }) }}</span>
|
|
5749
|
+
</button>
|
|
5750
|
+
@if (overflowIndexOpen()) {
|
|
5751
|
+
<div
|
|
5752
|
+
class="praxis-tabs-overflow-index__panel"
|
|
5753
|
+
data-testid="praxis-tabs-overflow-index-panel"
|
|
5754
|
+
>
|
|
5755
|
+
<div class="praxis-tabs-overflow-index__search-wrap">
|
|
5756
|
+
<mat-icon aria-hidden="true" [praxisIcon]="'search'"></mat-icon>
|
|
5757
|
+
<input
|
|
5758
|
+
type="search"
|
|
5759
|
+
class="praxis-tabs-overflow-index__search"
|
|
5760
|
+
data-testid="praxis-tabs-overflow-index-search"
|
|
5761
|
+
[value]="overflowIndexFilter()"
|
|
5762
|
+
[placeholder]="t('chrome.filterTabsPlaceholder', 'Filtrar abas...')"
|
|
5763
|
+
[attr.aria-label]="t('chrome.filterTabsPlaceholder', 'Filtrar abas...')"
|
|
5764
|
+
(input)="onOverflowIndexFilterInput($event)"
|
|
5765
|
+
(keydown)="onOverflowIndexSearchKeydown($event)"
|
|
5766
|
+
/>
|
|
5767
|
+
</div>
|
|
5768
|
+
<div
|
|
5769
|
+
class="praxis-tabs-overflow-index__list"
|
|
5770
|
+
role="listbox"
|
|
5771
|
+
[attr.aria-label]="t('chrome.allTabs', 'Todas ({{count}})', { count: overflowIndexItems().length })"
|
|
5772
|
+
>
|
|
5773
|
+
@for (item of filteredOverflowIndexItems(); track item.key) {
|
|
5774
|
+
<button
|
|
5775
|
+
type="button"
|
|
5776
|
+
role="option"
|
|
5777
|
+
class="praxis-tabs-overflow-index__item"
|
|
5778
|
+
[class.is-active]="item.active"
|
|
5779
|
+
[disabled]="item.disabled"
|
|
5780
|
+
[attr.aria-selected]="item.active"
|
|
5781
|
+
[attr.data-testid]="'praxis-tabs-overflow-index-item-' + item.visibleIndex"
|
|
5782
|
+
(click)="selectTabFromOverflowIndex(item.visibleIndex)"
|
|
5783
|
+
>
|
|
5784
|
+
@if (item.icon) {
|
|
5785
|
+
<mat-icon aria-hidden="true" [praxisIcon]="item.icon"></mat-icon>
|
|
5786
|
+
}
|
|
5787
|
+
<span class="praxis-tabs-overflow-index__item-label">{{ item.label }}</span>
|
|
5788
|
+
</button>
|
|
5789
|
+
} @empty {
|
|
5790
|
+
<div class="praxis-tabs-overflow-index__empty">
|
|
5791
|
+
{{ t('chrome.noMatchingTabs', 'Nenhuma aba encontrada') }}
|
|
5792
|
+
</div>
|
|
5793
|
+
}
|
|
5794
|
+
</div>
|
|
5795
|
+
</div>
|
|
5796
|
+
}
|
|
5797
|
+
</div>
|
|
5798
|
+
}
|
|
4669
5799
|
}
|
|
4670
5800
|
|
|
4671
5801
|
|
|
@@ -4680,7 +5810,7 @@ class PraxisTabs {
|
|
|
4680
5810
|
<mat-icon aria-hidden="true" fontIcon="edit"></mat-icon>
|
|
4681
5811
|
</button>
|
|
4682
5812
|
}
|
|
4683
|
-
@if (enableCustomization && tabsId) {
|
|
5813
|
+
@if (enableCustomization && tabsId && !isVolatilePersistence() && !usesInputFirstConfig()) {
|
|
4684
5814
|
<button
|
|
4685
5815
|
mat-mini-fab
|
|
4686
5816
|
class="edit-fab edit-fab-secondary"
|
|
@@ -4692,7 +5822,25 @@ class PraxisTabs {
|
|
|
4692
5822
|
</button>
|
|
4693
5823
|
}
|
|
4694
5824
|
</div>
|
|
4695
|
-
`, isInline: true, styles: [".praxis-tabs-root{position:relative;display:block}.praxis-tabs-group.align-start .mat-mdc-tab-header{justify-content:flex-start}.praxis-tabs-group.align-center .mat-mdc-tab-header{justify-content:center}.praxis-tabs-group.align-end .mat-mdc-tab-header{justify-content:flex-end}.praxis-tabs-group--header-only .mat-mdc-tab-body-wrapper{display:none}:host ::ng-deep .praxis-tabs-group.mat-mdc-tab-group-dynamic-height>.mat-mdc-tab-body-wrapper,:host ::ng-deep .praxis-tabs-group.mat-mdc-tab-group-dynamic-height>.mat-mdc-tab-body-wrapper>.mat-mdc-tab-body,:host ::ng-deep .praxis-tabs-group.mat-mdc-tab-group-dynamic-height>.mat-mdc-tab-body-wrapper>.mat-mdc-tab-body>.mat-mdc-tab-body-content{overflow:clip}.praxis-tabs-nav-panel--header-only{display:none}.density-compact .mat-mdc-tab-body-content{padding:8px}.density-comfortable .mat-mdc-tab-body-content{padding:16px}.density-spacious .mat-mdc-tab-body-content{padding:24px}.praxis-tabs-widget-stack{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--p-tabs-widget-stack-gap, 16px);min-width:0}.praxis-tabs-widget-surface{display:block;min-width:0}.density-compact .praxis-tabs-widget-stack{--p-tabs-widget-stack-gap: 12px}.density-comfortable .praxis-tabs-widget-stack{--p-tabs-widget-stack-gap: 16px}.density-spacious .praxis-tabs-widget-stack{--p-tabs-widget-stack-gap: 24px}.tabs-ai-assistant{position:absolute;right:12px;bottom:72px;z-index:3}.tabs-ai-assistant-trigger{box-shadow:var(--md-sys-elevation-level2)}.edit-fab{position:absolute;right:12px;bottom:12px;z-index:2}.edit-fab-secondary{right:56px}.tab-empty{padding:16px;color:var(--md-sys-color-on-surface-variant);font-style:italic}.high-contrast{filter:contrast(1.2)}.reduce-motion{--mat-animation-duration: 0ms}.drag-handle{display:inline-flex;align-items:center;vertical-align:middle;margin-right:4px;cursor:grab}.tab-label-icon{font-size:18px;width:18px;height:18px;margin-right:6px;vertical-align:middle}:host-context(.pdx-gridster-item) .praxis-tabs-root{display:flex;flex-direction:column;height:100%;min-height:0}:host-context(.pdx-gridster-item) .praxis-tabs-group,:host-context(.pdx-gridster-item) .mat-mdc-tab-group{flex:1 1 auto;min-height:0}:host-context(.pdx-gridster-item) .mat-mdc-tab-body-wrapper,:host-context(.pdx-gridster-item) .mat-mdc-tab-body-content{height:100%;min-height:0}:host-context(.pdx-gridster-item) .mat-mdc-tab-body-content{overflow:auto}:host-context(.pdx-gridster-item) .praxis-tabnav-content{flex:1 1 auto;min-height:0;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2_1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2_1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i3.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: i3.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["fitInkBarToContent", "mat-stretch-tabs", "animationDuration", "backgroundColor", "disableRipple", "color", "tabPanel"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: i3.MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: ["id"], exportAs: ["matTabNavPanel"] }, { kind: "component", type: i3.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["active", "disabled", "disableRipple", "tabIndex", "id"], exportAs: ["matTabLink"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i9.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i9.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i9.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: EmptyStateCardComponent, selector: "praxis-empty-state-card", inputs: ["icon", "title", "description", "primaryAction", "secondaryActions", "inline", "tone", "variant", "alignment", "density", "iconContainer"] }, { kind: "directive", type: DynamicFieldLoaderDirective, selector: "[dynamicFieldLoader]", inputs: ["fields", "formGroup", "enableExternalControlBinding", "itemTemplate", "debugTrace", "debugTraceLabel", "readonlyMode", "disabledMode", "presentationMode", "visible", "canvasMode"], outputs: ["componentsCreated", "fieldCreated", "fieldDestroyed", "renderError", "canvasMouseEnter", "canvasMouseLeave", "canvasClick", "canvasFocus"] }, { kind: "directive", type: DynamicWidgetLoaderDirective, selector: "[dynamicWidgetLoader]", inputs: ["dynamicWidgetLoader", "ownerWidgetKey", "context", "strictValidation", "autoWireOutputs"], outputs: ["widgetEvent", "widgetDiagnostic"], exportAs: ["dynamicWidgetLoader"] }, { kind: "component", type: PraxisAiAssistantShellComponent, selector: "praxis-ai-assistant-shell", inputs: ["labels", "mode", "state", "contextItems", "attachments", "messages", "quickReplies", "recommendedIntents", "prompt", "statusText", "errorText", "testIdPrefix", "panelTestId", "submitTestId", "applyTestId", "primaryAction", "secondaryActions", "governanceActions", "busy", "canSubmit", "canApply", "submitOnEnter", "showAttachAction", "enablePastedAttachments", "enableFileAttachments", "attachmentAccept", "attachmentMultiple", "voiceInputMode", "voiceLanguage", "draggable", "resizable", "minWidth", "minHeight", "margin", "layout"], outputs: ["promptChange", "submitPrompt", "apply", "retryTurn", "cancelTurn", "shellAction", "close", "attach", "attachmentsPasted", "attachmentsSelected", "removeAttachment", "messageAction", "editMessage", "resendMessage", "quickReply", "recommendedIntent", "layoutChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5825
|
+
`, isInline: true, styles: [".praxis-tabs-root{position:relative;display:block}.praxis-tabs-group.align-start .mat-mdc-tab-header{justify-content:flex-start}.praxis-tabs-group.align-center .mat-mdc-tab-header{justify-content:center}.praxis-tabs-group.align-end .mat-mdc-tab-header{justify-content:flex-end}.praxis-tabs-group--header-only .mat-mdc-tab-body-wrapper{display:none}:host ::ng-deep .praxis-tabs-group.mat-mdc-tab-group-dynamic-height>.mat-mdc-tab-body-wrapper,:host ::ng-deep .praxis-tabs-group.mat-mdc-tab-group-dynamic-height>.mat-mdc-tab-body-wrapper>.mat-mdc-tab-body,:host ::ng-deep .praxis-tabs-group.mat-mdc-tab-group-dynamic-height>.mat-mdc-tab-body-wrapper>.mat-mdc-tab-body>.mat-mdc-tab-body-content{overflow:clip}.praxis-tabs-nav-panel--header-only{display:none}.density-compact .mat-mdc-tab-body-content{padding:8px}.density-comfortable .mat-mdc-tab-body-content{padding:16px}.density-spacious .mat-mdc-tab-body-content{padding:24px}.praxis-tabs-widget-stack{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--p-tabs-widget-stack-gap, 16px);min-width:0}.praxis-tabs-widget-surface{display:block;min-width:0}.density-compact .praxis-tabs-widget-stack{--p-tabs-widget-stack-gap: 12px}.density-comfortable .praxis-tabs-widget-stack{--p-tabs-widget-stack-gap: 16px}.density-spacious .praxis-tabs-widget-stack{--p-tabs-widget-stack-gap: 24px}.tabs-ai-assistant{position:absolute;right:12px;bottom:72px;z-index:3}.tabs-ai-assistant-trigger{box-shadow:var(--md-sys-elevation-level2)}.edit-fab{position:absolute;right:12px;bottom:12px;z-index:2}.edit-fab-secondary{right:56px}.tab-empty{padding:16px;color:var(--md-sys-color-on-surface-variant);font-style:italic}.high-contrast{filter:contrast(1.2)}.reduce-motion{--mat-animation-duration: 0ms}.drag-handle{display:inline-flex;align-items:center;vertical-align:middle;margin-right:4px;cursor:grab}.tab-label-icon{font-size:18px;width:18px;height:18px;margin-right:6px;vertical-align:middle}:host ::ng-deep .praxis-tabs-root .mdc-tab{-webkit-user-select:none;user-select:none}:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-label-container,:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-link-container{overflow-y:hidden}:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-header-pagination-controls-enabled>.mat-mdc-tab-label-container,:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-header-pagination-controls-enabled>.mat-mdc-tab-link-container{-webkit-mask-image:linear-gradient(to right,transparent,#000 12px,#000 calc(100% - 12px),transparent);mask-image:linear-gradient(to right,transparent,#000 12px,#000 calc(100% - 12px),transparent)}:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-header-pagination-disabled{opacity:.35;pointer-events:none}:host ::ng-deep .praxis-tabs-root.praxis-tabs-root--has-overflow-index.variant-underline>.praxis-tabs-group>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.praxis-tabs-root--has-overflow-index.variant-underline>.praxis-tabs-nav-bar{padding-inline-end:var(--p-tabs-overflow-index-reserve, 128px);box-sizing:border-box}:host ::ng-deep .praxis-tabs-root.praxis-tabs-root--has-overflow-index:is(.variant-pill,.variant-segmented)>.praxis-tabs-group>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.praxis-tabs-root--has-overflow-index:is(.variant-pill,.variant-segmented)>.praxis-tabs-nav-bar{max-width:calc(100% - var(--p-tabs-overflow-index-reserve, 128px))}:host ::ng-deep .praxis-tabs-root.praxis-tabs-root--has-overflow-index:is(.variant-pill,.variant-segmented)>.praxis-tabs-group.praxis-tabs-stretch>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.praxis-tabs-root--has-overflow-index:is(.variant-pill,.variant-segmented)>.praxis-tabs-nav-bar.praxis-tabs-stretch{width:calc(100% - var(--p-tabs-overflow-index-reserve, 128px))}.praxis-tabs-overflow-index{position:absolute;top:var(--p-tabs-index-top, 4px);inset-inline-end:0;z-index:4;display:inline-flex;align-items:center}.praxis-tabs-root--header-below .praxis-tabs-overflow-index{top:auto;bottom:var(--p-tabs-index-top, 4px)}.praxis-tabs-overflow-index__trigger{display:inline-flex;align-items:center;gap:5px;height:32px;padding:0 11px;border-radius:999px;border:1px solid var(--p-tabs-track-border, var(--md-sys-color-outline-variant, rgba(128, 128, 128, .32)));background:var(--p-tabs-track-bg, var(--md-sys-color-surface-container-low, rgba(0, 0, 0, .04)));color:var(--p-tabs-inactive-label-color, var(--md-sys-color-on-surface, inherit));font:inherit;font-size:.76rem;font-weight:600;white-space:nowrap;-webkit-user-select:none;user-select:none;cursor:pointer;transition:background-color .14s ease,border-color .14s ease}.praxis-tabs-overflow-index__trigger mat-icon{font-size:16px;width:16px;height:16px}.praxis-tabs-overflow-index__trigger:hover,.praxis-tabs-overflow-index__trigger[aria-expanded=true]{border-color:var(--p-tabs-active-outline, var(--md-sys-color-primary, #1976d2));background:var(--p-tabs-active-bg, color-mix(in srgb, var(--md-sys-color-primary, #1976d2) 12%, transparent))}.praxis-tabs-overflow-index__trigger:focus-visible{outline:2px solid var(--p-tabs-active-outline, var(--md-sys-color-primary, #1976d2));outline-offset:2px}.praxis-tabs-overflow-index__panel{position:absolute;top:calc(100% + 6px);inset-inline-end:0;width:min(300px,calc(100vw - 32px));max-height:min(320px,50dvh);display:flex;flex-direction:column;gap:8px;padding:10px;border-radius:12px;border:1px solid var(--md-sys-color-outline-variant, rgba(148, 163, 184, .35));background:var(--md-sys-color-surface-container-high, var(--card));color:var(--md-sys-color-on-surface, var(--foreground, inherit));box-shadow:0 12px 28px #0f172a2e;z-index:20}.praxis-tabs-root--header-below .praxis-tabs-overflow-index__panel{top:auto;bottom:calc(100% + 6px)}.praxis-tabs-overflow-index__search-wrap{display:flex;align-items:center;gap:6px;padding:0 10px;height:32px;border-radius:8px;border:1px solid var(--md-sys-color-outline-variant, rgba(148, 163, 184, .35));background:var(--md-sys-color-surface-container-low, rgba(0, 0, 0, .04))}.praxis-tabs-overflow-index__search-wrap mat-icon{font-size:16px;width:16px;height:16px;color:var(--md-sys-color-on-surface-variant, inherit)}.praxis-tabs-overflow-index__search{flex:1 1 auto;min-width:0;border:0;outline:none;background:transparent;color:inherit;font:inherit;font-size:.8rem}.praxis-tabs-overflow-index__list{display:flex;flex-direction:column;gap:2px;overflow-y:auto;overscroll-behavior-y:contain;min-height:0}.praxis-tabs-overflow-index__item{display:flex;align-items:center;gap:8px;width:100%;padding:7px 10px;border-radius:8px;border:1px solid transparent;background:transparent;color:inherit;font:inherit;font-size:.8rem;text-align:start;cursor:pointer}.praxis-tabs-overflow-index__item mat-icon{font-size:16px;width:16px;height:16px;flex:0 0 auto}.praxis-tabs-overflow-index__item:hover:not(:disabled){background:var(--p-tabs-hover-bg, rgba(128, 128, 128, .08))}.praxis-tabs-overflow-index__item.is-active{background:var(--p-tabs-active-bg, color-mix(in srgb, var(--md-sys-color-primary, #1976d2) 12%, transparent));border-color:var(--p-tabs-active-outline, var(--md-sys-color-primary, #1976d2));font-weight:600}.praxis-tabs-overflow-index__item:disabled{opacity:.45;cursor:not-allowed}.praxis-tabs-overflow-index__item:focus-visible{outline:2px solid var(--p-tabs-active-outline, var(--md-sys-color-primary, #1976d2));outline-offset:-2px}.praxis-tabs-overflow-index__item-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.praxis-tabs-overflow-index__empty{padding:12px 8px;text-align:center;font-size:.78rem;color:var(--md-sys-color-on-surface-variant, inherit)}@media(forced-colors:active){:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-header-pagination-controls-enabled>.mat-mdc-tab-label-container,:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-header-pagination-controls-enabled>.mat-mdc-tab-link-container{-webkit-mask-image:none;mask-image:none}.praxis-tabs-overflow-index__panel,.praxis-tabs-overflow-index__trigger,.praxis-tabs-overflow-index__item{background:Canvas;color:CanvasText;border:1px solid ButtonBorder;box-shadow:none}.praxis-tabs-overflow-index__item.is-active{border-color:Highlight;outline:2px solid Highlight;outline-offset:-2px}}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar{--mat-tab-header-divider-height: 0px;--mat-tab-header-divider-color: transparent;display:flex;align-items:center;width:fit-content;max-width:100%;padding:var(--p-tabs-track-padding, 4px);border-radius:var(--p-tabs-pill-radius, 9999px);border:1px solid var(--p-tabs-track-border, var(--md-sys-color-outline-variant, rgba(128, 128, 128, .28)));background:var(--p-tabs-track-bg, var(--md-sys-color-surface-container-low, rgba(0, 0, 0, .04)));box-sizing:border-box;border-bottom-width:1px}:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar{border-radius:var(--p-tabs-pill-radius, 12px);padding:var(--p-tabs-track-padding, 3px)}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group.align-center>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group.align-center>.mat-mdc-tab-header{align-self:center}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group.align-end>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group.align-end>.mat-mdc-tab-header{align-self:flex-end}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group.praxis-tabs-stretch>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar.praxis-tabs-stretch,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group.praxis-tabs-stretch>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar.praxis-tabs-stretch{width:100%;align-self:stretch}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header>.mat-mdc-tab-header-pagination,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar>.mat-mdc-tab-header-pagination,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header>.mat-mdc-tab-header-pagination,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar>.mat-mdc-tab-header-pagination{border-radius:inherit;box-shadow:none}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header>.mat-mdc-tab-label-container,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar>.mat-mdc-tab-link-container,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header>.mat-mdc-tab-label-container,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar>.mat-mdc-tab-link-container{border-top:0;border-top-width:0;border-bottom:0;border-bottom-width:0}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mat-mdc-tab-labels,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mat-mdc-tab-links,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mat-mdc-tab-labels,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mat-mdc-tab-links{gap:var(--p-tabs-pill-gap, 4px);align-items:center}:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mat-mdc-tab-labels,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mat-mdc-tab-links{gap:var(--p-tabs-pill-gap, 2px)}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab{min-height:40px;height:40px;padding:0 18px;margin:0;border-radius:var(--p-tabs-pill-radius, 9999px);border:1.5px solid transparent;overflow:hidden;flex-grow:0;box-sizing:border-box;transition:background-color .15s ease,color .15s ease,border-color .15s ease,box-shadow .15s ease}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group.praxis-tabs-stretch>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar.praxis-tabs-stretch .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group.praxis-tabs-stretch>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar.praxis-tabs-stretch .mdc-tab{flex-grow:1}:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab{border-radius:calc(var(--p-tabs-pill-radius, 12px) - 4px)}:host ::ng-deep .praxis-tabs-root.variant-pill.density-compact>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-pill.density-compact>.praxis-tabs-nav-bar .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented.density-compact>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented.density-compact>.praxis-tabs-nav-bar .mdc-tab{min-height:34px;height:34px;padding:0 14px}:host ::ng-deep .praxis-tabs-root.variant-pill.density-spacious>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-pill.density-spacious>.praxis-tabs-nav-bar .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented.density-spacious>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented.density-spacious>.praxis-tabs-nav-bar .mdc-tab{min-height:46px;height:46px;padding:0 22px}:host ::ng-deep .praxis-tabs-root.variant-pill.reduce-motion>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-pill.reduce-motion>.praxis-tabs-nav-bar .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented.reduce-motion>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented.reduce-motion>.praxis-tabs-nav-bar .mdc-tab{transition:none}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab-indicator,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab-indicator,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab-indicator__content--underline,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab-indicator__content--underline,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab-indicator,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab-indicator,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab-indicator__content--underline,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab-indicator__content--underline{display:none;opacity:0;height:0}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab .mdc-tab__text-label{color:var(--p-tabs-inactive-label-color, var(--md-sys-color-on-surface-variant, inherit));font-weight:500;transition:color .15s ease}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab:not(.mdc-tab--active):hover,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab:not(.mdc-tab--active):hover,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab:not(.mdc-tab--active):hover,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab:not(.mdc-tab--active):hover{background-color:var(--p-tabs-hover-bg, rgba(128, 128, 128, .08))}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.mdc-tab--active,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab.mdc-tab--active,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.mdc-tab--active,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab.mdc-tab--active{background-color:var(--p-tabs-active-bg, var(--md-sys-color-secondary-container, rgba(25, 118, 210, .14)))}:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.mdc-tab--active,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab.mdc-tab--active{box-shadow:0 1px 2px #00000024}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.mdc-tab--active .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab.mdc-tab--active .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.mdc-tab--active .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--p-tabs-active-label-color, var(--md-sys-color-on-secondary-container, inherit));font-weight:600}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab:focus-visible,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab:focus-visible,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab:focus-visible,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab:focus-visible,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--outlined,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--outlined,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--outlined,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--outlined{border-color:var(--p-tabs-active-outline, var(--md-sys-color-primary, #8ab4f8))}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab:focus-visible .mat-mdc-tab-focus-indicator,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab:focus-visible .mat-mdc-tab-focus-indicator,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab:focus-visible .mat-mdc-tab-focus-indicator,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab:focus-visible .mat-mdc-tab-focus-indicator{display:none}:host ::ng-deep .praxis-tabs-root>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--primary:not(.mdc-tab--active) .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--primary:not(.mdc-tab--active) .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--primary:not(.mdc-tab--active) .tab-label-icon,:host ::ng-deep .praxis-tabs-root>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--primary:not(.mdc-tab--active) .tab-label-icon{color:var(--p-tabs-primary-label-color, var(--md-sys-color-primary, #8ab4f8))!important}:host ::ng-deep .praxis-tabs-root>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--accent:not(.mdc-tab--active) .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--accent:not(.mdc-tab--active) .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--accent:not(.mdc-tab--active) .tab-label-icon,:host ::ng-deep .praxis-tabs-root>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--accent:not(.mdc-tab--active) .tab-label-icon{color:var(--p-tabs-accent-label-color, var(--md-sys-color-primary, #8ab4f8))!important}:host ::ng-deep .praxis-tabs-root.variant-underline>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--outlined,:host ::ng-deep .praxis-tabs-root.variant-underline>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--outlined{border:1px solid var(--p-tabs-active-outline, var(--md-sys-color-primary, #8ab4f8));border-radius:9999px}:host-context(.pdx-gridster-item) .praxis-tabs-root{display:flex;flex-direction:column;height:100%;min-height:0}:host-context(.pdx-gridster-item) .praxis-tabs-group,:host-context(.pdx-gridster-item) .mat-mdc-tab-group{flex:1 1 auto;min-height:0}:host-context(.pdx-gridster-item) .mat-mdc-tab-body-wrapper,:host-context(.pdx-gridster-item) .mat-mdc-tab-body-content{height:100%;min-height:0}:host-context(.pdx-gridster-item) .mat-mdc-tab-body-content{overflow:auto}:host-context(.pdx-gridster-item) .praxis-tabnav-content{flex:1 1 auto;min-height:0;overflow:auto}:host(.praxis-tabs-host--fill){display:flex;flex-direction:column;flex:1 1 0%;height:100%;min-height:0;width:100%}:host(.praxis-tabs-host--fill) .praxis-tabs-root{display:flex;flex-direction:column;flex:1 1 0%;height:100%;min-height:0}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-group{display:flex;flex-direction:column;flex:1 1 0%;min-height:0}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-group>.mat-mdc-tab-header{flex:0 0 auto}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-group>.mat-mdc-tab-body-wrapper{display:flex;flex-direction:column;flex:1 1 0%;min-height:0}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-group>.mat-mdc-tab-body-wrapper>.mat-mdc-tab-body.mat-mdc-tab-body-active{display:flex;flex-direction:column;flex:1 1 0%;min-height:0;height:100%}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-group>.mat-mdc-tab-body-wrapper>.mat-mdc-tab-body.mat-mdc-tab-body-active>.mat-mdc-tab-body-content{display:flex;flex-direction:column;flex:1 1 0%;min-height:0;height:100%;overflow:auto}:host(.praxis-tabs-host--fill) .praxis-tabs-nav-bar{flex:0 0 auto}:host(.praxis-tabs-host--fill) ::ng-deep mat-tab-nav-panel:not(.praxis-tabs-nav-panel--header-only){display:flex;flex-direction:column;flex:1 1 0%;min-height:0;height:100%}:host(.praxis-tabs-host--fill) .praxis-tabnav-content{display:flex;flex-direction:column;flex:1 1 0%;min-height:0;height:100%;overflow:auto}:host(.praxis-tabs-host--fill) .praxis-tabs-widget-stack{display:flex;flex-direction:column;flex:1 1 0%;min-height:0;height:100%}:host(.praxis-tabs-host--fill) .praxis-tabs-widget-surface:only-child{display:flex;flex-direction:column;flex:1 1 0%;min-height:0;height:100%}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-widget-surface:only-child>*{flex:1 0 auto;min-height:100%;width:100%}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-widget-surface:only-child>[data-pdx-viewport-mode=fill]{flex:1 1 0%;min-height:0;height:100%;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2_1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2_1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i3.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: i3.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["fitInkBarToContent", "mat-stretch-tabs", "animationDuration", "backgroundColor", "disableRipple", "color", "tabPanel"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: i3.MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: ["id"], exportAs: ["matTabNavPanel"] }, { kind: "component", type: i3.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["active", "disabled", "disableRipple", "tabIndex", "id"], exportAs: ["matTabLink"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i11.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6$1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6$1.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i10.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i10.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i10.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: EmptyStateCardComponent, selector: "praxis-empty-state-card", inputs: ["icon", "title", "description", "primaryAction", "secondaryActions", "inline", "tone", "variant", "alignment", "density", "iconContainer"] }, { kind: "directive", type: DynamicFieldLoaderDirective, selector: "[dynamicFieldLoader]", inputs: ["fields", "formGroup", "enableExternalControlBinding", "itemTemplate", "debugTrace", "debugTraceLabel", "readonlyMode", "disabledMode", "presentationMode", "visible", "canvasMode"], outputs: ["componentsCreated", "fieldCreated", "fieldDestroyed", "renderError", "canvasMouseEnter", "canvasMouseLeave", "canvasClick", "canvasFocus"] }, { kind: "directive", type: DynamicWidgetLoaderDirective, selector: "[dynamicWidgetLoader]", inputs: ["dynamicWidgetLoader", "ownerWidgetKey", "context", "strictValidation", "autoWireOutputs"], outputs: ["widgetEvent", "widgetDiagnostic"], exportAs: ["dynamicWidgetLoader"] }, { kind: "component", type: PraxisAiAssistantShellComponent, selector: "praxis-ai-assistant-shell", inputs: ["labels", "mode", "state", "contextItems", "attachments", "threadAttachments", "messages", "quickReplies", "recommendedIntents", "prompt", "statusText", "errorText", "testIdPrefix", "panelTestId", "submitTestId", "applyTestId", "primaryAction", "secondaryActions", "governanceActions", "busy", "canSubmit", "canApply", "preview", "submitOnEnter", "showAttachAction", "enableFileAttachments", "enablePastedAttachments", "allowAttachmentOnlySubmit", "enableAuthenticatedPreview", "attachmentAccept", "attachmentMultiple", "voiceInputMode", "voiceLanguage", "draggable", "resizable", "showMinimize", "minWidth", "minHeight", "margin", "layout"], outputs: ["promptChange", "submitPrompt", "apply", "retryTurn", "cancelTurn", "shellAction", "minimize", "close", "attach", "attachmentsPasted", "attachmentsSelected", "attachmentsDropped", "removeAttachment", "retryAttachment", "previewAttachment", "detachThreadAttachment", "previewMessageAttachment", "messageAction", "editMessage", "resendMessage", "quickReply", "recommendedIntent", "blockAction", "layoutChange"] }], viewProviders: [
|
|
5826
|
+
{
|
|
5827
|
+
provide: PRAXIS_WIDGET_SHELL_VIEWPORT,
|
|
5828
|
+
useFactory: () => {
|
|
5829
|
+
const host = inject(PraxisTabs);
|
|
5830
|
+
return {
|
|
5831
|
+
windowState: computed(() => host.isFillViewport()
|
|
5832
|
+
? (host.parentShellViewport?.windowState() ?? 'inline')
|
|
5833
|
+
: 'inline'),
|
|
5834
|
+
bodyLayout: computed(() => host.isFillViewport()
|
|
5835
|
+
? (host.parentShellViewport?.bodyLayout() ?? 'content')
|
|
5836
|
+
: 'content'),
|
|
5837
|
+
fillAvailable: host.isFillViewport,
|
|
5838
|
+
isOverlayWindow: computed(() => host.isFillViewport() &&
|
|
5839
|
+
Boolean(host.parentShellViewport?.isOverlayWindow())),
|
|
5840
|
+
};
|
|
5841
|
+
},
|
|
5842
|
+
},
|
|
5843
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4696
5844
|
}
|
|
4697
5845
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisTabs, decorators: [{
|
|
4698
5846
|
type: Component,
|
|
@@ -4713,22 +5861,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
4713
5861
|
], template: `
|
|
4714
5862
|
<div
|
|
4715
5863
|
class="praxis-tabs-root"
|
|
5864
|
+
[class.variant-underline]="effectiveVariant() === 'underline'"
|
|
5865
|
+
[class.variant-pill]="effectiveVariant() === 'pill'"
|
|
5866
|
+
[class.variant-segmented]="effectiveVariant() === 'segmented'"
|
|
4716
5867
|
[class.density-compact]="config?.appearance?.density === 'compact'"
|
|
4717
5868
|
[class.density-comfortable]="config?.appearance?.density === 'comfortable'"
|
|
4718
5869
|
[class.density-spacious]="config?.appearance?.density === 'spacious'"
|
|
4719
5870
|
[class.high-contrast]="config?.accessibility?.highContrast"
|
|
4720
5871
|
[class.reduce-motion]="config?.accessibility?.reduceMotion"
|
|
5872
|
+
[class.praxis-tabs-root--has-overflow-index]="!isEmptyGlobal() && shouldShowOverflowIndex()"
|
|
5873
|
+
[class.praxis-tabs-root--header-below]="!isNavMode() && config?.group?.headerPosition === 'below'"
|
|
4721
5874
|
[ngClass]="config?.appearance?.themeClass || ''"
|
|
4722
5875
|
[attr.data-tabs-id]="styleScopeId()"
|
|
4723
5876
|
>
|
|
4724
|
-
<!-- Inline custom CSS, if provided -->
|
|
4725
|
-
@if (safeCustomCss(); as css) {
|
|
4726
|
-
<style [innerHTML]="css"></style>
|
|
4727
|
-
}
|
|
4728
|
-
<!-- Runtime style derived from tokens -->
|
|
4729
|
-
@if (styleCss(); as s) {
|
|
4730
|
-
<style [innerHTML]="s"></style>
|
|
4731
|
-
}
|
|
4732
5877
|
|
|
4733
5878
|
@if (enableCustomization) {
|
|
4734
5879
|
<div class="tabs-ai-assistant">
|
|
@@ -4762,6 +5907,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
4762
5907
|
[busy]="aiAssistantViewState.state === 'processing' || aiAssistantViewState.state === 'applying'"
|
|
4763
5908
|
[canApply]="aiAssistantViewState.canApply"
|
|
4764
5909
|
[layout]="aiAssistantLayout"
|
|
5910
|
+
[showMinimize]="true"
|
|
4765
5911
|
testIdPrefix="praxis-tabs-ai-assistant"
|
|
4766
5912
|
panelTestId="praxis-tabs-ai-assistant-panel"
|
|
4767
5913
|
submitTestId="praxis-tabs-ai-assistant-submit"
|
|
@@ -4775,6 +5921,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
4775
5921
|
(editMessage)="onAiAssistantEditMessage($event)"
|
|
4776
5922
|
(resendMessage)="onAiAssistantResendMessage($event)"
|
|
4777
5923
|
(layoutChange)="onAiAssistantLayoutChange($event)"
|
|
5924
|
+
(minimize)="minimizeAiAssistant()"
|
|
4778
5925
|
(close)="closeAiAssistant()"
|
|
4779
5926
|
></praxis-ai-assistant-shell>
|
|
4780
5927
|
}
|
|
@@ -4796,6 +5943,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
4796
5943
|
@if (isNavMode()) {
|
|
4797
5944
|
<nav
|
|
4798
5945
|
mat-tab-nav-bar
|
|
5946
|
+
[class.praxis-tabs-nav-bar]="true"
|
|
5947
|
+
[class.praxis-tabs-stretch]="!!config?.nav?.stretchTabs"
|
|
4799
5948
|
[tabPanel]="tabPanel"
|
|
4800
5949
|
cdkDropList
|
|
4801
5950
|
cdkDropListOrientation="horizontal"
|
|
@@ -4823,6 +5972,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
4823
5972
|
[disabled]="entry.link.disabled"
|
|
4824
5973
|
[disableRipple]="config?.nav?.disableRipple || entry.link.disableRipple"
|
|
4825
5974
|
[fitInkBarToContent]="entry.link.fitInkBarToContent || false"
|
|
5975
|
+
[ngClass]="resolveLinkClass(entry.link)"
|
|
4826
5976
|
[id]="entry.link.id || ''"
|
|
4827
5977
|
(click)="onNavClick(entry.index)"
|
|
4828
5978
|
>
|
|
@@ -4883,6 +6033,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
4883
6033
|
} @else {
|
|
4884
6034
|
<mat-tab-group
|
|
4885
6035
|
[class.praxis-tabs-group--header-only]="!shouldRenderGroupBody()"
|
|
6036
|
+
[class.praxis-tabs-stretch]="!!config?.group?.stretchTabs"
|
|
6037
|
+
[class.align-start]="(config?.group?.alignTabs || 'start') === 'start'"
|
|
6038
|
+
[class.align-center]="config?.group?.alignTabs === 'center'"
|
|
6039
|
+
[class.align-end]="config?.group?.alignTabs === 'end'"
|
|
4886
6040
|
[dynamicHeight]="config?.group?.dynamicHeight"
|
|
4887
6041
|
[disableRipple]="config?.group?.disableRipple"
|
|
4888
6042
|
[disablePagination]="config?.group?.disablePagination"
|
|
@@ -4907,7 +6061,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
4907
6061
|
@for (entry of visibleTabEntries(); track trackVisibleTab(i, entry); let i = $index) {
|
|
4908
6062
|
<mat-tab
|
|
4909
6063
|
[disabled]="entry.tab.disabled"
|
|
4910
|
-
[labelClass]="entry.tab
|
|
6064
|
+
[labelClass]="resolveTabLabelClass(entry.tab)"
|
|
4911
6065
|
[bodyClass]="entry.tab.bodyClass ?? ''"
|
|
4912
6066
|
[id]="entry.tab.id || ''"
|
|
4913
6067
|
[attr.aria-label]="entry.tab.ariaLabel || null"
|
|
@@ -4990,6 +6144,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
4990
6144
|
</mat-tab-group>
|
|
4991
6145
|
}
|
|
4992
6146
|
<!-- Tab Group variant -->
|
|
6147
|
+
@if (shouldShowOverflowIndex()) {
|
|
6148
|
+
<div
|
|
6149
|
+
class="praxis-tabs-overflow-index"
|
|
6150
|
+
data-testid="praxis-tabs-overflow-index"
|
|
6151
|
+
(click)="$event.stopPropagation()"
|
|
6152
|
+
>
|
|
6153
|
+
<button
|
|
6154
|
+
type="button"
|
|
6155
|
+
class="praxis-tabs-overflow-index__trigger"
|
|
6156
|
+
data-testid="praxis-tabs-overflow-index-trigger"
|
|
6157
|
+
aria-haspopup="listbox"
|
|
6158
|
+
[attr.aria-expanded]="overflowIndexOpen()"
|
|
6159
|
+
[attr.aria-label]="t('chrome.allTabsAria', 'Abrir índice de todas as {{count}} abas', { count: overflowIndexItems().length })"
|
|
6160
|
+
(click)="toggleOverflowIndex($event)"
|
|
6161
|
+
>
|
|
6162
|
+
<mat-icon aria-hidden="true" [praxisIcon]="'view_list'"></mat-icon>
|
|
6163
|
+
<span>{{ t('chrome.allTabs', 'Todas ({{count}})', { count: overflowIndexItems().length }) }}</span>
|
|
6164
|
+
</button>
|
|
6165
|
+
@if (overflowIndexOpen()) {
|
|
6166
|
+
<div
|
|
6167
|
+
class="praxis-tabs-overflow-index__panel"
|
|
6168
|
+
data-testid="praxis-tabs-overflow-index-panel"
|
|
6169
|
+
>
|
|
6170
|
+
<div class="praxis-tabs-overflow-index__search-wrap">
|
|
6171
|
+
<mat-icon aria-hidden="true" [praxisIcon]="'search'"></mat-icon>
|
|
6172
|
+
<input
|
|
6173
|
+
type="search"
|
|
6174
|
+
class="praxis-tabs-overflow-index__search"
|
|
6175
|
+
data-testid="praxis-tabs-overflow-index-search"
|
|
6176
|
+
[value]="overflowIndexFilter()"
|
|
6177
|
+
[placeholder]="t('chrome.filterTabsPlaceholder', 'Filtrar abas...')"
|
|
6178
|
+
[attr.aria-label]="t('chrome.filterTabsPlaceholder', 'Filtrar abas...')"
|
|
6179
|
+
(input)="onOverflowIndexFilterInput($event)"
|
|
6180
|
+
(keydown)="onOverflowIndexSearchKeydown($event)"
|
|
6181
|
+
/>
|
|
6182
|
+
</div>
|
|
6183
|
+
<div
|
|
6184
|
+
class="praxis-tabs-overflow-index__list"
|
|
6185
|
+
role="listbox"
|
|
6186
|
+
[attr.aria-label]="t('chrome.allTabs', 'Todas ({{count}})', { count: overflowIndexItems().length })"
|
|
6187
|
+
>
|
|
6188
|
+
@for (item of filteredOverflowIndexItems(); track item.key) {
|
|
6189
|
+
<button
|
|
6190
|
+
type="button"
|
|
6191
|
+
role="option"
|
|
6192
|
+
class="praxis-tabs-overflow-index__item"
|
|
6193
|
+
[class.is-active]="item.active"
|
|
6194
|
+
[disabled]="item.disabled"
|
|
6195
|
+
[attr.aria-selected]="item.active"
|
|
6196
|
+
[attr.data-testid]="'praxis-tabs-overflow-index-item-' + item.visibleIndex"
|
|
6197
|
+
(click)="selectTabFromOverflowIndex(item.visibleIndex)"
|
|
6198
|
+
>
|
|
6199
|
+
@if (item.icon) {
|
|
6200
|
+
<mat-icon aria-hidden="true" [praxisIcon]="item.icon"></mat-icon>
|
|
6201
|
+
}
|
|
6202
|
+
<span class="praxis-tabs-overflow-index__item-label">{{ item.label }}</span>
|
|
6203
|
+
</button>
|
|
6204
|
+
} @empty {
|
|
6205
|
+
<div class="praxis-tabs-overflow-index__empty">
|
|
6206
|
+
{{ t('chrome.noMatchingTabs', 'Nenhuma aba encontrada') }}
|
|
6207
|
+
</div>
|
|
6208
|
+
}
|
|
6209
|
+
</div>
|
|
6210
|
+
</div>
|
|
6211
|
+
}
|
|
6212
|
+
</div>
|
|
6213
|
+
}
|
|
4993
6214
|
}
|
|
4994
6215
|
|
|
4995
6216
|
|
|
@@ -5004,7 +6225,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
5004
6225
|
<mat-icon aria-hidden="true" fontIcon="edit"></mat-icon>
|
|
5005
6226
|
</button>
|
|
5006
6227
|
}
|
|
5007
|
-
@if (enableCustomization && tabsId) {
|
|
6228
|
+
@if (enableCustomization && tabsId && !isVolatilePersistence() && !usesInputFirstConfig()) {
|
|
5008
6229
|
<button
|
|
5009
6230
|
mat-mini-fab
|
|
5010
6231
|
class="edit-fab edit-fab-secondary"
|
|
@@ -5016,7 +6237,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
5016
6237
|
</button>
|
|
5017
6238
|
}
|
|
5018
6239
|
</div>
|
|
5019
|
-
`,
|
|
6240
|
+
`, viewProviders: [
|
|
6241
|
+
{
|
|
6242
|
+
provide: PRAXIS_WIDGET_SHELL_VIEWPORT,
|
|
6243
|
+
useFactory: () => {
|
|
6244
|
+
const host = inject(PraxisTabs);
|
|
6245
|
+
return {
|
|
6246
|
+
windowState: computed(() => host.isFillViewport()
|
|
6247
|
+
? (host.parentShellViewport?.windowState() ?? 'inline')
|
|
6248
|
+
: 'inline'),
|
|
6249
|
+
bodyLayout: computed(() => host.isFillViewport()
|
|
6250
|
+
? (host.parentShellViewport?.bodyLayout() ?? 'content')
|
|
6251
|
+
: 'content'),
|
|
6252
|
+
fillAvailable: host.isFillViewport,
|
|
6253
|
+
isOverlayWindow: computed(() => host.isFillViewport() &&
|
|
6254
|
+
Boolean(host.parentShellViewport?.isOverlayWindow())),
|
|
6255
|
+
};
|
|
6256
|
+
},
|
|
6257
|
+
},
|
|
6258
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
6259
|
+
'[attr.data-pdx-viewport-mode]': 'viewportMode()',
|
|
6260
|
+
'[class.praxis-tabs-host--fill]': 'isFillViewport()',
|
|
6261
|
+
}, styles: [".praxis-tabs-root{position:relative;display:block}.praxis-tabs-group.align-start .mat-mdc-tab-header{justify-content:flex-start}.praxis-tabs-group.align-center .mat-mdc-tab-header{justify-content:center}.praxis-tabs-group.align-end .mat-mdc-tab-header{justify-content:flex-end}.praxis-tabs-group--header-only .mat-mdc-tab-body-wrapper{display:none}:host ::ng-deep .praxis-tabs-group.mat-mdc-tab-group-dynamic-height>.mat-mdc-tab-body-wrapper,:host ::ng-deep .praxis-tabs-group.mat-mdc-tab-group-dynamic-height>.mat-mdc-tab-body-wrapper>.mat-mdc-tab-body,:host ::ng-deep .praxis-tabs-group.mat-mdc-tab-group-dynamic-height>.mat-mdc-tab-body-wrapper>.mat-mdc-tab-body>.mat-mdc-tab-body-content{overflow:clip}.praxis-tabs-nav-panel--header-only{display:none}.density-compact .mat-mdc-tab-body-content{padding:8px}.density-comfortable .mat-mdc-tab-body-content{padding:16px}.density-spacious .mat-mdc-tab-body-content{padding:24px}.praxis-tabs-widget-stack{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--p-tabs-widget-stack-gap, 16px);min-width:0}.praxis-tabs-widget-surface{display:block;min-width:0}.density-compact .praxis-tabs-widget-stack{--p-tabs-widget-stack-gap: 12px}.density-comfortable .praxis-tabs-widget-stack{--p-tabs-widget-stack-gap: 16px}.density-spacious .praxis-tabs-widget-stack{--p-tabs-widget-stack-gap: 24px}.tabs-ai-assistant{position:absolute;right:12px;bottom:72px;z-index:3}.tabs-ai-assistant-trigger{box-shadow:var(--md-sys-elevation-level2)}.edit-fab{position:absolute;right:12px;bottom:12px;z-index:2}.edit-fab-secondary{right:56px}.tab-empty{padding:16px;color:var(--md-sys-color-on-surface-variant);font-style:italic}.high-contrast{filter:contrast(1.2)}.reduce-motion{--mat-animation-duration: 0ms}.drag-handle{display:inline-flex;align-items:center;vertical-align:middle;margin-right:4px;cursor:grab}.tab-label-icon{font-size:18px;width:18px;height:18px;margin-right:6px;vertical-align:middle}:host ::ng-deep .praxis-tabs-root .mdc-tab{-webkit-user-select:none;user-select:none}:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-label-container,:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-link-container{overflow-y:hidden}:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-header-pagination-controls-enabled>.mat-mdc-tab-label-container,:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-header-pagination-controls-enabled>.mat-mdc-tab-link-container{-webkit-mask-image:linear-gradient(to right,transparent,#000 12px,#000 calc(100% - 12px),transparent);mask-image:linear-gradient(to right,transparent,#000 12px,#000 calc(100% - 12px),transparent)}:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-header-pagination-disabled{opacity:.35;pointer-events:none}:host ::ng-deep .praxis-tabs-root.praxis-tabs-root--has-overflow-index.variant-underline>.praxis-tabs-group>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.praxis-tabs-root--has-overflow-index.variant-underline>.praxis-tabs-nav-bar{padding-inline-end:var(--p-tabs-overflow-index-reserve, 128px);box-sizing:border-box}:host ::ng-deep .praxis-tabs-root.praxis-tabs-root--has-overflow-index:is(.variant-pill,.variant-segmented)>.praxis-tabs-group>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.praxis-tabs-root--has-overflow-index:is(.variant-pill,.variant-segmented)>.praxis-tabs-nav-bar{max-width:calc(100% - var(--p-tabs-overflow-index-reserve, 128px))}:host ::ng-deep .praxis-tabs-root.praxis-tabs-root--has-overflow-index:is(.variant-pill,.variant-segmented)>.praxis-tabs-group.praxis-tabs-stretch>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.praxis-tabs-root--has-overflow-index:is(.variant-pill,.variant-segmented)>.praxis-tabs-nav-bar.praxis-tabs-stretch{width:calc(100% - var(--p-tabs-overflow-index-reserve, 128px))}.praxis-tabs-overflow-index{position:absolute;top:var(--p-tabs-index-top, 4px);inset-inline-end:0;z-index:4;display:inline-flex;align-items:center}.praxis-tabs-root--header-below .praxis-tabs-overflow-index{top:auto;bottom:var(--p-tabs-index-top, 4px)}.praxis-tabs-overflow-index__trigger{display:inline-flex;align-items:center;gap:5px;height:32px;padding:0 11px;border-radius:999px;border:1px solid var(--p-tabs-track-border, var(--md-sys-color-outline-variant, rgba(128, 128, 128, .32)));background:var(--p-tabs-track-bg, var(--md-sys-color-surface-container-low, rgba(0, 0, 0, .04)));color:var(--p-tabs-inactive-label-color, var(--md-sys-color-on-surface, inherit));font:inherit;font-size:.76rem;font-weight:600;white-space:nowrap;-webkit-user-select:none;user-select:none;cursor:pointer;transition:background-color .14s ease,border-color .14s ease}.praxis-tabs-overflow-index__trigger mat-icon{font-size:16px;width:16px;height:16px}.praxis-tabs-overflow-index__trigger:hover,.praxis-tabs-overflow-index__trigger[aria-expanded=true]{border-color:var(--p-tabs-active-outline, var(--md-sys-color-primary, #1976d2));background:var(--p-tabs-active-bg, color-mix(in srgb, var(--md-sys-color-primary, #1976d2) 12%, transparent))}.praxis-tabs-overflow-index__trigger:focus-visible{outline:2px solid var(--p-tabs-active-outline, var(--md-sys-color-primary, #1976d2));outline-offset:2px}.praxis-tabs-overflow-index__panel{position:absolute;top:calc(100% + 6px);inset-inline-end:0;width:min(300px,calc(100vw - 32px));max-height:min(320px,50dvh);display:flex;flex-direction:column;gap:8px;padding:10px;border-radius:12px;border:1px solid var(--md-sys-color-outline-variant, rgba(148, 163, 184, .35));background:var(--md-sys-color-surface-container-high, var(--card));color:var(--md-sys-color-on-surface, var(--foreground, inherit));box-shadow:0 12px 28px #0f172a2e;z-index:20}.praxis-tabs-root--header-below .praxis-tabs-overflow-index__panel{top:auto;bottom:calc(100% + 6px)}.praxis-tabs-overflow-index__search-wrap{display:flex;align-items:center;gap:6px;padding:0 10px;height:32px;border-radius:8px;border:1px solid var(--md-sys-color-outline-variant, rgba(148, 163, 184, .35));background:var(--md-sys-color-surface-container-low, rgba(0, 0, 0, .04))}.praxis-tabs-overflow-index__search-wrap mat-icon{font-size:16px;width:16px;height:16px;color:var(--md-sys-color-on-surface-variant, inherit)}.praxis-tabs-overflow-index__search{flex:1 1 auto;min-width:0;border:0;outline:none;background:transparent;color:inherit;font:inherit;font-size:.8rem}.praxis-tabs-overflow-index__list{display:flex;flex-direction:column;gap:2px;overflow-y:auto;overscroll-behavior-y:contain;min-height:0}.praxis-tabs-overflow-index__item{display:flex;align-items:center;gap:8px;width:100%;padding:7px 10px;border-radius:8px;border:1px solid transparent;background:transparent;color:inherit;font:inherit;font-size:.8rem;text-align:start;cursor:pointer}.praxis-tabs-overflow-index__item mat-icon{font-size:16px;width:16px;height:16px;flex:0 0 auto}.praxis-tabs-overflow-index__item:hover:not(:disabled){background:var(--p-tabs-hover-bg, rgba(128, 128, 128, .08))}.praxis-tabs-overflow-index__item.is-active{background:var(--p-tabs-active-bg, color-mix(in srgb, var(--md-sys-color-primary, #1976d2) 12%, transparent));border-color:var(--p-tabs-active-outline, var(--md-sys-color-primary, #1976d2));font-weight:600}.praxis-tabs-overflow-index__item:disabled{opacity:.45;cursor:not-allowed}.praxis-tabs-overflow-index__item:focus-visible{outline:2px solid var(--p-tabs-active-outline, var(--md-sys-color-primary, #1976d2));outline-offset:-2px}.praxis-tabs-overflow-index__item-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.praxis-tabs-overflow-index__empty{padding:12px 8px;text-align:center;font-size:.78rem;color:var(--md-sys-color-on-surface-variant, inherit)}@media(forced-colors:active){:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-header-pagination-controls-enabled>.mat-mdc-tab-label-container,:host ::ng-deep .praxis-tabs-root .mat-mdc-tab-header-pagination-controls-enabled>.mat-mdc-tab-link-container{-webkit-mask-image:none;mask-image:none}.praxis-tabs-overflow-index__panel,.praxis-tabs-overflow-index__trigger,.praxis-tabs-overflow-index__item{background:Canvas;color:CanvasText;border:1px solid ButtonBorder;box-shadow:none}.praxis-tabs-overflow-index__item.is-active{border-color:Highlight;outline:2px solid Highlight;outline-offset:-2px}}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar{--mat-tab-header-divider-height: 0px;--mat-tab-header-divider-color: transparent;display:flex;align-items:center;width:fit-content;max-width:100%;padding:var(--p-tabs-track-padding, 4px);border-radius:var(--p-tabs-pill-radius, 9999px);border:1px solid var(--p-tabs-track-border, var(--md-sys-color-outline-variant, rgba(128, 128, 128, .28)));background:var(--p-tabs-track-bg, var(--md-sys-color-surface-container-low, rgba(0, 0, 0, .04)));box-sizing:border-box;border-bottom-width:1px}:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar{border-radius:var(--p-tabs-pill-radius, 12px);padding:var(--p-tabs-track-padding, 3px)}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group.align-center>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group.align-center>.mat-mdc-tab-header{align-self:center}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group.align-end>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group.align-end>.mat-mdc-tab-header{align-self:flex-end}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group.praxis-tabs-stretch>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar.praxis-tabs-stretch,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group.praxis-tabs-stretch>.mat-mdc-tab-header,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar.praxis-tabs-stretch{width:100%;align-self:stretch}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header>.mat-mdc-tab-header-pagination,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar>.mat-mdc-tab-header-pagination,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header>.mat-mdc-tab-header-pagination,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar>.mat-mdc-tab-header-pagination{border-radius:inherit;box-shadow:none}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header>.mat-mdc-tab-label-container,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar>.mat-mdc-tab-link-container,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header>.mat-mdc-tab-label-container,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar>.mat-mdc-tab-link-container{border-top:0;border-top-width:0;border-bottom:0;border-bottom-width:0}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mat-mdc-tab-labels,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mat-mdc-tab-links,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mat-mdc-tab-labels,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mat-mdc-tab-links{gap:var(--p-tabs-pill-gap, 4px);align-items:center}:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mat-mdc-tab-labels,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mat-mdc-tab-links{gap:var(--p-tabs-pill-gap, 2px)}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab{min-height:40px;height:40px;padding:0 18px;margin:0;border-radius:var(--p-tabs-pill-radius, 9999px);border:1.5px solid transparent;overflow:hidden;flex-grow:0;box-sizing:border-box;transition:background-color .15s ease,color .15s ease,border-color .15s ease,box-shadow .15s ease}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group.praxis-tabs-stretch>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar.praxis-tabs-stretch .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group.praxis-tabs-stretch>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar.praxis-tabs-stretch .mdc-tab{flex-grow:1}:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab{border-radius:calc(var(--p-tabs-pill-radius, 12px) - 4px)}:host ::ng-deep .praxis-tabs-root.variant-pill.density-compact>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-pill.density-compact>.praxis-tabs-nav-bar .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented.density-compact>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented.density-compact>.praxis-tabs-nav-bar .mdc-tab{min-height:34px;height:34px;padding:0 14px}:host ::ng-deep .praxis-tabs-root.variant-pill.density-spacious>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-pill.density-spacious>.praxis-tabs-nav-bar .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented.density-spacious>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented.density-spacious>.praxis-tabs-nav-bar .mdc-tab{min-height:46px;height:46px;padding:0 22px}:host ::ng-deep .praxis-tabs-root.variant-pill.reduce-motion>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-pill.reduce-motion>.praxis-tabs-nav-bar .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented.reduce-motion>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab,:host ::ng-deep .praxis-tabs-root.variant-segmented.reduce-motion>.praxis-tabs-nav-bar .mdc-tab{transition:none}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab-indicator,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab-indicator,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab-indicator__content--underline,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab-indicator__content--underline,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab-indicator,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab-indicator,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab-indicator__content--underline,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab-indicator__content--underline{display:none;opacity:0;height:0}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab .mdc-tab__text-label{color:var(--p-tabs-inactive-label-color, var(--md-sys-color-on-surface-variant, inherit));font-weight:500;transition:color .15s ease}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab:not(.mdc-tab--active):hover,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab:not(.mdc-tab--active):hover,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab:not(.mdc-tab--active):hover,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab:not(.mdc-tab--active):hover{background-color:var(--p-tabs-hover-bg, rgba(128, 128, 128, .08))}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.mdc-tab--active,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab.mdc-tab--active,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.mdc-tab--active,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab.mdc-tab--active{background-color:var(--p-tabs-active-bg, var(--md-sys-color-secondary-container, rgba(25, 118, 210, .14)))}:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.mdc-tab--active,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab.mdc-tab--active{box-shadow:0 1px 2px #00000024}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.mdc-tab--active .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab.mdc-tab--active .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.mdc-tab--active .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--p-tabs-active-label-color, var(--md-sys-color-on-secondary-container, inherit));font-weight:600}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab:focus-visible,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab:focus-visible,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab:focus-visible,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab:focus-visible,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--outlined,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--outlined,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--outlined,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--outlined{border-color:var(--p-tabs-active-outline, var(--md-sys-color-primary, #8ab4f8))}:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab:focus-visible .mat-mdc-tab-focus-indicator,:host ::ng-deep .praxis-tabs-root.variant-pill>.praxis-tabs-nav-bar .mdc-tab:focus-visible .mat-mdc-tab-focus-indicator,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab:focus-visible .mat-mdc-tab-focus-indicator,:host ::ng-deep .praxis-tabs-root.variant-segmented>.praxis-tabs-nav-bar .mdc-tab:focus-visible .mat-mdc-tab-focus-indicator{display:none}:host ::ng-deep .praxis-tabs-root>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--primary:not(.mdc-tab--active) .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--primary:not(.mdc-tab--active) .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--primary:not(.mdc-tab--active) .tab-label-icon,:host ::ng-deep .praxis-tabs-root>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--primary:not(.mdc-tab--active) .tab-label-icon{color:var(--p-tabs-primary-label-color, var(--md-sys-color-primary, #8ab4f8))!important}:host ::ng-deep .praxis-tabs-root>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--accent:not(.mdc-tab--active) .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--accent:not(.mdc-tab--active) .mdc-tab__text-label,:host ::ng-deep .praxis-tabs-root>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--accent:not(.mdc-tab--active) .tab-label-icon,:host ::ng-deep .praxis-tabs-root>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--accent:not(.mdc-tab--active) .tab-label-icon{color:var(--p-tabs-accent-label-color, var(--md-sys-color-primary, #8ab4f8))!important}:host ::ng-deep .praxis-tabs-root.variant-underline>.praxis-tabs-group>.mat-mdc-tab-header .mdc-tab.praxis-tab-tone--outlined,:host ::ng-deep .praxis-tabs-root.variant-underline>.praxis-tabs-nav-bar .mdc-tab.praxis-tab-tone--outlined{border:1px solid var(--p-tabs-active-outline, var(--md-sys-color-primary, #8ab4f8));border-radius:9999px}:host-context(.pdx-gridster-item) .praxis-tabs-root{display:flex;flex-direction:column;height:100%;min-height:0}:host-context(.pdx-gridster-item) .praxis-tabs-group,:host-context(.pdx-gridster-item) .mat-mdc-tab-group{flex:1 1 auto;min-height:0}:host-context(.pdx-gridster-item) .mat-mdc-tab-body-wrapper,:host-context(.pdx-gridster-item) .mat-mdc-tab-body-content{height:100%;min-height:0}:host-context(.pdx-gridster-item) .mat-mdc-tab-body-content{overflow:auto}:host-context(.pdx-gridster-item) .praxis-tabnav-content{flex:1 1 auto;min-height:0;overflow:auto}:host(.praxis-tabs-host--fill){display:flex;flex-direction:column;flex:1 1 0%;height:100%;min-height:0;width:100%}:host(.praxis-tabs-host--fill) .praxis-tabs-root{display:flex;flex-direction:column;flex:1 1 0%;height:100%;min-height:0}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-group{display:flex;flex-direction:column;flex:1 1 0%;min-height:0}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-group>.mat-mdc-tab-header{flex:0 0 auto}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-group>.mat-mdc-tab-body-wrapper{display:flex;flex-direction:column;flex:1 1 0%;min-height:0}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-group>.mat-mdc-tab-body-wrapper>.mat-mdc-tab-body.mat-mdc-tab-body-active{display:flex;flex-direction:column;flex:1 1 0%;min-height:0;height:100%}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-group>.mat-mdc-tab-body-wrapper>.mat-mdc-tab-body.mat-mdc-tab-body-active>.mat-mdc-tab-body-content{display:flex;flex-direction:column;flex:1 1 0%;min-height:0;height:100%;overflow:auto}:host(.praxis-tabs-host--fill) .praxis-tabs-nav-bar{flex:0 0 auto}:host(.praxis-tabs-host--fill) ::ng-deep mat-tab-nav-panel:not(.praxis-tabs-nav-panel--header-only){display:flex;flex-direction:column;flex:1 1 0%;min-height:0;height:100%}:host(.praxis-tabs-host--fill) .praxis-tabnav-content{display:flex;flex-direction:column;flex:1 1 0%;min-height:0;height:100%;overflow:auto}:host(.praxis-tabs-host--fill) .praxis-tabs-widget-stack{display:flex;flex-direction:column;flex:1 1 0%;min-height:0;height:100%}:host(.praxis-tabs-host--fill) .praxis-tabs-widget-surface:only-child{display:flex;flex-direction:column;flex:1 1 0%;min-height:0;height:100%}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-widget-surface:only-child>*{flex:1 0 auto;min-height:100%;width:100%}:host(.praxis-tabs-host--fill) ::ng-deep .praxis-tabs-widget-surface:only-child>[data-pdx-viewport-mode=fill]{flex:1 1 0%;min-height:0;height:100%;width:100%}\n"] }]
|
|
5020
6262
|
}], propDecorators: { config: [{
|
|
5021
6263
|
type: Input
|
|
5022
6264
|
}], tabsId: [{
|
|
@@ -5030,6 +6272,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
5030
6272
|
type: Input
|
|
5031
6273
|
}], enableCustomization: [{
|
|
5032
6274
|
type: Input
|
|
6275
|
+
}], showOverflowIndex: [{
|
|
6276
|
+
type: Input
|
|
5033
6277
|
}], form: [{
|
|
5034
6278
|
type: Input
|
|
5035
6279
|
}], context: [{
|
|
@@ -5056,6 +6300,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
5056
6300
|
}], navComponent: [{
|
|
5057
6301
|
type: ViewChild,
|
|
5058
6302
|
args: [MatTabNav]
|
|
6303
|
+
}], onDocumentClickCloseOverflowIndex: [{
|
|
6304
|
+
type: HostListener,
|
|
6305
|
+
args: ['document:click', ['$event']]
|
|
6306
|
+
}], onDocumentEscapeCloseOverflowIndex: [{
|
|
6307
|
+
type: HostListener,
|
|
6308
|
+
args: ['document:keydown.escape', ['$event']]
|
|
5059
6309
|
}] } });
|
|
5060
6310
|
|
|
5061
6311
|
class PraxisTabsWidgetConfigEditor {
|
|
@@ -5248,7 +6498,7 @@ const PRAXIS_TABS_COMPONENT_METADATA = {
|
|
|
5248
6498
|
selector: 'praxis-tabs',
|
|
5249
6499
|
component: PraxisTabs,
|
|
5250
6500
|
friendlyName: 'Praxis Tabs',
|
|
5251
|
-
description: 'Abas dinâmicas baseadas em metadata, com MatTabGroup/TabNav e suporte a tokens M3 via appearance.',
|
|
6501
|
+
description: 'Abas dinâmicas baseadas em metadata, com MatTabGroup/TabNav, variantes visuais (underline, pill, segmented), tons por aba/link e suporte a tokens M3 via appearance.',
|
|
5252
6502
|
icon: 'tab',
|
|
5253
6503
|
authoringManifestRef: {
|
|
5254
6504
|
componentId: 'praxis-tabs',
|
|
@@ -5274,10 +6524,10 @@ const PRAXIS_TABS_COMPONENT_METADATA = {
|
|
|
5274
6524
|
},
|
|
5275
6525
|
{
|
|
5276
6526
|
name: 'configPersistenceStrategy',
|
|
5277
|
-
type: '"storage-first" | "input-first"',
|
|
6527
|
+
type: '"storage-first" | "local-first" | "input-first" | "volatile"',
|
|
5278
6528
|
default: 'storage-first',
|
|
5279
6529
|
label: 'Estratégia de persistência',
|
|
5280
|
-
description: 'Define
|
|
6530
|
+
description: 'Define a precedência entre storage e entrada (`local-first`/`storage-first` para persistência local, `input-first` para composição dona do config, `volatile` para previews efêmeros sem leitura ou escrita).',
|
|
5281
6531
|
},
|
|
5282
6532
|
{
|
|
5283
6533
|
name: 'selectedIndex',
|
|
@@ -5397,6 +6647,10 @@ const PRAXIS_TABS_COMPONENT_METADATA = {
|
|
|
5397
6647
|
scope: 'any',
|
|
5398
6648
|
},
|
|
5399
6649
|
],
|
|
6650
|
+
schemaVersion: '1.0.0',
|
|
6651
|
+
transientInputs: ['context', 'selectedIndex'],
|
|
6652
|
+
lockedInputs: ['tabsId'],
|
|
6653
|
+
visualOverrideKeys: ['config', 'enableCustomization', 'configPersistenceStrategy'],
|
|
5400
6654
|
tags: ['widget', 'tabs', 'configurable', 'stable'],
|
|
5401
6655
|
lib: '@praxisui/tabs',
|
|
5402
6656
|
ports: PRAXIS_TABS_PORTS,
|
|
@@ -5412,6 +6666,40 @@ function providePraxisTabsMetadata() {
|
|
|
5412
6666
|
};
|
|
5413
6667
|
}
|
|
5414
6668
|
|
|
6669
|
+
const tabsArrayRootResolutionSpec = {
|
|
6670
|
+
allowIndex: false,
|
|
6671
|
+
strategy: 'root-path',
|
|
6672
|
+
paths: ['tabs[]', '$'],
|
|
6673
|
+
};
|
|
6674
|
+
const tabsLayoutRootResolutionSpec = {
|
|
6675
|
+
allowIndex: false,
|
|
6676
|
+
strategy: 'root-path',
|
|
6677
|
+
paths: ['$'],
|
|
6678
|
+
};
|
|
6679
|
+
const tabsRenderBodyRootResolutionSpec = {
|
|
6680
|
+
allowIndex: false,
|
|
6681
|
+
strategy: 'root-path',
|
|
6682
|
+
paths: ['group', 'nav', '$'],
|
|
6683
|
+
};
|
|
6684
|
+
const tabByIdOrLabelResolutionSpec = {
|
|
6685
|
+
allowIndex: false,
|
|
6686
|
+
strategy: 'array-match',
|
|
6687
|
+
paths: ['tabs[]'],
|
|
6688
|
+
matchFields: ['id', 'label', 'textLabel', 'title'],
|
|
6689
|
+
inputMatchFields: ['tabId', 'id', 'textLabel', 'label'],
|
|
6690
|
+
};
|
|
6691
|
+
const tabOrLinkByIdResolutionSpec = {
|
|
6692
|
+
allowIndex: false,
|
|
6693
|
+
strategy: 'array-match',
|
|
6694
|
+
paths: ['tabs[]', 'nav.links[]'],
|
|
6695
|
+
matchFields: ['id', 'label', 'textLabel', 'title'],
|
|
6696
|
+
inputMatchFields: ['tabId', 'linkId', 'id', 'textLabel', 'label'],
|
|
6697
|
+
};
|
|
6698
|
+
const tabsSelectionReconciliation = {
|
|
6699
|
+
selectedIndexPath: 'group.selectedIndex',
|
|
6700
|
+
itemKeyField: 'id',
|
|
6701
|
+
onRemovedActive: 'clamp',
|
|
6702
|
+
};
|
|
5415
6703
|
const tabItemSchema = {
|
|
5416
6704
|
type: 'object',
|
|
5417
6705
|
required: ['id', 'textLabel'],
|
|
@@ -5419,6 +6707,8 @@ const tabItemSchema = {
|
|
|
5419
6707
|
id: { type: 'string' },
|
|
5420
6708
|
textLabel: { type: 'string' },
|
|
5421
6709
|
icon: { type: 'string' },
|
|
6710
|
+
labelClass: { anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }] },
|
|
6711
|
+
tone: { enum: ['default', 'primary', 'accent', 'outlined'] },
|
|
5422
6712
|
disabled: { type: 'boolean' },
|
|
5423
6713
|
visible: { type: 'boolean', default: true },
|
|
5424
6714
|
content: { type: 'array', items: { type: 'object' } },
|
|
@@ -5432,6 +6722,8 @@ const tabPatchSchema = {
|
|
|
5432
6722
|
id: { type: 'string' },
|
|
5433
6723
|
textLabel: { type: 'string' },
|
|
5434
6724
|
icon: { type: 'string' },
|
|
6725
|
+
labelClass: { anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }] },
|
|
6726
|
+
tone: { enum: ['default', 'primary', 'accent', 'outlined'] },
|
|
5435
6727
|
disabled: { type: 'boolean' },
|
|
5436
6728
|
visible: { type: 'boolean' },
|
|
5437
6729
|
content: { type: 'array', items: { type: 'object' } },
|
|
@@ -5450,23 +6742,23 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5450
6742
|
{ name: 'componentInstanceId', type: 'string', description: 'Optional instance discriminator for persistence scope.' },
|
|
5451
6743
|
{
|
|
5452
6744
|
name: 'configPersistenceStrategy',
|
|
5453
|
-
type: '"
|
|
5454
|
-
description: 'Controls whether persisted customization or explicit input config governs the runtime
|
|
6745
|
+
type: '"local-first" | "input-first" | "volatile" | "storage-first"',
|
|
6746
|
+
description: 'Controls whether persisted customization or explicit input config governs the runtime (`local-first`, legacy `storage-first`, composition-owned `input-first`, or ephemeral `volatile`).',
|
|
5455
6747
|
},
|
|
5456
6748
|
{ name: 'form', type: 'FormGroup', description: 'FormGroup consumed by dynamic field content.' },
|
|
5457
6749
|
{ name: 'context', type: 'Record<string, any>', description: 'Context passed to nested widgets.' },
|
|
5458
6750
|
{ name: 'enableCustomization', type: 'boolean', description: 'Enables Settings Panel authoring surfaces.' },
|
|
5459
6751
|
],
|
|
5460
6752
|
editableTargets: [
|
|
5461
|
-
{ kind: 'tab', resolver: 'tab-by-id-or-label', description: 'A group-mode tab in config.tabs[].' },
|
|
5462
|
-
{ kind: 'tabLabel', resolver: 'tab-by-id-or-label', description: 'The text label of a group-mode tab.' },
|
|
5463
|
-
{ kind: 'tabIcon', resolver: 'tab-by-id-or-label', description: 'Icon metadata rendered in a group tab label.' },
|
|
5464
|
-
{ kind: 'tabContent', resolver: 'tab-or-link-by-id', description: 'Dynamic fields or widgets hosted by a tab or nav link.' },
|
|
5465
|
-
{ kind: 'activeTab', resolver: 'tab-index-or-id', description: 'Selected tab or nav link index.' },
|
|
5466
|
-
{ kind: 'visibility', resolver: 'tab-or-link-by-id', description: 'Runtime visibility flag for a group tab or nav link.' },
|
|
5467
|
-
{ kind: 'disabledState', resolver: 'tab-or-link-by-id', description: 'Disabled state of a tab or nav link.' },
|
|
5468
|
-
{ kind: 'layout', resolver: 'tabs-layout-config', description: 'Group/nav mode, header position, density, stretch and behavior settings.' },
|
|
5469
|
-
{ kind: 'renderBody', resolver: 'tabs-render-body-config', description: 'Config paths group.renderBody and nav.renderBody that let the host own external body content.' },
|
|
6753
|
+
{ kind: 'tab', resolver: 'tab-by-id-or-label', description: 'A group-mode tab in config.tabs[].', resolutionSpec: tabByIdOrLabelResolutionSpec },
|
|
6754
|
+
{ kind: 'tabLabel', resolver: 'tab-by-id-or-label', description: 'The text label of a group-mode tab.', resolutionSpec: tabByIdOrLabelResolutionSpec },
|
|
6755
|
+
{ kind: 'tabIcon', resolver: 'tab-by-id-or-label', description: 'Icon metadata rendered in a group tab label.', resolutionSpec: tabByIdOrLabelResolutionSpec },
|
|
6756
|
+
{ kind: 'tabContent', resolver: 'tab-or-link-by-id', description: 'Dynamic fields or widgets hosted by a tab or nav link.', resolutionSpec: tabOrLinkByIdResolutionSpec },
|
|
6757
|
+
{ kind: 'activeTab', resolver: 'tab-index-or-id', description: 'Selected tab or nav link index.', resolutionSpec: tabOrLinkByIdResolutionSpec },
|
|
6758
|
+
{ kind: 'visibility', resolver: 'tab-or-link-by-id', description: 'Runtime visibility flag for a group tab or nav link.', resolutionSpec: tabOrLinkByIdResolutionSpec },
|
|
6759
|
+
{ kind: 'disabledState', resolver: 'tab-or-link-by-id', description: 'Disabled state of a tab or nav link.', resolutionSpec: tabOrLinkByIdResolutionSpec },
|
|
6760
|
+
{ kind: 'layout', resolver: 'tabs-layout-config', description: 'Group/nav mode, visual variant, header position, density, stretch and behavior settings.', resolutionSpec: tabsLayoutRootResolutionSpec },
|
|
6761
|
+
{ kind: 'renderBody', resolver: 'tabs-render-body-config', description: 'Config paths group.renderBody and nav.renderBody that let the host own external body content.', resolutionSpec: tabsRenderBodyRootResolutionSpec },
|
|
5470
6762
|
],
|
|
5471
6763
|
operations: [
|
|
5472
6764
|
{
|
|
@@ -5474,7 +6766,7 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5474
6766
|
title: 'Add tab',
|
|
5475
6767
|
scope: 'global',
|
|
5476
6768
|
targetKind: 'tab',
|
|
5477
|
-
target: { kind: 'tab', resolver: 'tabs-array', ambiguityPolicy: 'fail', required: false },
|
|
6769
|
+
target: { kind: 'tab', resolver: 'tabs-array', ambiguityPolicy: 'fail', required: false, resolutionSpec: tabsArrayRootResolutionSpec },
|
|
5478
6770
|
inputSchema: tabItemSchema,
|
|
5479
6771
|
effects: [{ kind: 'append-unique', path: 'tabs[]', key: 'id' }],
|
|
5480
6772
|
validators: ['tab-id-unique', 'tabs-mode-compatible', 'tab-content-valid'],
|
|
@@ -5489,7 +6781,7 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5489
6781
|
title: 'Remove tab',
|
|
5490
6782
|
scope: 'layout',
|
|
5491
6783
|
targetKind: 'tab',
|
|
5492
|
-
target: { kind: 'tab', resolver: 'tab-by-id-or-label', ambiguityPolicy: 'fail', required: true },
|
|
6784
|
+
target: { kind: 'tab', resolver: 'tab-by-id-or-label', ambiguityPolicy: 'fail', required: true, resolutionSpec: tabByIdOrLabelResolutionSpec },
|
|
5493
6785
|
inputSchema: {
|
|
5494
6786
|
type: 'object',
|
|
5495
6787
|
properties: {
|
|
@@ -5500,6 +6792,7 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5500
6792
|
{
|
|
5501
6793
|
kind: 'compile-domain-patch',
|
|
5502
6794
|
handler: 'tabs.remove-tab-and-reselect',
|
|
6795
|
+
selectionReconciliation: tabsSelectionReconciliation,
|
|
5503
6796
|
handlerContract: {
|
|
5504
6797
|
reads: ['tabs[]', 'group.selectedIndex'],
|
|
5505
6798
|
writes: ['tabs[]', 'group.selectedIndex'],
|
|
@@ -5525,7 +6818,7 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5525
6818
|
title: 'Set tab label',
|
|
5526
6819
|
scope: 'layout',
|
|
5527
6820
|
targetKind: 'tabLabel',
|
|
5528
|
-
target: { kind: 'tabLabel', resolver: 'tab-by-id-or-label', ambiguityPolicy: 'fail', required: true },
|
|
6821
|
+
target: { kind: 'tabLabel', resolver: 'tab-by-id-or-label', ambiguityPolicy: 'fail', required: true, resolutionSpec: tabByIdOrLabelResolutionSpec },
|
|
5529
6822
|
inputSchema: { type: 'object', required: ['textLabel'], properties: { textLabel: { type: 'string' } } },
|
|
5530
6823
|
effects: [{ kind: 'merge-by-key', path: 'tabs[]', key: 'id' }],
|
|
5531
6824
|
destructive: false,
|
|
@@ -5540,7 +6833,7 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5540
6833
|
title: 'Set tab icon',
|
|
5541
6834
|
scope: 'layout',
|
|
5542
6835
|
targetKind: 'tabIcon',
|
|
5543
|
-
target: { kind: 'tabIcon', resolver: 'tab-by-id-or-label', ambiguityPolicy: 'fail', required: true },
|
|
6836
|
+
target: { kind: 'tabIcon', resolver: 'tab-by-id-or-label', ambiguityPolicy: 'fail', required: true, resolutionSpec: tabByIdOrLabelResolutionSpec },
|
|
5544
6837
|
inputSchema: { type: 'object', required: ['icon'], properties: { icon: { type: 'string' } } },
|
|
5545
6838
|
effects: [{ kind: 'merge-by-key', path: 'tabs[]', key: 'id' }],
|
|
5546
6839
|
destructive: false,
|
|
@@ -5555,12 +6848,13 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5555
6848
|
title: 'Reorder tabs',
|
|
5556
6849
|
scope: 'layout',
|
|
5557
6850
|
targetKind: 'tab',
|
|
5558
|
-
target: { kind: 'tab', resolver: 'tab-by-id-or-label', ambiguityPolicy: 'fail', required: true },
|
|
6851
|
+
target: { kind: 'tab', resolver: 'tab-by-id-or-label', ambiguityPolicy: 'fail', required: true, resolutionSpec: tabByIdOrLabelResolutionSpec },
|
|
5559
6852
|
inputSchema: { type: 'object', required: ['beforeTabId'], properties: { beforeTabId: { type: 'string' } } },
|
|
5560
6853
|
effects: [
|
|
5561
6854
|
{
|
|
5562
6855
|
kind: 'compile-domain-patch',
|
|
5563
6856
|
handler: 'tabs.reorder-tab-and-preserve-selection',
|
|
6857
|
+
selectionReconciliation: tabsSelectionReconciliation,
|
|
5564
6858
|
handlerContract: {
|
|
5565
6859
|
reads: ['tabs[]', 'group.selectedIndex'],
|
|
5566
6860
|
writes: ['tabs[]', 'group.selectedIndex'],
|
|
@@ -5583,7 +6877,7 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5583
6877
|
title: 'Set tab disabled state',
|
|
5584
6878
|
scope: 'interaction',
|
|
5585
6879
|
targetKind: 'disabledState',
|
|
5586
|
-
target: { kind: 'disabledState', resolver: 'tab-or-link-by-id', ambiguityPolicy: 'fail', required: true },
|
|
6880
|
+
target: { kind: 'disabledState', resolver: 'tab-or-link-by-id', ambiguityPolicy: 'fail', required: true, resolutionSpec: tabOrLinkByIdResolutionSpec },
|
|
5587
6881
|
inputSchema: { type: 'object', required: ['disabled'], properties: { disabled: { type: 'boolean' } } },
|
|
5588
6882
|
effects: [
|
|
5589
6883
|
{
|
|
@@ -5611,7 +6905,7 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5611
6905
|
title: 'Set tab visibility',
|
|
5612
6906
|
scope: 'interaction',
|
|
5613
6907
|
targetKind: 'visibility',
|
|
5614
|
-
target: { kind: 'visibility', resolver: 'tab-or-link-by-id', ambiguityPolicy: 'fail', required: true },
|
|
6908
|
+
target: { kind: 'visibility', resolver: 'tab-or-link-by-id', ambiguityPolicy: 'fail', required: true, resolutionSpec: tabOrLinkByIdResolutionSpec },
|
|
5615
6909
|
inputSchema: { type: 'object', required: ['visible'], properties: { visible: { type: 'boolean' } } },
|
|
5616
6910
|
effects: [
|
|
5617
6911
|
{
|
|
@@ -5639,7 +6933,7 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5639
6933
|
title: 'Set active tab',
|
|
5640
6934
|
scope: 'interaction',
|
|
5641
6935
|
targetKind: 'activeTab',
|
|
5642
|
-
target: { kind: 'activeTab', resolver: 'tab-index-or-id', ambiguityPolicy: 'fail', required: true },
|
|
6936
|
+
target: { kind: 'activeTab', resolver: 'tab-index-or-id', ambiguityPolicy: 'fail', required: true, resolutionSpec: tabOrLinkByIdResolutionSpec },
|
|
5643
6937
|
inputSchema: { type: 'object', required: ['selectedIndex'], properties: { selectedIndex: { type: 'number' }, tabId: { type: 'string' } } },
|
|
5644
6938
|
effects: [
|
|
5645
6939
|
{
|
|
@@ -5667,12 +6961,13 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5667
6961
|
title: 'Set tabs layout variant',
|
|
5668
6962
|
scope: 'layout',
|
|
5669
6963
|
targetKind: 'layout',
|
|
5670
|
-
target: { kind: 'layout', resolver: 'tabs-layout-config', ambiguityPolicy: 'fail', required: true },
|
|
6964
|
+
target: { kind: 'layout', resolver: 'tabs-layout-config', ambiguityPolicy: 'fail', required: true, resolutionSpec: tabsLayoutRootResolutionSpec },
|
|
5671
6965
|
inputSchema: {
|
|
5672
6966
|
type: 'object',
|
|
5673
|
-
|
|
6967
|
+
minProperties: 1,
|
|
5674
6968
|
properties: {
|
|
5675
6969
|
mode: { enum: ['group', 'nav'] },
|
|
6970
|
+
variant: { enum: ['underline', 'pill', 'segmented'] },
|
|
5676
6971
|
density: { enum: ['compact', 'comfortable', 'spacious'] },
|
|
5677
6972
|
headerPosition: { enum: ['above', 'below'] },
|
|
5678
6973
|
alignTabs: { enum: ['start', 'center', 'end'] },
|
|
@@ -5684,7 +6979,7 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5684
6979
|
destructive: false,
|
|
5685
6980
|
requiresConfirmation: false,
|
|
5686
6981
|
validators: ['tabs-mode-compatible', 'layout-values-valid', 'editor-runtime-round-trip'],
|
|
5687
|
-
affectedPaths: ['appearance.density', 'group.headerPosition', 'group.alignTabs', 'group.stretchTabs', 'nav.stretchTabs', 'behavior.lazyLoad'],
|
|
6982
|
+
affectedPaths: ['appearance.variant', 'appearance.density', 'group.headerPosition', 'group.alignTabs', 'group.stretchTabs', 'nav.stretchTabs', 'behavior.lazyLoad'],
|
|
5688
6983
|
submissionImpact: 'config-only',
|
|
5689
6984
|
preconditions: ['config-initialized'],
|
|
5690
6985
|
},
|
|
@@ -5693,7 +6988,7 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5693
6988
|
title: 'Set tab content',
|
|
5694
6989
|
scope: 'layout',
|
|
5695
6990
|
targetKind: 'tabContent',
|
|
5696
|
-
target: { kind: 'tabContent', resolver: 'tab-or-link-by-id', ambiguityPolicy: 'fail', required: true },
|
|
6991
|
+
target: { kind: 'tabContent', resolver: 'tab-or-link-by-id', ambiguityPolicy: 'fail', required: true, resolutionSpec: tabOrLinkByIdResolutionSpec },
|
|
5697
6992
|
inputSchema: tabPatchSchema,
|
|
5698
6993
|
effects: [
|
|
5699
6994
|
{
|
|
@@ -5753,6 +7048,7 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5753
7048
|
{ id: 'reject-duplicate-tab-id', request: 'Add another tab with id overview.', operationId: 'tab.add', params: { id: 'overview', textLabel: 'Duplicate Overview' }, isPositive: false },
|
|
5754
7049
|
{ id: 'reject-current-tab-content-as-tab-add', request: 'Create a list in this tab; do not add a new tab.', operationId: 'tab.add', params: { id: 'list-in-this-tab', textLabel: 'List in this tab' }, isPositive: false },
|
|
5755
7050
|
{ id: 'confirm-remove-content-tab', request: 'Remove the details tab that contains widgets.', operationId: 'tab.remove', target: 'details', params: { replacementActiveTabId: 'overview' }, isPositive: true },
|
|
7051
|
+
{ id: 'set-pill-variant', request: 'Switch the tabs header to pill variant.', operationId: 'layout.variant.set', params: { variant: 'pill', density: 'compact' }, isPositive: true },
|
|
5756
7052
|
],
|
|
5757
7053
|
};
|
|
5758
7054
|
|
|
@@ -5764,4 +7060,4 @@ const PRAXIS_TABS_AUTHORING_MANIFEST = {
|
|
|
5764
7060
|
* Generated bundle index. Do not edit.
|
|
5765
7061
|
*/
|
|
5766
7062
|
|
|
5767
|
-
export { PRAXIS_TABS_AUTHORING_MANIFEST, PRAXIS_TABS_COMPONENT_METADATA, PRAXIS_TABS_I18N_CONFIG, PRAXIS_TABS_I18N_NAMESPACE, PraxisTabs, PraxisTabsConfigEditor, PraxisTabsWidgetConfigEditor, TABS_AI_CAPABILITIES, buildTabsApplyPlan, createPraxisTabsI18nConfig, createTabsAuthoringDocument, normalizeTabsAuthoringDocument, providePraxisTabsI18n, providePraxisTabsMetadata, serializeTabsAuthoringDocument, toCanonicalTabsConfig, validateTabsAuthoringDocument };
|
|
7063
|
+
export { PRAXIS_TABS_AUTHORING_MANIFEST, PRAXIS_TABS_COMPONENT_METADATA, PRAXIS_TABS_I18N_CONFIG, PRAXIS_TABS_I18N_NAMESPACE, PraxisTabs, PraxisTabsConfigEditor, PraxisTabsWidgetConfigEditor, TABS_AI_CAPABILITIES, buildTabsApplyPlan, buildUniqueChildWidgetKey, createPraxisTabsI18nConfig, createTabsAuthoringDocument, normalizeTabsAuthoringDocument, providePraxisTabsI18n, providePraxisTabsMetadata, serializeTabsAuthoringDocument, toCanonicalTabsConfig, validateTabsAuthoringDocument };
|