@luigi-project/container 1.7.5-dev.202512110038 → 1.7.5-dev.202512130036

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