@addsign/moje-agenda-shared-lib 0.0.26 → 0.0.28
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,17 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as e } from "react";
|
|
3
|
+
const n = e({}), d = ({
|
|
4
4
|
children: t,
|
|
5
|
-
value:
|
|
6
|
-
}) => {
|
|
7
|
-
const { userInfo: o, apiClient: r, authApps: n } = e, i = {
|
|
8
|
-
userInfo: o,
|
|
9
|
-
apiClient: r,
|
|
10
|
-
authApps: n
|
|
11
|
-
};
|
|
12
|
-
return /* @__PURE__ */ a(c.Provider, { value: i, children: t });
|
|
13
|
-
};
|
|
5
|
+
value: o
|
|
6
|
+
}) => /* @__PURE__ */ r(n.Provider, { value: o, children: t });
|
|
14
7
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
n as FederationContext,
|
|
9
|
+
d as FederationContextProvider
|
|
17
10
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { Emitter } from 'mitt';
|
|
2
3
|
|
|
3
4
|
export interface IUserInfo {
|
|
4
5
|
contractGroup: number;
|
|
@@ -16,10 +17,16 @@ export interface IUserInfo {
|
|
|
16
17
|
userId: string;
|
|
17
18
|
}
|
|
18
19
|
export type IAuthApps = string[];
|
|
20
|
+
export type Events = {
|
|
21
|
+
foo?: string;
|
|
22
|
+
bar?: number;
|
|
23
|
+
message?: string;
|
|
24
|
+
};
|
|
19
25
|
export interface IContextValue {
|
|
20
26
|
userInfo: IUserInfo;
|
|
21
27
|
apiClient: AxiosInstance;
|
|
22
28
|
authApps: IAuthApps;
|
|
29
|
+
emitter: Emitter<Events>;
|
|
23
30
|
}
|
|
24
31
|
export interface IOptionItem {
|
|
25
32
|
value: string | number | null;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@addsign/moje-agenda-shared-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.28",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"types": "dist/main.d.ts",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"axios": "^1.7.2",
|
|
50
|
+
"mitt": "^3.0.1",
|
|
50
51
|
"react-icons": "^5.2.1",
|
|
51
52
|
"react-use": "^17.5.0"
|
|
52
53
|
}
|