@praxisui/core 9.0.0-beta.38 → 9.0.0-beta.39
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-07-
|
|
3
|
+
"generatedAt": "2026-07-06T14:21:26.432Z",
|
|
4
4
|
"packageName": "@praxisui/core",
|
|
5
|
-
"packageVersion": "9.0.0-beta.
|
|
5
|
+
"packageVersion": "9.0.0-beta.39",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 4,
|
|
@@ -14092,6 +14092,9 @@ class SurfaceOpenMaterializerService {
|
|
|
14092
14092
|
if (widgetId !== 'praxis-table') {
|
|
14093
14093
|
return true;
|
|
14094
14094
|
}
|
|
14095
|
+
if (payload.context?.['relatedResource']) {
|
|
14096
|
+
return false;
|
|
14097
|
+
}
|
|
14095
14098
|
const inputs = widget.inputs || {};
|
|
14096
14099
|
return Boolean(inputs['resourcePath']
|
|
14097
14100
|
|| inputs['queryContext']
|
|
@@ -36769,10 +36772,12 @@ const RELATED_RESOURCE_OUTLET_I18N_CONFIG = {
|
|
|
36769
36772
|
|
|
36770
36773
|
class PraxisRelatedResourceOutletComponent {
|
|
36771
36774
|
resolver = inject(RelatedResourceSurfaceResolverService);
|
|
36775
|
+
materializer = inject(SurfaceOpenMaterializerService);
|
|
36772
36776
|
i18n = inject(PraxisI18nService);
|
|
36773
36777
|
injector = inject(Injector);
|
|
36774
36778
|
discoverySubscription;
|
|
36775
36779
|
discoveryRequestKey = '';
|
|
36780
|
+
materializationRequestKey = '';
|
|
36776
36781
|
surface = input(null, ...(ngDevMode ? [{ debugName: "surface" }] : /* istanbul ignore next */ []));
|
|
36777
36782
|
surfaceId = input(null, ...(ngDevMode ? [{ debugName: "surfaceId" }] : /* istanbul ignore next */ []));
|
|
36778
36783
|
surfaceCatalog = input(null, ...(ngDevMode ? [{ debugName: "surfaceCatalog" }] : /* istanbul ignore next */ []));
|
|
@@ -36801,6 +36806,7 @@ class PraxisRelatedResourceOutletComponent {
|
|
|
36801
36806
|
discoveredSurface = signal(null, ...(ngDevMode ? [{ debugName: "discoveredSurface" }] : /* istanbul ignore next */ []));
|
|
36802
36807
|
discoveryState = signal(null, ...(ngDevMode ? [{ debugName: "discoveryState" }] : /* istanbul ignore next */ []));
|
|
36803
36808
|
discoveryStateReason = signal(null, ...(ngDevMode ? [{ debugName: "discoveryStateReason" }] : /* istanbul ignore next */ []));
|
|
36809
|
+
materializedPayload = signal(null, ...(ngDevMode ? [{ debugName: "materializedPayload" }] : /* istanbul ignore next */ []));
|
|
36804
36810
|
resolution = computed(() => {
|
|
36805
36811
|
const state = this.state();
|
|
36806
36812
|
if (state && state !== 'ready') {
|
|
@@ -36823,8 +36829,25 @@ class PraxisRelatedResourceOutletComponent {
|
|
|
36823
36829
|
queryContext: this.queryContext(),
|
|
36824
36830
|
});
|
|
36825
36831
|
}, ...(ngDevMode ? [{ debugName: "resolution" }] : /* istanbul ignore next */ []));
|
|
36832
|
+
renderResolution = computed(() => {
|
|
36833
|
+
const resolution = this.resolution();
|
|
36834
|
+
const materializedPayload = this.materializedPayload();
|
|
36835
|
+
if (resolution.state !== 'ready') {
|
|
36836
|
+
return resolution;
|
|
36837
|
+
}
|
|
36838
|
+
if (!materializedPayload && this.mode() === 'inline' && resolution.payload?.widget) {
|
|
36839
|
+
return this.resolver.state('loading', 'related-resource-materializing');
|
|
36840
|
+
}
|
|
36841
|
+
if (!materializedPayload) {
|
|
36842
|
+
return resolution;
|
|
36843
|
+
}
|
|
36844
|
+
return {
|
|
36845
|
+
...resolution,
|
|
36846
|
+
payload: materializedPayload,
|
|
36847
|
+
};
|
|
36848
|
+
}, ...(ngDevMode ? [{ debugName: "renderResolution" }] : /* istanbul ignore next */ []));
|
|
36826
36849
|
isBusy = computed(() => {
|
|
36827
|
-
const state = this.
|
|
36850
|
+
const state = this.renderResolution().state;
|
|
36828
36851
|
return state === 'resolving' || state === 'loading';
|
|
36829
36852
|
}, ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
|
|
36830
36853
|
constructor() {
|
|
@@ -36887,6 +36910,31 @@ class PraxisRelatedResourceOutletComponent {
|
|
|
36887
36910
|
this.discoverySubscription = undefined;
|
|
36888
36911
|
});
|
|
36889
36912
|
});
|
|
36913
|
+
effect((onCleanup) => {
|
|
36914
|
+
const resolution = this.resolution();
|
|
36915
|
+
const payload = resolution.state === 'ready' ? resolution.payload : null;
|
|
36916
|
+
const requestKey = this.buildMaterializationRequestKey(resolution);
|
|
36917
|
+
this.materializationRequestKey = requestKey;
|
|
36918
|
+
this.materializedPayload.set(null);
|
|
36919
|
+
if (!payload) {
|
|
36920
|
+
return;
|
|
36921
|
+
}
|
|
36922
|
+
let cancelled = false;
|
|
36923
|
+
this.materializer.materialize(payload)
|
|
36924
|
+
.then((materialized) => {
|
|
36925
|
+
if (!cancelled && this.materializationRequestKey === requestKey) {
|
|
36926
|
+
this.materializedPayload.set(materialized);
|
|
36927
|
+
}
|
|
36928
|
+
})
|
|
36929
|
+
.catch(() => {
|
|
36930
|
+
if (!cancelled && this.materializationRequestKey === requestKey) {
|
|
36931
|
+
this.materializedPayload.set(payload);
|
|
36932
|
+
}
|
|
36933
|
+
});
|
|
36934
|
+
onCleanup(() => {
|
|
36935
|
+
cancelled = true;
|
|
36936
|
+
});
|
|
36937
|
+
});
|
|
36890
36938
|
}
|
|
36891
36939
|
openRelated() {
|
|
36892
36940
|
const payload = this.resolution().payload;
|
|
@@ -36904,7 +36952,7 @@ class PraxisRelatedResourceOutletComponent {
|
|
|
36904
36952
|
this.widgetEvent.emit(event);
|
|
36905
36953
|
}
|
|
36906
36954
|
stateIcon() {
|
|
36907
|
-
switch (this.
|
|
36955
|
+
switch (this.renderResolution().state) {
|
|
36908
36956
|
case 'ready':
|
|
36909
36957
|
return 'hub';
|
|
36910
36958
|
case 'permission-limited':
|
|
@@ -36920,11 +36968,11 @@ class PraxisRelatedResourceOutletComponent {
|
|
|
36920
36968
|
}
|
|
36921
36969
|
}
|
|
36922
36970
|
stateTitle() {
|
|
36923
|
-
const state = this.
|
|
36971
|
+
const state = this.renderResolution().state;
|
|
36924
36972
|
return this.t(`state.${state}.title`, this.defaultTitle(state));
|
|
36925
36973
|
}
|
|
36926
36974
|
stateDescription() {
|
|
36927
|
-
const state = this.
|
|
36975
|
+
const state = this.renderResolution().state;
|
|
36928
36976
|
return this.t(`state.${state}.description`, this.defaultDescription(state));
|
|
36929
36977
|
}
|
|
36930
36978
|
t(key, fallback) {
|
|
@@ -36936,7 +36984,7 @@ class PraxisRelatedResourceOutletComponent {
|
|
|
36936
36984
|
: 'Related resource';
|
|
36937
36985
|
}
|
|
36938
36986
|
defaultDescription(state) {
|
|
36939
|
-
return this.
|
|
36987
|
+
return this.renderResolution().reason || state;
|
|
36940
36988
|
}
|
|
36941
36989
|
applyCatalogSurface(surfaceId, catalog) {
|
|
36942
36990
|
const normalizedId = this.trim(surfaceId);
|
|
@@ -36991,6 +37039,16 @@ class PraxisRelatedResourceOutletComponent {
|
|
|
36991
37039
|
apiUrlEntry: options?.apiUrlEntry || null,
|
|
36992
37040
|
});
|
|
36993
37041
|
}
|
|
37042
|
+
buildMaterializationRequestKey(resolution) {
|
|
37043
|
+
return JSON.stringify({
|
|
37044
|
+
state: resolution.state,
|
|
37045
|
+
surfaceId: resolution.surface?.id ?? null,
|
|
37046
|
+
parentResourceId: resolution.parentResourceId ?? null,
|
|
37047
|
+
childResourcePath: resolution.childResourcePath ?? null,
|
|
37048
|
+
queryContext: resolution.queryContext ?? null,
|
|
37049
|
+
mode: this.mode(),
|
|
37050
|
+
});
|
|
37051
|
+
}
|
|
36994
37052
|
isPermissionError(error) {
|
|
36995
37053
|
const status = typeof error === 'object' && error
|
|
36996
37054
|
? error.status
|
|
@@ -37012,13 +37070,13 @@ class PraxisRelatedResourceOutletComponent {
|
|
|
37012
37070
|
return typeof value === 'string' ? value.trim() : '';
|
|
37013
37071
|
}
|
|
37014
37072
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisRelatedResourceOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
37015
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PraxisRelatedResourceOutletComponent, isStandalone: true, selector: "praxis-related-resource-outlet", inputs: { surface: { classPropertyName: "surface", publicName: "surface", isSignal: true, isRequired: false, transformFunction: null }, surfaceId: { classPropertyName: "surfaceId", publicName: "surfaceId", isSignal: true, isRequired: false, transformFunction: null }, surfaceCatalog: { classPropertyName: "surfaceCatalog", publicName: "surfaceCatalog", isSignal: true, isRequired: false, transformFunction: null }, discoverySource: { classPropertyName: "discoverySource", publicName: "discoverySource", isSignal: true, isRequired: false, transformFunction: null }, parentLinks: { classPropertyName: "parentLinks", publicName: "parentLinks", isSignal: true, isRequired: false, transformFunction: null }, apiEndpointKey: { classPropertyName: "apiEndpointKey", publicName: "apiEndpointKey", isSignal: true, isRequired: false, transformFunction: null }, apiUrlEntry: { classPropertyName: "apiUrlEntry", publicName: "apiUrlEntry", isSignal: true, isRequired: false, transformFunction: null }, parentRecord: { classPropertyName: "parentRecord", publicName: "parentRecord", isSignal: true, isRequired: false, transformFunction: null }, parentResourceId: { classPropertyName: "parentResourceId", publicName: "parentResourceId", isSignal: true, isRequired: false, transformFunction: null }, parentResourcePath: { classPropertyName: "parentResourcePath", publicName: "parentResourcePath", isSignal: true, isRequired: false, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, tableId: { classPropertyName: "tableId", publicName: "tableId", isSignal: true, isRequired: false, transformFunction: null }, queryContext: { classPropertyName: "queryContext", publicName: "queryContext", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, stateReason: { classPropertyName: "stateReason", publicName: "stateReason", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, strictValidation: { classPropertyName: "strictValidation", publicName: "strictValidation", isSignal: true, isRequired: false, transformFunction: null }, ownerWidgetKey: { classPropertyName: "ownerWidgetKey", publicName: "ownerWidgetKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { surfaceOpen: "surfaceOpen", widgetEvent: "widgetEvent", resourceEvent: "resourceEvent" }, host: { attributes: { "data-praxis-related-resource-outlet": "core" }, properties: { "attr.data-state": "
|
|
37073
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PraxisRelatedResourceOutletComponent, isStandalone: true, selector: "praxis-related-resource-outlet", inputs: { surface: { classPropertyName: "surface", publicName: "surface", isSignal: true, isRequired: false, transformFunction: null }, surfaceId: { classPropertyName: "surfaceId", publicName: "surfaceId", isSignal: true, isRequired: false, transformFunction: null }, surfaceCatalog: { classPropertyName: "surfaceCatalog", publicName: "surfaceCatalog", isSignal: true, isRequired: false, transformFunction: null }, discoverySource: { classPropertyName: "discoverySource", publicName: "discoverySource", isSignal: true, isRequired: false, transformFunction: null }, parentLinks: { classPropertyName: "parentLinks", publicName: "parentLinks", isSignal: true, isRequired: false, transformFunction: null }, apiEndpointKey: { classPropertyName: "apiEndpointKey", publicName: "apiEndpointKey", isSignal: true, isRequired: false, transformFunction: null }, apiUrlEntry: { classPropertyName: "apiUrlEntry", publicName: "apiUrlEntry", isSignal: true, isRequired: false, transformFunction: null }, parentRecord: { classPropertyName: "parentRecord", publicName: "parentRecord", isSignal: true, isRequired: false, transformFunction: null }, parentResourceId: { classPropertyName: "parentResourceId", publicName: "parentResourceId", isSignal: true, isRequired: false, transformFunction: null }, parentResourcePath: { classPropertyName: "parentResourcePath", publicName: "parentResourcePath", isSignal: true, isRequired: false, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, tableId: { classPropertyName: "tableId", publicName: "tableId", isSignal: true, isRequired: false, transformFunction: null }, queryContext: { classPropertyName: "queryContext", publicName: "queryContext", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, stateReason: { classPropertyName: "stateReason", publicName: "stateReason", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, strictValidation: { classPropertyName: "strictValidation", publicName: "strictValidation", isSignal: true, isRequired: false, transformFunction: null }, ownerWidgetKey: { classPropertyName: "ownerWidgetKey", publicName: "ownerWidgetKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { surfaceOpen: "surfaceOpen", widgetEvent: "widgetEvent", resourceEvent: "resourceEvent" }, host: { attributes: { "data-praxis-related-resource-outlet": "core" }, properties: { "attr.data-state": "renderResolution().state" } }, providers: [providePraxisI18nConfig(RELATED_RESOURCE_OUTLET_I18N_CONFIG)], ngImport: i0, template: `
|
|
37016
37074
|
<section class="pdx-related-outlet" [class.pdx-related-outlet--compact]="compact()">
|
|
37017
|
-
@if (
|
|
37075
|
+
@if (renderResolution().state === 'ready' && mode() === 'inline' && renderResolution().payload?.widget) {
|
|
37018
37076
|
<ng-container
|
|
37019
|
-
[dynamicWidgetLoader]="
|
|
37077
|
+
[dynamicWidgetLoader]="renderResolution().payload!.widget"
|
|
37020
37078
|
[ownerWidgetKey]="ownerWidgetKey()"
|
|
37021
|
-
[context]="
|
|
37079
|
+
[context]="renderResolution().payload!.context || null"
|
|
37022
37080
|
[strictValidation]="strictValidation()"
|
|
37023
37081
|
[autoWireOutputs]="true"
|
|
37024
37082
|
(widgetEvent)="onWidgetEvent($event)"
|
|
@@ -37026,7 +37084,7 @@ class PraxisRelatedResourceOutletComponent {
|
|
|
37026
37084
|
} @else {
|
|
37027
37085
|
<div
|
|
37028
37086
|
class="pdx-related-outlet__state"
|
|
37029
|
-
[class.pdx-related-outlet__state--ready]="
|
|
37087
|
+
[class.pdx-related-outlet__state--ready]="renderResolution().state === 'ready'"
|
|
37030
37088
|
[class.pdx-related-outlet__state--busy]="isBusy()"
|
|
37031
37089
|
role="status"
|
|
37032
37090
|
aria-live="polite"
|
|
@@ -37057,7 +37115,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
37057
37115
|
type: Component,
|
|
37058
37116
|
args: [{ selector: 'praxis-related-resource-outlet', standalone: true, host: {
|
|
37059
37117
|
'data-praxis-related-resource-outlet': 'core',
|
|
37060
|
-
'[attr.data-state]': '
|
|
37118
|
+
'[attr.data-state]': 'renderResolution().state',
|
|
37061
37119
|
}, imports: [
|
|
37062
37120
|
DynamicWidgetLoaderDirective,
|
|
37063
37121
|
MatButtonModule,
|
|
@@ -37065,11 +37123,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
37065
37123
|
MatProgressSpinnerModule,
|
|
37066
37124
|
], providers: [providePraxisI18nConfig(RELATED_RESOURCE_OUTLET_I18N_CONFIG)], template: `
|
|
37067
37125
|
<section class="pdx-related-outlet" [class.pdx-related-outlet--compact]="compact()">
|
|
37068
|
-
@if (
|
|
37126
|
+
@if (renderResolution().state === 'ready' && mode() === 'inline' && renderResolution().payload?.widget) {
|
|
37069
37127
|
<ng-container
|
|
37070
|
-
[dynamicWidgetLoader]="
|
|
37128
|
+
[dynamicWidgetLoader]="renderResolution().payload!.widget"
|
|
37071
37129
|
[ownerWidgetKey]="ownerWidgetKey()"
|
|
37072
|
-
[context]="
|
|
37130
|
+
[context]="renderResolution().payload!.context || null"
|
|
37073
37131
|
[strictValidation]="strictValidation()"
|
|
37074
37132
|
[autoWireOutputs]="true"
|
|
37075
37133
|
(widgetEvent)="onWidgetEvent($event)"
|
|
@@ -37077,7 +37135,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
37077
37135
|
} @else {
|
|
37078
37136
|
<div
|
|
37079
37137
|
class="pdx-related-outlet__state"
|
|
37080
|
-
[class.pdx-related-outlet__state--ready]="
|
|
37138
|
+
[class.pdx-related-outlet__state--ready]="renderResolution().state === 'ready'"
|
|
37081
37139
|
[class.pdx-related-outlet__state--busy]="isBusy()"
|
|
37082
37140
|
role="status"
|
|
37083
37141
|
aria-live="polite"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/core",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.39",
|
|
4
4
|
"description": "Core library for Praxis UI Workspace: types, tokens, services and utilities shared across @praxisui/* packages.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
package/types/praxisui-core.d.ts
CHANGED
|
@@ -14924,10 +14924,12 @@ declare class PraxisSurfaceHostComponent implements AfterViewInit, OnChanges {
|
|
|
14924
14924
|
type RelatedResourceOutletMode = 'inline' | 'open-action';
|
|
14925
14925
|
declare class PraxisRelatedResourceOutletComponent {
|
|
14926
14926
|
private readonly resolver;
|
|
14927
|
+
private readonly materializer;
|
|
14927
14928
|
private readonly i18n;
|
|
14928
14929
|
private readonly injector;
|
|
14929
14930
|
private discoverySubscription?;
|
|
14930
14931
|
private discoveryRequestKey;
|
|
14932
|
+
private materializationRequestKey;
|
|
14931
14933
|
readonly surface: i0.InputSignal<ResourceSurfaceCatalogItem | null>;
|
|
14932
14934
|
readonly surfaceId: i0.InputSignal<string | null>;
|
|
14933
14935
|
readonly surfaceCatalog: i0.InputSignal<ResourceSurfaceCatalogResponse | null>;
|
|
@@ -14956,7 +14958,9 @@ declare class PraxisRelatedResourceOutletComponent {
|
|
|
14956
14958
|
private readonly discoveredSurface;
|
|
14957
14959
|
private readonly discoveryState;
|
|
14958
14960
|
private readonly discoveryStateReason;
|
|
14961
|
+
private readonly materializedPayload;
|
|
14959
14962
|
readonly resolution: i0.Signal<RelatedResourceSurfaceResolution>;
|
|
14963
|
+
readonly renderResolution: i0.Signal<RelatedResourceSurfaceResolution>;
|
|
14960
14964
|
readonly isBusy: i0.Signal<boolean>;
|
|
14961
14965
|
constructor();
|
|
14962
14966
|
openRelated(): void;
|
|
@@ -14973,6 +14977,7 @@ declare class PraxisRelatedResourceOutletComponent {
|
|
|
14973
14977
|
private resolveFallbackSurfaceCatalogHref;
|
|
14974
14978
|
private normalizeResourcePath;
|
|
14975
14979
|
private buildDiscoveryRequestKey;
|
|
14980
|
+
private buildMaterializationRequestKey;
|
|
14976
14981
|
private isPermissionError;
|
|
14977
14982
|
private extractResourceEvent;
|
|
14978
14983
|
private trim;
|