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.
In addition you can use standard addEventListener
function to react on events emmitted by the Luigi Compound Container. The list of events and their meaning can be found here.
The URL used for the renderer.
Type: string
<luigi-container viewurl="/index.html"></luigi-container>
myContainer.viewurl = "/index.html"
The configuration for the compound microfrontend. Take a look at the compound parameter for details.
Type: Object
renderer = { use: 'grid', config: { columns: '1fr 1fr 1fr 2fr', layouts: [{maxWidth: 600, columns: '1fr', gap: 0, ...}]}};
children = [{ viewUrl: '/main.js', context: { label: 'WC', ...}, layoutConfig: {column: '1 / -1', ...}, eventListeners: [{ source: 'input1', ...}}]}];
myContainer.compoundConfig = { renderer, children };
Meta
If set to true defers from initializing the microfronted automatically. In that case init() can be used.
Type: boolean
<luigi-container viewurl="/index.html" defer-init></luigi-container>
myContainer.deferInit = true
Meta
The locale to be passed to the compound micro frontend.
Type: string
<luigi-container locale="en_us"></luigi-container>
myContainer.locale = "en_us"
Meta
The parameters to be passed to the compound micro frontend. Will not be passed to the compound children.
Type: Object
<luigi-container viewurl="/index.html" node-params='{"node":"param"}'></luigi-container>
myContainer.nodeParams = {foo: bar}
Meta
If set to true, the Luigi compound container webcomponent will not use the shadow DOM for rendering.
Type: boolean
<luigi-container viewurl="/index.html" no-shadow></luigi-container>
myContainer.noShadow = true
Meta
The search parameters to be passed to the compound micro frontend.
Type: Object
<luigi-container viewurl="/index.html" search-params='{"search":"param"}'></luigi-container>
myContainer.searchParams = {foo: bar}
Meta
The path parameters to be passed to the compound micro frontend.
Type: Object
<luigi-container viewurl="/index.html" path-params='{"path":"param"}'></luigi-container>
myContainer.pathParams = {foo: "bar"}
Meta
The stringified context to be passed to the compound microfrontend.
Type: string
<luigi-container viewUrl="/index.html" context='{"label": "Dashboard"}'></luigi-container>
myContainer.context = {label: "Dashboard"}
Meta
The clientPermissions to be passed to the compound micro frontend.
Type: Object
<luigi-container viewurl="/index.html" client-permissions='{"permission": "adminGroup"}'></luigi-container>
myContainer.clientPermissions = {permission: "adminGroup"}
Meta
The user settings to be passed to the compound micro frontend.
Type: Object
<luigi-container viewurl="/index.html" user-settings='{"language": "de", "theme":"sap_horizon"}'></luigi-container>
myContainer.userSettings = {language: 'de', theme: 'sap_horizon'}
Meta
The anchor value to be passed to the compound micro frontend.
Type: string
<luigi-container viewurl="/index.html" anchor='#foo'></luigi-container>
myContainer.anchor = '#foo'
Meta
The document title value to be passed to the compound micro frontend.
Type: string
<luigi-container viewurl="/index.html" document-title='Luigi App'></luigi-container>
myContainer.documentTitle = 'Luigi App'
Meta
The hasBack value to be passed to the compound micro frontend. It indicates that there is one or more preserved views. Useful when you need to show a back button.
Type: boolean
<luigi-container viewurl="/index.html" has-back></luigi-container>
myContainer.hasBack = true
Meta
The dirty status value to be passed to the compound micro frontend. It's used to indicate that there are unsaved changes when navigating away.
Type: boolean
<luigi-container viewurl="/index.html" dirty-status></luigi-container>
myContainer.dirtyStatus = true
Meta
The following properties can be set for the web component object. By default, the web component is set to true.
Type: (boolean | WebComponentSettings | string)
<luigi-container webcomponent="{ type: 'module', selfRegistered: true, tagName: 'my-webcomponent'}"></luigi-container>
myContainer.webcomponent = { type: 'module', selfRegistered: true, tagName: 'my-webcomponent'}
Meta
If set to true, skips handshake and ready event is fired immediately.
Type: boolean
<luigi-container viewurl="/index.html" skipInitCheck></luigi-container>
myContainer.skipInitCheck = true
Meta
The list of active feature toggles to be passed to the compound microfrontend.
<luigi-container viewUrl="/index.html" active-feature-toggle-list='["enable-foo", "allow-bar"]'></luigi-container>
myContainer.activeFeatureToggleList = ["enable-foo", "allow-bar"]
Meta
The theme to be passed to the compound microfrontend.
Type: string
<luigi-container viewUrl="/index.html" theme='sap_horizon'></luigi-container>
myContainer.theme = 'sap_horizon'
Meta
Function that updates the context of the compound microfrontend.
contextObj
Object The context datacontainerElement.updateContext({newContextData: 'some data'})
Returns void
Meta
A function that notifies the microfrontend that the opened alert has been closed.
containerElement.notifyAlertClosed('my-alert-id', 'my-dismiss-key')
Returns void
Meta
A function that notifies the microfrontend if the confirmation modal was confirmed or declined.
containerElement.notifyAlertClosed(true)
Returns void
Meta
Manually triggers the micro frontend rendering process when using the defer-init attribute.
Returns void
Meta