wcz-layout 6.7.0 → 6.7.2
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/package.json
CHANGED
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
"name": "wcz-layout",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"author": "Dalibor Homola",
|
|
5
|
-
"version": "6.7.
|
|
5
|
+
"version": "6.7.2",
|
|
6
|
+
"types": "dist/src/index.d.ts",
|
|
6
7
|
"main": "dist/src/index.js",
|
|
7
8
|
"module": "dist/src/index.js",
|
|
8
9
|
"exports": {
|
|
9
|
-
".":
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/src/index.d.ts",
|
|
12
|
+
"import": "./dist/src/index.js",
|
|
13
|
+
"default": "./dist/src/index.js"
|
|
14
|
+
}
|
|
10
15
|
},
|
|
11
16
|
"scripts": {
|
|
12
17
|
"npm-install": "npm install",
|
|
@@ -15,7 +20,7 @@
|
|
|
15
20
|
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
|
|
16
21
|
"build": "tsc && npm run analyze -- --exclude dist",
|
|
17
22
|
"prepublish": "tsc && npm run analyze -- --exclude dist",
|
|
18
|
-
"publish": "npm publish"
|
|
23
|
+
"publish": "npm publish --tag legacy"
|
|
19
24
|
},
|
|
20
25
|
"dependencies": {
|
|
21
26
|
"@azure/msal-browser": "^4.27.0",
|
|
@@ -54,4 +59,4 @@
|
|
|
54
59
|
"zod": "3.x"
|
|
55
60
|
},
|
|
56
61
|
"customElements": "custom-elements.json"
|
|
57
|
-
}
|
|
62
|
+
}
|
|
@@ -49,7 +49,7 @@ export const UserProvider = ({ children, setUser }: UserProviderProps) => {
|
|
|
49
49
|
groups: idTokenPayload.groups ?? [],
|
|
50
50
|
department: idTokenPayload.department || "",
|
|
51
51
|
employeeId: idTokenPayload.employeeId || "",
|
|
52
|
-
companyName: idTokenPayload.companyName
|
|
52
|
+
companyName: idTokenPayload.companyName,
|
|
53
53
|
};
|
|
54
54
|
setUser(userData);
|
|
55
55
|
window.dispatchEvent(new CustomEvent<UserDataFetchedEvent>(USER_DATA_FETCHED_EVENT, { detail: { user: userData } }));
|
|
@@ -57,12 +57,10 @@ export const UserProvider = ({ children, setUser }: UserProviderProps) => {
|
|
|
57
57
|
}, [setUser]);
|
|
58
58
|
|
|
59
59
|
useEffect(() => {
|
|
60
|
-
// Process account if already logged in (e.g., page refresh)
|
|
61
60
|
processAccount();
|
|
62
61
|
|
|
63
|
-
// Listen for login success events for fresh logins
|
|
64
62
|
const callbackId = pca.addEventCallback((event: EventMessage) => {
|
|
65
|
-
if (event.eventType === EventType.
|
|
63
|
+
if (event.eventType === EventType.ACQUIRE_TOKEN_SUCCESS) {
|
|
66
64
|
const payload = event.payload as AuthenticationResult;
|
|
67
65
|
if (payload.account) {
|
|
68
66
|
pca.setActiveAccount(payload.account);
|