@luigi-project/core-modular 0.0.7-dev.20260530107 → 0.0.7-dev.202605310117
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/luigi.d.ts +31 -0
- package/core-api/navigation.d.ts +9 -0
- package/luigi.js +66 -26
- package/luigi.js.map +1 -1
- package/package.json +1 -1
- package/services/dirty-status.service.d.ts +5 -1
- package/services/i18n.service.d.ts +1 -2
- package/services/modal.service.d.ts +1 -0
- package/services/navigation.service.d.ts +1 -1
- package/services/preloading.service.d.ts +58 -0
- package/services/routing.service.d.ts +12 -0
- package/types/connector.d.ts +2 -1
- package/types/navigation.d.ts +17 -3
- package/utilities/helpers/generic-helpers.d.ts +1 -1
- package/utilities/helpers/i18n-helpers.d.ts +3 -0
- package/utilities/helpers/navigation-helpers.d.ts +1 -2
- package/utilities/helpers/routing-helpers.d.ts +135 -3
package/core-api/luigi.d.ts
CHANGED
|
@@ -54,6 +54,25 @@ export declare class Luigi {
|
|
|
54
54
|
* Luigi.clearNavigationCache();
|
|
55
55
|
*/
|
|
56
56
|
clearNavigationCache(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Set the global context object and triggers the corresponding update.
|
|
59
|
+
* @param {Object} ctx - the context object to set
|
|
60
|
+
* @param {boolean} preventUpdate - if true, no view update is triggered; default is false
|
|
61
|
+
*/
|
|
62
|
+
setGlobalContext(ctx: Record<string, any>, preventUpdate?: boolean): void;
|
|
63
|
+
/**
|
|
64
|
+
* Get the global context object.
|
|
65
|
+
* @returns {Object} the global context object
|
|
66
|
+
*/
|
|
67
|
+
getGlobalContext(): Record<string, any>;
|
|
68
|
+
/**
|
|
69
|
+
* Updates the context values for all micro frontends currently in the DOM.
|
|
70
|
+
* Note: the updated context values are not persisted. The developers have to do it on their own.
|
|
71
|
+
* @param {Object} ctx - the context object to be updated
|
|
72
|
+
* @example
|
|
73
|
+
* Luigi.updateContextValues({ tenant: 'org-1', lang: 'en' });
|
|
74
|
+
*/
|
|
75
|
+
updateContextValues(ctx: Record<string, any>): void;
|
|
57
76
|
/**
|
|
58
77
|
* Reads the user settings object.
|
|
59
78
|
* You can choose a custom storage to read the user settings by implementing the `userSettings.readUserSettings` function in the settings section of the Luigi configuration.
|
|
@@ -74,6 +93,18 @@ export declare class Luigi {
|
|
|
74
93
|
* Luigi.storeUserSettings(userSettingsobject, previousUserSettingsObj);
|
|
75
94
|
*/
|
|
76
95
|
storeUserSettings(userSettingsObj: Record<string, any>, previousUserSettingsObj: Record<string, any>): Promise<any>;
|
|
96
|
+
/**
|
|
97
|
+
* Reset the current Luigi instance and initialize Luigi with the latest Luigi config.
|
|
98
|
+
* @example
|
|
99
|
+
* Luigi.reset();
|
|
100
|
+
*/
|
|
101
|
+
reset(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Unloads the current Luigi instance, which can be initialized later again by using `Luigi.setConfig({...})`
|
|
104
|
+
* @example
|
|
105
|
+
* Luigi.unload()
|
|
106
|
+
*/
|
|
107
|
+
unload(): void;
|
|
77
108
|
customMessages: () => CustomMessages;
|
|
78
109
|
i18n: () => i18nService;
|
|
79
110
|
elements: () => Elements;
|
package/core-api/navigation.d.ts
CHANGED
|
@@ -12,6 +12,15 @@ export declare class Navigation {
|
|
|
12
12
|
options: NavigationOptions;
|
|
13
13
|
constructor(luigi: Luigi);
|
|
14
14
|
navigate: (path: string, preserveView?: string, modalSettings?: ModalSettings, splitViewSettings?: any, drawerSettings?: any) => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Offers an alternative way of navigating with intents. This involves specifying a semanticSlug and an object containing parameters.
|
|
17
|
+
* @param {string} semanticSlug - concatenation of semantic object and action connected with a dash (-), i.e.: `<semanticObject>-<action>`
|
|
18
|
+
* @param {Object} params - an object representing all the parameters passed, i.e.: `{param1: '1', param2: 2, param3: 'value3'}`
|
|
19
|
+
* @example
|
|
20
|
+
* LuigiClient.linkManager().navigateToIntent('Sales-settings', {project: 'pr2', user: 'john'})
|
|
21
|
+
* LuigiClient.linkManager().navigateToIntent('Sales-settings')
|
|
22
|
+
*/
|
|
23
|
+
navigateToIntent: (semanticSlug: string, params?: {}) => void;
|
|
15
24
|
openAsModal: (path: string, modalSettings: ModalSettings, onCloseCallback?: () => void) => Promise<void>;
|
|
16
25
|
openAsDrawer: (path: string, drawerSettings: DrawerSettings, onCloseCallback?: () => void) => Promise<void>;
|
|
17
26
|
runTimeErrorHandler: (errorObj: object) => Promise<void>;
|