@mcurros2/microm 1.1.69-0 → 1.1.70-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/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6048,7 +6048,7 @@ var $0dfeab93be213999$var$__awaiter = undefined && undefined.__awaiter || functi
|
|
|
6048
6048
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6049
6049
|
});
|
|
6050
6050
|
};
|
|
6051
|
-
function $0dfeab93be213999$export$79c3258edc7d1573({ client: client, useLocalLoggedInCheck: useLocalLoggedInCheck }) {
|
|
6051
|
+
function $0dfeab93be213999$export$79c3258edc7d1573({ client: client, useLocalLoggedInCheck: useLocalLoggedInCheck, userInitialsClientClaimsNames: userInitialsClientClaimsNames }) {
|
|
6052
6052
|
const [isLoggedIn, setIsLoggedIn] = (0, $b4te3$react.useState)(undefined);
|
|
6053
6053
|
const [loggedInInfo, setLoggedInInfo] = (0, $b4te3$react.useState)({});
|
|
6054
6054
|
const checkIsLoggedIn = (0, $b4te3$react.useCallback)(()=>$0dfeab93be213999$var$__awaiter(this, void 0, void 0, function*() {
|
|
@@ -6077,7 +6077,11 @@ function $0dfeab93be213999$export$79c3258edc7d1573({ client: client, useLocalLog
|
|
|
6077
6077
|
return $0dfeab93be213999$var$__awaiter(this, void 0, void 0, function*() {
|
|
6078
6078
|
if (isLoggedIn) {
|
|
6079
6079
|
const info = client.LOGGED_IN_USER;
|
|
6080
|
-
|
|
6080
|
+
// get intials from the client claims using userInitialsClientClaimsNames. Take the properties values from the client claims it those exist,
|
|
6081
|
+
// join them in a string separated with ' ' and use that as the input for the getInitials function
|
|
6082
|
+
// if not use the default client.userInitialsInput
|
|
6083
|
+
const userInitialsClientClaims = info ? (userInitialsClientClaimsNames === null || userInitialsClientClaimsNames === void 0 ? void 0 : userInitialsClientClaimsNames.map((name)=>info[name]).filter((value)=>value).join(" ")) || info.username || "" : "";
|
|
6084
|
+
if (info === null || info === void 0 ? void 0 : info.username) info.userinitials = (0, $j7hNv.getInitials)(userInitialsClientClaims);
|
|
6081
6085
|
setLoggedInInfo(info !== null && info !== void 0 ? info : {});
|
|
6082
6086
|
} else setLoggedInInfo({});
|
|
6083
6087
|
});
|