@luigi-project/core-modular 0.0.11 → 0.0.12-dev.20260850047
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/core-api/navigation.d.ts +1 -1
- package/core-api/routing.d.ts +4 -1
- package/core-api/ux.d.ts +4 -0
- package/luigi-engine.d.ts +3 -3
- package/luigi.js +2592 -2447
- package/luigi.js.map +1 -1
- package/modules/routing-module.d.ts +2 -1
- package/modules/ui-module.d.ts +2 -2
- package/package.json +2 -2
- package/services/navigation.service.d.ts +13 -0
- package/types/connector.d.ts +4 -0
- package/types/navigation.d.ts +6 -0
- package/types/ux.d.ts +1 -1
- package/utilities/helpers/generic-helpers.d.ts +1 -1
- package/utilities/helpers/navigation-helpers.d.ts +2 -0
- package/utilities/helpers/routing-helpers.d.ts +2 -1
|
@@ -12,7 +12,8 @@ export declare const RoutingModule: {
|
|
|
12
12
|
*
|
|
13
13
|
* @param searchParams - An object containing key-value pairs of search parameters to be added to the URL.
|
|
14
14
|
* @param keepBrowserHistory - If `true`, the browser history will be preserved when updating the URL.
|
|
15
|
+
* @param preventLuigiConfigUpdate - If `true`, prevents updating the Luigi configuration when adding search parameters.
|
|
15
16
|
* @param luigi - The Luigi core instance used to interact with the routing API.
|
|
16
17
|
*/
|
|
17
|
-
addSearchParamsFromClient(searchParams: Record<string, any>, keepBrowserHistory: boolean, luigi: Luigi): Promise<void>;
|
|
18
|
+
addSearchParamsFromClient(searchParams: Record<string, any>, keepBrowserHistory: boolean, preventLuigiConfigUpdate: boolean, luigi: Luigi): Promise<void>;
|
|
18
19
|
};
|
package/modules/ui-module.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ export declare const UIModule: {
|
|
|
12
12
|
init: (luigi: Luigi) => void;
|
|
13
13
|
update: (scopes?: string[]) => Promise<void>;
|
|
14
14
|
updateMainContent: (currentNode: Node, luigi: Luigi, luigiParams?: LuigiParams, withoutSync?: boolean, preventContextUpdate?: boolean) => Promise<void>;
|
|
15
|
-
openModal: (luigi: Luigi, node: Node, modalSettings: ModalSettings, onCloseCallback?: () => void) => Promise<void>;
|
|
15
|
+
openModal: (luigi: Luigi, node: Node, modalSettings: ModalSettings, onCloseCallback?: (goBackValue?: any) => void, luigiParams?: LuigiParams) => Promise<void>;
|
|
16
16
|
updateModalSettings: (modalSettings: ModalSettings, addHistoryEntry: boolean, luigi: Luigi) => void;
|
|
17
|
-
openDrawer: (luigi: Luigi, node: Node, drawerSettings: DrawerSettings, onCloseCallback?: () => void) => Promise<void>;
|
|
17
|
+
openDrawer: (luigi: Luigi, node: Node, drawerSettings: DrawerSettings, onCloseCallback?: () => void, luigiParams?: LuigiParams) => Promise<void>;
|
|
18
18
|
openUserSettings: (userSettingsDialogSettings: UserSettingsDialogSettings, userSettingData: any, previousUserSettings: any, luigi: Luigi) => Promise<void>;
|
|
19
19
|
};
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"main": "luigi.js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+ssh://git@github.com/
|
|
8
|
+
"url": "git+ssh://git@github.com/luigi-project/luigi.git"
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"tag": "luigi"
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"micro-frontends",
|
|
19
19
|
"microfrontends"
|
|
20
20
|
],
|
|
21
|
-
"version": "0.0.
|
|
21
|
+
"version": "0.0.12-dev.20260850047"
|
|
22
22
|
}
|
|
@@ -112,5 +112,18 @@ export declare class NavigationService {
|
|
|
112
112
|
* @returns The constructed path string.
|
|
113
113
|
*/
|
|
114
114
|
buildPath(incomingPath: string, options: NavigationOptions): Promise<string>;
|
|
115
|
+
/**
|
|
116
|
+
* Computes the current route path relative to a context node, based on the provided navigation options.
|
|
117
|
+
* Unlike {@link buildPath}, which concatenates an incoming path onto a context node for navigation,
|
|
118
|
+
* this method subtracts the context node's path from the current node's path to return the relative remainder.
|
|
119
|
+
*
|
|
120
|
+
* @param options - Navigation options determining the reference point for the relative path.
|
|
121
|
+
* @param options.fromVirtualTreeRoot - If true, returns the path relative to the nearest ancestor with `virtualTree: true`.
|
|
122
|
+
* @param options.fromParent - If true, returns the path relative to the current node's parent.
|
|
123
|
+
* @param options.fromClosestContext - If true, returns the path relative to the nearest ancestor with a `navigationContext`.
|
|
124
|
+
* @param options.fromContext - If set, returns the path relative to the ancestor whose `navigationContext` matches this value.
|
|
125
|
+
* @returns The current route path relative to the resolved context node, or the full sub-path if no option is set.
|
|
126
|
+
*/
|
|
127
|
+
getCurrentRoutePath(options: NavigationOptions): Promise<string | undefined>;
|
|
115
128
|
private buildContextSwitcher;
|
|
116
129
|
}
|
package/types/connector.d.ts
CHANGED
|
@@ -203,6 +203,10 @@ export interface LuigiConnector {
|
|
|
203
203
|
* no-refcount caveat applies.
|
|
204
204
|
*/
|
|
205
205
|
removeBackdrop(): void;
|
|
206
|
+
/**
|
|
207
|
+
* Set the collapsed state of the left side navigation.
|
|
208
|
+
*/
|
|
209
|
+
collapseLeftSideNav(state: boolean): void;
|
|
206
210
|
/**
|
|
207
211
|
* Open the user-settings dialog.
|
|
208
212
|
*
|
package/types/navigation.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface TopNavData {
|
|
|
4
4
|
appSwitcher?: AppSwitcher;
|
|
5
5
|
appTitle: string;
|
|
6
6
|
contextSwitcher?: ContextSwitcher;
|
|
7
|
+
isHeaderDisabled: boolean;
|
|
7
8
|
globalSearch?: GlobalSearch;
|
|
8
9
|
logo: string;
|
|
9
10
|
navClick?: (item: NavItem) => Promise<void>;
|
|
@@ -233,6 +234,7 @@ export interface DrawerSettings {
|
|
|
233
234
|
header?: DrawerHeader;
|
|
234
235
|
overlap?: boolean;
|
|
235
236
|
size?: 'l' | 'm' | 's' | 'xs';
|
|
237
|
+
nodeParams?: Record<string, any>;
|
|
236
238
|
}
|
|
237
239
|
export interface ModalSettings {
|
|
238
240
|
size?: 'fullscreen' | 'l' | 'm' | 's';
|
|
@@ -241,6 +243,7 @@ export interface ModalSettings {
|
|
|
241
243
|
title?: string;
|
|
242
244
|
closebtn_data_testid?: string;
|
|
243
245
|
keepPrevious?: boolean;
|
|
246
|
+
nodeParams?: Record<string, any>;
|
|
244
247
|
}
|
|
245
248
|
export interface ProductSwitcher {
|
|
246
249
|
altText?: string;
|
|
@@ -335,5 +338,8 @@ export interface TitleResolver {
|
|
|
335
338
|
export interface ViewGroupSettings {
|
|
336
339
|
preloadUrl?: string;
|
|
337
340
|
loadOnStartup?: boolean;
|
|
341
|
+
customData?: Record<string, any>;
|
|
342
|
+
_liveCustomData?: Record<string, any>;
|
|
338
343
|
}
|
|
339
344
|
export type HistoryMethod = 'pushState' | 'replaceState';
|
|
345
|
+
export type MFType = 'main' | 'modal' | 'drawer' | 'usersettings';
|
package/types/ux.d.ts
CHANGED
|
@@ -151,7 +151,7 @@ export declare const GenericHelpers: {
|
|
|
151
151
|
* @param parenthesis
|
|
152
152
|
* @returns
|
|
153
153
|
*/
|
|
154
|
-
replaceVars(inputString: string, params: Record<string, any
|
|
154
|
+
replaceVars(inputString: string, params: Record<string, any> | undefined, prefix: string, parenthesis?: boolean, slashStop?: boolean): string;
|
|
155
155
|
/**
|
|
156
156
|
* Escapes special characters in a string for use in a regular expression.
|
|
157
157
|
* @param string
|
|
@@ -44,5 +44,7 @@ export declare const NavigationHelpers: {
|
|
|
44
44
|
label: string;
|
|
45
45
|
icon?: string;
|
|
46
46
|
};
|
|
47
|
+
getUrlOrigin(url: string): string | undefined;
|
|
48
|
+
findViewGroup(node: Node, originalNode?: Node): string | undefined;
|
|
47
49
|
openExternalLink(externalLink: ExternalLink, pathParams?: Record<string, any>): void;
|
|
48
50
|
};
|
|
@@ -48,6 +48,7 @@ export declare const RoutingHelpers: {
|
|
|
48
48
|
* @returns a string with the route or undefined, if node is not an ancestor of path-node
|
|
49
49
|
*/
|
|
50
50
|
mapPathToNode(path: string, node: Node): string | undefined;
|
|
51
|
+
resolveNodeLabel(node: Node, luigi: Luigi): string;
|
|
51
52
|
getNodeLabel(node: Node, luigi: Luigi): Promise<string>;
|
|
52
53
|
/**
|
|
53
54
|
* Retrieves the content view parameter prefix from the Luigi configuration.
|
|
@@ -422,7 +423,7 @@ export declare const RoutingHelpers: {
|
|
|
422
423
|
* @param luigi - The Luigi instance used to access i18n, routing, and configuration.
|
|
423
424
|
* @returns The fully resolved view URL string, or an empty string if `node.viewUrl` is not defined.
|
|
424
425
|
*/
|
|
425
|
-
substituteViewUrl(node: Node, pathParams: Record<string, string>, nodeParams: Record<string, any
|
|
426
|
+
substituteViewUrl(node: Node, pathParams: Record<string, string>, nodeParams: Record<string, any> | undefined, luigi: Luigi): string;
|
|
426
427
|
/**
|
|
427
428
|
* Returns the viewUrl with current locale, e.g. luigi/{i18n.currentLocale}/ -> luigi/en
|
|
428
429
|
* if viewUrl contains {i18n.currentLocale} term, it will be replaced by current locale
|