@praxisui/settings-panel 9.0.5-rc.37 → 9.0.5-rc.38
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
CHANGED
|
@@ -49,6 +49,9 @@ export class SettingsContentComponent implements SettingsValueProvider {
|
|
|
49
49
|
|
|
50
50
|
Open this standalone content with `SettingsPanelService.open(...)`; the host
|
|
51
51
|
observes `SettingsPanelRef.applied$` and `saved$` to apply or persist changes.
|
|
52
|
+
When that content needs to open a subordinate authoring editor, use
|
|
53
|
+
`SettingsPanelService.openChild(...)`. The child receives its own lifecycle
|
|
54
|
+
while the parent panel and its unsaved draft remain mounted.
|
|
52
55
|
|
|
53
56
|
Peer dependencies (Angular v21):
|
|
54
57
|
|
|
@@ -80,6 +83,7 @@ Peer dependencies (Angular v21):
|
|
|
80
83
|
- `expanded: true` abre o painel ja expandido de forma efetiva, respeitando `maxWidth`.
|
|
81
84
|
- Expandir temporariamente o painel nao substitui a preferencia persistida do usuario; apenas o resize manual continua sendo persistido.
|
|
82
85
|
- Quando um editor autoral tentar abrir outro painel sobre o atual, o shell passa pela mesma mediacao de fechamento do proprio painel. Se `onBeforeClose` vetar o fechamento, a substituicao nao acontece.
|
|
86
|
+
- Para composicao intencional de editores, use `openChild(...)`: o painel filho fica acima do pai e, ao fechar, devolve o controle ao draft pai sem emitir fechamento ou descarte nele.
|
|
83
87
|
|
|
84
88
|
### 2. Drawer runtime
|
|
85
89
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-08-
|
|
3
|
+
"generatedAt": "2026-08-19T02:54:26.311Z",
|
|
4
4
|
"packageName": "@praxisui/settings-panel",
|
|
5
|
-
"packageVersion": "9.0.5-rc.
|
|
5
|
+
"packageVersion": "9.0.5-rc.38",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 1,
|
|
@@ -1696,6 +1696,8 @@ class SettingsPanelService {
|
|
|
1696
1696
|
injector;
|
|
1697
1697
|
currentRef;
|
|
1698
1698
|
currentPanelInstance;
|
|
1699
|
+
currentScope;
|
|
1700
|
+
childSequence = 0;
|
|
1699
1701
|
i18n = inject(PraxisI18nService);
|
|
1700
1702
|
layerScale = inject(PraxisLayerScaleStyleService);
|
|
1701
1703
|
constructor(baseSidePanelService, injector) {
|
|
@@ -1727,13 +1729,29 @@ class SettingsPanelService {
|
|
|
1727
1729
|
}
|
|
1728
1730
|
return this.openFresh(config);
|
|
1729
1731
|
}
|
|
1730
|
-
|
|
1732
|
+
/**
|
|
1733
|
+
* Opens an authoring editor above the current settings panel without
|
|
1734
|
+
* destroying the parent editor and its draft state.
|
|
1735
|
+
*/
|
|
1736
|
+
openChild(config) {
|
|
1737
|
+
if (!this.currentRef || !this.currentPanelInstance) {
|
|
1738
|
+
return this.openFresh(config);
|
|
1739
|
+
}
|
|
1740
|
+
const parent = {
|
|
1741
|
+
ref: this.currentRef,
|
|
1742
|
+
panel: this.currentPanelInstance,
|
|
1743
|
+
scope: this.currentScope ?? 'settings-panel',
|
|
1744
|
+
};
|
|
1745
|
+
const scope = `settings-panel-child-${++this.childSequence}`;
|
|
1746
|
+
return this.openFresh(config, scope, parent);
|
|
1747
|
+
}
|
|
1748
|
+
openFresh(config, scope = 'settings-panel', parent) {
|
|
1731
1749
|
this.layerScale.ensureInstalled();
|
|
1732
1750
|
const ref = this.baseSidePanelService.openHost({
|
|
1733
1751
|
component: SettingsPanelComponent,
|
|
1734
1752
|
config: {
|
|
1735
1753
|
id: config.id,
|
|
1736
|
-
scope
|
|
1754
|
+
scope,
|
|
1737
1755
|
title: config.title,
|
|
1738
1756
|
titleIcon: config.titleIcon,
|
|
1739
1757
|
width: '720px',
|
|
@@ -1774,6 +1792,7 @@ class SettingsPanelService {
|
|
|
1774
1792
|
});
|
|
1775
1793
|
panelRef.instance.configureDiagnostics(config.diagnostics);
|
|
1776
1794
|
this.currentPanelInstance = panelRef.instance;
|
|
1795
|
+
this.currentScope = scope;
|
|
1777
1796
|
const inputs = config.content.inputs;
|
|
1778
1797
|
const injector = Injector.create({
|
|
1779
1798
|
providers: [
|
|
@@ -1791,17 +1810,16 @@ class SettingsPanelService {
|
|
|
1791
1810
|
});
|
|
1792
1811
|
ref.closed$.subscribe(() => {
|
|
1793
1812
|
if (this.currentRef === ref) {
|
|
1794
|
-
this.currentRef =
|
|
1795
|
-
this.currentPanelInstance =
|
|
1813
|
+
this.currentRef = parent?.ref;
|
|
1814
|
+
this.currentPanelInstance = parent?.panel;
|
|
1815
|
+
this.currentScope = parent?.scope;
|
|
1796
1816
|
}
|
|
1797
1817
|
});
|
|
1798
1818
|
this.currentRef = ref;
|
|
1799
1819
|
return ref;
|
|
1800
1820
|
}
|
|
1801
1821
|
close(reason = 'cancel') {
|
|
1802
|
-
this.
|
|
1803
|
-
this.currentRef = undefined;
|
|
1804
|
-
this.currentPanelInstance = undefined;
|
|
1822
|
+
this.currentRef?.close(reason);
|
|
1805
1823
|
}
|
|
1806
1824
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SettingsPanelService, deps: [{ token: BaseSidePanelService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1807
1825
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SettingsPanelService, providedIn: 'root' });
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/settings-panel",
|
|
3
|
-
"version": "9.0.5-rc.
|
|
3
|
+
"version": "9.0.5-rc.38",
|
|
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.5-rc.
|
|
11
|
-
"@praxisui/core": "^9.0.5-rc.
|
|
12
|
-
"@praxisui/dynamic-fields": "^9.0.5-rc.
|
|
10
|
+
"@praxisui/ai": "^9.0.5-rc.38",
|
|
11
|
+
"@praxisui/core": "^9.0.5-rc.38",
|
|
12
|
+
"@praxisui/dynamic-fields": "^9.0.5-rc.38",
|
|
13
13
|
"rxjs": "~7.8.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
@@ -334,6 +334,8 @@ declare class SettingsPanelService {
|
|
|
334
334
|
private injector;
|
|
335
335
|
private currentRef?;
|
|
336
336
|
private currentPanelInstance?;
|
|
337
|
+
private currentScope?;
|
|
338
|
+
private childSequence;
|
|
337
339
|
private readonly i18n;
|
|
338
340
|
private readonly layerScale;
|
|
339
341
|
constructor(baseSidePanelService: BaseSidePanelService, injector: Injector);
|
|
@@ -343,6 +345,11 @@ declare class SettingsPanelService {
|
|
|
343
345
|
* same overlay when the provided id matches.
|
|
344
346
|
*/
|
|
345
347
|
open(config: SettingsPanelConfig): SettingsPanelRef;
|
|
348
|
+
/**
|
|
349
|
+
* Opens an authoring editor above the current settings panel without
|
|
350
|
+
* destroying the parent editor and its draft state.
|
|
351
|
+
*/
|
|
352
|
+
openChild(config: SettingsPanelConfig): SettingsPanelRef;
|
|
346
353
|
private openFresh;
|
|
347
354
|
close(reason?: SettingsPanelCloseReason): void;
|
|
348
355
|
static ɵfac: i0.ɵɵFactoryDeclaration<SettingsPanelService, never>;
|