@luigi-project/container 1.6.0-dev.20250490033 → 1.7.0
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 +3 -3
- package/LuigiContainer.svelte.d.ts +1 -1
- package/bundle.js +1 -1
- package/bundle.js.map +1 -1
- package/constants/events.d.ts +10 -1
- package/constants/events.js +8 -1
- package/package.json +22 -22
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.
|
|
@@ -177,11 +178,19 @@ export namespace Events {
|
|
|
177
178
|
export class LuigiEvent extends Event {
|
|
178
179
|
payload?: unknown;
|
|
179
180
|
detail: unknown;
|
|
181
|
+
private callbackFn: Function;
|
|
180
182
|
|
|
181
|
-
constructor(type: string, data: unknown, payload?: unknown) {
|
|
183
|
+
constructor(type: string, data: unknown, payload?: unknown, callback?: Function) {
|
|
182
184
|
super(type);
|
|
183
185
|
this.detail = data;
|
|
184
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
|
+
}
|
|
185
194
|
}
|
|
186
195
|
}
|
|
187
196
|
|
package/constants/events.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-function-type */
|
|
1
2
|
var Events;
|
|
2
3
|
(function (Events) {
|
|
3
4
|
/**
|
|
@@ -142,10 +143,16 @@ var Events;
|
|
|
142
143
|
Events.REMOVE_BACKDROP_REQUEST = 'remove-backdrop-request';
|
|
143
144
|
})(Events || (Events = {}));
|
|
144
145
|
class LuigiEvent extends Event {
|
|
145
|
-
constructor(type, data, payload) {
|
|
146
|
+
constructor(type, data, payload, callback) {
|
|
146
147
|
super(type);
|
|
147
148
|
this.detail = data;
|
|
148
149
|
this.payload = payload || data || {};
|
|
150
|
+
this.callbackFn = callback;
|
|
151
|
+
}
|
|
152
|
+
callback(data) {
|
|
153
|
+
if (this.callbackFn) {
|
|
154
|
+
this.callbackFn(data);
|
|
155
|
+
}
|
|
149
156
|
}
|
|
150
157
|
}
|
|
151
158
|
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
"name": "@luigi-project/container",
|
|
3
|
+
"description": "Javascript library enabling creation of microfrontends",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"main": "bundle.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "ssh://github.com/SAP/luigi.git"
|
|
10
|
+
},
|
|
11
|
+
"customElements": "./dist/custom-elements.json",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"tag": "luigi-container"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"luigi",
|
|
17
|
+
"core",
|
|
18
|
+
"UI",
|
|
19
|
+
"extensibility",
|
|
20
|
+
"micro-frontends",
|
|
21
|
+
"microfrontends"
|
|
22
|
+
],
|
|
23
|
+
"version": "1.7.0"
|
|
24
24
|
}
|