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

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