@luigi-project/core-modular 0.0.7-dev.202604280103 → 0.0.7-dev.202604300104

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/package.json CHANGED
@@ -18,5 +18,5 @@
18
18
  "micro-frontends",
19
19
  "microfrontends"
20
20
  ],
21
- "version": "0.0.7-dev.202604280103"
21
+ "version": "0.0.7-dev.202604300104"
22
22
  }
@@ -31,7 +31,8 @@ export declare class NavigationService {
31
31
  getParentNode(node: Node | undefined, pathData: PathData): Node | undefined;
32
32
  getAppSwitcherData(appSwitcherData: AppSwitcher, headerSettings: any): AppSwitcher | undefined;
33
33
  getTabNavData(path: string, pData?: PathData): Promise<TabNavData>;
34
- getBreadcrumbData(path: string, pData?: PathData): Promise<BreadcrumbData>;
34
+ getBreadcrumbData(path: string, pData?: PathData, onResolve?: (data: BreadcrumbData) => void): Promise<BreadcrumbData>;
35
+ private resolveBreadcrumbTitles;
35
36
  /**
36
37
  * Handles changes between navigation nodes by invoking a configured hook function.
37
38
  *
@@ -113,6 +113,7 @@ export interface Node {
113
113
  runTimeErrorHandler?: RunTimeErrorHandler;
114
114
  showBreadcrumbs?: boolean;
115
115
  tabNav?: boolean;
116
+ titleResolver?: TitleResolver;
116
117
  tooltipText?: string;
117
118
  userSettingsGroup?: string;
118
119
  viewUrl?: string;
@@ -440,4 +441,28 @@ export interface RendererConfig {
440
441
  maxWidth?: number;
441
442
  }>;
442
443
  }
444
+ export interface TitleResolverCache {
445
+ key: string;
446
+ value: {
447
+ label: string;
448
+ icon?: string;
449
+ };
450
+ }
451
+ export interface TitleResolver {
452
+ request: {
453
+ method: string;
454
+ url: string;
455
+ headers?: Record<string, string>;
456
+ body?: any;
457
+ };
458
+ titlePropertyChain: string;
459
+ titleDecorator?: string;
460
+ iconPropertyChain?: string;
461
+ prerenderFallback?: boolean;
462
+ responsePath?: string;
463
+ fallbackTitle?: string;
464
+ fallbackIcon?: string;
465
+ /** @internal runtime cache – not user-configured */
466
+ _cache?: TitleResolverCache;
467
+ }
443
468
  export type HistoryMethod = 'pushState' | 'replaceState';
@@ -1,6 +1,6 @@
1
1
  import { FeatureToggles } from '../../core-api/feature-toggles';
2
2
  import { Luigi } from '../../core-api/luigi';
3
- import { AppSwitcher, Node, PathData } from '../../types/navigation';
3
+ import { AppSwitcher, Node, PathData, TitleResolver } from '../../types/navigation';
4
4
  export declare const NavigationHelpers: {
5
5
  normalizePath: (raw: string) => string;
6
6
  segmentMatches: (linkSegment: string, pathSegment: string, pathParams: Record<string, any>) => boolean;
@@ -27,4 +27,22 @@ export declare const NavigationHelpers: {
27
27
  * @returns The redirect path if valid, undefined otherwise
28
28
  */
29
29
  validatePathAndGetRedirect: (path: string, luigi: Luigi) => Promise<string | undefined>;
30
+ fetchNodeTitleData(node: Node, context: any): Promise<{
31
+ label: string;
32
+ icon?: string;
33
+ }>;
34
+ /**
35
+ * Returns a nested property value defined by a chain string
36
+ * @param {*} obj - the object
37
+ * @param {*} propChain - a string defining the property chain
38
+ * @param {*} fallback - fallback value if resolution fails
39
+ * @returns the value or fallback
40
+ */
41
+ getPropertyChainValue(obj: Record<string, unknown>, propChain?: string, fallback?: any): any;
42
+ substituteVars(resolver: TitleResolver, context: Record<string, unknown>): TitleResolver;
43
+ _fetch(url: string, options: RequestInit): Promise<Response>;
44
+ processTitleData(data: Record<string, unknown>, resolver: TitleResolver): {
45
+ label: string;
46
+ icon?: string;
47
+ };
30
48
  };