@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.
- package/LuigiCompoundContainer.svelte.d.ts +151 -85
- package/LuigiContainer.svelte.d.ts +178 -104
- package/bundle.js +1 -1
- package/bundle.js.map +1 -1
- package/constants/events.d.ts +407 -399
- package/constants/events.js +370 -365
- package/dist/custom-elements.json +50 -50
- package/package.json +1 -1
package/constants/events.d.ts
CHANGED
|
@@ -10,406 +10,371 @@ import type {
|
|
|
10
10
|
ParamsRequestPayload
|
|
11
11
|
} from 'EventPayloads';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
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 };
|