diff --git a/docs/luigi-client-api.md b/docs/luigi-client-api.md index bfd865e856..35224fd6a4 100644 --- a/docs/luigi-client-api.md +++ b/docs/luigi-client-api.md @@ -18,12 +18,12 @@ meta --> This document outlines the features provided by the Luigi Client API. It covers these topics: -* [Lifecycle](#lifecycle) - functions that define the lifecycle of different Luigi elements -* [Callbacks](#lifecycleinitlistenercallback) - callback functions for initListener and customMessageListener -* [Link manager](#linkmanager) - you can use the linkManager instead of an internal router -* [Split view](#splitview) - allows you to open a micro frontend in the lower part of the content area in a "split screen" view -* [uxManager](#uxmanager) - functions related to user interface -* [storageManager](#storagemanager) - Storage Manager API to store/retrieve objects from Luigi Core local storage +- [Lifecycle](#lifecycle) - functions that define the lifecycle of different Luigi elements +- [Callbacks](#lifecycleinitlistenercallback) - callback functions for initListener and customMessageListener +- [Link manager](#linkmanager) - you can use the linkManager instead of an internal router +- [Split view](#splitview) - allows you to open a micro frontend in the lower part of the content area in a "split screen" view +- [uxManager](#uxmanager) - functions related to user interface +- [storageManager](#storagemanager) - Storage Manager API to store/retrieve objects from Luigi Core local storage ## API Reference @@ -43,7 +43,7 @@ Similar to [sendCustomMessage](luigi-client-api.md#sendCustomMessage) but for We ##### Parameters -* `event` **[CustomEvent](https://developer.mozilla.org/docs/Web/API/CustomEvent/CustomEvent)** Custom event to be published +- `event` **[CustomEvent](https://developer.mozilla.org/docs/Web/API/CustomEvent/CustomEvent)** Custom event to be published ##### Examples @@ -113,7 +113,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 1.12.0 +- **since**: 1.12.0 #### luigiClientInit @@ -127,7 +127,7 @@ LuigiClient.luigiClientInit() **Meta** -* **since**: 1.12.0 +- **since**: 1.12.0 #### addInitListener @@ -135,8 +135,8 @@ Registers a listener called with the context object and the Luigi Core domain as ##### Parameters -* `initFn` **[Lifecycle~initListenerCallback](#lifecycleinitlistenercallback)** the function that is called once Luigi is initialized, receives current context and origin as parameters -* `disableTpcCheck` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** if set to `true` third party cookie check will be disabled via LuigiClient. +- `initFn` **[Lifecycle~initListenerCallback](#lifecycleinitlistenercallback)** the function that is called once Luigi is initialized, receives current context and origin as parameters +- `disableTpcCheck` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** if set to `true` third party cookie check will be disabled via LuigiClient. ##### Examples @@ -150,7 +150,7 @@ Removes an init listener. ##### Parameters -* `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the id that was returned by the `addInitListener` function. +- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the id that was returned by the `addInitListener` function. ##### Examples @@ -164,7 +164,7 @@ Registers a listener called with the context object when the URL is changed. For ##### Parameters -* `contextUpdatedFn` **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** the listener function called each time Luigi context changes +- `contextUpdatedFn` **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** the listener function called each time Luigi context changes ##### Examples @@ -178,7 +178,7 @@ Removes a context update listener. ##### Parameters -* `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the id that was returned by the `addContextUpdateListener` function +- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the id that was returned by the `addContextUpdateListener` function ##### Examples @@ -191,15 +191,15 @@ LuigiClient.removeContextUpdateListener(updateListenerId) Registers a listener called upon micro frontend inactivity. This happens when a new micro frontend gets shown while keeping the old one cached. Gets called when: -* navigating with **preserveView** -* navigating from or to a **viewGroup** +- navigating with **preserveView** +- navigating from or to a **viewGroup** Does not get called when navigating normally, or when `openAsModal` or `openAsSplitView` are used. Once the micro frontend turns back into active state, the `addContextUpdateListener` receives an updated context. ##### Parameters -* `inactiveFn` **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** the listener function called each time a micro frontend turns into an inactive state +- `inactiveFn` **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** the listener function called each time a micro frontend turns into an inactive state ##### Examples @@ -214,7 +214,7 @@ Removes a listener for inactive micro frontends. ##### Parameters -* `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the id that was returned by the `addInactiveListener` function +- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the id that was returned by the `addInactiveListener` function ##### Examples @@ -228,8 +228,8 @@ Registers a listener called when the micro frontend receives a custom message. ##### Parameters -* `customMessageId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the custom message id -* `customMessageListener` **[Lifecycle~customMessageListenerCallback](#lifecyclecustommessagelistenercallback)** the function that is called when the micro frontend receives the corresponding event +- `customMessageId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the custom message id +- `customMessageListener` **[Lifecycle~customMessageListenerCallback](#lifecyclecustommessagelistenercallback)** the function that is called when the micro frontend receives the corresponding event ##### Examples @@ -239,7 +239,7 @@ const customMsgId = LuigiClient.addCustomMessageListener('myapp.project-updated' **Meta** -* **since**: 0.6.2 +- **since**: 0.6.2 #### removeCustomMessageListener @@ -247,7 +247,7 @@ Removes a custom message listener. ##### Parameters -* `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the id that was returned by the `addInitListener` function +- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the id that was returned by the `addInitListener` function ##### Examples @@ -257,7 +257,7 @@ LuigiClient.removeCustomMessageListener(customMsgId) **Meta** -* **since**: 0.6.2 +- **since**: 0.6.2 #### getToken @@ -291,7 +291,8 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G **Meta** -* **deprecated**: This is deprecated. +- **deprecated**: This is deprecated. + #### getActiveFeatureToggles @@ -307,7 +308,7 @@ Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Gl **Meta** -* **since**: 1.4.0 +- **since**: 1.4.0 #### addNodeParams @@ -315,8 +316,8 @@ Sets node parameters in Luigi Core. The parameters will be added to the URL. ##### Parameters -* `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** -* `keepBrowserHistory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** (optional, default `true`) +- `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** +- `keepBrowserHistory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** (optional, default `true`) ##### Examples @@ -335,7 +336,7 @@ Node parameters are defined like URL query parameters but with a specific prefix ##### Parameters -* `shouldDesanitise` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** defines whether the specially encoded characters should be desanitised (optional, default `false`) +- `shouldDesanitise` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** defines whether the specially encoded characters should be desanitised (optional, default `false`) ##### Examples @@ -362,7 +363,7 @@ All path parameters in the current navigation path (as defined by the active URL const pathParams = LuigiClient.getPathParams() ``` -Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/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, ...} ` +Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/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, ...}` #### getCoreSearchParams @@ -384,8 +385,8 @@ Sends search query parameters to Luigi Core. The search parameters will be added ##### Parameters -* `searchParams` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** -* `keepBrowserHistory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** (optional, default `true`) +- `searchParams` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** +- `keepBrowserHistory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** (optional, default `true`) ##### Examples @@ -413,7 +414,7 @@ When the micro frontend is not embedded in the Luigi Core application and there ##### Parameters -* `origin` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** target origin +- `origin` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** target origin ##### Examples @@ -423,7 +424,7 @@ LuigiClient.setTargetOrigin(window.location.origin) **Meta** -* **since**: 0.7.3 +- **since**: 0.7.3 #### sendCustomMessage @@ -433,10 +434,9 @@ Sends a custom message to the Luigi Core application. ##### Parameters -* `message` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 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 - - * `message.id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a string containing the message id - * `message.MY_DATA_FIELD` **any** any other message data field +- `message` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 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 + - `message.id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a string containing the message id + - `message.MY_DATA_FIELD` **any** any other message data field ##### Examples @@ -447,7 +447,7 @@ LuigiClient.sendCustomMessage({id: 'environment.created', data: environmentDataO **Meta** -* **since**: 0.6.2 +- **since**: 0.6.2 #### getUserSettings @@ -463,7 +463,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G **Meta** -* **since**: 1.7.1 +- **since**: 1.7.1 #### getAnchor @@ -479,7 +479,7 @@ Returns **any** anchor of URL **Meta** -* **since**: 1.21.0 +- **since**: 1.21.0 #### setAnchor @@ -487,7 +487,7 @@ Sends anchor to Luigi Core. The anchor will be added to the URL. ##### Parameters -* `anchor` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** +- `anchor` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ##### Examples @@ -497,7 +497,7 @@ LuigiClient.setAnchor('luigi'); **Meta** -* **since**: 1.21.0 +- **since**: 1.21.0 #### setViewGroupData @@ -505,7 +505,7 @@ This function allows you to change node labels within the same [view group](navi ##### Parameters -* `data` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** a data object containing the view group name and desired label +- `data` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** a data object containing the view group name and desired label ##### Examples @@ -515,7 +515,7 @@ LuigiClient.setViewGroupData({'vg1':' Luigi rocks!'}) **Meta** -* **since**: 2.2.0 +- **since**: 2.2.0 ### Lifecycle~initListenerCallback @@ -525,8 +525,8 @@ Type: [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Sta #### Parameters -* `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** current context data -* `origin` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Luigi Core URL +- `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** current context data +- `origin` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Luigi Core URL ### Lifecycle~customMessageListenerCallback @@ -536,19 +536,18 @@ Type: [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Sta #### Parameters -* `customMessage` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** custom message object - - * `customMessage.id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** message id - * `customMessage.MY_DATA_FIELD` **any** any other message data field -* `listenerId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** custom message listener id to be used for unsubscription +- `customMessage` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** custom message object + - `customMessage.id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** message id + - `customMessage.MY_DATA_FIELD` **any** any other message data field +- `listenerId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** custom message listener id to be used for unsubscription ### linkManager The Link Manager allows you to navigate to another route. Use it instead of an internal router to: -* Provide routing inside micro frontends. -* Reflect the route. -* Keep the navigation state in Luigi. +- Provide routing inside micro frontends. +- Reflect the route. +- Keep the navigation state in Luigi. #### navigateToIntent @@ -558,13 +557,13 @@ This method internally generates a URL of the form `#?intent=-< input arguments. This then follows a call to the original `linkManager.navigate(...)` function. Consequently, the following calls shall have the exact same effect: -* linkManager().navigateToIntent('Sales-settings', {project: 'pr2', user: 'john'}) -* linkManager().navigate('/#?intent=Sales-settings?project=pr2\&user=john') +- linkManager().navigateToIntent('Sales-settings', {project: 'pr2', user: 'john'}) +- linkManager().navigate('/#?intent=Sales-settings?project=pr2&user=john') ##### Parameters -* `semanticSlug` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** concatenation of semantic object and action connected with a dash (-), i.e.: `-` -* `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** an object representing all the parameters passed, i.e.: `{param1: '1', param2: 2, param3: 'value3'}`. (optional, default `{}`) +- `semanticSlug` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** concatenation of semantic object and action connected with a dash (-), i.e.: `-` +- `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** an object representing all the parameters passed, i.e.: `{param1: '1', param2: 2, param3: 'value3'}`. (optional, default `{}`) ##### Examples @@ -590,7 +589,7 @@ LuigiClient.linkManager().withoutSync().fromClosestContext().navigate('settings' **Meta** -* **since**: 0.7.7 +- **since**: 0.7.7 #### newTab @@ -606,7 +605,7 @@ LuigiClient.linkManager().newTab().navigate('/projects/xy/foobar'); **Meta** -* **since**: 1.16.0 +- **since**: 1.16.0 #### preserveQueryParams @@ -616,7 +615,7 @@ Keeps the URL's query parameters for a navigation request. ##### Parameters -* `preserve` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true`, the URL's query parameters will be kept after navigation. (optional, default `false`) +- `preserve` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true`, the URL's query parameters will be kept after navigation. (optional, default `false`) ##### Examples @@ -627,7 +626,7 @@ LuigiClient.linkManager().preserveQueryParams(false).navigate('/projects/xy/foob **Meta** -* **since**: 1.19.0 +- **since**: 1.19.0 #### getCurrentRoute @@ -645,7 +644,7 @@ Returns **[promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 1.23.0 +- **since**: 1.23.0 #### navigate @@ -653,27 +652,24 @@ Navigates to the given path in the application hosted by Luigi. It contains eith ##### Parameters -* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to be navigated to -* `sessionId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** current Luigi **sessionId** -* `preserveView` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 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 [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 [navigate()](#navigate) function instead of [goBack()](#goBack) -* `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a modal. Use these settings to configure the modal's title and size - - * `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty - * `modalSettings.size` **(`"fullscreen"` | `"l"` | `"m"` | `"s"`)** size of the modal (optional, default `"l"`) - * `modalSettings.width` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `width` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. - * `modalSettings.height` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `height` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. - * `modalSettings.keepPrevious` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 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. - * `modalSettings.closebtn_data_testid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 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. -* `splitViewSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a split view. Use these settings to configure the split view's behaviour - - * `splitViewSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** split view title. By default, it is the node label. If there is no label, it is left empty - * `splitViewSettings.size` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** height of the split view in percent (optional, default `40`) - * `splitViewSettings.collapsed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** creates split view but leaves it closed initially (optional, default `false`) -* `drawerSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a drawer. Use these settings to configure if the drawer has a header, backdrop and size. - - * `drawerSettings.header` **any** By default, the header is visible. The default title is the node label, but the header could also be an object with a `title` attribute allowing you to specify your own title. An 'x' icon is displayed to close the drawer view. - * `drawerSettings.backdrop` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true` the rest of the screen has a backdrop. - * `drawerSettings.size` **(`"l"` | `"m"` | `"s"` | `"xs"`)** size of the drawer (optional, default `"s"`) +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to be navigated to +- `sessionId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** current Luigi **sessionId** +- `preserveView` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 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 [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 [navigate()](#navigate) function instead of [goBack()](#goBack) +- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a modal. Use these settings to configure the modal's title and size + - `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty + - `modalSettings.size` **(`"fullscreen"` \| `"l"` \| `"m"` \| `"s"`)** size of the modal (optional, default `"l"`) + - `modalSettings.width` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `width` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. + - `modalSettings.height` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `height` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. + - `modalSettings.keepPrevious` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 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. + - `modalSettings.closebtn_data_testid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 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. +- `splitViewSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a split view. Use these settings to configure the split view's behaviour + - `splitViewSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** split view title. By default, it is the node label. If there is no label, it is left empty + - `splitViewSettings.size` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** height of the split view in percent (optional, default `40`) + - `splitViewSettings.collapsed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** creates split view but leaves it closed initially (optional, default `false`) +- `drawerSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a drawer. Use these settings to configure if the drawer has a header, backdrop and size. + - `drawerSettings.header` **any** By default, the header is visible. The default title is the node label, but the header could also be an object with a `title` attribute allowing you to specify your own title. An 'x' icon is displayed to close the drawer view. + - `drawerSettings.backdrop` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true` the rest of the screen has a backdrop. + - `drawerSettings.size` **(`"l"` \| `"m"` \| `"s"` \| `"xs"`)** size of the drawer (optional, default `"s"`) ##### Examples @@ -690,9 +686,9 @@ Updates path of the modalPathParam when internal navigation occurs. ##### Parameters -* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** -* `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** opens a view in a modal. Use these settings to configure the modal's title and size (optional, default `{}`) -* `addHistoryEntry` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** adds an entry in the history (optional, default `false`) +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** +- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** opens a view in a modal. Use these settings to configure the modal's title and size (optional, default `{}`) +- `addHistoryEntry` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** adds an entry in the history (optional, default `false`) ##### Examples @@ -702,7 +698,7 @@ LuigiClient.linkManager().updateModalPathInternalNavigation('microfrontend') **Meta** -* **since**: 1.21.0 +- **since**: 1.21.0 #### openAsModal @@ -710,15 +706,14 @@ Opens a view in a modal. You can specify the modal's title and size. If you don' ##### Parameters -* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path -* `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** opens a view in a modal. Use these settings to configure the modal's title and size (optional, default `{}`) - - * `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty - * `modalSettings.size` **(`"fullscreen"` | `"l"` | `"m"` | `"s"`)** size of the modal (optional, default `"l"`) - * `modalSettings.width` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `width` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. - * `modalSettings.height` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `height` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. - * `modalSettings.keepPrevious` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 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. - * `modalSettings.closebtn_data_testid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 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. +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path +- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** opens a view in a modal. Use these settings to configure the modal's title and size (optional, default `{}`) + - `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty + - `modalSettings.size` **(`"fullscreen"` \| `"l"` \| `"m"` \| `"s"`)** size of the modal (optional, default `"l"`) + - `modalSettings.width` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `width` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. + - `modalSettings.height` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `height` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. + - `modalSettings.keepPrevious` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 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. + - `modalSettings.closebtn_data_testid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 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. ##### Examples @@ -740,13 +735,12 @@ In addition, you can specify if a new history entry will be created with the upd ##### Parameters -* `updatedModalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** possibility to update the active modal. (optional, default `{}`) - - * `updatedModalSettings.title` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** update the `title` of the active modal. - * `updatedModalSettings.size` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** update the `size` of the active modal. - * `updatedModalSettings.width` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `width` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. - * `updatedModalSettings.height` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `height` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. -* `addHistoryEntry` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** adds an entry in the history, by default it's `false`. (optional, default `false`) +- `updatedModalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** possibility to update the active modal. (optional, default `{}`) + - `updatedModalSettings.title` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** update the `title` of the active modal. + - `updatedModalSettings.size` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** update the `size` of the active modal. + - `updatedModalSettings.width` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `width` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. + - `updatedModalSettings.height` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `height` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. +- `addHistoryEntry` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** adds an entry in the history, by default it's `false`. (optional, default `false`) ##### Examples @@ -756,18 +750,17 @@ LuigiClient.linkManager().updateModalSettings({title:'LuigiModal', size:'l'}); #### openAsSplitView -* **See**: [splitView](#splitview) for further documentation about the returned instance +- **See: [splitView](#splitview) for further documentation about the returned instance** 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. ##### Parameters -* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path -* `splitViewSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a split view. Use these settings to configure the split view's behaviour (optional, default `{}`) - - * `splitViewSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** split view title. By default, it is the node label. If there is no label, it is left empty - * `splitViewSettings.size` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** height of the split view in percent (optional, default `40`) - * `splitViewSettings.collapsed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** opens split view in collapsed state (optional, default `false`) +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path +- `splitViewSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a split view. Use these settings to configure the split view's behaviour (optional, default `{}`) + - `splitViewSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** split view title. By default, it is the node label. If there is no label, it is left empty + - `splitViewSettings.size` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** height of the split view in percent (optional, default `40`) + - `splitViewSettings.collapsed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** opens split view in collapsed state (optional, default `false`) ##### Examples @@ -779,7 +772,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### openAsDrawer @@ -787,13 +780,12 @@ Opens a view in a drawer. You can specify the size of the drawer, whether the dr ##### Parameters -* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path -* `drawerSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a drawer. Use these settings to configure if the drawer has a header, backdrop and size. (optional, default `{}`) - - * `drawerSettings.header` **any** By default, the header is visible. The default title is the node label, but the header could also be an object with a `title` attribute allowing you to specify your own title. An 'x' icon is displayed to close the drawer view. - * `drawerSettings.backdrop` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true` the rest of the screen has a backdrop. - * `drawerSettings.size` **(`"l"` | `"m"` | `"s"` | `"xs"`)** size of the drawer (optional, default `"s"`) - * `drawerSettings.overlap` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** enable resizing of main microfrontend iFrame after drawer open (optional, default `true`) +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path +- `drawerSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a drawer. Use these settings to configure if the drawer has a header, backdrop and size. (optional, default `{}`) + - `drawerSettings.header` **any** By default, the header is visible. The default title is the node label, but the header could also be an object with a `title` attribute allowing you to specify your own title. An 'x' icon is displayed to close the drawer view. + - `drawerSettings.backdrop` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true` the rest of the screen has a backdrop. + - `drawerSettings.size` **(`"l"` \| `"m"` \| `"s"` \| `"xs"`)** size of the drawer (optional, default `"s"`) + - `drawerSettings.overlap` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** enable resizing of main microfrontend iFrame after drawer open (optional, default `true`) ##### Examples @@ -804,7 +796,7 @@ LuigiClient.linkManager().openAsDrawer('projects/pr1/drawer', {header:{title:'My **Meta** -* **since**: 1.6.0 +- **since**: 1.6.0 #### fromContext @@ -812,7 +804,7 @@ Sets the current navigation context to that of a specific parent node which has ##### Parameters -* `navigationContext` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** +- `navigationContext` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ##### Examples @@ -848,7 +840,7 @@ Returns **[linkManager](#linkmanager)** link manager instance **Meta** -* **since**: 1.0.1 +- **since**: 1.0.1 #### fromParent @@ -864,7 +856,7 @@ Returns **[linkManager](#linkmanager)** link manager instance **Meta** -* **since**: 1.0.1 +- **since**: 1.0.1 #### withParams @@ -872,7 +864,7 @@ Sends node parameters to the route. The parameters are used by the `navigate` fu ##### Parameters -* `nodeParams` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** +- `nodeParams` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** ##### Examples @@ -893,10 +885,9 @@ Sets options to customise route changing behaviour. The parameters are used by t ##### Parameters -* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** navigation options - - * `options.preventHistoryEntry` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true`, there is no browser history being kept. - * `options.preventContextUpdate` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true`, there is no context update being triggered. +- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** navigation options + - `options.preventHistoryEntry` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true`, there is no browser history being kept. + - `options.preventContextUpdate` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true`, there is no context update being triggered. ##### Examples @@ -910,7 +901,7 @@ Returns **[linkManager](#linkmanager)** link manager instance **Meta** -* **since**: 1.25.0 +- **since**: 1.25.0 #### pathExists @@ -918,7 +909,7 @@ Checks if the path you can navigate to exists in the main application. For examp ##### Parameters -* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path which existence you want to check +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path which existence you want to check ##### Examples @@ -946,7 +937,7 @@ Discards the active view and navigates back to the last visited view. Works with ##### Parameters -* `goBackValue` **any** data that is passed in the **goBackContext** field to the last visited view when using preserved views +- `goBackValue` **any** data that is passed in the **goBackContext** field to the last visited view when using preserved views ##### Examples @@ -957,15 +948,15 @@ LuigiClient.linkManager().goBack(true); ### splitView -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`. +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. **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### collapse @@ -979,7 +970,7 @@ splitViewHandle.collapse(); **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### expand @@ -993,7 +984,7 @@ splitViewHandle.expand(); **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### close @@ -1007,7 +998,7 @@ splitViewHandle.close(); **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### setSize @@ -1015,7 +1006,7 @@ Sets the height of the split view ##### Parameters -* `value` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** lower height in percent +- `value` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** lower height in percent ##### Examples @@ -1025,7 +1016,7 @@ splitViewHandle.setSize(60); **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### on @@ -1033,8 +1024,8 @@ Registers a listener for split view events ##### Parameters -* `name` **(`"expand"` | `"collapse"` | `"resize"` | `"close"`)** event name -* `callback` **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** gets called when this event gets triggered by Luigi +- `name` **(`"expand"` \| `"collapse"` \| `"resize"` \| `"close"`)** event name +- `callback` **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** gets called when this event gets triggered by Luigi ##### Examples @@ -1050,7 +1041,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### removeEventListener @@ -1058,7 +1049,7 @@ Unregisters a split view listener ##### Parameters -* `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** listener id +- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** listener id ##### Examples @@ -1068,7 +1059,7 @@ splitViewHandle.removeEventListener(listenerId); **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### exists @@ -1084,7 +1075,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### getSize @@ -1100,7 +1091,7 @@ Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### isCollapsed @@ -1116,7 +1107,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### isExpanded @@ -1132,7 +1123,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 ### uxManager @@ -1164,7 +1155,7 @@ This method informs the main application that there are unsaved changes in the c ##### Parameters -* `isDirty` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** indicates if there are any unsaved changes on the current page or in the component +- `isDirty` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** indicates if there are any unsaved changes on the current page or in the component #### showConfirmationModal @@ -1172,13 +1163,12 @@ Shows a confirmation modal. ##### Parameters -* `settings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the settings of the confirmation modal. If you don't provide any value for any of the fields, a default value is used - - * `settings.type` **(`"confirmation"` | `"success"` | `"warning"` | `"error"` | `"information"`)** the content of the modal type. (Optional) - * `settings.header` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the content of the modal header (optional, default `"Confirmation"`) - * `settings.body` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the content of the modal body. It supports HTML formatting elements such as `
`, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``. (optional, default `"Are you sure you want to do this?"`) - * `settings.buttonConfirm` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | `false`)** the label for the modal confirmation button. If set to `false`, the button will not be shown. (optional, default `"Yes"`) - * `settings.buttonDismiss` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the label for the modal dismiss button (optional, default `"No"`) +- `settings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the settings of the confirmation modal. If you don't provide any value for any of the fields, a default value is used + - `settings.type` **(`"confirmation"` \| `"success"` \| `"warning"` \| `"error"` \| `"information"`)** the content of the modal type. (Optional) + - `settings.header` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the content of the modal header (optional, default `"Confirmation"`) + - `settings.body` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the content of the modal body. It supports HTML formatting elements such as `
`, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``. (optional, default `"Are you sure you want to do this?"`) + - `settings.buttonConfirm` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| `false`)** the label for the modal confirmation button. If set to `false`, the button will not be shown. (optional, default `"Yes"`) + - `settings.buttonDismiss` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the label for the modal dismiss button (optional, default `"No"`) ##### Examples @@ -1207,18 +1197,15 @@ Shows an alert. ##### Parameters -* `settings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the settings for the alert - - * `settings.text` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 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 - * `settings.type` **(`"info"` | `"success"` | `"warning"` | `"error"`)** sets the type of alert - * `settings.links` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** provides links data - - * `settings.links.LINK_KEY` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 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 - - * `settings.links.LINK_KEY.text` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** text which replaces the link identifier in the alert content - * `settings.links.LINK_KEY.url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** URL to navigate when you click the link. Currently, only internal links are supported in the form of relative or absolute paths - * `settings.links.LINK_KEY.dismissKey` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** dismissKey which represents the key of the link. - * `settings.closeAfter` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** (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` +- `settings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the settings for the alert + - `settings.text` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 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 + - `settings.type` **(`"info"` \| `"success"` \| `"warning"` \| `"error"`)** sets the type of alert + - `settings.links` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** provides links data + - `settings.links.LINK_KEY` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 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 + - `settings.links.LINK_KEY.text` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** text which replaces the link identifier in the alert content + - `settings.links.LINK_KEY.url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** URL to navigate when you click the link. Currently, only internal links are supported in the form of relative or absolute paths + - `settings.links.LINK_KEY.dismissKey` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** dismissKey which represents the key of the link. + - `settings.closeAfter` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** (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` ##### Examples @@ -1261,7 +1248,7 @@ Sets current locale to the specified one. ##### Parameters -* `locale` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** locale to be set as the current locale +- `locale` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** locale to be set as the current locale #### isSplitView @@ -1273,7 +1260,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### isModal @@ -1285,7 +1272,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### isDrawer @@ -1297,7 +1284,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 1.26.0 +- **since**: 1.26.0 #### getCurrentTheme @@ -1321,7 +1308,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G **Meta** -* **since**: 2.3.0 +- **since**: 2.3.0 #### applyCSS @@ -1337,7 +1324,7 @@ LuigiClient.uxManager().applyCSS(); **Meta** -* **since**: 2.3.0 +- **since**: 2.3.0 ### storageManager @@ -1353,8 +1340,8 @@ Stores an item for a specific key. ##### Parameters -* `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** key used to identify the value -* `value` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** item to store; object must be stringifyable +- `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** key used to identify the value +- `value` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** item to store; object must be stringifyable ##### Examples @@ -1362,11 +1349,11 @@ Stores an item for a specific key. LuigiClient.storageManager().setItem('keyExample','valueExample').then(() => console.log('Value stored')) ``` -Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\** resolves an empty value when the storage operation is over. It will launch an error if storage is not supported, the value cannot be stringified, or if you are using a Luigi reserved key. +Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<void>** resolves an empty value when the storage operation is over. It will launch an error if storage is not supported, the value cannot be stringified, or if you are using a Luigi reserved key. **Meta** -* **since**: 1.6.0 +- **since**: 1.6.0 #### getItem @@ -1374,7 +1361,7 @@ Retrieves an item for a specific key. ##### Parameters -* `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** used to identify the value +- `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** used to identify the value ##### Examples @@ -1382,11 +1369,11 @@ Retrieves an item for a specific key. LuigiClient.storageManager().getItem('keyExample').then((value) => console.log); ``` -Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** resolves an item retrieved from storage. It will launch an error if storage is not supported. +Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** resolves an item retrieved from storage. It will launch an error if storage is not supported. **Meta** -* **since**: 1.6.0 +- **since**: 1.6.0 #### removeItem @@ -1394,7 +1381,7 @@ Removes an item for a specific key. ##### Parameters -* `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** used to identify the value +- `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** used to identify the value ##### Examples @@ -1402,11 +1389,11 @@ Removes an item for a specific key. LuigiClient.storageManager().removeItem('keyExample').then((value) => console.log(value + ' just removed') ``` -Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** resolves an item just removed from storage. It will launch an error if storage is not supported or if you are using a Luigi reserved key. +Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** resolves an item just removed from storage. It will launch an error if storage is not supported or if you are using a Luigi reserved key. **Meta** -* **since**: 1.6.0 +- **since**: 1.6.0 #### clear @@ -1418,11 +1405,11 @@ Clears all the storage key/values. LuigiClient.storageManager().clear().then(() => console.log('storage cleared')) ``` -Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\** resolves when storage clear is over. +Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<void>** resolves when storage clear is over. **Meta** -* **since**: 1.6.0 +- **since**: 1.6.0 #### has @@ -1430,7 +1417,7 @@ Checks if a key is present in storage. ##### Parameters -* `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** key in the storage +- `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** key in the storage ##### Examples @@ -1438,11 +1425,11 @@ Checks if a key is present in storage. LuigiClient.storageManager().has(key).then((present) => console.log('item is present '+present)) ``` -Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** `true` if key is present, `false` if it is not +Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** `true` if key is present, `false` if it is not **Meta** -* **since**: 1.6.0 +- **since**: 1.6.0 #### getAllKeys @@ -1454,8 +1441,8 @@ Gets all the keys used in the storage. LuigiClient.storageManager().getAllKeys().then((keys) => console.log('keys are '+keys)) ``` -Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>>** keys currently present in the storage +Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>>** keys currently present in the storage **Meta** -* **since**: 1.6.0 +- **since**: 1.6.0 diff --git a/docs/luigi-compound-container-api.md b/docs/luigi-compound-container-api.md index 5f542f4cf1..2165fc86f5 100644 --- a/docs/luigi-compound-container-api.md +++ b/docs/luigi-compound-container-api.md @@ -16,7 +16,7 @@ meta --> # Luigi Compound Container API -This document outlines the parameters provided by the Luigi Compound Container. Luigi Compound Container provides the possibility to insert multiple webcomponent-based microfrontends in one container +This document outlines the parameters provided by the Luigi Compound Container. Luigi Compound Container provides the possibility to insert multiple webcomponent-based microfrontends in one container. The properties can be set as HTML attributes or through the Container object's property in JS. ## API Reference @@ -37,7 +37,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### deferInit @@ -47,7 +47,7 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### locale @@ -57,7 +57,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: NEXT_RELEASE_CONTAINER +- **since**: NEXT_RELEASE_CONTAINER ### nodeParams @@ -67,7 +67,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### noShadow @@ -77,7 +77,7 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob **Meta** -* **since**: 1.2.0 +- **since**: 1.2.0 ### searchParams @@ -87,7 +87,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### pathParams @@ -97,7 +97,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### context @@ -107,7 +107,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### clientPermissions @@ -117,7 +117,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### userSettings @@ -127,7 +127,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### anchor @@ -137,7 +137,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### documentTitle @@ -147,7 +147,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.2.0 +- **since**: 1.2.0 ### hasBack @@ -158,7 +158,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.2.0 +- **since**: 1.2.0 ### dirtyStatus @@ -169,7 +169,7 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob **Meta** -* **since**: 1.2.0 +- **since**: 1.2.0 ### webcomponent @@ -179,16 +179,15 @@ Type: ([boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glo #### Parameters -* `WebComponentSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** - - * `WebComponentSettings.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : string, like module. - * `WebComponentSettings.selfRegistered` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** : if it is true, the web component bundle will be added via script tag. - * `WebComponentSettings.tagName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : tag name where web component is added to DOM. -* `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** must be a stringified JSON object from type `WebComponentSettings`. +- `WebComponentSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** + - `WebComponentSettings.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : string, like module. + - `WebComponentSettings.selfRegistered` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** : if it is true, the web component bundle will be added via script tag. + - `WebComponentSettings.tagName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : tag name where web component is added to DOM. +- `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** must be a stringified JSON object from type `WebComponentSettings`. **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### skipInitCheck @@ -198,17 +197,17 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob **Meta** -* **since**: NEXT_RELEASE_CONTAINER +- **since**: NEXT_RELEASE_CONTAINER ### activeFeatureToggleList The list of active feature toggles to be passed to the compound microfrontend. -Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> +Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> **Meta** -* **since**: NEXT_RELEASE_CONTAINER +- **since**: NEXT_RELEASE_CONTAINER ### theme @@ -218,7 +217,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: NEXT_RELEASE_CONTAINER +- **since**: NEXT_RELEASE_CONTAINER ### updateContext @@ -226,7 +225,7 @@ Function that updates the context of the compound microfrontend. #### Parameters -* `contextObj` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The context data +- `contextObj` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The context data #### Examples @@ -238,7 +237,7 @@ Returns **void** **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### init @@ -248,4 +247,4 @@ Returns **void** **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 diff --git a/docs/luigi-container-api.md b/docs/luigi-container-api.md index 811591430f..a0ea979b70 100644 --- a/docs/luigi-container-api.md +++ b/docs/luigi-container-api.md @@ -16,7 +16,15 @@ meta --> # Luigi Container API -This document outlines the parameters provided by the Luigi Container. +This document outlines the parameters provided by the Luigi Container. They can be set as HTML attributes or through the Container object's property in JS. The properties use pascalCase and the attributes use dashes. For example you can set the sandbox rules in either of these two equivalent ways: + +```js +myContainer.sandboxRules = ["allow-scripts", "allow-same-origin"] +``` + +```HTML + +``` ## API Reference @@ -30,7 +38,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### deferInit @@ -40,7 +48,7 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### context @@ -50,7 +58,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### label @@ -60,7 +68,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### webcomponent @@ -70,13 +78,12 @@ Type: ([boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glo #### Parameters -* `specifies` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** if a microfrontend is a webcomponent or not without any other settings. -* `WebComponentSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** specifies that the microfrontend is a webcomponent with addtional settings. - - * `WebComponentSettings.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : string, like module. - * `WebComponentSettings.selfRegistered` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** : if it is true, the web component bundle will be added via script tag. - * `WebComponentSettings.tagName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : tag name where web component is added to DOM. -* `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** must be a stringified boolean or JSON object from type `WebComponentSettings`.

+- `specifies` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** if a microfrontend is a webcomponent or not without any other settings. +- `WebComponentSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** specifies that the microfrontend is a webcomponent with addtional settings. + - `WebComponentSettings.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : string, like module. + - `WebComponentSettings.selfRegistered` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** : if it is true, the web component bundle will be added via script tag. + - `WebComponentSettings.tagName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : tag name where web component is added to DOM. +- `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** must be a stringified boolean or JSON object from type `WebComponentSettings`.

Note: If you have to use the mechanism of `selfRegistered`, we recommend using the following code in your web component:

@@ -89,7 +96,7 @@ Type: ([boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glo **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### locale @@ -99,7 +106,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### theme @@ -109,27 +116,27 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### activeFeatureToggleList The list of active feature toggles to be passed to the web-component-based micro frontend -Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> +Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### skipCookieCheck If set to true, skips third party cookie check -Type: (`"false"` | `"true"`) +Type: (`"false"` \| `"true"`) **Meta** -* **since**: NEXT_RELEASE_CONTAINER +- **since**: NEXT_RELEASE_CONTAINER ### skipInitCheck @@ -139,7 +146,7 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### nodeParams @@ -149,7 +156,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### noShadow @@ -159,7 +166,7 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob **Meta** -* **since**: 1.2.0 +- **since**: 1.2.0 ### searchParams @@ -169,7 +176,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### pathParams @@ -179,7 +186,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### clientPermissions @@ -189,7 +196,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### userSettings @@ -199,7 +206,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### anchor @@ -209,14 +216,14 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### allowRules The list of rules for the content in the iframe, managed by the HTML `allow` attribute. -You can use one or more rules by adding them to the array, for example allowRules: \["microphone", "camera"]. +You can use one or more rules by adding them to the array, for example allowRules: ["microphone", "camera"]. -Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> +Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> #### Examples @@ -230,14 +237,14 @@ containerElement.allowRules = ['microphone', 'camera'] **Meta** -* **since**: 1.2.0 +- **since**: 1.2.0 ### sandboxRules The list of rules for the content in the iframe, managed by the HTML `sandbox` attribute. -You can use one or more rules by adding them to the array, for example sandboxRules: \["allow-scripts", "allow-same-origin"]. +You can use one or more rules by adding them to the array, for example sandboxRules: ["allow-scripts", "allow-same-origin"]. -Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> +Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> #### Examples @@ -251,7 +258,7 @@ containerElement.sandboxRules = ['allow-modals', 'allow-popups'] **Meta** -* **since**: 1.2.0 +- **since**: 1.2.0 ### documentTitle @@ -261,7 +268,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.2.0 +- **since**: 1.2.0 ### hasBack @@ -272,7 +279,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.2.0 +- **since**: 1.2.0 ### dirtyStatus @@ -283,7 +290,7 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob **Meta** -* **since**: 1.2.0 +- **since**: 1.2.0 ### updateContext @@ -291,8 +298,8 @@ Function that updates the context of the microfrontend #### Parameters -* `contextObj` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The context data -* `internal` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** internal luigi legacy data used for iframes +- `contextObj` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The context data +- `internal` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** internal luigi legacy data used for iframes #### Examples @@ -304,7 +311,7 @@ Returns **void** **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### sendCustomMessage @@ -312,8 +319,8 @@ Send a custom message to the microfronted #### Parameters -* `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a string containing the message id -* `data` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** data to be sent alongside the custom message +- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a string containing the message id +- `data` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** data to be sent alongside the custom message #### Examples @@ -325,7 +332,7 @@ Returns **void** **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### closeAlert @@ -333,8 +340,8 @@ A function that notifies the microfrontend that the opened alert has been closed #### Parameters -* `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the id of the opened alert -* `dismissKey` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the key specifying which dismiss link was clicked on the alert message +- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the id of the opened alert +- `dismissKey` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the key specifying which dismiss link was clicked on the alert message #### Examples @@ -346,7 +353,7 @@ Returns **void** **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### init @@ -362,7 +369,7 @@ Returns **void** **Meta** -* **since**: 1.0.0 +- **since**: 1.0.0 ### authData @@ -372,4 +379,4 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa **Meta** -* **since**: 1.2.0 +- **since**: 1.2.0 diff --git a/docs/luigi-core-api.md b/docs/luigi-core-api.md index facdbae0ad..82a3a12963 100644 --- a/docs/luigi-core-api.md +++ b/docs/luigi-core-api.md @@ -18,17 +18,17 @@ meta --> This document outlines the features provided by the Luigi Core API. It covers these topics: -* [Configuration](#luigi-config) - functions related to Luigi configuration -* [Elements](#elements) - functions related to DOM elements -* [Authorization](#authorization) - authorization options for Luigi -* [Navigation](#luiginavigation) - functions related to Luigi navigation -* [Localization](#luigii18n) - options related to language, translation, and localization -* [Custom messages](#custommessages) - custom messages between Luigi Core and micro frontends -* [UX](#ux) - functions related to Luigi's appearance and user interface -* [Global search](#globalsearch) - functions related to Luigi's global search -* [Theming](#theming) - functions related to Luigi theming capabilties -* [Feature toggles](#featuretoggles) - functions related to Luigi's feature toggle mechanism -* [Routing](#routing) - functions to get and set search query parameters +- [Configuration](#luigi-config) - functions related to Luigi configuration +- [Elements](#elements) - functions related to DOM elements +- [Authorization](#authorization) - authorization options for Luigi +- [Navigation](#luiginavigation) - functions related to Luigi navigation +- [Localization](#luigii18n) - options related to language, translation, and localization +- [Custom messages](#custommessages) - custom messages between Luigi Core and micro frontends +- [UX](#ux) - functions related to Luigi's appearance and user interface +- [Global search](#globalsearch) - functions related to Luigi's global search +- [Theming](#theming) - functions related to Luigi theming capabilties +- [Feature toggles](#featuretoggles) - functions related to Luigi's feature toggle mechanism +- [Routing](#routing) - functions to get and set search query parameters ## Luigi Config @@ -42,7 +42,7 @@ Sets the configuration for Luigi initially. Can also be called at a later point ##### Parameters -* `configInput` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the Luigi Core configuration object +- `configInput` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the Luigi Core configuration object ##### Examples @@ -87,7 +87,7 @@ Tells Luigi that the configuration has been changed. Luigi will update the appli ##### Parameters -* `scope` **...[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** one or more scope selectors specifying what parts of the configuration were changed. If no scope selector is provided, the whole configuration is considered changed.

+- `scope` **...[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** one or more scope selectors specifying what parts of the configuration were changed. If no scope selector is provided, the whole configuration is considered changed.

The supported scope selectors are:

    @@ -107,7 +107,7 @@ Gets value of the given property on Luigi config object. Target can be a value o ##### Parameters -* `property` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the object traversal path +- `property` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the object traversal path ##### Examples @@ -123,7 +123,7 @@ Function return true if the property value is equal true or 'true'. Otherwise th ##### Parameters -* `property` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the object traversal path +- `property` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the object traversal path ##### Examples @@ -139,8 +139,8 @@ If the value is not a Promise it is wrapped to a Promise so that the returned va ##### Parameters -* `property` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the object traversal path -* `parameters` **any** optional parameters that are used if the target is a function +- `property` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the object traversal path +- `parameters` **any** optional parameters that are used if the target is a function ##### Examples @@ -158,7 +158,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **deprecated**: now located in Luigi.auth() instead of Luigi +- **deprecated**: now located in Luigi.auth() instead of Luigi #### unload @@ -172,7 +172,7 @@ Luigi.unload() **Meta** -* **since**: 1.2.2 +- **since**: 1.2.2 #### readUserSettings @@ -190,7 +190,7 @@ Returns **[promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 1.7.1 +- **since**: 1.7.1 #### storeUserSettings @@ -200,8 +200,8 @@ By default, the user settings will be written from the **localStorage** ##### Parameters -* `userSettingsObj` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** to store in the storage. -* `previousUserSettingsObj` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the previous object from storage. +- `userSettingsObj` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** to store in the storage. +- `previousUserSettingsObj` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the previous object from storage. ##### Examples @@ -213,7 +213,7 @@ Returns **[promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 1.7.1 +- **since**: 1.7.1 #### reset @@ -227,7 +227,7 @@ Luigi.reset(); **Meta** -* **since**: 1.14.0 +- **since**: 1.14.0 #### clearNavigationCache @@ -241,7 +241,7 @@ Luigi.clearNavigationCache(); **Meta** -* **since**: 1.19.0 +- **since**: 1.19.0 #### setGlobalContext @@ -249,12 +249,12 @@ Set the global context object and triggers the corresponding update. ##### Parameters -* `ctx` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The context object to set -* `preventUpdate` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If true, no view update is triggered. Default is false. +- `ctx` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The context object to set +- `preventUpdate` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If true, no view update is triggered. Default is false. **Meta** -* **since**: 2.5.0 +- **since**: 2.5.0 #### getGlobalContext @@ -262,7 +262,7 @@ Get the global context object. **Meta** -* **since**: 2.5.0 +- **since**: 2.5.0 #### updateContextValues @@ -271,11 +271,11 @@ Note: the updated context values are not persisted. The developers have to do it ##### Parameters -* `ctx` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The context to be updated. +- `ctx` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The context to be updated. **Meta** -* **since**: 2.13.0 +- **since**: 2.13.0 ## Luigi.elements() @@ -299,7 +299,7 @@ Returns **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** t **Meta** -* **since**: 0.6.0 +- **since**: 0.6.0 #### getShellbar @@ -315,7 +315,7 @@ Returns **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** t **Meta** -* **since**: 0.4.12 +- **since**: 0.4.12 #### getShellbarActions @@ -331,7 +331,7 @@ Returns **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** t **Meta** -* **since**: 0.4.12 +- **since**: 0.4.12 #### getMicrofrontends @@ -343,11 +343,11 @@ Returns a list of all available micro frontends. Luigi.elements().getMicrofrontends(); ``` -Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<{id: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), active: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean), container: [HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element), type: (`"main"` | `"split-view"` | `"modal"`)}>** list of objects defining all micro frontends from the DOM +Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<{id: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), active: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean), container: [HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element), type: (`"main"` \| `"split-view"` \| `"modal"`)}>** list of objects defining all micro frontends from the DOM **Meta** -* **since**: 0.6.2 +- **since**: 0.6.2 #### getMicrofrontendIframes @@ -359,11 +359,11 @@ Returns all micro frontend iframes including the iframe from the modal if it exi Luigi.elements().getMicrofrontendIframes(); ``` -Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)>** an array of all micro frontend iframes from the DOM +Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)>** an array of all micro frontend iframes from the DOM **Meta** -* **since**: 0.4.12 +- **since**: 0.4.12 #### getCurrentMicrofrontendIframe @@ -380,7 +380,7 @@ Returns **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** t **Meta** -* **since**: 0.4.12 +- **since**: 0.4.12 #### getNavFooterContainer @@ -396,7 +396,7 @@ Returns **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** t **Meta** -* **since**: 1.21.0 +- **since**: 1.21.0 ## Luigi.auth() @@ -432,7 +432,7 @@ Luigi.auth().login(); **Meta** -* **since**: 1.5.0 +- **since**: 1.5.0 #### logout @@ -447,7 +447,7 @@ Luigi.auth().logout(); **Meta** -* **since**: 1.5.0 +- **since**: 1.5.0 ### AuthorizationStore @@ -476,7 +476,7 @@ Retrieves the storage type that is used to store the auth data. To set it, use t Luigi.auth().store.getStorageType() ``` -Returns **(`"localStorage"` | `"sessionStorage"` | `"none"`)** storage type +Returns **(`"localStorage"` \| `"sessionStorage"` \| `"none"`)** storage type #### getAuthData @@ -496,7 +496,7 @@ Sets authorization data ##### Parameters -* `data` **[AuthData](#authdata)** new auth data object +- `data` **[AuthData](#authdata)** new auth data object ##### Examples @@ -532,10 +532,10 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa #### Properties -* `accessToken` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** access token value -* `accessTokenExpirationDate` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** timestamp value -* `scope` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** scope, can be empty if it is not required -* `idToken` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** id token, used for renewing authentication +- `accessToken` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** access token value +- `accessTokenExpirationDate` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** timestamp value +- `scope` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** scope, can be empty if it is not required +- `idToken` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** id token, used for renewing authentication ## Luigi.navigation() @@ -561,26 +561,23 @@ Navigates to the given path in the application. It contains either a full absolu ##### Parameters -* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to be navigated to -* `preserveView` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 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 [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 [navigate()](#navigate) function instead of [goBack()](#goBack) -* `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a modal. Use these settings to configure the modal's title and size - - * `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty - * `modalSettings.size` **(`"fullscreen"` | `"l"` | `"m"` | `"s"`)** size of the modal (optional, default `"l"`) - * `modalSettings.width` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `width` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. - * `modalSettings.height` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `height` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. - * `modalSettings.keepPrevious` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 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. - * `modalSettings.closebtn_data_testid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 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. -* `splitViewSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a split view. Use these settings to configure the split view's behaviour - - * `splitViewSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** split view title. By default, it is the node label. If there is no label, it is left empty - * `splitViewSettings.size` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** height of the split view in percent (optional, default `40`) - * `splitViewSettings.collapsed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** opens split view in collapsed state (optional, default `false`) -* `drawerSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a drawer. Use these settings to configure if the drawer has a header, backdrop and size. - - * `drawerSettings.header` **any** By default, the header is visible. The default title is the node label, but the header could also be an object with a `title` attribute allowing you to specify your own title. An 'x' icon is displayed to close the drawer view. - * `drawerSettings.backdrop` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true` the rest of the screen has a backdrop. - * `drawerSettings.size` **(`"l"` | `"m"` | `"s"` | `"xs"`)** size of the drawer (optional, default `"s"`) +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to be navigated to +- `preserveView` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 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 [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 [navigate()](#navigate) function instead of [goBack()](#goBack) +- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a modal. Use these settings to configure the modal's title and size + - `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty + - `modalSettings.size` **(`"fullscreen"` \| `"l"` \| `"m"` \| `"s"`)** size of the modal (optional, default `"l"`) + - `modalSettings.width` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `width` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. + - `modalSettings.height` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `height` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. + - `modalSettings.keepPrevious` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 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. + - `modalSettings.closebtn_data_testid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 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. +- `splitViewSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a split view. Use these settings to configure the split view's behaviour + - `splitViewSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** split view title. By default, it is the node label. If there is no label, it is left empty + - `splitViewSettings.size` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** height of the split view in percent (optional, default `40`) + - `splitViewSettings.collapsed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** opens split view in collapsed state (optional, default `false`) +- `drawerSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a drawer. Use these settings to configure if the drawer has a header, backdrop and size. + - `drawerSettings.header` **any** By default, the header is visible. The default title is the node label, but the header could also be an object with a `title` attribute allowing you to specify your own title. An 'x' icon is displayed to close the drawer view. + - `drawerSettings.backdrop` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true` the rest of the screen has a backdrop. + - `drawerSettings.size` **(`"l"` \| `"m"` \| `"s"` \| `"xs"`)** size of the drawer (optional, default `"s"`) ##### Examples @@ -596,8 +593,8 @@ Offers an alternative way of navigating with intents. This involves specifying a ##### Parameters -* `semanticSlug` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** concatenation of semantic object and action connected with a dash (-) -* `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** an object representing all the parameters passed (optional, default '{}') +- `semanticSlug` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** concatenation of semantic object and action connected with a dash (-) +- `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** an object representing all the parameters passed (optional, default '{}') ##### Examples @@ -608,7 +605,7 @@ Luigi.navigation().navigateToIntent('Sales-settings', {project: 'pr1'}) **Meta** -* **since**: 2.14.2 +- **since**: 2.14.2 #### openAsModal @@ -616,16 +613,15 @@ Opens a view in a modal. You can specify the modal's title and size. If you do n ##### Parameters -* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path -* `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** opens a view in a modal. Use these settings to configure the modal's title and size - - * `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty - * `modalSettings.size` **(`"fullscreen"` | `"l"` | `"m"` | `"s"`)** size of the modal (optional, default `"l"`) - * `modalSettings.width` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `width` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. - * `modalSettings.height` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `height` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. - * `modalSettings.keepPrevious` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 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. - * `modalSettings.closebtn_data_testid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 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. -* `onCloseCallback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** callback function called upon closing the opened modal +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path +- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** opens a view in a modal. Use these settings to configure the modal's title and size + - `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty + - `modalSettings.size` **(`"fullscreen"` \| `"l"` \| `"m"` \| `"s"`)** size of the modal (optional, default `"l"`) + - `modalSettings.width` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `width` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. + - `modalSettings.height` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** updates the `height` of the modal. Allowed units are 'px', '%', 'rem', 'em', 'vh' and 'vw'. + - `modalSettings.keepPrevious` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 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. + - `modalSettings.closebtn_data_testid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 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. +- `onCloseCallback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** callback function called upon closing the opened modal ##### Examples @@ -635,18 +631,17 @@ Luigi.navigation().openAsModal('projects/pr1/users', {title:'Users', size:'m'}); #### openAsSplitView -* **See**: [SplitView Client](https://docs.luigi-project.io/docs/luigi-client-api?section=splitview) for further documentation. These methods from the Client SplitView are also implemented for Luigi Core: `close`, `collapse`, `expand`, `isCollapsed`, `isExpanded`, `exists` +- **See: [SplitView Client](https://docs.luigi-project.io/docs/luigi-client-api?section=splitview) for further documentation. These methods from the Client SplitView are also implemented for Luigi Core: `close`, `collapse`, `expand`, `isCollapsed`, `isExpanded`, `exists`** 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. ##### Parameters -* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path -* `splitViewSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a split view. Use these settings to configure the split view's behaviour (optional, default `{}`) - - * `splitViewSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** split view title. By default, it is the node label. If there is no label, it is left empty - * `splitViewSettings.size` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** height of the split view in percent (optional, default `40`) - * `splitViewSettings.collapsed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** opens split view in collapsed state (optional, default `false`) +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path +- `splitViewSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a split view. Use these settings to configure the split view's behaviour (optional, default `{}`) + - `splitViewSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** split view title. By default, it is the node label. If there is no label, it is left empty + - `splitViewSettings.size` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** height of the split view in percent (optional, default `40`) + - `splitViewSettings.collapsed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** opens split view in collapsed state (optional, default `false`) ##### Examples @@ -658,7 +653,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G **Meta** -* **since**: 0.7.6 +- **since**: 0.7.6 #### openAsDrawer @@ -666,12 +661,11 @@ Opens a view in a drawer. You can specify if the drawer has a header, if a backd ##### Parameters -* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path -* `drawerSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** opens a view in a drawer. Use these settings to configure if the drawer has a header, backdrop and size. - - * `drawerSettings.header` **any** 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. - * `drawerSettings.backdrop` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true` the rest of the screen has a backdrop. - * `drawerSettings.size` **(`"l"` | `"m"` | `"s"` | `"xs"`)** size of the drawer (optional, default `"s"`) +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path +- `drawerSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** opens a view in a drawer. Use these settings to configure if the drawer has a header, backdrop and size. + - `drawerSettings.header` **any** 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. + - `drawerSettings.backdrop` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** By default, it is set to `false`. If it is set to `true` the rest of the screen has a backdrop. + - `drawerSettings.size` **(`"l"` \| `"m"` \| `"s"` \| `"xs"`)** size of the drawer (optional, default `"s"`) ##### Examples @@ -682,7 +676,7 @@ Luigi.navigation().openAsDrawer('projects/pr1/drawer', {header:{title:'My drawer **Meta** -* **since**: 1.6.0 +- **since**: 1.6.0 #### fromContext @@ -690,7 +684,7 @@ Sets the current navigation context to that of a specific parent node which has ##### Parameters -* `navigationContext` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** +- `navigationContext` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ##### Examples @@ -726,7 +720,7 @@ Returns **linkManager** link manager instance **Meta** -* **since**: 1.0.1 +- **since**: 1.0.1 #### fromParent @@ -742,7 +736,7 @@ Returns **linkManager** link manager instance **Meta** -* **since**: 2.14.0 +- **since**: 2.14.0 #### getCurrentRoute @@ -760,7 +754,7 @@ Returns **any** a String value specifying the current Luigi route **Meta** -* **since**: 2.14.0 +- **since**: 2.14.0 #### withParams @@ -768,7 +762,7 @@ Sends node parameters to the route. The parameters are used by the `navigate` fu ##### Parameters -* `nodeParams` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** +- `nodeParams` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** ##### Examples @@ -787,7 +781,7 @@ Checks if the path you can navigate to exists in the main application. For examp ##### Parameters -* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path which existence you want to check +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path which existence you want to check ##### Examples @@ -815,7 +809,7 @@ Discards the active view and navigates back to the last visited view. Works with ##### Parameters -* `goBackValue` **any** data that is passed in the **goBackContext** field to the last visited view when using preserved views +- `goBackValue` **any** data that is passed in the **goBackContext** field to the last visited view when using preserved views ##### Examples @@ -840,7 +834,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G **Meta** -* **since**: 0.5.3 +- **since**: 0.5.3 #### setCurrentLocale @@ -848,11 +842,11 @@ Sets current locale to the specified one. ##### Parameters -* `locale` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** locale to be set as the current locale +- `locale` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** locale to be set as the current locale **Meta** -* **since**: 0.5.3 +- **since**: 0.5.3 #### addCurrentLocaleChangeListener @@ -860,13 +854,13 @@ Registers a listener for locale changes. ##### Parameters -* `listener` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** function called on every locale change with the new locale as argument +- `listener` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** function called on every locale change with the new locale as argument Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** listener ID associated with the given listener; use it when removing the listener **Meta** -* **since**: 0.5.3 +- **since**: 0.5.3 #### removeCurrentLocaleChangeListener @@ -874,11 +868,11 @@ Unregisters a listener for locale changes. ##### Parameters -* `listenerId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** listener ID associated with the listener to be removed, returned by addCurrentLocaleChangeListener +- `listenerId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** listener ID associated with the listener to be removed, returned by addCurrentLocaleChangeListener **Meta** -* **since**: 0.5.3 +- **since**: 0.5.3 #### getTranslation @@ -891,13 +885,13 @@ Property values for token replacement in the localization key will be taken from ##### Parameters -* `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** key to be translated -* `interpolations` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** objects with properties that will be used for token replacements in the localization key (optional, default `undefined`) -* `locale` **locale** optional locale to get the translation for; default is the current locale (optional, default `undefined`) +- `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** key to be translated +- `interpolations` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** objects with properties that will be used for token replacements in the localization key (optional, default `undefined`) +- `locale` **locale** optional locale to get the translation for; default is the current locale (optional, default `undefined`) **Meta** -* **since**: 0.5.3 +- **since**: 0.5.3 ## Luigi.customMessages() @@ -913,10 +907,9 @@ Sends a custom message to all opened micro frontends. ##### Parameters -* `message` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** an object containing data to be sent to the micro frontend to process it further. This object is set as an input parameter of the custom message listener on the micro frontend side. - - * `message.id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the id of the message - * `message.MY_DATA_FIELD` **any** any other message data field +- `message` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** an object containing data to be sent to the micro frontend to process it further. This object is set as an input parameter of the custom message listener on the micro frontend side. + - `message.id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the id of the message + - `message.MY_DATA_FIELD` **any** any other message data field ##### Examples @@ -930,7 +923,7 @@ Luigi.customMessages().sendToAll({ **Meta** -* **since**: 0.6.2 +- **since**: 0.6.2 #### send @@ -939,11 +932,10 @@ Use Luigi.elements().getMicrofrontends() to get the iframe id. ##### Parameters -* `microfrontendId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the id of the micro frontend -* `message` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** an object containing data to be sent to the micro frontend to process it further. This object is set as an input parameter of the custom message listener on the micro frontend side - - * `message.id` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the id of the message - * `message.MY_DATA_FIELD` **any** any other message data field +- `microfrontendId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the id of the micro frontend +- `message` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** an object containing data to be sent to the micro frontend to process it further. This object is set as an input parameter of the custom message listener on the micro frontend side + - `message.id` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the id of the message + - `message.MY_DATA_FIELD` **any** any other message data field ##### Examples @@ -957,7 +949,7 @@ Luigi.customMessages().send(microfrontend.id, { **Meta** -* **since**: 0.6.2 +- **since**: 0.6.2 ## Luigi.ux() @@ -973,7 +965,7 @@ Hides the app loading indicator. **Meta** -* **since**: 0.6.4 +- **since**: 0.6.4 #### showAlert @@ -981,18 +973,15 @@ Shows an alert. ##### Parameters -* `settings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the settings for the alert - - * `settings.text` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 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 do not specify any text, the alert is not displayed - * `settings.type` **(`"info"` | `"success"` | `"warning"` | `"error"`)** sets the type of alert - * `settings.links` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** provides links data - - * `settings.links.LINK_KEY` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 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 - - * `settings.links.LINK_KEY.text` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** text which replaces the link identifier in the alert content - * `settings.links.LINK_KEY.url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** URL to navigate when you click the link. Currently, only internal links are supported in the form of relative or absolute paths - * `settings.links.LINK_KEY.dismissKey` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** dismissKey which represents the key of the link. - * `settings.closeAfter` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** (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` +- `settings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the settings for the alert + - `settings.text` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 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 do not specify any text, the alert is not displayed + - `settings.type` **(`"info"` \| `"success"` \| `"warning"` \| `"error"`)** sets the type of alert + - `settings.links` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** provides links data + - `settings.links.LINK_KEY` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 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 + - `settings.links.LINK_KEY.text` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** text which replaces the link identifier in the alert content + - `settings.links.LINK_KEY.url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** URL to navigate when you click the link. Currently, only internal links are supported in the form of relative or absolute paths + - `settings.links.LINK_KEY.dismissKey` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** dismissKey which represents the key of the link. + - `settings.closeAfter` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** (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` ##### Examples @@ -1020,7 +1009,7 @@ Returns **[promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 0.6.4 +- **since**: 0.6.4 #### showConfirmationModal @@ -1028,13 +1017,12 @@ Shows a confirmation modal. ##### Parameters -* `settings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the settings of the confirmation modal. If you do not provide any value for any of the fields, a default value is used - - * `settings.type` **(`"confirmation"` | `"success"` | `"warning"` | `"error"` | `"information"`)** the content of the modal type. (Optional) - * `settings.header` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the content of the modal header (optional, default `"Confirmation"`) - * `settings.body` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the content of the modal body. It supports HTML formatting elements such as `
    `, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``. (optional, default `"Are you sure you want to do this?"`) - * `settings.buttonConfirm` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | `false`)** the label for the modal confirmation button. If set to `false`, the button will not be shown. (optional, default `"Yes"`) - * `settings.buttonDismiss` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the label for the modal dismiss button (optional, default `"No"`) +- `settings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the settings of the confirmation modal. If you do not provide any value for any of the fields, a default value is used + - `settings.type` **(`"confirmation"` \| `"success"` \| `"warning"` \| `"error"` \| `"information"`)** the content of the modal type. (Optional) + - `settings.header` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the content of the modal header (optional, default `"Confirmation"`) + - `settings.body` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the content of the modal body. It supports HTML formatting elements such as `
    `, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``. (optional, default `"Are you sure you want to do this?"`) + - `settings.buttonConfirm` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| `false`)** the label for the modal confirmation button. If set to `false`, the button will not be shown. (optional, default `"Yes"`) + - `settings.buttonDismiss` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the label for the modal dismiss button (optional, default `"No"`) ##### Examples @@ -1057,7 +1045,7 @@ Returns **[promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 0.6.4 +- **since**: 0.6.4 #### setDocumentTitle @@ -1065,7 +1053,7 @@ Set the document title ##### Parameters -* `documentTitle` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** +- `documentTitle` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ##### Examples @@ -1075,7 +1063,7 @@ Luigi.ux().setDocumentTitle('Luigi'); **Meta** -* **since**: 1.4.0 +- **since**: 1.4.0 #### getDocumentTitle @@ -1091,7 +1079,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G **Meta** -* **since**: 1.4.0 +- **since**: 1.4.0 #### collapseLeftSideNav @@ -1099,11 +1087,11 @@ Set the collapsed state of the left side navigation ##### Parameters -* `state` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** +- `state` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** **Meta** -* **since**: 1.5.0 +- **since**: 1.5.0 #### openUserSettings @@ -1111,7 +1099,7 @@ Open user settings dialog **Meta** -* **since**: 1.7.1 +- **since**: 1.7.1 #### closeUserSettings @@ -1119,17 +1107,17 @@ Close user settings dialog **Meta** -* **since**: 1.7.1 +- **since**: 1.7.1 #### getDirtyStatus Returns the dirty status, which is set by the Client via [setDirtyStatus](luigi-client-api.md#setdirtystatus). By default, the dirty status is `false`. -Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** +Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** **Meta** -* **since**: 2.1.0 +- **since**: 2.1.0 #### getCurrentTheme @@ -1145,7 +1133,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G **Meta** -* **since**: 2.14.0 +- **since**: 2.14.0 ## Luigi.globalSearch() @@ -1167,7 +1155,7 @@ Luigi.globalSearch().openSearchField(); **Meta** -* **since**: 1.3.0 +- **since**: 1.3.0 #### closeSearchField @@ -1181,7 +1169,7 @@ Luigi.globalSearch().closeSearchField(); **Meta** -* **since**: 1.3.0 +- **since**: 1.3.0 #### clearSearchField @@ -1195,7 +1183,7 @@ Luigi.globalSearch().clearSearchField(); **Meta** -* **since**: 1.3.0 +- **since**: 1.3.0 #### showSearchResult @@ -1203,7 +1191,7 @@ Opens the global search result. By standard it is a popover. ##### Parameters -* `searchResultItems` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** +- `searchResultItems` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** ##### Examples @@ -1222,7 +1210,7 @@ Luigi.globalSearch().showSearchResult([searchResultItem1, searchResultItem2]); **Meta** -* **since**: 1.3.0 +- **since**: 1.3.0 #### closeSearchResult @@ -1236,7 +1224,7 @@ Luigi.globalSearch().closeSearchResult(); **Meta** -* **since**: 1.3.0 +- **since**: 1.3.0 #### getSearchString @@ -1250,7 +1238,7 @@ Luigi.globalSearch().getSearchString(); **Meta** -* **since**: 1.3.0 +- **since**: 1.3.0 #### setSearchString @@ -1258,7 +1246,7 @@ Sets the value of the search input field. ##### Parameters -* `searchString` search value +- `searchString` search value ##### Examples @@ -1268,7 +1256,7 @@ Luigi.globalSearch().setSearchString('searchString'); **Meta** -* **since**: 1.3.0 +- **since**: 1.3.0 #### setSearchInputPlaceholder @@ -1276,7 +1264,7 @@ Sets the value of the Placeholder search input field. ##### Parameters -* `searchString` search value +- `searchString` search value ##### Examples @@ -1286,7 +1274,7 @@ Luigi.globalSearch().setSearchInputPlaceholder('HERE input Placeholder'); **Meta** -* **since**: 1.7.1 +- **since**: 1.7.1 ## Luigi.theming() @@ -1315,7 +1303,7 @@ Returns **[promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 1.4.0 +- **since**: 1.4.0 #### setCurrentTheme @@ -1323,7 +1311,7 @@ Sets the current theme id ##### Parameters -* `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of a theme object +- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of a theme object ##### Examples @@ -1333,7 +1321,7 @@ Luigi.theming().setCurrentTheme('light') **Meta** -* **since**: 1.4.0 +- **since**: 1.4.0 #### getThemeObject @@ -1341,7 +1329,7 @@ Retrieves a theme object by name. ##### Parameters -* `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a theme id +- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a theme id ##### Examples @@ -1358,7 +1346,7 @@ Returns **[promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 1.4.0 +- **since**: 1.4.0 #### getCurrentTheme @@ -1374,7 +1362,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G **Meta** -* **since**: 1.4.0 +- **since**: 1.4.0 #### isThemingAvailable @@ -1390,7 +1378,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ **Meta** -* **since**: 1.4.0 +- **since**: 1.4.0 #### getCSSVariables @@ -1409,7 +1397,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G **Meta** -* **since**: 2.3.0 +- **since**: 2.3.0 ## Luigi.featureToggles() @@ -1425,8 +1413,8 @@ Add a feature toggle to an active feature toggles list ##### Parameters -* `featureToggleName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the name of the feature toggle -* `fromUrlQuery` (optional, default `false`) +- `featureToggleName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the name of the feature toggle +- `fromUrlQuery` (optional, default `false`) ##### Examples @@ -1436,7 +1424,7 @@ Luigi.featureToggles().setFeatureToggle('featureToggleName'); **Meta** -* **since**: 1.4.0 +- **since**: 1.4.0 #### unsetFeatureToggle @@ -1444,7 +1432,7 @@ Remove a feature toggle from the list ##### Parameters -* `featureToggleName` +- `featureToggleName` ##### Examples @@ -1454,7 +1442,7 @@ Luigi.featureToggles().unsetFeatureToggle('featureToggleName'); **Meta** -* **since**: 1.4.0 +- **since**: 1.4.0 #### getActiveFeatureToggleList @@ -1470,7 +1458,7 @@ Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Gl **Meta** -* **since**: 1.4.0 +- **since**: 1.4.0 ## Luigi.routing() @@ -1492,7 +1480,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G **Meta** -* **since**: 1.16.1 +- **since**: 1.16.1 #### addSearchParams @@ -1502,8 +1490,8 @@ In order to delete a search query param you can set the value of the param to un ##### Parameters -* `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** -* `keepBrowserHistory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** +- `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** +- `keepBrowserHistory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** ##### Examples @@ -1513,4 +1501,4 @@ Luigi.routing().addSearchParams({luigi:'rocks', mario:undefined}, false); **Meta** -* **since**: 1.16.1 +- **since**: 1.16.1