@luigi-project/container 1.3.0-dev.20241140032 → 1.3.0-dev.20241160030
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.
|
@@ -7,6 +7,9 @@ export declare interface WebComponentSettings {
|
|
|
7
7
|
export default class LuigiCompoundContainer extends HTMLElement {
|
|
8
8
|
/**
|
|
9
9
|
* The URL used for the renderer.
|
|
10
|
+
*
|
|
11
|
+
* @example <luigi-container viewurl="/index.html"></luigi-container>
|
|
12
|
+
* @example myContainer.viewurl = "/index.html"
|
|
10
13
|
*/
|
|
11
14
|
viewurl: string;
|
|
12
15
|
|
|
@@ -14,13 +17,19 @@ export default class LuigiCompoundContainer extends HTMLElement {
|
|
|
14
17
|
* The configuration for the compound microfrontend.
|
|
15
18
|
* Take a look at the [compound parameter](https://docs.luigi-project.io/docs/navigation-parameters-reference/?section=compound) for details.
|
|
16
19
|
* @since 1.0.0
|
|
17
|
-
*
|
|
20
|
+
*
|
|
21
|
+
* @example renderer = { use: 'grid', config: { columns: '1fr 1fr 1fr 2fr', layouts: [{maxWidth: 600, columns: '1fr', gap: 0, ...}]}};
|
|
22
|
+
* children = [{ viewUrl: '/main.js', context: { label: 'WC', ...}, layoutConfig: {column: '1 / -1', ...}, eventListeners: [{ source: 'input1', ...}}]}];
|
|
23
|
+
* myContainer.compoundConfig = { renderer, children };
|
|
18
24
|
*/
|
|
19
25
|
compoundConfig: Object;
|
|
20
26
|
|
|
21
27
|
/**
|
|
22
28
|
* If set to true defers from initializing the microfronted automatically. In that case init() can be used.
|
|
23
29
|
* @since 1.0.0
|
|
30
|
+
*
|
|
31
|
+
* @example <luigi-container viewurl="/index.html" defer-init></luigi-container>
|
|
32
|
+
* @example myContainer.deferInit = true
|
|
24
33
|
*/
|
|
25
34
|
deferInit: boolean;
|
|
26
35
|
|
|
@@ -28,60 +37,90 @@ export default class LuigiCompoundContainer extends HTMLElement {
|
|
|
28
37
|
*
|
|
29
38
|
* The locale to be passed to the compound micro frontend.
|
|
30
39
|
* @since NEXT_RELEASE_CONTAINER
|
|
40
|
+
*
|
|
41
|
+
* @example <luigi-container locale="en_us"></luigi-container>
|
|
42
|
+
* @example myContainer.locale = "en_us"
|
|
31
43
|
*/
|
|
32
44
|
locale: string;
|
|
33
45
|
|
|
34
46
|
/**
|
|
35
47
|
* The parameters to be passed to the compound micro frontend. Will not be passed to the compound children.
|
|
36
48
|
* @since 1.0.0
|
|
49
|
+
*
|
|
50
|
+
* @example <luigi-container viewurl="/index.html" node-params='{"node":"param"}'></luigi-container>
|
|
51
|
+
* @example myContainer.nodeParams = {foo: bar}
|
|
37
52
|
*/
|
|
38
53
|
nodeParams: Object;
|
|
39
54
|
|
|
40
55
|
/**
|
|
41
56
|
* If set to true, the Luigi compound container webcomponent will not use the shadow DOM for rendering.
|
|
42
57
|
* @since 1.2.0
|
|
58
|
+
*
|
|
59
|
+
* @example <luigi-container viewurl="/index.html" no-shadow></luigi-container>
|
|
60
|
+
* @example myContainer.noShadow = true
|
|
43
61
|
*/
|
|
44
62
|
noShadow: boolean;
|
|
45
63
|
|
|
46
64
|
/**
|
|
47
65
|
* The search parameters to be passed to the compound micro frontend.
|
|
48
66
|
* @since 1.0.0
|
|
67
|
+
*
|
|
68
|
+
* @example <luigi-container viewurl="/index.html" search-params='{"search":"param"}'></luigi-container>
|
|
69
|
+
* @example myContainer.searchParams = {foo: bar}
|
|
49
70
|
*/
|
|
50
71
|
searchParams: Object;
|
|
51
72
|
|
|
52
73
|
/**
|
|
53
74
|
* The path parameters to be passed to the compound micro frontend.
|
|
54
75
|
* @since 1.0.0
|
|
76
|
+
*
|
|
77
|
+
* @example <luigi-container viewurl="/index.html" path-params='{"path":"param"}'></luigi-container>
|
|
78
|
+
* @example myContainer.pathParams = {foo: "bar"}
|
|
55
79
|
*/
|
|
56
80
|
pathParams: Object;
|
|
57
81
|
|
|
58
82
|
/**
|
|
59
83
|
* The stringified context to be passed to the compound microfrontend.
|
|
60
84
|
* @since 1.0.0
|
|
85
|
+
*
|
|
86
|
+
* @example <luigi-container viewUrl="/index.html" context='{"label": "Dashboard"}'></luigi-container>
|
|
87
|
+
* @example myContainer.context = {label: "Dashboard"}
|
|
61
88
|
*/
|
|
62
89
|
context: string;
|
|
63
90
|
|
|
64
91
|
/**
|
|
65
92
|
* The clientPermissions to be passed to the compound micro frontend.
|
|
66
93
|
* @since 1.0.0
|
|
94
|
+
*
|
|
95
|
+
* @example <luigi-container viewurl="/index.html" client-permissions='{"permission": "adminGroup"}'></luigi-container>
|
|
96
|
+
* @example myContainer.clientPermissions = {permission: "adminGroup"}
|
|
67
97
|
*/
|
|
68
98
|
clientPermissions: Object;
|
|
69
99
|
|
|
70
100
|
/**
|
|
71
101
|
* The user settings to be passed to the compound micro frontend.
|
|
72
102
|
* @since 1.0.0
|
|
103
|
+
*
|
|
104
|
+
* @example <luigi-container viewurl="/index.html" user-settings='{"language": "de", "theme":"sap_horizon"}'></luigi-container>
|
|
105
|
+
* @example myContainer.userSettings = {language: 'de', theme: 'sap_horizon'}
|
|
73
106
|
*/
|
|
74
107
|
userSettings: Object;
|
|
75
108
|
|
|
76
109
|
/**
|
|
77
110
|
* The anchor value to be passed to the compound micro frontend.
|
|
78
111
|
* @since 1.0.0
|
|
112
|
+
*
|
|
113
|
+
* @example <luigi-container viewurl="/index.html" anchor='#foo'></luigi-container>
|
|
114
|
+
* @example myContainer.anchor = '#foo'
|
|
79
115
|
*/
|
|
80
116
|
anchor: string;
|
|
81
117
|
|
|
82
118
|
/**
|
|
83
119
|
* The document title value to be passed to the compound micro frontend.
|
|
84
120
|
* @since 1.2.0
|
|
121
|
+
*
|
|
122
|
+
* @example <luigi-container viewurl="/index.html" document-title='Luigi App'></luigi-container>
|
|
123
|
+
* @example myContainer.documentTitle = 'Luigi App'
|
|
85
124
|
*/
|
|
86
125
|
documentTitle: string;
|
|
87
126
|
|
|
@@ -89,13 +128,19 @@ export default class LuigiCompoundContainer extends HTMLElement {
|
|
|
89
128
|
* The hasBack value to be passed to the compound micro frontend.
|
|
90
129
|
* It indicates that there is one or more preserved views. Useful when you need to show a back button.
|
|
91
130
|
* @since 1.2.0
|
|
131
|
+
*
|
|
132
|
+
* @example <luigi-container viewurl="/index.html" has-back></luigi-container>
|
|
133
|
+
* @example myContainer.hasBack = true
|
|
92
134
|
*/
|
|
93
|
-
hasBack:
|
|
135
|
+
hasBack: boolean;
|
|
94
136
|
|
|
95
137
|
/**
|
|
96
138
|
* The dirty status value to be passed to the compound micro frontend.
|
|
97
139
|
* It's used to indicate that there are unsaved changes when navigating away.
|
|
98
140
|
* @since 1.2.0
|
|
141
|
+
*
|
|
142
|
+
* @example <luigi-container viewurl="/index.html" dirty-status></luigi-container>
|
|
143
|
+
* @example myContainer.dirtyStatus = true
|
|
99
144
|
*/
|
|
100
145
|
dirtyStatus: boolean;
|
|
101
146
|
|
|
@@ -107,24 +152,38 @@ export default class LuigiCompoundContainer extends HTMLElement {
|
|
|
107
152
|
* @param {string} WebComponentSettings.tagName: tag name where web component is added to DOM.
|
|
108
153
|
* @param {string} string must be a stringified JSON object from type `WebComponentSettings`.
|
|
109
154
|
* @since 1.0.0
|
|
155
|
+
*
|
|
156
|
+
* @example <luigi-container webcomponent="{ type: 'module', selfRegistered: true, tagName: 'my-webcomponent'}"></luigi-container>
|
|
157
|
+
* @example myContainer.webcomponent = { type: 'module', selfRegistered: true, tagName: 'my-webcomponent'}
|
|
110
158
|
*/
|
|
111
159
|
webcomponent: boolean | WebComponentSettings | string;
|
|
112
160
|
|
|
113
161
|
/**
|
|
114
162
|
* If set to true, skips handshake and ready event is fired immediately.
|
|
115
163
|
* @since NEXT_RELEASE_CONTAINER
|
|
164
|
+
*
|
|
165
|
+
* @example <luigi-container viewurl="/index.html" skipInitCheck></luigi-container>
|
|
166
|
+
* @example myContainer.skipInitCheck = true
|
|
116
167
|
*/
|
|
117
168
|
skipInitCheck: boolean;
|
|
118
169
|
|
|
119
170
|
/**
|
|
120
171
|
* The list of active feature toggles to be passed to the compound microfrontend.
|
|
121
172
|
* @since NEXT_RELEASE_CONTAINER
|
|
173
|
+
*
|
|
174
|
+
*
|
|
175
|
+
* @example <luigi-container viewUrl="/index.html" active-feature-toggle-list='["enable-foo", "allow-bar"]'></luigi-container>
|
|
176
|
+
* @example myContainer.activeFeatureToggleList = ["enable-foo", "allow-bar"]
|
|
122
177
|
*/
|
|
123
178
|
activeFeatureToggleList: string[];
|
|
124
179
|
|
|
125
180
|
/**
|
|
126
181
|
* The theme to be passed to the compound microfrontend.
|
|
127
182
|
* @since NEXT_RELEASE_CONTAINER
|
|
183
|
+
*
|
|
184
|
+
*
|
|
185
|
+
* @example <luigi-container viewUrl="/index.html" theme='sap_horizon'></luigi-container>
|
|
186
|
+
* @example myContainer.theme = 'sap_horizon'
|
|
128
187
|
*/
|
|
129
188
|
theme: string;
|
|
130
189
|
|
|
@@ -8,24 +8,37 @@ export default class LuigiContainer extends HTMLElement {
|
|
|
8
8
|
/**
|
|
9
9
|
* The URL of the microfrontend to be rendered
|
|
10
10
|
* @since 1.0.0
|
|
11
|
+
*
|
|
12
|
+
* @example <luigi-container viewurl="/index.html"></luigi-container>
|
|
13
|
+
* @example myContainer.viewurl = "/index.html"
|
|
11
14
|
*/
|
|
12
15
|
viewurl: string;
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
18
|
* If set to true defers from initializing the microfronted automatically. In that case init() can be used
|
|
16
19
|
* @since 1.0.0
|
|
20
|
+
*
|
|
21
|
+
* @example <luigi-container viewurl="/index.html" defer-init></luigi-container>
|
|
22
|
+
* @example myContainer.deferInit = true
|
|
17
23
|
*/
|
|
18
24
|
deferInit: boolean;
|
|
19
25
|
|
|
20
26
|
/**
|
|
21
27
|
* The stringified context object to be passed to the microfrontend
|
|
22
28
|
* @since 1.0.0
|
|
29
|
+
*
|
|
30
|
+
*
|
|
31
|
+
* @example <luigi-container viewUrl="/index.html" context='{"label": "Dashboard"}'></luigi-container>
|
|
32
|
+
* @example myContainer.context = {label: "Dashboard"}
|
|
23
33
|
*/
|
|
24
34
|
context: string;
|
|
25
35
|
|
|
26
36
|
/**
|
|
27
37
|
* Label information for the microfrontend
|
|
28
38
|
* @since 1.0.0
|
|
39
|
+
*
|
|
40
|
+
* @example <luigi-container viewUrl="/index.html" label="Dashboard"></luigi-container>
|
|
41
|
+
* @example myContainer.label = "Dashboard"
|
|
29
42
|
*/
|
|
30
43
|
label: string;
|
|
31
44
|
|
|
@@ -50,85 +63,123 @@ export default class LuigiContainer extends HTMLElement {
|
|
|
50
63
|
* The advantage of this line of code is: you don't have to specify a tag name, thus avoiding the duplication of self-defined tag names.
|
|
51
64
|
* </br>
|
|
52
65
|
* @since 1.0.0
|
|
66
|
+
* @example <luigi-container webcomponent="{ type: 'module', selfRegistered: true, tagName: 'my-webcomponent'}"></luigi-container>
|
|
67
|
+
* @example myContainer.webcomponent = { type: 'module', selfRegistered: true, tagName: 'my-webcomponent'}
|
|
53
68
|
*/
|
|
54
69
|
webcomponent: boolean | WebComponentSettings | string;
|
|
55
70
|
|
|
56
71
|
/**
|
|
57
72
|
* The locale to be passed to the web-component-based micro frontend
|
|
58
73
|
* @since 1.0.0
|
|
74
|
+
*
|
|
75
|
+
* @example <luigi-container locale="en_us"></luigi-container>
|
|
76
|
+
* @example myContainer.locale = "en_us"
|
|
59
77
|
*/
|
|
60
78
|
locale: string;
|
|
61
79
|
|
|
62
80
|
/**
|
|
63
81
|
* The theme to be passed to the web-component-based micro frontend
|
|
64
82
|
* @since 1.0.0
|
|
83
|
+
*
|
|
84
|
+
* @example <luigi-container viewurl="/index.html" theme='sap_horizon'></luigi-container>
|
|
85
|
+
* @example myContainer.theme = 'sap_horizon'
|
|
65
86
|
*/
|
|
66
87
|
theme: string;
|
|
67
88
|
|
|
68
89
|
/**
|
|
69
90
|
* The list of active feature toggles to be passed to the web-component-based micro frontend
|
|
70
91
|
* @since 1.0.0
|
|
92
|
+
*
|
|
93
|
+
* @example myContainer.activeFeatureToggleList = ["enable-foo", "allow-bar"]
|
|
94
|
+
* @example <luigi-container viewurl="/index.html" active-feature-toggle-list='["enable-foo", "allow-bar"]'></luigi-container>
|
|
71
95
|
*/
|
|
72
96
|
activeFeatureToggleList: string[];
|
|
73
97
|
|
|
74
98
|
/**
|
|
75
99
|
* If set to true, skips third party cookie check
|
|
76
100
|
* @since NEXT_RELEASE_CONTAINER
|
|
101
|
+
*
|
|
102
|
+
* @example <luigi-container viewurl="/index.html" skipCookieCheck></luigi-container>
|
|
103
|
+
* @example myContainer.skipCookieCheck = true
|
|
77
104
|
*/
|
|
78
|
-
skipCookieCheck:
|
|
105
|
+
skipCookieCheck: boolean;
|
|
79
106
|
|
|
80
107
|
/**
|
|
81
108
|
* If set to true, skips handshake and ready event is fired immediately
|
|
82
109
|
* @since 1.0.0
|
|
110
|
+
* TODO: https://developer.mozilla.org/en-US/docs/Glossary/Boolean/HTML says booleans should not use "true"/"false", find a consistent style for our docs.
|
|
111
|
+
* @example <luigi-container viewurl="/index.html" skipInitCheck></luigi-container>
|
|
112
|
+
* @example myContainer.skipInitCheck = true
|
|
83
113
|
*/
|
|
84
114
|
skipInitCheck: boolean;
|
|
85
115
|
|
|
86
116
|
/**
|
|
87
117
|
* The parameters to be passed to the web-component-based micro frontend.
|
|
88
118
|
* @since 1.0.0
|
|
119
|
+
*
|
|
120
|
+
* @example <luigi-container viewurl="/index.html" node-params='{"node":"param"}'></luigi-container>
|
|
121
|
+
* @example myContainer.nodeParams = {foo: bar}
|
|
89
122
|
*/
|
|
90
123
|
nodeParams: Object;
|
|
91
124
|
|
|
92
125
|
/**
|
|
93
126
|
* If set to true, the Luigi container webcomponent will not use the shadow DOM for rendering.
|
|
94
127
|
* @since 1.2.0
|
|
128
|
+
*
|
|
129
|
+
* @example <luigi-container viewurl="/index.html" no-shadow></luigi-container>
|
|
130
|
+
* @example myContainer.noShadow = true
|
|
95
131
|
*/
|
|
96
132
|
noShadow: boolean;
|
|
97
133
|
|
|
98
134
|
/**
|
|
99
135
|
* The search parameters to be passed to the web-component-based micro frontend.
|
|
100
136
|
* @since 1.0.0
|
|
137
|
+
*
|
|
138
|
+
* @example <luigi-container viewurl="/index.html" search-params='{"search":"param"}'></luigi-container>
|
|
139
|
+
* @example myContainer.searchParams = {foo: bar}
|
|
101
140
|
*/
|
|
102
141
|
searchParams: Object;
|
|
103
142
|
|
|
104
143
|
/**
|
|
105
144
|
* The path parameters to be passed to the web-component-based micro frontend.
|
|
106
145
|
* @since 1.0.0
|
|
146
|
+
*
|
|
147
|
+
* @example <luigi-container viewurl="/index.html" path-params='{"path":"param"}'></luigi-container>
|
|
148
|
+
* @example myContainer.pathParams = {foo: "bar"}
|
|
107
149
|
*/
|
|
108
150
|
pathParams: Object;
|
|
109
151
|
|
|
110
152
|
/**
|
|
111
153
|
* The clientPermissions to be passed to the web-component-based micro frontend.
|
|
112
154
|
* @since 1.0.0
|
|
155
|
+
*
|
|
156
|
+
* @example <luigi-container viewurl="/index.html" client-permissions='{"permission": "adminGroup"}'></luigi-container>
|
|
157
|
+
* @example myContainer.clientPermissions = {permission: "adminGroup"}
|
|
113
158
|
*/
|
|
114
159
|
clientPermissions: Object;
|
|
115
160
|
|
|
116
161
|
/**
|
|
117
162
|
* The user settings to be passed to the web-component-based micro frontend
|
|
118
163
|
* @since 1.0.0
|
|
164
|
+
*
|
|
165
|
+
* @example <luigi-container viewurl="/index.html" user-settings='{"language": "de", "theme":"sap_horizon"}'></luigi-container>
|
|
166
|
+
* @example myContainer.userSettings = {language: 'de', theme: 'sap_horizon'}
|
|
119
167
|
*/
|
|
120
168
|
userSettings: Object;
|
|
121
169
|
|
|
122
170
|
/**
|
|
123
171
|
* The anchor value to be passed to the web-component-based micro frontend.
|
|
124
172
|
* @since 1.0.0
|
|
173
|
+
*
|
|
174
|
+
* @example <luigi-container viewurl="/index.html" anchor='#foo'></luigi-container>
|
|
175
|
+
* @example myContainer.anchor = '#foo'
|
|
125
176
|
*/
|
|
126
177
|
anchor: string;
|
|
127
178
|
|
|
128
179
|
/**
|
|
129
180
|
* The list of rules for the content in the iframe, managed by the HTML `allow` attribute.
|
|
130
181
|
* You can use one or more rules by adding them to the array, for example allowRules: ["microphone", "camera"].
|
|
131
|
-
* @example <luigi-container
|
|
182
|
+
* @example <luigi-container viewurl="/index.html" allow-rules='["microphone", "camera"]'></luigi-container>
|
|
132
183
|
* @example containerElement.allowRules = ['microphone', 'camera']
|
|
133
184
|
* @since 1.2.0
|
|
134
185
|
*/
|
|
@@ -137,7 +188,7 @@ export default class LuigiContainer extends HTMLElement {
|
|
|
137
188
|
/**
|
|
138
189
|
* The list of rules for the content in the iframe, managed by the HTML `sandbox` attribute.
|
|
139
190
|
* You can use one or more rules by adding them to the array, for example sandboxRules: ["allow-scripts", "allow-same-origin"].
|
|
140
|
-
* @example <luigi-container
|
|
191
|
+
* @example <luigi-container viewurl="/index.html" sandbox-rules='["allow-scripts", "allow-same-origin"]'></luigi-container>
|
|
141
192
|
* @example containerElement.sandboxRules = ['allow-modals', 'allow-popups']
|
|
142
193
|
* @since 1.2.0
|
|
143
194
|
*/
|
|
@@ -146,6 +197,9 @@ export default class LuigiContainer extends HTMLElement {
|
|
|
146
197
|
/**
|
|
147
198
|
* The document title value to be passed to the web-component-based micro frontend.
|
|
148
199
|
* @since 1.2.0
|
|
200
|
+
*
|
|
201
|
+
* @example <luigi-container viewurl="/index.html" document-title='Luigi App'></luigi-container>
|
|
202
|
+
* @example myContainer.documentTitle = 'Luigi App'
|
|
149
203
|
*/
|
|
150
204
|
documentTitle: string;
|
|
151
205
|
|
|
@@ -153,13 +207,19 @@ export default class LuigiContainer extends HTMLElement {
|
|
|
153
207
|
* The hasBack value to be passed to the web-component-based micro frontend.
|
|
154
208
|
* It indicates that there is one or more preserved views. Useful when you need to show a back button.
|
|
155
209
|
* @since 1.2.0
|
|
210
|
+
*
|
|
211
|
+
* @example <luigi-container viewurl="/index.html" has-back></luigi-container>
|
|
212
|
+
* @example myContainer.hasBack = true
|
|
156
213
|
*/
|
|
157
|
-
hasBack:
|
|
214
|
+
hasBack: boolean;
|
|
158
215
|
|
|
159
216
|
/**
|
|
160
217
|
* The dirty status value to be passed to the web-component-based micro frontend.
|
|
161
218
|
* It's used to indicate that there are unsaved changes when navigating away.
|
|
162
219
|
* @since 1.2.0
|
|
220
|
+
*
|
|
221
|
+
* @example <luigi-container viewurl="/index.html" dirty-status></luigi-container>
|
|
222
|
+
* @example myContainer.dirtyStatus = true
|
|
163
223
|
*/
|
|
164
224
|
dirtyStatus: boolean;
|
|
165
225
|
|
package/package.json
CHANGED