@praxisui/expansion 8.0.0-beta.11 → 8.0.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/fesm2022/praxisui-expansion.mjs +58 -14
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -254,6 +254,12 @@ com `content`, `widgets` ou `actionButtons` exige confirmacao explicita. Quando
|
|
|
254
254
|
`accordion.multi` estiver desabilitado, somente um painel pode ficar expandido por
|
|
255
255
|
padrao; o authoring deve colapsar os demais ou falhar validacao.
|
|
256
256
|
|
|
257
|
+
Cada operacao declara `target.resolver`, `preconditions`, `validators`,
|
|
258
|
+
`affectedPaths`, `effects` e `submissionImpact` tipado. Edicoes de conteudo de
|
|
259
|
+
painel podem afetar dados schema-backed porque `panels[].content` hospeda
|
|
260
|
+
`FieldMetadata[]`; widgets filhos continuam governados pelos contratos dos
|
|
261
|
+
respectivos componentes.
|
|
262
|
+
|
|
257
263
|
## Tokens de Estilo por instância
|
|
258
264
|
|
|
259
265
|
Os tokens opcionais em `appearance.tokens` permitem customizações rápidas por instância; por exemplo:
|
|
@@ -1801,9 +1801,11 @@ const PRAXIS_EXPANSION_AUTHORING_MANIFEST = {
|
|
|
1801
1801
|
target: { kind: 'panel', resolver: 'panels-array', ambiguityPolicy: 'fail', required: false },
|
|
1802
1802
|
inputSchema: panelItemSchema,
|
|
1803
1803
|
effects: [{ kind: 'append-unique', path: 'panels[]', key: 'id' }],
|
|
1804
|
+
destructive: false,
|
|
1805
|
+
requiresConfirmation: false,
|
|
1804
1806
|
validators: ['panel-id-unique', 'panel-order-deterministic', 'panel-content-valid'],
|
|
1805
1807
|
affectedPaths: ['panels[]'],
|
|
1806
|
-
submissionImpact:
|
|
1808
|
+
submissionImpact: 'config-only',
|
|
1807
1809
|
preconditions: ['config-initialized'],
|
|
1808
1810
|
},
|
|
1809
1811
|
{
|
|
@@ -1818,12 +1820,28 @@ const PRAXIS_EXPANSION_AUTHORING_MANIFEST = {
|
|
|
1818
1820
|
replacementExpandedPanelId: { type: 'string' },
|
|
1819
1821
|
},
|
|
1820
1822
|
},
|
|
1821
|
-
effects: [{
|
|
1823
|
+
effects: [{
|
|
1824
|
+
kind: 'compile-domain-patch',
|
|
1825
|
+
handler: 'expansion-panel-remove',
|
|
1826
|
+
handlerContract: {
|
|
1827
|
+
reads: ['accordion.multi', 'panels[]', 'panels[].id', 'panels[].expanded'],
|
|
1828
|
+
writes: ['panels[]', 'panels[].expanded'],
|
|
1829
|
+
identityKeys: ['panels[].id'],
|
|
1830
|
+
inputSchema: {
|
|
1831
|
+
type: 'object',
|
|
1832
|
+
properties: {
|
|
1833
|
+
replacementExpandedPanelId: { type: 'string' },
|
|
1834
|
+
},
|
|
1835
|
+
},
|
|
1836
|
+
failureModes: ['panel-not-found', 'replacement-panel-not-found', 'content-removal-not-confirmed', 'single-expand-conflict'],
|
|
1837
|
+
description: 'Removes the target panel by stable id and applies replacement expanded state when the removed panel was expanded.',
|
|
1838
|
+
},
|
|
1839
|
+
}],
|
|
1822
1840
|
destructive: true,
|
|
1823
1841
|
requiresConfirmation: true,
|
|
1824
1842
|
validators: ['panel-exists', 'default-expanded-removal-safe', 'panel-content-removal-confirmed'],
|
|
1825
|
-
affectedPaths: ['panels[]'],
|
|
1826
|
-
submissionImpact:
|
|
1843
|
+
affectedPaths: ['panels[]', 'panels[].expanded'],
|
|
1844
|
+
submissionImpact: 'config-only',
|
|
1827
1845
|
preconditions: ['config-initialized', 'target-panel-exists', 'confirmation-collected'],
|
|
1828
1846
|
},
|
|
1829
1847
|
{
|
|
@@ -1834,9 +1852,11 @@ const PRAXIS_EXPANSION_AUTHORING_MANIFEST = {
|
|
|
1834
1852
|
target: { kind: 'panelHeader', resolver: 'panel-by-id-or-title', ambiguityPolicy: 'fail', required: true },
|
|
1835
1853
|
inputSchema: { type: 'object', required: ['title'], properties: { title: { type: 'string' } } },
|
|
1836
1854
|
effects: [{ kind: 'merge-by-key', path: 'panels[]', key: 'id' }],
|
|
1855
|
+
destructive: false,
|
|
1856
|
+
requiresConfirmation: false,
|
|
1837
1857
|
validators: ['panel-exists', 'panel-title-valid'],
|
|
1838
1858
|
affectedPaths: ['panels[].title'],
|
|
1839
|
-
submissionImpact:
|
|
1859
|
+
submissionImpact: 'config-only',
|
|
1840
1860
|
preconditions: ['config-initialized', 'target-panel-exists'],
|
|
1841
1861
|
},
|
|
1842
1862
|
{
|
|
@@ -1847,9 +1867,11 @@ const PRAXIS_EXPANSION_AUTHORING_MANIFEST = {
|
|
|
1847
1867
|
target: { kind: 'panelHeader', resolver: 'panel-by-id-or-title', ambiguityPolicy: 'fail', required: true },
|
|
1848
1868
|
inputSchema: { type: 'object', required: ['description'], properties: { description: { type: 'string' } } },
|
|
1849
1869
|
effects: [{ kind: 'merge-by-key', path: 'panels[]', key: 'id' }],
|
|
1870
|
+
destructive: false,
|
|
1871
|
+
requiresConfirmation: false,
|
|
1850
1872
|
validators: ['panel-exists', 'panel-description-valid'],
|
|
1851
1873
|
affectedPaths: ['panels[].description'],
|
|
1852
|
-
submissionImpact:
|
|
1874
|
+
submissionImpact: 'config-only',
|
|
1853
1875
|
preconditions: ['config-initialized', 'target-panel-exists'],
|
|
1854
1876
|
},
|
|
1855
1877
|
{
|
|
@@ -1860,9 +1882,11 @@ const PRAXIS_EXPANSION_AUTHORING_MANIFEST = {
|
|
|
1860
1882
|
target: { kind: 'panelHeader', resolver: 'panel-by-id-or-title', ambiguityPolicy: 'fail', required: true },
|
|
1861
1883
|
inputSchema: { type: 'object', required: ['icon'], properties: { icon: { type: 'string' } } },
|
|
1862
1884
|
effects: [{ kind: 'merge-by-key', path: 'panels[]', key: 'id' }],
|
|
1885
|
+
destructive: false,
|
|
1886
|
+
requiresConfirmation: false,
|
|
1863
1887
|
validators: ['panel-exists', 'panel-icon-valid', 'editor-runtime-round-trip'],
|
|
1864
1888
|
affectedPaths: ['panels[].icon'],
|
|
1865
|
-
submissionImpact:
|
|
1889
|
+
submissionImpact: 'config-only',
|
|
1866
1890
|
preconditions: ['config-initialized', 'target-panel-exists'],
|
|
1867
1891
|
},
|
|
1868
1892
|
{
|
|
@@ -1873,9 +1897,11 @@ const PRAXIS_EXPANSION_AUTHORING_MANIFEST = {
|
|
|
1873
1897
|
target: { kind: 'panel', resolver: 'panel-by-id-or-title', ambiguityPolicy: 'fail', required: true },
|
|
1874
1898
|
inputSchema: { type: 'object', required: ['beforePanelId'], properties: { beforePanelId: { type: 'string' } } },
|
|
1875
1899
|
effects: [{ kind: 'reorder-by-key', path: 'panels[]', key: 'id' }],
|
|
1900
|
+
destructive: false,
|
|
1901
|
+
requiresConfirmation: false,
|
|
1876
1902
|
validators: ['panel-exists', 'panel-order-deterministic'],
|
|
1877
1903
|
affectedPaths: ['panels[]'],
|
|
1878
|
-
submissionImpact:
|
|
1904
|
+
submissionImpact: 'config-only',
|
|
1879
1905
|
preconditions: ['config-initialized', 'target-panel-exists'],
|
|
1880
1906
|
},
|
|
1881
1907
|
{
|
|
@@ -1886,9 +1912,11 @@ const PRAXIS_EXPANSION_AUTHORING_MANIFEST = {
|
|
|
1886
1912
|
target: { kind: 'disabledState', resolver: 'panel-by-id-or-title', ambiguityPolicy: 'fail', required: true },
|
|
1887
1913
|
inputSchema: { type: 'object', required: ['disabled'], properties: { disabled: { type: 'boolean' } } },
|
|
1888
1914
|
effects: [{ kind: 'merge-by-key', path: 'panels[]', key: 'id' }],
|
|
1915
|
+
destructive: false,
|
|
1916
|
+
requiresConfirmation: false,
|
|
1889
1917
|
validators: ['panel-exists', 'disabled-expanded-compatible'],
|
|
1890
1918
|
affectedPaths: ['panels[].disabled', 'panels[].expanded'],
|
|
1891
|
-
submissionImpact:
|
|
1919
|
+
submissionImpact: 'config-only',
|
|
1892
1920
|
preconditions: ['config-initialized', 'target-panel-exists'],
|
|
1893
1921
|
},
|
|
1894
1922
|
{
|
|
@@ -1898,10 +1926,23 @@ const PRAXIS_EXPANSION_AUTHORING_MANIFEST = {
|
|
|
1898
1926
|
targetKind: 'behavior',
|
|
1899
1927
|
target: { kind: 'behavior', resolver: 'expansion-behavior-config', ambiguityPolicy: 'fail', required: true },
|
|
1900
1928
|
inputSchema: { type: 'object', required: ['multi'], properties: { multi: { type: 'boolean' } } },
|
|
1901
|
-
effects: [{
|
|
1929
|
+
effects: [{
|
|
1930
|
+
kind: 'compile-domain-patch',
|
|
1931
|
+
handler: 'expansion-multi-expand-set',
|
|
1932
|
+
handlerContract: {
|
|
1933
|
+
reads: ['accordion.multi', 'panels[]', 'panels[].id', 'panels[].expanded'],
|
|
1934
|
+
writes: ['accordion.multi', 'panels[].expanded'],
|
|
1935
|
+
identityKeys: ['panels[].id'],
|
|
1936
|
+
inputSchema: { type: 'object', required: ['multi'], properties: { multi: { type: 'boolean' } } },
|
|
1937
|
+
failureModes: ['multiple-expanded-panels-conflict', 'panel-id-missing'],
|
|
1938
|
+
description: 'Sets accordion.multi and collapses competing expanded panels when switching to single-expand behavior.',
|
|
1939
|
+
},
|
|
1940
|
+
}],
|
|
1941
|
+
destructive: false,
|
|
1942
|
+
requiresConfirmation: false,
|
|
1902
1943
|
validators: ['multi-expand-default-compatible', 'accordion-values-valid', 'editor-runtime-round-trip'],
|
|
1903
1944
|
affectedPaths: ['accordion.multi', 'panels[].expanded'],
|
|
1904
|
-
submissionImpact:
|
|
1945
|
+
submissionImpact: 'config-only',
|
|
1905
1946
|
preconditions: ['config-initialized'],
|
|
1906
1947
|
},
|
|
1907
1948
|
{
|
|
@@ -1939,8 +1980,10 @@ const PRAXIS_EXPANSION_AUTHORING_MANIFEST = {
|
|
|
1939
1980
|
},
|
|
1940
1981
|
}],
|
|
1941
1982
|
validators: ['panel-exists', 'default-expanded-panel-exists', 'multi-expand-default-compatible', 'disabled-expanded-compatible'],
|
|
1983
|
+
destructive: false,
|
|
1984
|
+
requiresConfirmation: false,
|
|
1942
1985
|
affectedPaths: ['panels[].expanded', 'accordion.multi'],
|
|
1943
|
-
submissionImpact:
|
|
1986
|
+
submissionImpact: 'config-only',
|
|
1944
1987
|
preconditions: ['config-initialized', 'target-panel-exists'],
|
|
1945
1988
|
},
|
|
1946
1989
|
{
|
|
@@ -1951,9 +1994,11 @@ const PRAXIS_EXPANSION_AUTHORING_MANIFEST = {
|
|
|
1951
1994
|
target: { kind: 'panelContent', resolver: 'panel-content-by-id', ambiguityPolicy: 'fail', required: true },
|
|
1952
1995
|
inputSchema: panelPatchSchema,
|
|
1953
1996
|
effects: [{ kind: 'merge-by-key', path: 'panels[]', key: 'id' }],
|
|
1997
|
+
destructive: false,
|
|
1998
|
+
requiresConfirmation: false,
|
|
1954
1999
|
validators: ['panel-exists', 'panel-content-valid', 'lazy-content-compatible', 'nested-widget-contract-delegated'],
|
|
1955
2000
|
affectedPaths: ['panels[].content', 'panels[].widgets', 'panels[].actionButtons'],
|
|
1956
|
-
submissionImpact:
|
|
2001
|
+
submissionImpact: 'affects-schema-backed-data',
|
|
1957
2002
|
preconditions: ['config-initialized', 'target-panel-exists'],
|
|
1958
2003
|
},
|
|
1959
2004
|
],
|
|
@@ -1971,7 +2016,6 @@ const PRAXIS_EXPANSION_AUTHORING_MANIFEST = {
|
|
|
1971
2016
|
{ validatorId: 'multi-expand-default-compatible', level: 'error', code: 'PEXP011', description: 'When accordion.multi is false, at most one panel may be marked expanded by default.' },
|
|
1972
2017
|
{ validatorId: 'disabled-expanded-compatible', level: 'warning', code: 'PEXP012', description: 'A disabled panel should not be the only expanded/default focus target without explicit intent.' },
|
|
1973
2018
|
{ validatorId: 'accordion-values-valid', level: 'error', code: 'PEXP013', description: 'Accordion behavior values must match ExpansionMetadata and Angular Material expansion bindings.' },
|
|
1974
|
-
{ validatorId: 'layout-values-valid', level: 'error', code: 'PEXP014', description: 'Layout values must match ExpansionMetadata appearance, displayMode and togglePosition enums.' },
|
|
1975
2019
|
{ validatorId: 'lazy-content-compatible', level: 'info', code: 'PEXP015', description: 'Panel content remains lazy through matExpansionPanelContent and should not require eager child runtime state.' },
|
|
1976
2020
|
{ validatorId: 'nested-widget-contract-delegated', level: 'info', code: 'PEXP016', description: 'Nested widget content remains governed by child component contracts and component-port nestedPath semantics.' },
|
|
1977
2021
|
{ validatorId: 'editor-runtime-round-trip', level: 'error', code: 'PEXP017', description: 'Settings Panel editor, runtime persistence and registry projection must preserve panel ids, order, icons and expanded state.' },
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/expansion",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.12",
|
|
4
4
|
"description": "Expansion panel (accordion) components for Praxis UI with metadata configuration and editor integration.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.0.0",
|
|
7
7
|
"@angular/core": "^20.0.0",
|
|
8
8
|
"@angular/material": "^20.0.0",
|
|
9
9
|
"@angular/cdk": "^20.0.0",
|
|
10
|
-
"@praxisui/core": "^8.0.0-beta.
|
|
11
|
-
"@praxisui/dynamic-fields": "^8.0.0-beta.
|
|
12
|
-
"@praxisui/settings-panel": "^8.0.0-beta.
|
|
10
|
+
"@praxisui/core": "^8.0.0-beta.12",
|
|
11
|
+
"@praxisui/dynamic-fields": "^8.0.0-beta.12",
|
|
12
|
+
"@praxisui/settings-panel": "^8.0.0-beta.12"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"tslib": "^2.3.0"
|