@iblai/web-utils 1.1.13 → 1.1.14
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 +4 -4
- package/dist/index.esm.js +2 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -811,7 +811,7 @@ declare const isWeb: () => boolean;
|
|
|
811
811
|
declare const isNode: () => any;
|
|
812
812
|
declare const isExpo: () => any;
|
|
813
813
|
declare const isTauri: () => boolean;
|
|
814
|
-
declare const getPlatform: () => "
|
|
814
|
+
declare const getPlatform: () => "react-native" | "web" | "node" | "unknown";
|
|
815
815
|
declare const safeRequire: (moduleName: string) => any;
|
|
816
816
|
declare const getNextNavigation: () => any;
|
|
817
817
|
|
|
@@ -1509,7 +1509,7 @@ type Props$2 = {
|
|
|
1509
1509
|
* 4. Handles redirects to auth SPA when needed
|
|
1510
1510
|
* 5. Manages public route access state
|
|
1511
1511
|
*/
|
|
1512
|
-
declare function AuthProvider({ children, fallback, middleware, onAuthSuccess, onAuthFailure, redirectToAuthSpa, hasNonExpiredAuthToken, username, pathname, skipAuthCheck, storageService, token, enableStorageSync, skip, }: Props$2): string | number | bigint | boolean |
|
|
1512
|
+
declare function AuthProvider({ children, fallback, middleware, onAuthSuccess, onAuthFailure, redirectToAuthSpa, hasNonExpiredAuthToken, username, pathname, skipAuthCheck, storageService, token, enableStorageSync, skip, }: Props$2): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
1513
1513
|
|
|
1514
1514
|
/**
|
|
1515
1515
|
* Props for the MentorProvider component
|
|
@@ -1542,7 +1542,7 @@ type Props$1 = {
|
|
|
1542
1542
|
* 3. Manages redirection based on mentor availability
|
|
1543
1543
|
* 4. Integrates with tenant context for access control
|
|
1544
1544
|
*/
|
|
1545
|
-
declare function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redirectToAuthSpa, redirectToMentor, onLoadMentorsPermissions, redirectToNoMentorsPage, redirectToCreateMentor, username, isAdmin, mainTenantKey, requestedMentorId, handleMentorNotFound, forceDetermineMentor, onComplete, skip, }: Props$1): string | number | bigint | boolean |
|
|
1545
|
+
declare function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redirectToAuthSpa, redirectToMentor, onLoadMentorsPermissions, redirectToNoMentorsPage, redirectToCreateMentor, username, isAdmin, mainTenantKey, requestedMentorId, handleMentorNotFound, forceDetermineMentor, onComplete, skip, }: Props$1): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
1546
1546
|
|
|
1547
1547
|
/**
|
|
1548
1548
|
* Type definition for the tenant context
|
|
@@ -1604,7 +1604,7 @@ type Props = {
|
|
|
1604
1604
|
* 4. Handles tenant-specific domain redirects
|
|
1605
1605
|
* 5. Maintains tenant access state
|
|
1606
1606
|
*/
|
|
1607
|
-
declare function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, username, isIframed, setUseMentorProvider, skip, onLoadPlatformPermissions, }: Props): string | number | bigint | boolean |
|
|
1607
|
+
declare function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, username, isIframed, setUseMentorProvider, skip, onLoadPlatformPermissions, }: Props): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
1608
1608
|
|
|
1609
1609
|
/**
|
|
1610
1610
|
* Chat area size constants
|
package/dist/index.esm.js
CHANGED
|
@@ -3950,7 +3950,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
3950
3950
|
mentorDbId = await getMentorDbId(mentor);
|
|
3951
3951
|
}
|
|
3952
3952
|
// Load permissions if we have a mentor DB ID and user is logged in
|
|
3953
|
-
if (mentorDbId && isLoggedIn
|
|
3953
|
+
if (mentorDbId && isLoggedIn) {
|
|
3954
3954
|
const rbacPermissions = await loadMentorsPermissions(mentorDbId);
|
|
3955
3955
|
onLoadMentorsPermissions === null || onLoadMentorsPermissions === void 0 ? void 0 : onLoadMentorsPermissions(rbacPermissions);
|
|
3956
3956
|
}
|
|
@@ -3997,9 +3997,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
3997
3997
|
}
|
|
3998
3998
|
else {
|
|
3999
3999
|
console.log("requested mentor exists in tenant, proceeding", requestedMentorId);
|
|
4000
|
-
if (requestedMentorDbId &&
|
|
4001
|
-
isLoggedIn &&
|
|
4002
|
-
!userIsAccessingPublicRoute) {
|
|
4000
|
+
if (requestedMentorDbId && isLoggedIn) {
|
|
4003
4001
|
const rbacPermissions = await loadMentorsPermissions(requestedMentorDbId);
|
|
4004
4002
|
onLoadMentorsPermissions === null || onLoadMentorsPermissions === void 0 ? void 0 : onLoadMentorsPermissions(rbacPermissions);
|
|
4005
4003
|
}
|