@praxisui/core 10.0.0-rc.59 → 10.0.0-rc.60
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
|
@@ -623,7 +623,7 @@ requires an explicitly tenant-scoped provider.
|
|
|
623
623
|
|
|
624
624
|
`ApiConfigStorageOptions.canRead?: () => boolean` gates read requests (`loadConfig` and `loadConfigDocument`) when configured. Returning `false` skips remote GET dispatches and emits `null`, allowing hosts with deferred or session-gated authentication to avoid premature pre-session reads without replacing backend authorization.
|
|
625
625
|
|
|
626
|
-
`ApiConfigStorageOptions.canWrite?: () => boolean` and `ApiConfigStorageOptions.canWriteScope?: (scope: ConfigStorageScope) => boolean` gate remote config writes/clears (`saveConfig`, `clearConfig`, `deletePersonalOverrideAndReloadTenantBaseline`) and runtime scope switches (`setWriteScope`, `toggleWriteScope`). Both predicates are evaluated lazily inside `defer()`,
|
|
626
|
+
`ApiConfigStorageOptions.canWrite?: () => boolean` and `ApiConfigStorageOptions.canWriteScope?: (scope: ConfigStorageScope) => boolean` gate remote config writes/clears (`saveConfig`, `clearConfig`, `deletePersonalOverrideAndReloadTenantBaseline`) and runtime scope switches (`setWriteScope`, `toggleWriteScope`). Both predicates are evaluated lazily inside `defer()`, complete without emitting (`EMPTY`, "not acknowledged" per `AsyncConfigStorage` semantics) without dispatching HTTP PUT/DELETE when denied, and expose `storage.canWriteConfig(key, options)` so runtimes like `DynamicWidgetPageComponent` avoid false `'saved'` states when writes are disabled. `providePraxisGlobalConfigBootstrap` also forwards `canRead`, `canWrite`, `canWriteScope`, `writeScope`, and `resolveWriteScope` into `ApiConfigStorageOptions`.
|
|
627
627
|
|
|
628
628
|
### Workspace Customization Governance (`PraxisCustomizationModeService`)
|
|
629
629
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-23T14:32:32.238Z",
|
|
4
4
|
"packageName": "@praxisui/core",
|
|
5
|
-
"packageVersion": "10.0.0-rc.
|
|
5
|
+
"packageVersion": "10.0.0-rc.60",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 4,
|
|
@@ -510,6 +510,12 @@
|
|
|
510
510
|
"required": false,
|
|
511
511
|
"description": "Ativa persistência automática (load/save) da página."
|
|
512
512
|
},
|
|
513
|
+
{
|
|
514
|
+
"name": "pauseAutoPersist",
|
|
515
|
+
"type": "boolean",
|
|
516
|
+
"required": false,
|
|
517
|
+
"description": "Pausa despachos automáticos de gravação sem desmontar o estado de persistência ou recarregar o storage ao retomar."
|
|
518
|
+
},
|
|
513
519
|
{
|
|
514
520
|
"name": "pageIdentity",
|
|
515
521
|
"type": "PageIdentity",
|
|
@@ -3094,9 +3100,9 @@
|
|
|
3094
3100
|
{
|
|
3095
3101
|
"chunkIndex": 0,
|
|
3096
3102
|
"chunkKind": "summary",
|
|
3097
|
-
"content": "Component ID: praxis-dynamic-page\nSelector: praxis-dynamic-page\nFriendly Name: Dynamic Page\nDescription: Página dinâmica com widgets e composition.links em layout responsivo, incluindo mediação runtime para rich-content hospedado.\nCategory: page\nLib/Package: @praxisui/core\nTags: widget, page, dynamic, layout\nInputs:\n - page (WidgetPageDefinition)\n - context (Record<string, any>)\n - strictValidation (boolean)\n - enableCustomization (boolean)\n - authoringCapabilities (WidgetPageAuthoringCapabilities)\n - showPageSettingsButton (boolean)\n - shellEditorComponent (Type<any>)\n - pageEditorComponent (Type<any>)\n - autoPersist (boolean)\n - pageIdentity (PageIdentity)\n - componentInstanceId (string)\nOutputs:\n - pageChange (WidgetPageDefinition)\n - persistenceChange (WidgetPagePersistenceState)\n - pageAuthoringChange (WidgetPageDefinition)\n - widgetEvent (WidgetEventEnvelope)\n - widgetDiagnosticsChange (Record<string, WidgetResolutionDiagnostic>)\n",
|
|
3103
|
+
"content": "Component ID: praxis-dynamic-page\nSelector: praxis-dynamic-page\nFriendly Name: Dynamic Page\nDescription: Página dinâmica com widgets e composition.links em layout responsivo, incluindo mediação runtime para rich-content hospedado.\nCategory: page\nLib/Package: @praxisui/core\nTags: widget, page, dynamic, layout\nInputs:\n - page (WidgetPageDefinition)\n - context (Record<string, any>)\n - strictValidation (boolean)\n - enableCustomization (boolean)\n - authoringCapabilities (WidgetPageAuthoringCapabilities)\n - showPageSettingsButton (boolean)\n - shellEditorComponent (Type<any>)\n - pageEditorComponent (Type<any>)\n - autoPersist (boolean)\n - pauseAutoPersist (boolean)\n - pageIdentity (PageIdentity)\n - componentInstanceId (string)\nOutputs:\n - pageChange (WidgetPageDefinition)\n - persistenceChange (WidgetPagePersistenceState)\n - pageAuthoringChange (WidgetPageDefinition)\n - widgetEvent (WidgetEventEnvelope)\n - widgetDiagnosticsChange (Record<string, WidgetResolutionDiagnostic>)\n",
|
|
3098
3104
|
"sourcePointer": "projects/praxis-core/src/lib/widgets/dynamic-widget-page.metadata.ts",
|
|
3099
|
-
"contentHash": "
|
|
3105
|
+
"contentHash": "80ff6304605771f24533cb9c00ecb3a7e13668c7dc195e7a32d62e0568becaa8",
|
|
3100
3106
|
"sourceKind": "component_definition",
|
|
3101
3107
|
"sourceId": "praxis-dynamic-page",
|
|
3102
3108
|
"corpusVersion": "1.0.0"
|
|
@@ -1543,7 +1543,9 @@ class ApiConfigStorage {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
setWriteScope(scope) {
|
|
1545
1545
|
if (scope && this.opts?.canWriteScope && !this.opts.canWriteScope(scope)) {
|
|
1546
|
-
this.
|
|
1546
|
+
if (scope !== 'user' && this.opts.canWriteScope('user')) {
|
|
1547
|
+
this._writeScopeOverride.set('user');
|
|
1548
|
+
}
|
|
1547
1549
|
return;
|
|
1548
1550
|
}
|
|
1549
1551
|
this._writeScopeOverride.set(scope);
|
|
@@ -1788,7 +1790,7 @@ class ApiConfigStorage {
|
|
|
1788
1790
|
saveConfig(key, config, options) {
|
|
1789
1791
|
return defer(() => {
|
|
1790
1792
|
if (this.opts?.canWrite && !this.opts.canWrite()) {
|
|
1791
|
-
return
|
|
1793
|
+
return EMPTY;
|
|
1792
1794
|
}
|
|
1793
1795
|
const { type, id } = this.resolveKey(key);
|
|
1794
1796
|
const url = `${this.baseUrl}`;
|
|
@@ -1796,7 +1798,7 @@ class ApiConfigStorage {
|
|
|
1796
1798
|
const baseHeaders = this.buildHeaders();
|
|
1797
1799
|
const requestScope = explicitScope ?? this.resolveRequestScope(baseHeaders);
|
|
1798
1800
|
if (this.opts?.canWriteScope && !this.opts.canWriteScope(requestScope)) {
|
|
1799
|
-
return
|
|
1801
|
+
return EMPTY;
|
|
1800
1802
|
}
|
|
1801
1803
|
const params = this.buildParams(type, id, explicitScope);
|
|
1802
1804
|
const scopedCached = this.getCachedEntry(key, requestScope, baseHeaders);
|
|
@@ -1878,7 +1880,7 @@ class ApiConfigStorage {
|
|
|
1878
1880
|
clearConfig(key, options) {
|
|
1879
1881
|
return defer(() => {
|
|
1880
1882
|
if (this.opts?.canWrite && !this.opts.canWrite()) {
|
|
1881
|
-
return
|
|
1883
|
+
return EMPTY;
|
|
1882
1884
|
}
|
|
1883
1885
|
const { type, id } = this.resolveKey(key);
|
|
1884
1886
|
const url = `${this.baseUrl}`;
|
|
@@ -1886,7 +1888,7 @@ class ApiConfigStorage {
|
|
|
1886
1888
|
const baseHeaders = this.buildHeaders();
|
|
1887
1889
|
const requestScope = explicitScope ?? this.resolveRequestScope(baseHeaders);
|
|
1888
1890
|
if (this.opts?.canWriteScope && !this.opts.canWriteScope(requestScope)) {
|
|
1889
|
-
return
|
|
1891
|
+
return EMPTY;
|
|
1890
1892
|
}
|
|
1891
1893
|
const params = this.buildParams(type, id, explicitScope);
|
|
1892
1894
|
const scopedCached = this.getCachedEntry(key, requestScope, baseHeaders);
|
|
@@ -1927,7 +1929,7 @@ class ApiConfigStorage {
|
|
|
1927
1929
|
deletePersonalOverrideAndReloadTenantBaseline(key) {
|
|
1928
1930
|
return defer(() => {
|
|
1929
1931
|
if (!this.canWriteConfig(key, { scope: 'user' })) {
|
|
1930
|
-
return
|
|
1932
|
+
return EMPTY;
|
|
1931
1933
|
}
|
|
1932
1934
|
const { type, id } = this.resolveKey(key);
|
|
1933
1935
|
const url = `${this.baseUrl}`;
|
|
@@ -64953,6 +64955,7 @@ class DynamicWidgetPageComponent {
|
|
|
64953
64955
|
persistenceGeneration = 0;
|
|
64954
64956
|
persistenceRevision = 0;
|
|
64955
64957
|
persistenceBlocked = false;
|
|
64958
|
+
persistenceBlockedByWriteGate = false;
|
|
64956
64959
|
persistenceLoad;
|
|
64957
64960
|
persistenceMutation;
|
|
64958
64961
|
persistenceMutations = [];
|
|
@@ -65329,7 +65332,7 @@ class DynamicWidgetPageComponent {
|
|
|
65329
65332
|
this.failPersistence('save', this.persistenceErrorKind(error));
|
|
65330
65333
|
}
|
|
65331
65334
|
}
|
|
65332
|
-
|
|
65335
|
+
if (this.autoPersist &&
|
|
65333
65336
|
!this.pauseAutoPersist &&
|
|
65334
65337
|
changes['pauseAutoPersist'] &&
|
|
65335
65338
|
this.pendingPausedSavePage) {
|
|
@@ -72497,15 +72500,29 @@ class DynamicWidgetPageComponent {
|
|
|
72497
72500
|
seen.delete(objRef);
|
|
72498
72501
|
}
|
|
72499
72502
|
}
|
|
72503
|
+
/** Discards any buffered paused save (e.g. when a transient preview is cancelled or applied server-side). */
|
|
72504
|
+
discardPausedPersistence() {
|
|
72505
|
+
this.pendingPausedSavePage = undefined;
|
|
72506
|
+
}
|
|
72500
72507
|
/** Retries an explicit save after a recoverable failure. Conflicts require reload. */
|
|
72501
72508
|
persistCurrentPage(page) {
|
|
72502
72509
|
if (!this.autoPersist || this.destroyed || this.isMutationBlocked())
|
|
72503
72510
|
return;
|
|
72511
|
+
const key = this.storageKey();
|
|
72512
|
+
if (this.persistenceBlocked &&
|
|
72513
|
+
this.persistenceBlockedByWriteGate &&
|
|
72514
|
+
key &&
|
|
72515
|
+
typeof this.storage.canWriteConfig === 'function' &&
|
|
72516
|
+
this.storage.canWriteConfig(key)) {
|
|
72517
|
+
this.persistenceBlocked = false;
|
|
72518
|
+
this.persistenceBlockedByWriteGate = false;
|
|
72519
|
+
}
|
|
72504
72520
|
const state = this.persistenceState();
|
|
72505
72521
|
if (this.persistenceBlocked) {
|
|
72506
72522
|
if (state.operation !== 'save' || state.errorKind === 'conflict')
|
|
72507
72523
|
return;
|
|
72508
72524
|
this.persistenceBlocked = false;
|
|
72525
|
+
this.persistenceBlockedByWriteGate = false;
|
|
72509
72526
|
}
|
|
72510
72527
|
const current = page ?? this.authoredPageDefinition ?? this.parsePage(this.page);
|
|
72511
72528
|
if (current) {
|
|
@@ -72517,9 +72534,17 @@ class DynamicWidgetPageComponent {
|
|
|
72517
72534
|
}
|
|
72518
72535
|
/** Clears the active identity's persisted page and applies the factory page after acknowledgement. */
|
|
72519
72536
|
resetPersistedPage(defaultPage) {
|
|
72537
|
+
const key = this.storageKey();
|
|
72538
|
+
if (this.persistenceBlocked &&
|
|
72539
|
+
this.persistenceBlockedByWriteGate &&
|
|
72540
|
+
key &&
|
|
72541
|
+
typeof this.storage.canWriteConfig === 'function' &&
|
|
72542
|
+
this.storage.canWriteConfig(key)) {
|
|
72543
|
+
this.persistenceBlocked = false;
|
|
72544
|
+
this.persistenceBlockedByWriteGate = false;
|
|
72545
|
+
}
|
|
72520
72546
|
if (!this.autoPersist || this.destroyed || this.persistenceBlocked || this.isMutationBlocked())
|
|
72521
72547
|
return;
|
|
72522
|
-
const key = this.storageKey();
|
|
72523
72548
|
if (!key)
|
|
72524
72549
|
return;
|
|
72525
72550
|
this.persistenceRevision++;
|
|
@@ -72540,6 +72565,15 @@ class DynamicWidgetPageComponent {
|
|
|
72540
72565
|
this.loadPersistedPage(defaultPage);
|
|
72541
72566
|
}
|
|
72542
72567
|
savePage(page) {
|
|
72568
|
+
const key = this.storageKey();
|
|
72569
|
+
if (this.persistenceBlocked &&
|
|
72570
|
+
this.persistenceBlockedByWriteGate &&
|
|
72571
|
+
key &&
|
|
72572
|
+
typeof this.storage.canWriteConfig === 'function' &&
|
|
72573
|
+
this.storage.canWriteConfig(key)) {
|
|
72574
|
+
this.persistenceBlocked = false;
|
|
72575
|
+
this.persistenceBlockedByWriteGate = false;
|
|
72576
|
+
}
|
|
72543
72577
|
if (this.destroyed || this.persistenceBlocked || this.isMutationBlocked())
|
|
72544
72578
|
return;
|
|
72545
72579
|
if (this.pauseAutoPersist) {
|
|
@@ -72547,7 +72581,6 @@ class DynamicWidgetPageComponent {
|
|
|
72547
72581
|
return;
|
|
72548
72582
|
}
|
|
72549
72583
|
this.pendingPausedSavePage = undefined;
|
|
72550
|
-
const key = this.storageKey();
|
|
72551
72584
|
if (!key)
|
|
72552
72585
|
return;
|
|
72553
72586
|
this.persistenceRevision++;
|
|
@@ -72586,6 +72619,7 @@ class DynamicWidgetPageComponent {
|
|
|
72586
72619
|
this.pendingExplicitPageInputEcho = undefined;
|
|
72587
72620
|
this.persistenceRevision = 0;
|
|
72588
72621
|
this.persistenceBlocked = false;
|
|
72622
|
+
this.persistenceBlockedByWriteGate = false;
|
|
72589
72623
|
this.persistenceReady = false;
|
|
72590
72624
|
const key = this.storageKey();
|
|
72591
72625
|
if (!key) {
|
|
@@ -72689,6 +72723,7 @@ class DynamicWidgetPageComponent {
|
|
|
72689
72723
|
const operation = mutation.kind === 'save' ? 'save' : 'reset';
|
|
72690
72724
|
if (typeof this.storage.canWriteConfig === 'function' && !this.storage.canWriteConfig(key)) {
|
|
72691
72725
|
this.persistenceMutation = undefined;
|
|
72726
|
+
this.persistenceBlockedByWriteGate = true;
|
|
72692
72727
|
this.failPersistence(operation, 'unacknowledged');
|
|
72693
72728
|
return;
|
|
72694
72729
|
}
|
|
@@ -72761,6 +72796,9 @@ class DynamicWidgetPageComponent {
|
|
|
72761
72796
|
failPersistence(operation, errorKind) {
|
|
72762
72797
|
this.persistenceBlocked = true;
|
|
72763
72798
|
this.persistenceMutations = [];
|
|
72799
|
+
if (operation === 'save') {
|
|
72800
|
+
this.lastPersistenceRequestedPage = undefined;
|
|
72801
|
+
}
|
|
72764
72802
|
this.publishPersistenceState({
|
|
72765
72803
|
...this.persistenceState(), status: 'error', operation, errorKind,
|
|
72766
72804
|
});
|
|
@@ -73999,6 +74037,11 @@ const PRAXIS_DYNAMIC_PAGE_COMPONENT_METADATA = {
|
|
|
73999
74037
|
type: 'boolean',
|
|
74000
74038
|
description: 'Ativa persistência automática (load/save) da página.',
|
|
74001
74039
|
},
|
|
74040
|
+
{
|
|
74041
|
+
name: 'pauseAutoPersist',
|
|
74042
|
+
type: 'boolean',
|
|
74043
|
+
description: 'Pausa despachos automáticos de gravação sem desmontar o estado de persistência ou recarregar o storage ao retomar.',
|
|
74044
|
+
},
|
|
74002
74045
|
{
|
|
74003
74046
|
name: 'pageIdentity',
|
|
74004
74047
|
type: 'PageIdentity',
|
|
@@ -81635,6 +81678,10 @@ class ProfileCheck {
|
|
|
81635
81678
|
if (!isRecord$1(input))
|
|
81636
81679
|
this.fail(at);
|
|
81637
81680
|
break;
|
|
81681
|
+
case 'motion':
|
|
81682
|
+
if (input !== undefined && !isRecord$1(input))
|
|
81683
|
+
this.fail(at);
|
|
81684
|
+
break;
|
|
81638
81685
|
case 'analytics':
|
|
81639
81686
|
case 'chartDocumentOverrides':
|
|
81640
81687
|
case 'queryContext':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/core",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.60",
|
|
4
4
|
"description": "Core library for Praxis UI Workspace: types, tokens, services and utilities shared across @praxisui/* packages.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/cdk": "^21.0.0",
|
|
@@ -1752,6 +1752,8 @@ interface ConfigMetadata {
|
|
|
1752
1752
|
serverHash?: string;
|
|
1753
1753
|
/** Campo identificador preferido pelo usuário para o recurso (ex.: 'id', 'codigo') */
|
|
1754
1754
|
idField?: string;
|
|
1755
|
+
/** Caminho canônico do recurso associado à configuração persistida (ex.: 'workforce/employees') */
|
|
1756
|
+
resourcePath?: string;
|
|
1755
1757
|
/** Contexto de schema associado (útil para auditoria/telemetria) */
|
|
1756
1758
|
schemaContext?: {
|
|
1757
1759
|
path: string;
|
package/types/praxisui-core.d.ts
CHANGED
|
@@ -3638,6 +3638,8 @@ interface ConfigMetadata {
|
|
|
3638
3638
|
serverHash?: string;
|
|
3639
3639
|
/** Campo identificador preferido pelo usuário para o recurso (ex.: 'id', 'codigo') */
|
|
3640
3640
|
idField?: string;
|
|
3641
|
+
/** Caminho canônico do recurso associado à configuração persistida (ex.: 'workforce/employees') */
|
|
3642
|
+
resourcePath?: string;
|
|
3641
3643
|
/** Contexto de schema associado (útil para auditoria/telemetria) */
|
|
3642
3644
|
schemaContext?: {
|
|
3643
3645
|
path: string;
|
|
@@ -11115,7 +11117,7 @@ interface ApiConfigStorageOptions {
|
|
|
11115
11117
|
errorPolicy?: 'fail' | 'ignore';
|
|
11116
11118
|
/** Optional predicate to gate remote UI config reads (e.g. authenticated session readiness). When false, loadConfig and loadConfigDocument return of(null) without issuing HTTP GET or recording negativeCache misses. */
|
|
11117
11119
|
canRead?: () => boolean;
|
|
11118
|
-
/** Optional predicate to gate remote UI config writes/clears (e.g. session authoring capability). When false, saveConfig and clearConfig complete
|
|
11120
|
+
/** Optional predicate to gate remote UI config writes/clears (e.g. session authoring capability). When false, saveConfig and clearConfig complete without emitting (EMPTY, not acknowledged) without issuing HTTP PUT/DELETE and canWriteConfig returns false. */
|
|
11119
11121
|
canWrite?: () => boolean;
|
|
11120
11122
|
}
|
|
11121
11123
|
declare const API_CONFIG_STORAGE_OPTIONS: InjectionToken<ApiConfigStorageOptions>;
|
|
@@ -23028,6 +23030,7 @@ declare class DynamicWidgetPageComponent implements OnChanges, OnDestroy {
|
|
|
23028
23030
|
private persistenceGeneration;
|
|
23029
23031
|
private persistenceRevision;
|
|
23030
23032
|
private persistenceBlocked;
|
|
23033
|
+
private persistenceBlockedByWriteGate;
|
|
23031
23034
|
private persistenceLoad?;
|
|
23032
23035
|
private persistenceMutation?;
|
|
23033
23036
|
private persistenceMutations;
|
|
@@ -23574,6 +23577,8 @@ declare class DynamicWidgetPageComponent implements OnChanges, OnDestroy {
|
|
|
23574
23577
|
private sameJsonStructure;
|
|
23575
23578
|
private areValuesStructurallyEqual;
|
|
23576
23579
|
private stableJsonValue;
|
|
23580
|
+
/** Discards any buffered paused save (e.g. when a transient preview is cancelled or applied server-side). */
|
|
23581
|
+
discardPausedPersistence(): void;
|
|
23577
23582
|
/** Retries an explicit save after a recoverable failure. Conflicts require reload. */
|
|
23578
23583
|
persistCurrentPage(page?: WidgetPageDefinition): void;
|
|
23579
23584
|
/** Clears the active identity's persisted page and applies the factory page after acknowledgement. */
|