@luigi-project/core-modular 0.0.5 → 0.0.6-dev.202604240100

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.5"
21
+ "version": "0.0.6-dev.202604240100"
22
22
  }
@@ -1,11 +1,12 @@
1
1
  import { Luigi } from '../core-api/luigi';
2
- import { AppSwitcher, LeftNavData, NavigationOptions, NavigationRequestParams, NavItem, Node, PathData, TabNavData, TopNavData } from '../types/navigation';
2
+ import { AppSwitcher, BreadcrumbData, LeftNavData, NavigationOptions, NavigationRequestParams, NavItem, Node, PathData, TabNavData, TopNavData } from '../types/navigation';
3
3
  import { NodeDataManagementService } from './node-data-management.service';
4
4
  import { ModalService } from './modal.service';
5
5
  export declare class NavigationService {
6
6
  private luigi;
7
7
  modalService?: ModalService;
8
8
  nodeDataManagementService?: NodeDataManagementService;
9
+ private previousBreadcrumbs;
9
10
  constructor(luigi: Luigi);
10
11
  private getModalService;
11
12
  private getNodeDataManagementService;
@@ -30,6 +31,7 @@ export declare class NavigationService {
30
31
  getParentNode(node: Node | undefined, pathData: PathData): Node | undefined;
31
32
  getAppSwitcherData(appSwitcherData: AppSwitcher, headerSettings: any): AppSwitcher | undefined;
32
33
  getTabNavData(path: string, pData?: PathData): Promise<TabNavData>;
34
+ getBreadcrumbData(path: string, pData?: PathData): Promise<BreadcrumbData>;
33
35
  /**
34
36
  * Handles changes between navigation nodes by invoking a configured hook function.
35
37
  *
@@ -1,5 +1,5 @@
1
1
  import { AlertHandler, AlertSettings, ConfirmationModalHandler, ConfirmationModalSettings, UserSettings } from '../modules/ux-module';
2
- import { ModalSettings, LeftNavData, Node, TopNavData, TabNavData } from './navigation';
2
+ import { ModalSettings, LeftNavData, Node, TopNavData, TabNavData, BreadcrumbData } from './navigation';
3
3
  export interface LuigiConnector {
4
4
  renderMainLayout(): void;
5
5
  renderTopNav(data: TopNavData): void;
@@ -8,6 +8,7 @@ export interface LuigiConnector {
8
8
  renderModal(content: HTMLElement, modalSettings: ModalSettings, onCloseCallback?: () => void, onCloseRequest?: () => void): any;
9
9
  renderDrawer(content: HTMLElement, modalSettings: ModalSettings, onCloseCallback?: () => void): any;
10
10
  renderTabNav(data: TabNavData): void;
11
+ renderBreadcrumbs(data: BreadcrumbData): void;
11
12
  renderAlert(alertSettings: AlertSettings, alertHandler: AlertHandler): void;
12
13
  renderConfirmationModal(confirmationModalSettings: ConfirmationModalSettings, containerHandler: ConfirmationModalHandler): void;
13
14
  setDocumentTitle(documentTitle: string): void;
@@ -111,6 +111,7 @@ export interface Node {
111
111
  parent?: Node;
112
112
  pathSegment?: string;
113
113
  runTimeErrorHandler?: RunTimeErrorHandler;
114
+ showBreadcrumbs?: boolean;
114
115
  tabNav?: boolean;
115
116
  tooltipText?: string;
116
117
  userSettingsGroup?: string;
@@ -146,6 +147,13 @@ export interface Category {
146
147
  nodes?: NavItem[];
147
148
  tooltip?: string;
148
149
  }
150
+ export interface BreadcrumbItem {
151
+ label: string;
152
+ last?: boolean;
153
+ node: Node;
154
+ pending?: boolean;
155
+ route: string | undefined;
156
+ }
149
157
  export interface NavItem {
150
158
  altText?: string;
151
159
  category?: Category;
@@ -161,6 +169,13 @@ export interface TabNavData {
161
169
  basePath?: string;
162
170
  navClick?: (item: NavItem) => void;
163
171
  }
172
+ export interface BreadcrumbData {
173
+ basePath?: string;
174
+ clearBeforeRender?: boolean;
175
+ items?: BreadcrumbItem[];
176
+ renderer?: any;
177
+ selectedNode?: Node;
178
+ }
164
179
  export interface ModalSettings {
165
180
  size?: 'fullscreen' | 'l' | 'm' | 's';
166
181
  width?: string;
@@ -0,0 +1,8 @@
1
+ declare class CustomMessagesHelpersClass {
2
+ filterIdFromMessageObject(message: Record<string, any>): {
3
+ id: string | undefined;
4
+ messageWithoutId: Record<string, any>;
5
+ };
6
+ }
7
+ export declare const CustomMessagesHelpers: CustomMessagesHelpersClass;
8
+ export {};
@@ -1,4 +1,5 @@
1
1
  import { Luigi } from '../../core-api/luigi';
2
+ import { default as LuigiContainer } from '@luigi-project/container/LuigiContainer.svelte';
2
3
  export type MicrofrontendEntry = {
3
4
  iframe: HTMLElement;
4
5
  id: string;
@@ -15,4 +16,5 @@ export declare const LuigiContainerHelpers: {
15
16
  getMainMicrofrontends(luigi: Luigi): MicrofrontendEntry[];
16
17
  getModalMicrofrontends(): MicrofrontendEntry[];
17
18
  getDrawerMicrofrontends(): MicrofrontendEntry;
19
+ getAllLuigiContainerIframe(luigi: Luigi): LuigiContainer[] | undefined;
18
20
  };
@@ -39,6 +39,16 @@ export declare const RoutingHelpers: {
39
39
  * @returns A sanitized map of node-specific parameters with the prefix removed from their keys.
40
40
  */
41
41
  filterNodeParams(params: Record<string, string>, luigi: Luigi): Record<string, string>;
42
+ /**
43
+ * Maps a path to the nodes route, replacing all dynamic pathSegments with the concrete values in path.
44
+ * Example: path='/object/234/subobject/378/some/node', node with path '/object/:id/subobject/:subid' results in
45
+ * '/object/234/subobject/378/'.
46
+ * @param {String} path - a concrete node path, typically the current app route
47
+ * @param {Node} node - a node which must be an ancestor of the resolved node from path
48
+ * @returns a string with the route or undefined, if node is not an ancestor of path-node
49
+ */
50
+ mapPathToNode(path: string, node: Node): string | undefined;
51
+ getNodeLabel(node: Node, luigi: Luigi): Promise<string>;
42
52
  /**
43
53
  * Retrieves the content view parameter prefix from the Luigi configuration.
44
54
  *
@@ -313,7 +323,7 @@ export declare const RoutingHelpers: {
313
323
  * @returns a string representing the full route from the root to the given node, including query parameters if provided.
314
324
  */
315
325
  buildRoute(node: Node, path: string, params?: string): string;
316
- substituteViewUrl(viewUrl: string, pathParams: Record<string, string>, luigi: Luigi): string;
326
+ substituteViewUrl(node: Node, pathParams: Record<string, string>, luigi: Luigi): string;
317
327
  /**
318
328
  * Generates a sub-path for a given node by replacing dynamic parameters in the node's path with actual values from pathParams.
319
329
  * @param node - The node for which to generate the sub-path. It is expected to have a `pathSegment` property and optionally a `parent` property pointing to its parent node.