@luigi-project/container 1.7.5 → 1.7.6-dev.202512200036

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,221 +4,287 @@ export declare interface WebComponentSettings {
4
4
  tagName?: string;
5
5
  }
6
6
 
7
+ /**
8
+ * @summary Base class for Luigi compound container.
9
+ * @augments HTMLElement
10
+ * @class
11
+ */
7
12
  export default class LuigiCompoundContainer extends HTMLElement {
8
13
  /**
9
- * The URL used for the renderer.
10
- *
14
+ * The URL used for the renderer. <br><br>
15
+ * Type: [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
11
16
  * @since 1.0.0
12
- * @example <luigi-container viewurl="/index.html"></luigi-container>
17
+ * @type {String}
18
+ * @kind member
19
+ * @memberof LuigiCompoundContainer
20
+ * @example <luigi-compound-container viewurl="/index.html"></luigi-compound-container>
13
21
  * @example myContainer.viewurl = "/index.html"
14
22
  */
15
23
  viewurl: string;
16
24
 
17
25
  /**
18
26
  * The configuration for the compound microfrontend.
19
- * Take a look at the [compound parameter](https://docs.luigi-project.io/docs/navigation-parameters-reference/?section=compound) for details.
27
+ * Take a look at the [compound parameter](https://docs.luigi-project.io/docs/navigation-parameters-reference/?section=compound) for details. <br><br>
28
+ * Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
20
29
  * @since 1.0.0
21
- *
22
- * @example renderer = { use: 'grid', config: { columns: '1fr 1fr 1fr 2fr', layouts: [{maxWidth: 600, columns: '1fr', gap: 0, ...}]}};
30
+ * @type {Object}
31
+ * @kind member
32
+ * @memberof LuigiCompoundContainer
33
+ * @example
34
+ * renderer = { use: 'grid', config: { columns: '1fr 1fr 1fr 2fr', layouts: [{maxWidth: 600, columns: '1fr', gap: 0, ...}]}};
23
35
  * children = [{ viewUrl: '/main.js', context: { label: 'WC', ...}, layoutConfig: {column: '1 / -1', ...}, eventListeners: [{ source: 'input1', ...}}]}];
24
- * myContainer.compoundConfig = { renderer, children };
36
+ * @example myContainer.compoundConfig = { renderer, children };
25
37
  */
26
- compoundConfig: Object;
38
+ compoundConfig: object;
27
39
 
28
40
  /**
29
- * If set to true defers from initializing the microfronted automatically. In that case init() can be used.
41
+ * If set to true defers from initializing the microfronted automatically. In that case init() can be used. <br><br>
42
+ * Type: [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
30
43
  * @since 1.0.0
31
- *
32
- * @example <luigi-container viewurl="/index.html" defer-init></luigi-container>
44
+ * @type {Boolean}
45
+ * @kind member
46
+ * @memberof LuigiCompoundContainer
47
+ * @example <luigi-compound-container viewurl="/index.html" defer-init></luigi-compound-container>
33
48
  * @example myContainer.deferInit = true
34
49
  */
35
50
  deferInit: boolean;
36
51
 
37
52
  /**
38
53
  *
39
- * The locale to be passed to the compound micro frontend.
54
+ * The locale to be passed to the compound micro frontend. <br><br>
55
+ * Type: [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
40
56
  * @since 1.4.0
41
- *
42
- * @example <luigi-container locale="en_us"></luigi-container>
57
+ * @type {String}
58
+ * @kind member
59
+ * @memberof LuigiCompoundContainer
60
+ * @example <luigi-compound-container locale="en_us"></luigi-compound-container>
43
61
  * @example myContainer.locale = "en_us"
44
62
  */
45
63
  locale: string;
46
64
 
47
65
  /**
48
- * The parameters to be passed to the compound micro frontend. Will not be passed to the compound children.
66
+ * The parameters to be passed to the compound micro frontend. Will not be passed to the compound children. <br><br>
67
+ * Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
49
68
  * @since 1.0.0
50
- *
51
- * @example <luigi-container viewurl="/index.html" node-params='{"node":"param"}'></luigi-container>
69
+ * @type {Object}
70
+ * @kind member
71
+ * @memberof LuigiCompoundContainer
72
+ * @example <luigi-compound-container viewurl="/index.html" node-params='{"node":"param"}'></luigi-compound-container>
52
73
  * @example myContainer.nodeParams = {foo: bar}
53
74
  */
54
- nodeParams: Object;
75
+ nodeParams: object;
55
76
 
56
77
  /**
57
- * If set to true, the Luigi compound container webcomponent will not use the shadow DOM for rendering.
78
+ * If set to true, the Luigi compound container webcomponent will not use the shadow DOM for rendering. <br><br>
79
+ * Type: [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
58
80
  * @since 1.2.0
59
- *
60
- * @example <luigi-container viewurl="/index.html" no-shadow></luigi-container>
81
+ * @type {Boolean}
82
+ * @kind member
83
+ * @memberof LuigiCompoundContainer
84
+ * @example <luigi-compound-container viewurl="/index.html" no-shadow></luigi-compound-container>
61
85
  * @example myContainer.noShadow = true
62
86
  */
63
87
  noShadow: boolean;
64
88
 
65
89
  /**
66
- * The search parameters to be passed to the compound micro frontend.
90
+ * The search parameters to be passed to the compound micro frontend. <br><br>
91
+ * Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
67
92
  * @since 1.0.0
68
- *
69
- * @example <luigi-container viewurl="/index.html" search-params='{"search":"param"}'></luigi-container>
93
+ * @type {Object}
94
+ * @kind member
95
+ * @memberof LuigiCompoundContainer
96
+ * @example <luigi-compound-container viewurl="/index.html" search-params='{"search":"param"}'></luigi-compound-container>
70
97
  * @example myContainer.searchParams = {foo: bar}
71
98
  */
72
- searchParams: Object;
99
+ searchParams: object;
73
100
 
74
101
  /**
75
- * The path parameters to be passed to the compound micro frontend.
102
+ * The path parameters to be passed to the compound micro frontend. <br><br>
103
+ * Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
76
104
  * @since 1.0.0
77
- *
78
- * @example <luigi-container viewurl="/index.html" path-params='{"path":"param"}'></luigi-container>
105
+ * @type {Object}
106
+ * @kind member
107
+ * @memberof LuigiCompoundContainer
108
+ * @example <luigi-compound-container viewurl="/index.html" path-params='{"path":"param"}'></luigi-compound-container>
79
109
  * @example myContainer.pathParams = {foo: "bar"}
80
110
  */
81
- pathParams: Object;
111
+ pathParams: object;
82
112
 
83
113
  /**
84
- * The stringified context to be passed to the compound microfrontend.
114
+ * The stringified context to be passed to the compound microfrontend. <br><br>
115
+ * Type: [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
85
116
  * @since 1.0.0
86
- *
87
- * @example <luigi-container viewUrl="/index.html" context='{"label": "Dashboard"}'></luigi-container>
117
+ * @type {String}
118
+ * @kind member
119
+ * @memberof LuigiCompoundContainer
120
+ * @example <luigi-compound-container viewurl="/index.html" context='{"label": "Dashboard"}'></luigi-compound-container>
88
121
  * @example myContainer.context = {label: "Dashboard"}
89
122
  */
90
123
  context: string;
91
124
 
92
125
  /**
93
- * The clientPermissions to be passed to the compound micro frontend.
126
+ * The clientPermissions to be passed to the compound micro frontend. <br><br>
127
+ * Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
94
128
  * @since 1.0.0
95
- *
96
- * @example <luigi-container viewurl="/index.html" client-permissions='{"permission": "adminGroup"}'></luigi-container>
129
+ * @type {Object}
130
+ * @kind member
131
+ * @memberof LuigiCompoundContainer
132
+ * @example <luigi-compound-container viewurl="/index.html" client-permissions='{"permission": "adminGroup"}'></luigi-compound-container>
97
133
  * @example myContainer.clientPermissions = {permission: "adminGroup"}
98
134
  */
99
- clientPermissions: Object;
135
+ clientPermissions: object;
100
136
 
101
137
  /**
102
- * The user settings to be passed to the compound micro frontend.
138
+ * The user settings to be passed to the compound micro frontend. <br><br>
139
+ * Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
103
140
  * @since 1.0.0
104
- *
105
- * @example <luigi-container viewurl="/index.html" user-settings='{"language": "de", "theme":"sap_horizon"}'></luigi-container>
141
+ * @type {Object}
142
+ * @kind member
143
+ * @memberof LuigiCompoundContainer
144
+ * @example <luigi-compound-container viewurl="/index.html" user-settings='{"language": "de", "theme":"sap_horizon"}'></luigi-compound-container>
106
145
  * @example myContainer.userSettings = {language: 'de', theme: 'sap_horizon'}
107
146
  */
108
- userSettings: Object;
147
+ userSettings: object;
109
148
 
110
149
  /**
111
- * The anchor value to be passed to the compound micro frontend.
150
+ * The anchor value to be passed to the compound micro frontend. <br><br>
151
+ * Type: [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
112
152
  * @since 1.0.0
113
- *
114
- * @example <luigi-container viewurl="/index.html" anchor='#foo'></luigi-container>
153
+ * @type {String}
154
+ * @kind member
155
+ * @memberof LuigiCompoundContainer
156
+ * @example <luigi-compound-container viewurl="/index.html" anchor='#foo'></luigi-compound-container>
115
157
  * @example myContainer.anchor = '#foo'
116
158
  */
117
159
  anchor: string;
118
160
 
119
161
  /**
120
- * The document title value to be passed to the compound micro frontend.
162
+ * The document title value to be passed to the compound micro frontend. <br><br>
163
+ * Type: [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
121
164
  * @since 1.2.0
122
- *
123
- * @example <luigi-container viewurl="/index.html" document-title='Luigi App'></luigi-container>
165
+ * @type {String}
166
+ * @kind member
167
+ * @memberof LuigiCompoundContainer
168
+ * @example <luigi-compound-container viewurl="/index.html" document-title='Luigi App'></luigi-compound-container>
124
169
  * @example myContainer.documentTitle = 'Luigi App'
125
170
  */
126
171
  documentTitle: string;
127
172
 
128
173
  /**
129
174
  * The hasBack value to be passed to the compound micro frontend.
130
- * It indicates that there is one or more preserved views. Useful when you need to show a back button.
175
+ * It indicates that there is one or more preserved views. Useful when you need to show a back button. <br><br>
176
+ * Type: [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
131
177
  * @since 1.2.0
132
- *
133
- * @example <luigi-container viewurl="/index.html" has-back></luigi-container>
178
+ * @type {Boolean}
179
+ * @kind member
180
+ * @memberof LuigiCompoundContainer
181
+ * @example <luigi-compound-container viewurl="/index.html" has-back></luigi-compound-container>
134
182
  * @example myContainer.hasBack = true
135
183
  */
136
184
  hasBack: boolean;
137
185
 
138
186
  /**
139
187
  * The dirty status value to be passed to the compound micro frontend.
140
- * It's used to indicate that there are unsaved changes when navigating away.
188
+ * It's used to indicate that there are unsaved changes when navigating away. <br><br>
189
+ * Type: [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
141
190
  * @since 1.2.0
142
- *
143
- * @example <luigi-container viewurl="/index.html" dirty-status></luigi-container>
191
+ * @type {Boolean}
192
+ * @kind member
193
+ * @memberof LuigiCompoundContainer
194
+ * @example <luigi-compound-container viewurl="/index.html" dirty-status></luigi-compound-container>
144
195
  * @example myContainer.dirtyStatus = true
145
196
  */
146
197
  dirtyStatus: boolean;
147
198
 
148
199
  /**
149
- * The following properties can be set for the web component object. By default, the web component is set to true.
150
- * @param {Object} [WebComponentSettings]
151
- * @param {string} WebComponentSettings.type: string, like module.
152
- * @param {boolean} WebComponentSettings.selfRegistered: if it is true, the web component bundle will be added via script tag.
153
- * @param {string} WebComponentSettings.tagName: tag name where web component is added to DOM.
154
- * @param {string} string must be a stringified JSON object from type `WebComponentSettings`.
200
+ * @description The following properties can be set for the web component object. By default, the web component is set to true. <br><br>Type: [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | WebComponentSettings | [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
201
+ * @param {Object} [WebComponentSettings] - specifies that the microfrontend is a webcomponent with addtional settings
202
+ * @param {String} WebComponentSettings.type - string, like module
203
+ * @param {Boolean} WebComponentSettings.selfRegistered - if it is true, the web component bundle will be added via script tag
204
+ * @param {String} WebComponentSettings.tagName - tag name where web component is added to DOM
205
+ * @param {String} string - must be a stringified JSON object from type `WebComponentSettings`
155
206
  * @since 1.0.0
156
- *
157
- * @example <luigi-container webcomponent="{ type: 'module', selfRegistered: true, tagName: 'my-webcomponent'}"></luigi-container>
207
+ * @type {Boolean|WebComponentSettings|String}
208
+ * @kind member
209
+ * @memberof LuigiCompoundContainer
210
+ * @example <luigi-compound-container webcomponent='{"type": "module", "selfRegistered": true, "tagName": "my-webcomponent"}'></luigi-compound-container>
158
211
  * @example myContainer.webcomponent = { type: 'module', selfRegistered: true, tagName: 'my-webcomponent'}
159
212
  */
160
213
  webcomponent: boolean | WebComponentSettings | string;
161
214
 
162
215
  /**
163
- * If set to true, skips handshake and ready event is fired immediately.
216
+ * If set to true, skips handshake and ready event is fired immediately. <br><br>
217
+ * Type: [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
164
218
  * @since 1.4.0
165
- *
166
- * @example <luigi-container viewurl="/index.html" skipInitCheck></luigi-container>
219
+ * @type {Boolean}
220
+ * @kind member
221
+ * @memberof LuigiCompoundContainer
222
+ * @example <luigi-compound-container viewurl="/index.html" skipInitCheck></luigi-compound-container>
167
223
  * @example myContainer.skipInitCheck = true
168
224
  */
169
225
  skipInitCheck: boolean;
170
226
 
171
227
  /**
172
- * The list of active feature toggles to be passed to the compound microfrontend.
228
+ * The list of active feature toggles to be passed to the compound microfrontend. <br><br>
229
+ * Type: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)>
173
230
  * @since 1.4.0
174
- *
175
- *
176
- * @example <luigi-container viewUrl="/index.html" active-feature-toggle-list='["enable-foo", "allow-bar"]'></luigi-container>
231
+ * @type {Array<string>}
232
+ * @kind member
233
+ * @memberof LuigiCompoundContainer
177
234
  * @example myContainer.activeFeatureToggleList = ["enable-foo", "allow-bar"]
235
+ * @example <luigi-compound-container viewurl="/index.html" active-feature-toggle-list='["enable-foo", "allow-bar"]'></luigi-compound-container>
178
236
  */
179
237
  activeFeatureToggleList: string[];
180
238
 
181
239
  /**
182
- * The theme to be passed to the compound microfrontend.
240
+ * The theme to be passed to the compound microfrontend. <br><br>
241
+ * Type: [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
183
242
  * @since 1.4.0
184
- *
185
- *
186
- * @example <luigi-container viewUrl="/index.html" theme='sap_horizon'></luigi-container>
243
+ * @type {String}
244
+ * @kind member
245
+ * @memberof LuigiCompoundContainer
246
+ * @example <luigi-compound-container viewurl="/index.html" theme='sap_horizon'></luigi-compound-container>
187
247
  * @example myContainer.theme = 'sap_horizon'
188
248
  */
189
249
  theme: string;
190
250
 
191
251
  /**
192
252
  * Function that updates the context of the compound microfrontend.
193
- * @param contextObj The context data
194
- * @example
195
- * containerElement.updateContext({newContextData: 'some data'})
253
+ * @param {Object} contextObj - the context data
196
254
  * @since 1.0.0
255
+ * @memberof LuigiCompoundContainer
256
+ * @example containerElement.updateContext({newContextData: 'some data'})
257
+ * @returns {void} no explicit return type
197
258
  */
198
- updateContext(contextObj: Object): void;
259
+ updateContext(contextObj: Object): void {};
199
260
 
200
261
  /**
201
262
  * A function that notifies the microfrontend that the opened alert has been closed.
202
- * @param id the id of the opened alert
203
- * @param dismissKey the key specifying which dismiss link was clicked on the alert message (optional)
204
- * @example
205
- * containerElement.notifyAlertClosed('my-alert-id', 'my-dismiss-key')
263
+ * @param {String} id - the id of the opened alert
264
+ * @param {String} dismissKey - the key specifying which dismiss link was clicked on the alert message (optional)
206
265
  * @since 1.7.0
266
+ * @memberof LuigiCompoundContainer
267
+ * @example containerElement.notifyAlertClosed('my-alert-id', 'my-dismiss-key')
268
+ * @returns {void} no explicit return type
207
269
  */
208
- notifyAlertClosed(id: string, dismissKey?: string): void;
270
+ notifyAlertClosed(id: string, dismissKey?: string): void {};
209
271
 
210
272
  /**
211
273
  * A function that notifies the microfrontend if the confirmation modal was confirmed or declined.
212
- * @param {boolean} value if the confirmation modal was confirmed or declined.
213
- * @example
214
- * containerElement.notifyAlertClosed(true)
274
+ * @param {Boolean} value - if the confirmation modal was confirmed or declined.
215
275
  * @since 1.7.0
276
+ * @memberof LuigiCompoundContainer
277
+ * @example containerElement.notifyAlertClosed(true)
278
+ * @returns {void} no explicit return type
216
279
  */
217
- notifyConfirmationModalClosed(confirmed: boolean): void;
280
+ notifyConfirmationModalClosed(confirmed: boolean): void {};
218
281
 
219
282
  /**
220
283
  * Manually triggers the micro frontend rendering process when using the defer-init attribute.
221
284
  * @since 1.0.0
285
+ * @memberof LuigiCompoundContainer
286
+ * @example containerElement.init()
287
+ * @returns {void} no explicit return type
222
288
  */
223
- init(): void;
289
+ init(): void {};
224
290
  }