@praxisui/core 8.0.0-beta.50 → 8.0.0-beta.52

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.
@@ -28955,7 +28955,7 @@ class DynamicWidgetPageComponent {
28955
28955
  const surfaceId = this.resolveRecordSurfaceId(targetRef);
28956
28956
  if (!surfaceId)
28957
28957
  continue;
28958
- const label = this.resolveRecordSurfaceLabel(targetRef, targetDefinition);
28958
+ const label = this.resolveRecordSurfaceLabel(targetRef, targetWidget, targetDefinition);
28959
28959
  const surface = {
28960
28960
  id: surfaceId,
28961
28961
  label,
@@ -29009,13 +29009,32 @@ class DynamicWidgetPageComponent {
29009
29009
  const tab = [...(ref.nestedPath || [])].reverse().find((segment) => segment.kind === 'tab');
29010
29010
  return String(tab?.id || ref.nestedPath?.map((segment) => segment.key || segment.id).filter(Boolean).join('.') || ref.widget).trim();
29011
29011
  }
29012
- resolveRecordSurfaceLabel(ref, targetDefinition) {
29012
+ resolveRecordSurfaceLabel(ref, targetWidget, targetDefinition) {
29013
+ const tabLabel = this.resolveRecordSurfaceTabLabel(ref, targetWidget);
29014
+ if (tabLabel)
29015
+ return tabLabel;
29013
29016
  const toolbarTitle = this.stringOrNull(targetDefinition?.inputs?.['config']?.['toolbar']?.['title']);
29014
29017
  if (toolbarTitle)
29015
29018
  return toolbarTitle;
29016
29019
  const tab = [...(ref.nestedPath || [])].reverse().find((segment) => segment.kind === 'tab');
29017
29020
  return this.humanizeRecordSurfaceLabel(tab?.id || ref.widget);
29018
29021
  }
29022
+ resolveRecordSurfaceTabLabel(ref, targetWidget) {
29023
+ const tab = [...(ref.nestedPath || [])].reverse().find((segment) => segment.kind === 'tab');
29024
+ if (!tab)
29025
+ return null;
29026
+ const tabs = targetWidget?.definition.inputs?.['config']?.['tabs'];
29027
+ if (!Array.isArray(tabs))
29028
+ return null;
29029
+ const match = tabs.find((candidate) => this.isRecord(candidate)
29030
+ && (this.stringOrNull(candidate['id']) === this.stringOrNull(tab.id)
29031
+ || candidate['index'] === tab.index));
29032
+ if (!this.isRecord(match))
29033
+ return null;
29034
+ return this.stringOrNull(match['textLabel'])
29035
+ || this.stringOrNull(match['label'])
29036
+ || this.stringOrNull(match['title']);
29037
+ }
29019
29038
  humanizeRecordSurfaceLabel(value) {
29020
29039
  const raw = String(value || '').trim();
29021
29040
  if (!raw)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxisui/core",
3
- "version": "8.0.0-beta.50",
3
+ "version": "8.0.0-beta.52",
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",
@@ -11803,11 +11803,12 @@ interface RecordRelatedSurfaceContext {
11803
11803
  operationId: RecordRelatedSurfaceOperationId;
11804
11804
  source: RecordRelatedSurfaceEndpoint;
11805
11805
  target: RecordRelatedSurfaceEndpoint;
11806
+ resourceSurface?: ResourceSurfaceCatalogItem;
11806
11807
  statePath?: string;
11807
11808
  description?: string | null;
11808
11809
  }
11809
11810
  interface RecordRelatedSurfaceContextPack {
11810
- source: 'dynamic-page-composition';
11811
+ source: 'dynamic-page-composition' | 'resource-capabilities' | 'mixed';
11811
11812
  surfaces: RecordRelatedSurfaceContext[];
11812
11813
  }
11813
11814
 
@@ -13566,6 +13567,7 @@ declare class DynamicWidgetPageComponent implements OnChanges, OnDestroy {
13566
13567
  private isStateToTableQueryContextLink;
13567
13568
  private resolveRecordSurfaceId;
13568
13569
  private resolveRecordSurfaceLabel;
13570
+ private resolveRecordSurfaceTabLabel;
13569
13571
  private humanizeRecordSurfaceLabel;
13570
13572
  private resolveRecordSurfaceChildWidgetKey;
13571
13573
  private recordSurfaceSourceKey;