@luigi-project/container 1.7.0 → 1.7.1
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.
- package/LuigiContainer.svelte.d.ts +1 -2
- package/bundle.js +1 -1
- package/bundle.js.map +1 -1
- package/constants/event-payloads.ts +71 -0
- package/constants/events.d.ts +248 -20
- package/constants/events.js +235 -19
- package/dist/custom-elements.json +48 -132
- package/index.d.ts +1 -1
- package/package.json +2 -2
package/constants/events.js
CHANGED
|
@@ -3,142 +3,358 @@ var Events;
|
|
|
3
3
|
(function (Events) {
|
|
4
4
|
/**
|
|
5
5
|
* Event fired when the micro frontend sends a custom message.
|
|
6
|
+
* @type {Object}
|
|
7
|
+
* @property {object} data - event data
|
|
8
|
+
* @property {string} id - event ID
|
|
9
|
+
* @example
|
|
10
|
+
* {
|
|
11
|
+
* data: {},
|
|
12
|
+
* id: 'some-id'
|
|
13
|
+
* }
|
|
14
|
+
* @returns {void}
|
|
15
|
+
*
|
|
16
|
+
* <br>
|
|
6
17
|
*/
|
|
7
18
|
Events.CUSTOM_MESSAGE = 'custom-message';
|
|
8
19
|
/**
|
|
9
|
-
* Event
|
|
20
|
+
* Event left due to historical reasons - do not use.
|
|
21
|
+
* @deprecated
|
|
22
|
+
* @ignore
|
|
10
23
|
*/
|
|
11
24
|
Events.GET_CONTEXT_REQUEST = 'get-context-request';
|
|
12
25
|
/**
|
|
13
|
-
* Event fired when a navigation has been requested by the micro frontend.
|
|
26
|
+
* Event fired when a navigation has been requested by the micro frontend. <br><br>
|
|
27
|
+
* Payload: {@link https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts|NavigationRequestPayload}
|
|
28
|
+
* @type {NavigationRequestPayload}
|
|
29
|
+
* @example
|
|
30
|
+
* {
|
|
31
|
+
* fromClosestContext: false,
|
|
32
|
+
* fromContext: null,
|
|
33
|
+
* fromParent: true,
|
|
34
|
+
* fromVirtualTreeRoot: false,
|
|
35
|
+
* link: '/test/route',
|
|
36
|
+
* nodeParams: {}
|
|
37
|
+
* }
|
|
38
|
+
* @returns {void}
|
|
39
|
+
*
|
|
40
|
+
* <br>
|
|
14
41
|
*/
|
|
15
42
|
Events.NAVIGATION_REQUEST = 'navigation-request';
|
|
16
43
|
/**
|
|
17
|
-
* Event fired when the micro frontend requests to show an alert.
|
|
44
|
+
* Event fired when the micro frontend requests to show an alert. <br>
|
|
45
|
+
* Read more about `showAlert` params [here](https://docs.luigi-project.io/docs/luigi-core-api?section=showalert). <br><br>
|
|
46
|
+
* Payload: {@link https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts|AlertRequestPayload}
|
|
47
|
+
* @type {AlertRequestPayload}
|
|
48
|
+
* @example
|
|
49
|
+
* {
|
|
50
|
+
* text: 'Custom alert message',
|
|
51
|
+
* type: 'info',
|
|
52
|
+
* links: {
|
|
53
|
+
* goToHome: { text: 'Homepage', url: '/overview' },
|
|
54
|
+
* goToOtherProject: { text: 'Other project', url: '/projects/pr2' },
|
|
55
|
+
* relativePath: { text: 'Hide side nav', url: 'hideSideNav' },
|
|
56
|
+
* neverShowItAgain: { text: 'Never show it again', dismissKey: 'neverShowItAgain' }
|
|
57
|
+
* },
|
|
58
|
+
* closeAfter: 3000
|
|
59
|
+
* }
|
|
60
|
+
* @returns {void}
|
|
61
|
+
*
|
|
62
|
+
* <br>
|
|
18
63
|
*/
|
|
19
64
|
Events.ALERT_REQUEST = 'show-alert-request';
|
|
20
65
|
/**
|
|
21
66
|
* Event left due to historical reasons - do not use.
|
|
22
67
|
* @deprecated
|
|
68
|
+
* @ignore
|
|
23
69
|
*/
|
|
24
70
|
Events.ALERT_CLOSED = 'close-alert-request';
|
|
25
71
|
/**
|
|
26
72
|
* Event fired when the micro frontend has been initialized.
|
|
73
|
+
* @type {unspecified} (type is not relevant in this case)
|
|
74
|
+
* @returns {void}
|
|
75
|
+
*
|
|
76
|
+
* <br>
|
|
27
77
|
*/
|
|
28
78
|
Events.INITIALIZED = 'initialized';
|
|
29
79
|
/**
|
|
30
|
-
* Event fired when the micro frontend requests the addition of search parameters to the URL.
|
|
80
|
+
* Event fired when the micro frontend requests the addition of search parameters to the URL. <br><br>
|
|
81
|
+
* Payload: {@link https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts|ParamsRequestPayload}
|
|
82
|
+
* @type {ParamsRequestPayload}
|
|
83
|
+
* @example
|
|
84
|
+
* {
|
|
85
|
+
* data: {},
|
|
86
|
+
* keepBrowserHistory: false
|
|
87
|
+
* }
|
|
88
|
+
* @returns {void}
|
|
89
|
+
*
|
|
90
|
+
* <br>
|
|
31
91
|
*/
|
|
32
92
|
Events.ADD_SEARCH_PARAMS_REQUEST = 'add-search-params-request';
|
|
33
93
|
/**
|
|
34
|
-
* Event fired when the micro frontend requests the addition of node parameters to the URL.
|
|
94
|
+
* Event fired when the micro frontend requests the addition of node parameters to the URL. <br><br>
|
|
95
|
+
* Payload: {@link https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts|ParamsRequestPayload}
|
|
96
|
+
* @type {ParamsRequestPayload}
|
|
97
|
+
* @example
|
|
98
|
+
* {
|
|
99
|
+
* data: {},
|
|
100
|
+
* keepBrowserHistory: false
|
|
101
|
+
* }
|
|
102
|
+
* @returns {void}
|
|
103
|
+
*
|
|
104
|
+
* <br>
|
|
35
105
|
*/
|
|
36
106
|
Events.ADD_NODE_PARAMS_REQUEST = 'add-node-params-request';
|
|
37
107
|
/**
|
|
38
|
-
* Event fired when the micro frontend requests to show a confirmation modal.
|
|
108
|
+
* Event fired when the micro frontend requests to show a confirmation modal. <br>
|
|
109
|
+
* Read more about `showConfirmationModal` params [here](https://docs.luigi-project.io/docs/luigi-core-api?section=showconfirmationmodal). <br><br>
|
|
110
|
+
* Payload: {@link https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts|ConfirmationModalRequestPayload}
|
|
111
|
+
* @type {ConfirmationModalRequestPayload}
|
|
112
|
+
* @example
|
|
113
|
+
* {
|
|
114
|
+
* header: 'Confirmation',
|
|
115
|
+
* body: 'Are you sure you want to do this?',
|
|
116
|
+
* buttonConfirm: 'Yes',
|
|
117
|
+
* buttonDismiss: 'No'
|
|
118
|
+
* }
|
|
119
|
+
* @returns {void}
|
|
120
|
+
*
|
|
121
|
+
* <br>
|
|
39
122
|
*/
|
|
40
123
|
Events.SHOW_CONFIRMATION_MODAL_REQUEST = 'show-confirmation-modal-request';
|
|
41
124
|
/**
|
|
42
125
|
* Event fired when the micro frontend requests to show a loading indicator.
|
|
126
|
+
* @type {unspecified} (type is not relevant in this case)
|
|
127
|
+
* @returns {void}
|
|
128
|
+
*
|
|
129
|
+
* <br>
|
|
43
130
|
*/
|
|
44
131
|
Events.SHOW_LOADING_INDICATOR_REQUEST = 'show-loading-indicator-request';
|
|
45
132
|
/**
|
|
46
133
|
* Event fired when the micro frontend requests to hide the loading indicator.
|
|
134
|
+
* @type {unspecified} (type is not relevant in this case)
|
|
135
|
+
* @returns {void}
|
|
136
|
+
*
|
|
137
|
+
* <br>
|
|
47
138
|
*/
|
|
48
139
|
Events.HIDE_LOADING_INDICATOR_REQUEST = 'hide-loading-indicator-request';
|
|
49
140
|
/**
|
|
50
141
|
* Event fired when the micro frontend requests to set the current locale.
|
|
142
|
+
* @type {Object.<string, string>}
|
|
143
|
+
* @example
|
|
144
|
+
* {
|
|
145
|
+
* currentLocale: 'en'
|
|
146
|
+
* }
|
|
147
|
+
* @returns {void}
|
|
148
|
+
*
|
|
149
|
+
* <br>
|
|
51
150
|
*/
|
|
52
151
|
Events.SET_CURRENT_LOCALE_REQUEST = 'set-current-locale-request';
|
|
53
152
|
/**
|
|
54
153
|
* Event fired when the micro frontend requests to modify the local storage.
|
|
154
|
+
* @type {Object.<string, string>}
|
|
155
|
+
* @example
|
|
156
|
+
* {
|
|
157
|
+
* key: 'luigi-version',
|
|
158
|
+
* value: '2.21.0'
|
|
159
|
+
* }
|
|
160
|
+
* @returns {void}
|
|
161
|
+
*
|
|
162
|
+
* <br>
|
|
55
163
|
*/
|
|
56
164
|
Events.LOCAL_STORAGE_SET_REQUEST = 'set-storage-request';
|
|
57
165
|
/**
|
|
58
166
|
* Event fired when the micro frontend requests to handle errors that might happen during the runtime of the micro frontend.
|
|
167
|
+
* @type {unspecified} (type is not relevant in this case)
|
|
168
|
+
* @returns {void}
|
|
169
|
+
*
|
|
170
|
+
* <br>
|
|
59
171
|
*/
|
|
60
172
|
Events.RUNTIME_ERROR_HANDLING_REQUEST = 'runtime-error-handling-request';
|
|
61
173
|
/**
|
|
62
174
|
* Event fired when the micro frontend requests to set the anchor of the URL.
|
|
175
|
+
* @type {string}
|
|
176
|
+
* @example 'some-anchor'
|
|
177
|
+
* @returns {void}
|
|
178
|
+
*
|
|
179
|
+
* <br>
|
|
63
180
|
*/
|
|
64
181
|
Events.SET_ANCHOR_LINK_REQUEST = 'set-anchor-request';
|
|
65
182
|
/**
|
|
66
183
|
* Event fired when the micro frontend requests to set third-party cookies.
|
|
184
|
+
* @type {unspecified} (type is not relevant in this case)
|
|
185
|
+
* @returns {void}
|
|
186
|
+
*
|
|
187
|
+
* <br>
|
|
67
188
|
*/
|
|
68
189
|
Events.SET_THIRD_PARTY_COOKIES_REQUEST = 'set-third-party-cookies-request';
|
|
69
190
|
/**
|
|
70
|
-
* Event
|
|
71
|
-
* @deprecated
|
|
191
|
+
* Event left due to historical reasons - use 'GO_BACK_REQUEST' instead.
|
|
192
|
+
* @deprecated
|
|
193
|
+
* @ignore
|
|
72
194
|
*/
|
|
73
195
|
Events.BACK_NAVIGATION_REQUEST = 'navigate-back-request';
|
|
74
196
|
/**
|
|
75
|
-
* Event fired when the micro frontend requests the current app route.
|
|
197
|
+
* Event fired when the micro frontend requests the current app route. <br><br>
|
|
198
|
+
* Payload: {@link https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts|CurrentRouteRequestPayload}
|
|
199
|
+
* @type {CurrentRouteRequestPayload}
|
|
200
|
+
* @example
|
|
201
|
+
* {
|
|
202
|
+
* fromClosestContext: false,
|
|
203
|
+
* fromContext: null,
|
|
204
|
+
* fromParent: true,
|
|
205
|
+
* fromVirtualTreeRoot: false,
|
|
206
|
+
* nodeParams: {}
|
|
207
|
+
* }
|
|
208
|
+
* @returns {void}
|
|
209
|
+
*
|
|
210
|
+
* <br>
|
|
76
211
|
*/
|
|
77
212
|
Events.GET_CURRENT_ROUTE_REQUEST = 'get-current-route-request';
|
|
78
213
|
/**
|
|
79
214
|
* Event fired to report that the micro frontend's navigation has completed.
|
|
215
|
+
* @type {unspecified} (type is not relevant in this case)
|
|
216
|
+
* @returns {void}
|
|
217
|
+
*
|
|
218
|
+
* <br>
|
|
80
219
|
*/
|
|
81
220
|
Events.NAVIGATION_COMPLETED_REPORT = 'report-navigation-completed-request';
|
|
82
221
|
/**
|
|
83
|
-
* Event fired when the micro frontend requests to update the modal path parameters.
|
|
222
|
+
* Event fired when the micro frontend requests to update the modal path parameters. <br><br>
|
|
223
|
+
* Payload: {@link https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts|ModalPathDataRequestPayload}
|
|
224
|
+
* @type {ModalPathDataRequestPayload}
|
|
225
|
+
* @example
|
|
226
|
+
* {
|
|
227
|
+
* fromClosestContext: false,
|
|
228
|
+
* fromContext: null,
|
|
229
|
+
* fromParent: true,
|
|
230
|
+
* fromVirtualTreeRoot: false,
|
|
231
|
+
* history: true,
|
|
232
|
+
* link: '/test/route',
|
|
233
|
+
* modal: { title: 'Some modal' },
|
|
234
|
+
* nodeParams: {}
|
|
235
|
+
* }
|
|
236
|
+
* @returns {void}
|
|
237
|
+
*
|
|
238
|
+
* <br>
|
|
84
239
|
*/
|
|
85
240
|
Events.UPDATE_MODAL_PATH_DATA_REQUEST = 'update-modal-path-data-request';
|
|
86
241
|
/**
|
|
87
|
-
* Event fired when the micro frontend requests to update the modal settings.
|
|
242
|
+
* Event fired when the micro frontend requests to update the modal settings. <br>
|
|
243
|
+
* Read more about `updateModalSettings` params [here](https://docs.luigi-project.io/docs/luigi-client-api?section=updatemodalsettings). <br><br>
|
|
244
|
+
* Payload: {@link https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts|ModalSettingsRequestPayload}
|
|
245
|
+
* @type {ModalSettingsRequestPayload}
|
|
246
|
+
* @example
|
|
247
|
+
* {
|
|
248
|
+
* addHistoryEntry: true,
|
|
249
|
+
* updatedModalSettings: {}
|
|
250
|
+
* }
|
|
251
|
+
* @returns {void}
|
|
252
|
+
*
|
|
253
|
+
* <br>
|
|
88
254
|
*/
|
|
89
255
|
Events.UPDATE_MODAL_SETTINGS_REQUEST = 'update-modal-settings-request';
|
|
90
256
|
/**
|
|
91
257
|
* Event fired when the micro frontend requests to check the validity of a path.
|
|
258
|
+
* @type {Object.<string, string>}
|
|
259
|
+
* @example
|
|
260
|
+
* {
|
|
261
|
+
* link: '/test/route'
|
|
262
|
+
* }
|
|
263
|
+
* @returns {void}
|
|
264
|
+
*
|
|
265
|
+
* <br>
|
|
92
266
|
*/
|
|
93
267
|
Events.CHECK_PATH_EXISTS_REQUEST = 'check-path-exists-request';
|
|
94
268
|
/**
|
|
95
269
|
* Event fired when the micro frontend requests to set the 'dirty status' which, for example, avoids closing when there are any unsaved changes.
|
|
270
|
+
* @type {Object.<string, boolean>}
|
|
271
|
+
* @example
|
|
272
|
+
* {
|
|
273
|
+
* dirty: true
|
|
274
|
+
* }
|
|
275
|
+
* @returns {void}
|
|
276
|
+
*
|
|
277
|
+
* <br>
|
|
96
278
|
*/
|
|
97
279
|
Events.SET_DIRTY_STATUS_REQUEST = 'set-dirty-status-request';
|
|
98
280
|
/**
|
|
99
281
|
* Event fired when the micro frontend requests to set the view group data.
|
|
282
|
+
* @type {Object.<string, unknown>}
|
|
283
|
+
* @example
|
|
284
|
+
* {
|
|
285
|
+
* vg: 'some data'
|
|
286
|
+
* }
|
|
287
|
+
* @returns {void}
|
|
288
|
+
*
|
|
289
|
+
* <br>
|
|
100
290
|
*/
|
|
101
291
|
Events.SET_VIEW_GROUP_DATA_REQUEST = 'set-viewgroup-data-request';
|
|
102
292
|
/**
|
|
103
|
-
* Event
|
|
293
|
+
* Event left due to historical reasons - do not use.
|
|
104
294
|
* @deprecated
|
|
295
|
+
* @ignore
|
|
105
296
|
*/
|
|
106
297
|
Events.SET_DOCUMENT_TITLE_REQUEST = 'set-document-title-request';
|
|
107
298
|
/**
|
|
108
|
-
* Event
|
|
299
|
+
* Event left due to historical reasons - do not use.
|
|
300
|
+
* @deprecated
|
|
301
|
+
* @ignore
|
|
109
302
|
*/
|
|
110
303
|
Events.OPEN_USER_SETTINGS_REQUEST = 'open-user-settings-request';
|
|
111
304
|
/**
|
|
112
|
-
* Event
|
|
305
|
+
* Event left due to historical reasons - do not use.
|
|
306
|
+
* @deprecated
|
|
307
|
+
* @ignore
|
|
113
308
|
*/
|
|
114
309
|
Events.CLOSE_USER_SETTINGS_REQUEST = 'close-user-settings-request';
|
|
115
310
|
/**
|
|
116
|
-
* Event
|
|
311
|
+
* Event left due to historical reasons - do not use.
|
|
312
|
+
* @deprecated
|
|
313
|
+
* @ignore
|
|
117
314
|
*/
|
|
118
315
|
Events.COLLAPSE_LEFT_NAV_REQUEST = 'collapse-leftnav-request';
|
|
119
316
|
/**
|
|
120
|
-
* Event
|
|
317
|
+
* Event left due to historical reasons - do not use.
|
|
318
|
+
* @deprecated
|
|
319
|
+
* @ignore
|
|
121
320
|
*/
|
|
122
321
|
Events.UPDATE_TOP_NAVIGATION_REQUEST = 'update-top-navigation-request';
|
|
123
322
|
/**
|
|
124
|
-
* Event
|
|
125
|
-
* @deprecated
|
|
323
|
+
* Event left due to historical reasons - use 'CHECK_PATH_EXISTS_REQUEST' instead.
|
|
324
|
+
* @deprecated
|
|
325
|
+
* @ignore
|
|
126
326
|
*/
|
|
127
327
|
Events.PATH_EXISTS_REQUEST = 'path-exists-request';
|
|
128
328
|
/**
|
|
129
329
|
* Event fired when the micro frontend requests to navigate back.
|
|
330
|
+
* @type {Object.<string, unknown>}
|
|
331
|
+
* @example
|
|
332
|
+
* {
|
|
333
|
+
* ctx: 'some context'
|
|
334
|
+
* }
|
|
335
|
+
* @returns {void}
|
|
336
|
+
*
|
|
337
|
+
* <br>
|
|
130
338
|
*/
|
|
131
339
|
Events.GO_BACK_REQUEST = 'go-back-request';
|
|
132
340
|
/**
|
|
133
|
-
* Event
|
|
341
|
+
* Event left due to historical reasons - do not use.
|
|
342
|
+
* @deprecated
|
|
343
|
+
* @ignore
|
|
134
344
|
*/
|
|
135
345
|
Events.HAS_BACK_REQUEST = 'has-back-request';
|
|
136
346
|
/**
|
|
137
347
|
* Event fired when the micro frontend requests to display the backdrop.
|
|
348
|
+
* @type {unspecified} (type is not relevant in this case)
|
|
349
|
+
* @returns {void}
|
|
350
|
+
*
|
|
351
|
+
* <br>
|
|
138
352
|
*/
|
|
139
353
|
Events.ADD_BACKDROP_REQUEST = 'add-backdrop-request';
|
|
140
354
|
/**
|
|
141
355
|
* Event fired when the micro frontend requests to remove the backdrop.
|
|
356
|
+
* @type {unspecified} (type is not relevant in this case)
|
|
357
|
+
* @returns {void}
|
|
142
358
|
*/
|
|
143
359
|
Events.REMOVE_BACKDROP_REQUEST = 'remove-backdrop-request';
|
|
144
360
|
})(Events || (Events = {}));
|