@praxisui/settings-panel 10.0.0-rc.7 → 10.0.0-rc.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/ai/component-registry.json +136 -8
- package/fesm2022/praxisui-settings-panel.mjs +1980 -236
- package/package.json +4 -4
- package/types/praxisui-settings-panel.d.ts +191 -9
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/settings-panel",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.70",
|
|
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": "^10.0.0-rc.
|
|
11
|
-
"@praxisui/core": "^10.0.0-rc.
|
|
12
|
-
"@praxisui/dynamic-fields": "^10.0.0-rc.
|
|
10
|
+
"@praxisui/ai": "^10.0.0-rc.70",
|
|
11
|
+
"@praxisui/core": "^10.0.0-rc.70",
|
|
12
|
+
"@praxisui/dynamic-fields": "^10.0.0-rc.70",
|
|
13
13
|
"rxjs": "~7.8.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
@@ -3,12 +3,36 @@ import { DestroyRef, Type, Injector, ComponentRef, Provider, OnDestroy, ChangeDe
|
|
|
3
3
|
import * as rxjs from 'rxjs';
|
|
4
4
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
5
5
|
import { OverlayRef, Overlay, OverlayContainer } from '@angular/cdk/overlay';
|
|
6
|
-
import { SurfaceOutcome, PraxisI18nService, SurfaceDrawerNavigationFrame, SurfaceDrawerNavigationGuard, GlobalConfig, FormConfig, FormValueChangeEvent, AiCapability, AiCapabilityCategory, AiCapabilityCatalog, AiValueKind, ComponentAuthoringManifest, ComponentDocMeta } from '@praxisui/core';
|
|
6
|
+
import { ConfigStorageSaveError, SurfaceOutcome, PraxisI18nService, SurfaceDrawerNavigationFrame, SurfaceDrawerNavigationGuard, ConfigStorageScope, GlobalConfig, FormConfig, FormValueChangeEvent, AiCapability, AiCapabilityCategory, AiCapabilityCatalog, AiValueKind, ComponentAuthoringManifest, ComponentDocMeta } from '@praxisui/core';
|
|
7
7
|
import { MatDialog } from '@angular/material/dialog';
|
|
8
8
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
9
9
|
import { AiProviderCatalogItem } from '@praxisui/ai';
|
|
10
10
|
|
|
11
|
-
interface
|
|
11
|
+
interface SettingsPanelContextTarget {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}
|
|
15
|
+
interface SettingsPanelContextMode {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
icon?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Optional logical group identifier. Modes sharing the same `editorGroup`
|
|
22
|
+
* operate on the same active editor instance (in-place tab/section switch)
|
|
23
|
+
* without triggering an intermediate `onApply()` before switching.
|
|
24
|
+
*/
|
|
25
|
+
editorGroup?: string;
|
|
26
|
+
}
|
|
27
|
+
interface SettingsPanelContextNavigation {
|
|
28
|
+
targets?: ReadonlyArray<SettingsPanelContextTarget>;
|
|
29
|
+
activeTargetId?: string;
|
|
30
|
+
onSelectTarget?: (targetId: string) => void;
|
|
31
|
+
modes?: ReadonlyArray<SettingsPanelContextMode>;
|
|
32
|
+
activeModeId?: string;
|
|
33
|
+
onSelectMode?: (modeId: string) => void;
|
|
34
|
+
}
|
|
35
|
+
interface SettingsPanelConfig<TValue = any> {
|
|
12
36
|
/** Transient owner lifetime; never persisted or forwarded to editor inputs. */
|
|
13
37
|
owner?: DestroyRef;
|
|
14
38
|
id: string;
|
|
@@ -17,12 +41,30 @@ interface SettingsPanelConfig {
|
|
|
17
41
|
titleIcon?: string;
|
|
18
42
|
/** Ephemeral target for a read-only look at the live result; never persisted. */
|
|
19
43
|
previewTarget?: () => HTMLElement | null;
|
|
44
|
+
/** Optional contextual target/mode navigation bar rendered in the settings panel shell. */
|
|
45
|
+
contextNavigation?: SettingsPanelContextNavigation;
|
|
20
46
|
/** Optional initial expanded state */
|
|
21
47
|
expanded?: boolean;
|
|
22
48
|
resizable?: boolean;
|
|
23
49
|
persistSizeKey?: string;
|
|
24
50
|
minWidth?: string;
|
|
25
51
|
maxWidth?: string;
|
|
52
|
+
/** Optional storage key allowing personal overrides to be reset to tenant baseline. */
|
|
53
|
+
configStorageKey?: string;
|
|
54
|
+
/** Controls visibility of the write-scope indicator/toggle when ApiConfigStorage is active. */
|
|
55
|
+
showWriteScope?: boolean;
|
|
56
|
+
/** Allows switching between personal ('user') and shared ('tenant') configuration scopes. */
|
|
57
|
+
canSwitchWriteScope?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Optional async persistence hook invoked with the saved settings value before closing the panel.
|
|
60
|
+
* When provided and throwing/rejecting/erroring, the panel stays open with the inline error banner.
|
|
61
|
+
*/
|
|
62
|
+
onSave?: (value: TValue) => unknown | Promise<unknown> | Observable<unknown>;
|
|
63
|
+
/**
|
|
64
|
+
* Optional async persistence hook invoked on reset before emitting reset/resetToDefaults.
|
|
65
|
+
* When provided and throwing/rejecting/erroring, the panel stays open with the inline error banner.
|
|
66
|
+
*/
|
|
67
|
+
onReset?: () => unknown | Promise<unknown> | Observable<unknown>;
|
|
26
68
|
diagnostics?: SettingsPanelDiagnosticsConfig;
|
|
27
69
|
/** Lazy inputs run once after close mediation accepts this opening. */
|
|
28
70
|
content: {
|
|
@@ -125,16 +167,20 @@ declare class SettingsPanelRef {
|
|
|
125
167
|
private appliedSubject;
|
|
126
168
|
private savedSubject;
|
|
127
169
|
private resetSubject;
|
|
170
|
+
private tenantBaselineRestoredSubject;
|
|
128
171
|
private closedSubject;
|
|
129
172
|
private sizeChangedSubject;
|
|
173
|
+
private persistenceErrorSubject;
|
|
130
174
|
private sizePersistor?;
|
|
131
175
|
applied$: rxjs.Observable<any>;
|
|
132
176
|
saved$: rxjs.Observable<any>;
|
|
133
177
|
reset$: rxjs.Observable<void>;
|
|
178
|
+
tenantBaselineRestored$: rxjs.Observable<unknown>;
|
|
134
179
|
closed$: rxjs.Observable<SettingsPanelCloseReason>;
|
|
135
180
|
sizeChanged$: rxjs.Observable<{
|
|
136
181
|
width: string;
|
|
137
182
|
}>;
|
|
183
|
+
persistenceError$: rxjs.Observable<ConfigStorageSaveError>;
|
|
138
184
|
constructor(overlayRef: OverlayRef);
|
|
139
185
|
apply(value: any): void;
|
|
140
186
|
/**
|
|
@@ -145,6 +191,8 @@ declare class SettingsPanelRef {
|
|
|
145
191
|
*/
|
|
146
192
|
save(value: any): void;
|
|
147
193
|
reset(): void;
|
|
194
|
+
notifyTenantBaselineRestored(baseline: unknown): void;
|
|
195
|
+
reportPersistenceError(error: ConfigStorageSaveError): void;
|
|
148
196
|
bindSizePersistor(fn: (width: string) => void): void;
|
|
149
197
|
updateSize(width: string | number, options?: {
|
|
150
198
|
persist?: boolean;
|
|
@@ -158,21 +206,27 @@ declare class DeferredSettingsPanelRef {
|
|
|
158
206
|
private readonly appliedSubject;
|
|
159
207
|
private readonly savedSubject;
|
|
160
208
|
private readonly resetSubject;
|
|
209
|
+
private readonly tenantBaselineRestoredSubject;
|
|
161
210
|
private readonly closedSubject;
|
|
162
211
|
private readonly sizeChangedSubject;
|
|
212
|
+
private readonly persistenceErrorSubject;
|
|
163
213
|
private target?;
|
|
164
214
|
private completed;
|
|
165
215
|
applied$: rxjs.Observable<any>;
|
|
166
216
|
saved$: rxjs.Observable<any>;
|
|
167
217
|
reset$: rxjs.Observable<void>;
|
|
218
|
+
tenantBaselineRestored$: rxjs.Observable<unknown>;
|
|
168
219
|
closed$: rxjs.Observable<SettingsPanelCloseReason>;
|
|
169
220
|
sizeChanged$: rxjs.Observable<{
|
|
170
221
|
width: string;
|
|
171
222
|
}>;
|
|
223
|
+
persistenceError$: rxjs.Observable<ConfigStorageSaveError>;
|
|
172
224
|
resolve(target: SettingsPanelRef): void;
|
|
173
225
|
apply(value: any): void;
|
|
174
226
|
save(value: any): void;
|
|
175
227
|
reset(): void;
|
|
228
|
+
notifyTenantBaselineRestored(baseline: unknown): void;
|
|
229
|
+
reportPersistenceError(error: ConfigStorageSaveError): void;
|
|
176
230
|
bindSizePersistor(_fn: (width: string) => void): void;
|
|
177
231
|
setPreviewing(previewing: boolean): void;
|
|
178
232
|
updateSize(width: string | number, options?: {
|
|
@@ -239,7 +293,11 @@ interface BaseSidePanelRef<T = unknown> {
|
|
|
239
293
|
updateTitle?(title: string): void;
|
|
240
294
|
updateSize?(size: SidePanelWidthPreset | string | {
|
|
241
295
|
width?: string;
|
|
296
|
+
}, options?: {
|
|
297
|
+
persist?: boolean;
|
|
242
298
|
}): void;
|
|
299
|
+
setExpanded?(expanded: boolean): void;
|
|
300
|
+
toggleExpanded?(): void;
|
|
243
301
|
}
|
|
244
302
|
interface BaseSidePanelContent<TInputs = any> {
|
|
245
303
|
component: Type<any>;
|
|
@@ -256,6 +314,7 @@ interface BaseSidePanelOpenOptions<TInputs = any> {
|
|
|
256
314
|
minWidth?: string;
|
|
257
315
|
maxWidth?: string;
|
|
258
316
|
resizable?: boolean;
|
|
317
|
+
expandable?: boolean;
|
|
259
318
|
resizeAxis?: BaseSidePanelResizeAxis;
|
|
260
319
|
persistSizeKey?: string;
|
|
261
320
|
content: BaseSidePanelContent<TInputs>;
|
|
@@ -272,6 +331,7 @@ declare class BaseSidePanelOverlayRef<T = unknown> implements BaseSidePanelRef<T
|
|
|
272
331
|
private overlayRef;
|
|
273
332
|
private titleUpdater?;
|
|
274
333
|
private sizePersistor?;
|
|
334
|
+
private expandController?;
|
|
275
335
|
private terminalOutcomeEmitted;
|
|
276
336
|
readonly closed$: rxjs.Observable<BaseSidePanelResult<T> | undefined>;
|
|
277
337
|
readonly result$: rxjs.Observable<BaseSidePanelResult<T>>;
|
|
@@ -281,11 +341,19 @@ declare class BaseSidePanelOverlayRef<T = unknown> implements BaseSidePanelRef<T
|
|
|
281
341
|
constructor(overlayRef: OverlayRef);
|
|
282
342
|
bindTitleUpdater(fn: (title: string) => void): void;
|
|
283
343
|
bindSizePersistor(fn: (width: string) => void): void;
|
|
344
|
+
bindExpandController(controller: {
|
|
345
|
+
setExpanded: (expanded: boolean) => void;
|
|
346
|
+
toggleExpanded: () => void;
|
|
347
|
+
}): void;
|
|
348
|
+
setExpanded(expanded: boolean): void;
|
|
349
|
+
toggleExpanded(): void;
|
|
284
350
|
emitResult(result: BaseSidePanelResult<T>): void;
|
|
285
351
|
complete(outcome: SurfaceOutcome<T>): void;
|
|
286
352
|
updateTitle(title: string): void;
|
|
287
353
|
updateSize(size: string | {
|
|
288
354
|
width?: string;
|
|
355
|
+
}, options?: {
|
|
356
|
+
persist?: boolean;
|
|
289
357
|
}): void;
|
|
290
358
|
close(result?: BaseSidePanelResult<T>): void;
|
|
291
359
|
private resolveWidth;
|
|
@@ -331,8 +399,6 @@ declare class BaseSidePanelService {
|
|
|
331
399
|
private resolveOpenConfig;
|
|
332
400
|
private resolvePersistedWidth;
|
|
333
401
|
private persistWidth;
|
|
334
|
-
private storageKey;
|
|
335
|
-
private isPixelWidth;
|
|
336
402
|
private shouldDeferEscape;
|
|
337
403
|
private closeResult;
|
|
338
404
|
private trackCurrentRef;
|
|
@@ -383,10 +449,22 @@ declare class SurfaceDrawerComponent implements OnDestroy {
|
|
|
383
449
|
titleIcon?: string;
|
|
384
450
|
subtitle?: string;
|
|
385
451
|
widthPreset: 'narrow' | 'default' | 'wide' | 'full';
|
|
452
|
+
width?: string;
|
|
453
|
+
minWidth?: string;
|
|
454
|
+
maxWidth?: string;
|
|
455
|
+
resizable: boolean;
|
|
456
|
+
expandable: boolean;
|
|
457
|
+
resizeAxis: 'x';
|
|
458
|
+
persistSizeKey?: string;
|
|
386
459
|
useHostWidth: boolean;
|
|
460
|
+
isExpanded: boolean;
|
|
461
|
+
isResizing: boolean;
|
|
387
462
|
theme: SidePanelThemeContract | null;
|
|
388
463
|
onClose?: () => void;
|
|
389
464
|
onBack?: () => void;
|
|
465
|
+
onResizeWidth?: (width: string, options?: {
|
|
466
|
+
persist?: boolean;
|
|
467
|
+
}) => void;
|
|
390
468
|
private static nextId;
|
|
391
469
|
titleId: string;
|
|
392
470
|
subtitleId: string;
|
|
@@ -395,6 +473,12 @@ declare class SurfaceDrawerComponent implements OnDestroy {
|
|
|
395
473
|
private body?;
|
|
396
474
|
private backButton?;
|
|
397
475
|
private frames;
|
|
476
|
+
private activePointerId;
|
|
477
|
+
private dragStartX;
|
|
478
|
+
private dragStartWidth;
|
|
479
|
+
private collapsedWidthBeforeExpand;
|
|
480
|
+
private suppressNextBackdropClick;
|
|
481
|
+
private backdropSuppressTimer;
|
|
398
482
|
constructor(cdr: ChangeDetectorRef, i18n: PraxisI18nService);
|
|
399
483
|
get hostClasses(): string[];
|
|
400
484
|
get hostCssVars(): Record<string, string>;
|
|
@@ -404,7 +488,26 @@ declare class SurfaceDrawerComponent implements OnDestroy {
|
|
|
404
488
|
get navigationDepth(): number;
|
|
405
489
|
get activeFrameId(): string;
|
|
406
490
|
get hasHeader(): boolean;
|
|
491
|
+
get tracksHostWidth(): boolean;
|
|
492
|
+
get showResizeHandle(): boolean;
|
|
493
|
+
get showExpandButton(): boolean;
|
|
494
|
+
get expandLabel(): string;
|
|
495
|
+
get resizeHandleLabel(): string;
|
|
496
|
+
get resizeMinWidthPx(): number;
|
|
497
|
+
get resizeMaxWidthPx(): number;
|
|
498
|
+
get resizeCurrentWidthPx(): number;
|
|
407
499
|
get widthClass(): string | null;
|
|
500
|
+
syncHostWidth(width: string): void;
|
|
501
|
+
syncCollapsedWidth(width: string): void;
|
|
502
|
+
onWindowResize(): void;
|
|
503
|
+
setExpanded(expanded: boolean): void;
|
|
504
|
+
shouldSuppressBackdropClose(): boolean;
|
|
505
|
+
toggleExpanded(): void;
|
|
506
|
+
onResizeHandlePointerDown(event: PointerEvent): void;
|
|
507
|
+
onResizeHandleDoubleClick(event: MouseEvent): void;
|
|
508
|
+
onResizeHandleKeydown(event: KeyboardEvent): void;
|
|
509
|
+
onDocumentPointerMove(event: PointerEvent): void;
|
|
510
|
+
onDocumentPointerEnd(event: PointerEvent): void;
|
|
408
511
|
setTitle(title: string): void;
|
|
409
512
|
ngOnDestroy(): void;
|
|
410
513
|
attachContent(component: Type<any>, injector: Injector, inputs?: Record<string, unknown>): ComponentRef<any>;
|
|
@@ -424,6 +527,10 @@ declare class SurfaceDrawerComponent implements OnDestroy {
|
|
|
424
527
|
private focusNavigationControl;
|
|
425
528
|
private applyInputs;
|
|
426
529
|
private resolveSupportedInputs;
|
|
530
|
+
private promoteExpandedWidthBeforeManualResize;
|
|
531
|
+
private getCurrentWidthPx;
|
|
532
|
+
private applyWidthPx;
|
|
533
|
+
private stopResizeSession;
|
|
427
534
|
static ɵfac: i0.ɵɵFactoryDeclaration<SurfaceDrawerComponent, never>;
|
|
428
535
|
static ɵcmp: i0.ɵɵComponentDeclaration<SurfaceDrawerComponent, "praxis-surface-drawer", never, {}, {}, never, never, true, never>;
|
|
429
536
|
}
|
|
@@ -449,6 +556,12 @@ declare class SettingsPanelComponent {
|
|
|
449
556
|
expanded: boolean;
|
|
450
557
|
interactionActive: boolean;
|
|
451
558
|
previewTarget?: () => HTMLElement | null;
|
|
559
|
+
contextNavigation?: SettingsPanelContextNavigation;
|
|
560
|
+
configStorageKey?: string;
|
|
561
|
+
showWriteScope: boolean;
|
|
562
|
+
canSwitchWriteScope: boolean;
|
|
563
|
+
persistSaveHandler?: (value: any) => unknown | Promise<unknown> | Observable<unknown>;
|
|
564
|
+
persistResetHandler?: () => unknown | Promise<unknown> | Observable<unknown>;
|
|
452
565
|
previewing: boolean;
|
|
453
566
|
private previewElement;
|
|
454
567
|
private previewScroll;
|
|
@@ -463,7 +576,8 @@ declare class SettingsPanelComponent {
|
|
|
463
576
|
titleId: string;
|
|
464
577
|
private readonly dirtyState;
|
|
465
578
|
private readonly validState;
|
|
466
|
-
private readonly
|
|
579
|
+
private readonly providerBusyState;
|
|
580
|
+
private readonly persistenceBusyState;
|
|
467
581
|
get isDirty(): boolean;
|
|
468
582
|
set isDirty(value: boolean);
|
|
469
583
|
get isValid(): boolean;
|
|
@@ -473,17 +587,36 @@ declare class SettingsPanelComponent {
|
|
|
473
587
|
diagnostics: Required<SettingsPanelDiagnosticsConfig>;
|
|
474
588
|
private lastSavedAt;
|
|
475
589
|
private hasAppliedChanges;
|
|
590
|
+
private saveFailedPendingRetry;
|
|
591
|
+
private confirmDialogOpen;
|
|
592
|
+
private saveErrorStreamBound;
|
|
593
|
+
get isConfirmDialogOpen(): boolean;
|
|
476
594
|
private activePointerId;
|
|
477
595
|
private dragStartX;
|
|
478
596
|
private dragStartWidth;
|
|
479
597
|
private collapsedWidthBeforeExpand;
|
|
480
598
|
private readonly destroyRef;
|
|
599
|
+
private readonly injector;
|
|
481
600
|
private readonly i18n;
|
|
601
|
+
private readonly contextSwitchGuard;
|
|
602
|
+
private readonly directApiStorage;
|
|
603
|
+
private readonly asyncConfigStorage;
|
|
604
|
+
private readonly scopeErrorStorage;
|
|
605
|
+
readonly storageSaveError: i0.WritableSignal<ConfigStorageSaveError | null>;
|
|
482
606
|
readonly applyActionLabel: string;
|
|
483
607
|
readonly saveActionLabel: string;
|
|
484
608
|
private contentHost;
|
|
609
|
+
private saveErrorBanner?;
|
|
485
610
|
constructor(cdr: ChangeDetectorRef, dialog: MatDialog, elementRef: ElementRef<HTMLElement>, overlayContainer: OverlayContainer);
|
|
486
611
|
get canInspectPreview(): boolean;
|
|
612
|
+
get hasContextNavigation(): boolean;
|
|
613
|
+
get activeTargetIndex(): number;
|
|
614
|
+
get canSelectPreviousTarget(): boolean;
|
|
615
|
+
get canSelectNextTarget(): boolean;
|
|
616
|
+
selectPreviousTarget(): void;
|
|
617
|
+
selectNextTarget(): void;
|
|
618
|
+
selectContextTarget(targetId: string, selectElement?: HTMLSelectElement | null): void;
|
|
619
|
+
selectContextMode(modeId: string): void;
|
|
487
620
|
showPreview(): void;
|
|
488
621
|
returnFromPreview(): void;
|
|
489
622
|
private restorePreviewPage;
|
|
@@ -499,14 +632,38 @@ declare class SettingsPanelComponent {
|
|
|
499
632
|
get showBusyIndicator(): boolean;
|
|
500
633
|
get statusTone(): 'busy' | 'dirty' | 'invalid' | 'applied' | 'saved' | 'idle';
|
|
501
634
|
get statusMessage(): string;
|
|
635
|
+
get activeWriteScope(): ConfigStorageScope | null;
|
|
636
|
+
get showWriteScopeControls(): boolean;
|
|
637
|
+
get canToggleWriteScope(): boolean;
|
|
638
|
+
private resolveTenantResetStorage;
|
|
639
|
+
get canResetPersonalOverride(): boolean;
|
|
640
|
+
get writeScopeLabel(): string;
|
|
641
|
+
get writeScopeToggleLabel(): string;
|
|
642
|
+
get formattedSaveErrorMessage(): string;
|
|
643
|
+
get saveErrorFieldMessages(): string[];
|
|
644
|
+
get canSwitchToPersonalScopeFromError(): boolean;
|
|
645
|
+
toggleWriteScope(): void;
|
|
646
|
+
switchToPersonalScopeFromError(): void;
|
|
647
|
+
dismissSaveError(): void;
|
|
648
|
+
resetPersonalOverrideToTenant(): void;
|
|
649
|
+
private matchesPanelStorageKey;
|
|
650
|
+
private resolveScopeErrorStorage;
|
|
651
|
+
private checkWriteGate;
|
|
652
|
+
private isPrebuiltSaveError;
|
|
653
|
+
private handlePersistenceFailure;
|
|
502
654
|
tx(text: string, params?: Record<string, string | number | boolean | null | undefined>): string;
|
|
503
655
|
actionLabel(text: string): string;
|
|
504
656
|
attachContent(component: Type<any>, injector: Injector, ref: SettingsPanelRef, inputs?: Record<string, unknown>): void;
|
|
505
657
|
private applyInputs;
|
|
506
658
|
private resolveSupportedInputs;
|
|
507
659
|
onReset(): void;
|
|
660
|
+
private finalizeReset;
|
|
661
|
+
private runAsyncResetFlow;
|
|
508
662
|
onApply(): void;
|
|
509
663
|
onSave(): void;
|
|
664
|
+
private runAsyncSaveFlow;
|
|
665
|
+
private awaitResult;
|
|
666
|
+
private canProceedWithSave;
|
|
510
667
|
private emitSave;
|
|
511
668
|
private formatClock;
|
|
512
669
|
initializeLayout(state: SettingsPanelLayoutState): void;
|
|
@@ -548,17 +705,25 @@ declare class BaseSidePanelComponent implements OnDestroy {
|
|
|
548
705
|
minWidth?: string;
|
|
549
706
|
maxWidth?: string;
|
|
550
707
|
resizable: boolean;
|
|
708
|
+
expandable: boolean;
|
|
551
709
|
resizeAxis: BaseSidePanelResizeAxis;
|
|
552
710
|
persistSizeKey?: string;
|
|
553
711
|
useHostWidth: boolean;
|
|
712
|
+
isExpanded: boolean;
|
|
713
|
+
isResizing: boolean;
|
|
554
714
|
theme: SidePanelThemeContract | null;
|
|
555
715
|
onClose?: () => void;
|
|
556
|
-
onResizeWidth?: (width: string
|
|
716
|
+
onResizeWidth?: (width: string, options?: {
|
|
717
|
+
persist?: boolean;
|
|
718
|
+
}) => void;
|
|
557
719
|
private static nextId;
|
|
558
720
|
titleId: string;
|
|
559
721
|
private activePointerId;
|
|
560
722
|
private dragStartX;
|
|
561
723
|
private dragStartWidth;
|
|
724
|
+
private collapsedWidthBeforeExpand;
|
|
725
|
+
private suppressNextBackdropClick;
|
|
726
|
+
private backdropSuppressTimer;
|
|
562
727
|
contentRef?: ComponentRef<any>;
|
|
563
728
|
footerRef?: ComponentRef<any>;
|
|
564
729
|
private contentHost;
|
|
@@ -567,6 +732,7 @@ declare class BaseSidePanelComponent implements OnDestroy {
|
|
|
567
732
|
ngOnDestroy(): void;
|
|
568
733
|
get hostClasses(): string[];
|
|
569
734
|
get hostCssVars(): Record<string, string>;
|
|
735
|
+
get tracksHostWidth(): boolean;
|
|
570
736
|
get panelInlineStyles(): Record<string, string | null>;
|
|
571
737
|
get mergedHostStyles(): Record<string, string | null>;
|
|
572
738
|
get closeLabel(): string;
|
|
@@ -575,8 +741,18 @@ declare class BaseSidePanelComponent implements OnDestroy {
|
|
|
575
741
|
get hasFooter(): boolean;
|
|
576
742
|
get widthClass(): string | null;
|
|
577
743
|
get showResizeHandle(): boolean;
|
|
744
|
+
get showExpandButton(): boolean;
|
|
745
|
+
get expandLabel(): string;
|
|
746
|
+
get resizeMinWidthPx(): number;
|
|
747
|
+
get resizeMaxWidthPx(): number;
|
|
748
|
+
get resizeCurrentWidthPx(): number;
|
|
749
|
+
onWindowResize(): void;
|
|
578
750
|
setTitle(title: string): void;
|
|
751
|
+
setExpanded(expanded: boolean): void;
|
|
752
|
+
shouldSuppressBackdropClose(): boolean;
|
|
753
|
+
toggleExpanded(): void;
|
|
579
754
|
onResizeHandlePointerDown(event: PointerEvent): void;
|
|
755
|
+
onResizeHandleDoubleClick(event: MouseEvent): void;
|
|
580
756
|
onResizeHandleKeydown(event: KeyboardEvent): void;
|
|
581
757
|
onDocumentPointerMove(event: PointerEvent): void;
|
|
582
758
|
onDocumentPointerEnd(event: PointerEvent): void;
|
|
@@ -586,6 +762,7 @@ declare class BaseSidePanelComponent implements OnDestroy {
|
|
|
586
762
|
private applyInputs;
|
|
587
763
|
private resolveSupportedInputs;
|
|
588
764
|
private stopResizeSession;
|
|
765
|
+
private promoteExpandedBeforeManualResize;
|
|
589
766
|
private getCurrentWidthPx;
|
|
590
767
|
private applyWidthPx;
|
|
591
768
|
private clampWidthPx;
|
|
@@ -616,8 +793,9 @@ interface GlobalConfigEditorState {
|
|
|
616
793
|
crud: NonNullable<GlobalConfig['crud']>;
|
|
617
794
|
dynamicFields: NonNullable<GlobalConfig['dynamicFields']>;
|
|
618
795
|
table: NonNullable<GlobalConfig['table']>;
|
|
796
|
+
pages?: NonNullable<GlobalConfig['pages']>;
|
|
619
797
|
}
|
|
620
|
-
type GlobalConfigEditorGroup = 'CRUD' | 'Dynamic Fields' | 'Table';
|
|
798
|
+
type GlobalConfigEditorGroup = 'CRUD' | 'Dynamic Fields' | 'Table' | 'Dynamic Pages';
|
|
621
799
|
interface GlobalConfigEditorOption<T = any> {
|
|
622
800
|
label: string;
|
|
623
801
|
value: T;
|
|
@@ -661,6 +839,7 @@ declare class GlobalConfigEditorComponent implements OnInit, AfterViewInit {
|
|
|
661
839
|
hostCache: ViewContainerRef;
|
|
662
840
|
hostTable: ViewContainerRef;
|
|
663
841
|
hostDialog: ViewContainerRef;
|
|
842
|
+
hostPages: ViewContainerRef;
|
|
664
843
|
hostAiCredentials: ViewContainerRef;
|
|
665
844
|
hostAiModel: ViewContainerRef;
|
|
666
845
|
hostAiEmbedding: ViewContainerRef;
|
|
@@ -672,6 +851,7 @@ declare class GlobalConfigEditorComponent implements OnInit, AfterViewInit {
|
|
|
672
851
|
private readonly logger;
|
|
673
852
|
private readonly logContext;
|
|
674
853
|
private readonly providedDynamicFormCtor;
|
|
854
|
+
private readonly componentMetadata;
|
|
675
855
|
private dynamicFormCtor;
|
|
676
856
|
private loggedMissingDynamicForm;
|
|
677
857
|
private dialogFormInst;
|
|
@@ -752,6 +932,7 @@ declare class GlobalConfigEditorComponent implements OnInit, AfterViewInit {
|
|
|
752
932
|
private resolveSaveErrorMessage;
|
|
753
933
|
private normalizeFieldValue;
|
|
754
934
|
private validateCompactTableAppearancePayload;
|
|
935
|
+
private validatePagesDefaultsPayload;
|
|
755
936
|
getVariantIcon(key: string): string | undefined;
|
|
756
937
|
pickVariantIcon(key: string): Promise<void>;
|
|
757
938
|
clearVariantIcon(key: string): void;
|
|
@@ -777,6 +958,7 @@ type OpenGlobalConfigOptions = {
|
|
|
777
958
|
id?: string;
|
|
778
959
|
title?: string;
|
|
779
960
|
titleIcon?: string;
|
|
961
|
+
owner?: DestroyRef;
|
|
780
962
|
tx?: (text: string, params?: Record<string, string | number | boolean | null | undefined>) => string;
|
|
781
963
|
};
|
|
782
964
|
/**
|
|
@@ -784,7 +966,7 @@ type OpenGlobalConfigOptions = {
|
|
|
784
966
|
* Usage:
|
|
785
967
|
* openGlobalConfigEditor(settings);
|
|
786
968
|
*/
|
|
787
|
-
declare function openGlobalConfigEditor(settings: SettingsPanelService, opts?: OpenGlobalConfigOptions):
|
|
969
|
+
declare function openGlobalConfigEditor(settings: SettingsPanelService, opts?: OpenGlobalConfigOptions): SettingsPanelRef;
|
|
788
970
|
|
|
789
971
|
/**
|
|
790
972
|
* Capabilities catalog for SettingsPanelConfig.
|
|
@@ -813,4 +995,4 @@ declare const PRAXIS_SETTINGS_PANEL_COMPONENT_METADATA: ComponentDocMeta;
|
|
|
813
995
|
declare function providePraxisSettingsPanelMetadata(): Provider;
|
|
814
996
|
|
|
815
997
|
export { BASE_SIDE_PANEL_DATA, BASE_SIDE_PANEL_REF, BaseSidePanelComponent, BaseSidePanelOverlayRef, BaseSidePanelService, DeferredSettingsPanelRef, GLOBAL_CONFIG_DYNAMIC_FORM_COMPONENT, GlobalConfigAdminService, GlobalConfigEditorComponent, PRAXIS_SETTINGS_PANEL_AUTHORING_MANIFEST, PRAXIS_SETTINGS_PANEL_COMPONENT_METADATA, SETTINGS_PANEL_AI_CAPABILITIES, SETTINGS_PANEL_DATA, SETTINGS_PANEL_REF, SIDE_PANEL_THEME_CSS_VARS, SettingsPanelComponent, SettingsPanelRef, SettingsPanelService, SurfaceDrawerComponent, buildGlobalConfigFormConfig, openGlobalConfigEditor, providePraxisSettingsPanelBridge, providePraxisSettingsPanelMetadata, providePraxisSurfaceDrawerBridge };
|
|
816
|
-
export type { BaseSidePanelCloseReason, BaseSidePanelContent, BaseSidePanelOpenOptions, BaseSidePanelRef, BaseSidePanelResizeAxis, BaseSidePanelResult, Capability, CapabilityCatalog, CapabilityCategory, GlobalConfigEditorFieldSpec, GlobalConfigEditorGroup, GlobalConfigEditorOption, GlobalConfigEditorState, OpenGlobalConfigOptions, SettingsPanelAction, SettingsPanelCloseReason, SettingsPanelConfig, SettingsPanelDiagnosticsConfig, SettingsValueProvider, SidePanelCssVarName, SidePanelMotionContract, SidePanelThemeContract, SidePanelWidthPreset, ValueKind };
|
|
998
|
+
export type { BaseSidePanelCloseReason, BaseSidePanelContent, BaseSidePanelOpenOptions, BaseSidePanelRef, BaseSidePanelResizeAxis, BaseSidePanelResult, Capability, CapabilityCatalog, CapabilityCategory, GlobalConfigEditorFieldSpec, GlobalConfigEditorGroup, GlobalConfigEditorOption, GlobalConfigEditorState, OpenGlobalConfigOptions, SettingsPanelAction, SettingsPanelCloseReason, SettingsPanelConfig, SettingsPanelContextMode, SettingsPanelContextNavigation, SettingsPanelContextTarget, SettingsPanelDiagnosticsConfig, SettingsValueProvider, SidePanelCssVarName, SidePanelMotionContract, SidePanelThemeContract, SidePanelWidthPreset, ValueKind };
|