@praxisui/core 8.0.0-beta.73 → 8.0.0-beta.75
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.
|
@@ -11861,6 +11861,7 @@ class ResourceSurfaceOpenAdapterService {
|
|
|
11861
11861
|
...(options.apiUrlEntry ? { apiUrlEntry: options.apiUrlEntry } : {}),
|
|
11862
11862
|
}
|
|
11863
11863
|
: undefined;
|
|
11864
|
+
const resolvedApiEntry = this.discovery.resolveApiEntry(discoveryOptions);
|
|
11864
11865
|
const resolvedSchemaUrl = this.discovery.resolveHref(surface.schemaUrl, discoveryOptions);
|
|
11865
11866
|
const resolvedSubmitUrl = this.isWritableFormSurface(surface.kind)
|
|
11866
11867
|
? this.discovery.resolveHref(surface.path, discoveryOptions)
|
|
@@ -11911,13 +11912,14 @@ class ResourceSurfaceOpenAdapterService {
|
|
|
11911
11912
|
mode,
|
|
11912
11913
|
schemaUrl: resolvedSchemaUrl,
|
|
11913
11914
|
apiEndpointKey: options.endpointKey ?? null,
|
|
11914
|
-
apiUrlEntry: options.apiUrlEntry ??
|
|
11915
|
+
apiUrlEntry: options.apiUrlEntry ?? resolvedApiEntry,
|
|
11915
11916
|
};
|
|
11916
11917
|
if (surface.scope === 'ITEM' && this.isReadableFormSurface(surface.kind)) {
|
|
11917
11918
|
payload.widget.inputs['customEndpoints'] = {
|
|
11918
11919
|
...(payload.widget.inputs['customEndpoints'] || {}),
|
|
11919
11920
|
getById: this.discovery.resolveHref(surface.path, discoveryOptions),
|
|
11920
11921
|
};
|
|
11922
|
+
payload.widget.bindingOrder = this.withInputBefore(payload.widget.bindingOrder, 'customEndpoints', 'resourceId');
|
|
11921
11923
|
}
|
|
11922
11924
|
if (this.isWritableFormSurface(surface.kind)) {
|
|
11923
11925
|
payload.widget.inputs['submitMethod'] = surface.method.toLowerCase();
|
|
@@ -11952,6 +11954,15 @@ class ResourceSurfaceOpenAdapterService {
|
|
|
11952
11954
|
buildStableInstanceId(surface) {
|
|
11953
11955
|
return `${surface.resourceKey}.${surface.id}`.replace(/[^a-zA-Z0-9._-]+/g, '-');
|
|
11954
11956
|
}
|
|
11957
|
+
withInputBefore(bindingOrder, input, beforeInput) {
|
|
11958
|
+
const next = (bindingOrder || []).filter((item) => item !== input);
|
|
11959
|
+
const targetIndex = next.indexOf(beforeInput);
|
|
11960
|
+
if (targetIndex >= 0) {
|
|
11961
|
+
next.splice(targetIndex, 0, input);
|
|
11962
|
+
return next;
|
|
11963
|
+
}
|
|
11964
|
+
return [...next, input];
|
|
11965
|
+
}
|
|
11955
11966
|
normalizeResourcePath(resourcePath) {
|
|
11956
11967
|
return String(resourcePath || '').trim().replace(/^\/+/, '').replace(/\/+$/, '');
|
|
11957
11968
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/core",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.75",
|
|
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
|
@@ -8951,6 +8951,7 @@ declare class ResourceSurfaceOpenAdapterService {
|
|
|
8951
8951
|
toPayload(surface: ResourceSurfaceCatalogItem, options: ResourceSurfaceOpenAdapterOptions): SurfaceOpenPayload;
|
|
8952
8952
|
private buildBasePayload;
|
|
8953
8953
|
private buildStableInstanceId;
|
|
8954
|
+
private withInputBefore;
|
|
8954
8955
|
private normalizeResourcePath;
|
|
8955
8956
|
private resolveFormMode;
|
|
8956
8957
|
private isCollectionView;
|