@luigi-project/core-modular 0.0.7-dev.20260520101 → 0.0.7-dev.202605270112

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.
@@ -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;
@@ -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>;