@luigi-project/core-modular 0.0.1-dev.20260250047 → 0.0.2-dev.20260260044

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.
@@ -14,5 +14,5 @@ export declare const RoutingModule: {
14
14
  * @param keepBrowserHistory - If `true`, the browser history will be preserved when updating the URL.
15
15
  * @param luigi - The Luigi core instance used to interact with the routing API.
16
16
  */
17
- addSearchParamsFromClient(searchParams: Record<string, any>, keepBrowserHistory: boolean, luigi: Luigi): void;
17
+ addSearchParamsFromClient(searchParams: Record<string, any>, keepBrowserHistory: boolean, luigi: Luigi): Promise<void>;
18
18
  };
@@ -6,7 +6,7 @@ export declare const UIModule: {
6
6
  routingService: RoutingService;
7
7
  luigi: Luigi;
8
8
  init: (luigi: Luigi) => void;
9
- update: (scopes?: string[]) => void;
9
+ update: (scopes?: string[]) => Promise<void>;
10
10
  updateMainContent: (currentNode: any, luigi: Luigi) => Promise<void>;
11
11
  openModal: (luigi: Luigi, node: any, modalSettings: ModalSettings, onCloseCallback?: () => void) => Promise<void>;
12
12
  updateModalSettings: (modalSettings: ModalSettings, addHistoryEntry: boolean, luigi: Luigi) => void;
package/package.json CHANGED
@@ -18,5 +18,5 @@
18
18
  "micro-frontends",
19
19
  "microfrontends"
20
20
  ],
21
- "version": "0.0.1-dev.20260250047"
21
+ "version": "0.0.2-dev.20260260044"
22
22
  }
@@ -1,4 +1,5 @@
1
1
  import { Luigi } from '../core-api/luigi';
2
+ import { NodeDataManagementService } from './node-data-management.service';
2
3
  export interface TopNavData {
3
4
  appTitle: string;
4
5
  logo: string;
@@ -73,6 +74,9 @@ export interface PathData {
73
74
  rootNodes: Node[];
74
75
  pathParams: Record<string, any>;
75
76
  }
77
+ export interface RootNode {
78
+ node: Node;
79
+ }
76
80
  export interface Node {
77
81
  altText?: string;
78
82
  anonymousAccess?: any;
@@ -98,6 +102,7 @@ export interface Node {
98
102
  onNodeActivation?: (node: Node) => boolean | void;
99
103
  openNodeInModal?: boolean;
100
104
  pageErrorHandler?: PageErrorHandler;
105
+ parent?: Node;
101
106
  pathSegment?: string;
102
107
  runTimeErrorHandler?: RunTimeErrorHandler;
103
108
  tabNav?: boolean;
@@ -171,13 +176,15 @@ export interface ExternalLink {
171
176
  }
172
177
  export declare class NavigationService {
173
178
  private luigi;
179
+ nodeDataManagementService?: NodeDataManagementService;
174
180
  constructor(luigi: Luigi);
175
- getPathData(path: string): PathData;
181
+ private getNodeDataManagementService;
182
+ getPathData(path: string): Promise<PathData>;
176
183
  findMatchingNode(urlPathElement: string, nodes: Node[]): Node | undefined;
177
184
  buildNavItems(nodes: Node[], selectedNode: Node | undefined, pathData: PathData): NavItem[];
178
- shouldRedirect(path: string, pData?: PathData): string | undefined;
179
- getCurrentNode(path: string): any;
180
- getPathParams(path: string): Record<string, any>;
185
+ shouldRedirect(path: string, pData?: PathData): Promise<string | undefined>;
186
+ getCurrentNode(path: string): Promise<any>;
187
+ getPathParams(path: string): Promise<Record<string, any>>;
181
188
  /**
182
189
  * getTruncatedChildren
183
190
  *
@@ -188,12 +195,12 @@ export declare class NavigationService {
188
195
  */
189
196
  getTruncatedChildren(children: any): any[];
190
197
  applyNavGroups(items: NavItem[]): NavItem[];
191
- getLeftNavData(path: string, pData?: PathData): LeftNavData;
198
+ getLeftNavData(path: string, pData?: PathData): Promise<LeftNavData>;
192
199
  navItemClick(item: Node, parentPath: string): void;
193
- getTopNavData(path: string, pData?: PathData): TopNavData;
200
+ getTopNavData(path: string, pData?: PathData): Promise<TopNavData>;
194
201
  getParentNode(node: Node | undefined, pathData: PathData): Node | undefined;
195
202
  getAppSwitcherData(appSwitcherData: AppSwitcher, headerSettings: any): AppSwitcher | undefined;
196
- getTabNavData(path: string, pData?: PathData): TabNavData;
203
+ getTabNavData(path: string, pData?: PathData): Promise<TabNavData>;
197
204
  /**
198
205
  * Handles changes between navigation nodes by invoking a configured hook function.
199
206
  *
@@ -228,4 +235,7 @@ export declare class NavigationService {
228
235
  private prepareRootNodes;
229
236
  private getAccessibleNodes;
230
237
  handleNavigationRequest(path: string, preserveView?: string, modalSettings?: any, newTab?: boolean, withoutSync?: boolean, callbackFn?: any): Promise<void>;
238
+ getChildren(node: Node | undefined, context?: Record<string, any>): Promise<Node[]>;
239
+ getExpandStructuralPathSegment(node: Node): Node;
240
+ bindChildToParent(child: Node, node: Node): Node;
231
241
  }
@@ -1,4 +1,4 @@
1
- import { Node } from './navigation.service';
1
+ import { Node, RootNode } from './navigation.service';
2
2
  export declare class NodeDataManagementService {
3
3
  dataManagement: Map<any, any>;
4
4
  navPath: string;
@@ -28,9 +28,9 @@ export declare class NodeDataManagementService {
28
28
  setRootNode(node: Node): void;
29
29
  /**
30
30
  * Returns the root node
31
- * @returns {Node} root node
31
+ * @returns {RootNode} root node
32
32
  */
33
- getRootNode(): Node;
33
+ getRootNode(): RootNode;
34
34
  /**
35
35
  * Checks if root node exists
36
36
  * @returns {boolean} true or false
@@ -1,5 +1,5 @@
1
1
  import { Luigi } from '../core-api/luigi';
2
- import { ModalSettings, Node, NavigationService } from './navigation.service';
2
+ import { ModalSettings, Node, PathData, NavigationService } from './navigation.service';
3
3
  export interface Route {
4
4
  raw: string;
5
5
  node?: Node;
@@ -12,6 +12,7 @@ export declare class RoutingService {
12
12
  previousNode: Node | undefined;
13
13
  currentRoute?: Route;
14
14
  modalSettings?: ModalSettings;
15
+ previousPathData?: PathData;
15
16
  constructor(luigi: Luigi);
16
17
  private getNavigationService;
17
18
  /**
@@ -106,4 +107,5 @@ export declare class RoutingService {
106
107
 
107
108
  */
108
109
  updateModalDataInUrl(modalPath: string, modalParams: ModalSettings, addHistoryEntry: boolean): void;
110
+ checkInvalidateCache(previousPathData: PathData | undefined, newPath: string): void;
109
111
  }
@@ -251,4 +251,15 @@ export declare const RoutingHelpers: {
251
251
  * constraining `paramMap` and `object` to more specific record types.
252
252
  */
253
253
  substituteDynamicParamsInObject(object: Record<string, string>, paramMap: Record<any, any>, paramPrefix?: string, contains?: boolean): {};
254
+ /**
255
+ * Returns true or false whether the passed node is a dynamic node or not
256
+ * @param {*} node
257
+ */
258
+ isDynamicNode(node: Node): boolean;
259
+ /**
260
+ * Returns the value from the passed node's pathSegment, e.g. :groupId -> yourGroupId
261
+ * @param {*} node
262
+ * @param {*} pathParams
263
+ */
264
+ getDynamicNodeValue(node: Node, pathParams: Record<string, string>): string | undefined;
254
265
  };