@praxisui/settings-panel 10.0.0-rc.6 → 10.0.0-rc.61

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Renderer2, signal, DestroyRef, ViewContainerRef, HostListener, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, InjectionToken, Injector, Injectable, ElementRef, ChangeDetectorRef, ENVIRONMENT_INITIALIZER } from '@angular/core';
2
+ import { inject, Renderer2, signal, DestroyRef, Injector, afterNextRender, ViewContainerRef, HostListener, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, InjectionToken, Injectable, ElementRef, ChangeDetectorRef, ENVIRONMENT_INITIALIZER } from '@angular/core';
3
3
  import * as i2 from '@angular/common';
4
4
  import { CommonModule, NgStyle, NgClass } from '@angular/common';
5
5
  import { InteractivityChecker, CdkTrapFocus } from '@angular/cdk/a11y';
@@ -14,10 +14,10 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
14
14
  import * as i4$1 from '@angular/material/tooltip';
15
15
  import { MatTooltipModule } from '@angular/material/tooltip';
16
16
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
17
- import { filter, switchMap, debounceTime, distinctUntilChanged } from 'rxjs/operators';
18
- import { isObservable, firstValueFrom, of, from, Subject, ReplaySubject, take, takeUntil, BehaviorSubject } from 'rxjs';
17
+ import { finalize, filter, switchMap, map, debounceTime, distinctUntilChanged } from 'rxjs/operators';
18
+ import { firstValueFrom, isObservable, of, from, Subject, ReplaySubject, take, takeUntil, BehaviorSubject } from 'rxjs';
19
19
  import * as i1$2 from '@praxisui/core';
20
- import { providePraxisI18n, PraxisI18nService, PraxisIconButtonComponent, PraxisIconDirective, SETTINGS_PANEL_DATA as SETTINGS_PANEL_DATA$1, PraxisLayerScaleStyleService, SETTINGS_PANEL_BRIDGE, SURFACE_DRAWER_BRIDGE, SURFACE_DRAWER_CONTENT_DATA, SURFACE_DRAWER_REF, GlobalConfigService, FieldControlType, IconPickerService, LoggerService, ComponentMetadataRegistry } from '@praxisui/core';
20
+ import { providePraxisI18n, PraxisI18nService, PraxisContextSwitchGuard, ApiConfigStorage, ASYNC_CONFIG_STORAGE, DeferredAsyncConfigStorage, parseConfigPersistenceError, PraxisIconButtonComponent, PraxisIconDirective, SETTINGS_PANEL_DATA as SETTINGS_PANEL_DATA$1, PraxisLayerScaleStyleService, SETTINGS_PANEL_BRIDGE, SURFACE_DRAWER_BRIDGE, SURFACE_DRAWER_CONTENT_DATA, SURFACE_DRAWER_REF, GlobalConfigService, FieldControlType, IconPickerService, LoggerService, ComponentMetadataRegistry } from '@praxisui/core';
21
21
  import { ConfirmDialogComponent } from '@praxisui/dynamic-fields';
22
22
  import * as i1$1 from '@angular/cdk/overlay';
23
23
  import { ComponentPortal } from '@angular/cdk/portal';
@@ -35,6 +35,8 @@ const PRAXIS_SETTINGS_PANEL_GLOBAL_CONFIG_EDITOR_PT_BR = {
35
35
  'Cache & Persistence': 'Cache & Persistência',
36
36
  Table: 'Tabela',
37
37
  Dialog: 'Dialog',
38
+ 'Dynamic Pages': 'Páginas Dinâmicas',
39
+ 'Global presets for layout, theme, widget shell and canvas grid': 'Presets globais de layout, tema, moldura de widgets e grade de canvas',
38
40
  'Settings saved': 'Configurações salvas',
39
41
  'Save failed.': 'Falha ao salvar configurações.',
40
42
  'Global settings': 'Configurações globais',
@@ -220,6 +222,8 @@ const PRAXIS_SETTINGS_PANEL_GLOBAL_CONFIG_EDITOR_PT_BR = {
220
222
  'Toolbar visível': 'Toolbar visível',
221
223
  'Cache & Persistência': 'Cache & Persistence',
222
224
  Tabela: 'Table',
225
+ 'Páginas Dinâmicas': 'Páginas Dinâmicas',
226
+ 'Definido pela página (sem preset forçado)': 'Definido pela página (sem preset forçado)',
223
227
  Salvar: 'Save',
224
228
  Cancelar: 'Cancel',
225
229
  Redefinir: 'Reset',
@@ -230,6 +234,8 @@ const PRAXIS_SETTINGS_PANEL_GLOBAL_CONFIG_EDITOR_EN_US = {
230
234
  'Cache & Persistence': 'Cache & Persistence',
231
235
  Table: 'Table',
232
236
  Dialog: 'Dialog',
237
+ 'Dynamic Pages': 'Dynamic Pages',
238
+ 'Global presets for layout, theme, widget shell and canvas grid': 'Global presets for layout, theme, widget shell and canvas grid',
233
239
  'Settings saved': 'Settings saved',
234
240
  'Save failed.': 'Save failed.',
235
241
  'Global settings': 'Global settings',
@@ -415,6 +421,8 @@ const PRAXIS_SETTINGS_PANEL_GLOBAL_CONFIG_EDITOR_EN_US = {
415
421
  'Toolbar visível': 'Toolbar visible',
416
422
  'Cache & Persistência': 'Cache & Persistence',
417
423
  Tabela: 'Table',
424
+ 'Páginas Dinâmicas': 'Dynamic Pages',
425
+ 'Definido pela página (sem preset forçado)': 'Page-defined (no forced preset)',
418
426
  Salvar: 'Save',
419
427
  Cancelar: 'Cancel',
420
428
  Redefinir: 'Reset',
@@ -450,6 +458,33 @@ const PRAXIS_SETTINGS_PANEL_EN_US = {
450
458
  Back: 'Back',
451
459
  Apply: 'Apply',
452
460
  'Save & Close': 'Save & Close',
461
+ 'Context navigation': 'Context navigation',
462
+ 'Previous item': 'Previous item',
463
+ 'Next item': 'Next item',
464
+ 'Editing target': 'Editing target',
465
+ 'Editing modes': 'Editing modes',
466
+ 'Resize panel': 'Resize panel',
467
+ 'Scope: Personal': 'Scope: Personal',
468
+ 'Scope: Tenant': 'Scope: Organization (Tenant)',
469
+ 'Switch to tenant scope': 'Switch to tenant scope',
470
+ 'Switch to personal scope': 'Switch to personal scope',
471
+ 'Reset to tenant baseline': 'Reset to tenant baseline',
472
+ 'Discard personal customizations and restore the shared tenant baseline?': 'Discard personal customizations and restore the shared tenant baseline?',
473
+ 'Code: {{code}}': 'Code: {{code}}',
474
+ 'Correlation ID: {{id}}': 'Correlation ID: {{id}}',
475
+ 'Dismiss error': 'Dismiss error',
476
+ 'Save failed: sensitive criteria cannot be shared at tenant scope.': 'Sensitive criteria cannot be published to shared tenant scope. Remove restricted criteria or save at your personal scope.',
477
+ 'Save failed: configuration was modified by another user. Reload and try again.': 'Revision conflict detected (ETag): the configuration changed concurrently. Reload before retrying.',
478
+ 'Save failed: you do not have permission to publish at this scope.': 'Insufficient permissions to publish changes at this configuration scope.',
479
+ 'Save failed: configuration contains validation errors.': 'Configuration failed server validation. Review the fields and try again.',
480
+ 'Save failed: network or persistence acknowledgment error.': 'Connection failed or the storage backend did not acknowledge persistence. Try again.',
481
+ 'Save failed: server error while persisting configuration.': 'Server error while persisting the configuration. Please try again shortly.',
482
+ 'Save failed: unable to persist configuration.': 'Unable to persist the configuration. Please try again shortly.',
483
+ 'Reset failed: configuration was modified by another user. Reload and try again.': 'Revision conflict detected (ETag): the configuration changed concurrently. Reload before resetting.',
484
+ 'Reset failed: you do not have permission to reset at this scope.': 'Insufficient permissions to reset changes at this configuration scope.',
485
+ 'Reset failed: network or persistence acknowledgment error.': 'Connection failed or the storage backend did not acknowledge the reset. Try again.',
486
+ 'Reset failed: server error while resetting configuration.': 'Server error while resetting the configuration. Please try again shortly.',
487
+ 'Reset failed: unable to reset configuration.': 'Unable to reset the configuration. Please try again shortly.',
453
488
  };
454
489
 
455
490
  const PRAXIS_SETTINGS_PANEL_PT_BR = {
@@ -482,6 +517,33 @@ const PRAXIS_SETTINGS_PANEL_PT_BR = {
482
517
  Back: 'Voltar',
483
518
  Apply: 'Aplicar',
484
519
  'Save & Close': 'Salvar e fechar',
520
+ 'Context navigation': 'Navegação contextual',
521
+ 'Previous item': 'Item anterior',
522
+ 'Next item': 'Próximo item',
523
+ 'Editing target': 'Item em edição',
524
+ 'Editing modes': 'Modos de edição',
525
+ 'Resize panel': 'Redimensionar painel',
526
+ 'Scope: Personal': 'Escopo: Pessoal',
527
+ 'Scope: Tenant': 'Escopo: Organização (Tenant)',
528
+ 'Switch to tenant scope': 'Publicar para organização (Tenant)',
529
+ 'Switch to personal scope': 'Salvar apenas no meu perfil',
530
+ 'Reset to tenant baseline': 'Restaurar padrão da organização',
531
+ 'Discard personal customizations and restore the shared tenant baseline?': 'Descartar as personalizações individuais e restaurar o padrão compartilhado da organização (Tenant)?',
532
+ 'Code: {{code}}': 'Código: {{code}}',
533
+ 'Correlation ID: {{id}}': 'Correlação: {{id}}',
534
+ 'Dismiss error': 'Dispensar aviso',
535
+ 'Save failed: sensitive criteria cannot be shared at tenant scope.': 'Critérios sensíveis não podem ser publicados no escopo compartilhado da organização (Tenant). Remova os critérios restritos ou salve no seu escopo pessoal.',
536
+ 'Save failed: configuration was modified by another user. Reload and try again.': 'Conflito de revisão (ETag): outra alteração foi salva antes. Recarregue a configuração e tente novamente.',
537
+ 'Save failed: you do not have permission to publish at this scope.': 'Sem permissão para publicar alterações neste escopo de configuração.',
538
+ 'Save failed: configuration contains validation errors.': 'A configuração falhou na validação do servidor. Revise os campos e tente novamente.',
539
+ 'Save failed: network or persistence acknowledgment error.': 'Falha de conexão ou ausência de confirmação ao persistir a configuração. Tente novamente.',
540
+ 'Save failed: server error while persisting configuration.': 'Erro interno no servidor ao salvar a configuração. Tente novamente em instantes.',
541
+ 'Save failed: unable to persist configuration.': 'Não foi possível salvar a configuração. Tente novamente em instantes.',
542
+ 'Reset failed: configuration was modified by another user. Reload and try again.': 'Conflito de revisão (ETag): outra alteração foi salva antes. Recarregue antes de redefinir.',
543
+ 'Reset failed: you do not have permission to reset at this scope.': 'Sem permissão para redefinir alterações neste escopo de configuração.',
544
+ 'Reset failed: network or persistence acknowledgment error.': 'Falha de conexão ou ausência de confirmação ao redefinir a configuração. Tente novamente.',
545
+ 'Reset failed: server error while resetting configuration.': 'Erro interno no servidor ao redefinir a configuração. Tente novamente em instantes.',
546
+ 'Reset failed: unable to reset configuration.': 'Não foi possível redefinir a configuração. Tente novamente em instantes.',
485
547
  };
486
548
 
487
549
  const PRAXIS_SETTINGS_PANEL_I18N_NAMESPACE = 'praxis-settings-panel';
@@ -543,6 +605,16 @@ function parsePixelWidth(value) {
543
605
  return Number.isFinite(parsed) ? parsed : null;
544
606
  }
545
607
 
608
+ function isScopeErrorAwareStorage(candidate) {
609
+ if (!candidate || typeof candidate !== 'object')
610
+ return false;
611
+ const record = candidate;
612
+ return ('writeScope' in record ||
613
+ 'saveError$' in record ||
614
+ 'evaluateWriteTargetScope' in record ||
615
+ 'canWriteScope' in record ||
616
+ 'canWriteConfig' in record);
617
+ }
546
618
  const DEFAULT_DIAGNOSTICS = {
547
619
  showStatusMessage: true,
548
620
  showDisabledReason: true,
@@ -564,6 +636,12 @@ class SettingsPanelComponent {
564
636
  expanded = false;
565
637
  interactionActive = true;
566
638
  previewTarget;
639
+ contextNavigation;
640
+ configStorageKey;
641
+ showWriteScope = true;
642
+ canSwitchWriteScope = true;
643
+ persistSaveHandler;
644
+ persistResetHandler;
567
645
  previewing = false;
568
646
  previewElement = null;
569
647
  previewScroll = [];
@@ -580,37 +658,156 @@ class SettingsPanelComponent {
580
658
  // the panel's already-checked footer subscribed to those late state changes.
581
659
  dirtyState = signal(false, ...(ngDevMode ? [{ debugName: "dirtyState" }] : /* istanbul ignore next */ []));
582
660
  validState = signal(true, ...(ngDevMode ? [{ debugName: "validState" }] : /* istanbul ignore next */ []));
583
- busyState = signal(false, ...(ngDevMode ? [{ debugName: "busyState" }] : /* istanbul ignore next */ []));
661
+ providerBusyState = signal(false, ...(ngDevMode ? [{ debugName: "providerBusyState" }] : /* istanbul ignore next */ []));
662
+ persistenceBusyState = signal(false, ...(ngDevMode ? [{ debugName: "persistenceBusyState" }] : /* istanbul ignore next */ []));
584
663
  get isDirty() { return this.dirtyState(); }
585
664
  set isDirty(value) { this.dirtyState.set(value); }
586
665
  get isValid() { return this.validState(); }
587
666
  set isValid(value) { this.validState.set(value); }
588
- get isBusy() { return this.busyState(); }
589
- set isBusy(value) { this.busyState.set(value); }
667
+ get isBusy() {
668
+ return this.providerBusyState() || this.persistenceBusyState();
669
+ }
670
+ set isBusy(value) {
671
+ this.providerBusyState.set(value);
672
+ }
590
673
  diagnostics = {
591
674
  ...DEFAULT_DIAGNOSTICS,
592
675
  };
593
676
  lastSavedAt = null;
594
677
  hasAppliedChanges = false;
678
+ saveFailedPendingRetry = false;
679
+ confirmDialogOpen = false;
680
+ saveErrorStreamBound = false;
681
+ get isConfirmDialogOpen() {
682
+ return this.confirmDialogOpen;
683
+ }
595
684
  activePointerId = null;
596
685
  dragStartX = 0;
597
686
  dragStartWidth = 0;
598
687
  collapsedWidthBeforeExpand = null;
599
688
  destroyRef = inject(DestroyRef);
689
+ injector = inject(Injector);
600
690
  i18n = inject(PraxisI18nService);
691
+ contextSwitchGuard = inject(PraxisContextSwitchGuard, { optional: true });
692
+ directApiStorage = inject(ApiConfigStorage, { optional: true });
693
+ asyncConfigStorage = inject(ASYNC_CONFIG_STORAGE, {
694
+ optional: true,
695
+ });
696
+ scopeErrorStorage = this.resolveScopeErrorStorage();
697
+ storageSaveError = signal(null, ...(ngDevMode ? [{ debugName: "storageSaveError" }] : /* istanbul ignore next */ []));
601
698
  applyActionLabel = this.actionLabel('Apply');
602
699
  saveActionLabel = this.actionLabel('Save & Close');
603
700
  contentHost;
701
+ saveErrorBanner;
604
702
  constructor(cdr, dialog, elementRef, overlayContainer) {
605
703
  this.cdr = cdr;
606
704
  this.dialog = dialog;
607
705
  this.elementRef = elementRef;
608
706
  this.overlayContainer = overlayContainer;
707
+ this.contextSwitchGuard?.registerDirtyCheck(this.titleId, () => this.isDirty || this.hasAppliedChanges, { destroyRef: this.destroyRef });
609
708
  this.destroyRef.onDestroy(() => this.restorePreviewPage());
610
709
  }
611
710
  get canInspectPreview() {
612
711
  return !!this.previewTarget && this.interactionActive && this.isValid && !this.isBusy;
613
712
  }
713
+ get hasContextNavigation() {
714
+ const nav = this.contextNavigation;
715
+ return !!(nav && ((nav.targets && nav.targets.length > 0) || (nav.modes && nav.modes.length > 0)));
716
+ }
717
+ get activeTargetIndex() {
718
+ const targets = this.contextNavigation?.targets;
719
+ const activeId = this.contextNavigation?.activeTargetId;
720
+ if (!targets?.length || !activeId)
721
+ return -1;
722
+ return targets.findIndex((target) => target.id === activeId);
723
+ }
724
+ get canSelectPreviousTarget() {
725
+ return this.interactionActive && !this.isBusy && this.activeTargetIndex > 0;
726
+ }
727
+ get canSelectNextTarget() {
728
+ const targets = this.contextNavigation?.targets;
729
+ const idx = this.activeTargetIndex;
730
+ return this.interactionActive && !this.isBusy && !!targets && idx >= 0 && idx < targets.length - 1;
731
+ }
732
+ selectPreviousTarget() {
733
+ const targets = this.contextNavigation?.targets;
734
+ const idx = this.activeTargetIndex;
735
+ if (!targets || idx <= 0)
736
+ return;
737
+ this.selectContextTarget(targets[idx - 1].id);
738
+ }
739
+ selectNextTarget() {
740
+ const targets = this.contextNavigation?.targets;
741
+ const idx = this.activeTargetIndex;
742
+ if (!targets || idx < 0 || idx >= targets.length - 1)
743
+ return;
744
+ this.selectContextTarget(targets[idx + 1].id);
745
+ }
746
+ selectContextTarget(targetId, selectElement) {
747
+ const nav = this.contextNavigation;
748
+ if (!nav?.onSelectTarget ||
749
+ !targetId ||
750
+ targetId === nav.activeTargetId ||
751
+ this.isBusy ||
752
+ !this.interactionActive ||
753
+ !this.isValid) {
754
+ if (selectElement && nav?.activeTargetId) {
755
+ selectElement.value = nav.activeTargetId;
756
+ }
757
+ this.cdr.markForCheck();
758
+ return;
759
+ }
760
+ if (this.canApply) {
761
+ this.onApply();
762
+ if (!this.isValid || this.isBusy) {
763
+ if (selectElement && nav.activeTargetId) {
764
+ selectElement.value = nav.activeTargetId;
765
+ }
766
+ this.cdr.markForCheck();
767
+ return;
768
+ }
769
+ if (this.hasAppliedChanges) {
770
+ this.isDirty = false;
771
+ }
772
+ }
773
+ nav.onSelectTarget(targetId);
774
+ if (selectElement &&
775
+ this.contextNavigation?.activeTargetId &&
776
+ selectElement.value !== this.contextNavigation.activeTargetId) {
777
+ selectElement.value = this.contextNavigation.activeTargetId;
778
+ }
779
+ this.cdr.markForCheck();
780
+ }
781
+ selectContextMode(modeId) {
782
+ const nav = this.contextNavigation;
783
+ if (!nav?.onSelectMode || !modeId || modeId === nav.activeModeId || this.isBusy || !this.interactionActive) {
784
+ return;
785
+ }
786
+ const mode = nav.modes?.find((item) => item.id === modeId);
787
+ if (mode?.disabled) {
788
+ return;
789
+ }
790
+ const currentMode = nav.modes?.find((item) => item.id === nav.activeModeId);
791
+ const sharesEditorGroup = Boolean(mode?.editorGroup && currentMode?.editorGroup && mode.editorGroup === currentMode.editorGroup);
792
+ if (!sharesEditorGroup) {
793
+ if (!this.isValid) {
794
+ this.cdr.markForCheck();
795
+ return;
796
+ }
797
+ if (this.canApply) {
798
+ this.onApply();
799
+ if (!this.isValid || this.isBusy) {
800
+ this.cdr.markForCheck();
801
+ return;
802
+ }
803
+ if (this.hasAppliedChanges) {
804
+ this.isDirty = false;
805
+ }
806
+ }
807
+ }
808
+ nav.onSelectMode(modeId);
809
+ this.cdr.markForCheck();
810
+ }
614
811
  showPreview() {
615
812
  if (!this.canInspectPreview)
616
813
  return;
@@ -650,7 +847,12 @@ class SettingsPanelComponent {
650
847
  this.previewScroll = [];
651
848
  }
652
849
  get canApply() {
653
- return !this.previewing && this.interactionActive && this.isDirty && this.isValid && !this.isBusy;
850
+ return (!this.previewing &&
851
+ this.interactionActive &&
852
+ this.isDirty &&
853
+ this.isValid &&
854
+ !this.isBusy &&
855
+ !this.confirmDialogOpen);
654
856
  }
655
857
  get panelInlineStyles() {
656
858
  return {
@@ -666,7 +868,12 @@ class SettingsPanelComponent {
666
868
  return this.tx('Resize panel');
667
869
  }
668
870
  get canSave() {
669
- return !this.previewing && this.interactionActive && (this.isDirty || this.hasAppliedChanges) && this.isValid && !this.isBusy;
871
+ return (!this.previewing &&
872
+ this.interactionActive &&
873
+ (this.isDirty || this.hasAppliedChanges || this.saveFailedPendingRetry) &&
874
+ this.isValid &&
875
+ !this.isBusy &&
876
+ !this.confirmDialogOpen);
670
877
  }
671
878
  setInteractionActive(active) {
672
879
  if (active === this.interactionActive)
@@ -709,7 +916,7 @@ class SettingsPanelComponent {
709
916
  if (!this.isValid) {
710
917
  return this.tx('The configuration contains errors that need to be fixed.');
711
918
  }
712
- if (!this.isDirty) {
919
+ if (!this.isDirty && !this.hasAppliedChanges && !this.saveFailedPendingRetry) {
713
920
  return this.tx('No changes to apply or save.');
714
921
  }
715
922
  return '';
@@ -728,7 +935,7 @@ class SettingsPanelComponent {
728
935
  return 'busy';
729
936
  if (!this.isValid && this.diagnostics.exposeValidationState)
730
937
  return 'invalid';
731
- if (this.isDirty)
938
+ if (this.isDirty || this.saveFailedPendingRetry)
732
939
  return 'dirty';
733
940
  if (this.hasAppliedChanges)
734
941
  return 'applied';
@@ -756,6 +963,394 @@ class SettingsPanelComponent {
756
963
  }
757
964
  return this.tx('No changes');
758
965
  }
966
+ get activeWriteScope() {
967
+ const scopeSource = this.scopeErrorStorage?.writeScope;
968
+ if (!scopeSource)
969
+ return null;
970
+ return typeof scopeSource === 'function' ? scopeSource() : scopeSource;
971
+ }
972
+ get showWriteScopeControls() {
973
+ return this.showWriteScope && this.activeWriteScope !== null;
974
+ }
975
+ get canToggleWriteScope() {
976
+ if (!this.canSwitchWriteScope ||
977
+ !this.interactionActive ||
978
+ this.isBusy ||
979
+ this.confirmDialogOpen ||
980
+ typeof this.scopeErrorStorage?.setWriteScope !== 'function') {
981
+ return false;
982
+ }
983
+ const nextScope = this.activeWriteScope === 'tenant' ? 'user' : 'tenant';
984
+ const decision = this.scopeErrorStorage?.evaluateWriteTargetScope?.(this.configStorageKey ?? '', { scope: nextScope });
985
+ return decision ? decision.allowed : true;
986
+ }
987
+ resolveTenantResetStorage() {
988
+ const primary = this.asyncConfigStorage;
989
+ if (typeof primary?.deletePersonalOverrideAndReloadTenantBaseline === 'function') {
990
+ return primary;
991
+ }
992
+ if (typeof this.scopeErrorStorage?.deletePersonalOverrideAndReloadTenantBaseline === 'function') {
993
+ return this.scopeErrorStorage;
994
+ }
995
+ return null;
996
+ }
997
+ get canResetPersonalOverride() {
998
+ if (this.activeWriteScope !== 'user' ||
999
+ !this.configStorageKey ||
1000
+ !this.interactionActive ||
1001
+ this.isBusy ||
1002
+ this.confirmDialogOpen ||
1003
+ !this.resolveTenantResetStorage()) {
1004
+ return false;
1005
+ }
1006
+ const decision = this.scopeErrorStorage?.evaluateWriteTargetScope?.(this.configStorageKey, { scope: 'user' });
1007
+ return decision ? decision.allowed : true;
1008
+ }
1009
+ get writeScopeLabel() {
1010
+ return this.activeWriteScope === 'tenant'
1011
+ ? this.tx('Scope: Tenant')
1012
+ : this.tx('Scope: Personal');
1013
+ }
1014
+ get writeScopeToggleLabel() {
1015
+ return this.activeWriteScope === 'tenant'
1016
+ ? this.tx('Switch to personal scope')
1017
+ : this.tx('Switch to tenant scope');
1018
+ }
1019
+ get formattedSaveErrorMessage() {
1020
+ const err = this.storageSaveError();
1021
+ if (!err)
1022
+ return '';
1023
+ const isClear = err.operation === 'clear';
1024
+ const upperCode = err.errorCode?.trim().toUpperCase() ?? '';
1025
+ if (err.errorCode === 'SHARED_CONFIG_SENSITIVE_CRITERIA_DENIED') {
1026
+ return this.tx('Save failed: sensitive criteria cannot be shared at tenant scope.');
1027
+ }
1028
+ if (err.status === 403 ||
1029
+ err.errorCode === 'write_disabled' ||
1030
+ err.errorCode === 'scope_forbidden' ||
1031
+ err.errorCode === 'read_only_mode' ||
1032
+ err.errorCode === 'governance_denied' ||
1033
+ upperCode === 'GOVERNANCE_DENIED' ||
1034
+ upperCode === 'POLICY_DENIED' ||
1035
+ upperCode.includes('GOVERNANCE') ||
1036
+ err.errorCode?.endsWith('_DISABLED') ||
1037
+ upperCode === 'READ_ONLY') {
1038
+ return this.tx(isClear
1039
+ ? 'Reset failed: you do not have permission to reset at this scope.'
1040
+ : 'Save failed: you do not have permission to publish at this scope.');
1041
+ }
1042
+ if (err.status === 422 && !isClear) {
1043
+ return (err.title?.trim() ||
1044
+ this.tx('Save failed: configuration contains validation errors.'));
1045
+ }
1046
+ if (err.status === 409 || err.status === 412) {
1047
+ return this.tx(isClear
1048
+ ? 'Reset failed: configuration was modified by another user. Reload and try again.'
1049
+ : 'Save failed: configuration was modified by another user. Reload and try again.');
1050
+ }
1051
+ if (err.errorCode === 'NETWORK_ERROR' ||
1052
+ err.errorCode === 'WRITE_UNACKNOWLEDGED') {
1053
+ return this.tx(isClear
1054
+ ? 'Reset failed: network or persistence acknowledgment error.'
1055
+ : 'Save failed: network or persistence acknowledgment error.');
1056
+ }
1057
+ if (err.errorCode === 'CLIENT_ERROR') {
1058
+ return (err.detail?.trim() ||
1059
+ err.title?.trim() ||
1060
+ err.message?.trim() ||
1061
+ this.tx(isClear
1062
+ ? 'Reset failed: unable to reset configuration.'
1063
+ : 'Save failed: unable to persist configuration.'));
1064
+ }
1065
+ if (typeof err.status === 'number' && err.status >= 500) {
1066
+ return this.tx(isClear
1067
+ ? 'Reset failed: server error while resetting configuration.'
1068
+ : 'Save failed: server error while persisting configuration.');
1069
+ }
1070
+ return (err.title?.trim() ||
1071
+ this.tx(isClear
1072
+ ? 'Reset failed: unable to reset configuration.'
1073
+ : 'Save failed: unable to persist configuration.'));
1074
+ }
1075
+ get saveErrorFieldMessages() {
1076
+ const err = this.storageSaveError();
1077
+ if (!err)
1078
+ return [];
1079
+ const raw = (err.raw && typeof err.raw === 'object' ? err.raw : null);
1080
+ const rawError = (raw?.['error'] && typeof raw['error'] === 'object' ? raw['error'] : raw);
1081
+ const source = err['fieldErrors'] ??
1082
+ rawError?.['fieldErrors'] ??
1083
+ rawError?.['violations'] ??
1084
+ rawError?.['errors'];
1085
+ const result = [];
1086
+ if (Array.isArray(source)) {
1087
+ for (const item of source) {
1088
+ if (typeof item === 'string' && item.trim()) {
1089
+ result.push(item.trim());
1090
+ }
1091
+ else if (item && typeof item === 'object') {
1092
+ const entry = item;
1093
+ const field = typeof entry['field'] === 'string'
1094
+ ? entry['field'].trim()
1095
+ : typeof entry['propertyPath'] === 'string'
1096
+ ? entry['propertyPath'].trim()
1097
+ : typeof entry['path'] === 'string'
1098
+ ? entry['path'].trim()
1099
+ : '';
1100
+ const msg = typeof entry['message'] === 'string'
1101
+ ? entry['message'].trim()
1102
+ : typeof entry['defaultMessage'] === 'string'
1103
+ ? entry['defaultMessage'].trim()
1104
+ : '';
1105
+ if (msg) {
1106
+ result.push(field ? `${field}: ${msg}` : msg);
1107
+ }
1108
+ }
1109
+ }
1110
+ }
1111
+ else if (source && typeof source === 'object') {
1112
+ for (const [field, val] of Object.entries(source)) {
1113
+ if (typeof val === 'string' && val.trim()) {
1114
+ result.push(`${field}: ${val.trim()}`);
1115
+ }
1116
+ else if (Array.isArray(val)) {
1117
+ for (const msg of val) {
1118
+ if (typeof msg === 'string' && msg.trim()) {
1119
+ result.push(`${field}: ${msg.trim()}`);
1120
+ }
1121
+ }
1122
+ }
1123
+ }
1124
+ }
1125
+ return result;
1126
+ }
1127
+ get canSwitchToPersonalScopeFromError() {
1128
+ const err = this.storageSaveError();
1129
+ if (!err ||
1130
+ err.errorCode !== 'SHARED_CONFIG_SENSITIVE_CRITERIA_DENIED' ||
1131
+ this.activeWriteScope !== 'tenant') {
1132
+ return false;
1133
+ }
1134
+ const key = this.configStorageKey ?? '';
1135
+ const decision = this.scopeErrorStorage?.evaluateWriteTargetScope?.(key, {
1136
+ scope: 'user',
1137
+ });
1138
+ if (decision) {
1139
+ return decision.allowed;
1140
+ }
1141
+ return this.scopeErrorStorage?.canWriteScope?.('user', key) ?? true;
1142
+ }
1143
+ toggleWriteScope() {
1144
+ if (!this.canToggleWriteScope)
1145
+ return;
1146
+ if (typeof this.scopeErrorStorage?.toggleWriteScope === 'function') {
1147
+ this.scopeErrorStorage.toggleWriteScope(this.configStorageKey);
1148
+ }
1149
+ else {
1150
+ const next = this.activeWriteScope === 'tenant' ? 'user' : 'tenant';
1151
+ this.scopeErrorStorage?.setWriteScope?.(next, this.configStorageKey);
1152
+ }
1153
+ this.scopeErrorStorage?.clearSaveError?.();
1154
+ this.cdr.markForCheck();
1155
+ }
1156
+ switchToPersonalScopeFromError() {
1157
+ if (!this.canSwitchToPersonalScopeFromError)
1158
+ return;
1159
+ if (this.configStorageKey) {
1160
+ this.scopeErrorStorage?.setWriteScope?.('user', this.configStorageKey);
1161
+ }
1162
+ else {
1163
+ this.scopeErrorStorage?.setWriteScope?.('user');
1164
+ }
1165
+ this.dismissSaveError();
1166
+ }
1167
+ dismissSaveError() {
1168
+ this.scopeErrorStorage?.clearSaveError?.();
1169
+ this.storageSaveError.set(null);
1170
+ this.cdr.markForCheck();
1171
+ }
1172
+ resetPersonalOverrideToTenant() {
1173
+ const key = this.configStorageKey;
1174
+ const resetStorage = this.resolveTenantResetStorage();
1175
+ const fn = resetStorage?.deletePersonalOverrideAndReloadTenantBaseline;
1176
+ if (!key ||
1177
+ typeof fn !== 'function' ||
1178
+ this.isBusy ||
1179
+ this.destroyRef.destroyed ||
1180
+ !this.interactionActive ||
1181
+ this.confirmDialogOpen) {
1182
+ return;
1183
+ }
1184
+ const dialogData = {
1185
+ title: this.tx('Reset to tenant baseline'),
1186
+ message: this.tx('Discard personal customizations and restore the shared tenant baseline?'),
1187
+ confirmText: this.tx('Reset'),
1188
+ cancelText: this.tx('Cancel'),
1189
+ type: 'warning',
1190
+ icon: 'restart_alt',
1191
+ };
1192
+ this.confirmDialogOpen = true;
1193
+ this.dialog
1194
+ .open(ConfirmDialogComponent, { data: dialogData, autoFocus: false })
1195
+ .afterClosed()
1196
+ .pipe(finalize(() => {
1197
+ this.confirmDialogOpen = false;
1198
+ }), filter((confirmed) => Boolean(confirmed)), takeUntilDestroyed(this.destroyRef))
1199
+ .subscribe(() => {
1200
+ if (this.isBusy || this.destroyRef.destroyed) {
1201
+ return;
1202
+ }
1203
+ const gateError = this.checkWriteGate('clear', 'user');
1204
+ if (gateError) {
1205
+ this.handlePersistenceFailure(gateError, 'clear');
1206
+ return;
1207
+ }
1208
+ this.persistenceBusyState.set(true);
1209
+ this.dismissSaveError();
1210
+ this.cdr.markForCheck();
1211
+ let baselineObs;
1212
+ try {
1213
+ baselineObs = fn.call(resetStorage, key);
1214
+ }
1215
+ catch (syncError) {
1216
+ this.persistenceBusyState.set(false);
1217
+ this.handlePersistenceFailure(syncError, 'clear');
1218
+ if (!this.destroyRef.destroyed) {
1219
+ this.cdr.markForCheck();
1220
+ }
1221
+ return;
1222
+ }
1223
+ firstValueFrom(baselineObs)
1224
+ .then((tenantBaseline) => {
1225
+ if (this.destroyRef.destroyed) {
1226
+ return;
1227
+ }
1228
+ this.saveFailedPendingRetry = false;
1229
+ this.hasAppliedChanges = false;
1230
+ this.lastSavedAt = null;
1231
+ this.isDirty = false;
1232
+ this.ref?.notifyTenantBaselineRestored?.(tenantBaseline ?? null);
1233
+ if (tenantBaseline !== null && tenantBaseline !== undefined) {
1234
+ if (typeof this.contentRef?.instance?.acceptAppliedValue === 'function') {
1235
+ this.contentRef.instance.acceptAppliedValue(tenantBaseline);
1236
+ }
1237
+ else {
1238
+ this.contentRef?.instance?.reset?.();
1239
+ }
1240
+ this.ref?.apply?.(tenantBaseline);
1241
+ }
1242
+ else {
1243
+ this.contentRef?.instance?.reset?.();
1244
+ this.ref?.reset?.();
1245
+ }
1246
+ })
1247
+ .catch((error) => {
1248
+ if (this.destroyRef.destroyed) {
1249
+ return;
1250
+ }
1251
+ this.handlePersistenceFailure(error, 'clear');
1252
+ })
1253
+ .finally(() => {
1254
+ if (this.destroyRef.destroyed) {
1255
+ return;
1256
+ }
1257
+ this.persistenceBusyState.set(false);
1258
+ this.cdr.markForCheck();
1259
+ });
1260
+ });
1261
+ }
1262
+ matchesPanelStorageKey(err) {
1263
+ if (!err)
1264
+ return true;
1265
+ const errKey = err.key?.trim() || '';
1266
+ if (!errKey)
1267
+ return true;
1268
+ const activeKey = this.configStorageKey?.trim() || '';
1269
+ return Boolean(activeKey && errKey === activeKey);
1270
+ }
1271
+ resolveScopeErrorStorage() {
1272
+ if (this.asyncConfigStorage) {
1273
+ const maybeDeferred = this.asyncConfigStorage;
1274
+ const unwrap = maybeDeferred.unwrapDelegate;
1275
+ const resolved = this.asyncConfigStorage instanceof DeferredAsyncConfigStorage ||
1276
+ typeof unwrap === 'function'
1277
+ ? unwrap.call(maybeDeferred)
1278
+ : this.asyncConfigStorage;
1279
+ return isScopeErrorAwareStorage(resolved) ? resolved : null;
1280
+ }
1281
+ return this.directApiStorage;
1282
+ }
1283
+ checkWriteGate(operation, scopeOverride) {
1284
+ const key = this.configStorageKey?.trim() ?? '';
1285
+ const evaluate = this.scopeErrorStorage?.evaluateWriteTargetScope;
1286
+ if (typeof evaluate !== 'function') {
1287
+ return null;
1288
+ }
1289
+ const decision = evaluate.call(this.scopeErrorStorage, key, {
1290
+ scope: scopeOverride ?? this.activeWriteScope ?? undefined,
1291
+ });
1292
+ if (decision.allowed) {
1293
+ return null;
1294
+ }
1295
+ return {
1296
+ operation,
1297
+ key,
1298
+ scope: decision.scope,
1299
+ status: decision.code === 'governance_denied' ? 422 : 403,
1300
+ errorCode: decision.code ?? 'scope_forbidden',
1301
+ title: this.tx(operation === 'clear'
1302
+ ? 'Reset failed: you do not have permission to reset at this scope.'
1303
+ : 'Save failed: you do not have permission to publish at this scope.'),
1304
+ detail: decision.reason ?? undefined,
1305
+ message: decision.reason ??
1306
+ this.tx(operation === 'clear'
1307
+ ? 'Reset failed: you do not have permission to reset at this scope.'
1308
+ : 'Save failed: you do not have permission to publish at this scope.'),
1309
+ timestamp: Date.now(),
1310
+ };
1311
+ }
1312
+ isPrebuiltSaveError(error) {
1313
+ return (Boolean(error) &&
1314
+ typeof error === 'object' &&
1315
+ 'timestamp' in error &&
1316
+ 'status' in error &&
1317
+ 'message' in error &&
1318
+ 'operation' in error);
1319
+ }
1320
+ handlePersistenceFailure(error, operation = 'save') {
1321
+ if (this.destroyRef.destroyed) {
1322
+ return;
1323
+ }
1324
+ const isEmptyError = error instanceof Error && error.name === 'EmptyError';
1325
+ const parsed = this.isPrebuiltSaveError(error)
1326
+ ? error
1327
+ : isEmptyError
1328
+ ? (this.storageSaveError() ??
1329
+ parseConfigPersistenceError(error, {
1330
+ key: this.configStorageKey,
1331
+ scope: this.activeWriteScope ?? undefined,
1332
+ operation,
1333
+ }))
1334
+ : (parseConfigPersistenceError(error, {
1335
+ key: this.configStorageKey,
1336
+ scope: this.activeWriteScope ?? undefined,
1337
+ operation,
1338
+ }) ?? this.storageSaveError());
1339
+ if (operation !== 'clear') {
1340
+ this.saveFailedPendingRetry = true;
1341
+ }
1342
+ this.storageSaveError.set(parsed);
1343
+ this.ref?.reportPersistenceError?.(parsed);
1344
+ this.cdr.markForCheck();
1345
+ afterNextRender(() => {
1346
+ if (this.destroyRef.destroyed)
1347
+ return;
1348
+ const banner = this.saveErrorBanner?.nativeElement;
1349
+ if (banner?.isConnected) {
1350
+ banner.focus({ preventScroll: true });
1351
+ }
1352
+ }, { injector: this.injector });
1353
+ }
759
1354
  tx(text, params) {
760
1355
  const translated = this.i18n.t(text, params, text, PRAXIS_SETTINGS_PANEL_I18N_NAMESPACE);
761
1356
  return translated?.trim() ? translated : text;
@@ -791,7 +1386,36 @@ class SettingsPanelComponent {
791
1386
  instance.isBusy$
792
1387
  .pipe(takeUntilDestroyed(this.destroyRef))
793
1388
  .subscribe((busy) => {
794
- this.isBusy = busy;
1389
+ this.providerBusyState.set(busy);
1390
+ this.cdr.markForCheck();
1391
+ });
1392
+ }
1393
+ if (!this.saveErrorStreamBound) {
1394
+ this.saveErrorStreamBound = true;
1395
+ let replayingInitial = true;
1396
+ this.scopeErrorStorage?.saveError$
1397
+ ?.pipe(takeUntilDestroyed(this.destroyRef))
1398
+ .subscribe((err) => {
1399
+ if (replayingInitial) {
1400
+ return;
1401
+ }
1402
+ if (err && !this.matchesPanelStorageKey(err)) {
1403
+ return;
1404
+ }
1405
+ this.storageSaveError.set(err ?? null);
1406
+ this.cdr.markForCheck();
1407
+ });
1408
+ replayingInitial = false;
1409
+ }
1410
+ const refError$ = ref?.persistenceError$;
1411
+ if (refError$) {
1412
+ refError$
1413
+ .pipe(takeUntilDestroyed(this.destroyRef))
1414
+ .subscribe((err) => {
1415
+ if (err && !this.matchesPanelStorageKey(err)) {
1416
+ return;
1417
+ }
1418
+ this.storageSaveError.set(err);
795
1419
  this.cdr.markForCheck();
796
1420
  });
797
1421
  }
@@ -838,6 +1462,12 @@ class SettingsPanelComponent {
838
1462
  return new Set(Object.keys(declaredInputs));
839
1463
  }
840
1464
  onReset() {
1465
+ if (this.isBusy ||
1466
+ this.destroyRef.destroyed ||
1467
+ !this.interactionActive ||
1468
+ this.confirmDialogOpen) {
1469
+ return;
1470
+ }
841
1471
  const dialogData = {
842
1472
  title: this.tx('Reset Changes'),
843
1473
  message: this.tx('Are you sure you want to reset all changes?'),
@@ -846,16 +1476,58 @@ class SettingsPanelComponent {
846
1476
  type: 'warning',
847
1477
  icon: 'restart_alt',
848
1478
  };
1479
+ this.confirmDialogOpen = true;
849
1480
  this.dialog
850
1481
  .open(ConfirmDialogComponent, { data: dialogData, autoFocus: false })
851
1482
  .afterClosed()
852
- .pipe(filter((confirmed) => confirmed))
1483
+ .pipe(finalize(() => {
1484
+ this.confirmDialogOpen = false;
1485
+ }), filter((confirmed) => Boolean(confirmed)), takeUntilDestroyed(this.destroyRef))
853
1486
  .subscribe(() => {
854
- this.contentRef?.instance?.reset?.();
855
- this.lastSavedAt = null;
856
- this.ref.reset();
1487
+ if (!this.persistResetHandler) {
1488
+ this.finalizeReset();
1489
+ return;
1490
+ }
1491
+ void this.runAsyncResetFlow();
857
1492
  });
858
1493
  }
1494
+ finalizeReset() {
1495
+ this.contentRef?.instance?.reset?.();
1496
+ this.lastSavedAt = null;
1497
+ this.hasAppliedChanges = false;
1498
+ this.saveFailedPendingRetry = false;
1499
+ this.dismissSaveError();
1500
+ this.ref.reset();
1501
+ this.cdr.markForCheck();
1502
+ }
1503
+ async runAsyncResetFlow() {
1504
+ if (!this.persistResetHandler) {
1505
+ this.finalizeReset();
1506
+ return;
1507
+ }
1508
+ const gateError = this.checkWriteGate('clear');
1509
+ if (gateError) {
1510
+ this.handlePersistenceFailure(gateError, 'clear');
1511
+ return;
1512
+ }
1513
+ this.dismissSaveError();
1514
+ this.persistenceBusyState.set(true);
1515
+ this.cdr.markForCheck();
1516
+ try {
1517
+ const result = this.persistResetHandler();
1518
+ if (isObservable(result) || result instanceof Promise) {
1519
+ await this.awaitResult(result);
1520
+ }
1521
+ this.persistenceBusyState.set(false);
1522
+ if (!this.destroyRef.destroyed) {
1523
+ this.finalizeReset();
1524
+ }
1525
+ }
1526
+ catch (error) {
1527
+ this.persistenceBusyState.set(false);
1528
+ this.handlePersistenceFailure(error, 'clear');
1529
+ }
1530
+ }
859
1531
  onApply() {
860
1532
  if (!this.canApply)
861
1533
  return;
@@ -864,6 +1536,7 @@ class SettingsPanelComponent {
864
1536
  // publish a preview based only on the state captured before validation.
865
1537
  if (value === undefined || !this.isValid || this.isBusy || !this.interactionActive)
866
1538
  return;
1539
+ this.saveFailedPendingRetry = false;
867
1540
  this.ref.apply(value);
868
1541
  // Applying can synchronously clear the editor's draft. Saving still needs
869
1542
  // to invoke the provider again, never replay a cached geometry request.
@@ -873,31 +1546,94 @@ class SettingsPanelComponent {
873
1546
  onSave() {
874
1547
  if (!this.canSave)
875
1548
  return;
1549
+ this.dismissSaveError();
876
1550
  const instance = this.contentRef?.instance;
877
- const result = instance?.onSave?.();
878
- if (isObservable(result)) {
879
- firstValueFrom(result)
880
- .then((value) => this.emitSave(value))
881
- .catch(() => { });
1551
+ let rawResult;
1552
+ try {
1553
+ const result = instance?.onSave?.();
1554
+ rawResult =
1555
+ result !== undefined || isObservable(result) || result instanceof Promise
1556
+ ? result
1557
+ : instance?.getSettingsValue?.();
882
1558
  }
883
- else if (result instanceof Promise) {
884
- result.then((value) => this.emitSave(value)).catch(() => { });
1559
+ catch (error) {
1560
+ this.handlePersistenceFailure(error, 'save');
1561
+ return;
885
1562
  }
886
- else if (result !== undefined) {
887
- this.emitSave(result);
1563
+ if (isObservable(rawResult) || rawResult instanceof Promise) {
1564
+ void this.runAsyncSaveFlow(rawResult, false);
1565
+ return;
888
1566
  }
889
- else {
890
- const value = instance?.getSettingsValue?.();
1567
+ if (!this.canProceedWithSave(rawResult)) {
1568
+ return;
1569
+ }
1570
+ if (!this.persistSaveHandler) {
1571
+ this.emitSave(rawResult);
1572
+ return;
1573
+ }
1574
+ void this.runAsyncSaveFlow(rawResult, true);
1575
+ }
1576
+ async runAsyncSaveFlow(rawResult, alreadyResolved) {
1577
+ this.persistenceBusyState.set(true);
1578
+ this.cdr.markForCheck();
1579
+ try {
1580
+ const value = alreadyResolved
1581
+ ? rawResult
1582
+ : await this.awaitResult(rawResult);
1583
+ if (!this.canProceedWithSave(value)) {
1584
+ this.persistenceBusyState.set(false);
1585
+ this.cdr.markForCheck();
1586
+ return;
1587
+ }
1588
+ if (this.persistSaveHandler) {
1589
+ const gateError = this.checkWriteGate('save');
1590
+ if (gateError) {
1591
+ this.persistenceBusyState.set(false);
1592
+ this.handlePersistenceFailure(gateError, 'save');
1593
+ return;
1594
+ }
1595
+ const persisted = this.persistSaveHandler(value);
1596
+ if (isObservable(persisted) || persisted instanceof Promise) {
1597
+ await this.awaitResult(persisted);
1598
+ }
1599
+ if (!this.canProceedWithSave(value)) {
1600
+ this.persistenceBusyState.set(false);
1601
+ this.cdr.markForCheck();
1602
+ return;
1603
+ }
1604
+ }
1605
+ this.persistenceBusyState.set(false);
891
1606
  this.emitSave(value);
892
1607
  }
1608
+ catch (error) {
1609
+ this.persistenceBusyState.set(false);
1610
+ this.handlePersistenceFailure(error, 'save');
1611
+ }
1612
+ }
1613
+ awaitResult(result) {
1614
+ if (isObservable(result)) {
1615
+ return firstValueFrom(result);
1616
+ }
1617
+ if (result instanceof Promise) {
1618
+ return result;
1619
+ }
1620
+ return Promise.resolve(result);
1621
+ }
1622
+ canProceedWithSave(value) {
1623
+ return (value !== undefined &&
1624
+ this.isValid &&
1625
+ !this.providerBusyState() &&
1626
+ this.interactionActive &&
1627
+ !this.destroyRef.destroyed);
893
1628
  }
894
1629
  emitSave(value) {
895
1630
  // Recheck after synchronous validation or asynchronous completion. Dirty
896
1631
  // may legitimately be cleared by a successful provider; it is not a veto.
897
- if (value === undefined || !this.isValid || this.isBusy || !this.interactionActive || this.destroyRef.destroyed)
1632
+ if (!this.canProceedWithSave(value) || this.isBusy)
898
1633
  return;
899
1634
  this.lastSavedAt = Date.now();
900
1635
  this.hasAppliedChanges = false;
1636
+ this.saveFailedPendingRetry = false;
901
1637
  this.isDirty = false;
902
1638
  this.ref.save(value);
903
1639
  this.cdr.markForCheck();
@@ -1011,13 +1747,19 @@ class SettingsPanelComponent {
1011
1747
  }
1012
1748
  }
1013
1749
  onCancel() {
1750
+ if (this.isBusy || this.confirmDialogOpen) {
1751
+ return;
1752
+ }
1014
1753
  this.requestClose('cancel')
1015
- .pipe(filter((confirmed) => confirmed))
1754
+ .pipe(filter((confirmed) => Boolean(confirmed)), takeUntilDestroyed(this.destroyRef))
1016
1755
  .subscribe(() => {
1017
1756
  this.ref.close('cancel');
1018
1757
  });
1019
1758
  }
1020
1759
  requestClose(reason) {
1760
+ if (this.isBusy || this.confirmDialogOpen) {
1761
+ return of(false);
1762
+ }
1021
1763
  if (this.previewing) {
1022
1764
  this.returnFromPreview();
1023
1765
  if (reason === 'esc' || reason === 'backdrop')
@@ -1034,11 +1776,11 @@ class SettingsPanelComponent {
1034
1776
  }));
1035
1777
  }
1036
1778
  handleKeydown(event) {
1037
- if (!this.interactionActive) {
1779
+ if (!this.interactionActive || this.confirmDialogOpen) {
1038
1780
  return;
1039
1781
  }
1040
1782
  if (event.key === 'Escape') {
1041
- if (this.shouldDeferEscape(event)) {
1783
+ if (this.isBusy || this.shouldDeferEscape(event)) {
1042
1784
  return;
1043
1785
  }
1044
1786
  event.preventDefault();
@@ -1048,13 +1790,17 @@ class SettingsPanelComponent {
1048
1790
  this.onCancel();
1049
1791
  }
1050
1792
  else if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) {
1051
- event.preventDefault();
1052
- this.onSave();
1793
+ if (this.canSave) {
1794
+ event.preventDefault();
1795
+ this.onSave();
1796
+ }
1053
1797
  }
1054
1798
  else if ((event.key === 's' || event.key === 'S') &&
1055
1799
  (event.ctrlKey || event.metaKey)) {
1056
- event.preventDefault();
1057
- this.onSave();
1800
+ if (this.canSave) {
1801
+ event.preventDefault();
1802
+ this.onSave();
1803
+ }
1058
1804
  }
1059
1805
  }
1060
1806
  shouldDeferEscape(event) {
@@ -1130,9 +1876,12 @@ class SettingsPanelComponent {
1130
1876
  }
1131
1877
  }
1132
1878
  confirmDiscardIfNeeded() {
1133
- if (!this.isDirty) {
1879
+ if (!this.isDirty && !this.saveFailedPendingRetry) {
1134
1880
  return of(true);
1135
1881
  }
1882
+ if (this.confirmDialogOpen) {
1883
+ return of(false);
1884
+ }
1136
1885
  const dialogData = {
1137
1886
  title: this.tx('Discard unsaved draft'),
1138
1887
  message: this.tx(this.hasAppliedChanges
@@ -1143,12 +1892,16 @@ class SettingsPanelComponent {
1143
1892
  type: 'warning',
1144
1893
  icon: 'warning',
1145
1894
  };
1895
+ this.confirmDialogOpen = true;
1146
1896
  return this.dialog
1147
1897
  .open(ConfirmDialogComponent, { data: dialogData, autoFocus: false })
1148
- .afterClosed();
1898
+ .afterClosed()
1899
+ .pipe(finalize(() => {
1900
+ this.confirmDialogOpen = false;
1901
+ }), map((confirmed) => Boolean(confirmed)), takeUntilDestroyed(this.destroyRef));
1149
1902
  }
1150
1903
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SettingsPanelComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.MatDialog }, { token: i0.ElementRef }, { token: i1$1.OverlayContainer }], target: i0.ɵɵFactoryTarget.Component });
1151
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: SettingsPanelComponent, isStandalone: true, selector: "praxis-settings-panel", host: { listeners: { "document:keydown": "handleKeydown($event)", "document:pointermove": "onDocumentPointerMove($event)", "document:pointerup": "onDocumentPointerEnd($event)", "document:pointercancel": "onDocumentPointerEnd($event)" } }, providers: [providePraxisSettingsPanelI18n()], viewQueries: [{ propertyName: "focusTrap", first: true, predicate: CdkTrapFocus, descendants: true }, { propertyName: "contentHost", first: true, predicate: ["contentHost"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div\n class=\"settings-panel\"\n data-testid=\"settings-panel-root\"\n [class.expanded]=\"expanded\"\n [class.settings-panel--preview]=\"previewing\"\n [class.is-resizable]=\"showResizeHandle\"\n [ngStyle]=\"panelInlineStyles\"\n role=\"dialog\"\n [attr.aria-modal]=\"interactionActive ? 'true' : null\"\n [attr.aria-hidden]=\"interactionActive ? null : 'true'\"\n [attr.inert]=\"interactionActive ? null : ''\"\n [attr.aria-labelledby]=\"previewing ? titleId + '-preview' : titleId\"\n [cdkTrapFocus]=\"interactionActive\"\n [cdkTrapFocusAutoCapture]=\"true\"\n >\n @if (showResizeHandle && !previewing) {\n <div\n class=\"settings-panel__resize-handle\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"resizeHandleLabel\"\n (pointerdown)=\"onResizeHandlePointerDown($event)\"\n (keydown)=\"onResizeHandleKeydown($event)\"\n ></div>\n }\n @if (previewing) {\n <section class=\"settings-panel-preview-bar\" data-testid=\"settings-panel-preview-bar\">\n <div><strong [id]=\"titleId + '-preview'\">{{ tx('Page preview') }}</strong><p>{{ tx('Inspect the result. Return to keep editing; nothing is saved here.') }}</p></div>\n <button mat-flat-button type=\"button\" data-testid=\"settings-panel-return\" (click)=\"returnFromPreview()\">{{ tx('Back to settings') }}</button>\n </section>\n }\n <header class=\"settings-panel-header\" [hidden]=\"previewing\">\n <h2 class=\"settings-panel-title\" [id]=\"titleId\">\n @if (titleIcon) {\n <mat-icon class=\"title-icon\" [praxisIcon]=\"titleIcon\"></mat-icon>\n }\n <span>{{ title }}</span>\n </h2>\n <span class=\"spacer\"></span>\n @if (previewTarget) {\n <button mat-stroked-button type=\"button\" data-testid=\"settings-panel-preview\" [disabled]=\"!canInspectPreview\" (click)=\"showPreview()\">\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'visibility'\"></mat-icon>{{ tx('View result') }}\n </button>\n }\n <button\n [praxisIconButton]=\"expanded ? 'close_fullscreen' : 'open_in_full'\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-toggle-expand\"\n [attr.aria-label]=\"expanded ? tx('Collapse panel') : tx('Expand panel')\"\n [attr.aria-expanded]=\"expanded\"\n [matTooltip]=\"expanded ? tx('Collapse panel') : tx('Expand panel')\"\n (click)=\"toggleExpand()\"\n ></button>\n <button\n praxisIconButton=\"close\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-close-icon\"\n [attr.aria-label]=\"tx('Close')\"\n [matTooltip]=\"tx('Close')\"\n (click)=\"onCancel()\"\n ></button>\n </header>\n @if (showStatusMessage && !previewing) {\n <div\n class=\"settings-panel-status\"\n [attr.data-status]=\"statusTone\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <mat-icon\n aria-hidden=\"true\"\n [praxisIcon]=\"\n statusTone === 'dirty' || statusTone === 'invalid'\n ? 'warning'\n : statusTone === 'saved'\n ? 'check_circle'\n : statusTone === 'busy'\n ? 'autorenew'\n : 'info'\n \"\n ></mat-icon>\n <span>{{ statusMessage }}</span>\n </div>\n }\n <div class=\"settings-panel-body\" [hidden]=\"previewing\">\n <ng-template #contentHost></ng-template>\n </div>\n <footer class=\"settings-panel-footer\" [hidden]=\"previewing\">\n <button\n mat-button\n type=\"button\"\n data-testid=\"settings-panel-reset\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onReset()\"\n [disabled]=\"isBusy\"\n >\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'restart_alt'\"></mat-icon>\n <span>{{ tx('Reset') }}</span>\n </button>\n <span class=\"spacer\"></span>\n <button\n mat-button\n type=\"button\"\n data-testid=\"settings-panel-cancel\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onCancel()\"\n [disabled]=\"isBusy\"\n >\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'close'\"></mat-icon>\n <span>{{ tx('Cancel') }}</span>\n </button>\n <button\n mat-stroked-button\n type=\"button\"\n data-testid=\"settings-panel-apply\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onApply()\"\n [disabled]=\"!canApply\"\n [matTooltip]=\"applySaveDisabledReason\"\n [matTooltipDisabled]=\"canApply || !diagnostics.showDisabledReason\"\n [attr.aria-busy]=\"isBusy\"\n [attr.aria-label]=\"applyActionLabel || 'Apply'\"\n >\n @if (showBusyIndicator) {\n <mat-progress-spinner\n mode=\"indeterminate\"\n diameter=\"20\"\n ></mat-progress-spinner>\n }\n @if (!showBusyIndicator) {\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'done'\"></mat-icon>\n <span class=\"settings-panel-action-label settings-panel-action-label--apply\">{{ applyActionLabel }}</span>\n }\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n type=\"button\"\n data-testid=\"settings-panel-save\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onSave()\"\n [disabled]=\"!canSave\"\n [matTooltip]=\"applySaveDisabledReason\"\n [matTooltipDisabled]=\"canSave || !diagnostics.showDisabledReason\"\n [attr.aria-busy]=\"isBusy\"\n [attr.aria-label]=\"saveActionLabel || 'Save & Close'\"\n >\n @if (showBusyIndicator) {\n <mat-progress-spinner\n mode=\"indeterminate\"\n diameter=\"20\"\n ></mat-progress-spinner>\n }\n @if (!showBusyIndicator) {\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'save'\"></mat-icon>\n <span class=\"settings-panel-action-label settings-panel-action-label--save\">{{ saveActionLabel }}</span>\n }\n </button>\n </footer>\n</div>\n", styles: ["@charset \"UTF-8\";praxis-settings-panel{display:block;height:100%;width:100%;min-width:0;flex:1 1 auto;box-sizing:border-box}praxis-settings-panel .settings-panel{position:relative;container:settings-panel-shell/inline-size;--pfx-settings-panel-surface-container: var( --md-sys-color-surface-container, #ffffff );--pfx-settings-panel-surface-container-high: var( --md-sys-color-surface-container-high, #f7f7f7 );--pfx-settings-panel-surface-container-low: var( --md-sys-color-surface-container-low, #f2f4f7 );--pfx-settings-panel-surface: var(--md-sys-color-surface, #ffffff);--pfx-settings-panel-on-surface: var(--md-sys-color-on-surface, #111827);--pfx-settings-panel-on-surface-variant: var( --md-sys-color-on-surface-variant, rgba(17, 24, 39, .72) );--pfx-settings-panel-outline: var( --md-sys-color-outline, rgba(15, 23, 42, .24) );--pfx-settings-panel-outline-variant: var( --md-sys-color-outline-variant, rgba(15, 23, 42, .12) );--pfx-settings-panel-primary: var(--md-sys-color-primary, #2563eb);--pfx-settings-panel-primary-container: var( --md-sys-color-primary-container, rgba(37, 99, 235, .14) );--pfx-settings-panel-on-primary-container: var( --md-sys-color-on-primary-container, #0f172a );--pfx-settings-panel-secondary: var( --md-sys-color-secondary, var(--pfx-settings-panel-primary) );--pfx-settings-panel-error: var(--md-sys-color-error, #b3261e);--pfx-settings-panel-error-container: var( --md-sys-color-error-container, rgba(179, 38, 30, .14) );display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto 1fr auto;grid-template-areas:\"header\" \"status\" \"body\" \"footer\";height:100%;background:var(--pfx-settings-panel-surface-container);color:var(--pfx-settings-panel-on-surface);border-left:1px solid var(--pfx-settings-panel-outline-variant);width:100%;max-width:100%;min-width:0;box-sizing:border-box;box-shadow:var(--pfx-settings-panel-elevation, var(--md-sys-elevation-level2, 0 8px 24px rgba(0, 0, 0, .16)));overflow:hidden}praxis-settings-panel .settings-panel__resize-handle{position:absolute;inset:0 auto 0 0;width:12px;cursor:col-resize;touch-action:none;z-index:3;outline:none}praxis-settings-panel .settings-panel__resize-handle:before{content:\"\";position:absolute;inset:0 auto 0 4px;width:2px;background:transparent;transition:background-color var(--pfx-side-panel-motion-duration, .16s) ease,opacity var(--pfx-side-panel-motion-duration, .16s) ease;opacity:0}praxis-settings-panel .settings-panel.is-resizable:hover .settings-panel__resize-handle:before,praxis-settings-panel .settings-panel__resize-handle:focus-visible:before{opacity:1;background:var(--pfx-settings-panel-outline)}praxis-settings-panel .settings-panel-header{grid-area:header;display:flex;align-items:center;gap:var(--pfx-settings-panel-header-gap, 8px);padding:12px var(--pfx-settings-panel-header-padding-x, 20px);min-height:var(--pfx-settings-panel-header-height, 64px);border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-high);box-shadow:var(--pfx-settings-panel-header-shadow, var(--md-sys-elevation-level1, 0 2px 6px rgba(0, 0, 0, .08)));flex-shrink:0;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-header .spacer{flex:1 1 auto;min-width:0}praxis-settings-panel .settings-panel-status{grid-area:status;display:flex;align-items:center;gap:8px;min-height:36px;padding:6px var(--pfx-settings-panel-status-padding-x, 20px);border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-high);color:var(--pfx-settings-panel-on-surface);font-size:.85rem;font-weight:500;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-status mat-icon{width:18px;height:18px;font-size:18px}praxis-settings-panel .settings-panel-status[data-status=dirty],praxis-settings-panel .settings-panel-status[data-status=invalid]{color:var(--pfx-settings-panel-error);background:color-mix(in srgb,var(--pfx-settings-panel-error-container) 30%,var(--pfx-settings-panel-surface-container-high))}praxis-settings-panel .settings-panel-status[data-status=saved]{color:var(--pfx-settings-panel-primary);background:color-mix(in srgb,var(--pfx-settings-panel-primary-container) 28%,var(--pfx-settings-panel-surface-container-high))}praxis-settings-panel .settings-panel-body{grid-area:body;overflow-y:auto;overflow-x:hidden;scroll-padding-top:var(--pfx-settings-panel-scroll-padding-start, 16px);scroll-padding-bottom:var(--pfx-settings-panel-scroll-padding-end, 88px);min-height:0;padding:var(--pfx-settings-panel-body-padding, 8px 16px 24px);background:var(--pfx-settings-panel-surface);display:flex;flex-direction:column;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-body>*{min-width:0;max-width:100%}praxis-settings-panel .settings-panel-content{display:block;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-content>*{min-width:0;max-width:100%;box-sizing:border-box}praxis-settings-panel .settings-panel-footer{grid-area:footer;border-top:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-high);box-shadow:var(--pfx-settings-panel-footer-shadow, var(--md-sys-elevation-level1, 0 -2px 6px rgba(0, 0, 0, .08)));display:flex;align-items:center;flex-wrap:wrap;padding:var(--pfx-settings-panel-footer-padding, 12px 20px);column-gap:var(--pfx-settings-panel-footer-gap, 12px);row-gap:8px;flex-shrink:0;min-width:0;max-width:100%}praxis-settings-panel .spacer{flex:1}praxis-settings-panel .settings-panel-title{display:inline-flex;align-items:center;flex:1 1 auto;gap:var(--pfx-settings-panel-title-gap, 8px);font-weight:700;line-height:1.2;letter-spacing:.2px;margin:0;min-width:0;overflow:visible;white-space:normal}praxis-settings-panel .settings-panel-title span{min-width:0;overflow:visible;white-space:normal}praxis-settings-panel .settings-panel-title mat-icon{color:var(--pfx-settings-panel-primary)}praxis-settings-panel .settings-panel-title .title-icon{width:20px;height:20px;font-size:20px}praxis-settings-panel .settings-panel-footer button{display:inline-flex;align-items:center}praxis-settings-panel .settings-panel-footer button .mat-icon{flex:0 0 20px;font-size:20px;width:20px;height:20px;line-height:1;display:inline-flex;align-items:center;justify-content:center;overflow:hidden}praxis-settings-panel .settings-panel-footer .mat-button-wrapper{display:inline-flex;align-items:center;gap:var(--pfx-settings-panel-button-gap, 8px)}praxis-settings-panel .settings-panel-footer .mat-progress-spinner{margin-right:8px}praxis-settings-panel .settings-panel-footer .mat-flat-button[color=primary]{font-weight:600}praxis-settings-panel .settings-panel-footer .mdc-button__label{display:inline-flex;align-items:center;gap:var(--pfx-settings-panel-button-gap, 8px);line-height:1}praxis-settings-panel .settings-panel-footer .mdc-button__label>span{display:inline-flex;align-items:center;line-height:1}praxis-settings-panel .settings-panel-footer .mdc-button__label .mat-icon{display:inline-flex;align-items:center;justify-content:center;line-height:1}@container settings-panel-shell (max-width: 520px){praxis-settings-panel .settings-panel-footer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;padding:10px 12px;column-gap:8px}praxis-settings-panel .settings-panel-footer .spacer{display:none}praxis-settings-panel .settings-panel-footer button{justify-content:center;width:100%;min-width:0;min-height:44px;height:auto;padding:8px}praxis-settings-panel .settings-panel-action-label{white-space:normal;overflow-wrap:anywhere;text-align:center}praxis-settings-panel .settings-panel-footer .mdc-button__label{min-width:0;max-width:100%}praxis-settings-panel .settings-panel-footer .mdc-button__label>span{min-width:0;line-height:1.25}}@container settings-panel-shell (max-width: 280px){praxis-settings-panel .settings-panel-footer{grid-template-columns:minmax(0,1fr)}}praxis-settings-panel .settings-panel .mat-divider{background-color:var(--pfx-settings-panel-outline-variant)!important}praxis-settings-panel .settings-panel .mat-expansion-panel{background:var(--pfx-settings-panel-surface-container)!important;border:1px solid var(--pfx-settings-panel-outline-variant);border-radius:var(--md-sys-shape-corner-medium, 12px);box-shadow:var(--md-sys-elevation-level1, 0 2px 8px rgba(0, 0, 0, .08));color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel-header{background:var(--pfx-settings-panel-surface-container)!important;color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-content{color:var(--pfx-settings-panel-on-surface);flex-wrap:wrap;gap:4px 12px;min-width:0;overflow:visible}praxis-settings-panel .settings-panel .mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:hover{background:color-mix(in srgb,var(--pfx-settings-panel-surface-container-high) 84%,var(--pfx-settings-panel-primary) 16%)}praxis-settings-panel .settings-panel .mat-expansion-panel.mat-expanded>.mat-expansion-panel-header{background:var(--pfx-settings-panel-surface-container-high)!important}praxis-settings-panel .settings-panel .mat-expansion-panel-header mat-icon,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-icon{color:var(--pfx-settings-panel-on-surface)!important}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-title,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description{color:var(--pfx-settings-panel-on-surface);min-width:0;overflow:visible;white-space:normal}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description{color:var(--pfx-settings-panel-on-surface-variant);flex-wrap:wrap;gap:8px}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-title>*,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description>*{color:inherit}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-title small,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description small{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-indicator,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-indicator:after{color:var(--pfx-settings-panel-on-surface-variant);border-color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-expansion-panel .mat-action-row{border-top-color:var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .mat-accordion,praxis-settings-panel .settings-panel .mat-accordion .mat-expansion-panel-spacing{background:transparent!important}praxis-settings-panel .settings-panel .mat-expansion-panel-content,praxis-settings-panel .settings-panel .mat-expansion-panel-content-wrapper,praxis-settings-panel .settings-panel .mat-expansion-panel-body{background:var(--pfx-settings-panel-surface-container)!important;color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel .mat-expansion-panel-body{padding:8px}praxis-settings-panel .settings-panel .mat-expansion-panel .mat-expansion-panel-body>*{color:inherit}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header{border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab{min-width:0}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab .mdc-tab__text-label{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab:hover .mdc-tab__text-label,praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab:focus .mdc-tab__text-label{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header-pagination{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header-pagination-chevron{border-color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header-pagination:not(.mat-mdc-tab-header-pagination-disabled):hover{background:color-mix(in srgb,var(--pfx-settings-panel-surface-container-high) 84%,var(--pfx-settings-panel-primary) 16%)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab-indicator__content--underline{border-color:var(--pfx-settings-panel-primary)}praxis-settings-panel .settings-panel .mat-mdc-card{background:var(--pfx-settings-panel-surface-container-low);border:1px solid var(--pfx-settings-panel-outline-variant);color:var(--pfx-settings-panel-on-surface);box-shadow:var(--md-sys-elevation-level1, 0 2px 8px rgba(0, 0, 0, .08))}praxis-settings-panel .settings-panel .mat-mdc-card-subtitle,praxis-settings-panel .settings-panel .mat-mdc-card-content{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-card-title{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-form-field{width:100%;--mdc-filled-text-field-container-color: var( --pfx-settings-panel-surface-container );--mdc-filled-text-field-hover-container-color: var( --pfx-settings-panel-surface-container-high );--mdc-filled-text-field-focus-container-color: var( --pfx-settings-panel-surface-container-high );--mdc-filled-text-field-active-indicator-color: var( --pfx-settings-panel-outline-variant );--mdc-filled-text-field-hover-active-indicator-color: var( --pfx-settings-panel-secondary );--mdc-filled-text-field-focus-active-indicator-color: var( --pfx-settings-panel-primary );--mdc-filled-text-field-label-text-color: var( --pfx-settings-panel-on-surface-variant );--mdc-filled-text-field-focus-label-text-color: var( --pfx-settings-panel-primary );--mdc-filled-text-field-input-text-color: var( --pfx-settings-panel-on-surface );--mdc-filled-text-field-caret-color: var(--pfx-settings-panel-primary);--mdc-outlined-text-field-outline-color: var( --pfx-settings-panel-outline-variant );--mdc-outlined-text-field-hover-outline-color: var( --pfx-settings-panel-secondary );--mdc-outlined-text-field-focus-outline-color: var( --pfx-settings-panel-primary );--mdc-outlined-text-field-label-text-color: var( --pfx-settings-panel-on-surface-variant );--mdc-outlined-text-field-focus-label-text-color: var( --pfx-settings-panel-primary );--mdc-outlined-text-field-input-text-color: var( --pfx-settings-panel-on-surface );--mdc-outlined-text-field-caret-color: var(--pfx-settings-panel-primary);--mat-form-field-focus-select-arrow-color: var( --pfx-settings-panel-primary );--mat-form-field-enabled-select-arrow-color: var( --pfx-settings-panel-on-surface-variant )}praxis-settings-panel .settings-panel .mdc-text-field--filled{background-color:var(--pfx-settings-panel-surface-container)!important;border-radius:var(--md-sys-shape-corner-small, 8px) var(--md-sys-shape-corner-small, 8px) 0 0}praxis-settings-panel .settings-panel .mat-mdc-text-field-wrapper,praxis-settings-panel .settings-panel .mat-mdc-form-field-flex,praxis-settings-panel .settings-panel .mat-mdc-form-field-infix,praxis-settings-panel .settings-panel .mat-mdc-form-field-focus-overlay{background:var(--pfx-settings-panel-surface-container)!important;color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-form-field-focus-overlay{opacity:0}praxis-settings-panel .settings-panel .mdc-text-field--filled .mdc-text-field__input,praxis-settings-panel .settings-panel .mdc-text-field--filled .mdc-floating-label,praxis-settings-panel .settings-panel .mat-mdc-select-value,praxis-settings-panel .settings-panel .mat-mdc-select-arrow,praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-floating-label{color:var(--pfx-settings-panel-on-surface-variant)!important}praxis-settings-panel .settings-panel .mdc-text-field--filled.mdc-text-field--focused .mdc-floating-label,praxis-settings-panel .settings-panel .mdc-text-field--filled .mdc-text-field__input{color:var(--pfx-settings-panel-on-surface)!important}praxis-settings-panel .settings-panel .mat-mdc-form-field input,praxis-settings-panel .settings-panel .mat-mdc-form-field textarea,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field__input{color:var(--pfx-settings-panel-on-surface)!important}praxis-settings-panel .settings-panel .mat-mdc-form-field-subscript-wrapper,praxis-settings-panel .settings-panel .mat-mdc-form-field-hint-wrapper,praxis-settings-panel .settings-panel .mat-mdc-form-field-error-wrapper,praxis-settings-panel .settings-panel .mat-mdc-hint{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-button-toggle-group{border-color:var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .mat-button-toggle{background:var(--pfx-settings-panel-surface-container-low);color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-button-toggle+.mat-button-toggle{border-left-color:var(--pfx-settings-panel-outline-variant)}praxis-settings-panel .settings-panel .mat-button-toggle-checked{background:var(--pfx-settings-panel-primary-container)!important;color:var(--pfx-settings-panel-on-primary-container)!important}praxis-settings-panel .settings-panel .mat-button-toggle .mat-icon,praxis-settings-panel .settings-panel .mat-button-toggle-checked .mat-icon{color:inherit}praxis-settings-panel .settings-panel .mat-mdc-slide-toggle .mdc-label{color:var(--pfx-settings-panel-on-surface)}.settings-panel{grid-template-columns:minmax(0,1fr);min-width:0;max-width:100%}.settings-panel-body{overflow-x:hidden;min-width:0}.settings-panel-body>*{min-width:0;max-width:100%}.praxis-settings-panel-backdrop{background:var(--pfx-backdrop, rgba(8, 15, 26, .42));backdrop-filter:blur(var(--pfx-backdrop-blur, 6px)) saturate(110%);-webkit-backdrop-filter:blur(var(--pfx-backdrop-blur, 6px)) saturate(110%)}.praxis-settings-panel-pane{position:fixed!important;top:0!important;right:0!important;display:flex!important;align-items:stretch!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;z-index:var(--praxis-layer-settings-panel, 1220)!important;transition:width var(--pfx-side-panel-motion-duration-enter, .3s) var(--pfx-side-panel-motion-easing-enter, ease)}.praxis-settings-panel-pane .settings-panel{pointer-events:auto}@media(prefers-reduced-motion:reduce){.praxis-settings-panel-pane{transition:none}}.praxis-settings-panel-pane.praxis-settings-panel-pane--preview{top:auto!important;bottom:12px!important;right:12px!important;height:auto!important;width:min(560px,100vw - 24px)!important;min-width:0!important;transition:none}.praxis-settings-panel-backdrop.praxis-settings-panel-backdrop--preview{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}.praxis-settings-preview-target{outline:2px solid var(--md-sys-color-primary);outline-offset:3px}praxis-settings-panel .settings-panel [hidden]{display:none!important}praxis-settings-panel .settings-panel--preview{height:auto;min-height:0;grid-template-rows:auto;border-radius:16px}praxis-settings-panel .settings-panel-preview-bar{display:flex;align-items:center;gap:16px;padding:16px;color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel-preview-bar p{margin:4px 0 0;color:var(--pfx-settings-panel-on-surface-variant);font-size:.875rem}praxis-settings-panel .settings-panel-preview-bar button{flex-shrink:0}@container settings-panel-shell (max-width: 599px){praxis-settings-panel .settings-panel-header:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:start}praxis-settings-panel .settings-panel-header .spacer{display:none}praxis-settings-panel .settings-panel-header .settings-panel-title{grid-column:1;grid-row:1;overflow-wrap:anywhere}praxis-settings-panel .settings-panel-header [data-testid=settings-panel-toggle-expand]{grid-column:2;grid-row:1}praxis-settings-panel .settings-panel-header [data-testid=settings-panel-close-icon]{grid-column:3;grid-row:1}praxis-settings-panel .settings-panel-header [data-testid=settings-panel-preview]{grid-column:1/-1;grid-row:2;justify-self:start;max-width:100%}praxis-settings-panel .settings-panel-preview-bar{flex-direction:column;align-items:stretch;gap:8px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.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: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatDialogModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1904
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: SettingsPanelComponent, isStandalone: true, selector: "praxis-settings-panel", host: { listeners: { "document:keydown": "handleKeydown($event)", "document:pointermove": "onDocumentPointerMove($event)", "document:pointerup": "onDocumentPointerEnd($event)", "document:pointercancel": "onDocumentPointerEnd($event)" } }, providers: [providePraxisSettingsPanelI18n()], viewQueries: [{ propertyName: "focusTrap", first: true, predicate: CdkTrapFocus, descendants: true }, { propertyName: "contentHost", first: true, predicate: ["contentHost"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "saveErrorBanner", first: true, predicate: ["saveErrorBanner"], descendants: true }], ngImport: i0, template: "<div\n class=\"settings-panel\"\n data-testid=\"settings-panel-root\"\n [class.expanded]=\"expanded\"\n [class.settings-panel--preview]=\"previewing\"\n [class.is-resizable]=\"showResizeHandle\"\n [ngStyle]=\"panelInlineStyles\"\n role=\"dialog\"\n [attr.aria-modal]=\"interactionActive ? 'true' : null\"\n [attr.aria-hidden]=\"interactionActive ? null : 'true'\"\n [attr.inert]=\"interactionActive ? null : ''\"\n [attr.aria-labelledby]=\"previewing ? titleId + '-preview' : titleId\"\n [cdkTrapFocus]=\"interactionActive\"\n [cdkTrapFocusAutoCapture]=\"true\"\n >\n @if (showResizeHandle && !previewing) {\n <div\n class=\"settings-panel__resize-handle\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"resizeHandleLabel\"\n (pointerdown)=\"onResizeHandlePointerDown($event)\"\n (keydown)=\"onResizeHandleKeydown($event)\"\n ></div>\n }\n @if (previewing) {\n <section class=\"settings-panel-preview-bar\" data-testid=\"settings-panel-preview-bar\">\n <div><strong [id]=\"titleId + '-preview'\">{{ tx('Page preview') }}</strong><p>{{ tx('Inspect the result. Return to keep editing; nothing is saved here.') }}</p></div>\n <button mat-flat-button type=\"button\" data-testid=\"settings-panel-return\" (click)=\"returnFromPreview()\">{{ tx('Back to settings') }}</button>\n </section>\n }\n <header class=\"settings-panel-header\" [hidden]=\"previewing\">\n <h2 class=\"settings-panel-title\" [id]=\"titleId\">\n @if (titleIcon) {\n <mat-icon class=\"title-icon\" [praxisIcon]=\"titleIcon\"></mat-icon>\n }\n <span>{{ title }}</span>\n </h2>\n <span class=\"spacer\"></span>\n @if (previewTarget) {\n <button mat-stroked-button type=\"button\" data-testid=\"settings-panel-preview\" [disabled]=\"!canInspectPreview\" (click)=\"showPreview()\">\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'visibility'\"></mat-icon>{{ tx('View result') }}\n </button>\n }\n <button\n [praxisIconButton]=\"expanded ? 'close_fullscreen' : 'open_in_full'\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-toggle-expand\"\n [attr.aria-label]=\"expanded ? tx('Collapse panel') : tx('Expand panel')\"\n [attr.aria-expanded]=\"expanded\"\n [matTooltip]=\"expanded ? tx('Collapse panel') : tx('Expand panel')\"\n (click)=\"toggleExpand()\"\n ></button>\n <button\n praxisIconButton=\"close\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-close-icon\"\n [disabled]=\"isBusy\"\n [attr.aria-label]=\"tx('Close')\"\n [matTooltip]=\"tx('Close')\"\n (click)=\"onCancel()\"\n ></button>\n </header>\n @if (hasContextNavigation && !previewing) {\n <nav\n class=\"settings-panel-context-nav\"\n data-testid=\"settings-panel-context-nav\"\n [attr.aria-label]=\"tx('Context navigation')\"\n >\n @if (contextNavigation?.targets?.length) {\n <div class=\"settings-panel-context-nav__targets\">\n <button\n praxisIconButton=\"chevron_left\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-prev-target\"\n [disabled]=\"!canSelectPreviousTarget\"\n [attr.aria-label]=\"tx('Previous item')\"\n [matTooltip]=\"tx('Previous item')\"\n (click)=\"selectPreviousTarget()\"\n ></button>\n <select\n #targetSelect\n class=\"settings-panel-context-nav__target-select\"\n data-testid=\"settings-panel-target-select\"\n [disabled]=\"isBusy || !interactionActive\"\n [attr.aria-label]=\"tx('Editing target')\"\n [value]=\"contextNavigation?.activeTargetId || ''\"\n (change)=\"selectContextTarget(targetSelect.value, targetSelect)\"\n >\n @for (target of contextNavigation?.targets || []; track target.id) {\n <option [value]=\"target.id\" [selected]=\"target.id === contextNavigation?.activeTargetId\">\n {{ target.label }}\n </option>\n }\n </select>\n <button\n praxisIconButton=\"chevron_right\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-next-target\"\n [disabled]=\"!canSelectNextTarget\"\n [attr.aria-label]=\"tx('Next item')\"\n [matTooltip]=\"tx('Next item')\"\n (click)=\"selectNextTarget()\"\n ></button>\n </div>\n }\n @if (contextNavigation?.modes?.length) {\n <div\n class=\"settings-panel-context-nav__modes\"\n role=\"group\"\n [attr.aria-label]=\"tx('Editing modes')\"\n >\n @for (mode of contextNavigation?.modes || []; track mode.id) {\n <button\n type=\"button\"\n class=\"settings-panel-context-nav__mode-btn\"\n [class.is-active]=\"mode.id === contextNavigation?.activeModeId\"\n [disabled]=\"mode.disabled || isBusy || !interactionActive\"\n [attr.aria-pressed]=\"mode.id === contextNavigation?.activeModeId\"\n [attr.title]=\"mode.label\"\n [attr.data-testid]=\"'settings-panel-mode-' + mode.id\"\n (click)=\"selectContextMode(mode.id)\"\n >\n {{ mode.label }}\n </button>\n }\n </div>\n }\n </nav>\n }\n @if (showStatusMessage && !previewing) {\n <div\n class=\"settings-panel-status\"\n [attr.data-status]=\"statusTone\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <mat-icon\n aria-hidden=\"true\"\n [praxisIcon]=\"\n statusTone === 'dirty' || statusTone === 'invalid'\n ? 'warning'\n : statusTone === 'saved'\n ? 'check_circle'\n : statusTone === 'busy'\n ? 'autorenew'\n : 'info'\n \"\n ></mat-icon>\n <span>{{ statusMessage }}</span>\n @if (showWriteScopeControls) {\n <span class=\"spacer\"></span>\n <span\n class=\"settings-panel-scope\"\n [attr.data-scope]=\"activeWriteScope\"\n data-testid=\"settings-panel-write-scope\"\n >\n <span class=\"settings-panel-scope__label\">{{ writeScopeLabel }}</span>\n @if (canToggleWriteScope) {\n <button\n mat-stroked-button\n type=\"button\"\n class=\"settings-panel-scope__toggle\"\n data-testid=\"settings-panel-scope-toggle\"\n [matTooltip]=\"writeScopeToggleLabel\"\n (click)=\"toggleWriteScope()\"\n >\n {{ writeScopeToggleLabel }}\n </button>\n }\n @if (canResetPersonalOverride) {\n <button\n mat-button\n type=\"button\"\n class=\"settings-panel-scope__reset\"\n data-testid=\"settings-panel-reset-personal-override\"\n [disabled]=\"isBusy || isConfirmDialogOpen\"\n (click)=\"resetPersonalOverrideToTenant()\"\n >\n {{ tx('Reset to tenant baseline') }}\n </button>\n }\n </span>\n }\n </div>\n }\n @if (!previewing && storageSaveError(); as saveErr) {\n <div\n #saveErrorBanner\n tabindex=\"-1\"\n class=\"settings-panel-save-error\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n data-testid=\"settings-panel-save-error\"\n [attr.data-error-code]=\"saveErr.errorCode || saveErr.status || 'save-error'\"\n [attr.data-correlation-id]=\"saveErr.correlationId || null\"\n >\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'error_outline'\"></mat-icon>\n <div class=\"settings-panel-save-error__content\">\n <p class=\"settings-panel-save-error__message\">{{ formattedSaveErrorMessage }}</p>\n @if (saveErr.detail && saveErr.detail !== formattedSaveErrorMessage && saveErr.detail !== saveErrorFieldMessages.join('; ')) {\n <p class=\"settings-panel-save-error__detail\">{{ saveErr.detail }}</p>\n } @else if (saveErr.title && saveErr.title !== formattedSaveErrorMessage) {\n <p class=\"settings-panel-save-error__detail\">{{ saveErr.title }}</p>\n }\n @if (saveErr.errorCode || saveErr.correlationId) {\n <p class=\"settings-panel-save-error__meta\" data-testid=\"settings-panel-save-error-meta\">\n @if (saveErr.errorCode) {\n <span>{{ tx('Code: {{code}}', { code: saveErr.errorCode }) }}</span>\n }\n @if (saveErr.correlationId) {\n <span>{{ tx('Correlation ID: {{id}}', { id: saveErr.correlationId }) }}</span>\n }\n </p>\n }\n @if (saveErrorFieldMessages.length > 0) {\n <ul class=\"settings-panel-save-error__fields\" data-testid=\"settings-panel-save-error-fields\">\n @for (fieldMsg of saveErrorFieldMessages; track $index) {\n <li>{{ fieldMsg }}</li>\n }\n </ul>\n }\n @if (canSwitchToPersonalScopeFromError) {\n <button\n mat-stroked-button\n type=\"button\"\n class=\"settings-panel-save-error__action\"\n data-testid=\"settings-panel-switch-personal\"\n (click)=\"switchToPersonalScopeFromError()\"\n >\n {{ tx('Switch to personal scope') }}\n </button>\n }\n </div>\n <button\n praxisIconButton=\"close\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-save-error-dismiss\"\n [attr.aria-label]=\"tx('Dismiss error')\"\n (click)=\"dismissSaveError()\"\n ></button>\n </div>\n }\n <div class=\"settings-panel-body\" [hidden]=\"previewing\">\n <ng-template #contentHost></ng-template>\n </div>\n <footer class=\"settings-panel-footer\" [hidden]=\"previewing\">\n <button\n mat-button\n type=\"button\"\n data-testid=\"settings-panel-reset\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onReset()\"\n [disabled]=\"isBusy || isConfirmDialogOpen\"\n >\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'restart_alt'\"></mat-icon>\n <span>{{ tx('Reset') }}</span>\n </button>\n <span class=\"spacer\"></span>\n <button\n mat-button\n type=\"button\"\n data-testid=\"settings-panel-cancel\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onCancel()\"\n [disabled]=\"isBusy || isConfirmDialogOpen\"\n >\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'close'\"></mat-icon>\n <span>{{ tx('Cancel') }}</span>\n </button>\n <button\n mat-stroked-button\n type=\"button\"\n data-testid=\"settings-panel-apply\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onApply()\"\n [disabled]=\"!canApply\"\n [matTooltip]=\"applySaveDisabledReason\"\n [matTooltipDisabled]=\"canApply || !diagnostics.showDisabledReason\"\n [attr.aria-busy]=\"isBusy\"\n [attr.aria-label]=\"applyActionLabel || 'Apply'\"\n >\n @if (showBusyIndicator) {\n <mat-progress-spinner\n mode=\"indeterminate\"\n diameter=\"20\"\n ></mat-progress-spinner>\n }\n @if (!showBusyIndicator) {\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'done'\"></mat-icon>\n <span class=\"settings-panel-action-label settings-panel-action-label--apply\">{{ applyActionLabel }}</span>\n }\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n type=\"button\"\n data-testid=\"settings-panel-save\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onSave()\"\n [disabled]=\"!canSave\"\n [matTooltip]=\"applySaveDisabledReason\"\n [matTooltipDisabled]=\"canSave || !diagnostics.showDisabledReason\"\n [attr.aria-busy]=\"isBusy\"\n [attr.aria-label]=\"saveActionLabel || 'Save & Close'\"\n >\n @if (showBusyIndicator) {\n <mat-progress-spinner\n mode=\"indeterminate\"\n diameter=\"20\"\n ></mat-progress-spinner>\n }\n @if (!showBusyIndicator) {\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'save'\"></mat-icon>\n <span class=\"settings-panel-action-label settings-panel-action-label--save\">{{ saveActionLabel }}</span>\n }\n </button>\n </footer>\n</div>\n", styles: ["@charset \"UTF-8\";praxis-settings-panel{display:block;height:100%;width:100%;min-width:0;flex:1 1 auto;box-sizing:border-box}praxis-settings-panel .settings-panel{position:relative;container:settings-panel-shell/inline-size;--pfx-settings-panel-surface-container: var( --md-sys-color-surface-container, #ffffff );--pfx-settings-panel-surface-container-high: var( --md-sys-color-surface-container-high, #f7f7f7 );--pfx-settings-panel-surface-container-low: var( --md-sys-color-surface-container-low, #f2f4f7 );--pfx-settings-panel-surface: var(--md-sys-color-surface, #ffffff);--pfx-settings-panel-on-surface: var(--md-sys-color-on-surface, #111827);--pfx-settings-panel-on-surface-variant: var( --md-sys-color-on-surface-variant, rgba(17, 24, 39, .72) );--pfx-settings-panel-outline: var( --md-sys-color-outline, rgba(15, 23, 42, .24) );--pfx-settings-panel-outline-variant: var( --md-sys-color-outline-variant, rgba(15, 23, 42, .12) );--pfx-settings-panel-primary: var(--md-sys-color-primary, #2563eb);--pfx-settings-panel-primary-container: var( --md-sys-color-primary-container, rgba(37, 99, 235, .14) );--pfx-settings-panel-on-primary-container: var( --md-sys-color-on-primary-container, #0f172a );--pfx-settings-panel-secondary: var( --md-sys-color-secondary, var(--pfx-settings-panel-primary) );--pfx-settings-panel-error: var(--md-sys-color-error, #b3261e);--pfx-settings-panel-error-container: var( --md-sys-color-error-container, rgba(179, 38, 30, .14) );--pfx-settings-panel-alert-bg: color-mix( in srgb, var(--pfx-settings-panel-error-container) 78%, var(--pfx-settings-panel-surface) );--pfx-settings-panel-alert-fg: var(--pfx-settings-panel-error);--pfx-settings-panel-scope-bg: var(--pfx-settings-panel-surface);--pfx-settings-panel-scope-fg: var(--pfx-settings-panel-on-surface-variant);--pfx-settings-panel-border-radius: 0px;--mat-divider-color: var(--pfx-settings-panel-outline-variant);--mat-expansion-container-background-color: var( --pfx-settings-panel-surface-container );--mat-expansion-container-text-color: var(--pfx-settings-panel-on-surface);--mat-expansion-header-text-color: var(--pfx-settings-panel-on-surface);--mat-expansion-header-description-color: var( --pfx-settings-panel-on-surface-variant );--mat-expansion-header-indicator-color: var( --pfx-settings-panel-on-surface-variant );--mat-button-toggle-selected-state-background-color: var( --pfx-settings-panel-primary-container );--mat-button-toggle-selected-state-text-color: var( --pfx-settings-panel-on-primary-container );display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto 1fr auto;grid-template-areas:\"header\" \"context-nav\" \"status\" \"alert\" \"body\" \"footer\";min-width:0;height:100%;max-width:var(--pfx-settings-panel-max-width, 100%);background:var(--pfx-settings-panel-surface-container);color:var(--pfx-settings-panel-on-surface);border-left:1px solid var(--pfx-settings-panel-outline-variant);border-radius:var(--pfx-settings-panel-border-radius, 0px);width:var(--pfx-settings-panel-width, 100%);box-sizing:border-box;box-shadow:var(--pfx-settings-panel-elevation, var(--md-sys-elevation-level2, 0 8px 24px rgba(0, 0, 0, .16)));overflow:hidden}praxis-settings-panel .settings-panel__resize-handle{position:absolute;inset:0 auto 0 0;width:12px;cursor:col-resize;touch-action:none;z-index:3;outline:none}praxis-settings-panel .settings-panel__resize-handle:before{content:\"\";position:absolute;inset:0 auto 0 4px;width:2px;background:transparent;transition:background-color var(--pfx-side-panel-motion-duration, .16s) ease,opacity var(--pfx-side-panel-motion-duration, .16s) ease;opacity:0}praxis-settings-panel .settings-panel.is-resizable:hover .settings-panel__resize-handle:before,praxis-settings-panel .settings-panel__resize-handle:focus-visible:before{opacity:1;background:var(--pfx-settings-panel-outline)}praxis-settings-panel .settings-panel-header{grid-area:header;display:flex;align-items:center;gap:var(--pfx-settings-panel-header-gap, 8px);padding:12px var(--pfx-settings-panel-header-padding-x, 20px);min-height:var(--pfx-settings-panel-header-height, 64px);border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-high);box-shadow:var(--pfx-settings-panel-header-shadow, var(--md-sys-elevation-level1, 0 2px 6px rgba(0, 0, 0, .08)));flex-shrink:0;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-header .spacer{flex:1 1 auto;min-width:0}praxis-settings-panel .settings-panel-context-nav{grid-area:context-nav;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;padding:8px var(--pfx-settings-panel-header-padding-x, 20px);border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low);min-width:0;max-width:100%}praxis-settings-panel .settings-panel-context-nav__targets{display:flex;align-items:center;gap:4px;min-width:0;flex:1 1 200px}praxis-settings-panel .settings-panel-context-nav__target-select{flex:1 1 auto;min-width:0;min-height:34px;padding:4px 10px;border-radius:8px;border:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface);color:var(--pfx-settings-panel-on-surface);font:inherit;font-size:.84rem;font-weight:600}praxis-settings-panel .settings-panel-context-nav__modes{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px;padding:2px;max-width:100%;border-radius:999px;border:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface)}praxis-settings-panel .settings-panel-context-nav__mode-btn{appearance:none;border:none;background:transparent;color:var(--pfx-settings-panel-on-surface-variant);font:inherit;font-size:.78rem;font-weight:600;padding:5px 12px;border-radius:999px;white-space:nowrap;flex-shrink:0;cursor:pointer;transition:background-color .14s ease,color .14s ease}praxis-settings-panel .settings-panel-context-nav__mode-btn.is-active{background:var(--pfx-settings-panel-primary-container);color:var(--pfx-settings-panel-on-primary-container)}praxis-settings-panel .settings-panel-context-nav__mode-btn:disabled{opacity:.42;cursor:not-allowed}praxis-settings-panel .settings-panel-status{grid-area:status;display:flex;align-items:center;gap:8px;min-height:36px;padding:6px var(--pfx-settings-panel-status-padding-x, 20px);border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-high);color:var(--pfx-settings-panel-on-surface);font-size:.85rem;font-weight:500;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-status mat-icon{width:18px;height:18px;font-size:18px}praxis-settings-panel .settings-panel-status[data-status=dirty],praxis-settings-panel .settings-panel-status[data-status=invalid]{color:var(--pfx-settings-panel-error);background:color-mix(in srgb,var(--pfx-settings-panel-error-container) 30%,var(--pfx-settings-panel-surface-container-high))}praxis-settings-panel .settings-panel-status[data-status=saved]{color:var(--pfx-settings-panel-primary);background:color-mix(in srgb,var(--pfx-settings-panel-primary-container) 28%,var(--pfx-settings-panel-surface-container-high))}praxis-settings-panel .settings-panel-scope{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px;padding:2px 8px;border-radius:999px;border:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-scope-bg);color:var(--pfx-settings-panel-scope-fg);font-size:.75rem;font-weight:600}praxis-settings-panel .settings-panel-scope[data-scope=tenant]{border-color:color-mix(in srgb,var(--pfx-settings-panel-primary) 42%,var(--pfx-settings-panel-outline-variant));background:var(--pfx-settings-panel-primary-container);color:var(--pfx-settings-panel-on-primary-container)}praxis-settings-panel .settings-panel-scope__toggle,praxis-settings-panel .settings-panel-scope__reset{height:24px;line-height:22px;font-size:.72rem;padding:0 8px}praxis-settings-panel .settings-panel-save-error{grid-area:alert;display:flex;align-items:flex-start;gap:10px;padding:10px var(--pfx-settings-panel-status-padding-x, 20px);background:var(--pfx-settings-panel-alert-bg);color:var(--pfx-settings-panel-alert-fg);border-bottom:1px solid color-mix(in srgb,var(--pfx-settings-panel-error) 32%,var(--pfx-settings-panel-outline-variant));font-size:.82rem}praxis-settings-panel .settings-panel-save-error__content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px}praxis-settings-panel .settings-panel-save-error__message{margin:0;font-weight:600;line-height:1.35}praxis-settings-panel .settings-panel-save-error:focus-visible,praxis-settings-panel .settings-panel-save-error:focus{outline:2px solid var(--pfx-settings-panel-error);outline-offset:-2px}praxis-settings-panel .settings-panel-save-error__detail{margin:0;font-size:.78rem;color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel-save-error__meta{margin:2px 0 0;display:flex;flex-wrap:wrap;gap:6px 12px;font-size:.72rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel-save-error__fields{margin:2px 0 0;padding-inline-start:16px;font-size:.78rem;color:var(--pfx-settings-panel-on-surface-variant);display:flex;flex-direction:column;gap:2px}praxis-settings-panel .settings-panel-save-error__action{align-self:flex-start;margin-top:2px}praxis-settings-panel .settings-panel-body{grid-area:body;container-type:inline-size;overflow-y:auto;overflow-x:hidden;scroll-padding-top:var(--pfx-settings-panel-scroll-padding-start, 16px);scroll-padding-bottom:var(--pfx-settings-panel-scroll-padding-end, 88px);min-height:0;padding:var(--pfx-settings-panel-body-padding, 8px 16px 24px);background:var(--pfx-settings-panel-surface);display:flex;flex-direction:column;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-body>*{min-width:0;max-width:100%}praxis-settings-panel .settings-panel-content{display:block;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-content>*{min-width:0;max-width:100%;box-sizing:border-box}praxis-settings-panel .settings-panel-footer{grid-area:footer;border-top:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-high);box-shadow:var(--pfx-settings-panel-footer-shadow, var(--md-sys-elevation-level1, 0 -2px 6px rgba(0, 0, 0, .08)));display:flex;align-items:center;flex-wrap:wrap;padding:var(--pfx-settings-panel-footer-padding, 12px 20px);column-gap:var(--pfx-settings-panel-footer-gap, 12px);row-gap:8px;flex-shrink:0;min-width:0;max-width:100%}praxis-settings-panel .spacer{flex:1}praxis-settings-panel .settings-panel-title{display:inline-flex;align-items:center;flex:1 1 auto;gap:var(--pfx-settings-panel-title-gap, 8px);font-weight:700;line-height:1.2;letter-spacing:.2px;margin:0;min-width:0;overflow:visible;white-space:normal}praxis-settings-panel .settings-panel-title span{min-width:0;overflow:visible;white-space:normal}praxis-settings-panel .settings-panel-title mat-icon{color:var(--pfx-settings-panel-primary)}praxis-settings-panel .settings-panel-title .title-icon{width:20px;height:20px;font-size:20px}praxis-settings-panel .settings-panel-footer button{display:inline-flex;align-items:center}praxis-settings-panel .settings-panel-footer button .mat-icon{flex:0 0 20px;font-size:20px;width:20px;height:20px;line-height:1;display:inline-flex;align-items:center;justify-content:center;overflow:hidden}praxis-settings-panel .settings-panel-footer .mat-button-wrapper{display:inline-flex;align-items:center;gap:var(--pfx-settings-panel-button-gap, 8px)}praxis-settings-panel .settings-panel-footer .mat-progress-spinner{margin-right:8px}praxis-settings-panel .settings-panel-footer .mat-flat-button[color=primary]{font-weight:600}praxis-settings-panel .settings-panel-footer .mdc-button__label{display:inline-flex;align-items:center;gap:var(--pfx-settings-panel-button-gap, 8px);line-height:1}praxis-settings-panel .settings-panel-footer .mdc-button__label>span{display:inline-flex;align-items:center;line-height:1}praxis-settings-panel .settings-panel-footer .mdc-button__label .mat-icon{display:inline-flex;align-items:center;justify-content:center;line-height:1}@container settings-panel-shell (max-width: 520px){praxis-settings-panel .settings-panel-footer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;padding:10px 12px;column-gap:8px}praxis-settings-panel .settings-panel-footer .spacer{display:none}praxis-settings-panel .settings-panel-footer button{justify-content:center;width:100%;min-width:0;min-height:44px;height:auto;padding:8px}praxis-settings-panel .settings-panel-action-label{white-space:normal;overflow-wrap:anywhere;text-align:center}praxis-settings-panel .settings-panel-footer .mdc-button__label{min-width:0;max-width:100%}praxis-settings-panel .settings-panel-footer .mdc-button__label>span{min-width:0;line-height:1.25}}@container settings-panel-shell (max-width: 280px){praxis-settings-panel .settings-panel-footer{grid-template-columns:minmax(0,1fr)}}praxis-settings-panel .settings-panel .mat-divider{background-color:var(--pfx-settings-panel-outline-variant)}praxis-settings-panel .settings-panel .mat-expansion-panel{background:var(--pfx-settings-panel-surface-container);border:1px solid var(--pfx-settings-panel-outline-variant);border-radius:var(--md-sys-shape-corner-medium, 12px);box-shadow:var(--md-sys-elevation-level1, 0 2px 8px rgba(0, 0, 0, .08));color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel-header{background:var(--pfx-settings-panel-surface-container);color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-content{color:var(--pfx-settings-panel-on-surface);flex-wrap:wrap;gap:4px 12px;min-width:0;overflow:visible}praxis-settings-panel .settings-panel .mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:hover{background:color-mix(in srgb,var(--pfx-settings-panel-surface-container-high) 84%,var(--pfx-settings-panel-primary) 16%)}praxis-settings-panel .settings-panel .mat-expansion-panel.mat-expanded>.mat-expansion-panel-header{background:var(--pfx-settings-panel-surface-container-high)}praxis-settings-panel .settings-panel .mat-expansion-panel-header mat-icon,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-icon{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-title,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description{color:var(--pfx-settings-panel-on-surface);min-width:0;overflow:visible;white-space:normal}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description{color:var(--pfx-settings-panel-on-surface-variant);flex-wrap:wrap;gap:8px}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-title>*,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description>*{color:inherit}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-title small,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description small{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-indicator,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-indicator:after{color:var(--pfx-settings-panel-on-surface-variant);border-color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-expansion-panel .mat-action-row{border-top-color:var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .mat-accordion,praxis-settings-panel .settings-panel .mat-accordion .mat-expansion-panel-spacing{background:transparent}praxis-settings-panel .settings-panel .mat-expansion-panel-content,praxis-settings-panel .settings-panel .mat-expansion-panel-content-wrapper,praxis-settings-panel .settings-panel .mat-expansion-panel-body{background:var(--pfx-settings-panel-surface-container);color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel .mat-expansion-panel-body{padding:8px}praxis-settings-panel .settings-panel .mat-expansion-panel .mat-expansion-panel-body>*{color:inherit}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header{border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab{min-width:0}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab .mdc-tab__text-label{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab:hover .mdc-tab__text-label,praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab:focus .mdc-tab__text-label{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header-pagination{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header-pagination-chevron{border-color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header-pagination:not(.mat-mdc-tab-header-pagination-disabled):hover{background:color-mix(in srgb,var(--pfx-settings-panel-surface-container-high) 84%,var(--pfx-settings-panel-primary) 16%)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab-indicator__content--underline{border-color:var(--pfx-settings-panel-primary)}praxis-settings-panel .settings-panel .mat-mdc-card{background:var(--pfx-settings-panel-surface-container-low);border:1px solid var(--pfx-settings-panel-outline-variant);color:var(--pfx-settings-panel-on-surface);box-shadow:var(--md-sys-elevation-level1, 0 2px 8px rgba(0, 0, 0, .08))}praxis-settings-panel .settings-panel .mat-mdc-card-subtitle{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-card-title,praxis-settings-panel .settings-panel .mat-mdc-card-content{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-form-field{width:100%;align-self:start;--mdc-filled-text-field-container-color: var( --pfx-settings-panel-surface-container );--mdc-filled-text-field-hover-container-color: var( --pfx-settings-panel-surface-container-high );--mdc-filled-text-field-focus-container-color: var( --pfx-settings-panel-surface-container-high );--mdc-filled-text-field-active-indicator-color: var( --pfx-settings-panel-outline-variant );--mdc-filled-text-field-hover-active-indicator-color: var( --pfx-settings-panel-secondary );--mdc-filled-text-field-focus-active-indicator-color: var( --pfx-settings-panel-primary );--mdc-filled-text-field-label-text-color: var( --pfx-settings-panel-on-surface-variant );--mdc-filled-text-field-focus-label-text-color: var( --pfx-settings-panel-primary );--mdc-filled-text-field-input-text-color: var( --pfx-settings-panel-on-surface );--mdc-filled-text-field-caret-color: var(--pfx-settings-panel-primary);--mdc-outlined-text-field-outline-color: var( --pfx-settings-panel-outline-variant );--mdc-outlined-text-field-hover-outline-color: var( --pfx-settings-panel-secondary );--mdc-outlined-text-field-focus-outline-color: var( --pfx-settings-panel-primary );--mdc-outlined-text-field-label-text-color: var( --pfx-settings-panel-on-surface-variant );--mdc-outlined-text-field-focus-label-text-color: var( --pfx-settings-panel-primary );--mdc-outlined-text-field-input-text-color: var( --pfx-settings-panel-on-surface );--mdc-outlined-text-field-caret-color: var(--pfx-settings-panel-primary);--mat-form-field-focus-select-arrow-color: var( --pfx-settings-panel-primary );--mat-form-field-enabled-select-arrow-color: var( --pfx-settings-panel-on-surface-variant )}praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field--filled,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled{background-color:var(--pfx-settings-panel-surface-container);border-radius:var(--md-sys-shape-corner-small, 8px) var(--md-sys-shape-corner-small, 8px) 0 0}praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled .mat-mdc-form-field-flex,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled .mat-mdc-form-field-infix,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled .mat-mdc-form-field-focus-overlay{background:var(--pfx-settings-panel-surface-container);color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field--outlined,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--outlined,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--outlined .mat-mdc-form-field-flex,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--outlined .mat-mdc-form-field-infix{background:transparent;background-color:transparent;color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-form-field-focus-overlay{opacity:0}praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled .mdc-floating-label,praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-select-placeholder,praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-select-arrow,praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-floating-label{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-select-value,praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-select-value-text,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled .mdc-text-field__input,praxis-settings-panel .settings-panel .mat-mdc-form-field input,praxis-settings-panel .settings-panel .mat-mdc-form-field textarea,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field__input{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--focused:not(.mdc-text-field--invalid) .mat-mdc-floating-label,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled.mdc-text-field--focused .mdc-floating-label{color:var(--pfx-settings-panel-primary)}praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--invalid .mat-mdc-floating-label{color:var(--pfx-settings-panel-error)}praxis-settings-panel .settings-panel .mat-mdc-form-field-subscript-wrapper{position:relative;box-sizing:border-box}praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-form-field-hint-wrapper,praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-form-field-error-wrapper{position:relative;top:auto;left:auto;right:auto;padding-top:4px;line-height:1.35}praxis-settings-panel .settings-panel .mat-mdc-form-field-bottom-align:before{display:none}praxis-settings-panel .settings-panel .mat-mdc-form-field-subscript-wrapper,praxis-settings-panel .settings-panel .mat-mdc-form-field-hint-wrapper,praxis-settings-panel .settings-panel .mat-mdc-form-field-error-wrapper,praxis-settings-panel .settings-panel .mat-mdc-hint{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-button-toggle-group{border-color:var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .mat-button-toggle{background:var(--pfx-settings-panel-surface-container-low);color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-button-toggle+.mat-button-toggle{border-left-color:var(--pfx-settings-panel-outline-variant)}praxis-settings-panel .settings-panel .mat-button-toggle-group .mat-button-toggle-checked{background:var(--pfx-settings-panel-primary-container);color:var(--pfx-settings-panel-on-primary-container)}praxis-settings-panel .settings-panel .mat-button-toggle .mat-icon,praxis-settings-panel .settings-panel .mat-button-toggle-checked .mat-icon{color:inherit}praxis-settings-panel .settings-panel .mat-mdc-slide-toggle .mdc-label{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .pfx-editor-section{box-sizing:border-box;width:100%;min-width:0;padding:16px;border-radius:16px;border:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .pfx-editor-subgroup{display:grid;gap:12px;padding-top:14px;border-top:1px solid color-mix(in srgb,var(--pfx-settings-panel-outline-variant) 70%,transparent)}praxis-settings-panel .settings-panel .pfx-editor-subgroup:first-child{padding-top:0;border-top:0}praxis-settings-panel .settings-panel .pfx-editor-grid-12{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px;min-width:0}praxis-settings-panel .settings-panel .pfx-editor-toggle-cluster{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px}.settings-panel{grid-template-columns:minmax(0,1fr);min-width:0;max-width:100%}.settings-panel-body{overflow-x:hidden;min-width:0}.settings-panel-body>*{min-width:0;max-width:100%}.praxis-settings-panel-backdrop{background:var(--pfx-settings-panel-backdrop, var(--pfx-backdrop, rgba(8, 15, 26, .42)));backdrop-filter:blur(var(--pfx-settings-panel-backdrop-blur, var(--pfx-backdrop-blur, 6px))) saturate(110%);-webkit-backdrop-filter:blur(var(--pfx-settings-panel-backdrop-blur, var(--pfx-backdrop-blur, 6px))) saturate(110%)}:is(.cdk-overlay-pane.praxis-settings-panel-pane,.praxis-settings-panel-pane){position:fixed;top:0;right:0;display:flex;align-items:stretch;height:100vh;max-width:var(--pfx-settings-panel-pane-max-width, 100vw);max-height:100vh;z-index:var(--pfx-settings-panel-z-index, var(--praxis-z-settings-panel, var(--praxis-layer-settings-panel, 1220)));transition:width var(--pfx-side-panel-motion-duration-enter, .3s) var(--pfx-side-panel-motion-easing-enter, ease)}.praxis-settings-panel-pane .settings-panel{pointer-events:auto}@media(prefers-reduced-motion:reduce){.praxis-settings-panel-pane{transition:none}}:is(.cdk-overlay-pane.praxis-settings-panel-pane.praxis-settings-panel-pane--preview,.praxis-settings-panel-pane.praxis-settings-panel-pane--preview){top:auto;bottom:12px;right:12px;height:auto;width:min(560px,100vw - 24px);min-width:0;transition:none}.praxis-settings-panel-backdrop.praxis-settings-panel-backdrop--preview{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}.praxis-settings-preview-target{outline:2px solid var(--md-sys-color-primary);outline-offset:3px}praxis-settings-panel .settings-panel [hidden]{display:none}praxis-settings-panel .settings-panel .settings-panel-header[hidden],praxis-settings-panel .settings-panel .settings-panel-body[hidden],praxis-settings-panel .settings-panel .settings-panel-footer[hidden]{display:none}praxis-settings-panel .settings-panel--preview{height:auto;min-height:0;grid-template-rows:auto;border-radius:16px}praxis-settings-panel .settings-panel-preview-bar{display:flex;align-items:center;gap:16px;padding:16px;color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel-preview-bar p{margin:4px 0 0;color:var(--pfx-settings-panel-on-surface-variant);font-size:.875rem}praxis-settings-panel .settings-panel-preview-bar button{flex-shrink:0}@container settings-panel-shell (max-width: 599px){praxis-settings-panel .settings-panel-header:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:start}praxis-settings-panel .settings-panel-header .spacer{display:none}praxis-settings-panel .settings-panel-header .settings-panel-title{grid-column:1;grid-row:1;overflow-wrap:anywhere}praxis-settings-panel .settings-panel-header [data-testid=settings-panel-toggle-expand]{grid-column:2;grid-row:1}praxis-settings-panel .settings-panel-header [data-testid=settings-panel-close-icon]{grid-column:3;grid-row:1}praxis-settings-panel .settings-panel-header [data-testid=settings-panel-preview]{grid-column:1/-1;grid-row:2;justify-self:start;max-width:100%}praxis-settings-panel .settings-panel-preview-bar{flex-direction:column;align-items:stretch;gap:8px}}@media(prefers-reduced-transparency:reduce){.praxis-settings-panel-backdrop{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--pfx-backdrop-opaque, rgba(8, 15, 26, .72))}}@media(forced-colors:active){praxis-settings-panel .settings-panel{border:1px solid CanvasText;background:Canvas;color:CanvasText}praxis-settings-panel .settings-panel-save-error,praxis-settings-panel .settings-panel-scope{border:1px solid CanvasText;background:Canvas;color:CanvasText}.praxis-settings-panel-backdrop{backdrop-filter:none;-webkit-backdrop-filter:none;background:Canvas;opacity:.75}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.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: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatDialogModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1152
1905
  }
1153
1906
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SettingsPanelComponent, decorators: [{
1154
1907
  type: Component,
@@ -1163,13 +1916,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
1163
1916
  CdkTrapFocus,
1164
1917
  MatProgressSpinnerModule,
1165
1918
  MatDialogModule,
1166
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [providePraxisSettingsPanelI18n()], template: "<div\n class=\"settings-panel\"\n data-testid=\"settings-panel-root\"\n [class.expanded]=\"expanded\"\n [class.settings-panel--preview]=\"previewing\"\n [class.is-resizable]=\"showResizeHandle\"\n [ngStyle]=\"panelInlineStyles\"\n role=\"dialog\"\n [attr.aria-modal]=\"interactionActive ? 'true' : null\"\n [attr.aria-hidden]=\"interactionActive ? null : 'true'\"\n [attr.inert]=\"interactionActive ? null : ''\"\n [attr.aria-labelledby]=\"previewing ? titleId + '-preview' : titleId\"\n [cdkTrapFocus]=\"interactionActive\"\n [cdkTrapFocusAutoCapture]=\"true\"\n >\n @if (showResizeHandle && !previewing) {\n <div\n class=\"settings-panel__resize-handle\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"resizeHandleLabel\"\n (pointerdown)=\"onResizeHandlePointerDown($event)\"\n (keydown)=\"onResizeHandleKeydown($event)\"\n ></div>\n }\n @if (previewing) {\n <section class=\"settings-panel-preview-bar\" data-testid=\"settings-panel-preview-bar\">\n <div><strong [id]=\"titleId + '-preview'\">{{ tx('Page preview') }}</strong><p>{{ tx('Inspect the result. Return to keep editing; nothing is saved here.') }}</p></div>\n <button mat-flat-button type=\"button\" data-testid=\"settings-panel-return\" (click)=\"returnFromPreview()\">{{ tx('Back to settings') }}</button>\n </section>\n }\n <header class=\"settings-panel-header\" [hidden]=\"previewing\">\n <h2 class=\"settings-panel-title\" [id]=\"titleId\">\n @if (titleIcon) {\n <mat-icon class=\"title-icon\" [praxisIcon]=\"titleIcon\"></mat-icon>\n }\n <span>{{ title }}</span>\n </h2>\n <span class=\"spacer\"></span>\n @if (previewTarget) {\n <button mat-stroked-button type=\"button\" data-testid=\"settings-panel-preview\" [disabled]=\"!canInspectPreview\" (click)=\"showPreview()\">\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'visibility'\"></mat-icon>{{ tx('View result') }}\n </button>\n }\n <button\n [praxisIconButton]=\"expanded ? 'close_fullscreen' : 'open_in_full'\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-toggle-expand\"\n [attr.aria-label]=\"expanded ? tx('Collapse panel') : tx('Expand panel')\"\n [attr.aria-expanded]=\"expanded\"\n [matTooltip]=\"expanded ? tx('Collapse panel') : tx('Expand panel')\"\n (click)=\"toggleExpand()\"\n ></button>\n <button\n praxisIconButton=\"close\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-close-icon\"\n [attr.aria-label]=\"tx('Close')\"\n [matTooltip]=\"tx('Close')\"\n (click)=\"onCancel()\"\n ></button>\n </header>\n @if (showStatusMessage && !previewing) {\n <div\n class=\"settings-panel-status\"\n [attr.data-status]=\"statusTone\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <mat-icon\n aria-hidden=\"true\"\n [praxisIcon]=\"\n statusTone === 'dirty' || statusTone === 'invalid'\n ? 'warning'\n : statusTone === 'saved'\n ? 'check_circle'\n : statusTone === 'busy'\n ? 'autorenew'\n : 'info'\n \"\n ></mat-icon>\n <span>{{ statusMessage }}</span>\n </div>\n }\n <div class=\"settings-panel-body\" [hidden]=\"previewing\">\n <ng-template #contentHost></ng-template>\n </div>\n <footer class=\"settings-panel-footer\" [hidden]=\"previewing\">\n <button\n mat-button\n type=\"button\"\n data-testid=\"settings-panel-reset\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onReset()\"\n [disabled]=\"isBusy\"\n >\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'restart_alt'\"></mat-icon>\n <span>{{ tx('Reset') }}</span>\n </button>\n <span class=\"spacer\"></span>\n <button\n mat-button\n type=\"button\"\n data-testid=\"settings-panel-cancel\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onCancel()\"\n [disabled]=\"isBusy\"\n >\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'close'\"></mat-icon>\n <span>{{ tx('Cancel') }}</span>\n </button>\n <button\n mat-stroked-button\n type=\"button\"\n data-testid=\"settings-panel-apply\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onApply()\"\n [disabled]=\"!canApply\"\n [matTooltip]=\"applySaveDisabledReason\"\n [matTooltipDisabled]=\"canApply || !diagnostics.showDisabledReason\"\n [attr.aria-busy]=\"isBusy\"\n [attr.aria-label]=\"applyActionLabel || 'Apply'\"\n >\n @if (showBusyIndicator) {\n <mat-progress-spinner\n mode=\"indeterminate\"\n diameter=\"20\"\n ></mat-progress-spinner>\n }\n @if (!showBusyIndicator) {\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'done'\"></mat-icon>\n <span class=\"settings-panel-action-label settings-panel-action-label--apply\">{{ applyActionLabel }}</span>\n }\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n type=\"button\"\n data-testid=\"settings-panel-save\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onSave()\"\n [disabled]=\"!canSave\"\n [matTooltip]=\"applySaveDisabledReason\"\n [matTooltipDisabled]=\"canSave || !diagnostics.showDisabledReason\"\n [attr.aria-busy]=\"isBusy\"\n [attr.aria-label]=\"saveActionLabel || 'Save & Close'\"\n >\n @if (showBusyIndicator) {\n <mat-progress-spinner\n mode=\"indeterminate\"\n diameter=\"20\"\n ></mat-progress-spinner>\n }\n @if (!showBusyIndicator) {\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'save'\"></mat-icon>\n <span class=\"settings-panel-action-label settings-panel-action-label--save\">{{ saveActionLabel }}</span>\n }\n </button>\n </footer>\n</div>\n", styles: ["@charset \"UTF-8\";praxis-settings-panel{display:block;height:100%;width:100%;min-width:0;flex:1 1 auto;box-sizing:border-box}praxis-settings-panel .settings-panel{position:relative;container:settings-panel-shell/inline-size;--pfx-settings-panel-surface-container: var( --md-sys-color-surface-container, #ffffff );--pfx-settings-panel-surface-container-high: var( --md-sys-color-surface-container-high, #f7f7f7 );--pfx-settings-panel-surface-container-low: var( --md-sys-color-surface-container-low, #f2f4f7 );--pfx-settings-panel-surface: var(--md-sys-color-surface, #ffffff);--pfx-settings-panel-on-surface: var(--md-sys-color-on-surface, #111827);--pfx-settings-panel-on-surface-variant: var( --md-sys-color-on-surface-variant, rgba(17, 24, 39, .72) );--pfx-settings-panel-outline: var( --md-sys-color-outline, rgba(15, 23, 42, .24) );--pfx-settings-panel-outline-variant: var( --md-sys-color-outline-variant, rgba(15, 23, 42, .12) );--pfx-settings-panel-primary: var(--md-sys-color-primary, #2563eb);--pfx-settings-panel-primary-container: var( --md-sys-color-primary-container, rgba(37, 99, 235, .14) );--pfx-settings-panel-on-primary-container: var( --md-sys-color-on-primary-container, #0f172a );--pfx-settings-panel-secondary: var( --md-sys-color-secondary, var(--pfx-settings-panel-primary) );--pfx-settings-panel-error: var(--md-sys-color-error, #b3261e);--pfx-settings-panel-error-container: var( --md-sys-color-error-container, rgba(179, 38, 30, .14) );display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto 1fr auto;grid-template-areas:\"header\" \"status\" \"body\" \"footer\";height:100%;background:var(--pfx-settings-panel-surface-container);color:var(--pfx-settings-panel-on-surface);border-left:1px solid var(--pfx-settings-panel-outline-variant);width:100%;max-width:100%;min-width:0;box-sizing:border-box;box-shadow:var(--pfx-settings-panel-elevation, var(--md-sys-elevation-level2, 0 8px 24px rgba(0, 0, 0, .16)));overflow:hidden}praxis-settings-panel .settings-panel__resize-handle{position:absolute;inset:0 auto 0 0;width:12px;cursor:col-resize;touch-action:none;z-index:3;outline:none}praxis-settings-panel .settings-panel__resize-handle:before{content:\"\";position:absolute;inset:0 auto 0 4px;width:2px;background:transparent;transition:background-color var(--pfx-side-panel-motion-duration, .16s) ease,opacity var(--pfx-side-panel-motion-duration, .16s) ease;opacity:0}praxis-settings-panel .settings-panel.is-resizable:hover .settings-panel__resize-handle:before,praxis-settings-panel .settings-panel__resize-handle:focus-visible:before{opacity:1;background:var(--pfx-settings-panel-outline)}praxis-settings-panel .settings-panel-header{grid-area:header;display:flex;align-items:center;gap:var(--pfx-settings-panel-header-gap, 8px);padding:12px var(--pfx-settings-panel-header-padding-x, 20px);min-height:var(--pfx-settings-panel-header-height, 64px);border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-high);box-shadow:var(--pfx-settings-panel-header-shadow, var(--md-sys-elevation-level1, 0 2px 6px rgba(0, 0, 0, .08)));flex-shrink:0;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-header .spacer{flex:1 1 auto;min-width:0}praxis-settings-panel .settings-panel-status{grid-area:status;display:flex;align-items:center;gap:8px;min-height:36px;padding:6px var(--pfx-settings-panel-status-padding-x, 20px);border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-high);color:var(--pfx-settings-panel-on-surface);font-size:.85rem;font-weight:500;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-status mat-icon{width:18px;height:18px;font-size:18px}praxis-settings-panel .settings-panel-status[data-status=dirty],praxis-settings-panel .settings-panel-status[data-status=invalid]{color:var(--pfx-settings-panel-error);background:color-mix(in srgb,var(--pfx-settings-panel-error-container) 30%,var(--pfx-settings-panel-surface-container-high))}praxis-settings-panel .settings-panel-status[data-status=saved]{color:var(--pfx-settings-panel-primary);background:color-mix(in srgb,var(--pfx-settings-panel-primary-container) 28%,var(--pfx-settings-panel-surface-container-high))}praxis-settings-panel .settings-panel-body{grid-area:body;overflow-y:auto;overflow-x:hidden;scroll-padding-top:var(--pfx-settings-panel-scroll-padding-start, 16px);scroll-padding-bottom:var(--pfx-settings-panel-scroll-padding-end, 88px);min-height:0;padding:var(--pfx-settings-panel-body-padding, 8px 16px 24px);background:var(--pfx-settings-panel-surface);display:flex;flex-direction:column;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-body>*{min-width:0;max-width:100%}praxis-settings-panel .settings-panel-content{display:block;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-content>*{min-width:0;max-width:100%;box-sizing:border-box}praxis-settings-panel .settings-panel-footer{grid-area:footer;border-top:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-high);box-shadow:var(--pfx-settings-panel-footer-shadow, var(--md-sys-elevation-level1, 0 -2px 6px rgba(0, 0, 0, .08)));display:flex;align-items:center;flex-wrap:wrap;padding:var(--pfx-settings-panel-footer-padding, 12px 20px);column-gap:var(--pfx-settings-panel-footer-gap, 12px);row-gap:8px;flex-shrink:0;min-width:0;max-width:100%}praxis-settings-panel .spacer{flex:1}praxis-settings-panel .settings-panel-title{display:inline-flex;align-items:center;flex:1 1 auto;gap:var(--pfx-settings-panel-title-gap, 8px);font-weight:700;line-height:1.2;letter-spacing:.2px;margin:0;min-width:0;overflow:visible;white-space:normal}praxis-settings-panel .settings-panel-title span{min-width:0;overflow:visible;white-space:normal}praxis-settings-panel .settings-panel-title mat-icon{color:var(--pfx-settings-panel-primary)}praxis-settings-panel .settings-panel-title .title-icon{width:20px;height:20px;font-size:20px}praxis-settings-panel .settings-panel-footer button{display:inline-flex;align-items:center}praxis-settings-panel .settings-panel-footer button .mat-icon{flex:0 0 20px;font-size:20px;width:20px;height:20px;line-height:1;display:inline-flex;align-items:center;justify-content:center;overflow:hidden}praxis-settings-panel .settings-panel-footer .mat-button-wrapper{display:inline-flex;align-items:center;gap:var(--pfx-settings-panel-button-gap, 8px)}praxis-settings-panel .settings-panel-footer .mat-progress-spinner{margin-right:8px}praxis-settings-panel .settings-panel-footer .mat-flat-button[color=primary]{font-weight:600}praxis-settings-panel .settings-panel-footer .mdc-button__label{display:inline-flex;align-items:center;gap:var(--pfx-settings-panel-button-gap, 8px);line-height:1}praxis-settings-panel .settings-panel-footer .mdc-button__label>span{display:inline-flex;align-items:center;line-height:1}praxis-settings-panel .settings-panel-footer .mdc-button__label .mat-icon{display:inline-flex;align-items:center;justify-content:center;line-height:1}@container settings-panel-shell (max-width: 520px){praxis-settings-panel .settings-panel-footer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;padding:10px 12px;column-gap:8px}praxis-settings-panel .settings-panel-footer .spacer{display:none}praxis-settings-panel .settings-panel-footer button{justify-content:center;width:100%;min-width:0;min-height:44px;height:auto;padding:8px}praxis-settings-panel .settings-panel-action-label{white-space:normal;overflow-wrap:anywhere;text-align:center}praxis-settings-panel .settings-panel-footer .mdc-button__label{min-width:0;max-width:100%}praxis-settings-panel .settings-panel-footer .mdc-button__label>span{min-width:0;line-height:1.25}}@container settings-panel-shell (max-width: 280px){praxis-settings-panel .settings-panel-footer{grid-template-columns:minmax(0,1fr)}}praxis-settings-panel .settings-panel .mat-divider{background-color:var(--pfx-settings-panel-outline-variant)!important}praxis-settings-panel .settings-panel .mat-expansion-panel{background:var(--pfx-settings-panel-surface-container)!important;border:1px solid var(--pfx-settings-panel-outline-variant);border-radius:var(--md-sys-shape-corner-medium, 12px);box-shadow:var(--md-sys-elevation-level1, 0 2px 8px rgba(0, 0, 0, .08));color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel-header{background:var(--pfx-settings-panel-surface-container)!important;color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-content{color:var(--pfx-settings-panel-on-surface);flex-wrap:wrap;gap:4px 12px;min-width:0;overflow:visible}praxis-settings-panel .settings-panel .mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:hover{background:color-mix(in srgb,var(--pfx-settings-panel-surface-container-high) 84%,var(--pfx-settings-panel-primary) 16%)}praxis-settings-panel .settings-panel .mat-expansion-panel.mat-expanded>.mat-expansion-panel-header{background:var(--pfx-settings-panel-surface-container-high)!important}praxis-settings-panel .settings-panel .mat-expansion-panel-header mat-icon,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-icon{color:var(--pfx-settings-panel-on-surface)!important}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-title,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description{color:var(--pfx-settings-panel-on-surface);min-width:0;overflow:visible;white-space:normal}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description{color:var(--pfx-settings-panel-on-surface-variant);flex-wrap:wrap;gap:8px}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-title>*,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description>*{color:inherit}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-title small,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description small{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-indicator,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-indicator:after{color:var(--pfx-settings-panel-on-surface-variant);border-color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-expansion-panel .mat-action-row{border-top-color:var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .mat-accordion,praxis-settings-panel .settings-panel .mat-accordion .mat-expansion-panel-spacing{background:transparent!important}praxis-settings-panel .settings-panel .mat-expansion-panel-content,praxis-settings-panel .settings-panel .mat-expansion-panel-content-wrapper,praxis-settings-panel .settings-panel .mat-expansion-panel-body{background:var(--pfx-settings-panel-surface-container)!important;color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel .mat-expansion-panel-body{padding:8px}praxis-settings-panel .settings-panel .mat-expansion-panel .mat-expansion-panel-body>*{color:inherit}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header{border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab{min-width:0}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab .mdc-tab__text-label{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab:hover .mdc-tab__text-label,praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab:focus .mdc-tab__text-label{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header-pagination{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header-pagination-chevron{border-color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header-pagination:not(.mat-mdc-tab-header-pagination-disabled):hover{background:color-mix(in srgb,var(--pfx-settings-panel-surface-container-high) 84%,var(--pfx-settings-panel-primary) 16%)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab-indicator__content--underline{border-color:var(--pfx-settings-panel-primary)}praxis-settings-panel .settings-panel .mat-mdc-card{background:var(--pfx-settings-panel-surface-container-low);border:1px solid var(--pfx-settings-panel-outline-variant);color:var(--pfx-settings-panel-on-surface);box-shadow:var(--md-sys-elevation-level1, 0 2px 8px rgba(0, 0, 0, .08))}praxis-settings-panel .settings-panel .mat-mdc-card-subtitle,praxis-settings-panel .settings-panel .mat-mdc-card-content{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-card-title{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-form-field{width:100%;--mdc-filled-text-field-container-color: var( --pfx-settings-panel-surface-container );--mdc-filled-text-field-hover-container-color: var( --pfx-settings-panel-surface-container-high );--mdc-filled-text-field-focus-container-color: var( --pfx-settings-panel-surface-container-high );--mdc-filled-text-field-active-indicator-color: var( --pfx-settings-panel-outline-variant );--mdc-filled-text-field-hover-active-indicator-color: var( --pfx-settings-panel-secondary );--mdc-filled-text-field-focus-active-indicator-color: var( --pfx-settings-panel-primary );--mdc-filled-text-field-label-text-color: var( --pfx-settings-panel-on-surface-variant );--mdc-filled-text-field-focus-label-text-color: var( --pfx-settings-panel-primary );--mdc-filled-text-field-input-text-color: var( --pfx-settings-panel-on-surface );--mdc-filled-text-field-caret-color: var(--pfx-settings-panel-primary);--mdc-outlined-text-field-outline-color: var( --pfx-settings-panel-outline-variant );--mdc-outlined-text-field-hover-outline-color: var( --pfx-settings-panel-secondary );--mdc-outlined-text-field-focus-outline-color: var( --pfx-settings-panel-primary );--mdc-outlined-text-field-label-text-color: var( --pfx-settings-panel-on-surface-variant );--mdc-outlined-text-field-focus-label-text-color: var( --pfx-settings-panel-primary );--mdc-outlined-text-field-input-text-color: var( --pfx-settings-panel-on-surface );--mdc-outlined-text-field-caret-color: var(--pfx-settings-panel-primary);--mat-form-field-focus-select-arrow-color: var( --pfx-settings-panel-primary );--mat-form-field-enabled-select-arrow-color: var( --pfx-settings-panel-on-surface-variant )}praxis-settings-panel .settings-panel .mdc-text-field--filled{background-color:var(--pfx-settings-panel-surface-container)!important;border-radius:var(--md-sys-shape-corner-small, 8px) var(--md-sys-shape-corner-small, 8px) 0 0}praxis-settings-panel .settings-panel .mat-mdc-text-field-wrapper,praxis-settings-panel .settings-panel .mat-mdc-form-field-flex,praxis-settings-panel .settings-panel .mat-mdc-form-field-infix,praxis-settings-panel .settings-panel .mat-mdc-form-field-focus-overlay{background:var(--pfx-settings-panel-surface-container)!important;color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-form-field-focus-overlay{opacity:0}praxis-settings-panel .settings-panel .mdc-text-field--filled .mdc-text-field__input,praxis-settings-panel .settings-panel .mdc-text-field--filled .mdc-floating-label,praxis-settings-panel .settings-panel .mat-mdc-select-value,praxis-settings-panel .settings-panel .mat-mdc-select-arrow,praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-floating-label{color:var(--pfx-settings-panel-on-surface-variant)!important}praxis-settings-panel .settings-panel .mdc-text-field--filled.mdc-text-field--focused .mdc-floating-label,praxis-settings-panel .settings-panel .mdc-text-field--filled .mdc-text-field__input{color:var(--pfx-settings-panel-on-surface)!important}praxis-settings-panel .settings-panel .mat-mdc-form-field input,praxis-settings-panel .settings-panel .mat-mdc-form-field textarea,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field__input{color:var(--pfx-settings-panel-on-surface)!important}praxis-settings-panel .settings-panel .mat-mdc-form-field-subscript-wrapper,praxis-settings-panel .settings-panel .mat-mdc-form-field-hint-wrapper,praxis-settings-panel .settings-panel .mat-mdc-form-field-error-wrapper,praxis-settings-panel .settings-panel .mat-mdc-hint{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-button-toggle-group{border-color:var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .mat-button-toggle{background:var(--pfx-settings-panel-surface-container-low);color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-button-toggle+.mat-button-toggle{border-left-color:var(--pfx-settings-panel-outline-variant)}praxis-settings-panel .settings-panel .mat-button-toggle-checked{background:var(--pfx-settings-panel-primary-container)!important;color:var(--pfx-settings-panel-on-primary-container)!important}praxis-settings-panel .settings-panel .mat-button-toggle .mat-icon,praxis-settings-panel .settings-panel .mat-button-toggle-checked .mat-icon{color:inherit}praxis-settings-panel .settings-panel .mat-mdc-slide-toggle .mdc-label{color:var(--pfx-settings-panel-on-surface)}.settings-panel{grid-template-columns:minmax(0,1fr);min-width:0;max-width:100%}.settings-panel-body{overflow-x:hidden;min-width:0}.settings-panel-body>*{min-width:0;max-width:100%}.praxis-settings-panel-backdrop{background:var(--pfx-backdrop, rgba(8, 15, 26, .42));backdrop-filter:blur(var(--pfx-backdrop-blur, 6px)) saturate(110%);-webkit-backdrop-filter:blur(var(--pfx-backdrop-blur, 6px)) saturate(110%)}.praxis-settings-panel-pane{position:fixed!important;top:0!important;right:0!important;display:flex!important;align-items:stretch!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;z-index:var(--praxis-layer-settings-panel, 1220)!important;transition:width var(--pfx-side-panel-motion-duration-enter, .3s) var(--pfx-side-panel-motion-easing-enter, ease)}.praxis-settings-panel-pane .settings-panel{pointer-events:auto}@media(prefers-reduced-motion:reduce){.praxis-settings-panel-pane{transition:none}}.praxis-settings-panel-pane.praxis-settings-panel-pane--preview{top:auto!important;bottom:12px!important;right:12px!important;height:auto!important;width:min(560px,100vw - 24px)!important;min-width:0!important;transition:none}.praxis-settings-panel-backdrop.praxis-settings-panel-backdrop--preview{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}.praxis-settings-preview-target{outline:2px solid var(--md-sys-color-primary);outline-offset:3px}praxis-settings-panel .settings-panel [hidden]{display:none!important}praxis-settings-panel .settings-panel--preview{height:auto;min-height:0;grid-template-rows:auto;border-radius:16px}praxis-settings-panel .settings-panel-preview-bar{display:flex;align-items:center;gap:16px;padding:16px;color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel-preview-bar p{margin:4px 0 0;color:var(--pfx-settings-panel-on-surface-variant);font-size:.875rem}praxis-settings-panel .settings-panel-preview-bar button{flex-shrink:0}@container settings-panel-shell (max-width: 599px){praxis-settings-panel .settings-panel-header:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:start}praxis-settings-panel .settings-panel-header .spacer{display:none}praxis-settings-panel .settings-panel-header .settings-panel-title{grid-column:1;grid-row:1;overflow-wrap:anywhere}praxis-settings-panel .settings-panel-header [data-testid=settings-panel-toggle-expand]{grid-column:2;grid-row:1}praxis-settings-panel .settings-panel-header [data-testid=settings-panel-close-icon]{grid-column:3;grid-row:1}praxis-settings-panel .settings-panel-header [data-testid=settings-panel-preview]{grid-column:1/-1;grid-row:2;justify-self:start;max-width:100%}praxis-settings-panel .settings-panel-preview-bar{flex-direction:column;align-items:stretch;gap:8px}}\n"] }]
1919
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [providePraxisSettingsPanelI18n()], template: "<div\n class=\"settings-panel\"\n data-testid=\"settings-panel-root\"\n [class.expanded]=\"expanded\"\n [class.settings-panel--preview]=\"previewing\"\n [class.is-resizable]=\"showResizeHandle\"\n [ngStyle]=\"panelInlineStyles\"\n role=\"dialog\"\n [attr.aria-modal]=\"interactionActive ? 'true' : null\"\n [attr.aria-hidden]=\"interactionActive ? null : 'true'\"\n [attr.inert]=\"interactionActive ? null : ''\"\n [attr.aria-labelledby]=\"previewing ? titleId + '-preview' : titleId\"\n [cdkTrapFocus]=\"interactionActive\"\n [cdkTrapFocusAutoCapture]=\"true\"\n >\n @if (showResizeHandle && !previewing) {\n <div\n class=\"settings-panel__resize-handle\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"resizeHandleLabel\"\n (pointerdown)=\"onResizeHandlePointerDown($event)\"\n (keydown)=\"onResizeHandleKeydown($event)\"\n ></div>\n }\n @if (previewing) {\n <section class=\"settings-panel-preview-bar\" data-testid=\"settings-panel-preview-bar\">\n <div><strong [id]=\"titleId + '-preview'\">{{ tx('Page preview') }}</strong><p>{{ tx('Inspect the result. Return to keep editing; nothing is saved here.') }}</p></div>\n <button mat-flat-button type=\"button\" data-testid=\"settings-panel-return\" (click)=\"returnFromPreview()\">{{ tx('Back to settings') }}</button>\n </section>\n }\n <header class=\"settings-panel-header\" [hidden]=\"previewing\">\n <h2 class=\"settings-panel-title\" [id]=\"titleId\">\n @if (titleIcon) {\n <mat-icon class=\"title-icon\" [praxisIcon]=\"titleIcon\"></mat-icon>\n }\n <span>{{ title }}</span>\n </h2>\n <span class=\"spacer\"></span>\n @if (previewTarget) {\n <button mat-stroked-button type=\"button\" data-testid=\"settings-panel-preview\" [disabled]=\"!canInspectPreview\" (click)=\"showPreview()\">\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'visibility'\"></mat-icon>{{ tx('View result') }}\n </button>\n }\n <button\n [praxisIconButton]=\"expanded ? 'close_fullscreen' : 'open_in_full'\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-toggle-expand\"\n [attr.aria-label]=\"expanded ? tx('Collapse panel') : tx('Expand panel')\"\n [attr.aria-expanded]=\"expanded\"\n [matTooltip]=\"expanded ? tx('Collapse panel') : tx('Expand panel')\"\n (click)=\"toggleExpand()\"\n ></button>\n <button\n praxisIconButton=\"close\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-close-icon\"\n [disabled]=\"isBusy\"\n [attr.aria-label]=\"tx('Close')\"\n [matTooltip]=\"tx('Close')\"\n (click)=\"onCancel()\"\n ></button>\n </header>\n @if (hasContextNavigation && !previewing) {\n <nav\n class=\"settings-panel-context-nav\"\n data-testid=\"settings-panel-context-nav\"\n [attr.aria-label]=\"tx('Context navigation')\"\n >\n @if (contextNavigation?.targets?.length) {\n <div class=\"settings-panel-context-nav__targets\">\n <button\n praxisIconButton=\"chevron_left\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-prev-target\"\n [disabled]=\"!canSelectPreviousTarget\"\n [attr.aria-label]=\"tx('Previous item')\"\n [matTooltip]=\"tx('Previous item')\"\n (click)=\"selectPreviousTarget()\"\n ></button>\n <select\n #targetSelect\n class=\"settings-panel-context-nav__target-select\"\n data-testid=\"settings-panel-target-select\"\n [disabled]=\"isBusy || !interactionActive\"\n [attr.aria-label]=\"tx('Editing target')\"\n [value]=\"contextNavigation?.activeTargetId || ''\"\n (change)=\"selectContextTarget(targetSelect.value, targetSelect)\"\n >\n @for (target of contextNavigation?.targets || []; track target.id) {\n <option [value]=\"target.id\" [selected]=\"target.id === contextNavigation?.activeTargetId\">\n {{ target.label }}\n </option>\n }\n </select>\n <button\n praxisIconButton=\"chevron_right\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-next-target\"\n [disabled]=\"!canSelectNextTarget\"\n [attr.aria-label]=\"tx('Next item')\"\n [matTooltip]=\"tx('Next item')\"\n (click)=\"selectNextTarget()\"\n ></button>\n </div>\n }\n @if (contextNavigation?.modes?.length) {\n <div\n class=\"settings-panel-context-nav__modes\"\n role=\"group\"\n [attr.aria-label]=\"tx('Editing modes')\"\n >\n @for (mode of contextNavigation?.modes || []; track mode.id) {\n <button\n type=\"button\"\n class=\"settings-panel-context-nav__mode-btn\"\n [class.is-active]=\"mode.id === contextNavigation?.activeModeId\"\n [disabled]=\"mode.disabled || isBusy || !interactionActive\"\n [attr.aria-pressed]=\"mode.id === contextNavigation?.activeModeId\"\n [attr.title]=\"mode.label\"\n [attr.data-testid]=\"'settings-panel-mode-' + mode.id\"\n (click)=\"selectContextMode(mode.id)\"\n >\n {{ mode.label }}\n </button>\n }\n </div>\n }\n </nav>\n }\n @if (showStatusMessage && !previewing) {\n <div\n class=\"settings-panel-status\"\n [attr.data-status]=\"statusTone\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <mat-icon\n aria-hidden=\"true\"\n [praxisIcon]=\"\n statusTone === 'dirty' || statusTone === 'invalid'\n ? 'warning'\n : statusTone === 'saved'\n ? 'check_circle'\n : statusTone === 'busy'\n ? 'autorenew'\n : 'info'\n \"\n ></mat-icon>\n <span>{{ statusMessage }}</span>\n @if (showWriteScopeControls) {\n <span class=\"spacer\"></span>\n <span\n class=\"settings-panel-scope\"\n [attr.data-scope]=\"activeWriteScope\"\n data-testid=\"settings-panel-write-scope\"\n >\n <span class=\"settings-panel-scope__label\">{{ writeScopeLabel }}</span>\n @if (canToggleWriteScope) {\n <button\n mat-stroked-button\n type=\"button\"\n class=\"settings-panel-scope__toggle\"\n data-testid=\"settings-panel-scope-toggle\"\n [matTooltip]=\"writeScopeToggleLabel\"\n (click)=\"toggleWriteScope()\"\n >\n {{ writeScopeToggleLabel }}\n </button>\n }\n @if (canResetPersonalOverride) {\n <button\n mat-button\n type=\"button\"\n class=\"settings-panel-scope__reset\"\n data-testid=\"settings-panel-reset-personal-override\"\n [disabled]=\"isBusy || isConfirmDialogOpen\"\n (click)=\"resetPersonalOverrideToTenant()\"\n >\n {{ tx('Reset to tenant baseline') }}\n </button>\n }\n </span>\n }\n </div>\n }\n @if (!previewing && storageSaveError(); as saveErr) {\n <div\n #saveErrorBanner\n tabindex=\"-1\"\n class=\"settings-panel-save-error\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n data-testid=\"settings-panel-save-error\"\n [attr.data-error-code]=\"saveErr.errorCode || saveErr.status || 'save-error'\"\n [attr.data-correlation-id]=\"saveErr.correlationId || null\"\n >\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'error_outline'\"></mat-icon>\n <div class=\"settings-panel-save-error__content\">\n <p class=\"settings-panel-save-error__message\">{{ formattedSaveErrorMessage }}</p>\n @if (saveErr.detail && saveErr.detail !== formattedSaveErrorMessage && saveErr.detail !== saveErrorFieldMessages.join('; ')) {\n <p class=\"settings-panel-save-error__detail\">{{ saveErr.detail }}</p>\n } @else if (saveErr.title && saveErr.title !== formattedSaveErrorMessage) {\n <p class=\"settings-panel-save-error__detail\">{{ saveErr.title }}</p>\n }\n @if (saveErr.errorCode || saveErr.correlationId) {\n <p class=\"settings-panel-save-error__meta\" data-testid=\"settings-panel-save-error-meta\">\n @if (saveErr.errorCode) {\n <span>{{ tx('Code: {{code}}', { code: saveErr.errorCode }) }}</span>\n }\n @if (saveErr.correlationId) {\n <span>{{ tx('Correlation ID: {{id}}', { id: saveErr.correlationId }) }}</span>\n }\n </p>\n }\n @if (saveErrorFieldMessages.length > 0) {\n <ul class=\"settings-panel-save-error__fields\" data-testid=\"settings-panel-save-error-fields\">\n @for (fieldMsg of saveErrorFieldMessages; track $index) {\n <li>{{ fieldMsg }}</li>\n }\n </ul>\n }\n @if (canSwitchToPersonalScopeFromError) {\n <button\n mat-stroked-button\n type=\"button\"\n class=\"settings-panel-save-error__action\"\n data-testid=\"settings-panel-switch-personal\"\n (click)=\"switchToPersonalScopeFromError()\"\n >\n {{ tx('Switch to personal scope') }}\n </button>\n }\n </div>\n <button\n praxisIconButton=\"close\"\n size=\"compact\"\n type=\"button\"\n data-testid=\"settings-panel-save-error-dismiss\"\n [attr.aria-label]=\"tx('Dismiss error')\"\n (click)=\"dismissSaveError()\"\n ></button>\n </div>\n }\n <div class=\"settings-panel-body\" [hidden]=\"previewing\">\n <ng-template #contentHost></ng-template>\n </div>\n <footer class=\"settings-panel-footer\" [hidden]=\"previewing\">\n <button\n mat-button\n type=\"button\"\n data-testid=\"settings-panel-reset\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onReset()\"\n [disabled]=\"isBusy || isConfirmDialogOpen\"\n >\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'restart_alt'\"></mat-icon>\n <span>{{ tx('Reset') }}</span>\n </button>\n <span class=\"spacer\"></span>\n <button\n mat-button\n type=\"button\"\n data-testid=\"settings-panel-cancel\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onCancel()\"\n [disabled]=\"isBusy || isConfirmDialogOpen\"\n >\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'close'\"></mat-icon>\n <span>{{ tx('Cancel') }}</span>\n </button>\n <button\n mat-stroked-button\n type=\"button\"\n data-testid=\"settings-panel-apply\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onApply()\"\n [disabled]=\"!canApply\"\n [matTooltip]=\"applySaveDisabledReason\"\n [matTooltipDisabled]=\"canApply || !diagnostics.showDisabledReason\"\n [attr.aria-busy]=\"isBusy\"\n [attr.aria-label]=\"applyActionLabel || 'Apply'\"\n >\n @if (showBusyIndicator) {\n <mat-progress-spinner\n mode=\"indeterminate\"\n diameter=\"20\"\n ></mat-progress-spinner>\n }\n @if (!showBusyIndicator) {\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'done'\"></mat-icon>\n <span class=\"settings-panel-action-label settings-panel-action-label--apply\">{{ applyActionLabel }}</span>\n }\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n type=\"button\"\n data-testid=\"settings-panel-save\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); onSave()\"\n [disabled]=\"!canSave\"\n [matTooltip]=\"applySaveDisabledReason\"\n [matTooltipDisabled]=\"canSave || !diagnostics.showDisabledReason\"\n [attr.aria-busy]=\"isBusy\"\n [attr.aria-label]=\"saveActionLabel || 'Save & Close'\"\n >\n @if (showBusyIndicator) {\n <mat-progress-spinner\n mode=\"indeterminate\"\n diameter=\"20\"\n ></mat-progress-spinner>\n }\n @if (!showBusyIndicator) {\n <mat-icon aria-hidden=\"true\" [praxisIcon]=\"'save'\"></mat-icon>\n <span class=\"settings-panel-action-label settings-panel-action-label--save\">{{ saveActionLabel }}</span>\n }\n </button>\n </footer>\n</div>\n", styles: ["@charset \"UTF-8\";praxis-settings-panel{display:block;height:100%;width:100%;min-width:0;flex:1 1 auto;box-sizing:border-box}praxis-settings-panel .settings-panel{position:relative;container:settings-panel-shell/inline-size;--pfx-settings-panel-surface-container: var( --md-sys-color-surface-container, #ffffff );--pfx-settings-panel-surface-container-high: var( --md-sys-color-surface-container-high, #f7f7f7 );--pfx-settings-panel-surface-container-low: var( --md-sys-color-surface-container-low, #f2f4f7 );--pfx-settings-panel-surface: var(--md-sys-color-surface, #ffffff);--pfx-settings-panel-on-surface: var(--md-sys-color-on-surface, #111827);--pfx-settings-panel-on-surface-variant: var( --md-sys-color-on-surface-variant, rgba(17, 24, 39, .72) );--pfx-settings-panel-outline: var( --md-sys-color-outline, rgba(15, 23, 42, .24) );--pfx-settings-panel-outline-variant: var( --md-sys-color-outline-variant, rgba(15, 23, 42, .12) );--pfx-settings-panel-primary: var(--md-sys-color-primary, #2563eb);--pfx-settings-panel-primary-container: var( --md-sys-color-primary-container, rgba(37, 99, 235, .14) );--pfx-settings-panel-on-primary-container: var( --md-sys-color-on-primary-container, #0f172a );--pfx-settings-panel-secondary: var( --md-sys-color-secondary, var(--pfx-settings-panel-primary) );--pfx-settings-panel-error: var(--md-sys-color-error, #b3261e);--pfx-settings-panel-error-container: var( --md-sys-color-error-container, rgba(179, 38, 30, .14) );--pfx-settings-panel-alert-bg: color-mix( in srgb, var(--pfx-settings-panel-error-container) 78%, var(--pfx-settings-panel-surface) );--pfx-settings-panel-alert-fg: var(--pfx-settings-panel-error);--pfx-settings-panel-scope-bg: var(--pfx-settings-panel-surface);--pfx-settings-panel-scope-fg: var(--pfx-settings-panel-on-surface-variant);--pfx-settings-panel-border-radius: 0px;--mat-divider-color: var(--pfx-settings-panel-outline-variant);--mat-expansion-container-background-color: var( --pfx-settings-panel-surface-container );--mat-expansion-container-text-color: var(--pfx-settings-panel-on-surface);--mat-expansion-header-text-color: var(--pfx-settings-panel-on-surface);--mat-expansion-header-description-color: var( --pfx-settings-panel-on-surface-variant );--mat-expansion-header-indicator-color: var( --pfx-settings-panel-on-surface-variant );--mat-button-toggle-selected-state-background-color: var( --pfx-settings-panel-primary-container );--mat-button-toggle-selected-state-text-color: var( --pfx-settings-panel-on-primary-container );display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto 1fr auto;grid-template-areas:\"header\" \"context-nav\" \"status\" \"alert\" \"body\" \"footer\";min-width:0;height:100%;max-width:var(--pfx-settings-panel-max-width, 100%);background:var(--pfx-settings-panel-surface-container);color:var(--pfx-settings-panel-on-surface);border-left:1px solid var(--pfx-settings-panel-outline-variant);border-radius:var(--pfx-settings-panel-border-radius, 0px);width:var(--pfx-settings-panel-width, 100%);box-sizing:border-box;box-shadow:var(--pfx-settings-panel-elevation, var(--md-sys-elevation-level2, 0 8px 24px rgba(0, 0, 0, .16)));overflow:hidden}praxis-settings-panel .settings-panel__resize-handle{position:absolute;inset:0 auto 0 0;width:12px;cursor:col-resize;touch-action:none;z-index:3;outline:none}praxis-settings-panel .settings-panel__resize-handle:before{content:\"\";position:absolute;inset:0 auto 0 4px;width:2px;background:transparent;transition:background-color var(--pfx-side-panel-motion-duration, .16s) ease,opacity var(--pfx-side-panel-motion-duration, .16s) ease;opacity:0}praxis-settings-panel .settings-panel.is-resizable:hover .settings-panel__resize-handle:before,praxis-settings-panel .settings-panel__resize-handle:focus-visible:before{opacity:1;background:var(--pfx-settings-panel-outline)}praxis-settings-panel .settings-panel-header{grid-area:header;display:flex;align-items:center;gap:var(--pfx-settings-panel-header-gap, 8px);padding:12px var(--pfx-settings-panel-header-padding-x, 20px);min-height:var(--pfx-settings-panel-header-height, 64px);border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-high);box-shadow:var(--pfx-settings-panel-header-shadow, var(--md-sys-elevation-level1, 0 2px 6px rgba(0, 0, 0, .08)));flex-shrink:0;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-header .spacer{flex:1 1 auto;min-width:0}praxis-settings-panel .settings-panel-context-nav{grid-area:context-nav;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;padding:8px var(--pfx-settings-panel-header-padding-x, 20px);border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low);min-width:0;max-width:100%}praxis-settings-panel .settings-panel-context-nav__targets{display:flex;align-items:center;gap:4px;min-width:0;flex:1 1 200px}praxis-settings-panel .settings-panel-context-nav__target-select{flex:1 1 auto;min-width:0;min-height:34px;padding:4px 10px;border-radius:8px;border:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface);color:var(--pfx-settings-panel-on-surface);font:inherit;font-size:.84rem;font-weight:600}praxis-settings-panel .settings-panel-context-nav__modes{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px;padding:2px;max-width:100%;border-radius:999px;border:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface)}praxis-settings-panel .settings-panel-context-nav__mode-btn{appearance:none;border:none;background:transparent;color:var(--pfx-settings-panel-on-surface-variant);font:inherit;font-size:.78rem;font-weight:600;padding:5px 12px;border-radius:999px;white-space:nowrap;flex-shrink:0;cursor:pointer;transition:background-color .14s ease,color .14s ease}praxis-settings-panel .settings-panel-context-nav__mode-btn.is-active{background:var(--pfx-settings-panel-primary-container);color:var(--pfx-settings-panel-on-primary-container)}praxis-settings-panel .settings-panel-context-nav__mode-btn:disabled{opacity:.42;cursor:not-allowed}praxis-settings-panel .settings-panel-status{grid-area:status;display:flex;align-items:center;gap:8px;min-height:36px;padding:6px var(--pfx-settings-panel-status-padding-x, 20px);border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-high);color:var(--pfx-settings-panel-on-surface);font-size:.85rem;font-weight:500;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-status mat-icon{width:18px;height:18px;font-size:18px}praxis-settings-panel .settings-panel-status[data-status=dirty],praxis-settings-panel .settings-panel-status[data-status=invalid]{color:var(--pfx-settings-panel-error);background:color-mix(in srgb,var(--pfx-settings-panel-error-container) 30%,var(--pfx-settings-panel-surface-container-high))}praxis-settings-panel .settings-panel-status[data-status=saved]{color:var(--pfx-settings-panel-primary);background:color-mix(in srgb,var(--pfx-settings-panel-primary-container) 28%,var(--pfx-settings-panel-surface-container-high))}praxis-settings-panel .settings-panel-scope{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px;padding:2px 8px;border-radius:999px;border:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-scope-bg);color:var(--pfx-settings-panel-scope-fg);font-size:.75rem;font-weight:600}praxis-settings-panel .settings-panel-scope[data-scope=tenant]{border-color:color-mix(in srgb,var(--pfx-settings-panel-primary) 42%,var(--pfx-settings-panel-outline-variant));background:var(--pfx-settings-panel-primary-container);color:var(--pfx-settings-panel-on-primary-container)}praxis-settings-panel .settings-panel-scope__toggle,praxis-settings-panel .settings-panel-scope__reset{height:24px;line-height:22px;font-size:.72rem;padding:0 8px}praxis-settings-panel .settings-panel-save-error{grid-area:alert;display:flex;align-items:flex-start;gap:10px;padding:10px var(--pfx-settings-panel-status-padding-x, 20px);background:var(--pfx-settings-panel-alert-bg);color:var(--pfx-settings-panel-alert-fg);border-bottom:1px solid color-mix(in srgb,var(--pfx-settings-panel-error) 32%,var(--pfx-settings-panel-outline-variant));font-size:.82rem}praxis-settings-panel .settings-panel-save-error__content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px}praxis-settings-panel .settings-panel-save-error__message{margin:0;font-weight:600;line-height:1.35}praxis-settings-panel .settings-panel-save-error:focus-visible,praxis-settings-panel .settings-panel-save-error:focus{outline:2px solid var(--pfx-settings-panel-error);outline-offset:-2px}praxis-settings-panel .settings-panel-save-error__detail{margin:0;font-size:.78rem;color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel-save-error__meta{margin:2px 0 0;display:flex;flex-wrap:wrap;gap:6px 12px;font-size:.72rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel-save-error__fields{margin:2px 0 0;padding-inline-start:16px;font-size:.78rem;color:var(--pfx-settings-panel-on-surface-variant);display:flex;flex-direction:column;gap:2px}praxis-settings-panel .settings-panel-save-error__action{align-self:flex-start;margin-top:2px}praxis-settings-panel .settings-panel-body{grid-area:body;container-type:inline-size;overflow-y:auto;overflow-x:hidden;scroll-padding-top:var(--pfx-settings-panel-scroll-padding-start, 16px);scroll-padding-bottom:var(--pfx-settings-panel-scroll-padding-end, 88px);min-height:0;padding:var(--pfx-settings-panel-body-padding, 8px 16px 24px);background:var(--pfx-settings-panel-surface);display:flex;flex-direction:column;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-body>*{min-width:0;max-width:100%}praxis-settings-panel .settings-panel-content{display:block;min-width:0;max-width:100%}praxis-settings-panel .settings-panel-content>*{min-width:0;max-width:100%;box-sizing:border-box}praxis-settings-panel .settings-panel-footer{grid-area:footer;border-top:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-high);box-shadow:var(--pfx-settings-panel-footer-shadow, var(--md-sys-elevation-level1, 0 -2px 6px rgba(0, 0, 0, .08)));display:flex;align-items:center;flex-wrap:wrap;padding:var(--pfx-settings-panel-footer-padding, 12px 20px);column-gap:var(--pfx-settings-panel-footer-gap, 12px);row-gap:8px;flex-shrink:0;min-width:0;max-width:100%}praxis-settings-panel .spacer{flex:1}praxis-settings-panel .settings-panel-title{display:inline-flex;align-items:center;flex:1 1 auto;gap:var(--pfx-settings-panel-title-gap, 8px);font-weight:700;line-height:1.2;letter-spacing:.2px;margin:0;min-width:0;overflow:visible;white-space:normal}praxis-settings-panel .settings-panel-title span{min-width:0;overflow:visible;white-space:normal}praxis-settings-panel .settings-panel-title mat-icon{color:var(--pfx-settings-panel-primary)}praxis-settings-panel .settings-panel-title .title-icon{width:20px;height:20px;font-size:20px}praxis-settings-panel .settings-panel-footer button{display:inline-flex;align-items:center}praxis-settings-panel .settings-panel-footer button .mat-icon{flex:0 0 20px;font-size:20px;width:20px;height:20px;line-height:1;display:inline-flex;align-items:center;justify-content:center;overflow:hidden}praxis-settings-panel .settings-panel-footer .mat-button-wrapper{display:inline-flex;align-items:center;gap:var(--pfx-settings-panel-button-gap, 8px)}praxis-settings-panel .settings-panel-footer .mat-progress-spinner{margin-right:8px}praxis-settings-panel .settings-panel-footer .mat-flat-button[color=primary]{font-weight:600}praxis-settings-panel .settings-panel-footer .mdc-button__label{display:inline-flex;align-items:center;gap:var(--pfx-settings-panel-button-gap, 8px);line-height:1}praxis-settings-panel .settings-panel-footer .mdc-button__label>span{display:inline-flex;align-items:center;line-height:1}praxis-settings-panel .settings-panel-footer .mdc-button__label .mat-icon{display:inline-flex;align-items:center;justify-content:center;line-height:1}@container settings-panel-shell (max-width: 520px){praxis-settings-panel .settings-panel-footer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;padding:10px 12px;column-gap:8px}praxis-settings-panel .settings-panel-footer .spacer{display:none}praxis-settings-panel .settings-panel-footer button{justify-content:center;width:100%;min-width:0;min-height:44px;height:auto;padding:8px}praxis-settings-panel .settings-panel-action-label{white-space:normal;overflow-wrap:anywhere;text-align:center}praxis-settings-panel .settings-panel-footer .mdc-button__label{min-width:0;max-width:100%}praxis-settings-panel .settings-panel-footer .mdc-button__label>span{min-width:0;line-height:1.25}}@container settings-panel-shell (max-width: 280px){praxis-settings-panel .settings-panel-footer{grid-template-columns:minmax(0,1fr)}}praxis-settings-panel .settings-panel .mat-divider{background-color:var(--pfx-settings-panel-outline-variant)}praxis-settings-panel .settings-panel .mat-expansion-panel{background:var(--pfx-settings-panel-surface-container);border:1px solid var(--pfx-settings-panel-outline-variant);border-radius:var(--md-sys-shape-corner-medium, 12px);box-shadow:var(--md-sys-elevation-level1, 0 2px 8px rgba(0, 0, 0, .08));color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel-header{background:var(--pfx-settings-panel-surface-container);color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-content{color:var(--pfx-settings-panel-on-surface);flex-wrap:wrap;gap:4px 12px;min-width:0;overflow:visible}praxis-settings-panel .settings-panel .mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:hover{background:color-mix(in srgb,var(--pfx-settings-panel-surface-container-high) 84%,var(--pfx-settings-panel-primary) 16%)}praxis-settings-panel .settings-panel .mat-expansion-panel.mat-expanded>.mat-expansion-panel-header{background:var(--pfx-settings-panel-surface-container-high)}praxis-settings-panel .settings-panel .mat-expansion-panel-header mat-icon,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-icon{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-title,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description{color:var(--pfx-settings-panel-on-surface);min-width:0;overflow:visible;white-space:normal}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description{color:var(--pfx-settings-panel-on-surface-variant);flex-wrap:wrap;gap:8px}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-title>*,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description>*{color:inherit}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-title small,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-panel-header-description small{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-indicator,praxis-settings-panel .settings-panel .mat-expansion-panel-header .mat-expansion-indicator:after{color:var(--pfx-settings-panel-on-surface-variant);border-color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-expansion-panel .mat-action-row{border-top-color:var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .mat-accordion,praxis-settings-panel .settings-panel .mat-accordion .mat-expansion-panel-spacing{background:transparent}praxis-settings-panel .settings-panel .mat-expansion-panel-content,praxis-settings-panel .settings-panel .mat-expansion-panel-content-wrapper,praxis-settings-panel .settings-panel .mat-expansion-panel-body{background:var(--pfx-settings-panel-surface-container);color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-expansion-panel .mat-expansion-panel-body{padding:8px}praxis-settings-panel .settings-panel .mat-expansion-panel .mat-expansion-panel-body>*{color:inherit}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header{border-bottom:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab{min-width:0}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab .mdc-tab__text-label{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab:hover .mdc-tab__text-label,praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab:focus .mdc-tab__text-label{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header-pagination{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header-pagination-chevron{border-color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mat-mdc-tab-header-pagination:not(.mat-mdc-tab-header-pagination-disabled):hover{background:color-mix(in srgb,var(--pfx-settings-panel-surface-container-high) 84%,var(--pfx-settings-panel-primary) 16%)}praxis-settings-panel .settings-panel .mat-mdc-tab-group .mdc-tab-indicator__content--underline{border-color:var(--pfx-settings-panel-primary)}praxis-settings-panel .settings-panel .mat-mdc-card{background:var(--pfx-settings-panel-surface-container-low);border:1px solid var(--pfx-settings-panel-outline-variant);color:var(--pfx-settings-panel-on-surface);box-shadow:var(--md-sys-elevation-level1, 0 2px 8px rgba(0, 0, 0, .08))}praxis-settings-panel .settings-panel .mat-mdc-card-subtitle{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-card-title,praxis-settings-panel .settings-panel .mat-mdc-card-content{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-form-field{width:100%;align-self:start;--mdc-filled-text-field-container-color: var( --pfx-settings-panel-surface-container );--mdc-filled-text-field-hover-container-color: var( --pfx-settings-panel-surface-container-high );--mdc-filled-text-field-focus-container-color: var( --pfx-settings-panel-surface-container-high );--mdc-filled-text-field-active-indicator-color: var( --pfx-settings-panel-outline-variant );--mdc-filled-text-field-hover-active-indicator-color: var( --pfx-settings-panel-secondary );--mdc-filled-text-field-focus-active-indicator-color: var( --pfx-settings-panel-primary );--mdc-filled-text-field-label-text-color: var( --pfx-settings-panel-on-surface-variant );--mdc-filled-text-field-focus-label-text-color: var( --pfx-settings-panel-primary );--mdc-filled-text-field-input-text-color: var( --pfx-settings-panel-on-surface );--mdc-filled-text-field-caret-color: var(--pfx-settings-panel-primary);--mdc-outlined-text-field-outline-color: var( --pfx-settings-panel-outline-variant );--mdc-outlined-text-field-hover-outline-color: var( --pfx-settings-panel-secondary );--mdc-outlined-text-field-focus-outline-color: var( --pfx-settings-panel-primary );--mdc-outlined-text-field-label-text-color: var( --pfx-settings-panel-on-surface-variant );--mdc-outlined-text-field-focus-label-text-color: var( --pfx-settings-panel-primary );--mdc-outlined-text-field-input-text-color: var( --pfx-settings-panel-on-surface );--mdc-outlined-text-field-caret-color: var(--pfx-settings-panel-primary);--mat-form-field-focus-select-arrow-color: var( --pfx-settings-panel-primary );--mat-form-field-enabled-select-arrow-color: var( --pfx-settings-panel-on-surface-variant )}praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field--filled,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled{background-color:var(--pfx-settings-panel-surface-container);border-radius:var(--md-sys-shape-corner-small, 8px) var(--md-sys-shape-corner-small, 8px) 0 0}praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled .mat-mdc-form-field-flex,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled .mat-mdc-form-field-infix,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled .mat-mdc-form-field-focus-overlay{background:var(--pfx-settings-panel-surface-container);color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field--outlined,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--outlined,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--outlined .mat-mdc-form-field-flex,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--outlined .mat-mdc-form-field-infix{background:transparent;background-color:transparent;color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-form-field-focus-overlay{opacity:0}praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled .mdc-floating-label,praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-select-placeholder,praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-select-arrow,praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-floating-label{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-select-value,praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-select-value-text,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled .mdc-text-field__input,praxis-settings-panel .settings-panel .mat-mdc-form-field input,praxis-settings-panel .settings-panel .mat-mdc-form-field textarea,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field__input{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--focused:not(.mdc-text-field--invalid) .mat-mdc-floating-label,praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--filled.mdc-text-field--focused .mdc-floating-label{color:var(--pfx-settings-panel-primary)}praxis-settings-panel .settings-panel .mat-mdc-form-field .mdc-text-field--invalid .mat-mdc-floating-label{color:var(--pfx-settings-panel-error)}praxis-settings-panel .settings-panel .mat-mdc-form-field-subscript-wrapper{position:relative;box-sizing:border-box}praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-form-field-hint-wrapper,praxis-settings-panel .settings-panel .mat-mdc-form-field .mat-mdc-form-field-error-wrapper{position:relative;top:auto;left:auto;right:auto;padding-top:4px;line-height:1.35}praxis-settings-panel .settings-panel .mat-mdc-form-field-bottom-align:before{display:none}praxis-settings-panel .settings-panel .mat-mdc-form-field-subscript-wrapper,praxis-settings-panel .settings-panel .mat-mdc-form-field-hint-wrapper,praxis-settings-panel .settings-panel .mat-mdc-form-field-error-wrapper,praxis-settings-panel .settings-panel .mat-mdc-hint{color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-button-toggle-group{border-color:var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .mat-button-toggle{background:var(--pfx-settings-panel-surface-container-low);color:var(--pfx-settings-panel-on-surface-variant)}praxis-settings-panel .settings-panel .mat-button-toggle+.mat-button-toggle{border-left-color:var(--pfx-settings-panel-outline-variant)}praxis-settings-panel .settings-panel .mat-button-toggle-group .mat-button-toggle-checked{background:var(--pfx-settings-panel-primary-container);color:var(--pfx-settings-panel-on-primary-container)}praxis-settings-panel .settings-panel .mat-button-toggle .mat-icon,praxis-settings-panel .settings-panel .mat-button-toggle-checked .mat-icon{color:inherit}praxis-settings-panel .settings-panel .mat-mdc-slide-toggle .mdc-label{color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel .pfx-editor-section{box-sizing:border-box;width:100%;min-width:0;padding:16px;border-radius:16px;border:1px solid var(--pfx-settings-panel-outline-variant);background:var(--pfx-settings-panel-surface-container-low)}praxis-settings-panel .settings-panel .pfx-editor-subgroup{display:grid;gap:12px;padding-top:14px;border-top:1px solid color-mix(in srgb,var(--pfx-settings-panel-outline-variant) 70%,transparent)}praxis-settings-panel .settings-panel .pfx-editor-subgroup:first-child{padding-top:0;border-top:0}praxis-settings-panel .settings-panel .pfx-editor-grid-12{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px;min-width:0}praxis-settings-panel .settings-panel .pfx-editor-toggle-cluster{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px}.settings-panel{grid-template-columns:minmax(0,1fr);min-width:0;max-width:100%}.settings-panel-body{overflow-x:hidden;min-width:0}.settings-panel-body>*{min-width:0;max-width:100%}.praxis-settings-panel-backdrop{background:var(--pfx-settings-panel-backdrop, var(--pfx-backdrop, rgba(8, 15, 26, .42)));backdrop-filter:blur(var(--pfx-settings-panel-backdrop-blur, var(--pfx-backdrop-blur, 6px))) saturate(110%);-webkit-backdrop-filter:blur(var(--pfx-settings-panel-backdrop-blur, var(--pfx-backdrop-blur, 6px))) saturate(110%)}:is(.cdk-overlay-pane.praxis-settings-panel-pane,.praxis-settings-panel-pane){position:fixed;top:0;right:0;display:flex;align-items:stretch;height:100vh;max-width:var(--pfx-settings-panel-pane-max-width, 100vw);max-height:100vh;z-index:var(--pfx-settings-panel-z-index, var(--praxis-z-settings-panel, var(--praxis-layer-settings-panel, 1220)));transition:width var(--pfx-side-panel-motion-duration-enter, .3s) var(--pfx-side-panel-motion-easing-enter, ease)}.praxis-settings-panel-pane .settings-panel{pointer-events:auto}@media(prefers-reduced-motion:reduce){.praxis-settings-panel-pane{transition:none}}:is(.cdk-overlay-pane.praxis-settings-panel-pane.praxis-settings-panel-pane--preview,.praxis-settings-panel-pane.praxis-settings-panel-pane--preview){top:auto;bottom:12px;right:12px;height:auto;width:min(560px,100vw - 24px);min-width:0;transition:none}.praxis-settings-panel-backdrop.praxis-settings-panel-backdrop--preview{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}.praxis-settings-preview-target{outline:2px solid var(--md-sys-color-primary);outline-offset:3px}praxis-settings-panel .settings-panel [hidden]{display:none}praxis-settings-panel .settings-panel .settings-panel-header[hidden],praxis-settings-panel .settings-panel .settings-panel-body[hidden],praxis-settings-panel .settings-panel .settings-panel-footer[hidden]{display:none}praxis-settings-panel .settings-panel--preview{height:auto;min-height:0;grid-template-rows:auto;border-radius:16px}praxis-settings-panel .settings-panel-preview-bar{display:flex;align-items:center;gap:16px;padding:16px;color:var(--pfx-settings-panel-on-surface)}praxis-settings-panel .settings-panel-preview-bar p{margin:4px 0 0;color:var(--pfx-settings-panel-on-surface-variant);font-size:.875rem}praxis-settings-panel .settings-panel-preview-bar button{flex-shrink:0}@container settings-panel-shell (max-width: 599px){praxis-settings-panel .settings-panel-header:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:start}praxis-settings-panel .settings-panel-header .spacer{display:none}praxis-settings-panel .settings-panel-header .settings-panel-title{grid-column:1;grid-row:1;overflow-wrap:anywhere}praxis-settings-panel .settings-panel-header [data-testid=settings-panel-toggle-expand]{grid-column:2;grid-row:1}praxis-settings-panel .settings-panel-header [data-testid=settings-panel-close-icon]{grid-column:3;grid-row:1}praxis-settings-panel .settings-panel-header [data-testid=settings-panel-preview]{grid-column:1/-1;grid-row:2;justify-self:start;max-width:100%}praxis-settings-panel .settings-panel-preview-bar{flex-direction:column;align-items:stretch;gap:8px}}@media(prefers-reduced-transparency:reduce){.praxis-settings-panel-backdrop{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--pfx-backdrop-opaque, rgba(8, 15, 26, .72))}}@media(forced-colors:active){praxis-settings-panel .settings-panel{border:1px solid CanvasText;background:Canvas;color:CanvasText}praxis-settings-panel .settings-panel-save-error,praxis-settings-panel .settings-panel-scope{border:1px solid CanvasText;background:Canvas;color:CanvasText}.praxis-settings-panel-backdrop{backdrop-filter:none;-webkit-backdrop-filter:none;background:Canvas;opacity:.75}}\n"] }]
1167
1920
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.MatDialog }, { type: i0.ElementRef }, { type: i1$1.OverlayContainer }], propDecorators: { focusTrap: [{
1168
1921
  type: ViewChild,
1169
1922
  args: [CdkTrapFocus]
1170
1923
  }], contentHost: [{
1171
1924
  type: ViewChild,
1172
1925
  args: ['contentHost', { read: ViewContainerRef, static: true }]
1926
+ }], saveErrorBanner: [{
1927
+ type: ViewChild,
1928
+ args: ['saveErrorBanner']
1173
1929
  }], handleKeydown: [{
1174
1930
  type: HostListener,
1175
1931
  args: ['document:keydown', ['$event']]
@@ -1189,14 +1945,18 @@ class SettingsPanelRef {
1189
1945
  appliedSubject = new Subject();
1190
1946
  savedSubject = new Subject();
1191
1947
  resetSubject = new Subject();
1948
+ tenantBaselineRestoredSubject = new Subject();
1192
1949
  closedSubject = new Subject();
1193
1950
  sizeChangedSubject = new Subject();
1951
+ persistenceErrorSubject = new Subject();
1194
1952
  sizePersistor;
1195
1953
  applied$ = this.appliedSubject.asObservable();
1196
1954
  saved$ = this.savedSubject.asObservable();
1197
1955
  reset$ = this.resetSubject.asObservable();
1956
+ tenantBaselineRestored$ = this.tenantBaselineRestoredSubject.asObservable();
1198
1957
  closed$ = this.closedSubject.asObservable();
1199
1958
  sizeChanged$ = this.sizeChangedSubject.asObservable();
1959
+ persistenceError$ = this.persistenceErrorSubject.asObservable();
1200
1960
  constructor(overlayRef) {
1201
1961
  this.overlayRef = overlayRef;
1202
1962
  }
@@ -1216,6 +1976,12 @@ class SettingsPanelRef {
1216
1976
  reset() {
1217
1977
  this.resetSubject.next();
1218
1978
  }
1979
+ notifyTenantBaselineRestored(baseline) {
1980
+ this.tenantBaselineRestoredSubject.next(baseline);
1981
+ }
1982
+ reportPersistenceError(error) {
1983
+ this.persistenceErrorSubject.next(error);
1984
+ }
1219
1985
  bindSizePersistor(fn) {
1220
1986
  this.sizePersistor = fn;
1221
1987
  }
@@ -1246,23 +2012,29 @@ class SettingsPanelRef {
1246
2012
  this.appliedSubject.complete();
1247
2013
  this.savedSubject.complete();
1248
2014
  this.resetSubject.complete();
2015
+ this.tenantBaselineRestoredSubject.complete();
1249
2016
  this.closedSubject.complete();
1250
2017
  this.sizeChangedSubject.complete();
2018
+ this.persistenceErrorSubject.complete();
1251
2019
  }
1252
2020
  }
1253
2021
  class DeferredSettingsPanelRef {
1254
2022
  appliedSubject = new Subject();
1255
2023
  savedSubject = new Subject();
1256
2024
  resetSubject = new Subject();
2025
+ tenantBaselineRestoredSubject = new Subject();
1257
2026
  closedSubject = new ReplaySubject(1);
1258
2027
  sizeChangedSubject = new Subject();
2028
+ persistenceErrorSubject = new Subject();
1259
2029
  target;
1260
2030
  completed = false;
1261
2031
  applied$ = this.appliedSubject.asObservable();
1262
2032
  saved$ = this.savedSubject.asObservable();
1263
2033
  reset$ = this.resetSubject.asObservable();
2034
+ tenantBaselineRestored$ = this.tenantBaselineRestoredSubject.asObservable();
1264
2035
  closed$ = this.closedSubject.asObservable();
1265
2036
  sizeChanged$ = this.sizeChangedSubject.asObservable();
2037
+ persistenceError$ = this.persistenceErrorSubject.asObservable();
1266
2038
  resolve(target) {
1267
2039
  if (this.completed) {
1268
2040
  return;
@@ -1271,7 +2043,9 @@ class DeferredSettingsPanelRef {
1271
2043
  target.applied$.subscribe((value) => this.appliedSubject.next(value));
1272
2044
  target.saved$.subscribe((value) => this.savedSubject.next(value));
1273
2045
  target.reset$.subscribe(() => this.resetSubject.next());
2046
+ target.tenantBaselineRestored$.subscribe((baseline) => this.tenantBaselineRestoredSubject.next(baseline));
1274
2047
  target.sizeChanged$.subscribe((value) => this.sizeChangedSubject.next(value));
2048
+ target.persistenceError$.subscribe((error) => this.persistenceErrorSubject.next(error));
1275
2049
  target.closed$.subscribe((reason) => {
1276
2050
  this.closedSubject.next(reason);
1277
2051
  this.complete();
@@ -1286,6 +2060,12 @@ class DeferredSettingsPanelRef {
1286
2060
  reset() {
1287
2061
  this.target?.reset();
1288
2062
  }
2063
+ notifyTenantBaselineRestored(baseline) {
2064
+ this.target?.notifyTenantBaselineRestored(baseline);
2065
+ }
2066
+ reportPersistenceError(error) {
2067
+ this.target?.reportPersistenceError(error);
2068
+ }
1289
2069
  bindSizePersistor(_fn) { }
1290
2070
  setPreviewing(previewing) {
1291
2071
  this.target?.setPreviewing(previewing);
@@ -1312,8 +2092,10 @@ class DeferredSettingsPanelRef {
1312
2092
  this.appliedSubject.complete();
1313
2093
  this.savedSubject.complete();
1314
2094
  this.resetSubject.complete();
2095
+ this.tenantBaselineRestoredSubject.complete();
1315
2096
  this.closedSubject.complete();
1316
2097
  this.sizeChangedSubject.complete();
2098
+ this.persistenceErrorSubject.complete();
1317
2099
  }
1318
2100
  }
1319
2101
 
@@ -2002,7 +2784,17 @@ class SettingsPanelService {
2002
2784
  expanded: config.expanded || false,
2003
2785
  });
2004
2786
  panelRef.instance.configureDiagnostics(config.diagnostics);
2787
+ panelRef.instance.configStorageKey = config.configStorageKey;
2788
+ if (config.showWriteScope !== undefined) {
2789
+ panelRef.instance.showWriteScope = config.showWriteScope;
2790
+ }
2791
+ if (config.canSwitchWriteScope !== undefined) {
2792
+ panelRef.instance.canSwitchWriteScope = config.canSwitchWriteScope;
2793
+ }
2794
+ panelRef.instance.persistSaveHandler = config.onSave;
2795
+ panelRef.instance.persistResetHandler = config.onReset;
2005
2796
  panelRef.instance.previewTarget = config.previewTarget;
2797
+ panelRef.instance.contextNavigation = config.contextNavigation;
2006
2798
  this.currentPanelInstance = panelRef.instance;
2007
2799
  this.currentScope = scope;
2008
2800
  this.currentContentParentInjector = contentParentInjector;
@@ -2086,6 +2878,12 @@ function providePraxisSettingsPanelBridge() {
2086
2878
  title: opts.title,
2087
2879
  titleIcon: opts.titleIcon,
2088
2880
  previewTarget: opts.previewTarget,
2881
+ contextNavigation: opts.contextNavigation,
2882
+ configStorageKey: opts.configStorageKey,
2883
+ showWriteScope: opts.showWriteScope,
2884
+ canSwitchWriteScope: opts.canSwitchWriteScope,
2885
+ onSave: opts.onSave,
2886
+ onReset: opts.onReset,
2089
2887
  content: {
2090
2888
  component: opts.content.component,
2091
2889
  inputs: (opts.content.inputs || undefined),
@@ -2158,6 +2956,10 @@ class SurfaceDrawerComponent {
2158
2956
  }
2159
2957
  setTitle(title) {
2160
2958
  this.title = title;
2959
+ const active = this.frames[this.frames.length - 1];
2960
+ if (active) {
2961
+ active.definition = { ...active.definition, title };
2962
+ }
2161
2963
  this.cdr.markForCheck();
2162
2964
  }
2163
2965
  ngOnDestroy() {
@@ -2180,16 +2982,12 @@ class SurfaceDrawerComponent {
2180
2982
  initializeFrame(definition, injector, inputs) {
2181
2983
  this.destroyAllFrames();
2182
2984
  const frame = this.createFrame(definition, injector, inputs);
2183
- this.frames = [frame];
2184
- this.applyFrameHeader(frame);
2185
2985
  return frame.componentRef;
2186
2986
  }
2187
2987
  pushFrame(definition, injector, inputs) {
2188
2988
  this.captureActiveFrameState(definition.returnFocusTo);
2189
2989
  this.detachActiveView();
2190
2990
  const frame = this.createFrame(definition, injector, inputs);
2191
- this.frames.push(frame);
2192
- this.applyFrameHeader(frame);
2193
2991
  this.focusNavigationControl();
2194
2992
  return frame.componentRef;
2195
2993
  }
@@ -2199,8 +2997,6 @@ class SurfaceDrawerComponent {
2199
2997
  }
2200
2998
  this.removeActiveFrame();
2201
2999
  const frame = this.createFrame(definition, injector, inputs);
2202
- this.frames.push(frame);
2203
- this.applyFrameHeader(frame);
2204
3000
  this.focusNavigationControl();
2205
3001
  return frame.componentRef;
2206
3002
  }
@@ -2247,16 +3043,21 @@ class SurfaceDrawerComponent {
2247
3043
  }
2248
3044
  createFrame(definition, injector, inputs) {
2249
3045
  const componentRef = this.contentHost.createComponent(definition.content.component, { injector });
2250
- this.applyInputs(componentRef, inputs);
2251
- this.contentRef = componentRef;
2252
- this.cdr.markForCheck();
2253
- return {
3046
+ const frame = {
2254
3047
  definition,
2255
3048
  componentRef,
2256
3049
  scrollTop: 0,
2257
3050
  restoreFocusTo: null,
2258
3051
  canLeave: definition.canLeave ?? null,
2259
3052
  };
3053
+ // Hosted lifecycle hooks register their guard and header overrides through the active frame ref.
3054
+ // Make that frame current and apply its default header before the first detectChanges runs those hooks.
3055
+ this.frames.push(frame);
3056
+ this.contentRef = componentRef;
3057
+ this.applyFrameHeader(frame);
3058
+ this.applyInputs(componentRef, inputs);
3059
+ this.cdr.markForCheck();
3060
+ return frame;
2260
3061
  }
2261
3062
  captureActiveFrameState(returnFocusTo) {
2262
3063
  const active = this.frames[this.frames.length - 1];
@@ -2322,7 +3123,7 @@ class SurfaceDrawerComponent {
2322
3123
  const supportedInputs = this.resolveSupportedInputs(componentRef);
2323
3124
  const canUseSetInput = typeof componentRef.setInput === 'function';
2324
3125
  for (const [key, value] of Object.entries(inputs)) {
2325
- if (!canUseSetInput && supportedInputs && !supportedInputs.has(key)) {
3126
+ if (supportedInputs && !supportedInputs.has(key)) {
2326
3127
  continue;
2327
3128
  }
2328
3129
  try {
@@ -2346,7 +3147,7 @@ class SurfaceDrawerComponent {
2346
3147
  return new Set(Object.keys(declaredInputs));
2347
3148
  }
2348
3149
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SurfaceDrawerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.PraxisI18nService }], target: i0.ɵɵFactoryTarget.Component });
2349
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: SurfaceDrawerComponent, isStandalone: true, selector: "praxis-surface-drawer", viewQueries: [{ propertyName: "contentHost", first: true, predicate: ["contentHost"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "body", first: true, predicate: ["body"], descendants: true, read: ElementRef }, { propertyName: "backButton", first: true, predicate: ["backButton"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n class=\"pfx-surface-drawer\"\n [class.has-header]=\"hasHeader\"\n [class.width-narrow]=\"widthClass === 'width-narrow'\"\n [class.width-default]=\"widthClass === 'width-default'\"\n [class.width-wide]=\"widthClass === 'width-wide'\"\n [class.width-full]=\"widthClass === 'width-full'\"\n [class.use-host-width]=\"useHostWidth\"\n [ngClass]=\"hostClasses\"\n [ngStyle]=\"hostCssVars\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"hasHeader ? titleId : null\"\n [attr.aria-describedby]=\"subtitle ? subtitleId : null\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n>\n @if (hasHeader) {\n <header class=\"pfx-surface-drawer__header\">\n @if (canGoBack) {\n <button\n #backButton\n praxisIconButton=\"arrow_back\"\n size=\"compact\"\n type=\"button\"\n class=\"pfx-surface-drawer__back\"\n [attr.aria-label]=\"backLabel\"\n [matTooltip]=\"backLabel\"\n (click)=\"onBack?.()\"\n ></button>\n }\n <div class=\"pfx-surface-drawer__title-block\">\n @if (titleIcon) {\n <mat-icon class=\"pfx-surface-drawer__title-icon\" [praxisIcon]=\"titleIcon\"></mat-icon>\n }\n <div class=\"pfx-surface-drawer__copy\">\n @if (title) {\n <h2 class=\"pfx-surface-drawer__title\" [id]=\"titleId\">{{ title }}</h2>\n }\n @if (subtitle) {\n <p class=\"pfx-surface-drawer__subtitle\" [id]=\"subtitleId\">{{ subtitle }}</p>\n }\n </div>\n </div>\n <button\n praxisIconButton=\"close\"\n size=\"compact\"\n type=\"button\"\n class=\"pfx-surface-drawer__close\"\n [attr.aria-label]=\"closeLabel\"\n [matTooltip]=\"closeLabel\"\n (click)=\"onClose?.()\"\n ></button>\n </header>\n }\n\n <section #body class=\"pfx-surface-drawer__body\">\n <ng-template #contentHost></ng-template>\n </section>\n</div>\n", styles: [":host{display:block;height:100%;width:100%;min-width:0;flex:1 1 auto}.pfx-surface-drawer{display:grid;grid-template-rows:auto 1fr;height:100%;min-width:0;max-width:100%;overflow:hidden;background:var(--md-sys-color-surface-container, #fff);color:var(--md-sys-color-on-surface, #111);border-left:1px solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, .12));border-radius:var(--pfx-side-panel-border-radius, 0);box-shadow:var(--pfx-side-panel-elevation, var(--md-sys-elevation-level2, 0 8px 24px rgba(0, 0, 0, .16)));width:var(--pfx-side-panel-width, 720px);transition:width var(--pfx-side-panel-motion-duration-enter, .22s) var(--pfx-side-panel-motion-easing-enter, cubic-bezier(.2, 0, 0, 1)),box-shadow var(--pfx-side-panel-motion-duration-enter, .22s) var(--pfx-side-panel-motion-easing-enter, cubic-bezier(.2, 0, 0, 1))}.pfx-surface-drawer.use-host-width{width:100%;max-width:100%}.pfx-surface-drawer.width-narrow{width:var(--pfx-side-panel-width, 420px)}.pfx-surface-drawer.width-default{width:var(--pfx-side-panel-width, 720px)}.pfx-surface-drawer.width-wide{width:var(--pfx-side-panel-width, 960px)}.pfx-surface-drawer.width-full{width:min(100vw,var(--pfx-side-panel-max-width, 100vw))}.pfx-surface-drawer__header{display:flex;align-items:flex-start;gap:var(--pfx-side-panel-header-gap, 12px);min-height:var(--pfx-side-panel-header-height, 64px);padding:var(--pfx-side-panel-header-padding-y, 16px) var(--pfx-side-panel-header-padding-x, 20px);box-sizing:border-box;border-bottom:1px solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, .12));background:var(--md-sys-color-surface-container-high, #f7f7f7)}.pfx-surface-drawer__title-block{display:flex;align-items:flex-start;gap:12px;min-width:0;flex:1 1 auto}.pfx-surface-drawer__title-icon{flex:0 0 auto;display:grid;place-items:center;width:36px;height:36px;margin-top:1px;border-radius:10px;background:var(--md-sys-color-primary-container, rgba(47, 78, 178, .12));color:var(--md-sys-color-primary, currentColor)}.pfx-surface-drawer__copy{min-width:0}.pfx-surface-drawer__title,.pfx-surface-drawer__subtitle{margin:0}.pfx-surface-drawer__title{font-size:1.125rem;font-weight:650;line-height:1.35}.pfx-surface-drawer__subtitle{margin-top:6px;color:var(--md-sys-color-on-surface-variant, rgba(0, 0, 0, .64));font-size:.875rem;line-height:1.45;text-wrap:pretty}.pfx-surface-drawer__close{flex:0 0 auto}.pfx-surface-drawer__back{flex:0 0 auto;margin-top:1px}.pfx-surface-drawer__body{min-height:0;overflow:auto;padding:var(--pfx-side-panel-body-padding, 16px);background:var(--md-sys-color-surface, #fff)}@media(prefers-reduced-motion:reduce){.pfx-surface-drawer{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3150
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: SurfaceDrawerComponent, isStandalone: true, selector: "praxis-surface-drawer", viewQueries: [{ propertyName: "contentHost", first: true, predicate: ["contentHost"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "body", first: true, predicate: ["body"], descendants: true, read: ElementRef }, { propertyName: "backButton", first: true, predicate: ["backButton"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n class=\"pfx-surface-drawer\"\n [class.has-header]=\"hasHeader\"\n [class.width-narrow]=\"widthClass === 'width-narrow'\"\n [class.width-default]=\"widthClass === 'width-default'\"\n [class.width-wide]=\"widthClass === 'width-wide'\"\n [class.width-full]=\"widthClass === 'width-full'\"\n [class.use-host-width]=\"useHostWidth\"\n [ngClass]=\"hostClasses\"\n [ngStyle]=\"hostCssVars\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"hasHeader ? titleId : null\"\n [attr.aria-describedby]=\"subtitle ? subtitleId : null\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n>\n @if (hasHeader) {\n <header class=\"pfx-surface-drawer__header\">\n @if (canGoBack) {\n <button\n #backButton\n praxisIconButton=\"arrow_back\"\n size=\"compact\"\n type=\"button\"\n class=\"pfx-surface-drawer__back\"\n [attr.aria-label]=\"backLabel\"\n [matTooltip]=\"backLabel\"\n (click)=\"onBack?.()\"\n ></button>\n }\n <div class=\"pfx-surface-drawer__title-block\">\n @if (titleIcon) {\n <mat-icon class=\"pfx-surface-drawer__title-icon\" [praxisIcon]=\"titleIcon\"></mat-icon>\n }\n <div class=\"pfx-surface-drawer__copy\">\n @if (title) {\n <h2 class=\"pfx-surface-drawer__title\" [id]=\"titleId\" tabindex=\"-1\" cdkFocusInitial>{{ title }}</h2>\n }\n @if (subtitle) {\n <p class=\"pfx-surface-drawer__subtitle\" [id]=\"subtitleId\">{{ subtitle }}</p>\n }\n </div>\n </div>\n <button\n praxisIconButton=\"close\"\n size=\"compact\"\n type=\"button\"\n class=\"pfx-surface-drawer__close\"\n [attr.aria-label]=\"closeLabel\"\n [matTooltip]=\"closeLabel\"\n (click)=\"onClose?.()\"\n ></button>\n </header>\n }\n\n <section #body class=\"pfx-surface-drawer__body\">\n <ng-template #contentHost></ng-template>\n </section>\n</div>\n", styles: [":host{display:block;height:100%;width:100%;min-width:0;flex:1 1 auto}.pfx-surface-drawer{display:grid;grid-template-rows:auto 1fr;height:100%;min-width:0;max-width:100%;overflow:hidden;background:var(--md-sys-color-surface-container, var(--mat-sys-surface-container));color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface));border-left:1px solid var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant));border-radius:var(--pfx-side-panel-border-radius, 0);box-shadow:var(--pfx-side-panel-elevation, var(--md-sys-elevation-level2, 0 8px 24px rgba(0, 0, 0, .16)));width:var(--pfx-side-panel-width, 720px);transition:width var(--pfx-side-panel-motion-duration-enter, .22s) var(--pfx-side-panel-motion-easing-enter, cubic-bezier(.2, 0, 0, 1)),box-shadow var(--pfx-side-panel-motion-duration-enter, .22s) var(--pfx-side-panel-motion-easing-enter, cubic-bezier(.2, 0, 0, 1))}.pfx-surface-drawer.use-host-width{width:100%;max-width:100%}.pfx-surface-drawer.width-narrow{width:var(--pfx-side-panel-width, 420px)}.pfx-surface-drawer.width-default{width:var(--pfx-side-panel-width, 720px)}.pfx-surface-drawer.width-wide{width:var(--pfx-side-panel-width, 960px)}.pfx-surface-drawer.width-full{width:min(100vw,var(--pfx-side-panel-max-width, 100vw))}.pfx-surface-drawer__header{display:flex;align-items:flex-start;gap:var(--pfx-side-panel-header-gap, 12px);min-height:var(--pfx-side-panel-header-height, 64px);padding:var(--pfx-side-panel-header-padding-y, 16px) var(--pfx-side-panel-header-padding-x, 20px);box-sizing:border-box;border-bottom:1px solid var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant));background:var(--md-sys-color-surface-container-high, var(--mat-sys-surface-container-high))}.pfx-surface-drawer__title-block{display:flex;align-items:flex-start;gap:12px;min-width:0;flex:1 1 auto}.pfx-surface-drawer__title-icon{flex:0 0 auto;display:grid;place-items:center;width:36px;height:36px;margin-top:1px;border-radius:10px;background:var(--md-sys-color-primary-container, var(--mat-sys-primary-container, rgba(47, 78, 178, .12)));color:var(--md-sys-color-primary, var(--mat-sys-primary, currentColor))}.pfx-surface-drawer__copy{min-width:0}.pfx-surface-drawer__title,.pfx-surface-drawer__subtitle{margin:0}.pfx-surface-drawer__title{font-size:1.125rem;font-weight:var(--mat-sys-title-medium-weight, 500);line-height:1.35}.pfx-surface-drawer__title:focus{outline:none}.pfx-surface-drawer__subtitle{margin-top:6px;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant));font-size:.875rem;line-height:1.45;text-wrap:pretty}.pfx-surface-drawer__close,.pfx-surface-drawer__back{flex:0 0 auto;--praxis-icon-button-surface-size: 36px;--praxis-icon-button-icon-size: 18px;--praxis-icon-button-radius: 10px;--praxis-icon-button-focus-radius: 10px;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant))}.pfx-surface-drawer__close{margin-inline-end:-4px;--praxis-icon-button-bg: color-mix( in srgb, var(--md-sys-color-on-surface, var(--mat-sys-on-surface)) 4.5%, transparent );--praxis-icon-button-border: 1px solid color-mix( in srgb, var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 48%, transparent )}.pfx-surface-drawer__close:hover:not(:disabled){color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface));--praxis-icon-button-hover-bg: color-mix( in srgb, var(--md-sys-color-on-surface, var(--mat-sys-on-surface)) 11%, transparent );--praxis-icon-button-hover-border-color: color-mix( in srgb, var(--md-sys-color-outline, var(--mat-sys-outline)) 48%, transparent )}.pfx-surface-drawer__close:active:not(:disabled){--praxis-icon-button-active-bg: color-mix( in srgb, var(--md-sys-color-on-surface, var(--mat-sys-on-surface)) 16%, transparent )}.pfx-surface-drawer__back{margin-top:1px;--praxis-icon-button-bg: transparent;--praxis-icon-button-border: 1px solid transparent}.pfx-surface-drawer__back:hover:not(:disabled){color:var(--md-sys-color-primary, var(--mat-sys-primary));--praxis-icon-button-hover-bg: color-mix( in srgb, var(--md-sys-color-primary, var(--mat-sys-primary)) 12%, transparent );--praxis-icon-button-hover-border-color: color-mix( in srgb, var(--md-sys-color-primary, var(--mat-sys-primary)) 30%, transparent )}.pfx-surface-drawer__body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:var(--pfx-side-panel-body-padding, 16px);background:var(--md-sys-color-surface, var(--mat-sys-surface))}@media(min-width:640px){.pfx-surface-drawer:not(.width-full){border-radius:var(--pfx-side-panel-border-radius, 16px 0 0 16px)}}@media(prefers-reduced-motion:reduce){.pfx-surface-drawer{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2350
3151
  }
2351
3152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SurfaceDrawerComponent, decorators: [{
2352
3153
  type: Component,
@@ -2359,7 +3160,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
2359
3160
  CdkTrapFocus,
2360
3161
  PraxisIconButtonComponent,
2361
3162
  PraxisIconDirective,
2362
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"pfx-surface-drawer\"\n [class.has-header]=\"hasHeader\"\n [class.width-narrow]=\"widthClass === 'width-narrow'\"\n [class.width-default]=\"widthClass === 'width-default'\"\n [class.width-wide]=\"widthClass === 'width-wide'\"\n [class.width-full]=\"widthClass === 'width-full'\"\n [class.use-host-width]=\"useHostWidth\"\n [ngClass]=\"hostClasses\"\n [ngStyle]=\"hostCssVars\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"hasHeader ? titleId : null\"\n [attr.aria-describedby]=\"subtitle ? subtitleId : null\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n>\n @if (hasHeader) {\n <header class=\"pfx-surface-drawer__header\">\n @if (canGoBack) {\n <button\n #backButton\n praxisIconButton=\"arrow_back\"\n size=\"compact\"\n type=\"button\"\n class=\"pfx-surface-drawer__back\"\n [attr.aria-label]=\"backLabel\"\n [matTooltip]=\"backLabel\"\n (click)=\"onBack?.()\"\n ></button>\n }\n <div class=\"pfx-surface-drawer__title-block\">\n @if (titleIcon) {\n <mat-icon class=\"pfx-surface-drawer__title-icon\" [praxisIcon]=\"titleIcon\"></mat-icon>\n }\n <div class=\"pfx-surface-drawer__copy\">\n @if (title) {\n <h2 class=\"pfx-surface-drawer__title\" [id]=\"titleId\">{{ title }}</h2>\n }\n @if (subtitle) {\n <p class=\"pfx-surface-drawer__subtitle\" [id]=\"subtitleId\">{{ subtitle }}</p>\n }\n </div>\n </div>\n <button\n praxisIconButton=\"close\"\n size=\"compact\"\n type=\"button\"\n class=\"pfx-surface-drawer__close\"\n [attr.aria-label]=\"closeLabel\"\n [matTooltip]=\"closeLabel\"\n (click)=\"onClose?.()\"\n ></button>\n </header>\n }\n\n <section #body class=\"pfx-surface-drawer__body\">\n <ng-template #contentHost></ng-template>\n </section>\n</div>\n", styles: [":host{display:block;height:100%;width:100%;min-width:0;flex:1 1 auto}.pfx-surface-drawer{display:grid;grid-template-rows:auto 1fr;height:100%;min-width:0;max-width:100%;overflow:hidden;background:var(--md-sys-color-surface-container, #fff);color:var(--md-sys-color-on-surface, #111);border-left:1px solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, .12));border-radius:var(--pfx-side-panel-border-radius, 0);box-shadow:var(--pfx-side-panel-elevation, var(--md-sys-elevation-level2, 0 8px 24px rgba(0, 0, 0, .16)));width:var(--pfx-side-panel-width, 720px);transition:width var(--pfx-side-panel-motion-duration-enter, .22s) var(--pfx-side-panel-motion-easing-enter, cubic-bezier(.2, 0, 0, 1)),box-shadow var(--pfx-side-panel-motion-duration-enter, .22s) var(--pfx-side-panel-motion-easing-enter, cubic-bezier(.2, 0, 0, 1))}.pfx-surface-drawer.use-host-width{width:100%;max-width:100%}.pfx-surface-drawer.width-narrow{width:var(--pfx-side-panel-width, 420px)}.pfx-surface-drawer.width-default{width:var(--pfx-side-panel-width, 720px)}.pfx-surface-drawer.width-wide{width:var(--pfx-side-panel-width, 960px)}.pfx-surface-drawer.width-full{width:min(100vw,var(--pfx-side-panel-max-width, 100vw))}.pfx-surface-drawer__header{display:flex;align-items:flex-start;gap:var(--pfx-side-panel-header-gap, 12px);min-height:var(--pfx-side-panel-header-height, 64px);padding:var(--pfx-side-panel-header-padding-y, 16px) var(--pfx-side-panel-header-padding-x, 20px);box-sizing:border-box;border-bottom:1px solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, .12));background:var(--md-sys-color-surface-container-high, #f7f7f7)}.pfx-surface-drawer__title-block{display:flex;align-items:flex-start;gap:12px;min-width:0;flex:1 1 auto}.pfx-surface-drawer__title-icon{flex:0 0 auto;display:grid;place-items:center;width:36px;height:36px;margin-top:1px;border-radius:10px;background:var(--md-sys-color-primary-container, rgba(47, 78, 178, .12));color:var(--md-sys-color-primary, currentColor)}.pfx-surface-drawer__copy{min-width:0}.pfx-surface-drawer__title,.pfx-surface-drawer__subtitle{margin:0}.pfx-surface-drawer__title{font-size:1.125rem;font-weight:650;line-height:1.35}.pfx-surface-drawer__subtitle{margin-top:6px;color:var(--md-sys-color-on-surface-variant, rgba(0, 0, 0, .64));font-size:.875rem;line-height:1.45;text-wrap:pretty}.pfx-surface-drawer__close{flex:0 0 auto}.pfx-surface-drawer__back{flex:0 0 auto;margin-top:1px}.pfx-surface-drawer__body{min-height:0;overflow:auto;padding:var(--pfx-side-panel-body-padding, 16px);background:var(--md-sys-color-surface, #fff)}@media(prefers-reduced-motion:reduce){.pfx-surface-drawer{transition:none}}\n"] }]
3163
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"pfx-surface-drawer\"\n [class.has-header]=\"hasHeader\"\n [class.width-narrow]=\"widthClass === 'width-narrow'\"\n [class.width-default]=\"widthClass === 'width-default'\"\n [class.width-wide]=\"widthClass === 'width-wide'\"\n [class.width-full]=\"widthClass === 'width-full'\"\n [class.use-host-width]=\"useHostWidth\"\n [ngClass]=\"hostClasses\"\n [ngStyle]=\"hostCssVars\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"hasHeader ? titleId : null\"\n [attr.aria-describedby]=\"subtitle ? subtitleId : null\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n>\n @if (hasHeader) {\n <header class=\"pfx-surface-drawer__header\">\n @if (canGoBack) {\n <button\n #backButton\n praxisIconButton=\"arrow_back\"\n size=\"compact\"\n type=\"button\"\n class=\"pfx-surface-drawer__back\"\n [attr.aria-label]=\"backLabel\"\n [matTooltip]=\"backLabel\"\n (click)=\"onBack?.()\"\n ></button>\n }\n <div class=\"pfx-surface-drawer__title-block\">\n @if (titleIcon) {\n <mat-icon class=\"pfx-surface-drawer__title-icon\" [praxisIcon]=\"titleIcon\"></mat-icon>\n }\n <div class=\"pfx-surface-drawer__copy\">\n @if (title) {\n <h2 class=\"pfx-surface-drawer__title\" [id]=\"titleId\" tabindex=\"-1\" cdkFocusInitial>{{ title }}</h2>\n }\n @if (subtitle) {\n <p class=\"pfx-surface-drawer__subtitle\" [id]=\"subtitleId\">{{ subtitle }}</p>\n }\n </div>\n </div>\n <button\n praxisIconButton=\"close\"\n size=\"compact\"\n type=\"button\"\n class=\"pfx-surface-drawer__close\"\n [attr.aria-label]=\"closeLabel\"\n [matTooltip]=\"closeLabel\"\n (click)=\"onClose?.()\"\n ></button>\n </header>\n }\n\n <section #body class=\"pfx-surface-drawer__body\">\n <ng-template #contentHost></ng-template>\n </section>\n</div>\n", styles: [":host{display:block;height:100%;width:100%;min-width:0;flex:1 1 auto}.pfx-surface-drawer{display:grid;grid-template-rows:auto 1fr;height:100%;min-width:0;max-width:100%;overflow:hidden;background:var(--md-sys-color-surface-container, var(--mat-sys-surface-container));color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface));border-left:1px solid var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant));border-radius:var(--pfx-side-panel-border-radius, 0);box-shadow:var(--pfx-side-panel-elevation, var(--md-sys-elevation-level2, 0 8px 24px rgba(0, 0, 0, .16)));width:var(--pfx-side-panel-width, 720px);transition:width var(--pfx-side-panel-motion-duration-enter, .22s) var(--pfx-side-panel-motion-easing-enter, cubic-bezier(.2, 0, 0, 1)),box-shadow var(--pfx-side-panel-motion-duration-enter, .22s) var(--pfx-side-panel-motion-easing-enter, cubic-bezier(.2, 0, 0, 1))}.pfx-surface-drawer.use-host-width{width:100%;max-width:100%}.pfx-surface-drawer.width-narrow{width:var(--pfx-side-panel-width, 420px)}.pfx-surface-drawer.width-default{width:var(--pfx-side-panel-width, 720px)}.pfx-surface-drawer.width-wide{width:var(--pfx-side-panel-width, 960px)}.pfx-surface-drawer.width-full{width:min(100vw,var(--pfx-side-panel-max-width, 100vw))}.pfx-surface-drawer__header{display:flex;align-items:flex-start;gap:var(--pfx-side-panel-header-gap, 12px);min-height:var(--pfx-side-panel-header-height, 64px);padding:var(--pfx-side-panel-header-padding-y, 16px) var(--pfx-side-panel-header-padding-x, 20px);box-sizing:border-box;border-bottom:1px solid var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant));background:var(--md-sys-color-surface-container-high, var(--mat-sys-surface-container-high))}.pfx-surface-drawer__title-block{display:flex;align-items:flex-start;gap:12px;min-width:0;flex:1 1 auto}.pfx-surface-drawer__title-icon{flex:0 0 auto;display:grid;place-items:center;width:36px;height:36px;margin-top:1px;border-radius:10px;background:var(--md-sys-color-primary-container, var(--mat-sys-primary-container, rgba(47, 78, 178, .12)));color:var(--md-sys-color-primary, var(--mat-sys-primary, currentColor))}.pfx-surface-drawer__copy{min-width:0}.pfx-surface-drawer__title,.pfx-surface-drawer__subtitle{margin:0}.pfx-surface-drawer__title{font-size:1.125rem;font-weight:var(--mat-sys-title-medium-weight, 500);line-height:1.35}.pfx-surface-drawer__title:focus{outline:none}.pfx-surface-drawer__subtitle{margin-top:6px;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant));font-size:.875rem;line-height:1.45;text-wrap:pretty}.pfx-surface-drawer__close,.pfx-surface-drawer__back{flex:0 0 auto;--praxis-icon-button-surface-size: 36px;--praxis-icon-button-icon-size: 18px;--praxis-icon-button-radius: 10px;--praxis-icon-button-focus-radius: 10px;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant))}.pfx-surface-drawer__close{margin-inline-end:-4px;--praxis-icon-button-bg: color-mix( in srgb, var(--md-sys-color-on-surface, var(--mat-sys-on-surface)) 4.5%, transparent );--praxis-icon-button-border: 1px solid color-mix( in srgb, var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 48%, transparent )}.pfx-surface-drawer__close:hover:not(:disabled){color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface));--praxis-icon-button-hover-bg: color-mix( in srgb, var(--md-sys-color-on-surface, var(--mat-sys-on-surface)) 11%, transparent );--praxis-icon-button-hover-border-color: color-mix( in srgb, var(--md-sys-color-outline, var(--mat-sys-outline)) 48%, transparent )}.pfx-surface-drawer__close:active:not(:disabled){--praxis-icon-button-active-bg: color-mix( in srgb, var(--md-sys-color-on-surface, var(--mat-sys-on-surface)) 16%, transparent )}.pfx-surface-drawer__back{margin-top:1px;--praxis-icon-button-bg: transparent;--praxis-icon-button-border: 1px solid transparent}.pfx-surface-drawer__back:hover:not(:disabled){color:var(--md-sys-color-primary, var(--mat-sys-primary));--praxis-icon-button-hover-bg: color-mix( in srgb, var(--md-sys-color-primary, var(--mat-sys-primary)) 12%, transparent );--praxis-icon-button-hover-border-color: color-mix( in srgb, var(--md-sys-color-primary, var(--mat-sys-primary)) 30%, transparent )}.pfx-surface-drawer__body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:var(--pfx-side-panel-body-padding, 16px);background:var(--md-sys-color-surface, var(--mat-sys-surface))}@media(min-width:640px){.pfx-surface-drawer:not(.width-full){border-radius:var(--pfx-side-panel-border-radius, 16px 0 0 16px)}}@media(prefers-reduced-motion:reduce){.pfx-surface-drawer{transition:none}}\n"] }]
2363
3164
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.PraxisI18nService }], propDecorators: { contentHost: [{
2364
3165
  type: ViewChild,
2365
3166
  args: ['contentHost', { read: ViewContainerRef, static: true }]
@@ -2441,6 +3242,8 @@ function providePraxisSurfaceDrawerBridge() {
2441
3242
  let panel = null;
2442
3243
  let activeRef = null;
2443
3244
  const frameRefs = [];
3245
+ let navigatingBack = false;
3246
+ let closingSession = false;
2444
3247
  const createContent = (frame, mode, runtimeRef) => {
2445
3248
  if (!panel)
2446
3249
  return null;
@@ -2477,16 +3280,44 @@ function providePraxisSurfaceDrawerBridge() {
2477
3280
  runtime.__closeFrame?.(result);
2478
3281
  };
2479
3282
  const navigateBack = async (result) => {
2480
- const leaving = frameRefs[frameRefs.length - 1];
2481
- const moved = await panel?.backFrame() ?? false;
2482
- if (!moved)
3283
+ if (navigatingBack || closingSession)
2483
3284
  return false;
2484
- if (leaving) {
2485
- frameRefs.pop();
2486
- closeFrameRef(leaving, result ?? { type: 'back' });
3285
+ navigatingBack = true;
3286
+ try {
3287
+ const leaving = frameRefs[frameRefs.length - 1];
3288
+ const moved = await panel?.backFrame() ?? false;
3289
+ if (!moved)
3290
+ return false;
3291
+ if (leaving) {
3292
+ frameRefs.pop();
3293
+ closeFrameRef(leaving, result ?? { type: 'back' });
3294
+ }
3295
+ publishNavigationState();
3296
+ return true;
3297
+ }
3298
+ finally {
3299
+ navigatingBack = false;
3300
+ }
3301
+ };
3302
+ const requestSessionClose = async (reason, ref) => {
3303
+ if (closingSession || navigatingBack)
3304
+ return;
3305
+ closingSession = true;
3306
+ try {
3307
+ if (await panel?.canCloseSession())
3308
+ ref.close({ type: reason });
3309
+ }
3310
+ finally {
3311
+ closingSession = false;
3312
+ }
3313
+ };
3314
+ const requestDismiss = async (reason, ref) => {
3315
+ // Dismiss the current step, preserving the live parent collection.
3316
+ if (panel?.canGoBack) {
3317
+ await navigateBack({ type: reason });
3318
+ return;
2487
3319
  }
2488
- publishNavigationState();
2489
- return true;
3320
+ await requestSessionClose(reason, ref);
2490
3321
  };
2491
3322
  const createFrameRef = (frameId) => {
2492
3323
  const closedSubject = new Subject();
@@ -2623,10 +3454,7 @@ function providePraxisSurfaceDrawerBridge() {
2623
3454
  opts.minWidth ||
2624
3455
  opts.maxWidth);
2625
3456
  panelRef.instance.onClose = () => {
2626
- void panelRef.instance.canCloseSession().then((allowed) => {
2627
- if (allowed)
2628
- ref.close({ type: 'close' });
2629
- });
3457
+ void requestDismiss('close', ref);
2630
3458
  };
2631
3459
  panelRef.instance.onBack = () => { void activeRef?.back?.(); };
2632
3460
  ref.bindTitleUpdater((title) => panelRef.instance.setTitle(title));
@@ -2646,22 +3474,14 @@ function providePraxisSurfaceDrawerBridge() {
2646
3474
  panelRef.changeDetectorRef.detectChanges();
2647
3475
  },
2648
3476
  createCloser: (ref) => (reason = 'close') => {
2649
- void panel?.canCloseSession().then((allowed) => {
2650
- if (allowed)
2651
- ref.close({ type: reason });
2652
- });
3477
+ // Scope replacement closes the session, not just its current step.
3478
+ void requestSessionClose(reason, ref);
2653
3479
  },
2654
3480
  onBackdrop: (ref) => {
2655
- void panel?.canCloseSession().then((allowed) => {
2656
- if (allowed)
2657
- ref.close({ type: 'backdrop' });
2658
- });
3481
+ void requestDismiss('backdrop', ref);
2659
3482
  },
2660
3483
  onEsc: (ref) => {
2661
- void panel?.canCloseSession().then((allowed) => {
2662
- if (allowed)
2663
- ref.close({ type: 'esc' });
2664
- });
3484
+ void requestDismiss('esc', ref);
2665
3485
  },
2666
3486
  });
2667
3487
  result.closed$.subscribe(() => {
@@ -2721,6 +3541,7 @@ class GlobalConfigAdminService {
2721
3541
  dynamicFields: this.global.getDynamicFields(),
2722
3542
  table: this.global.getTable(),
2723
3543
  dialog: this.global.getDialog(),
3544
+ pages: this.global.getPages(),
2724
3545
  ai: this.global.get('ai'),
2725
3546
  cache: this.global.get('cache'),
2726
3547
  };
@@ -3305,6 +4126,96 @@ function buildGlobalConfigFormConfig(translate = (text) => text) {
3305
4126
  { name: safeName('dialog.variants.error.actions'), label: tx('Variant error - actions (JSON array)'), controlType: FieldControlType.TEXTAREA, dataAttributes: { globalPath: 'dialog.variants.error.actions', monospace: true } },
3306
4127
  { name: safeName('dialog.variants.error.styles'), label: tx('Variant error - styles (JSON)'), controlType: FieldControlType.TEXTAREA, dataAttributes: { globalPath: 'dialog.variants.error.styles', monospace: true }, hint: tx('Example JSON: {"containerColor":"var(--md-sys-color-surface)","containerBorderColor":"var(--md-sys-color-outline-variant)","backdropColor":"var(--md-sys-color-scrim)","actionButtonRadius":"8px"}') },
3307
4128
  { name: safeName('dialog.variants.error.animation'), label: tx('Variant error - animation (JSON/boolean)'), controlType: FieldControlType.TEXTAREA, dataAttributes: { globalPath: 'dialog.variants.error.animation', monospace: true } },
4129
+ // Dynamic Pages - Defaults
4130
+ {
4131
+ name: safeName('pages.defaults.layoutPreset'),
4132
+ label: tx('Preset de layout padrão'),
4133
+ controlType: FieldControlType.SELECT,
4134
+ selectOptions: [
4135
+ { text: tx('Definido pela página (sem preset forçado)'), value: '' },
4136
+ { text: tx('KPI + Tabela Operacional (kpi-plus-table)'), value: 'kpi-plus-table' },
4137
+ { text: tx('Visão Analítica (analytics-overview)'), value: 'analytics-overview' },
4138
+ { text: tx('Master-Detail Dashboard (master-detail-dashboard)'), value: 'master-detail-dashboard' },
4139
+ { text: tx('Monitoramento Operacional (ops-monitoring)'), value: 'ops-monitoring' },
4140
+ ],
4141
+ hint: tx('Preset estrutural aplicado quando a página não define layoutPreset próprio.'),
4142
+ dataAttributes: { globalPath: 'pages.defaults.layoutPreset' },
4143
+ },
4144
+ {
4145
+ name: safeName('pages.defaults.themePreset'),
4146
+ label: tx('Preset de tema padrão da página'),
4147
+ controlType: FieldControlType.SELECT,
4148
+ selectOptions: [
4149
+ { text: tx('Workspace Equilibrado (workspace-balanced)'), value: 'workspace-balanced' },
4150
+ { text: tx('Analítico Calmo (analytics-calm)'), value: 'analytics-calm' },
4151
+ { text: tx('Monitoramento Operacional (ops-monitoring)'), value: 'ops-monitoring' },
4152
+ { text: tx('Centro de Comando Executivo (executive-command-center)'), value: 'executive-command-center' },
4153
+ ],
4154
+ hint: tx('Define densidade, superfície e atmosfera padrão das páginas dinâmicas.'),
4155
+ dataAttributes: { globalPath: 'pages.defaults.themePreset' },
4156
+ },
4157
+ {
4158
+ name: safeName('pages.defaults.shellPreset'),
4159
+ label: tx('Preset padrão de moldura (Widget Shell)'),
4160
+ controlType: FieldControlType.SELECT,
4161
+ selectOptions: [
4162
+ { text: tx('Card Integrado (integrated-card)'), value: 'integrated-card' },
4163
+ { text: tx('Card com Contorno (outlined-card)'), value: 'outlined-card' },
4164
+ { text: tx('Card Elevado (elevated-card)'), value: 'elevated-card' },
4165
+ { text: tx('Card Tonal (tonal-card)'), value: 'tonal-card' },
4166
+ { text: tx('Card Seccionado (sectioned-card)'), value: 'sectioned-card' },
4167
+ { text: tx('Sem Moldura (frameless)'), value: 'frameless' },
4168
+ { text: tx('Painel de Dados (data-panel)'), value: 'data-panel' },
4169
+ { text: tx('Painel de Gráfico (chart-panel)'), value: 'chart-panel' },
4170
+ { text: tx('Painel de Métrica (metric-panel)'), value: 'metric-panel' },
4171
+ { text: tx('Card Executivo (executive-card)'), value: 'executive-card' },
4172
+ { text: tx('Barra de Filtro (filter-bar)'), value: 'filter-bar' },
4173
+ { text: tx('Vidro Escuro (dark-glass)'), value: 'dark-glass' },
4174
+ { text: tx('Vidro Claro (glass-light)'), value: 'glass-light' },
4175
+ { text: tx('Neutro Claro (light-neutral)'), value: 'light-neutral' },
4176
+ { text: tx('Grafite (graphite)'), value: 'graphite' },
4177
+ ],
4178
+ hint: tx('Usado quando nem o widget nem o tema da página definem um preset de shell.'),
4179
+ dataAttributes: { globalPath: 'pages.defaults.shellPreset' },
4180
+ },
4181
+ {
4182
+ name: safeName('pages.defaults.columns'),
4183
+ label: tx('Colunas padrão da grade'),
4184
+ controlType: FieldControlType.INPUT,
4185
+ numericFormat: 'integer',
4186
+ min: 1,
4187
+ max: 12,
4188
+ numericStep: 1,
4189
+ hint: tx('Quantidade padrão de colunas em layouts colunares ou canvas (1 a 12).'),
4190
+ dataAttributes: { globalPath: 'pages.defaults.columns' },
4191
+ },
4192
+ {
4193
+ name: safeName('pages.defaults.gap'),
4194
+ label: tx('Espaçamento padrão entre widgets (gap)'),
4195
+ controlType: FieldControlType.INPUT,
4196
+ placeholder: '16px',
4197
+ hint: tx('Ex.: 12px, 16px, 20px, 1.25rem.'),
4198
+ dataAttributes: { globalPath: 'pages.defaults.gap' },
4199
+ },
4200
+ {
4201
+ name: safeName('pages.defaults.paddingInline'),
4202
+ label: tx('Recuo horizontal padrão (paddingInline)'),
4203
+ controlType: FieldControlType.INPUT,
4204
+ placeholder: '0px',
4205
+ hint: tx('Ex.: 0px, 16px, 24px.'),
4206
+ dataAttributes: { globalPath: 'pages.defaults.paddingInline' },
4207
+ },
4208
+ {
4209
+ name: safeName('pages.defaults.autoRows'),
4210
+ label: tx('Modo padrão de altura de linhas no Canvas'),
4211
+ controlType: FieldControlType.SELECT,
4212
+ selectOptions: [
4213
+ { text: tx('Adaptado ao conteúdo (content)'), value: 'content' },
4214
+ { text: tx('Altura de linha fixa (fixed)'), value: 'fixed' },
4215
+ ],
4216
+ hint: tx('Controla se os blocos no canvas crescem conforme o conteúdo ou seguem rowUnit fixo.'),
4217
+ dataAttributes: { globalPath: 'pages.defaults.autoRows' },
4218
+ },
3308
4219
  ];
3309
4220
  const cfg = {
3310
4221
  sections: [
@@ -3592,6 +4503,34 @@ function buildGlobalConfigFormConfig(translate = (text) => text) {
3592
4503
  },
3593
4504
  ],
3594
4505
  },
4506
+ {
4507
+ id: 'dynamic-pages',
4508
+ title: tx('Dynamic Pages'),
4509
+ rows: [
4510
+ {
4511
+ id: 'pages-row-presets',
4512
+ columns: [
4513
+ {
4514
+ id: 'pages-col-presets-1',
4515
+ fields: [
4516
+ safeName('pages.defaults.layoutPreset'),
4517
+ safeName('pages.defaults.themePreset'),
4518
+ safeName('pages.defaults.shellPreset'),
4519
+ ],
4520
+ },
4521
+ {
4522
+ id: 'pages-col-presets-2',
4523
+ fields: [
4524
+ safeName('pages.defaults.columns'),
4525
+ safeName('pages.defaults.gap'),
4526
+ safeName('pages.defaults.paddingInline'),
4527
+ safeName('pages.defaults.autoRows'),
4528
+ ],
4529
+ },
4530
+ ],
4531
+ },
4532
+ ],
4533
+ },
3595
4534
  ],
3596
4535
  actions: {
3597
4536
  placement: 'afterSections',
@@ -3640,7 +4579,7 @@ class GlobalConfigEditorComponent {
3640
4579
  currentValues = {};
3641
4580
  pathMap = {};
3642
4581
  bootstrappedSections = new Set();
3643
- allSections = ['crud', 'dynamic-fields', 'cache', 'table', 'dialog', 'ai-credentials', 'ai-model', 'ai-embedding'];
4582
+ allSections = ['crud', 'dynamic-fields', 'cache', 'table', 'dialog', 'dynamic-pages', 'ai-credentials', 'ai-model', 'ai-embedding'];
3644
4583
  // SettingsPanel integration signals
3645
4584
  isDirty$ = new BehaviorSubject(false);
3646
4585
  isValid$ = new BehaviorSubject(true);
@@ -3650,6 +4589,7 @@ class GlobalConfigEditorComponent {
3650
4589
  hostCache;
3651
4590
  hostTable;
3652
4591
  hostDialog;
4592
+ hostPages;
3653
4593
  hostAiCredentials;
3654
4594
  hostAiModel;
3655
4595
  hostAiEmbedding;
@@ -3664,7 +4604,10 @@ class GlobalConfigEditorComponent {
3664
4604
  component: 'GlobalConfigEditorComponent',
3665
4605
  };
3666
4606
  providedDynamicFormCtor = inject(GLOBAL_CONFIG_DYNAMIC_FORM_COMPONENT, { optional: true });
3667
- dynamicFormCtor = this.providedDynamicFormCtor ?? null;
4607
+ componentMetadata = inject(ComponentMetadataRegistry, { optional: true });
4608
+ dynamicFormCtor = this.providedDynamicFormCtor ??
4609
+ this.componentMetadata?.get('praxis-dynamic-form')?.component ??
4610
+ null;
3668
4611
  loggedMissingDynamicForm = false;
3669
4612
  // Guardar instância do form da seção 'dialog' para atualizar controles diretamente
3670
4613
  dialogFormInst = null;
@@ -3712,11 +4655,16 @@ class GlobalConfigEditorComponent {
3712
4655
  this.snack = snack;
3713
4656
  }
3714
4657
  async ngOnInit() {
4658
+ await this.refreshStoredConfigState();
4659
+ if (this.destroyRef.destroyed)
4660
+ return;
3715
4661
  const cfg = this.admin.getEffectiveConfig();
3716
4662
  const flat = this.flatten(cfg);
3717
4663
  this.formConfig = buildGlobalConfigFormConfig(this.tx.bind(this));
3718
4664
  this.applyConfigSnapshot(flat, { resetForms: false });
3719
4665
  await this.loadProviderCatalog();
4666
+ if (this.destroyRef.destroyed)
4667
+ return;
3720
4668
  this.applyProviderOptions();
3721
4669
  this.applyEmbeddingProviderOptions();
3722
4670
  const providerSafe = this.safeName('ai.provider');
@@ -3734,10 +4682,9 @@ class GlobalConfigEditorComponent {
3734
4682
  this.syncEmbeddingDefaults(false);
3735
4683
  this.ensureEmbeddingModelDefaults(false);
3736
4684
  this.ensureEmbeddingDimensionsDefaults(false);
3737
- await this.refreshStoredConfigState();
3738
4685
  // Monitor API Key changes to auto-fetch
3739
4686
  this.apiKeyChanged$.pipe(debounceTime(1500), // Wait for typing to stop
3740
- distinctUntilChanged((prev, curr) => prev.apiKey === curr.apiKey && prev.provider === curr.provider), filter(({ apiKey, provider }) => this.canAutoRefreshModels(provider, apiKey))).subscribe(() => {
4687
+ distinctUntilChanged((prev, curr) => prev.apiKey === curr.apiKey && prev.provider === curr.provider), filter(({ apiKey, provider }) => this.canAutoRefreshModels(provider, apiKey)), takeUntilDestroyed(this.destroyRef)).subscribe(() => {
3741
4688
  this.refreshModels();
3742
4689
  });
3743
4690
  if (this.hasApiKey && this.selectedProvider?.supportsModels !== false) {
@@ -3780,7 +4727,11 @@ class GlobalConfigEditorComponent {
3780
4727
  }
3781
4728
  }
3782
4729
  if (this.hasApiKey) {
3783
- setTimeout(() => this.ensureAiModelForm(), 0);
4730
+ setTimeout(() => {
4731
+ if (!this.destroyRef.destroyed) {
4732
+ this.ensureAiModelForm();
4733
+ }
4734
+ }, 0);
3784
4735
  }
3785
4736
  else {
3786
4737
  if (this.aiModelFormRef) {
@@ -3824,9 +4775,17 @@ class GlobalConfigEditorComponent {
3824
4775
  }
3825
4776
  }
3826
4777
  const fms = (this.formConfig.fieldMetadata || []).filter((f) => names.has(f.name));
3827
- return { sections: [sec], fieldMetadata: fms };
4778
+ const framelessSection = { ...sec, title: '' };
4779
+ return {
4780
+ sections: [framelessSection],
4781
+ fieldMetadata: fms,
4782
+ actions: this.formConfig.actions,
4783
+ };
3828
4784
  }
3829
4785
  bootstrapDynamicForms() {
4786
+ if (this.destroyRef.destroyed) {
4787
+ return;
4788
+ }
3830
4789
  if (!this.dynamicFormCtor) {
3831
4790
  if (!this.loggedMissingDynamicForm) {
3832
4791
  this.logger.warnOnce('[GlobalConfigEditor] Dynamic form component was not provided. Set GLOBAL_CONFIG_DYNAMIC_FORM_COMPONENT to enable form rendering.', this.buildLogOptions({ token: 'GLOBAL_CONFIG_DYNAMIC_FORM_COMPONENT' }, { dedupeKey: 'global-config-editor:missing-dynamic-form' }));
@@ -3840,10 +4799,15 @@ class GlobalConfigEditorComponent {
3840
4799
  { id: 'cache', host: this.hostCache, cfg: this.buildSectionConfig('cache') },
3841
4800
  { id: 'table', host: this.hostTable, cfg: this.buildSectionConfig('table') },
3842
4801
  { id: 'dialog', host: this.hostDialog, cfg: this.buildSectionConfig('dialog') },
4802
+ { id: 'dynamic-pages', host: this.hostPages, cfg: this.buildSectionConfig('dynamic-pages') },
3843
4803
  { id: 'ai-credentials', host: this.hostAiCredentials, cfg: this.buildSectionConfig('ai-credentials') },
3844
4804
  { id: 'ai-embedding', host: this.hostAiEmbedding, cfg: this.buildSectionConfig('ai-embedding') },
3845
4805
  ];
3846
4806
  for (const g of groups) {
4807
+ if (this.destroyRef.destroyed) {
4808
+ return;
4809
+ }
4810
+ let ref = null;
3847
4811
  try {
3848
4812
  if (!g.host) {
3849
4813
  this.logger.warnOnce('[GlobalConfigEditor] Missing host for section', this.buildLogOptions({ sectionId: g.id }, {
@@ -3856,7 +4820,7 @@ class GlobalConfigEditorComponent {
3856
4820
  context: { actionId: `section.${g.id}` },
3857
4821
  throttleKey: 'global-config-editor:create-form-section',
3858
4822
  }));
3859
- const ref = g.host.createComponent(this.dynamicFormCtor);
4823
+ ref = g.host.createComponent(this.dynamicFormCtor);
3860
4824
  ref.setInput('config', g.cfg);
3861
4825
  ref.setInput('mode', 'edit');
3862
4826
  // Não habilitar o modo de edição de layout (canvas) - queremos apenas edição de valores
@@ -3884,7 +4848,10 @@ class GlobalConfigEditorComponent {
3884
4848
  }
3885
4849
  catch { }
3886
4850
  if (inst?.valueChange?.subscribe) {
3887
- inst.valueChange.subscribe((ev) => this.onValueChange(g.id, ev));
4851
+ const stream = typeof inst.valueChange.pipe === 'function'
4852
+ ? inst.valueChange.pipe(takeUntilDestroyed(this.destroyRef))
4853
+ : inst.valueChange;
4854
+ stream.subscribe((ev) => this.onValueChange(g.id, ev));
3888
4855
  }
3889
4856
  this.componentRefs.set(g.id, ref);
3890
4857
  if (g.id === 'dialog') {
@@ -3894,12 +4861,27 @@ class GlobalConfigEditorComponent {
3894
4861
  if (g.id === 'ai-embedding') {
3895
4862
  this.aiEmbeddingFormRef = ref;
3896
4863
  }
4864
+ if (this.destroyRef.destroyed) {
4865
+ try {
4866
+ ref.destroy();
4867
+ }
4868
+ catch { }
4869
+ this.componentRefs.delete(g.id);
4870
+ return;
4871
+ }
4872
+ const createdRef = ref;
3897
4873
  this.destroyRef.onDestroy(() => { try {
3898
- ref.destroy();
4874
+ createdRef.destroy();
3899
4875
  }
3900
4876
  catch { } });
3901
4877
  }
3902
4878
  catch (err) {
4879
+ if (ref) {
4880
+ try {
4881
+ ref.destroy();
4882
+ }
4883
+ catch { }
4884
+ }
3903
4885
  this.logger.error('[GlobalConfigEditor] Failed to create form section', this.buildLogOptions({ sectionId: g.id, error: err }, { context: { actionId: `section.${g.id}.create` } }));
3904
4886
  }
3905
4887
  }
@@ -4224,17 +5206,18 @@ class GlobalConfigEditorComponent {
4224
5206
  this.syncEmbeddingDefaults();
4225
5207
  }
4226
5208
  createAiModelForm() {
4227
- if (!this.dynamicFormCtor || !this.hostAiModel)
5209
+ if (this.destroyRef.destroyed || !this.dynamicFormCtor || !this.hostAiModel)
4228
5210
  return;
4229
5211
  const cfg = this.buildSectionConfig('ai-model');
4230
5212
  if (!cfg.sections?.length)
4231
5213
  return;
5214
+ let ref = null;
4232
5215
  try {
4233
5216
  // Apply pending options to metadata before creating
4234
5217
  if (this.pendingModelOptions.length) {
4235
5218
  this.setModelFieldOptions(this.pendingModelOptions);
4236
5219
  }
4237
- const ref = this.hostAiModel.createComponent(this.dynamicFormCtor);
5220
+ ref = this.hostAiModel.createComponent(this.dynamicFormCtor);
4238
5221
  ref.setInput('config', cfg);
4239
5222
  ref.setInput('mode', 'edit');
4240
5223
  ref.setInput('enableCustomization', false);
@@ -4260,17 +5243,34 @@ class GlobalConfigEditorComponent {
4260
5243
  }
4261
5244
  catch { }
4262
5245
  if (inst?.valueChange?.subscribe) {
4263
- inst.valueChange.subscribe((ev) => this.onValueChange('ai-model', ev));
5246
+ const stream = typeof inst.valueChange.pipe === 'function'
5247
+ ? inst.valueChange.pipe(takeUntilDestroyed(this.destroyRef))
5248
+ : inst.valueChange;
5249
+ stream.subscribe((ev) => this.onValueChange('ai-model', ev));
5250
+ }
5251
+ if (this.destroyRef.destroyed) {
5252
+ try {
5253
+ ref.destroy();
5254
+ }
5255
+ catch { }
5256
+ return;
4264
5257
  }
4265
5258
  this.componentRefs.set('ai-model', ref);
4266
5259
  this.aiModelFormRef = ref;
4267
5260
  this.updateModelDetails(this.currentValues[this.safeName('ai.model')] || '');
5261
+ const createdRef = ref;
4268
5262
  this.destroyRef.onDestroy(() => { try {
4269
- ref.destroy();
5263
+ createdRef.destroy();
4270
5264
  }
4271
5265
  catch { } });
4272
5266
  }
4273
5267
  catch (err) {
5268
+ if (ref) {
5269
+ try {
5270
+ ref.destroy();
5271
+ }
5272
+ catch { }
5273
+ }
4274
5274
  this.logger.error('[GlobalConfigEditor] Failed to create AI model form', this.buildLogOptions({ error: err }, { context: { actionId: 'section.ai-model.create' } }));
4275
5275
  }
4276
5276
  }
@@ -4308,15 +5308,23 @@ class GlobalConfigEditorComponent {
4308
5308
  }
4309
5309
  // SettingsPanel expects these methods
4310
5310
  reset() {
4311
- const flat = {};
4312
- for (const safe of Object.keys(this.initialValues))
4313
- flat[safe] = this.initialValues[safe];
4314
- for (const fm of this.formConfig.fieldMetadata || []) {
4315
- const v = flat[fm.name];
5311
+ const resetValues = {};
5312
+ for (const safe of Object.keys(this.pathMap)) {
5313
+ if (safe in this.initialValues) {
5314
+ resetValues[safe] = this.initialValues[safe];
5315
+ }
5316
+ else {
5317
+ resetValues[safe] = null;
5318
+ }
5319
+ }
5320
+ for (const fm of this.formConfig?.fieldMetadata || []) {
5321
+ const v = this.initialValues[fm.name];
4316
5322
  fm.defaultValue = v;
4317
5323
  }
4318
5324
  this.currentValues = { ...this.initialValues };
5325
+ this.patchFormsWithValues(resetValues);
4319
5326
  this.isDirty$.next(false);
5327
+ this.cdr.detectChanges();
4320
5328
  }
4321
5329
  getSettingsValue() {
4322
5330
  const flat = this.buildChangedValues();
@@ -4324,7 +5332,8 @@ class GlobalConfigEditorComponent {
4324
5332
  }
4325
5333
  async onSave() {
4326
5334
  const partial = this.getSettingsValue();
4327
- const validationMessage = this.validateCompactTableAppearancePayload(partial);
5335
+ const validationMessage = this.validateCompactTableAppearancePayload(partial) ||
5336
+ this.validatePagesDefaultsPayload(partial);
4328
5337
  if (validationMessage) {
4329
5338
  try {
4330
5339
  this.snack.open(validationMessage, undefined, { duration: 5000 });
@@ -4338,6 +5347,8 @@ class GlobalConfigEditorComponent {
4338
5347
  // Update baseline after save
4339
5348
  this.initialValues = { ...this.currentValues };
4340
5349
  this.isDirty$.next(false);
5350
+ await this.refreshStoredConfigState();
5351
+ this.cdr.detectChanges();
4341
5352
  try {
4342
5353
  this.snack.open(this.tx('Settings saved'), undefined, { duration: 2000 });
4343
5354
  }
@@ -4528,8 +5539,26 @@ class GlobalConfigEditorComponent {
4528
5539
  return this.tx('Save failed.');
4529
5540
  }
4530
5541
  normalizeFieldValue(path, value) {
5542
+ if (path === 'pages.defaults.columns') {
5543
+ if (typeof value === 'number' && Number.isFinite(value)) {
5544
+ return Math.max(1, Math.min(12, Math.round(value)));
5545
+ }
5546
+ if (typeof value === 'string') {
5547
+ const trimmed = value.trim();
5548
+ if (!trimmed)
5549
+ return null;
5550
+ const parsed = Number(trimmed);
5551
+ return Number.isFinite(parsed)
5552
+ ? Math.max(1, Math.min(12, Math.round(parsed)))
5553
+ : value;
5554
+ }
5555
+ return value;
5556
+ }
4531
5557
  if (typeof value !== 'string')
4532
5558
  return value;
5559
+ if (path === 'pages.defaults.gap' || path === 'pages.defaults.paddingInline') {
5560
+ return value.trim();
5561
+ }
4533
5562
  if (!TABLE_COMPACT_SPACING_PATHS.has(path) && !TABLE_COMPACT_FONT_SIZE_PATHS.has(path)) {
4534
5563
  return value;
4535
5564
  }
@@ -4577,6 +5606,36 @@ class GlobalConfigEditorComponent {
4577
5606
  }
4578
5607
  return null;
4579
5608
  }
5609
+ validatePagesDefaultsPayload(partial) {
5610
+ const defaults = partial?.pages?.defaults;
5611
+ if (!defaults || typeof defaults !== 'object')
5612
+ return null;
5613
+ const checks = [
5614
+ {
5615
+ path: 'pages.defaults.gap',
5616
+ label: 'pages.defaults.gap',
5617
+ value: defaults.gap,
5618
+ example: '16px',
5619
+ },
5620
+ {
5621
+ path: 'pages.defaults.paddingInline',
5622
+ label: 'pages.defaults.paddingInline',
5623
+ value: defaults.paddingInline,
5624
+ example: '0px',
5625
+ },
5626
+ ];
5627
+ for (const check of checks) {
5628
+ if (typeof check.value !== 'string')
5629
+ continue;
5630
+ const normalized = this.normalizeFieldValue(check.path, check.value);
5631
+ if (!normalized)
5632
+ continue;
5633
+ if (!TABLE_COMPACT_SPACING_REGEX.test(normalized)) {
5634
+ return `Invalid value in ${check.label}. Use a valid CSS measure, such as ${check.example}.`;
5635
+ }
5636
+ }
5637
+ return null;
5638
+ }
4580
5639
  getVariantIcon(key) {
4581
5640
  const safe = this.safeName(`dialog.variants.${key}.icon`);
4582
5641
  return this.currentValues[safe];
@@ -4676,7 +5735,7 @@ class GlobalConfigEditorComponent {
4676
5735
  return true;
4677
5736
  }
4678
5737
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: GlobalConfigEditorComponent, deps: [{ token: GlobalConfigAdminService }, { token: i2$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
4679
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: GlobalConfigEditorComponent, isStandalone: true, selector: "praxis-global-config-editor", viewQueries: [{ propertyName: "hostCrud", first: true, predicate: ["hostCrud"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "hostFields", first: true, predicate: ["hostFields"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "hostCache", first: true, predicate: ["hostCache"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "hostTable", first: true, predicate: ["hostTable"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "hostDialog", first: true, predicate: ["hostDialog"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "hostAiCredentials", first: true, predicate: ["hostAiCredentials"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "hostAiModel", first: true, predicate: ["hostAiModel"], descendants: true, read: ViewContainerRef }, { propertyName: "hostAiEmbedding", first: true, predicate: ["hostAiEmbedding"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
5738
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: GlobalConfigEditorComponent, isStandalone: true, selector: "praxis-global-config-editor", viewQueries: [{ propertyName: "hostCrud", first: true, predicate: ["hostCrud"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "hostFields", first: true, predicate: ["hostFields"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "hostCache", first: true, predicate: ["hostCache"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "hostTable", first: true, predicate: ["hostTable"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "hostDialog", first: true, predicate: ["hostDialog"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "hostPages", first: true, predicate: ["hostPages"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "hostAiCredentials", first: true, predicate: ["hostAiCredentials"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "hostAiModel", first: true, predicate: ["hostAiModel"], descendants: true, read: ViewContainerRef }, { propertyName: "hostAiEmbedding", first: true, predicate: ["hostAiEmbedding"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
4680
5739
  <mat-accordion multi>
4681
5740
  <mat-expansion-panel>
4682
5741
  <mat-expansion-panel-header>
@@ -4974,8 +6033,18 @@ class GlobalConfigEditorComponent {
4974
6033
  <div class="dlg-icon-helpers__hint">{{ tx('The text field above remains editable. These buttons only help with selection/clear preview.') }}</div>
4975
6034
  </div>
4976
6035
  </mat-expansion-panel>
6036
+ <mat-expansion-panel>
6037
+ <mat-expansion-panel-header>
6038
+ <mat-panel-title>
6039
+ <mat-icon class="panel-icon">dashboard_customize</mat-icon>
6040
+ {{ tx('Dynamic Pages') }}
6041
+ </mat-panel-title>
6042
+ <mat-panel-description>{{ tx('Global presets for layout, theme, widget shell and canvas grid') }}</mat-panel-description>
6043
+ </mat-expansion-panel-header>
6044
+ <ng-template #hostPages></ng-template>
6045
+ </mat-expansion-panel>
4977
6046
  </mat-accordion>
4978
- `, isInline: true, styles: [".dlg-icon-helpers{margin:12px 16px 4px;padding:12px;border:1px dashed var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-small, 8px)}.dlg-icon-helpers__head{font-weight:600;margin-bottom:8px;opacity:.8}.dlg-icon-helpers__row{display:flex;align-items:center;gap:12px;padding:6px 0}.dlg-icon-helpers__label{text-transform:capitalize;width:96px;opacity:.8}.dlg-icon-helpers__preview{width:24px;height:24px}.dlg-icon-helpers__value{font-family:monospace;font-size:12px;opacity:.8}.dlg-icon-helpers__hint{margin-top:8px;font-size:12px;opacity:.7}.panel-icon{margin-right:12px;color:var(--md-sys-color-primary)}.ai-config-container{padding:16px;display:flex;flex-direction:column;gap:24px}.ai-config-source{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:var(--md-sys-shape-corner-medium, 10px);border:1px dashed var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container-low);font-size:12px;color:var(--md-sys-color-on-surface-variant);flex-wrap:wrap}.ai-config-source__meta{display:inline-flex;align-items:center;gap:8px}.ai-action-btn--clear{background:var(--md-sys-color-error-container);color:var(--md-sys-color-on-error-container);--mdc-outlined-button-container-color: var(--md-sys-color-error-container);--mdc-outlined-button-label-text-color: var(--md-sys-color-on-error-container);--mdc-outlined-button-outline-color: var(--md-sys-color-error);--mat-mdc-button-persistent-ripple-color: var(--md-sys-color-on-error-container);--mat-mdc-button-ripple-color: var(--md-sys-color-on-error-container)}.ai-action-btn--clear:hover{background:var(--md-sys-color-error-container)}.ai-group-title{display:flex;align-items:center;gap:8px;font-weight:500;font-size:14px;color:var(--md-sys-color-primary);margin-bottom:12px;border-bottom:1px solid var(--md-sys-color-outline-variant);padding-bottom:4px}.ai-group-title mat-icon{font-size:20px;width:20px;height:20px}.ai-group ::ng-deep .form-actions,.ai-group ::ng-deep button[type=submit]{display:none!important}.ai-credentials-row{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap}.ai-group-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.ai-provider-summary{display:flex;align-items:center;gap:12px;padding:8px 12px;border-radius:var(--md-sys-shape-corner-medium, 10px);background:var(--md-sys-color-surface-variant);border:1px solid var(--md-sys-color-outline-variant);margin:8px 0 4px;flex-wrap:wrap}.ai-provider-icon{width:32px;height:32px;border-radius:var(--md-sys-shape-corner-small, 8px);border:1px solid var(--md-sys-color-outline-variant);display:flex;align-items:center;justify-content:center;background:var(--md-sys-color-surface);color:var(--md-sys-color-primary);flex:0 0 auto}.provider-svg{width:18px;height:18px}.ai-provider-meta{display:flex;flex-direction:column;gap:2px;min-width:200px;flex:1 1 auto}.ai-provider-name{font-weight:600;font-size:13px}.ai-provider-desc{font-size:12px;opacity:.75}.ai-provider-key{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1px solid var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container-lowest);color:var(--md-sys-color-on-surface-variant);font-size:11px;font-weight:600;letter-spacing:.2px;box-shadow:var(--md-sys-elevation-level1, 0 1px 2px rgba(0,0,0,.2))}.ai-provider-key mat-icon{width:16px;height:16px;font-size:16px}.ai-provider-key.is-present{background:var(--md-sys-color-primary-container);color:var(--md-sys-color-on-primary-container);border-color:var(--md-sys-color-primary)}.ai-provider-key.is-saved{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);border-color:var(--md-sys-color-secondary)}.ai-provider-key.is-missing{background:var(--md-sys-color-surface-container-low);color:var(--md-sys-color-on-surface-variant);border-style:dashed;opacity:.9}.ai-provider-key.is-unlocked{background:var(--md-sys-color-tertiary-container);color:var(--md-sys-color-on-tertiary-container);border-color:var(--md-sys-color-tertiary)}.ai-action-btn{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 14px;min-width:168px;border-radius:var(--md-sys-shape-corner-medium, 12px);white-space:nowrap;background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);border-color:var(--md-sys-color-outline-variant);box-shadow:var(--md-sys-elevation-level1, 0 1px 2px rgba(0,0,0,.2));transition:background-color .15s ease,box-shadow .15s ease,transform .06s ease;--mdc-outlined-button-container-color: var(--md-sys-color-secondary-container);--mdc-outlined-button-label-text-color: var(--md-sys-color-on-secondary-container);--mdc-outlined-button-outline-color: var(--md-sys-color-outline-variant);--mat-mdc-button-persistent-ripple-color: var(--md-sys-color-on-secondary-container);--mat-mdc-button-ripple-color: var(--md-sys-color-on-secondary-container)}.ai-action-btn .mat-button-wrapper,.ai-action-btn .mdc-button__label{display:inline-flex;align-items:center;gap:8px;line-height:1;height:100%}.ai-action-btn .mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.ai-action-btn .ai-action-label{display:inline-flex;align-items:center;line-height:1}.ai-action-btn .mat-progress-spinner,.ai-action-btn .btn-spinner{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}.ai-action-btn:hover{background:var(--md-sys-color-secondary-container);box-shadow:var(--md-sys-elevation-level2, 0 2px 6px rgba(0,0,0,.25))}.ai-action-btn:active{transform:translateY(1px)}.ai-action-btn:focus-visible{outline:2px solid var(--md-sys-color-primary);outline-offset:2px}.ai-action-btn.is-success{background:var(--md-sys-color-tertiary-container);color:var(--md-sys-color-on-tertiary-container);border-color:var(--md-sys-color-tertiary);--mdc-outlined-button-container-color: var(--md-sys-color-tertiary-container);--mdc-outlined-button-label-text-color: var(--md-sys-color-on-tertiary-container);--mdc-outlined-button-outline-color: var(--md-sys-color-tertiary);--mat-mdc-button-persistent-ripple-color: var(--md-sys-color-on-tertiary-container);--mat-mdc-button-ripple-color: var(--md-sys-color-on-tertiary-container)}.ai-action-btn.is-success:hover{background:var(--md-sys-color-tertiary-container)}.ai-action-btn:disabled{background:var(--md-sys-color-surface-container-low);color:var(--md-sys-color-on-surface-variant);border-color:var(--md-sys-color-outline-variant);box-shadow:none;opacity:.7}.ai-form-inline{flex:1;min-width:300px}.ai-credentials-row button{margin-top:4px;height:40px}.btn-spinner{margin-right:8px}.ai-feedback{margin-top:8px;display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--md-sys-color-error-container);color:var(--md-sys-color-on-error-container);border-radius:var(--md-sys-shape-corner-extra-small, 4px);font-size:13px}.ai-feedback--warn{background:var(--md-sys-color-tertiary-container);color:var(--md-sys-color-on-tertiary-container)}.disabled-group{opacity:.6;pointer-events:none}.ai-model-content{display:flex;flex-direction:column;gap:8px}.ai-model-controls{display:flex;align-items:flex-start;gap:8px}.ai-model-controls ::ng-deep praxis-dynamic-form{flex:1}.ai-model-details{font-size:12px;color:var(--md-sys-color-on-surface-variant);margin-left:4px}.ai-subtext{font-size:12px;color:var(--md-sys-color-on-surface-variant)}.ai-header-actions{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.ai-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:var(--md-sys-color-surface-container-low);border-radius:var(--md-sys-shape-corner-small, 8px);color:var(--md-sys-color-outline);gap:8px;text-align:center;font-size:13px}.spin{animation:spin 1s linear infinite}@keyframes spin{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}\n"], dependencies: [{ kind: "ngmodule", type: MatSnackBarModule }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "directive", type: i3$1.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i3$1.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i3$1.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i3$1.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i3$1.MatExpansionPanelDescription, selector: "mat-panel-description" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.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: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i8.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }] });
6047
+ `, isInline: true, styles: [".dlg-icon-helpers{margin:12px 16px 4px;padding:12px;border:1px dashed var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-small, 8px)}.dlg-icon-helpers__head{font-weight:600;margin-bottom:8px;opacity:.8}.dlg-icon-helpers__row{display:flex;align-items:center;gap:12px;padding:6px 0}.dlg-icon-helpers__label{text-transform:capitalize;width:96px;opacity:.8}.dlg-icon-helpers__preview{width:24px;height:24px}.dlg-icon-helpers__value{font-family:monospace;font-size:12px;opacity:.8}.dlg-icon-helpers__hint{margin-top:8px;font-size:12px;opacity:.7}.panel-icon{margin-right:12px;color:var(--md-sys-color-primary);flex-shrink:0}:host ::ng-deep .mat-expansion-panel-header{height:auto!important;min-height:54px;padding-block:10px}:host ::ng-deep .mat-expansion-panel-header-title,:host ::ng-deep .mat-expansion-panel-header-description{line-height:1.35}:host ::ng-deep .mat-expansion-panel-body .form-section{border:none;background:transparent;box-shadow:none;padding:4px 0 0}@media(max-width:560px){:host ::ng-deep .mat-expansion-panel-header .mat-content{flex-direction:column;align-items:flex-start;gap:4px}:host ::ng-deep .mat-expansion-panel-header-title,:host ::ng-deep .mat-expansion-panel-header-description{margin-right:0}}.ai-config-container{padding:16px;display:flex;flex-direction:column;gap:24px}.ai-config-source{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:var(--md-sys-shape-corner-medium, 10px);border:1px dashed var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container-low);font-size:12px;color:var(--md-sys-color-on-surface-variant);flex-wrap:wrap}.ai-config-source__meta{display:inline-flex;align-items:center;gap:8px}.ai-action-btn--clear{background:var(--md-sys-color-error-container);color:var(--md-sys-color-on-error-container);--mdc-outlined-button-container-color: var(--md-sys-color-error-container);--mdc-outlined-button-label-text-color: var(--md-sys-color-on-error-container);--mdc-outlined-button-outline-color: var(--md-sys-color-error);--mat-mdc-button-persistent-ripple-color: var(--md-sys-color-on-error-container);--mat-mdc-button-ripple-color: var(--md-sys-color-on-error-container)}.ai-action-btn--clear:hover{background:var(--md-sys-color-error-container)}.ai-group-title{display:flex;align-items:center;gap:8px;font-weight:500;font-size:14px;color:var(--md-sys-color-primary);margin-bottom:12px;border-bottom:1px solid var(--md-sys-color-outline-variant);padding-bottom:4px}.ai-group-title mat-icon{font-size:20px;width:20px;height:20px}.ai-group ::ng-deep .form-actions,.ai-group ::ng-deep button[type=submit]{display:none!important}.ai-credentials-row{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap}.ai-group-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.ai-provider-summary{display:flex;align-items:center;gap:12px;padding:8px 12px;border-radius:var(--md-sys-shape-corner-medium, 10px);background:var(--md-sys-color-surface-variant);border:1px solid var(--md-sys-color-outline-variant);margin:8px 0 4px;flex-wrap:wrap}.ai-provider-icon{width:32px;height:32px;border-radius:var(--md-sys-shape-corner-small, 8px);border:1px solid var(--md-sys-color-outline-variant);display:flex;align-items:center;justify-content:center;background:var(--md-sys-color-surface);color:var(--md-sys-color-primary);flex:0 0 auto}.provider-svg{width:18px;height:18px}.ai-provider-meta{display:flex;flex-direction:column;gap:2px;min-width:200px;flex:1 1 auto}.ai-provider-name{font-weight:600;font-size:13px}.ai-provider-desc{font-size:12px;opacity:.75}.ai-provider-key{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1px solid var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container-lowest);color:var(--md-sys-color-on-surface-variant);font-size:11px;font-weight:600;letter-spacing:.2px;box-shadow:var(--md-sys-elevation-level1, 0 1px 2px rgba(0,0,0,.2))}.ai-provider-key mat-icon{width:16px;height:16px;font-size:16px}.ai-provider-key.is-present{background:var(--md-sys-color-primary-container);color:var(--md-sys-color-on-primary-container);border-color:var(--md-sys-color-primary)}.ai-provider-key.is-saved{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);border-color:var(--md-sys-color-secondary)}.ai-provider-key.is-missing{background:var(--md-sys-color-surface-container-low);color:var(--md-sys-color-on-surface-variant);border-style:dashed;opacity:.9}.ai-provider-key.is-unlocked{background:var(--md-sys-color-tertiary-container);color:var(--md-sys-color-on-tertiary-container);border-color:var(--md-sys-color-tertiary)}.ai-action-btn{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 14px;min-width:168px;border-radius:var(--md-sys-shape-corner-medium, 12px);white-space:nowrap;background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);border-color:var(--md-sys-color-outline-variant);box-shadow:var(--md-sys-elevation-level1, 0 1px 2px rgba(0,0,0,.2));transition:background-color .15s ease,box-shadow .15s ease,transform .06s ease;--mdc-outlined-button-container-color: var(--md-sys-color-secondary-container);--mdc-outlined-button-label-text-color: var(--md-sys-color-on-secondary-container);--mdc-outlined-button-outline-color: var(--md-sys-color-outline-variant);--mat-mdc-button-persistent-ripple-color: var(--md-sys-color-on-secondary-container);--mat-mdc-button-ripple-color: var(--md-sys-color-on-secondary-container)}.ai-action-btn .mat-button-wrapper,.ai-action-btn .mdc-button__label{display:inline-flex;align-items:center;gap:8px;line-height:1;height:100%}.ai-action-btn .mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.ai-action-btn .ai-action-label{display:inline-flex;align-items:center;line-height:1}.ai-action-btn .mat-progress-spinner,.ai-action-btn .btn-spinner{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}.ai-action-btn:hover{background:var(--md-sys-color-secondary-container);box-shadow:var(--md-sys-elevation-level2, 0 2px 6px rgba(0,0,0,.25))}.ai-action-btn:active{transform:translateY(1px)}.ai-action-btn:focus-visible{outline:2px solid var(--md-sys-color-primary);outline-offset:2px}.ai-action-btn.is-success{background:var(--md-sys-color-tertiary-container);color:var(--md-sys-color-on-tertiary-container);border-color:var(--md-sys-color-tertiary);--mdc-outlined-button-container-color: var(--md-sys-color-tertiary-container);--mdc-outlined-button-label-text-color: var(--md-sys-color-on-tertiary-container);--mdc-outlined-button-outline-color: var(--md-sys-color-tertiary);--mat-mdc-button-persistent-ripple-color: var(--md-sys-color-on-tertiary-container);--mat-mdc-button-ripple-color: var(--md-sys-color-on-tertiary-container)}.ai-action-btn.is-success:hover{background:var(--md-sys-color-tertiary-container)}.ai-action-btn:disabled{background:var(--md-sys-color-surface-container-low);color:var(--md-sys-color-on-surface-variant);border-color:var(--md-sys-color-outline-variant);box-shadow:none;opacity:.7}.ai-form-inline{flex:1;min-width:300px}.ai-credentials-row button{margin-top:4px;height:40px}.btn-spinner{margin-right:8px}.ai-feedback{margin-top:8px;display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--md-sys-color-error-container);color:var(--md-sys-color-on-error-container);border-radius:var(--md-sys-shape-corner-extra-small, 4px);font-size:13px}.ai-feedback--warn{background:var(--md-sys-color-tertiary-container);color:var(--md-sys-color-on-tertiary-container)}.disabled-group{opacity:.6;pointer-events:none}.ai-model-content{display:flex;flex-direction:column;gap:8px}.ai-model-controls{display:flex;align-items:flex-start;gap:8px}.ai-model-controls ::ng-deep praxis-dynamic-form{flex:1}.ai-model-details{font-size:12px;color:var(--md-sys-color-on-surface-variant);margin-left:4px}.ai-subtext{font-size:12px;color:var(--md-sys-color-on-surface-variant)}.ai-header-actions{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.ai-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:var(--md-sys-color-surface-container-low);border-radius:var(--md-sys-shape-corner-small, 8px);color:var(--md-sys-color-outline);gap:8px;text-align:center;font-size:13px}.spin{animation:spin 1s linear infinite}@keyframes spin{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}\n"], dependencies: [{ kind: "ngmodule", type: MatSnackBarModule }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "directive", type: i3$1.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i3$1.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i3$1.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i3$1.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i3$1.MatExpansionPanelDescription, selector: "mat-panel-description" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.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: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i8.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }] });
4979
6048
  }
4980
6049
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: GlobalConfigEditorComponent, decorators: [{
4981
6050
  type: Component,
@@ -5277,8 +6346,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
5277
6346
  <div class="dlg-icon-helpers__hint">{{ tx('The text field above remains editable. These buttons only help with selection/clear preview.') }}</div>
5278
6347
  </div>
5279
6348
  </mat-expansion-panel>
6349
+ <mat-expansion-panel>
6350
+ <mat-expansion-panel-header>
6351
+ <mat-panel-title>
6352
+ <mat-icon class="panel-icon">dashboard_customize</mat-icon>
6353
+ {{ tx('Dynamic Pages') }}
6354
+ </mat-panel-title>
6355
+ <mat-panel-description>{{ tx('Global presets for layout, theme, widget shell and canvas grid') }}</mat-panel-description>
6356
+ </mat-expansion-panel-header>
6357
+ <ng-template #hostPages></ng-template>
6358
+ </mat-expansion-panel>
5280
6359
  </mat-accordion>
5281
- `, styles: [".dlg-icon-helpers{margin:12px 16px 4px;padding:12px;border:1px dashed var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-small, 8px)}.dlg-icon-helpers__head{font-weight:600;margin-bottom:8px;opacity:.8}.dlg-icon-helpers__row{display:flex;align-items:center;gap:12px;padding:6px 0}.dlg-icon-helpers__label{text-transform:capitalize;width:96px;opacity:.8}.dlg-icon-helpers__preview{width:24px;height:24px}.dlg-icon-helpers__value{font-family:monospace;font-size:12px;opacity:.8}.dlg-icon-helpers__hint{margin-top:8px;font-size:12px;opacity:.7}.panel-icon{margin-right:12px;color:var(--md-sys-color-primary)}.ai-config-container{padding:16px;display:flex;flex-direction:column;gap:24px}.ai-config-source{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:var(--md-sys-shape-corner-medium, 10px);border:1px dashed var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container-low);font-size:12px;color:var(--md-sys-color-on-surface-variant);flex-wrap:wrap}.ai-config-source__meta{display:inline-flex;align-items:center;gap:8px}.ai-action-btn--clear{background:var(--md-sys-color-error-container);color:var(--md-sys-color-on-error-container);--mdc-outlined-button-container-color: var(--md-sys-color-error-container);--mdc-outlined-button-label-text-color: var(--md-sys-color-on-error-container);--mdc-outlined-button-outline-color: var(--md-sys-color-error);--mat-mdc-button-persistent-ripple-color: var(--md-sys-color-on-error-container);--mat-mdc-button-ripple-color: var(--md-sys-color-on-error-container)}.ai-action-btn--clear:hover{background:var(--md-sys-color-error-container)}.ai-group-title{display:flex;align-items:center;gap:8px;font-weight:500;font-size:14px;color:var(--md-sys-color-primary);margin-bottom:12px;border-bottom:1px solid var(--md-sys-color-outline-variant);padding-bottom:4px}.ai-group-title mat-icon{font-size:20px;width:20px;height:20px}.ai-group ::ng-deep .form-actions,.ai-group ::ng-deep button[type=submit]{display:none!important}.ai-credentials-row{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap}.ai-group-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.ai-provider-summary{display:flex;align-items:center;gap:12px;padding:8px 12px;border-radius:var(--md-sys-shape-corner-medium, 10px);background:var(--md-sys-color-surface-variant);border:1px solid var(--md-sys-color-outline-variant);margin:8px 0 4px;flex-wrap:wrap}.ai-provider-icon{width:32px;height:32px;border-radius:var(--md-sys-shape-corner-small, 8px);border:1px solid var(--md-sys-color-outline-variant);display:flex;align-items:center;justify-content:center;background:var(--md-sys-color-surface);color:var(--md-sys-color-primary);flex:0 0 auto}.provider-svg{width:18px;height:18px}.ai-provider-meta{display:flex;flex-direction:column;gap:2px;min-width:200px;flex:1 1 auto}.ai-provider-name{font-weight:600;font-size:13px}.ai-provider-desc{font-size:12px;opacity:.75}.ai-provider-key{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1px solid var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container-lowest);color:var(--md-sys-color-on-surface-variant);font-size:11px;font-weight:600;letter-spacing:.2px;box-shadow:var(--md-sys-elevation-level1, 0 1px 2px rgba(0,0,0,.2))}.ai-provider-key mat-icon{width:16px;height:16px;font-size:16px}.ai-provider-key.is-present{background:var(--md-sys-color-primary-container);color:var(--md-sys-color-on-primary-container);border-color:var(--md-sys-color-primary)}.ai-provider-key.is-saved{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);border-color:var(--md-sys-color-secondary)}.ai-provider-key.is-missing{background:var(--md-sys-color-surface-container-low);color:var(--md-sys-color-on-surface-variant);border-style:dashed;opacity:.9}.ai-provider-key.is-unlocked{background:var(--md-sys-color-tertiary-container);color:var(--md-sys-color-on-tertiary-container);border-color:var(--md-sys-color-tertiary)}.ai-action-btn{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 14px;min-width:168px;border-radius:var(--md-sys-shape-corner-medium, 12px);white-space:nowrap;background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);border-color:var(--md-sys-color-outline-variant);box-shadow:var(--md-sys-elevation-level1, 0 1px 2px rgba(0,0,0,.2));transition:background-color .15s ease,box-shadow .15s ease,transform .06s ease;--mdc-outlined-button-container-color: var(--md-sys-color-secondary-container);--mdc-outlined-button-label-text-color: var(--md-sys-color-on-secondary-container);--mdc-outlined-button-outline-color: var(--md-sys-color-outline-variant);--mat-mdc-button-persistent-ripple-color: var(--md-sys-color-on-secondary-container);--mat-mdc-button-ripple-color: var(--md-sys-color-on-secondary-container)}.ai-action-btn .mat-button-wrapper,.ai-action-btn .mdc-button__label{display:inline-flex;align-items:center;gap:8px;line-height:1;height:100%}.ai-action-btn .mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.ai-action-btn .ai-action-label{display:inline-flex;align-items:center;line-height:1}.ai-action-btn .mat-progress-spinner,.ai-action-btn .btn-spinner{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}.ai-action-btn:hover{background:var(--md-sys-color-secondary-container);box-shadow:var(--md-sys-elevation-level2, 0 2px 6px rgba(0,0,0,.25))}.ai-action-btn:active{transform:translateY(1px)}.ai-action-btn:focus-visible{outline:2px solid var(--md-sys-color-primary);outline-offset:2px}.ai-action-btn.is-success{background:var(--md-sys-color-tertiary-container);color:var(--md-sys-color-on-tertiary-container);border-color:var(--md-sys-color-tertiary);--mdc-outlined-button-container-color: var(--md-sys-color-tertiary-container);--mdc-outlined-button-label-text-color: var(--md-sys-color-on-tertiary-container);--mdc-outlined-button-outline-color: var(--md-sys-color-tertiary);--mat-mdc-button-persistent-ripple-color: var(--md-sys-color-on-tertiary-container);--mat-mdc-button-ripple-color: var(--md-sys-color-on-tertiary-container)}.ai-action-btn.is-success:hover{background:var(--md-sys-color-tertiary-container)}.ai-action-btn:disabled{background:var(--md-sys-color-surface-container-low);color:var(--md-sys-color-on-surface-variant);border-color:var(--md-sys-color-outline-variant);box-shadow:none;opacity:.7}.ai-form-inline{flex:1;min-width:300px}.ai-credentials-row button{margin-top:4px;height:40px}.btn-spinner{margin-right:8px}.ai-feedback{margin-top:8px;display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--md-sys-color-error-container);color:var(--md-sys-color-on-error-container);border-radius:var(--md-sys-shape-corner-extra-small, 4px);font-size:13px}.ai-feedback--warn{background:var(--md-sys-color-tertiary-container);color:var(--md-sys-color-on-tertiary-container)}.disabled-group{opacity:.6;pointer-events:none}.ai-model-content{display:flex;flex-direction:column;gap:8px}.ai-model-controls{display:flex;align-items:flex-start;gap:8px}.ai-model-controls ::ng-deep praxis-dynamic-form{flex:1}.ai-model-details{font-size:12px;color:var(--md-sys-color-on-surface-variant);margin-left:4px}.ai-subtext{font-size:12px;color:var(--md-sys-color-on-surface-variant)}.ai-header-actions{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.ai-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:var(--md-sys-color-surface-container-low);border-radius:var(--md-sys-shape-corner-small, 8px);color:var(--md-sys-color-outline);gap:8px;text-align:center;font-size:13px}.spin{animation:spin 1s linear infinite}@keyframes spin{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}\n"] }]
6360
+ `, styles: [".dlg-icon-helpers{margin:12px 16px 4px;padding:12px;border:1px dashed var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-small, 8px)}.dlg-icon-helpers__head{font-weight:600;margin-bottom:8px;opacity:.8}.dlg-icon-helpers__row{display:flex;align-items:center;gap:12px;padding:6px 0}.dlg-icon-helpers__label{text-transform:capitalize;width:96px;opacity:.8}.dlg-icon-helpers__preview{width:24px;height:24px}.dlg-icon-helpers__value{font-family:monospace;font-size:12px;opacity:.8}.dlg-icon-helpers__hint{margin-top:8px;font-size:12px;opacity:.7}.panel-icon{margin-right:12px;color:var(--md-sys-color-primary);flex-shrink:0}:host ::ng-deep .mat-expansion-panel-header{height:auto!important;min-height:54px;padding-block:10px}:host ::ng-deep .mat-expansion-panel-header-title,:host ::ng-deep .mat-expansion-panel-header-description{line-height:1.35}:host ::ng-deep .mat-expansion-panel-body .form-section{border:none;background:transparent;box-shadow:none;padding:4px 0 0}@media(max-width:560px){:host ::ng-deep .mat-expansion-panel-header .mat-content{flex-direction:column;align-items:flex-start;gap:4px}:host ::ng-deep .mat-expansion-panel-header-title,:host ::ng-deep .mat-expansion-panel-header-description{margin-right:0}}.ai-config-container{padding:16px;display:flex;flex-direction:column;gap:24px}.ai-config-source{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:var(--md-sys-shape-corner-medium, 10px);border:1px dashed var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container-low);font-size:12px;color:var(--md-sys-color-on-surface-variant);flex-wrap:wrap}.ai-config-source__meta{display:inline-flex;align-items:center;gap:8px}.ai-action-btn--clear{background:var(--md-sys-color-error-container);color:var(--md-sys-color-on-error-container);--mdc-outlined-button-container-color: var(--md-sys-color-error-container);--mdc-outlined-button-label-text-color: var(--md-sys-color-on-error-container);--mdc-outlined-button-outline-color: var(--md-sys-color-error);--mat-mdc-button-persistent-ripple-color: var(--md-sys-color-on-error-container);--mat-mdc-button-ripple-color: var(--md-sys-color-on-error-container)}.ai-action-btn--clear:hover{background:var(--md-sys-color-error-container)}.ai-group-title{display:flex;align-items:center;gap:8px;font-weight:500;font-size:14px;color:var(--md-sys-color-primary);margin-bottom:12px;border-bottom:1px solid var(--md-sys-color-outline-variant);padding-bottom:4px}.ai-group-title mat-icon{font-size:20px;width:20px;height:20px}.ai-group ::ng-deep .form-actions,.ai-group ::ng-deep button[type=submit]{display:none!important}.ai-credentials-row{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap}.ai-group-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.ai-provider-summary{display:flex;align-items:center;gap:12px;padding:8px 12px;border-radius:var(--md-sys-shape-corner-medium, 10px);background:var(--md-sys-color-surface-variant);border:1px solid var(--md-sys-color-outline-variant);margin:8px 0 4px;flex-wrap:wrap}.ai-provider-icon{width:32px;height:32px;border-radius:var(--md-sys-shape-corner-small, 8px);border:1px solid var(--md-sys-color-outline-variant);display:flex;align-items:center;justify-content:center;background:var(--md-sys-color-surface);color:var(--md-sys-color-primary);flex:0 0 auto}.provider-svg{width:18px;height:18px}.ai-provider-meta{display:flex;flex-direction:column;gap:2px;min-width:200px;flex:1 1 auto}.ai-provider-name{font-weight:600;font-size:13px}.ai-provider-desc{font-size:12px;opacity:.75}.ai-provider-key{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1px solid var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container-lowest);color:var(--md-sys-color-on-surface-variant);font-size:11px;font-weight:600;letter-spacing:.2px;box-shadow:var(--md-sys-elevation-level1, 0 1px 2px rgba(0,0,0,.2))}.ai-provider-key mat-icon{width:16px;height:16px;font-size:16px}.ai-provider-key.is-present{background:var(--md-sys-color-primary-container);color:var(--md-sys-color-on-primary-container);border-color:var(--md-sys-color-primary)}.ai-provider-key.is-saved{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);border-color:var(--md-sys-color-secondary)}.ai-provider-key.is-missing{background:var(--md-sys-color-surface-container-low);color:var(--md-sys-color-on-surface-variant);border-style:dashed;opacity:.9}.ai-provider-key.is-unlocked{background:var(--md-sys-color-tertiary-container);color:var(--md-sys-color-on-tertiary-container);border-color:var(--md-sys-color-tertiary)}.ai-action-btn{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 14px;min-width:168px;border-radius:var(--md-sys-shape-corner-medium, 12px);white-space:nowrap;background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);border-color:var(--md-sys-color-outline-variant);box-shadow:var(--md-sys-elevation-level1, 0 1px 2px rgba(0,0,0,.2));transition:background-color .15s ease,box-shadow .15s ease,transform .06s ease;--mdc-outlined-button-container-color: var(--md-sys-color-secondary-container);--mdc-outlined-button-label-text-color: var(--md-sys-color-on-secondary-container);--mdc-outlined-button-outline-color: var(--md-sys-color-outline-variant);--mat-mdc-button-persistent-ripple-color: var(--md-sys-color-on-secondary-container);--mat-mdc-button-ripple-color: var(--md-sys-color-on-secondary-container)}.ai-action-btn .mat-button-wrapper,.ai-action-btn .mdc-button__label{display:inline-flex;align-items:center;gap:8px;line-height:1;height:100%}.ai-action-btn .mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.ai-action-btn .ai-action-label{display:inline-flex;align-items:center;line-height:1}.ai-action-btn .mat-progress-spinner,.ai-action-btn .btn-spinner{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}.ai-action-btn:hover{background:var(--md-sys-color-secondary-container);box-shadow:var(--md-sys-elevation-level2, 0 2px 6px rgba(0,0,0,.25))}.ai-action-btn:active{transform:translateY(1px)}.ai-action-btn:focus-visible{outline:2px solid var(--md-sys-color-primary);outline-offset:2px}.ai-action-btn.is-success{background:var(--md-sys-color-tertiary-container);color:var(--md-sys-color-on-tertiary-container);border-color:var(--md-sys-color-tertiary);--mdc-outlined-button-container-color: var(--md-sys-color-tertiary-container);--mdc-outlined-button-label-text-color: var(--md-sys-color-on-tertiary-container);--mdc-outlined-button-outline-color: var(--md-sys-color-tertiary);--mat-mdc-button-persistent-ripple-color: var(--md-sys-color-on-tertiary-container);--mat-mdc-button-ripple-color: var(--md-sys-color-on-tertiary-container)}.ai-action-btn.is-success:hover{background:var(--md-sys-color-tertiary-container)}.ai-action-btn:disabled{background:var(--md-sys-color-surface-container-low);color:var(--md-sys-color-on-surface-variant);border-color:var(--md-sys-color-outline-variant);box-shadow:none;opacity:.7}.ai-form-inline{flex:1;min-width:300px}.ai-credentials-row button{margin-top:4px;height:40px}.btn-spinner{margin-right:8px}.ai-feedback{margin-top:8px;display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--md-sys-color-error-container);color:var(--md-sys-color-on-error-container);border-radius:var(--md-sys-shape-corner-extra-small, 4px);font-size:13px}.ai-feedback--warn{background:var(--md-sys-color-tertiary-container);color:var(--md-sys-color-on-tertiary-container)}.disabled-group{opacity:.6;pointer-events:none}.ai-model-content{display:flex;flex-direction:column;gap:8px}.ai-model-controls{display:flex;align-items:flex-start;gap:8px}.ai-model-controls ::ng-deep praxis-dynamic-form{flex:1}.ai-model-details{font-size:12px;color:var(--md-sys-color-on-surface-variant);margin-left:4px}.ai-subtext{font-size:12px;color:var(--md-sys-color-on-surface-variant)}.ai-header-actions{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.ai-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:var(--md-sys-color-surface-container-low);border-radius:var(--md-sys-shape-corner-small, 8px);color:var(--md-sys-color-outline);gap:8px;text-align:center;font-size:13px}.spin{animation:spin 1s linear infinite}@keyframes spin{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}\n"] }]
5282
6361
  }], ctorParameters: () => [{ type: GlobalConfigAdminService }, { type: i2$1.MatSnackBar }], propDecorators: { hostCrud: [{
5283
6362
  type: ViewChild,
5284
6363
  args: ['hostCrud', { read: ViewContainerRef, static: true }]
@@ -5294,6 +6373,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
5294
6373
  }], hostDialog: [{
5295
6374
  type: ViewChild,
5296
6375
  args: ['hostDialog', { read: ViewContainerRef, static: true }]
6376
+ }], hostPages: [{
6377
+ type: ViewChild,
6378
+ args: ['hostPages', { read: ViewContainerRef, static: true }]
5297
6379
  }], hostAiCredentials: [{
5298
6380
  type: ViewChild,
5299
6381
  args: ['hostAiCredentials', { read: ViewContainerRef, static: true }]
@@ -5311,10 +6393,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
5311
6393
  * openGlobalConfigEditor(settings);
5312
6394
  */
5313
6395
  function openGlobalConfigEditor(settings, opts) {
5314
- settings.open({
6396
+ return settings.open({
5315
6397
  id: opts?.id ?? 'global-config',
5316
6398
  title: opts?.title,
5317
6399
  titleIcon: opts?.titleIcon ?? 'tune',
6400
+ owner: opts?.owner,
5318
6401
  content: { component: GlobalConfigEditorComponent, inputs: {} },
5319
6402
  });
5320
6403
  }
@@ -5362,6 +6445,31 @@ const SETTINGS_PANEL_AI_CAPABILITIES = {
5362
6445
  ],
5363
6446
  };
5364
6447
 
6448
+ const settingsPanelConfigRootResolutionSpec = {
6449
+ strategy: 'root-path',
6450
+ paths: ['config', ''],
6451
+ allowIndex: false,
6452
+ };
6453
+ const settingsPanelSizeResolutionSpec = {
6454
+ strategy: 'root-path',
6455
+ paths: ['config', 'runtime.size'],
6456
+ allowIndex: false,
6457
+ };
6458
+ const settingsPanelProviderBehaviorResolutionSpec = {
6459
+ strategy: 'root-path',
6460
+ paths: ['provider', 'ref'],
6461
+ allowIndex: false,
6462
+ };
6463
+ const settingsPanelEditorHostResolutionSpec = {
6464
+ strategy: 'root-path',
6465
+ paths: ['config.content', 'content'],
6466
+ allowIndex: false,
6467
+ };
6468
+ const settingsPanelDiagnosticsResolutionSpec = {
6469
+ strategy: 'root-path',
6470
+ paths: ['config.diagnostics', 'panel'],
6471
+ allowIndex: false,
6472
+ };
5365
6473
  const panelSizeSchema = {
5366
6474
  type: 'object',
5367
6475
  minProperties: 1,
@@ -5421,14 +6529,14 @@ const PRAXIS_SETTINGS_PANEL_AUTHORING_MANIFEST = {
5421
6529
  { name: 'provider', type: 'SettingsValueProvider', description: 'Editor protocol for dirty, valid, busy, getSettingsValue, onSave, reset and close hooks.' },
5422
6530
  ],
5423
6531
  editableTargets: [
5424
- { kind: 'panelShell', resolver: 'settings-panel-config-root', description: 'Top-level shell identity and title fields owned by SettingsPanelConfig.' },
5425
- { kind: 'openMode', resolver: 'settings-panel-open-mode', description: 'Initial expanded state, replacement mediation and close behavior for an authoring panel.' },
5426
- { kind: 'panelSize', resolver: 'settings-panel-size-and-resize', description: 'Width, min/max width, resize enablement and persisted size key.' },
5427
- { kind: 'applyBehavior', resolver: 'settings-value-provider-apply-contract', description: 'Apply availability and payload emission through getSettingsValue().' },
5428
- { kind: 'saveBehavior', resolver: 'settings-value-provider-save-contract', description: 'Save availability, onSave fallback and close-after-save behavior.' },
5429
- { kind: 'resetBehavior', resolver: 'settings-value-provider-reset-contract', description: 'Reset confirmation, provider reset hook and reset event emission.' },
5430
- { kind: 'editorHost', resolver: 'settings-panel-editor-host', description: 'Hosted editor component and serializable input envelope.' },
5431
- { kind: 'diagnostics', resolver: 'settings-panel-state-diagnostics', description: 'Dirty, valid, busy, disabled reason and status message visibility.' },
6532
+ { kind: 'panelShell', resolver: 'settings-panel-config-root', resolutionSpec: settingsPanelConfigRootResolutionSpec, description: 'Top-level shell identity and title fields owned by SettingsPanelConfig.' },
6533
+ { kind: 'openMode', resolver: 'settings-panel-open-mode', resolutionSpec: settingsPanelConfigRootResolutionSpec, description: 'Initial expanded state, replacement mediation and close behavior for an authoring panel.' },
6534
+ { kind: 'panelSize', resolver: 'settings-panel-size-and-resize', resolutionSpec: settingsPanelSizeResolutionSpec, description: 'Width, min/max width, resize enablement and persisted size key.' },
6535
+ { kind: 'applyBehavior', resolver: 'settings-value-provider-apply-contract', resolutionSpec: settingsPanelProviderBehaviorResolutionSpec, description: 'Apply availability and payload emission through getSettingsValue().' },
6536
+ { kind: 'saveBehavior', resolver: 'settings-value-provider-save-contract', resolutionSpec: settingsPanelProviderBehaviorResolutionSpec, description: 'Save availability, onSave fallback and close-after-save behavior.' },
6537
+ { kind: 'resetBehavior', resolver: 'settings-value-provider-reset-contract', resolutionSpec: settingsPanelProviderBehaviorResolutionSpec, description: 'Reset confirmation, provider reset hook and reset event emission.' },
6538
+ { kind: 'editorHost', resolver: 'settings-panel-editor-host', resolutionSpec: settingsPanelEditorHostResolutionSpec, description: 'Hosted editor component and serializable input envelope.' },
6539
+ { kind: 'diagnostics', resolver: 'settings-panel-state-diagnostics', resolutionSpec: settingsPanelDiagnosticsResolutionSpec, description: 'Dirty, valid, busy, disabled reason and status message visibility.' },
5432
6540
  ],
5433
6541
  operations: [
5434
6542
  {
@@ -5436,7 +6544,7 @@ const PRAXIS_SETTINGS_PANEL_AUTHORING_MANIFEST = {
5436
6544
  title: 'Configure panel shell identity',
5437
6545
  scope: 'global',
5438
6546
  targetKind: 'panelShell',
5439
- target: { kind: 'panelShell', resolver: 'settings-panel-config-root', ambiguityPolicy: 'fail', required: true },
6547
+ target: { kind: 'panelShell', resolver: 'settings-panel-config-root', resolutionSpec: settingsPanelConfigRootResolutionSpec, ambiguityPolicy: 'fail', required: true },
5440
6548
  inputSchema: panelShellSchema,
5441
6549
  effects: [{ kind: 'merge-object', path: 'config' }],
5442
6550
  validators: ['panel-id-stable', 'title-i18n-compatible', 'settings-panel-round-trip'],
@@ -5451,7 +6559,7 @@ const PRAXIS_SETTINGS_PANEL_AUTHORING_MANIFEST = {
5451
6559
  title: 'Set panel open mode',
5452
6560
  scope: 'global',
5453
6561
  targetKind: 'openMode',
5454
- target: { kind: 'openMode', resolver: 'settings-panel-open-mode', ambiguityPolicy: 'fail', required: false },
6562
+ target: { kind: 'openMode', resolver: 'settings-panel-open-mode', resolutionSpec: settingsPanelConfigRootResolutionSpec, ambiguityPolicy: 'fail', required: false },
5455
6563
  inputSchema: {
5456
6564
  type: 'object',
5457
6565
  minProperties: 1,
@@ -5473,7 +6581,7 @@ const PRAXIS_SETTINGS_PANEL_AUTHORING_MANIFEST = {
5473
6581
  title: 'Set panel size and resize policy',
5474
6582
  scope: 'layout',
5475
6583
  targetKind: 'panelSize',
5476
- target: { kind: 'panelSize', resolver: 'settings-panel-size-and-resize', ambiguityPolicy: 'fail', required: false },
6584
+ target: { kind: 'panelSize', resolver: 'settings-panel-size-and-resize', resolutionSpec: settingsPanelSizeResolutionSpec, ambiguityPolicy: 'fail', required: false },
5477
6585
  inputSchema: panelSizeSchema,
5478
6586
  effects: [{ kind: 'compile-domain-patch', handler: 'settings-panel-size-set', handlerContract: {
5479
6587
  reads: ['SettingsPanelConfig', 'SettingsPanelRef.sizeChanged$', 'persistSizeKey'],
@@ -5495,7 +6603,7 @@ const PRAXIS_SETTINGS_PANEL_AUTHORING_MANIFEST = {
5495
6603
  title: 'Set apply behavior',
5496
6604
  scope: 'interaction',
5497
6605
  targetKind: 'applyBehavior',
5498
- target: { kind: 'applyBehavior', resolver: 'settings-value-provider-apply-contract', ambiguityPolicy: 'fail', required: false },
6606
+ target: { kind: 'applyBehavior', resolver: 'settings-value-provider-apply-contract', resolutionSpec: settingsPanelProviderBehaviorResolutionSpec, ambiguityPolicy: 'fail', required: false },
5499
6607
  inputSchema: behaviorSchema,
5500
6608
  effects: [{ kind: 'compile-domain-patch', handler: 'settings-panel-apply-behavior-set', handlerContract: {
5501
6609
  reads: ['SettingsValueProvider.isDirty$', 'SettingsValueProvider.isValid$', 'SettingsValueProvider.isBusy$', 'SettingsValueProvider.getSettingsValue'],
@@ -5517,7 +6625,7 @@ const PRAXIS_SETTINGS_PANEL_AUTHORING_MANIFEST = {
5517
6625
  title: 'Set save behavior',
5518
6626
  scope: 'interaction',
5519
6627
  targetKind: 'saveBehavior',
5520
- target: { kind: 'saveBehavior', resolver: 'settings-value-provider-save-contract', ambiguityPolicy: 'fail', required: false },
6628
+ target: { kind: 'saveBehavior', resolver: 'settings-value-provider-save-contract', resolutionSpec: settingsPanelProviderBehaviorResolutionSpec, ambiguityPolicy: 'fail', required: false },
5521
6629
  inputSchema: behaviorSchema,
5522
6630
  effects: [{ kind: 'compile-domain-patch', handler: 'settings-panel-save-behavior-set', handlerContract: {
5523
6631
  reads: ['SettingsValueProvider.onSave', 'SettingsValueProvider.getSettingsValue', 'SettingsValueProvider.isDirty$', 'SettingsValueProvider.isValid$', 'SettingsValueProvider.isBusy$'],
@@ -5539,7 +6647,7 @@ const PRAXIS_SETTINGS_PANEL_AUTHORING_MANIFEST = {
5539
6647
  title: 'Set reset behavior',
5540
6648
  scope: 'interaction',
5541
6649
  targetKind: 'resetBehavior',
5542
- target: { kind: 'resetBehavior', resolver: 'settings-value-provider-reset-contract', ambiguityPolicy: 'fail', required: false },
6650
+ target: { kind: 'resetBehavior', resolver: 'settings-value-provider-reset-contract', resolutionSpec: settingsPanelProviderBehaviorResolutionSpec, ambiguityPolicy: 'fail', required: false },
5543
6651
  inputSchema: {
5544
6652
  type: 'object',
5545
6653
  minProperties: 1,
@@ -5570,7 +6678,7 @@ const PRAXIS_SETTINGS_PANEL_AUTHORING_MANIFEST = {
5570
6678
  title: 'Configure hosted editor',
5571
6679
  scope: 'templating',
5572
6680
  targetKind: 'editorHost',
5573
- target: { kind: 'editorHost', resolver: 'settings-panel-editor-host', ambiguityPolicy: 'fail', required: true },
6681
+ target: { kind: 'editorHost', resolver: 'settings-panel-editor-host', resolutionSpec: settingsPanelEditorHostResolutionSpec, ambiguityPolicy: 'fail', required: true },
5574
6682
  inputSchema: editorHostSchema,
5575
6683
  effects: [{ kind: 'compile-domain-patch', handler: 'settings-panel-editor-host-configure', handlerContract: {
5576
6684
  reads: ['ComponentMetadataRegistry', 'SettingsPanelConfig.content', 'SettingsValueProvider', 'component.authoringManifest'],
@@ -5592,7 +6700,7 @@ const PRAXIS_SETTINGS_PANEL_AUTHORING_MANIFEST = {
5592
6700
  title: 'Set panel diagnostics visibility',
5593
6701
  scope: 'interaction',
5594
6702
  targetKind: 'diagnostics',
5595
- target: { kind: 'diagnostics', resolver: 'settings-panel-state-diagnostics', ambiguityPolicy: 'fail', required: false },
6703
+ target: { kind: 'diagnostics', resolver: 'settings-panel-state-diagnostics', resolutionSpec: settingsPanelDiagnosticsResolutionSpec, ambiguityPolicy: 'fail', required: false },
5596
6704
  inputSchema: {
5597
6705
  type: 'object',
5598
6706
  minProperties: 1,