@luigi-project/client 2.26.1-dev.202601281005 → 2.26.1-dev.202601281416

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.
@@ -0,0 +1,889 @@
1
+ // Type definitions for Luigi Client
2
+
3
+ export as namespace LuigiClient;
4
+
5
+ export declare interface AuthData {
6
+ accessToken?: string;
7
+ accessTokenExpirationDate?: number;
8
+ idToken?: string;
9
+ [key: string]: any;
10
+ }
11
+
12
+ export declare interface ConfirmationModalSettings {
13
+ type?: string;
14
+ header?: string;
15
+ body?: string;
16
+ buttonConfirm?: string | boolean;
17
+ buttonDismiss?: string;
18
+ }
19
+
20
+ export declare interface ModalSettings {
21
+ title?: string;
22
+ size?: 'fullscreen' | 'l' | 'm' | 's';
23
+ width?: string;
24
+ height?: string;
25
+ keepPrevious?: boolean;
26
+ closebtn_data_testid?: string;
27
+ }
28
+
29
+ export declare interface SplitViewSettings {
30
+ title?: string;
31
+ size?: number;
32
+ collapsed?: boolean;
33
+ }
34
+
35
+ export enum SplitViewEvents {
36
+ 'expand',
37
+ 'collapse',
38
+ 'resize',
39
+ 'close'
40
+ }
41
+
42
+ export declare interface SplitViewInstance {
43
+ collapse: () => void;
44
+ expand: () => void;
45
+ setSize: (value: number) => void;
46
+ on: (key: SplitViewEvents, callback: () => void) => string; //
47
+ exists: () => boolean;
48
+ getSize: () => number;
49
+ isCollapsed: () => boolean;
50
+ isExpanded: () => boolean;
51
+ }
52
+
53
+ export declare interface DrawerSettings {
54
+ header?: any;
55
+ size?: 'l' | 'm' | 's' | 'xs';
56
+ backdrop?: boolean;
57
+ overlap?: boolean;
58
+ }
59
+
60
+ export declare interface Context {
61
+ authData?: AuthData;
62
+ context?: { parentNavigationContext?: string[] };
63
+ internal?: {
64
+ userSettings?: getUserSettings;
65
+ };
66
+ nodeParams?: NodeParams;
67
+ pathParams?: PathParams;
68
+ anchor?: string;
69
+ [key: string]: any;
70
+ }
71
+ export declare interface NodeParams {
72
+ [key: string]: string;
73
+ }
74
+
75
+ export declare interface ClientPermissions {
76
+ [key: string]: any;
77
+ }
78
+
79
+ export declare interface AlertSettings {
80
+ text?: string;
81
+ type: 'info' | 'success' | 'warning' | 'error';
82
+ links?: {
83
+ [key: string]: { text: string; url?: string; dismissKey?: string };
84
+ };
85
+ closeAfter?: number;
86
+ }
87
+
88
+ export declare interface PathParams {
89
+ [key: string]: string;
90
+ }
91
+
92
+ export declare interface CoreSearchParams {
93
+ [key: string]: string;
94
+ }
95
+
96
+ export declare interface RouteChangingOptions {
97
+ [key: string]: boolean;
98
+ }
99
+
100
+ export declare interface UserSettings {
101
+ [key: string]: number | string | boolean;
102
+ }
103
+
104
+ export declare interface UxManager {
105
+ /**
106
+ * Adds a backdrop to block the top and side navigation. It is based on the Fundamental UI Modal, which you can use in your micro frontend to achieve the same behavior.
107
+ * @memberof uxManager
108
+ */
109
+ addBackdrop: () => void;
110
+
111
+ /**
112
+ * Removes the backdrop.
113
+ * @memberof uxManager
114
+ */
115
+ removeBackdrop: () => void;
116
+
117
+ /**
118
+ * Adds a backdrop with a loading indicator for the micro frontend frame. This overrides the {@link navigation-parameters-reference.md#node-parameters loadingIndicator.enabled} setting.
119
+ * @memberof uxManager
120
+ */
121
+ showLoadingIndicator: () => void;
122
+
123
+ /**
124
+ * Removes the loading indicator. Use it after calling {@link #showLoadingIndicator showLoadingIndicator()} or to hide the indicator when you use the {@link navigation-parameters-reference.md#node-parameters loadingIndicator.hideAutomatically: false} node configuration.
125
+ * @memberof uxManager
126
+ */
127
+ hideLoadingIndicator: () => void;
128
+
129
+ /**
130
+ * Closes the currently opened micro frontend modal.
131
+ * @memberof uxManager
132
+ */
133
+ closeCurrentModal: () => void;
134
+
135
+ /**
136
+ * This method informs the main application that there are unsaved changes in the current view in the iframe. For example, that can be a view with form fields which were edited but not submitted.
137
+ * @param {boolean} isDirty indicates if there are any unsaved changes on the current page or in the component
138
+ * @memberof uxManager
139
+ */
140
+ setDirtyStatus: (isDirty: boolean) => void;
141
+
142
+ /**
143
+ * Shows an alert.
144
+ * @memberof uxManager
145
+ * @param {Object} settings the settings for the alert
146
+ * @param {string} settings.text the content of the alert. To add a link to the content, you have to set up the link in the `links` object. The key(s) in the `links` object must be used in the text to reference the links, wrapped in curly brackets with no spaces. If you don't specify any text, the alert is not displayed
147
+ * @param {('info'|'success'|'warning'|'error')} settings.type sets the type of alert
148
+ * @param {Object} settings.links provides links data
149
+ * @param {Object} settings.links.LINK_KEY object containing the data for a particular link. To properly render the link in the alert message refer to the description of the **settings.text** parameter
150
+ * @param {string} settings.links.LINK_KEY.text text which replaces the link identifier in the alert content
151
+ * @param {string} settings.links.LINK_KEY.url URL to navigate when you click the link. Currently, only internal links are supported in the form of relative or absolute paths
152
+ * @param {string} settings.links.LINK_KEY.dismissKey dismissKey which represents the key of the link.
153
+ * @param {number} settings.closeAfter (optional) time in milliseconds that tells Luigi when to close the Alert automatically. If not provided, the Alert will stay on until closed manually. It has to be greater than `100`
154
+ * @returns {promise} which is resolved when the alert is dismissed
155
+ * @example
156
+ * import LuigiClient from '@luigi-project/client';
157
+ * const settings = {
158
+ * text: "Ut enim ad minim veniam, {goToHome} quis nostrud exercitation ullamco {relativePath}. Duis aute irure dolor {goToOtherProject} or {neverShowItAgain}",
159
+ * type: 'info',
160
+ * links: {
161
+ * goToHome: { text: 'homepage', url: '/overview' },
162
+ * goToOtherProject: { text: 'other project', url: '/projects/pr2' },
163
+ * relativePath: { text: 'relative hide side nav', url: 'hideSideNav' },
164
+ * neverShowItAgain: { text: 'Never show it again', dismissKey: 'neverShowItAgain' }
165
+ * },
166
+ * closeAfter: 3000
167
+ * }
168
+ * LuigiClient
169
+ * .uxManager()
170
+ * .showAlert(settings)
171
+ * .then(() => {
172
+ * // Logic to execute when the alert is dismissed
173
+ * });
174
+ */
175
+ showAlert: (settings: AlertSettings) => Promise<Object>;
176
+
177
+ /**
178
+ * Shows a confirmation modal.
179
+ * @memberof uxManager
180
+ * @param {Object} settings the settings of the confirmation modal. If you don't provide any value for any of the fields, a default value is used
181
+ * @param {string} [settings.header="Confirmation"] the content of the modal header
182
+ * @param {string} [settings.body="Are you sure you want to do this?"] the content of the modal body
183
+ * @param {string} [settings.buttonConfirm="Yes"] the label for the modal confirm button
184
+ * @param {string} [settings.buttonDismiss="No"] the label for the modal dismiss button
185
+ * @returns {promise} which is resolved when accepting the confirmation modal and rejected when dismissing it
186
+ * @example
187
+ * import LuigiClient from '@luigi-project/client';
188
+ * const settings = {
189
+ * header: "Confirmation",
190
+ * body: "Are you sure you want to do this?",
191
+ * buttonConfirm: "Yes",
192
+ * buttonDismiss: "No"
193
+ * }
194
+ * LuigiClient
195
+ * .uxManager()
196
+ * .showConfirmationModal(settings)
197
+ * .then(() => {
198
+ * // Logic to execute when the confirmation modal is dismissed
199
+ * });
200
+ */
201
+ showConfirmationModal: (settings: ConfirmationModalSettings) => Promise<void>;
202
+
203
+ /**
204
+ * Gets the current locale.
205
+ * @returns {string} current locale
206
+ * @memberof uxManager
207
+ */
208
+ getCurrentLocale: () => string;
209
+
210
+ /**
211
+ * Gets the current theme.
212
+ * @returns {*} current themeObj
213
+ * @memberof uxManager
214
+ */
215
+ getCurrentTheme: () => any;
216
+
217
+ /**
218
+ * Sets current locale to the specified one.
219
+ *
220
+ * **NOTE:** this must be explicitly allowed on the navigation node level by setting `clientPermissions.changeCurrentLocale` to `true`. (See {@link navigation-parameters-reference.md Node parameters}.)
221
+ *
222
+ * @param {string} locale locale to be set as the current locale
223
+ * @memberof uxManager
224
+ */
225
+ setCurrentLocale: (locale: string) => void;
226
+
227
+ /**
228
+ * Checks if the current micro frontend is displayed inside a split view
229
+ * @returns {boolean} indicating if it is loaded inside a split view
230
+ * @memberof uxManager
231
+ * @since 0.6.0
232
+ */
233
+ isSplitView: () => boolean;
234
+
235
+ /**
236
+ * Checks if the current micro frontend is displayed inside a modal
237
+ * @returns {boolean} indicating if it is loaded inside a modal
238
+ * @memberof uxManager
239
+ * @since 0.6.0
240
+ */
241
+ isModal: () => boolean;
242
+
243
+ /**
244
+ * Checks if the current micro frontend is displayed inside a drawer
245
+ * @returns {boolean} indicating if it is loaded inside a drawer
246
+ * @memberof uxManager
247
+ * @since 1.26.0
248
+ */
249
+ isDrawer: () => boolean;
250
+
251
+ /**
252
+ * Gets the CSS variables from Luigi Core with their key and value.
253
+ * @returns {Object} CSS variables with their key and value.
254
+ * @memberof uxManager
255
+ * @since 2.3.0
256
+ * @example LuigiClient.uxManager().getCSSVariables();
257
+ */
258
+ getCSSVariables: () => Object;
259
+
260
+ /**
261
+ * Adds the CSS variables from Luigi Core in a <style> tag to the document <head> section.
262
+ * @memberof uxManager
263
+ * @since 2.3.0
264
+ * @example LuigiClient.uxManager().applyCSS();
265
+ */
266
+ applyCSS: () => void;
267
+ }
268
+
269
+ export declare interface LinkManager {
270
+ /**
271
+ * Sets the current navigation context which is then used by the `navigate` function. This has to be a parent navigation context, it is not possible to use the child navigation contexts.
272
+ * @memberof linkManager
273
+ * @returns {linkManager} link manager instance
274
+ * @example
275
+ * LuigiClient.linkManager().fromClosestContext().navigate('/users/groups/stakeholders')
276
+ */
277
+ fromClosestContext: () => this;
278
+
279
+ /**
280
+ * Sets the current navigation context to that of a specific parent node which has the {@link navigation-configuration.md navigationContext} field declared in the navigation configuration. This navigation context is then used by the `navigate` function.
281
+ * @memberof linkManager
282
+ * @param {string} navigationContext
283
+ * @returns {linkManager} link manager instance
284
+ * @example
285
+ * LuigiClient.linkManager().fromContext('project').navigate('/settings')
286
+ */
287
+ fromContext: (navigationContext: string) => this;
288
+
289
+ /**
290
+ * Enables navigating to sibling nodes without knowing the absolute path
291
+ * @memberof linkManager
292
+ * @returns {linkManager} link manager instance
293
+ * @since 1.0.1
294
+ * @example
295
+ * LuigiClient.linkManager().fromParent().navigate('/sibling')
296
+ */
297
+ fromParent: () => this;
298
+
299
+ /**
300
+ * Sets the current navigation base to the parent node that is defined as virtualTree. This method works only when the currently active micro frontend is inside a virtualTree.
301
+ * @memberof linkManager
302
+ * @returns {linkManager} link manager instance
303
+ * @since 1.0.1
304
+ * @example
305
+ * LuigiClient.linkManager().fromVirtualTreeRoot().navigate('/users/groups/stakeholders')
306
+ */
307
+ fromVirtualTreeRoot: () => this;
308
+
309
+ /**
310
+ * Discards the active view and navigates back to the last visited view. Works with preserved views, and also acts as the substitute of the browser **back** button. **goBackContext** is only available when using preserved views.
311
+ * @memberof linkManager
312
+ * @param {any} goBackValue data that is passed in the **goBackContext** field to the last visited view when using preserved views
313
+ * @example
314
+ * LuigiClient.linkManager().goBack({ foo: 'bar' });
315
+ * LuigiClient.linkManager().goBack(true);
316
+ */
317
+ goBack: (goBackValue: any) => void;
318
+
319
+ /**
320
+ * Checks if there is one or more preserved views. You can use it to show a **back** button.
321
+ * @memberof linkManager
322
+ * @returns {boolean} indicating if there is a preserved view you can return to
323
+ */
324
+ hasBack: () => boolean;
325
+
326
+ /**
327
+ * Navigates to the given path in the application hosted by Luigi. It contains either a full absolute path or a relative path without a leading slash that uses the active route as a base. This is the standard navigation.
328
+ * @memberof linkManager
329
+ * @param {string} path path to be navigated to
330
+ * @param {string} sessionId current Luigi **sessionId**
331
+ * @param {boolean} preserveView preserve a view by setting it to `true`. It keeps the current view opened in the background and opens the new route in a new frame. Use the {@link #goBack goBack()} function to navigate back. You can use this feature across different levels. Preserved views are discarded as soon as you use the standard {@link #navigate navigate()} function instead of {@link #goBack goBack()}
332
+ * @param {Object} modalSettings opens a view in a modal. Use these settings to configure the modal's title and size
333
+ * @param {string} modalSettings.title modal title. By default, it is the node label. If there is no label, it is left empty
334
+ * @param {('fullscreen'|'l'|'m'|'s')} [modalSettings.size="l"] size of the modal
335
+ * @param {string} modalSettings.width updates the `width` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'.
336
+ * @param {string} modalSettings.height updates the `height` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'.
337
+ * @param {boolean} modalSettings.keepPrevious Lets you open multiple modals. Keeps the previously opened modal and allows to open another modal on top of the previous one. By default the previous modals are discarded.
338
+ * @param {string} modalSettings.closebtn_data_testid lets you specify a `data_testid` for the close button. Default value is `lui-modal-index-0`. If multiple modals are opened the index will be increased per modal.
339
+ * @param {Object} splitViewSettings opens a view in a split view. Use these settings to configure the split view's behaviour
340
+ * @param {string} splitViewSettings.title split view title. By default, it is the node label. If there is no label, it is left empty
341
+ * @param {number} [splitViewSettings.size=40] height of the split view in percent
342
+ * @param {boolean} [splitViewSettings.collapsed=false] creates split view but leaves it closed initially
343
+ * @example
344
+ * LuigiClient.linkManager().navigate('/overview')
345
+ * LuigiClient.linkManager().navigate('users/groups/stakeholders')
346
+ * LuigiClient.linkManager().navigate('/settings', null, true) // preserve view
347
+ * LuigiClient.linkManager().navigate('#?intent=Sales-order?id=13') // intent navigation
348
+ */
349
+ navigate: (path: string, sessionId?: string, preserveView?: boolean, modalSettings?: ModalSettings) => void;
350
+
351
+ /**
352
+ * Offers an alternative way of navigating with intents. This involves specifying a semanticSlug and an object containing
353
+ * parameters.
354
+ * This method internally generates a URL of the form `#?intent=<semantic object>-<action>?<param_name>=<param_value>` through the given
355
+ * input arguments. This then follows a call to the original `linkManager.navigate(...)` function.
356
+ * Consequently, the following calls shall have the exact same effect:
357
+ * - linkManager().navigateToIntent('Sales-settings', {project: 'pr2', user: 'john'})
358
+ * - linkManager().navigate('/#?intent=Sales-settings?project=pr2&user=john')
359
+ * @param {string} semanticSlug concatenation of semantic object and action connected with a dash (-), i.e.: `<semanticObject>-<action>`
360
+ * @param {Object} params an object representing all the parameters passed, i.e.: `{param1: '1', param2: 2, param3: 'value3'}`.
361
+ * @example
362
+ * LuigiClient.linkManager().navigateToIntent('Sales-settings', {project: 'pr2', user: 'john'})
363
+ * LuigiClient.linkManager().navigateToIntent('Sales-settings')
364
+ */
365
+ navigateToIntent: (semanticSlug: string, params?: Object) => void;
366
+
367
+ /** @lends linkManager */
368
+ /**
369
+ * Checks if the path you can navigate to exists in the main application. For example, you can use this helper method conditionally to display a DOM element like a button.
370
+ * @memberof linkManager
371
+ * @param {string} path path which existence you want to check
372
+ * @returns {promise} a promise which resolves to a Boolean variable specifying whether the path exists or not
373
+ * @example
374
+ * let pathExists;
375
+ * LuigiClient
376
+ * .linkManager()
377
+ * .pathExists('projects/pr2')
378
+ * .then(
379
+ * (pathExists) => { }
380
+ * );
381
+ */
382
+ pathExists: (path: string) => Promise<boolean>;
383
+
384
+ /**
385
+ * Sends node parameters to the route. The parameters are used by the `navigate` function. Use it optionally in combination with any of the navigation functions and receive it as part of the context object in Luigi Client.
386
+ * @memberof linkManager
387
+ * @param {Object} nodeParams
388
+ * @returns {linkManager} link manager instance
389
+ * @example
390
+ * LuigiClient.linkManager().withParams({foo: "bar"}).navigate("path")
391
+ *
392
+ * // Can be chained with context setting functions such as:
393
+ * LuigiClient.linkManager().fromContext("currentTeam").withParams({foo: "bar"}).navigate("path")
394
+ */
395
+ withParams: (nodeParams: NodeParams) => this;
396
+
397
+ /**
398
+ * Sets options to customise route changing behaviour. The parameters are used by the `navigate` function. Use it optionally in combination with any of the navigation functions and receive it as part of the context object in Luigi Client.
399
+ * @memberof linkManager
400
+ * @param {Object} options navigation options
401
+ * @param {boolean} options.preventHistoryEntry By default, it is set to `false`. If it is set to `true`, there is no browser history being kept.
402
+ * @param {boolean} options.preventContextUpdate By default, it is set to `false`. If it is set to `true`, there is no context update being triggered.
403
+ * @returns {linkManager} link manager instance
404
+ * @since 1.25.0
405
+ * @example
406
+ * LuigiClient.linkManager().withOptions(
407
+ * { preventContextUpdate:true, preventHistoryEntry: true }
408
+ * ).navigate('/overview')
409
+ */
410
+ withOptions: (options: RouteChangingOptions) => this;
411
+
412
+ /**
413
+ * Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the modal is `l`, which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions.
414
+ * @memberof linkManager
415
+ * @param {string} path navigation path
416
+ * @param {Object} [modalSettings] opens a view in a modal. Use these settings to configure the modal's title and size
417
+ * @param {string} modalSettings.title modal title. By default, it is the node label. If there is no label, it is left empty
418
+ * @param {('fullscreen'|'l'|'m'|'s')} [modalSettings.size="l"] size of the modal
419
+ * @param {string} modalSettings.width updates the `width` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'.
420
+ * @param {string} modalSettings.height updates the `height` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'.
421
+ * @param {boolean} modalSettings.keepPrevious Lets you open multiple modals. Keeps the previously opened modal and allows to open another modal on top of the previous one. By default the previous modals are discarded.
422
+ * @param {string} modalSettings.closebtn_data_testid lets you specify a `data_testid` for the close button. Default value is `lui-modal-index-0`. If multiple modals are opened the index will be increased per modal.
423
+ * @returns {promise} which is resolved when closing the modal. By using LuigiClient.linkManager().goBack({ foo: 'bar' }) to close the modal you have access to the `goBackContext` when the promise will be resolved.
424
+ * @example
425
+ * LuigiClient.linkManager().openAsModal('projects/pr1/users', {title:'Users', size:'m'}).then((res) => {
426
+ * // Logic to execute when the modal will be closed
427
+ * console.log(res.data) //=> {foo: 'bar'}
428
+ * });
429
+ */
430
+ openAsModal: (nodepath: string, modalSettings?: ModalSettings) => Promise<void>;
431
+
432
+ /**
433
+ * Updates the current title and size of a modal. If `routing.showModalPathInUrl` is set to `true`, the URL will be updated with the modal settings data.
434
+ * In addition, you can specify if a new history entry will be created with the updated URL.
435
+ * @memberof linkManager
436
+ * @param {Object} updatedModalSettings possibility to update the active modal.
437
+ * @param {string} updatedModalSettings.title update the `title` of the active modal.
438
+ * @param {string} updatedModalSettings.size update the `size` of the active modal.
439
+ * @param {string} updatedModalSettings.width updates the `width` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'.
440
+ * @param {string} updatedModalSettings.height updates the `height` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'.
441
+ * @param {boolean} addHistoryEntry adds an entry in the history, by default it's `false`.
442
+ * @example
443
+ * LuigiClient.linkManager().updateModalSettings({title:'LuigiModal', size:'l'});
444
+ */
445
+ updateModalSettings: (updatedModalSettings: Object, addHistoryEntry?: boolean) => void;
446
+
447
+ /**
448
+ * Opens a view in a split view. You can specify the split view's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the split view is `40`, which means 40% height of the split view.
449
+ * @memberof linkManager
450
+ * @param {string} path navigation path
451
+ * @param {Object} splitViewSettings opens a view in a split view. Use these settings to configure the split view's behaviour
452
+ * @param {string} splitViewSettings.title split view title. By default, it is the node label. If there is no label, it is left empty
453
+ * @param {number} [splitViewSettings.size=40] height of the split view in percent
454
+ * @param {boolean} [splitViewSettings.collapsed=false] opens split view in collapsed state
455
+ * @returns {Object} instance of the SplitView. It provides Event listeners and you can use the available functions to control its behavior.
456
+ * @see {@link splitView} for further documentation about the returned instance
457
+ * @since 0.6.0
458
+ * @example
459
+ * const splitViewHandle = LuigiClient.linkManager().openAsSplitView('projects/pr1/logs', {title: 'Logs', size: 40, collapsed: true});
460
+ */
461
+ openAsSplitView: (path: string, splitViewSettings?: SplitViewSettings) => SplitViewInstance;
462
+
463
+ /**
464
+ * Opens a view in a drawer. You can specify if the drawer has a header, if a backdrop is active in the background and configure the size of the drawer. By default the header is shown. The backdrop is not visible and has to be activated. The size of the drawer is by default set to `s` which means 25% of the micro frontend size. You can also use `l`(75%), `m`(50%) or `xs`(15.5%). Optionally, use it in combination with any of the navigation functions.
465
+ * @memberof linkManager
466
+ * @param {string} path navigation path
467
+ * @param {Object} [drawerSettings] opens a view in a drawer. Use these settings to configure if the drawer has a header, backdrop and size.
468
+ * @param {any} drawerSettings.header By default, the header is visible. Title is node label and 'x' is displayed to close the drawer view. The header could also be an object with a `title` attribute to specify an own title for the drawer component.
469
+ * @param {boolean} drawerSettings.backdrop By default, it is set to `false`. If it is set to `true` the rest of the screen has a backdrop.
470
+ * @param {('l'|'m'|'s'|'xs')} [drawerSettings.size="s"] size of the drawer
471
+ * @since 1.6.0
472
+ * @example
473
+ * LuigiClient.linkManager().openAsDrawer('projects/pr1/drawer', {header:true, backdrop:true, size:'s'});
474
+ * LuigiClient.linkManager().openAsDrawer('projects/pr1/drawer', {header:{title:'My drawer component'}, backdrop:true, size:'xs'});
475
+ */
476
+ openAsDrawer: (nodepath: string, drawerSettings?: DrawerSettings) => void;
477
+
478
+ /**
479
+ * Disables the navigation handling for a single navigation request
480
+ * It prevents Luigi Core from handling url change after `navigate()`.
481
+ * Used for auto-navigation
482
+ * @since 0.7.7
483
+ * @example
484
+ * LuigiClient.linkManager().withoutSync().navigate('/projects/xy/foobar');
485
+ * LuigiClient.linkManager().withoutSync().fromClosestContext().navigate('settings');
486
+ */
487
+ withoutSync: () => this;
488
+
489
+ /**
490
+ * Updates path of the modalPathParam when internal navigation occurs
491
+ * @since 1.21.0
492
+ * @example
493
+ * LuigiClient.linkManager().withoutSync().updateModalPathInternalNavigation('/projects/xy/foobar');
494
+ */
495
+ updateModalPathInternalNavigation: (path: string, modalSettings?: Object, addHistoryEntry?: boolean) => void;
496
+
497
+ /**
498
+ * Enables navigating to a new tab.
499
+ * @since 1.16.0
500
+ * @example
501
+ * LuigiClient.linkManager().newTab().navigate('/projects/xy/foobar');
502
+ */
503
+ newTab: () => this;
504
+
505
+ /**
506
+ * Keeps the URL's query parameters for a navigation request.
507
+ * @param {boolean} preserve By default, it is set to `false`. If it is set to `true`, the URL's query parameters will be kept after navigation.
508
+ * @since 1.19.0
509
+ * @example
510
+ * LuigiClient.linkManager().preserveQueryParams(true).navigate('/projects/xy/foobar');
511
+ * LuigiClient.linkManager().preserveQueryParams(false).navigate('/projects/xy/foobar');
512
+ */
513
+ preserveQueryParams: (preserve: boolean) => this;
514
+
515
+ /**
516
+ * Gets the luigi route associated with the current micro frontend.
517
+ * @returns {promise} a promise which resolves to a String value specifying the current luigi route
518
+ * @since 1.23.0
519
+ * @example
520
+ * LuigiClient.linkManager().getCurrentRoute();
521
+ * LuigiClient.linkManager().fromContext('project').getCurrentRoute();
522
+ * LuigiClient.linkManager().fromVirtualTreeRoot().getCurrentRoute();
523
+ */
524
+ getCurrentRoute: () => Promise<string>;
525
+ }
526
+
527
+ export declare interface StorageManager {
528
+ /**
529
+ * Store an item for a specific key.
530
+ * @memberof storageManager
531
+ * @param {string} key: used to identify the item
532
+ * @param {Object} value: item to be stored; object must be stringifyable
533
+ * @returns {Promise<void>} resolves an empty value when storage operation is over; it will launch an error if storage is no supported, value cannot be stringify or you are using a luigi reserved key
534
+ * @example
535
+ * LuigiClient.storageManager().setItem('keyExample','valueExample').then(() => console.log('Value stored'))
536
+ * @since 1.6.0
537
+ */
538
+ setItem: (key: string, value: Object) => Promise<void>;
539
+
540
+ /**
541
+ * Retrieve an item for a specific key.
542
+ * @memberof storageManager
543
+ * @param {string} key: used to identify the item
544
+ * @returns {Promise<Object>} resolves item retrieved from storage; it will launch an error if storage is no supported
545
+ * @since 1.6.0
546
+ * @example
547
+ * LuigiClient.storageManager().getItem('keyExample').then((value) => console.log);
548
+ */
549
+ getItem: (key: string) => Promise<Object>;
550
+
551
+ /**
552
+ * Remove an item for a specific key.
553
+ * @memberof storageManager
554
+ * @param {string} key: used to identify the item
555
+ * @returns {Promise<Object>} resolves item just removed from storage; it will launch an error if storage is no supported or you are using a luigi reserved key
556
+ * @since 1.6.0
557
+ * @example
558
+ * LuigiClient.storageManager().removeItem('keyExample').then((value) => console.log(value + ' just removed')
559
+ */
560
+ removeItem: (key: string) => Promise<Object>;
561
+
562
+ /**
563
+ * Clear all the storage key/values
564
+ * @memberof storageManager
565
+ * @returns {Promise<void>} resolves when storage clear is over
566
+ * @since 1.6.0
567
+ * @example
568
+ * LuigiClient.storageManager().clear().then(() => console.log('storage cleared'))
569
+ */
570
+ clear: () => Promise<void>;
571
+
572
+ /**
573
+ * Check if a key is present in storage
574
+ * @memberof storageManager
575
+ * @param {string} key: used to identify the item
576
+ * @returns {Promise<boolean>} true if key is present, false if is not
577
+ * @since 1.6.0
578
+ * @example
579
+ * LuigiClient.storageManager().has(key).then((present) => console.log('element is present: '+present));
580
+ */
581
+ has: (key: string) => Promise<boolean>;
582
+
583
+ /**
584
+ * Retrieve all the keys used in the storage
585
+ * @memberof storageManager
586
+ * @returns {Promise<string[]>} keys currently present in the storage
587
+ * @since 1.6.0
588
+ * @example
589
+ * LuigiClient.storageManager().getAllKeys().then((keys) => console.log('keys are : '+keys));
590
+ */
591
+ getAllKeys: () => Promise<String[]>;
592
+ }
593
+
594
+ /**
595
+ * Registers a listener called with the context object and the Luigi Core domain as soon as Luigi is instantiated. Defer your application bootstrap if you depend on authentication data coming from Luigi.
596
+ * @param {Lifecycle~initListenerCallback} initFn the function that is called once Luigi is initialized, receives current context and origin as parameters
597
+ * @param {boolean} disableTpcCheck if set to `true` third party cookie check will be disabled via LuigiClient.
598
+ * @memberof Lifecycle
599
+ */
600
+ export function addInitListener(initFn: (context: Context, origin?: string) => void, disableTpcCheck?: boolean): number;
601
+ export type addInitListener = (
602
+ initFn: (context: Context, origin?: string) => void,
603
+ disableTpcCheck?: boolean
604
+ ) => number;
605
+
606
+ /**
607
+ * Callback of the addInitListener
608
+ * @callback Lifecycle~initListenerCallback
609
+ * @param {Object} context current context data
610
+ * @param {string} origin Luigi Core URL
611
+ */
612
+ /**
613
+ * Removes an init listener.
614
+ * @param {string} id the id that was returned by the `addInitListener` function.
615
+ * @memberof Lifecycle
616
+ */
617
+ export function removeInitListener(id: number): boolean;
618
+ export type removeInitListener = (id: number) => boolean;
619
+
620
+ /**
621
+ * Registers a listener called with the context object when the URL is changed. For example, you can use this when changing environments in a context switcher in order for the micro frontend to do an API call to the environment picked.
622
+ * @param {function} contextUpdatedFn the listener function called each time Luigi context changes
623
+ * @memberof Lifecycle
624
+ */
625
+ export function addContextUpdateListener(contextUpdatedFn: (context: Context) => void): string;
626
+ export type addContextUpdateListener = (contextUpdatedFn: (context: Context) => void) => string;
627
+
628
+ /**
629
+ * Removes a context update listener.
630
+ * @param {string} id the id that was returned by the `addContextUpdateListener` function
631
+ * @memberof Lifecycle
632
+ */
633
+ export function removeContextUpdateListener(id: string): boolean;
634
+ export type removeContextUpdateListener = (id: string) => boolean;
635
+
636
+ /**
637
+ * Registers a listener called upon micro frontend inactivity. This happens when a new micro frontend gets shown while keeping the old one cached.
638
+ * Gets called when:
639
+ * - navigating with **preserveView**
640
+ * - navigating from or to a **viewGroup**
641
+ *
642
+ * Does not get called when navigating normally, or when `openAsModal` or `openAsSplitView` are used.
643
+ * @param {function} inactiveFn the listener function called each time a micro frontend turns into an inactive state
644
+ * @memberof Lifecycle
645
+ */
646
+ export function addInactiveListener(inactiveFn: () => void): string;
647
+ export type addInactiveListener = (inactiveFn: () => void) => string;
648
+
649
+ /**
650
+ * Removes a listener for inactive micro frontends.
651
+ * @param {string} id the id that was returned by the `addInactiveListener` function
652
+ * @memberof Lifecycle
653
+ */
654
+ export function removeInactiveListener(id: string): boolean;
655
+ export type removeInactiveListener = (id: string) => boolean;
656
+
657
+ /**
658
+ * Registers a listener called when the micro frontend receives a custom message.
659
+ * @param {string} customMessageId the custom message id
660
+ * @param {Lifecycle~customMessageListenerCallback} customMessageListener the function that is called when the micro frontend receives the corresponding event
661
+ * @memberof Lifecycle
662
+ * @since 0.6.2
663
+ */
664
+ export function addCustomMessageListener(
665
+ customMessageId: string,
666
+ customMessageListener: (customMessage: Object, listenerId: string) => void
667
+ ): string;
668
+ export type addCustomMessageListener = (
669
+ customMessageId: string,
670
+ customMessageListener: (customMessage: Object, listenerId: string) => void
671
+ ) => string;
672
+
673
+ /**
674
+ * Callback of the customMessageListener
675
+ * @callback Lifecycle~customMessageListenerCallback
676
+ * @param {Object} customMessage custom message object
677
+ * @param {string} customMessage.id message id
678
+ * @param {*} customMessage.MY_DATA_FIELD any other message data field
679
+ * @param {string} listenerId custom message listener id to be used for unsubscription
680
+ */
681
+ /**
682
+ * Removes a custom message listener.
683
+ * @param {string} id the id that was returned by the `addInitListener` function
684
+ * @memberof Lifecycle
685
+ * @since 0.6.2
686
+ */
687
+ export function removeCustomMessageListener(id: string): boolean;
688
+ export type removeCustomMessageListener = (id: string) => boolean;
689
+
690
+ /**
691
+ * Returns the currently valid access token.
692
+ * @returns {string} current access token
693
+ * @memberof Lifecycle
694
+ */
695
+ export function getToken(): AuthData['accessToken'];
696
+ export type getToken = () => AuthData['accessToken'];
697
+
698
+ /**
699
+ * Returns the context object. Typically it is not required as the {@link #addContextUpdateListener addContextUpdateListener()} receives the same values.
700
+ * @returns {Object} current context data
701
+ * @memberof Lifecycle
702
+ */
703
+ export function getEventData(): Context;
704
+ export type getEventData = () => Context;
705
+
706
+ /**
707
+ * Returns the context object. It is an alias function for getEventData().
708
+ * @returns {Object} current context data
709
+ * @memberof Lifecycle
710
+ */
711
+ export function getContext(): Context;
712
+ export type getContext = () => Context;
713
+ /**
714
+ * Sets node parameters in Luigi Core. The parameters will be added to the URL.
715
+ * @param {Object} params
716
+ * @memberof Lifecycle
717
+ * @example
718
+ * LuigiClient.addNodeParams({luigi:'rocks'});
719
+ * LuigiClient.addNodeParams({luigi:'rocks', false});
720
+ */
721
+ export function addNodeParams(params: NodeParams, keepBrowserHistory: Boolean): void;
722
+ export type addNodeParams = (params: NodeParams, keepBrowserHistory: Boolean) => void;
723
+
724
+ /**
725
+ * Returns the node parameters of the active URL.
726
+ * Node parameters are defined like URL query parameters but with a specific prefix allowing Luigi to pass them to the micro frontend view. The default prefix is **~** and you can use it in the following way: `https://my.luigi.app/home/products?~sort=asc&~page=3`.
727
+ * <!-- add-attribute:class:warning -->
728
+ * > **NOTE:** some special characters (`<`, `>`, `"`, `'`, `/`) in node parameters are HTML-encoded.
729
+ * @param {boolean} shouldDesanitise defines whether the specially encoded characters should be desanitised
730
+ * @returns {Object} node parameters, where the object property name is the node parameter name without the prefix, and its value is the value of the node parameter. For example `{sort: 'asc', page: 3}`
731
+ * @memberof Lifecycle
732
+ * @example
733
+ * const nodeParams = LuigiClient.getNodeParams()
734
+ * const nodeParams = LuigiClient.getNodeParams(true)
735
+ */
736
+ export function getNodeParams(shouldDesanitise?: boolean): NodeParams;
737
+ export type getNodeParams = (shouldDesanitise?: boolean) => NodeParams;
738
+
739
+ /**
740
+ * @returns {Object} node parameters, where the object property name is the node parameter name without the prefix, and its value is the value of the node parameter. For example `{sort: 'asc', page: 3}`
741
+ * @memberof Lifecycle
742
+ */
743
+ export function getActiveFeatureToggles(): Array<String>;
744
+ export type getActiveFeatureToggles = () => Array<String>;
745
+
746
+ /**
747
+ * Returns the dynamic path parameters of the active URL.
748
+ * Path parameters are defined by navigation nodes with a dynamic **pathSegment** value starting with **:**, such as **productId**.
749
+ * All path parameters in the current navigation path (as defined by the active URL) are returned.
750
+ * <!-- add-attribute:class:warning -->
751
+ * > **NOTE:** some special characters (`<`, `>`, `"`, `'`, `/`) in path parameters are HTML-encoded.
752
+ * @returns {Object} path parameters, where the object property name is the path parameter name without the prefix, and its value is the actual value of the path parameter. For example ` {productId: 1234, ...}`
753
+ * @memberof Lifecycle
754
+ */
755
+ export function getPathParams(): PathParams;
756
+ export type getPathParams = () => PathParams;
757
+
758
+ /**
759
+ * Returns the anchor of active URL.
760
+ * @returns {String} the anchor string
761
+ * @memberof Lifecycle
762
+ * @example
763
+ * LuigiClient.getAnchor();
764
+ */
765
+ export function getAnchor(): String;
766
+ export type getAnchor = () => String;
767
+
768
+ /**
769
+ * Sets the anchor of active URL.
770
+ * @param {string} anchor
771
+ * @memberof Lifecycle
772
+ * @example
773
+ * LuigiClient.setAnchor('luigi');
774
+ */
775
+ export function setAnchor(anchor: String): void;
776
+ export type setAnchor = (anchor: String) => void;
777
+
778
+ /**
779
+ * Allows you to change node labels within the same {@link navigation-advanced.md#view-groups view group}, e.g. in your node config: `label: 'my Node {viewGroupData.vg1}'`.
780
+ * @param {Object} value a data object containing the view group name and desired label
781
+ * @memberof Lifecycle
782
+ * @example
783
+ * LuigiClient.setViewGroupData({'vg1':' Luigi rocks!'})
784
+ */
785
+ export function setViewGroupData(value: Object): void;
786
+ export type setViewGroupData = (value: Object) => void;
787
+
788
+ /**
789
+ * Read search query parameters which are sent from Luigi core
790
+ * @memberof Lifecycle
791
+ * @returns core search query parameters
792
+ * @example
793
+ * LuigiClient.getCoreSearchParams();
794
+ */
795
+ export function getCoreSearchParams(): CoreSearchParams;
796
+ export type getCoreSearchParams = () => CoreSearchParams;
797
+
798
+ /**
799
+ * Sends search query parameters to Luigi core. If it is allowed on node level it will be added to url.
800
+ * @param {Object} searchParams
801
+ * @param {boolean} keepBrowserHistory
802
+ * @memberof Lifecycle
803
+ * @example
804
+ * LuigiClient.addCoreSearchParams({luigi:'rocks'});
805
+ * LuigiClient.addCoreSearchParams({luigi:'rocks', false});
806
+ */
807
+ export function addCoreSearchParams(searchParams: CoreSearchParams, keepBrowserHistory: Boolean): void;
808
+ export type addCoreSearchParams = (searchParams: CoreSearchParams, keepBrowserHistory: Boolean) => void;
809
+
810
+ /**
811
+ * Returns the current client permissions as specified in the navigation node or an empty object. For details, see [Node parameters](navigation-parameters-reference.md).
812
+ * @returns {Object} client permissions as specified in the navigation node
813
+ * @memberof Lifecycle
814
+ */
815
+ export function getClientPermissions(): ClientPermissions;
816
+ export type getClientPermissions = () => ClientPermissions;
817
+
818
+ /**
819
+ * When the micro frontend is not embedded in the Luigi Core application and there is no init handshake you can set the target origin that is used in postMessage function calls by Luigi Client.
820
+ * @param {string} origin target origin
821
+ * @memberof Lifecycle
822
+ * @since 0.7.3
823
+ */
824
+ export function setTargetOrigin(targetOrigin: string): void;
825
+ export type setTargetOrigin = (targetOrigin: string) => void;
826
+
827
+ /**
828
+ * Sends a custom message to the Luigi Core application.
829
+ * @param {Object} message an object containing data to be sent to the Luigi Core to process it further. This object is set as an input parameter of the custom message listener on the Luigi Core side
830
+ * @param {string} message.id a string containing the message id
831
+ * @param {*} message.MY_DATA_FIELD any other message data field
832
+ * @example
833
+ * import LuigiClient from '@luigi-project/client';
834
+ * LuigiClient.sendCustomMessage({id: 'environment.created', production: false})
835
+ * @memberof Lifecycle
836
+ * @since 0.6.2
837
+ */
838
+ export function sendCustomMessage(message: object): void;
839
+ export type sendCustomMessage = (message: object) => void;
840
+
841
+ /**
842
+ * The Link Manager allows you to navigate to another route. Use it instead of an internal router to:
843
+ - Provide routing inside micro frontends.
844
+ - Reflect the route.
845
+ - Keep the navigation state in Luigi.
846
+ * @name linkManager
847
+ */
848
+ export function linkManager(): LinkManager;
849
+ export type linkManager = () => LinkManager;
850
+
851
+ /**
852
+ * Use the UX Manager to manage the appearance features in Luigi.
853
+ * @name uxManager
854
+ */
855
+ export function uxManager(): UxManager;
856
+ export type uxManager = () => UxManager;
857
+
858
+ /**
859
+ * Use the StorageManager to store/load/remove items from/to local storage.
860
+ * @name storageManager
861
+ * @since 1.6.0
862
+ */
863
+ export function storageManager(): StorageManager;
864
+ export type storageManager = () => StorageManager;
865
+ /**
866
+ * Returns the current user settings.
867
+ * @returns {Object} current user settings
868
+ * @since 1.7.1
869
+ * @memberof Lifecycle
870
+ */
871
+ export function getUserSettings(): UserSettings;
872
+ export type getUserSettings = () => UserSettings;
873
+
874
+ /**
875
+ * Check if LuigiClient is initialized
876
+ * @returns {boolean} client initialized state
877
+ * @since 1.12.0
878
+ * @memberof Lifecycle
879
+ */
880
+ export function isLuigiClientInitialized(): boolean;
881
+ export type isLuigiClientInitialized = () => boolean;
882
+
883
+ /**
884
+ * Starts the handshake with Luigi Core and thereafter resulting in initialization of Luigi Client. It is always ran by default when importing luigi-client package in your micro frontend. Note that when using 'defer-luigi-init' to defer default initialization you will need to initialize the handshake using this function manually wherever needed.
885
+ * @since 1.12.0
886
+ * @memberof Lifecycle
887
+ */
888
+ export function luigiClientInit(): void;
889
+ export type luigiClientInit = () => void;
@@ -790,7 +790,7 @@ class LifecycleManager extends LuigiClientBase {
790
790
  });
791
791
  }
792
792
  }
793
- const lifecycleManager = new LifecycleManager();
793
+ const lifecycleManager$1 = new LifecycleManager();
794
794
 
795
795
  /**
796
796
  * @summary Split view allows to open a micro frontend in a split screen in the lower part of the content area. Open it by calling `const splitViewHandle = LuigiClient.linkManager().openAsSplitView`. At a given time, you can open only one split view. It closes automatically when you navigate to a different route. When you call `handle.collapse()`, the split view gets destroyed. It recreates when you use `handle.expand()`. `openAsSplitView` returns an instance of the split view handle. The functions, actions, and event handlers listed below allow you to control and manage the split view.
@@ -974,7 +974,7 @@ class splitViewHandle extends LuigiClientBase {
974
974
  * @name linkManager
975
975
  * @class
976
976
  */
977
- class linkManager extends LuigiClientBase {
977
+ let linkManager$1 = class linkManager extends LuigiClientBase {
978
978
  /**
979
979
  * @private
980
980
  */
@@ -1496,7 +1496,7 @@ class linkManager extends LuigiClientBase {
1496
1496
 
1497
1497
  return currentRoutePromise[currentId];
1498
1498
  }
1499
- }
1499
+ };
1500
1500
 
1501
1501
  /**
1502
1502
  * @summary Use the UX Manager to manage the appearance features in Luigi.
@@ -1509,9 +1509,9 @@ class UxManager extends LuigiClientBase {
1509
1509
  constructor() {
1510
1510
  super();
1511
1511
  helpers.addEventListener('luigi.current-locale-changed', (e) => {
1512
- if (e.data.currentLocale && lifecycleManager.currentContext?.internal) {
1513
- lifecycleManager.currentContext.internal.currentLocale = e.data.currentLocale;
1514
- lifecycleManager._notifyUpdate();
1512
+ if (e.data.currentLocale && lifecycleManager$1.currentContext?.internal) {
1513
+ lifecycleManager$1.currentContext.internal.currentLocale = e.data.currentLocale;
1514
+ lifecycleManager$1._notifyUpdate();
1515
1515
  }
1516
1516
  });
1517
1517
  }
@@ -1710,7 +1710,7 @@ class UxManager extends LuigiClientBase {
1710
1710
  * @memberof uxManager
1711
1711
  */
1712
1712
  getCurrentLocale() {
1713
- return lifecycleManager.currentContext?.internal?.currentLocale;
1713
+ return lifecycleManager$1.currentContext?.internal?.currentLocale;
1714
1714
  }
1715
1715
 
1716
1716
  /**
@@ -1741,7 +1741,7 @@ class UxManager extends LuigiClientBase {
1741
1741
  * @since 0.6.0
1742
1742
  */
1743
1743
  isSplitView() {
1744
- return lifecycleManager.currentContext?.internal?.splitView;
1744
+ return lifecycleManager$1.currentContext?.internal?.splitView;
1745
1745
  }
1746
1746
 
1747
1747
  /**
@@ -1752,7 +1752,7 @@ class UxManager extends LuigiClientBase {
1752
1752
  * @since 0.6.0
1753
1753
  */
1754
1754
  isModal() {
1755
- return lifecycleManager.currentContext?.internal?.modal;
1755
+ return lifecycleManager$1.currentContext?.internal?.modal;
1756
1756
  }
1757
1757
 
1758
1758
  /**
@@ -1763,7 +1763,7 @@ class UxManager extends LuigiClientBase {
1763
1763
  * @since 1.26.0
1764
1764
  */
1765
1765
  isDrawer() {
1766
- return lifecycleManager.currentContext?.internal?.drawer;
1766
+ return lifecycleManager$1.currentContext?.internal?.drawer;
1767
1767
  }
1768
1768
 
1769
1769
  /**
@@ -1772,7 +1772,7 @@ class UxManager extends LuigiClientBase {
1772
1772
  * @memberof uxManager
1773
1773
  */
1774
1774
  getCurrentTheme() {
1775
- return lifecycleManager.currentContext?.internal?.currentTheme;
1775
+ return lifecycleManager$1.currentContext?.internal?.currentTheme;
1776
1776
  }
1777
1777
 
1778
1778
  /**
@@ -1784,7 +1784,7 @@ class UxManager extends LuigiClientBase {
1784
1784
  * @example LuigiClient.uxManager().getCSSVariables();
1785
1785
  */
1786
1786
  getCSSVariables() {
1787
- return lifecycleManager.currentContext?.internal?.cssVariables || {};
1787
+ return lifecycleManager$1.currentContext?.internal?.cssVariables || {};
1788
1788
  }
1789
1789
 
1790
1790
  /**
@@ -1798,7 +1798,7 @@ class UxManager extends LuigiClientBase {
1798
1798
  document.querySelectorAll('head style[luigi-injected]').forEach((luigiInjectedStyleTag) => {
1799
1799
  luigiInjectedStyleTag.remove();
1800
1800
  });
1801
- const vars = lifecycleManager.currentContext?.internal?.cssVariables;
1801
+ const vars = lifecycleManager$1.currentContext?.internal?.cssVariables;
1802
1802
  if (vars) {
1803
1803
  let cssString = ':root {\n';
1804
1804
  Object.keys(vars).forEach((key) => {
@@ -1813,7 +1813,7 @@ class UxManager extends LuigiClientBase {
1813
1813
  }
1814
1814
  }
1815
1815
  }
1816
- const uxManager = new UxManager();
1816
+ const uxManager$1 = new UxManager();
1817
1817
 
1818
1818
  const pendingOperation = new Map();
1819
1819
 
@@ -1986,7 +1986,7 @@ class StorageEventProcessor {
1986
1986
  }
1987
1987
  }
1988
1988
 
1989
- const storageManager = new StorageManager();
1989
+ const storageManager$1 = new StorageManager();
1990
1990
 
1991
1991
  /**
1992
1992
  * @name LuigiClient
@@ -2011,111 +2011,116 @@ class LuigiClient {
2011
2011
  }
2012
2012
 
2013
2013
  addInitListener(initFn, disableTpcCheck) {
2014
- return lifecycleManager.addInitListener(initFn, disableTpcCheck);
2014
+ return lifecycleManager$1.addInitListener(initFn, disableTpcCheck);
2015
2015
  }
2016
2016
  removeInitListener(id) {
2017
- return lifecycleManager.removeInitListener(id);
2017
+ return lifecycleManager$1.removeInitListener(id);
2018
2018
  }
2019
2019
  addContextUpdateListener(contextUpdatedFn) {
2020
- return lifecycleManager.addContextUpdateListener(contextUpdatedFn);
2020
+ return lifecycleManager$1.addContextUpdateListener(contextUpdatedFn);
2021
2021
  }
2022
2022
  removeContextUpdateListener(id) {
2023
- return lifecycleManager.removeContextUpdateListener(id);
2023
+ return lifecycleManager$1.removeContextUpdateListener(id);
2024
2024
  }
2025
2025
  getToken() {
2026
- return lifecycleManager.getToken();
2026
+ return lifecycleManager$1.getToken();
2027
2027
  }
2028
2028
  getEventData() {
2029
- return lifecycleManager.getEventData();
2029
+ return lifecycleManager$1.getEventData();
2030
2030
  }
2031
2031
  getContext() {
2032
- return lifecycleManager.getContext();
2032
+ return lifecycleManager$1.getContext();
2033
2033
  }
2034
2034
  addNodeParams(params, keepBrowserHistory) {
2035
- return lifecycleManager.addNodeParams(params, keepBrowserHistory);
2035
+ return lifecycleManager$1.addNodeParams(params, keepBrowserHistory);
2036
2036
  }
2037
2037
  getNodeParams(shouldDesanitise) {
2038
- return lifecycleManager.getNodeParams(shouldDesanitise);
2038
+ return lifecycleManager$1.getNodeParams(shouldDesanitise);
2039
2039
  }
2040
2040
  getActiveFeatureToggles() {
2041
- return lifecycleManager.getActiveFeatureToggles();
2041
+ return lifecycleManager$1.getActiveFeatureToggles();
2042
2042
  }
2043
2043
  getPathParams() {
2044
- return lifecycleManager.getPathParams();
2044
+ return lifecycleManager$1.getPathParams();
2045
2045
  }
2046
2046
  getCoreSearchParams() {
2047
- return lifecycleManager.getCoreSearchParams();
2047
+ return lifecycleManager$1.getCoreSearchParams();
2048
2048
  }
2049
2049
  addCoreSearchParams(searchParams, keepBrowserHistory) {
2050
- return lifecycleManager.addCoreSearchParams(searchParams, keepBrowserHistory);
2050
+ return lifecycleManager$1.addCoreSearchParams(searchParams, keepBrowserHistory);
2051
2051
  }
2052
2052
  getClientPermissions() {
2053
- return lifecycleManager.getClientPermissions();
2053
+ return lifecycleManager$1.getClientPermissions();
2054
2054
  }
2055
2055
  sendCustomMessage(message) {
2056
- return lifecycleManager.sendCustomMessage(message);
2056
+ return lifecycleManager$1.sendCustomMessage(message);
2057
2057
  }
2058
2058
  addCustomMessageListener(messageId, listener) {
2059
- return lifecycleManager.addCustomMessageListener(messageId, listener);
2059
+ return lifecycleManager$1.addCustomMessageListener(messageId, listener);
2060
2060
  }
2061
2061
  removeCustomMessageListener(listenerId) {
2062
- return lifecycleManager.removeCustomMessageListener(listenerId);
2062
+ return lifecycleManager$1.removeCustomMessageListener(listenerId);
2063
2063
  }
2064
2064
  addInactiveListener(messageId, listener) {
2065
- return lifecycleManager.addInactiveListener(messageId, listener);
2065
+ return lifecycleManager$1.addInactiveListener(messageId, listener);
2066
2066
  }
2067
2067
  removeInactiveListener(listenerId) {
2068
- return lifecycleManager.removeInactiveListener(listenerId);
2068
+ return lifecycleManager$1.removeInactiveListener(listenerId);
2069
2069
  }
2070
2070
  setTargetOrigin(origin) {
2071
- return lifecycleManager.setTargetOrigin(origin);
2071
+ return lifecycleManager$1.setTargetOrigin(origin);
2072
2072
  }
2073
2073
  getUserSettings() {
2074
- return lifecycleManager.getUserSettings();
2074
+ return lifecycleManager$1.getUserSettings();
2075
2075
  }
2076
2076
  isLuigiClientInitialized() {
2077
- return lifecycleManager.isLuigiClientInitialized();
2077
+ return lifecycleManager$1.isLuigiClientInitialized();
2078
2078
  }
2079
2079
  luigiClientInit() {
2080
- return lifecycleManager.luigiClientInit();
2080
+ return lifecycleManager$1.luigiClientInit();
2081
2081
  }
2082
2082
  getAnchor() {
2083
- return lifecycleManager.getAnchor();
2083
+ return lifecycleManager$1.getAnchor();
2084
2084
  }
2085
2085
  setAnchor(value) {
2086
- return lifecycleManager.setAnchor(value);
2086
+ return lifecycleManager$1.setAnchor(value);
2087
2087
  }
2088
2088
  setViewGroupData(value) {
2089
- return lifecycleManager.setViewGroupData(value);
2089
+ return lifecycleManager$1.setViewGroupData(value);
2090
2090
  }
2091
2091
 
2092
2092
  /**
2093
2093
  * @private
2094
2094
  */
2095
2095
  linkManager() {
2096
- return new linkManager({
2097
- currentContext: lifecycleManager.currentContext
2096
+ return new linkManager$1({
2097
+ currentContext: lifecycleManager$1.currentContext
2098
2098
  });
2099
2099
  }
2100
2100
  /**
2101
2101
  * @private
2102
2102
  */
2103
2103
  uxManager() {
2104
- return uxManager;
2104
+ return uxManager$1;
2105
2105
  }
2106
2106
  /**
2107
2107
  * @private
2108
2108
  */
2109
2109
  lifecycleManager() {
2110
- return lifecycleManager;
2110
+ return lifecycleManager$1;
2111
2111
  }
2112
2112
  /**
2113
2113
  * @private
2114
2114
  */
2115
2115
  storageManager() {
2116
- return storageManager;
2116
+ return storageManager$1;
2117
2117
  }
2118
2118
  }
2119
- var luigiClient = LuigiClient = new LuigiClient();
2119
+ var LuigiClient$1 = LuigiClient = new LuigiClient();
2120
+
2121
+ const uxManager = LuigiClient$1.uxManager;
2122
+ const linkManager = LuigiClient$1.linkManager;
2123
+ const lifecycleManager = LuigiClient$1.lifecycleManager;
2124
+ const storageManager = LuigiClient$1.storageManager;
2120
2125
 
2121
- export { luigiClient as default };
2126
+ export { LuigiClient$1 as default, lifecycleManager, linkManager, storageManager, uxManager };
package/package.json CHANGED
@@ -17,5 +17,5 @@
17
17
  "micro-frontends",
18
18
  "microfrontends"
19
19
  ],
20
- "version": "2.26.1-dev.202601281005"
20
+ "version": "2.26.1-dev.202601281416"
21
21
  }