@luigi-project/container 1.2.0-rc2 → 1.2.0-rc4

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.
@@ -0,0 +1,25 @@
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 {}
3
+
4
+ /**
5
+ * PathExistsEvent interface is used to make it easier to use the `linkManager().pathExists()` promise based function
6
+ * on the core application side.
7
+ *
8
+ * It enforces the use of the callback function, since the latter is hardcoded to be **'callback'**.
9
+ * This allows to send back the boolean value if the path exists or not.
10
+ * @Example
11
+ * ```
12
+ * addEventListener(Events.PATH_EXISTS_REQUEST, event: PathExistsEvent => {
13
+ * event.callback(true);
14
+ * }
15
+ * };
16
+ * ```
17
+ */
18
+ 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
+ }
@@ -1,97 +1,151 @@
1
1
  export namespace Events {
2
2
  /**
3
- * A message emmitted from the Microfrontend when a custom message is sent
3
+ * A message emitted from the micro frontend when a custom message is sent
4
4
  */
5
5
  export const CUSTOM_MESSAGE = 'custom-message';
6
6
  /**
7
- * A message emmitted from the Microfrontend when the context data is sent
7
+ * A message emitted from the micro frontend when the context data is sent
8
8
  */
9
9
  export const GET_CONTEXT_REQUEST = 'get-context-request';
10
10
  /**
11
- * A message emmitted from the Microfrontend when a navigation request is sent
11
+ * A message emitted from the micro frontend when a navigation request is sent
12
12
  */
13
13
  export const NAVIGATION_REQUEST = 'navigation-request';
14
14
  /**
15
- * A message emmitted from the Microfrontend when a request to show an alert is sent
15
+ * A message emitted from the micro frontend when a request to show an alert is sent
16
16
  */
17
17
  export const ALERT_REQUEST = 'show-alert-request';
18
18
  /**
19
- * A message emmitted from the Microfrontend when it is first initialized
19
+ * A message emitted from the micro frontend when a request to show an alert is sent
20
+ */
21
+ export const ALERT_CLOSED = 'close-alert-request';
22
+ /**
23
+ * A message emitted from the micro frontend when it is first initialized
20
24
  */
21
25
  export const INITIALIZED = 'initialized';
22
26
  /**
23
- * A message emmitted from the Microfrontend to request adding search parameters to the URL
27
+ * A message emitted from the micro frontend to request adding search parameters to the URL
24
28
  */
25
29
  export const ADD_SEARCH_PARAMS_REQUEST = 'add-search-params-request';
26
30
  /**
27
- * A message emmitted from the Microfrontend to request adding node parameters to the URL
31
+ * A message emitted from the micro frontend to request adding node parameters to the URL
28
32
  */
29
33
  export const ADD_NODE_PARAMS_REQUEST = 'add-node-params-request';
30
34
  /**
31
- * A message emmitted from the Microfrontend when a request to show an confirmation modal is sent
35
+ * A message emitted from the micro frontend when a request to show a confirmation modal is sent
32
36
  */
33
37
  export const SHOW_CONFIRMATION_MODAL_REQUEST = 'show-confirmation-modal-request';
34
38
  /**
35
- * A message emmitted from the Microfrontend when a request to show loading indicator is sent
39
+ * A message emitted from the micro frontend when a request to show a loading indicator is sent
36
40
  */
37
41
  export const SHOW_LOADING_INDICATOR_REQUEST = 'show-loading-indicator-request';
38
42
  /**
39
- * A message emmitted from the Microfrontend when a request to hide the loading indicator is sent
43
+ * A message emitted from the micro frontend when a request to hide the loading indicator is sent
40
44
  */
41
45
  export const HIDE_LOADING_INDICATOR_REQUEST = 'hide-loading-indicator-request';
42
46
 
43
47
  /**
44
- * A message emmitted from the Microfrontend when a request to set the current locale is sent
48
+ * A message emitted from the micro frontend when a request to set the current locale is sent
45
49
  */
46
50
  export const SET_CURRENT_LOCALE_REQUEST = 'set-current-locale-request';
47
51
 
48
52
  /**
49
- * A message emmitted from the Microfrontend when a request to modify the local storage is sent
53
+ * A message emitted from the micro frontend when a request to modify the local storage is sent
50
54
  */
51
55
  export const LOCAL_STORAGE_SET_REQUEST = 'set-storage-request';
52
56
 
53
57
  /**
54
- * A message emmitted from the Microfrontend when a request to handle an error that happened during the runtime on the microfrontend is sent
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
55
59
  */
56
60
  export const RUNTIME_ERROR_HANDLING_REQUEST = 'runtime-error-handling-request';
57
61
 
58
62
  /**
59
- * A message emmitted from the Microfrontend when a request to set the anchor of the URL is sent
63
+ * A message emitted from the micro frontend when a request to set the anchor of the URL is sent
60
64
  */
61
65
  export const SET_ANCHOR_LINK_REQUEST = 'set-anchor-request';
62
66
 
63
67
  /**
64
- * A message emmitted from the Microfrontend when a request to set third party cookies is sent
68
+ * A message emitted from the micro frontend when a request to set third-party cookies is sent
65
69
  */
66
70
  export const SET_THIRD_PARTY_COOKIES_REQUEST = 'set-third-party-cookies-request';
67
71
 
68
72
  /**
69
- * A message emmitted from the Microfrontend when a request to navigate back is sent
73
+ * A message emitted from the micro frontend when a request to navigate back is sent
70
74
  */
71
75
  export const BACK_NAVIGATION_REQUEST = 'navigate-back-request';
72
76
 
73
77
  /**
74
- * A message emmitted from the Microfrontend when a request to receive the current app route is sent
78
+ * A message emitted from the micro frontend when a request to receive the current app route is sent
75
79
  */
76
80
  export const GET_CURRENT_ROUTE_REQUEST = 'get-current-route-request';
77
81
 
78
82
  /**
79
- * A message emmitted from the Microfrontend to report that the navigation is completed is sent
83
+ * A message emitted from the micro frontend to report that the navigation is completed is sent
80
84
  */
81
85
  export const NAVIGATION_COMPLETED_REPORT = 'report-navigation-completed-request';
82
86
 
83
87
  /**
84
- * A message emmitted from the Microfrontend when a request to update the modal path parameters is sent
88
+ * A message emitted from the micro frontend when a request to update the modal path parameters is sent
85
89
  */
86
90
  export const UPDATE_MODAL_PATH_DATA_REQUEST = 'update-modal-path-data-request';
87
91
 
88
92
  /**
89
- * A message emmitted from the Microfrontend when a request to check on the validity of a path is sent
93
+ * A message emitted from the micro frontend when a request to check on the validity of a path is sent
90
94
  */
91
95
  export const CHECK_PATH_EXISTS_REQUEST = 'check-path-exists-request';
92
96
 
93
97
  /**
94
- * A message emmitted from the Microfrontend when a request to set the 'dirty status' (ex: avoid closing if usaved changes) is sent
98
+ * A message emitted from the micro frontend when a request to set the 'dirty status' (eg: avoid closing if unsaved changes) is sent
95
99
  */
96
100
  export const SET_DIRTY_STATUS_REQUEST = 'set-dirty-status-request';
101
+
102
+ /**
103
+ * A message emitted from the micro frontend when a request to set the view group data
104
+ */
105
+ export const SET_VIEW_GROUP_DATA_REQUEST = 'set-viewgroup-data-request';
106
+
107
+ /**
108
+ * A message emitted from the micro frontend when a request to set the document title
109
+ */
110
+ export const SET_DOCUMENT_TITLE_REQUEST = 'set-document-title-request';
111
+
112
+ /**
113
+ * A message emitted from the micro frontend when a request to open user settings
114
+ */
115
+ export const OPEN_USER_SETTINGS_REQUEST = 'open-user-settings-request';
116
+
117
+ /**
118
+ * A message emitted from the micro frontend when a request to close user settings
119
+ */
120
+ export const CLOSE_USER_SETTINGS_REQUEST = 'close-user-settings-request';
121
+
122
+ /**
123
+ * A message emitted from the micro frontend when a request to collapse left side navigation
124
+ */
125
+ export const COLLAPSE_LEFT_NAV_REQUEST = 'collapse-leftnav-request';
126
+
127
+ /**
128
+ * A message emitted from the micro frontend when a request to remove the backdrop
129
+ */
130
+ export const UPDATE_TOP_NAVIGATION_REQUEST = 'update-top-navigation-request';
131
+
132
+ /**
133
+ * A message emitted from the micro frontend when a request to remove the backdrop
134
+ */
135
+ export const PATH_EXISTS_REQUEST = 'path-exists-request';
136
+
137
+ /**
138
+ * A message emitted from the micro frontend when a request to remove the backdrop
139
+ */
140
+ export const GO_BACK_REQUEST = 'go-back-request';
141
+
142
+ /**
143
+ * A message emitted from the micro frontend when a request to remove the backdrop
144
+ */
145
+ export const HAS_BACK_REQUEST = 'has-back-request';
146
+
147
+ /**
148
+ * A message emitted from the micro frontend when a request to remove the backdrop
149
+ */
150
+ export const REMOVE_BACKDROP_REQUEST = 'remove-backdrop-request';
97
151
  }
package/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export { default as LuigiContainer } from './LuigiContainer.svelte';
2
2
  export { default as LuigiCompoundContainer } from './LuigiCompoundContainer.svelte';
3
3
  import { Events } from './constants/events';
4
4
  export default Events;
5
+ export type { PathExistsEvent } from './constants/event-type';
package/package.json CHANGED
@@ -19,5 +19,5 @@
19
19
  "micro-frontends",
20
20
  "microfrontends"
21
21
  ],
22
- "version": "1.2.0-rc2"
22
+ "version": "1.2.0-rc4"
23
23
  }