@praxisui/settings-panel 9.0.66 → 9.0.68-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@praxisui/settings-panel",
3
- "version": "9.0.66",
3
+ "version": "9.0.68-rc.0",
4
4
  "description": "Settings panel for Praxis UI libraries: open editors for configuration at runtime and persist settings.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
7
7
  "@angular/core": "^21.0.0",
8
8
  "@angular/cdk": "^21.0.0",
9
9
  "@angular/material": "^21.0.0",
10
- "@praxisui/ai": "^9.0.66",
11
- "@praxisui/core": "^9.0.66",
12
- "@praxisui/dynamic-fields": "^9.0.66",
10
+ "@praxisui/ai": "^9.0.68-rc.0",
11
+ "@praxisui/core": "^9.0.68-rc.0",
12
+ "@praxisui/dynamic-fields": "^9.0.68-rc.0",
13
13
  "rxjs": "~7.8.0"
14
14
  },
15
15
  "dependencies": {
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Type, Injector, ComponentRef, Provider, OnDestroy, ChangeDetectorRef, ElementRef, InjectionToken, OnInit, AfterViewInit, ViewContainerRef } from '@angular/core';
2
+ import { DestroyRef, Type, Injector, ComponentRef, Provider, OnDestroy, ChangeDetectorRef, ElementRef, InjectionToken, OnInit, AfterViewInit, ViewContainerRef } from '@angular/core';
3
3
  import * as rxjs from 'rxjs';
4
4
  import { Observable, BehaviorSubject } from 'rxjs';
5
5
  import { OverlayRef, Overlay, OverlayContainer } from '@angular/cdk/overlay';
@@ -9,10 +9,14 @@ import { MatSnackBar } from '@angular/material/snack-bar';
9
9
  import { AiProviderCatalogItem } from '@praxisui/ai';
10
10
 
11
11
  interface SettingsPanelConfig {
12
+ /** Transient owner lifetime; never persisted or forwarded to editor inputs. */
13
+ owner?: DestroyRef;
12
14
  id: string;
13
15
  title?: string;
14
16
  /** Optional Material icon name to display in header before the title */
15
17
  titleIcon?: string;
18
+ /** Ephemeral target for a read-only look at the live result; never persisted. */
19
+ previewTarget?: () => HTMLElement | null;
16
20
  /** Optional initial expanded state */
17
21
  expanded?: boolean;
18
22
  resizable?: boolean;
@@ -20,9 +24,10 @@ interface SettingsPanelConfig {
20
24
  minWidth?: string;
21
25
  maxWidth?: string;
22
26
  diagnostics?: SettingsPanelDiagnosticsConfig;
27
+ /** Lazy inputs run once after close mediation accepts this opening. */
23
28
  content: {
24
29
  component: Type<any>;
25
- inputs?: Record<string, any>;
30
+ inputs?: Record<string, any> | (() => Record<string, any>);
26
31
  };
27
32
  }
28
33
  interface SettingsPanelDiagnosticsConfig {
@@ -45,9 +50,12 @@ interface SettingsValueProvider {
45
50
  * Reseta as configurações para o estado inicial
46
51
  */
47
52
  reset?(): void;
53
+ /** Acknowledge a value accepted by the document owner, not merely emitted by Apply. */
54
+ acceptAppliedValue?(value: unknown): void;
48
55
  /**
49
56
  * Observable que indica se há alterações não salvas.
50
- * Controla a habilitação dos botões Salvar e Aplicar.
57
+ * Habilita Aplicar e Salvar. Após Aplicar, o painel também permite Salvar
58
+ * mesmo se o editor limpar o rascunho, respeitando validade e estado ocupado.
51
59
  */
52
60
  isDirty$: Observable<boolean>;
53
61
  /**
@@ -141,6 +149,8 @@ declare class SettingsPanelRef {
141
149
  updateSize(width: string | number, options?: {
142
150
  persist?: boolean;
143
151
  }): void;
152
+ /** Temporary presentation only: does not save or overwrite persisted panel width. */
153
+ setPreviewing(previewing: boolean): void;
144
154
  close(reason?: SettingsPanelCloseReason): void;
145
155
  private complete;
146
156
  }
@@ -164,6 +174,7 @@ declare class DeferredSettingsPanelRef {
164
174
  save(value: any): void;
165
175
  reset(): void;
166
176
  bindSizePersistor(_fn: (width: string) => void): void;
177
+ setPreviewing(previewing: boolean): void;
167
178
  updateSize(width: string | number, options?: {
168
179
  persist?: boolean;
169
180
  }): void;
@@ -337,13 +348,16 @@ declare class SettingsPanelService {
337
348
  private currentScope?;
338
349
  private currentContentParentInjector?;
339
350
  private childSequence;
351
+ private openingRevision;
352
+ private readonly closedPanels;
353
+ private readonly panelParents;
340
354
  private readonly i18n;
341
355
  private readonly layerScale;
342
356
  constructor(baseSidePanelService: BaseSidePanelService, injector: Injector);
343
357
  /**
344
358
  * Opens a new settings panel. If another panel is already open it will be
345
- * closed before the new one is created. Future improvements may reuse the
346
- * same overlay when the provided id matches.
359
+ * mediated before the new content is created. Replacing a child preserves
360
+ * its parent and overlay scope.
347
361
  */
348
362
  open(config: SettingsPanelConfig, contentParentInjector?: Injector): SettingsPanelRef;
349
363
  /**
@@ -352,6 +366,7 @@ declare class SettingsPanelService {
352
366
  */
353
367
  openChild(config: SettingsPanelConfig, contentParentInjector?: Injector): SettingsPanelRef;
354
368
  private openFresh;
369
+ private cancelledOpen;
355
370
  close(reason?: SettingsPanelCloseReason): void;
356
371
  static ɵfac: i0.ɵɵFactoryDeclaration<SettingsPanelService, never>;
357
372
  static ɵprov: i0.ɵɵInjectableDeclaration<SettingsPanelService>;
@@ -433,6 +448,15 @@ declare class SettingsPanelComponent {
433
448
  persistSizeKey?: string;
434
449
  expanded: boolean;
435
450
  interactionActive: boolean;
451
+ previewTarget?: () => HTMLElement | null;
452
+ previewing: boolean;
453
+ private previewElement;
454
+ private previewScroll;
455
+ private previewFocus;
456
+ private readonly renderer;
457
+ private suspendedFocus;
458
+ private readonly interactivityChecker;
459
+ private focusTrap?;
436
460
  ref: SettingsPanelRef;
437
461
  contentRef?: ComponentRef<any>;
438
462
  private static nextId;
@@ -442,6 +466,7 @@ declare class SettingsPanelComponent {
442
466
  isBusy: boolean;
443
467
  diagnostics: Required<SettingsPanelDiagnosticsConfig>;
444
468
  private lastSavedAt;
469
+ private hasAppliedChanges;
445
470
  private activePointerId;
446
471
  private dragStartX;
447
472
  private dragStartWidth;
@@ -452,6 +477,10 @@ declare class SettingsPanelComponent {
452
477
  readonly saveActionLabel: string;
453
478
  private contentHost;
454
479
  constructor(cdr: ChangeDetectorRef, dialog: MatDialog, elementRef: ElementRef<HTMLElement>, overlayContainer: OverlayContainer);
480
+ get canInspectPreview(): boolean;
481
+ showPreview(): void;
482
+ returnFromPreview(): void;
483
+ private restorePreviewPage;
455
484
  get canApply(): boolean;
456
485
  get panelInlineStyles(): Record<string, string | null>;
457
486
  get showResizeHandle(): boolean;
@@ -462,7 +491,7 @@ declare class SettingsPanelComponent {
462
491
  get applySaveDisabledReason(): string;
463
492
  get showStatusMessage(): boolean;
464
493
  get showBusyIndicator(): boolean;
465
- get statusTone(): 'busy' | 'dirty' | 'invalid' | 'saved' | 'idle';
494
+ get statusTone(): 'busy' | 'dirty' | 'invalid' | 'applied' | 'saved' | 'idle';
466
495
  get statusMessage(): string;
467
496
  tx(text: string, params?: Record<string, string | number | boolean | null | undefined>): string;
468
497
  actionLabel(text: string): string;