@luigi-project/container 1.6.0-dev.20250420852 → 1.6.0-dev.202504210036
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 +19 -0
- package/LuigiContainer.svelte.d.ts +19 -2
- package/bundle.js +1 -1
- package/bundle.js.map +1 -1
- package/constants/events.d.ts +37 -1
- package/constants/events.js +159 -0
- package/dist/custom-elements.json +42 -54
- package/package.json +1 -1
package/constants/events.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-function-type */
|
|
1
2
|
export namespace Events {
|
|
2
3
|
/**
|
|
3
4
|
* Event fired when the micro frontend sends a custom message.
|
|
@@ -20,7 +21,8 @@ export namespace Events {
|
|
|
20
21
|
export const ALERT_REQUEST = 'show-alert-request';
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
|
-
* Event
|
|
24
|
+
* Event left due to historical reasons - do not use.
|
|
25
|
+
* @deprecated
|
|
24
26
|
*/
|
|
25
27
|
export const ALERT_CLOSED = 'close-alert-request';
|
|
26
28
|
|
|
@@ -81,6 +83,7 @@ export namespace Events {
|
|
|
81
83
|
|
|
82
84
|
/**
|
|
83
85
|
* Event fired when the micro frontend requests to navigate back.
|
|
86
|
+
* @deprecated use GO_BACK_REQUEST
|
|
84
87
|
*/
|
|
85
88
|
export const BACK_NAVIGATION_REQUEST = 'navigate-back-request';
|
|
86
89
|
|
|
@@ -99,6 +102,11 @@ export namespace Events {
|
|
|
99
102
|
*/
|
|
100
103
|
export const UPDATE_MODAL_PATH_DATA_REQUEST = 'update-modal-path-data-request';
|
|
101
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Event fired when the micro frontend requests to update the modal settings.
|
|
107
|
+
*/
|
|
108
|
+
export const UPDATE_MODAL_SETTINGS_REQUEST = 'update-modal-settings-request';
|
|
109
|
+
|
|
102
110
|
/**
|
|
103
111
|
* Event fired when the micro frontend requests to check the validity of a path.
|
|
104
112
|
*/
|
|
@@ -116,6 +124,7 @@ export namespace Events {
|
|
|
116
124
|
|
|
117
125
|
/**
|
|
118
126
|
* Event fired when the micro frontend requests to set the document title.
|
|
127
|
+
* @deprecated
|
|
119
128
|
*/
|
|
120
129
|
export const SET_DOCUMENT_TITLE_REQUEST = 'set-document-title-request';
|
|
121
130
|
|
|
@@ -141,6 +150,7 @@ export namespace Events {
|
|
|
141
150
|
|
|
142
151
|
/**
|
|
143
152
|
* Event fired when the micro frontend requests to check if the path exists.
|
|
153
|
+
* @deprecated use CHECK_PATH_EXISTS_REQUEST
|
|
144
154
|
*/
|
|
145
155
|
export const PATH_EXISTS_REQUEST = 'path-exists-request';
|
|
146
156
|
|
|
@@ -154,8 +164,34 @@ export namespace Events {
|
|
|
154
164
|
*/
|
|
155
165
|
export const HAS_BACK_REQUEST = 'has-back-request';
|
|
156
166
|
|
|
167
|
+
/**
|
|
168
|
+
* Event fired when the micro frontend requests to display the backdrop.
|
|
169
|
+
*/
|
|
170
|
+
export const ADD_BACKDROP_REQUEST = 'add-backdrop-request';
|
|
171
|
+
|
|
157
172
|
/**
|
|
158
173
|
* Event fired when the micro frontend requests to remove the backdrop.
|
|
159
174
|
*/
|
|
160
175
|
export const REMOVE_BACKDROP_REQUEST = 'remove-backdrop-request';
|
|
161
176
|
}
|
|
177
|
+
|
|
178
|
+
export class LuigiEvent extends Event {
|
|
179
|
+
payload?: unknown;
|
|
180
|
+
detail: unknown;
|
|
181
|
+
private callbackFn: Function;
|
|
182
|
+
|
|
183
|
+
constructor(type: string, data: unknown, payload?: unknown, callback?: Function) {
|
|
184
|
+
super(type);
|
|
185
|
+
this.detail = data;
|
|
186
|
+
this.payload = payload || data || {};
|
|
187
|
+
this.callbackFn = callback;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
callback(data: unknown): void {
|
|
191
|
+
if (this.callbackFn) {
|
|
192
|
+
this.callbackFn(data);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export { Events as LuigiEvents };
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/* 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
|
+
*/
|
|
7
|
+
Events.CUSTOM_MESSAGE = 'custom-message';
|
|
8
|
+
/**
|
|
9
|
+
* Event fired when the micro frontend requests the context data.
|
|
10
|
+
*/
|
|
11
|
+
Events.GET_CONTEXT_REQUEST = 'get-context-request';
|
|
12
|
+
/**
|
|
13
|
+
* Event fired when a navigation has been requested by the micro frontend.
|
|
14
|
+
*/
|
|
15
|
+
Events.NAVIGATION_REQUEST = 'navigation-request';
|
|
16
|
+
/**
|
|
17
|
+
* Event fired when the micro frontend requests to show an alert.
|
|
18
|
+
*/
|
|
19
|
+
Events.ALERT_REQUEST = 'show-alert-request';
|
|
20
|
+
/**
|
|
21
|
+
* Event left due to historical reasons - do not use.
|
|
22
|
+
* @deprecated
|
|
23
|
+
*/
|
|
24
|
+
Events.ALERT_CLOSED = 'close-alert-request';
|
|
25
|
+
/**
|
|
26
|
+
* Event fired when the micro frontend has been initialized.
|
|
27
|
+
*/
|
|
28
|
+
Events.INITIALIZED = 'initialized';
|
|
29
|
+
/**
|
|
30
|
+
* Event fired when the micro frontend requests the addition of search parameters to the URL.
|
|
31
|
+
*/
|
|
32
|
+
Events.ADD_SEARCH_PARAMS_REQUEST = 'add-search-params-request';
|
|
33
|
+
/**
|
|
34
|
+
* Event fired when the micro frontend requests the addition of node parameters to the URL.
|
|
35
|
+
*/
|
|
36
|
+
Events.ADD_NODE_PARAMS_REQUEST = 'add-node-params-request';
|
|
37
|
+
/**
|
|
38
|
+
* Event fired when the micro frontend requests to show a confirmation modal.
|
|
39
|
+
*/
|
|
40
|
+
Events.SHOW_CONFIRMATION_MODAL_REQUEST = 'show-confirmation-modal-request';
|
|
41
|
+
/**
|
|
42
|
+
* Event fired when the micro frontend requests to show a loading indicator.
|
|
43
|
+
*/
|
|
44
|
+
Events.SHOW_LOADING_INDICATOR_REQUEST = 'show-loading-indicator-request';
|
|
45
|
+
/**
|
|
46
|
+
* Event fired when the micro frontend requests to hide the loading indicator.
|
|
47
|
+
*/
|
|
48
|
+
Events.HIDE_LOADING_INDICATOR_REQUEST = 'hide-loading-indicator-request';
|
|
49
|
+
/**
|
|
50
|
+
* Event fired when the micro frontend requests to set the current locale.
|
|
51
|
+
*/
|
|
52
|
+
Events.SET_CURRENT_LOCALE_REQUEST = 'set-current-locale-request';
|
|
53
|
+
/**
|
|
54
|
+
* Event fired when the micro frontend requests to modify the local storage.
|
|
55
|
+
*/
|
|
56
|
+
Events.LOCAL_STORAGE_SET_REQUEST = 'set-storage-request';
|
|
57
|
+
/**
|
|
58
|
+
* Event fired when the micro frontend requests to handle errors that might happen during the runtime of the micro frontend.
|
|
59
|
+
*/
|
|
60
|
+
Events.RUNTIME_ERROR_HANDLING_REQUEST = 'runtime-error-handling-request';
|
|
61
|
+
/**
|
|
62
|
+
* Event fired when the micro frontend requests to set the anchor of the URL.
|
|
63
|
+
*/
|
|
64
|
+
Events.SET_ANCHOR_LINK_REQUEST = 'set-anchor-request';
|
|
65
|
+
/**
|
|
66
|
+
* Event fired when the micro frontend requests to set third-party cookies.
|
|
67
|
+
*/
|
|
68
|
+
Events.SET_THIRD_PARTY_COOKIES_REQUEST = 'set-third-party-cookies-request';
|
|
69
|
+
/**
|
|
70
|
+
* Event fired when the micro frontend requests to navigate back.
|
|
71
|
+
* @deprecated use GO_BACK_REQUEST
|
|
72
|
+
*/
|
|
73
|
+
Events.BACK_NAVIGATION_REQUEST = 'navigate-back-request';
|
|
74
|
+
/**
|
|
75
|
+
* Event fired when the micro frontend requests the current app route.
|
|
76
|
+
*/
|
|
77
|
+
Events.GET_CURRENT_ROUTE_REQUEST = 'get-current-route-request';
|
|
78
|
+
/**
|
|
79
|
+
* Event fired to report that the micro frontend's navigation has completed.
|
|
80
|
+
*/
|
|
81
|
+
Events.NAVIGATION_COMPLETED_REPORT = 'report-navigation-completed-request';
|
|
82
|
+
/**
|
|
83
|
+
* Event fired when the micro frontend requests to update the modal path parameters.
|
|
84
|
+
*/
|
|
85
|
+
Events.UPDATE_MODAL_PATH_DATA_REQUEST = 'update-modal-path-data-request';
|
|
86
|
+
/**
|
|
87
|
+
* Event fired when the micro frontend requests to update the modal settings.
|
|
88
|
+
*/
|
|
89
|
+
Events.UPDATE_MODAL_SETTINGS_REQUEST = 'update-modal-settings-request';
|
|
90
|
+
/**
|
|
91
|
+
* Event fired when the micro frontend requests to check the validity of a path.
|
|
92
|
+
*/
|
|
93
|
+
Events.CHECK_PATH_EXISTS_REQUEST = 'check-path-exists-request';
|
|
94
|
+
/**
|
|
95
|
+
* Event fired when the micro frontend requests to set the 'dirty status' which, for example, avoids closing when there are any unsaved changes.
|
|
96
|
+
*/
|
|
97
|
+
Events.SET_DIRTY_STATUS_REQUEST = 'set-dirty-status-request';
|
|
98
|
+
/**
|
|
99
|
+
* Event fired when the micro frontend requests to set the view group data.
|
|
100
|
+
*/
|
|
101
|
+
Events.SET_VIEW_GROUP_DATA_REQUEST = 'set-viewgroup-data-request';
|
|
102
|
+
/**
|
|
103
|
+
* Event fired when the micro frontend requests to set the document title.
|
|
104
|
+
* @deprecated
|
|
105
|
+
*/
|
|
106
|
+
Events.SET_DOCUMENT_TITLE_REQUEST = 'set-document-title-request';
|
|
107
|
+
/**
|
|
108
|
+
* Event fired when the micro frontend requests to open the user settings.
|
|
109
|
+
*/
|
|
110
|
+
Events.OPEN_USER_SETTINGS_REQUEST = 'open-user-settings-request';
|
|
111
|
+
/**
|
|
112
|
+
* Event fired when the micro frontend requests to close the user settings.
|
|
113
|
+
*/
|
|
114
|
+
Events.CLOSE_USER_SETTINGS_REQUEST = 'close-user-settings-request';
|
|
115
|
+
/**
|
|
116
|
+
* Event fired when the micro frontend requests to collapse left side navigation.
|
|
117
|
+
*/
|
|
118
|
+
Events.COLLAPSE_LEFT_NAV_REQUEST = 'collapse-leftnav-request';
|
|
119
|
+
/**
|
|
120
|
+
* Event fired when the micro frontend requests to update the top navigation.
|
|
121
|
+
*/
|
|
122
|
+
Events.UPDATE_TOP_NAVIGATION_REQUEST = 'update-top-navigation-request';
|
|
123
|
+
/**
|
|
124
|
+
* Event fired when the micro frontend requests to check if the path exists.
|
|
125
|
+
* @deprecated use CHECK_PATH_EXISTS_REQUEST
|
|
126
|
+
*/
|
|
127
|
+
Events.PATH_EXISTS_REQUEST = 'path-exists-request';
|
|
128
|
+
/**
|
|
129
|
+
* Event fired when the micro frontend requests to navigate back.
|
|
130
|
+
*/
|
|
131
|
+
Events.GO_BACK_REQUEST = 'go-back-request';
|
|
132
|
+
/**
|
|
133
|
+
* Event fired when the micro frontend requests to check if there are any preserved views.
|
|
134
|
+
*/
|
|
135
|
+
Events.HAS_BACK_REQUEST = 'has-back-request';
|
|
136
|
+
/**
|
|
137
|
+
* Event fired when the micro frontend requests to display the backdrop.
|
|
138
|
+
*/
|
|
139
|
+
Events.ADD_BACKDROP_REQUEST = 'add-backdrop-request';
|
|
140
|
+
/**
|
|
141
|
+
* Event fired when the micro frontend requests to remove the backdrop.
|
|
142
|
+
*/
|
|
143
|
+
Events.REMOVE_BACKDROP_REQUEST = 'remove-backdrop-request';
|
|
144
|
+
})(Events || (Events = {}));
|
|
145
|
+
class LuigiEvent extends Event {
|
|
146
|
+
constructor(type, data, payload, callback) {
|
|
147
|
+
super(type);
|
|
148
|
+
this.detail = data;
|
|
149
|
+
this.payload = payload || data || {};
|
|
150
|
+
this.callbackFn = callback;
|
|
151
|
+
}
|
|
152
|
+
callback(data) {
|
|
153
|
+
if (this.callbackFn) {
|
|
154
|
+
this.callbackFn(data);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export { LuigiEvent, Events as LuigiEvents };
|
|
@@ -213,6 +213,14 @@
|
|
|
213
213
|
"kind": "method",
|
|
214
214
|
"name": "notifyAlertClosed"
|
|
215
215
|
},
|
|
216
|
+
{
|
|
217
|
+
"kind": "method",
|
|
218
|
+
"name": "notifyConfirmationModalClosed"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"kind": "method",
|
|
222
|
+
"name": "updateViewUrl"
|
|
223
|
+
},
|
|
216
224
|
{
|
|
217
225
|
"kind": "method",
|
|
218
226
|
"name": "init"
|
|
@@ -247,13 +255,6 @@
|
|
|
247
255
|
"text": "Event"
|
|
248
256
|
}
|
|
249
257
|
},
|
|
250
|
-
{
|
|
251
|
-
"name": "close-alert-request",
|
|
252
|
-
"description": "Event fired when the micro frontend requests to close an alert.",
|
|
253
|
-
"type": {
|
|
254
|
-
"text": "Event"
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
258
|
{
|
|
258
259
|
"name": "initialized",
|
|
259
260
|
"description": "Event fired when the micro frontend has been initialized.",
|
|
@@ -331,13 +332,6 @@
|
|
|
331
332
|
"text": "Event"
|
|
332
333
|
}
|
|
333
334
|
},
|
|
334
|
-
{
|
|
335
|
-
"name": "navigate-back-request",
|
|
336
|
-
"description": "Event fired when the micro frontend requests to navigate back.",
|
|
337
|
-
"type": {
|
|
338
|
-
"text": "Event"
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
335
|
{
|
|
342
336
|
"name": "get-current-route-request",
|
|
343
337
|
"description": "Event fired when the micro frontend requests the current app route.",
|
|
@@ -359,6 +353,13 @@
|
|
|
359
353
|
"text": "Event"
|
|
360
354
|
}
|
|
361
355
|
},
|
|
356
|
+
{
|
|
357
|
+
"name": "update-modal-settings-request",
|
|
358
|
+
"description": "Event fired when the micro frontend requests to update the modal settings.",
|
|
359
|
+
"type": {
|
|
360
|
+
"text": "Event"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
362
363
|
{
|
|
363
364
|
"name": "check-path-exists-request",
|
|
364
365
|
"description": "Event fired when the micro frontend requests to check the validity of a path.",
|
|
@@ -380,13 +381,6 @@
|
|
|
380
381
|
"text": "Event"
|
|
381
382
|
}
|
|
382
383
|
},
|
|
383
|
-
{
|
|
384
|
-
"name": "set-document-title-request",
|
|
385
|
-
"description": "Event fired when the micro frontend requests to set the document title.",
|
|
386
|
-
"type": {
|
|
387
|
-
"text": "Event"
|
|
388
|
-
}
|
|
389
|
-
},
|
|
390
384
|
{
|
|
391
385
|
"name": "open-user-settings-request",
|
|
392
386
|
"description": "Event fired when the micro frontend requests to open the user settings.",
|
|
@@ -416,22 +410,22 @@
|
|
|
416
410
|
}
|
|
417
411
|
},
|
|
418
412
|
{
|
|
419
|
-
"name": "
|
|
420
|
-
"description": "Event fired when the micro frontend requests to
|
|
413
|
+
"name": "go-back-request",
|
|
414
|
+
"description": "Event fired when the micro frontend requests to navigate back.",
|
|
421
415
|
"type": {
|
|
422
416
|
"text": "Event"
|
|
423
417
|
}
|
|
424
418
|
},
|
|
425
419
|
{
|
|
426
|
-
"name": "
|
|
427
|
-
"description": "Event fired when the micro frontend requests to
|
|
420
|
+
"name": "has-back-request",
|
|
421
|
+
"description": "Event fired when the micro frontend requests to check if there are any preserved views.",
|
|
428
422
|
"type": {
|
|
429
423
|
"text": "Event"
|
|
430
424
|
}
|
|
431
425
|
},
|
|
432
426
|
{
|
|
433
|
-
"name": "
|
|
434
|
-
"description": "Event fired when the micro frontend requests to
|
|
427
|
+
"name": "add-backdrop-request",
|
|
428
|
+
"description": "Event fired when the micro frontend requests to display the backdrop.",
|
|
435
429
|
"type": {
|
|
436
430
|
"text": "Event"
|
|
437
431
|
}
|
|
@@ -632,6 +626,14 @@
|
|
|
632
626
|
"kind": "method",
|
|
633
627
|
"name": "updateContext"
|
|
634
628
|
},
|
|
629
|
+
{
|
|
630
|
+
"kind": "method",
|
|
631
|
+
"name": "notifyAlertClosed"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"kind": "method",
|
|
635
|
+
"name": "notifyConfirmationModalClosed"
|
|
636
|
+
},
|
|
635
637
|
{
|
|
636
638
|
"kind": "method",
|
|
637
639
|
"name": "init"
|
|
@@ -666,13 +668,6 @@
|
|
|
666
668
|
"text": "Event"
|
|
667
669
|
}
|
|
668
670
|
},
|
|
669
|
-
{
|
|
670
|
-
"name": "close-alert-request",
|
|
671
|
-
"description": "Event fired when the micro frontend requests to close an alert.",
|
|
672
|
-
"type": {
|
|
673
|
-
"text": "Event"
|
|
674
|
-
}
|
|
675
|
-
},
|
|
676
671
|
{
|
|
677
672
|
"name": "initialized",
|
|
678
673
|
"description": "Event fired when the micro frontend has been initialized.",
|
|
@@ -750,13 +745,6 @@
|
|
|
750
745
|
"text": "Event"
|
|
751
746
|
}
|
|
752
747
|
},
|
|
753
|
-
{
|
|
754
|
-
"name": "navigate-back-request",
|
|
755
|
-
"description": "Event fired when the micro frontend requests to navigate back.",
|
|
756
|
-
"type": {
|
|
757
|
-
"text": "Event"
|
|
758
|
-
}
|
|
759
|
-
},
|
|
760
748
|
{
|
|
761
749
|
"name": "get-current-route-request",
|
|
762
750
|
"description": "Event fired when the micro frontend requests the current app route.",
|
|
@@ -778,6 +766,13 @@
|
|
|
778
766
|
"text": "Event"
|
|
779
767
|
}
|
|
780
768
|
},
|
|
769
|
+
{
|
|
770
|
+
"name": "update-modal-settings-request",
|
|
771
|
+
"description": "Event fired when the micro frontend requests to update the modal settings.",
|
|
772
|
+
"type": {
|
|
773
|
+
"text": "Event"
|
|
774
|
+
}
|
|
775
|
+
},
|
|
781
776
|
{
|
|
782
777
|
"name": "check-path-exists-request",
|
|
783
778
|
"description": "Event fired when the micro frontend requests to check the validity of a path.",
|
|
@@ -799,13 +794,6 @@
|
|
|
799
794
|
"text": "Event"
|
|
800
795
|
}
|
|
801
796
|
},
|
|
802
|
-
{
|
|
803
|
-
"name": "set-document-title-request",
|
|
804
|
-
"description": "Event fired when the micro frontend requests to set the document title.",
|
|
805
|
-
"type": {
|
|
806
|
-
"text": "Event"
|
|
807
|
-
}
|
|
808
|
-
},
|
|
809
797
|
{
|
|
810
798
|
"name": "open-user-settings-request",
|
|
811
799
|
"description": "Event fired when the micro frontend requests to open the user settings.",
|
|
@@ -835,22 +823,22 @@
|
|
|
835
823
|
}
|
|
836
824
|
},
|
|
837
825
|
{
|
|
838
|
-
"name": "
|
|
839
|
-
"description": "Event fired when the micro frontend requests to
|
|
826
|
+
"name": "go-back-request",
|
|
827
|
+
"description": "Event fired when the micro frontend requests to navigate back.",
|
|
840
828
|
"type": {
|
|
841
829
|
"text": "Event"
|
|
842
830
|
}
|
|
843
831
|
},
|
|
844
832
|
{
|
|
845
|
-
"name": "
|
|
846
|
-
"description": "Event fired when the micro frontend requests to
|
|
833
|
+
"name": "has-back-request",
|
|
834
|
+
"description": "Event fired when the micro frontend requests to check if there are any preserved views.",
|
|
847
835
|
"type": {
|
|
848
836
|
"text": "Event"
|
|
849
837
|
}
|
|
850
838
|
},
|
|
851
839
|
{
|
|
852
|
-
"name": "
|
|
853
|
-
"description": "Event fired when the micro frontend requests to
|
|
840
|
+
"name": "add-backdrop-request",
|
|
841
|
+
"description": "Event fired when the micro frontend requests to display the backdrop.",
|
|
854
842
|
"type": {
|
|
855
843
|
"text": "Event"
|
|
856
844
|
}
|
package/package.json
CHANGED