@iblai/web-utils 1.1.17 → 1.1.18
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
CHANGED
|
@@ -1594,6 +1594,7 @@ type Props = {
|
|
|
1594
1594
|
setUseMentorProvider?: (useMentorProvider: boolean) => void;
|
|
1595
1595
|
skip?: boolean;
|
|
1596
1596
|
onLoadPlatformPermissions?: (rbacPermissions: Record<string, unknown> | undefined) => void;
|
|
1597
|
+
skipCustomDomainCheck?: boolean;
|
|
1597
1598
|
};
|
|
1598
1599
|
/**
|
|
1599
1600
|
* TenantProvider Component
|
|
@@ -1605,7 +1606,7 @@ type Props = {
|
|
|
1605
1606
|
* 4. Handles tenant-specific domain redirects
|
|
1606
1607
|
* 5. Maintains tenant access state
|
|
1607
1608
|
*/
|
|
1608
|
-
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;
|
|
1609
|
+
declare function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, username, isIframed, setUseMentorProvider, skip, onLoadPlatformPermissions, skipCustomDomainCheck, }: 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;
|
|
1609
1610
|
|
|
1610
1611
|
/**
|
|
1611
1612
|
* Chat area size constants
|
package/dist/index.esm.js
CHANGED
|
@@ -3150,7 +3150,7 @@ const useTenantContext = () => useContext(TenantContext);
|
|
|
3150
3150
|
* 4. Handles tenant-specific domain redirects
|
|
3151
3151
|
* 5. Maintains tenant access state
|
|
3152
3152
|
*/
|
|
3153
|
-
function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, username, isIframed = false, setUseMentorProvider, skip = false, onLoadPlatformPermissions, }) {
|
|
3153
|
+
function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, username, isIframed = false, setUseMentorProvider, skip = false, onLoadPlatformPermissions, skipCustomDomainCheck = false, }) {
|
|
3154
3154
|
// If skip is true, just return children without any provider logic
|
|
3155
3155
|
if (skip) {
|
|
3156
3156
|
return jsx(Fragment, { children: children });
|
|
@@ -3167,7 +3167,7 @@ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, curr
|
|
|
3167
3167
|
const [metadata, setMetadata] = useState({});
|
|
3168
3168
|
// Fetch custom domain to get platform_key
|
|
3169
3169
|
const currentDomain = typeof window !== "undefined" ? window.location.hostname : "";
|
|
3170
|
-
const { data: customDomainData, isLoading: isLoadingCustomDomain, isError: isCustomDomainError, } = useGetCustomDomainsQuery({ params: { domain: currentDomain } }, { skip: !isWeb() || !currentDomain });
|
|
3170
|
+
const { data: customDomainData, isLoading: isLoadingCustomDomain, isError: isCustomDomainError, } = useGetCustomDomainsQuery({ params: { domain: currentDomain } }, { skip: !isWeb() || !currentDomain || skipCustomDomainCheck });
|
|
3171
3171
|
// Extract platform_key from custom domain response to use as requestedTenant
|
|
3172
3172
|
const { customDomainPlatformKey, isAdvertisingTenant } = React__default.useMemo(() => {
|
|
3173
3173
|
let platformKey;
|