@luigi-project/container 1.4.0 → 1.5.0-dev.202412100034

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,11 +1,15 @@
1
- // TODO: Add and extend event to inclide custom typings/interface to make it easier to use on the listener parameter
2
- export interface ParamsEvent extends Event {}
1
+ /**
2
+ * ParamsEvent interface is used to make the handling of listener parameter easier
3
+ */
4
+ export interface ParamsEvent extends Event {
5
+ [key: string]: any; // eslint-disable-line @typescript-eslint/no-explicit-any
6
+ }
3
7
 
4
8
  /**
5
9
  * PathExistsEvent interface is used to make it easier to use the `linkManager().pathExists()` promise based function
6
10
  * on the core application side.
7
- *
8
- * It enforces the use of the callback function, since the latter is hardcoded to be **'callback'**.
11
+ *
12
+ * It enforces the use of the callback function, since the latter is hardcoded to be **'callback'**.
9
13
  * This allows to send back the boolean value if the path exists or not.
10
14
  * @Example
11
15
  * ```
@@ -16,10 +20,10 @@ export interface ParamsEvent extends Event {}
16
20
  * ```
17
21
  */
18
22
  export interface PathExistsEvent extends Event {
19
- /**
20
- *
21
- * @param value the boolean value that is to be sent back to the the path exists promise i.e.: `linkManager().pathExists().then(value...)
22
- * @returns void
23
- */
24
- callback: (value: boolean) => void;
25
- }
23
+ /**
24
+ *
25
+ * @param value the boolean value that is to be sent back to the the path exists promise i.e.: `linkManager().pathExists().then(value...)
26
+ * @returns void
27
+ */
28
+ callback: (value: boolean) => void;
29
+ }
@@ -1,151 +1,161 @@
1
1
  export namespace Events {
2
2
  /**
3
- * A message emitted from the micro frontend when a custom message is sent
3
+ * Event fired when the micro frontend sends a custom message.
4
4
  */
5
5
  export const CUSTOM_MESSAGE = 'custom-message';
6
+
6
7
  /**
7
- * A message emitted from the micro frontend when the context data is sent
8
+ * Event fired when the micro frontend requests the context data.
8
9
  */
9
10
  export const GET_CONTEXT_REQUEST = 'get-context-request';
11
+
10
12
  /**
11
- * A message emitted from the micro frontend when a navigation request is sent
13
+ * Event fired when a navigation has been requested by the micro frontend.
12
14
  */
13
15
  export const NAVIGATION_REQUEST = 'navigation-request';
16
+
14
17
  /**
15
- * A message emitted from the micro frontend when a request to show an alert is sent
18
+ * Event fired when the micro frontend requests to show an alert.
16
19
  */
17
20
  export const ALERT_REQUEST = 'show-alert-request';
21
+
18
22
  /**
19
- * A message emitted from the micro frontend when a request to show an alert is sent
23
+ * Event fired when the micro frontend requests to close an alert.
20
24
  */
21
25
  export const ALERT_CLOSED = 'close-alert-request';
26
+
22
27
  /**
23
- * A message emitted from the micro frontend when it is first initialized
28
+ * Event fired when the micro frontend has been initialized.
24
29
  */
25
30
  export const INITIALIZED = 'initialized';
31
+
26
32
  /**
27
- * A message emitted from the micro frontend to request adding search parameters to the URL
33
+ * Event fired when the micro frontend requests the addition of search parameters to the URL.
28
34
  */
29
35
  export const ADD_SEARCH_PARAMS_REQUEST = 'add-search-params-request';
36
+
30
37
  /**
31
- * A message emitted from the micro frontend to request adding node parameters to the URL
38
+ * Event fired when the micro frontend requests the addition of node parameters to the URL.
32
39
  */
33
40
  export const ADD_NODE_PARAMS_REQUEST = 'add-node-params-request';
41
+
34
42
  /**
35
- * A message emitted from the micro frontend when a request to show a confirmation modal is sent
43
+ * Event fired when the micro frontend requests to show a confirmation modal.
36
44
  */
37
45
  export const SHOW_CONFIRMATION_MODAL_REQUEST = 'show-confirmation-modal-request';
46
+
38
47
  /**
39
- * A message emitted from the micro frontend when a request to show a loading indicator is sent
48
+ * Event fired when the micro frontend requests to show a loading indicator.
40
49
  */
41
50
  export const SHOW_LOADING_INDICATOR_REQUEST = 'show-loading-indicator-request';
51
+
42
52
  /**
43
- * A message emitted from the micro frontend when a request to hide the loading indicator is sent
53
+ * Event fired when the micro frontend requests to hide the loading indicator.
44
54
  */
45
55
  export const HIDE_LOADING_INDICATOR_REQUEST = 'hide-loading-indicator-request';
46
56
 
47
57
  /**
48
- * A message emitted from the micro frontend when a request to set the current locale is sent
58
+ * Event fired when the micro frontend requests to set the current locale.
49
59
  */
50
60
  export const SET_CURRENT_LOCALE_REQUEST = 'set-current-locale-request';
51
61
 
52
62
  /**
53
- * A message emitted from the micro frontend when a request to modify the local storage is sent
63
+ * Event fired when the micro frontend requests to modify the local storage.
54
64
  */
55
65
  export const LOCAL_STORAGE_SET_REQUEST = 'set-storage-request';
56
66
 
57
67
  /**
58
- * A message emitted from the micro frontend when a request to handle an error that happened during the runtime of the micro frontend is sent
68
+ * Event fired when the micro frontend requests to handle errors that might happen during the runtime of the micro frontend.
59
69
  */
60
70
  export const RUNTIME_ERROR_HANDLING_REQUEST = 'runtime-error-handling-request';
61
71
 
62
72
  /**
63
- * A message emitted from the micro frontend when a request to set the anchor of the URL is sent
73
+ * Event fired when the micro frontend requests to set the anchor of the URL.
64
74
  */
65
75
  export const SET_ANCHOR_LINK_REQUEST = 'set-anchor-request';
66
76
 
67
77
  /**
68
- * A message emitted from the micro frontend when a request to set third-party cookies is sent
78
+ * Event fired when the micro frontend requests to set third-party cookies.
69
79
  */
70
80
  export const SET_THIRD_PARTY_COOKIES_REQUEST = 'set-third-party-cookies-request';
71
81
 
72
82
  /**
73
- * A message emitted from the micro frontend when a request to navigate back is sent
83
+ * Event fired when the micro frontend requests to navigate back.
74
84
  */
75
85
  export const BACK_NAVIGATION_REQUEST = 'navigate-back-request';
76
86
 
77
87
  /**
78
- * A message emitted from the micro frontend when a request to receive the current app route is sent
88
+ * Event fired when the micro frontend requests the current app route.
79
89
  */
80
90
  export const GET_CURRENT_ROUTE_REQUEST = 'get-current-route-request';
81
91
 
82
92
  /**
83
- * A message emitted from the micro frontend to report that the navigation is completed is sent
93
+ * Event fired to report that the micro frontend's navigation has completed.
84
94
  */
85
95
  export const NAVIGATION_COMPLETED_REPORT = 'report-navigation-completed-request';
86
96
 
87
97
  /**
88
- * A message emitted from the micro frontend when a request to update the modal path parameters is sent
98
+ * Event fired when the micro frontend requests to update the modal path parameters.
89
99
  */
90
100
  export const UPDATE_MODAL_PATH_DATA_REQUEST = 'update-modal-path-data-request';
91
101
 
92
102
  /**
93
- * A message emitted from the micro frontend when a request to check on the validity of a path is sent
103
+ * Event fired when the micro frontend requests to check the validity of a path.
94
104
  */
95
105
  export const CHECK_PATH_EXISTS_REQUEST = 'check-path-exists-request';
96
106
 
97
107
  /**
98
- * A message emitted from the micro frontend when a request to set the 'dirty status' (eg: avoid closing if unsaved changes) is sent
108
+ * Event fired when the micro frontend requests to set the 'dirty status' which, for example, avoids closing when there are any unsaved changes.
99
109
  */
100
110
  export const SET_DIRTY_STATUS_REQUEST = 'set-dirty-status-request';
101
111
 
102
112
  /**
103
- * A message emitted from the micro frontend when a request to set the view group data
113
+ * Event fired when the micro frontend requests to set the view group data.
104
114
  */
105
115
  export const SET_VIEW_GROUP_DATA_REQUEST = 'set-viewgroup-data-request';
106
116
 
107
117
  /**
108
- * A message emitted from the micro frontend when a request to set the document title
118
+ * Event fired when the micro frontend requests to set the document title.
109
119
  */
110
120
  export const SET_DOCUMENT_TITLE_REQUEST = 'set-document-title-request';
111
121
 
112
122
  /**
113
- * A message emitted from the micro frontend when a request to open user settings
123
+ * Event fired when the micro frontend requests to open the user settings.
114
124
  */
115
125
  export const OPEN_USER_SETTINGS_REQUEST = 'open-user-settings-request';
116
126
 
117
127
  /**
118
- * A message emitted from the micro frontend when a request to close user settings
128
+ * Event fired when the micro frontend requests to close the user settings.
119
129
  */
120
130
  export const CLOSE_USER_SETTINGS_REQUEST = 'close-user-settings-request';
121
131
 
122
132
  /**
123
- * A message emitted from the micro frontend when a request to collapse left side navigation
133
+ * Event fired when the micro frontend requests to collapse left side navigation.
124
134
  */
125
135
  export const COLLAPSE_LEFT_NAV_REQUEST = 'collapse-leftnav-request';
126
136
 
127
137
  /**
128
- * A message emitted from the micro frontend when a request to remove the backdrop
138
+ * Event fired when the micro frontend requests to update the top navigation.
129
139
  */
130
140
  export const UPDATE_TOP_NAVIGATION_REQUEST = 'update-top-navigation-request';
131
141
 
132
142
  /**
133
- * A message emitted from the micro frontend when a request to remove the backdrop
143
+ * Event fired when the micro frontend requests to check if the path exists.
134
144
  */
135
145
  export const PATH_EXISTS_REQUEST = 'path-exists-request';
136
146
 
137
147
  /**
138
- * A message emitted from the micro frontend when a request to remove the backdrop
148
+ * Event fired when the micro frontend requests to navigate back.
139
149
  */
140
150
  export const GO_BACK_REQUEST = 'go-back-request';
141
151
 
142
152
  /**
143
- * A message emitted from the micro frontend when a request to remove the backdrop
153
+ * Event fired when the micro frontend requests to check if there are any preserved views.
144
154
  */
145
155
  export const HAS_BACK_REQUEST = 'has-back-request';
146
156
 
147
157
  /**
148
- * A message emitted from the micro frontend when a request to remove the backdrop
158
+ * Event fired when the micro frontend requests to remove the backdrop.
149
159
  */
150
160
  export const REMOVE_BACKDROP_REQUEST = 'remove-backdrop-request';
151
161
  }