@asgardeo/react 0.2.4 → 0.3.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/README.md +108 -6
- package/dist/AsgardeoReactClient.d.ts +37 -0
- package/dist/__temp__/api.d.ts +229 -0
- package/dist/__temp__/models.d.ts +105 -0
- package/dist/api/scim2/getMeProfile.d.ts +39 -0
- package/dist/api/scim2/getSchemas.d.ts +39 -0
- package/dist/api/scim2/updateMeProfile.d.ts +38 -0
- package/dist/cjs/index.js +1955 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/components/actions/SignInButton/BaseSignInButton.d.ts +65 -0
- package/dist/components/actions/SignInButton/SignInButton.d.ts +46 -0
- package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts +65 -0
- package/dist/components/actions/SignOutButton/SignOutButton.d.ts +44 -0
- package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts +65 -0
- package/dist/components/actions/SignUpButton/SignUpButton.d.ts +45 -0
- package/dist/components/control/SignedIn.d.ts +45 -0
- package/dist/components/control/SignedOut.d.ts +45 -0
- package/dist/components/presentation/User.d.ts +57 -0
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts +76 -0
- package/dist/components/presentation/UserDropdown/UserDropdown.d.ts +49 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +42 -0
- package/dist/components/presentation/UserProfile/UserProfile.d.ts +49 -0
- package/dist/{esm/types/components/SignIn/SignIn.d.ts → components/primitives/Avatar/Avatar.d.ts} +25 -14
- package/dist/{esm/types/oxygen-ui-react-auth-components/models/component.d.ts → components/primitives/Checkbox/Checkbox.d.ts} +22 -7
- package/dist/components/primitives/DatePicker/DatePicker.d.ts +50 -0
- package/dist/components/primitives/Popover/Popover.d.ts +59 -0
- package/dist/components/primitives/Select/Select.d.ts +60 -0
- package/dist/components/primitives/TextField/TextField.d.ts +46 -0
- package/dist/contexts/AsgardeoContext.d.ts +56 -0
- package/dist/{esm/types/contexts/i18n-context.d.ts → hooks/useAsgardeo.d.ts} +4 -5
- package/dist/hooks/useBrowserUrl.d.ts +47 -0
- package/dist/index.d.ts +36 -348
- package/dist/index.js +1935 -0
- package/dist/index.js.map +7 -0
- package/dist/{esm/types/oxygen-ui-react-auth-components/index.d.ts → models/config.d.ts} +3 -3
- package/dist/{esm/types/hooks/use-config.d.ts → providers/AsgardeoProvider.d.ts} +7 -5
- package/dist/{esm/types/models/asgardeo-provider-props.d.ts → theme/ThemeContext.d.ts} +8 -7
- package/dist/{esm/types/models/branding-preference-provider-props.d.ts → theme/ThemeProvider.d.ts} +7 -5
- package/dist/{esm/types/models/use-on.d.ts → theme/types.d.ts} +22 -12
- package/dist/{esm/types/models/public-models.d.ts → theme/useTheme.d.ts} +3 -3
- package/dist/{esm/types/models/signed-props.d.ts → utils/getMappedUserProfileValue.d.ts} +3 -6
- package/dist/utils/getUserProfile.d.ts +59 -0
- package/package.json +55 -60
- package/dist/esm/index.js +0 -45278
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/types/components/SignIn/fragments/BasicAuth.d.ts +0 -35
- package/dist/esm/types/components/SignIn/fragments/EmailOtp.d.ts +0 -32
- package/dist/esm/types/components/SignIn/fragments/IdentifierFirst.d.ts +0 -35
- package/dist/esm/types/components/SignIn/fragments/LoginOptionsBox.d.ts +0 -30
- package/dist/esm/types/components/SignIn/fragments/SmsOtp.d.ts +0 -21
- package/dist/esm/types/components/SignIn/fragments/Totp.d.ts +0 -33
- package/dist/esm/types/components/SignInButton/SignInButton.d.ts +0 -29
- package/dist/esm/types/components/SignOutButton/SignOutButton.d.ts +0 -27
- package/dist/esm/types/components/SignedIn/SignedIn.d.ts +0 -29
- package/dist/esm/types/components/SignedOut/SignedOut.d.ts +0 -29
- package/dist/esm/types/components/public-components.d.ts +0 -22
- package/dist/esm/types/contexts/asgardeo-context.d.ts +0 -21
- package/dist/esm/types/contexts/branding-preference-context.d.ts +0 -21
- package/dist/esm/types/hooks/use-authentication.d.ts +0 -27
- package/dist/esm/types/hooks/use-on.d.ts +0 -20
- package/dist/esm/types/hooks/use-translations.d.ts +0 -33
- package/dist/esm/types/index.d.ts +0 -22
- package/dist/esm/types/models/auth-context.d.ts +0 -43
- package/dist/esm/types/models/basic-auth-props.d.ts +0 -29
- package/dist/esm/types/models/email-otp-props.d.ts +0 -26
- package/dist/esm/types/models/i18n.d.ts +0 -34
- package/dist/esm/types/models/jwt-verify-options.d.ts +0 -25
- package/dist/esm/types/models/login-options-box-props.d.ts +0 -24
- package/dist/esm/types/models/sign-in.d.ts +0 -49
- package/dist/esm/types/models/totp-props.d.ts +0 -26
- package/dist/esm/types/models/use-authentication.d.ts +0 -29
- package/dist/esm/types/models/use-config.d.ts +0 -22
- package/dist/esm/types/models/use-translations.d.ts +0 -22
- package/dist/esm/types/oxygen-ui-react-auth-components/SignIn/SignIn.d.ts +0 -79
- package/dist/esm/types/oxygen-ui-react-auth-components/SignInAlert/SignInAlert.d.ts +0 -37
- package/dist/esm/types/oxygen-ui-react-auth-components/SignInButton/SignInButton.d.ts +0 -27
- package/dist/esm/types/oxygen-ui-react-auth-components/SignInDivider/SignInDivider.d.ts +0 -26
- package/dist/esm/types/oxygen-ui-react-auth-components/SignInFooter/SignInFooter.d.ts +0 -29
- package/dist/esm/types/oxygen-ui-react-auth-components/SignInImage/SignInImage.d.ts +0 -23
- package/dist/esm/types/oxygen-ui-react-auth-components/SignInLink/SignInLink.d.ts +0 -25
- package/dist/esm/types/oxygen-ui-react-auth-components/SignInPaper/SignInPaper.d.ts +0 -26
- package/dist/esm/types/oxygen-ui-react-auth-components/SignInPinInput/SignInPinInput.d.ts +0 -30
- package/dist/esm/types/oxygen-ui-react-auth-components/SignInTextField/SignInTextField.d.ts +0 -26
- package/dist/esm/types/oxygen-ui-react-auth-components/SignInTypography/SignInTypography.d.ts +0 -32
- package/dist/esm/types/providers/AsgardeoProvider.d.ts +0 -34
- package/dist/esm/types/providers/BrandingPreferenceProvider.d.ts +0 -32
- package/dist/esm/types/providers/I18nProvider.d.ts +0 -33
- package/dist/esm/types/theme/generate-theme-sign-in.d.ts +0 -28
- package/dist/esm/types/theme/generate-theme.d.ts +0 -30
- package/dist/esm/types/utils/crypto-utils.d.ts +0 -52
- package/dist/esm/types/utils/session-store.d.ts +0 -25
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/providers/AsgardeoProvider.tsx", "../src/AsgardeoReactClient.ts", "../src/__temp__/api.ts", "../src/api/scim2/getMeProfile.ts", "../src/utils/getUserProfile.ts", "../src/api/scim2/getSchemas.ts", "../src/contexts/AsgardeoContext.ts", "../src/hooks/useBrowserUrl.ts", "../src/theme/ThemeProvider.tsx", "../src/theme/ThemeContext.ts", "../src/hooks/useAsgardeo.ts", "../src/components/actions/SignInButton/BaseSignInButton.tsx", "../src/components/actions/SignInButton/SignInButton.tsx", "../src/components/actions/SignOutButton/BaseSignOutButton.tsx", "../src/components/actions/SignOutButton/SignOutButton.tsx", "../src/components/actions/SignUpButton/BaseSignUpButton.tsx", "../src/components/actions/SignUpButton/SignUpButton.tsx", "../src/components/control/SignedIn.tsx", "../src/components/control/SignedOut.tsx", "../src/components/presentation/User.tsx", "../src/components/presentation/UserProfile/BaseUserProfile.tsx", "../src/components/primitives/Popover/Popover.tsx", "../src/theme/useTheme.ts", "../src/components/primitives/Avatar/Avatar.tsx", "../src/components/primitives/TextField/TextField.tsx", "../src/components/primitives/DatePicker/DatePicker.tsx", "../src/components/primitives/Checkbox/Checkbox.tsx", "../src/utils/getMappedUserProfileValue.ts", "../src/api/scim2/updateMeProfile.ts", "../src/components/presentation/UserProfile/UserProfile.tsx", "../src/components/presentation/UserDropdown/BaseUserDropdown.tsx", "../src/components/presentation/UserDropdown/UserDropdown.tsx", "../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {SignInOptions, SignOutOptions, User} from '@asgardeo/browser';\nimport {FC, RefObject, PropsWithChildren, ReactElement, useEffect, useMemo, useRef, useState, use} from 'react';\nimport AsgardeoReactClient from '../AsgardeoReactClient';\nimport AsgardeoContext from '../contexts/AsgardeoContext';\nimport useBrowserUrl from '../hooks/useBrowserUrl';\nimport {AsgardeoReactConfig} from '../models/config';\nimport {ThemeProvider} from '../theme/ThemeProvider';\n\n/**\n * Props interface of {@link AsgardeoProvider}\n */\nexport type AsgardeoProviderProps = AsgardeoReactConfig;\n\nconst AsgardeoProvider: FC<PropsWithChildren<AsgardeoProviderProps>> = ({\n afterSignInUrl = window.location.origin,\n baseUrl,\n clientId,\n children,\n scopes,\n preferences,\n}: PropsWithChildren<AsgardeoProviderProps>): ReactElement => {\n const reRenderCheckRef: RefObject<boolean> = useRef(false);\n const asgardeo: AsgardeoReactClient = useMemo(() => new AsgardeoReactClient(), []);\n const {hasAuthParams} = useBrowserUrl();\n const [user, setUser] = useState<any | null>(null);\n\n const [isSignedInSync, setIsSignedInSync] = useState<boolean>(false);\n\n useEffect(() => {\n (async (): Promise<void> => {\n await asgardeo.initialize({\n afterSignInUrl,\n baseUrl,\n clientId,\n scopes,\n });\n })();\n }, []);\n\n /**\n * Try signing in when the component is mounted.\n */\n useEffect(() => {\n // React 18.x Strict.Mode has a new check for `Ensuring reusable state` to facilitate an upcoming react feature.\n // https://reactjs.org/docs/strict-mode.html#ensuring-reusable-state\n // This will remount all the useEffects to ensure that there are no unexpected side effects.\n // When react remounts the signIn hook of the AuthProvider, it will cause a race condition. Hence, we have to\n // prevent the re-render of this hook as suggested in the following discussion.\n // https://github.com/reactwg/react-18/discussions/18#discussioncomment-795623\n if (reRenderCheckRef.current) {\n return;\n }\n\n reRenderCheckRef.current = true;\n\n (async (): Promise<void> => {\n // User is already authenticated. Skip...\n if (await asgardeo.isSignedIn()) {\n setUser(await asgardeo.getUser());\n\n return;\n }\n\n if (hasAuthParams(new URL(window.location.href), afterSignInUrl)) {\n try {\n await signIn(\n {callOnlyOnRedirect: true},\n // authParams?.authorizationCode,\n // authParams?.sessionState,\n // authParams?.state,\n );\n\n // setError(null);\n } catch (error) {\n debugger;\n if (error && Object.prototype.hasOwnProperty.call(error, 'code')) {\n // setError(error);\n }\n }\n }\n })();\n }, []);\n\n /**\n * Check if the user is signed in and update the state accordingly.\n * This will also set an interval to check for the sign-in status every second\n * until the user is signed in.\n */\n useEffect(() => {\n let interval: NodeJS.Timeout;\n\n (async () => {\n try {\n const status = await asgardeo.isSignedIn();\n setIsSignedInSync(status);\n\n if (!status) {\n interval = setInterval(async () => {\n const newStatus = await asgardeo.isSignedIn();\n if (newStatus) {\n setIsSignedInSync(true);\n clearInterval(interval);\n }\n }, 1000);\n }\n } catch (error) {\n setIsSignedInSync(false);\n }\n })();\n\n return () => {\n if (interval) {\n clearInterval(interval);\n }\n };\n }, [asgardeo]);\n\n const signIn = async (options?: SignInOptions): Promise<User> => {\n try {\n const response = await asgardeo.signIn(options);\n setUser(await asgardeo.getUser());\n\n return response;\n } catch (error) {\n throw new Error(`Error while signing in: ${error}`);\n }\n };\n\n const signUp = (): void => {\n throw new Error('Not implemented');\n };\n\n const signOut = async (options?: SignOutOptions, afterSignOut?: () => void): Promise<string> =>\n asgardeo.signOut(options, afterSignOut);\n\n const isDarkMode = useMemo(() => {\n if (!preferences?.theme?.mode || preferences.theme.mode === 'system') {\n return window.matchMedia('(prefers-color-scheme: dark)').matches;\n }\n return preferences.theme.mode === 'dark';\n }, [preferences?.theme?.mode]);\n\n return (\n <AsgardeoContext.Provider\n value={{\n isLoading: false,\n isSignedIn: isSignedInSync,\n signIn,\n signOut,\n signUp: () => {\n // TODO: Implement signUp functionality\n throw new Error('Sign up functionality not implemented yet');\n },\n user,\n baseUrl\n }}\n >\n <ThemeProvider theme={preferences?.theme?.overrides} defaultColorScheme={isDarkMode ? 'dark' : 'light'}>\n {children}\n </ThemeProvider>\n </AsgardeoContext.Provider>\n );\n};\n\nexport default AsgardeoProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n AsgardeoBrowserClient,\n extractUserClaimsFromIdToken,\n getUserInfo,\n SignInOptions,\n SignOutOptions,\n User,\n} from '@asgardeo/browser';\nimport AuthAPI from './__temp__/api';\nimport {AsgardeoReactConfig} from './models/config';\nimport getUserProfile from './utils/getUserProfile';\n\n/**\n * Client for mplementing Asgardeo in React applications.\n * This class provides the core functionality for managing user authentication and sessions.\n *\n * @typeParam T - Configuration type that extends AsgardeoReactConfig.\n */\nclass AsgardeoReactClient<T extends AsgardeoReactConfig = AsgardeoReactConfig> extends AsgardeoBrowserClient<T> {\n private asgardeo: AuthAPI;\n\n constructor() {\n super();\n\n // FIXME: This has to be the browser client from `@asgardeo/browser` package.\n this.asgardeo = new AuthAPI();\n }\n\n override initialize(config: T): Promise<boolean> {\n const scopes: string[] = Array.isArray(config.scopes) ? config.scopes : config.scopes.split(' ');\n\n return this.asgardeo.init({\n baseUrl: config.baseUrl,\n clientID: config.clientId,\n signInRedirectURL: config.afterSignInUrl,\n scope: [...scopes, 'internal_login'],\n });\n }\n\n override async getUser(): Promise<any> {\n const baseUrl = await (await this.asgardeo.getConfigData()).baseUrl;\n const profile = await getUserProfile({baseUrl});\n\n return profile;\n }\n\n override isLoading(): boolean {\n return this.asgardeo.isLoading();\n }\n\n override isSignedIn(): Promise<boolean> {\n return this.asgardeo.isSignedIn();\n }\n\n override signIn(options?: SignInOptions): Promise<User> {\n return this.asgardeo.signIn(options as any) as unknown as Promise<User>;\n }\n\n override signOut(options?: SignOutOptions, afterSignOut?: (redirectUrl: string) => void): Promise<string>;\n override signOut(\n options?: SignOutOptions,\n sessionId?: string,\n afterSignOut?: (redirectUrl: string) => void,\n ): Promise<string>;\n override async signOut(...args: any[]): Promise<string> {\n if (args[1] && typeof args[1] !== 'function') {\n throw new Error('The second argument must be a function.');\n }\n\n const response: boolean = await this.asgardeo.signOut(args[1]);\n\n return Promise.resolve(String(response));\n }\n}\n\nexport default AsgardeoReactClient;\n", "/**\n * Copyright (c) 2025, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n *\n * WSO2 Inc. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n AsgardeoSPAClient,\n AuthClientConfig,\n BasicUserInfo,\n LegacyConfig as Config,\n IdTokenPayload,\n FetchResponse,\n Hooks,\n HttpClientInstance,\n HttpRequestConfig,\n HttpResponse,\n OIDCEndpoints,\n SignInConfig,\n SPACustomGrantConfig,\n} from '@asgardeo/browser';\nimport {AuthStateInterface} from './models';\n\nclass AuthAPI {\n static DEFAULT_STATE: AuthStateInterface;\n\n private _authState = AuthAPI.DEFAULT_STATE;\n private _client: AsgardeoSPAClient;\n\n private _isLoading: boolean;\n\n constructor(spaClient?: AsgardeoSPAClient) {\n this._client = spaClient ?? AsgardeoSPAClient.getInstance();\n\n this.getState = this.getState.bind(this);\n this.init = this.init.bind(this);\n this.signIn = this.signIn.bind(this);\n this.signOut = this.signOut.bind(this);\n this.updateState = this.updateState.bind(this);\n }\n\n public _setIsLoading(isLoading: boolean): void {\n this._isLoading = isLoading;\n }\n\n public _getIsLoading(): boolean {\n return this._isLoading;\n }\n\n public isSignedIn(): Promise<boolean> {\n return this.isAuthenticated();\n }\n\n public isLoading(): boolean {\n return this._getIsLoading();\n }\n\n /**\n * Method to return Auth Client instance authentication state.\n *\n * @return {AuthStateInterface} Authentication State.\n */\n public getState(): AuthStateInterface {\n return this._authState;\n }\n\n /**\n * Method to initialize the AuthClient instance.\n *\n * @param {Config} config - `dispatch` function from React Auth Context.\n */\n public async init(config: AuthClientConfig<Config>): Promise<boolean> {\n return await this._client.initialize(config);\n }\n\n /**\n * Method to get the configuration data.\n *\n * @returns {Promise<AuthClientConfig<Config>>} - A promise that resolves with the configuration data.\n */\n public async getConfigData(): Promise<AuthClientConfig<Config>> {\n return await this._client.getConfigData();\n }\n\n /**\n * Method to handle user Sign In requests.\n *\n * @param {any} dispatch - `dispatch` function from React Auth Context.\n * @param {AuthStateInterface} state - Current authentication state in React Auth Context.\n * @param {any} callback - Action to trigger on successful sign in.\n */\n public async signIn(\n // dispatch: (state: AuthStateInterface) => void,\n // state: AuthStateInterface,\n config: SignInConfig,\n authorizationCode?: string,\n sessionState?: string,\n authState?: string,\n callback?: (response: BasicUserInfo) => void,\n tokenRequestConfig?: {\n params: Record<string, unknown>;\n },\n ): Promise<BasicUserInfo> {\n return this._client\n .signIn(config, authorizationCode, sessionState, authState, tokenRequestConfig)\n .then(async (response: BasicUserInfo) => {\n if (!response) {\n return null; // FIXME: Validate this. Temp fix for: error TS7030: Not all code paths return a value.\n }\n\n if (await this._client.isAuthenticated()) {\n const stateToUpdate = {\n allowedScopes: response.allowedScopes,\n displayName: response.displayName,\n email: response.email,\n isAuthenticated: true,\n isLoading: false,\n isSigningOut: false,\n sub: response.sub,\n username: response.username,\n };\n\n this.updateState(stateToUpdate);\n\n // dispatch({...state, ...stateToUpdate});\n this._setIsLoading(false);\n\n if (callback) {\n callback(response);\n }\n }\n\n return response;\n })\n .catch(error => {\n return Promise.reject(error);\n });\n }\n\n /**\n * Method to handle user Sign Out requests.\n *\n * @param {any} dispatch - `dispatch` function from React Auth Context.\n * @param {AuthStateInterface} state - Current authentication state in React Auth Context.\n * @param {any} callback - Action to trigger on successful sign out.\n */\n public signOut(callback?: (response?: boolean) => void): Promise<boolean> {\n return this._client\n .signOut()\n .then(response => {\n if (callback) {\n callback(response);\n }\n\n return response;\n })\n .catch(error => {\n return Promise.reject(error);\n });\n }\n\n /**\n * Method to update Auth Client instance authentication state.\n *\n * @param {AuthStateInterface} state - State values to update in authentication state.\n */\n public updateState(state: AuthStateInterface): void {\n this._authState = {...this._authState, ...state};\n }\n\n /**\n * This method returns a Promise that resolves with the basic user information obtained from the ID token.\n *\n * @return {Promise<BasicUserInfo>} - A promise that resolves with the user information.\n */\n public async getBasicUserInfo(): Promise<BasicUserInfo> {\n return this._client.getBasicUserInfo();\n }\n\n /**\n * This method sends an API request to a protected endpoint.\n * The access token is automatically attached to the header of the request.\n * This is the only way by which protected endpoints can be accessed\n * when the web worker is used to store session information.\n *\n * @param {HttpRequestConfig} config - The config object containing attributes necessary to send a request.\n *\n * @return {Promise<FetchResponse>} - Returns a Promise that resolves with the response to the request.\n */\n public async httpRequest(config: HttpRequestConfig): Promise<HttpResponse<any>> {\n return this._client.httpRequest(config);\n }\n\n /**\n * This method sends multiple API requests to a protected endpoint.\n * The access token is automatically attached to the header of the request.\n * This is the only way by which multiple requests can be sent to protected endpoints\n * when the web worker is used to store session information.\n *\n * @param {HttpRequestConfig[]} config - The config object containing attributes necessary to send a request.\n *\n * @return {Promise<FetchResponse[]>} - Returns a Promise that resolves with the responses to the requests.\n */\n public async httpRequestAll(configs: HttpRequestConfig[]): Promise<HttpResponse<any>[]> {\n return this._client.httpRequestAll(configs);\n }\n\n /**\n * This method allows you to send a request with a custom grant.\n *\n * @param {CustomGrantRequestParams} config - The request parameters.\n *\n * @return {Promise<FetchResponse<any> | SignInResponse>} - A Promise that resolves with\n * the value returned by the custom grant request.\n */\n public requestCustomGrant(\n config: SPACustomGrantConfig,\n callback: (response: BasicUserInfo | FetchResponse<any>) => void,\n dispatch: (state: AuthStateInterface) => void,\n ): Promise<BasicUserInfo | FetchResponse<any>> {\n return this._client\n .requestCustomGrant(config)\n .then((response: BasicUserInfo | FetchResponse<any>) => {\n if (!response) {\n return null; // FIXME: Validate this. Temp fix for: error TS7030: Not all code paths return a value.\n }\n\n if (config.returnsSession) {\n this.updateState({\n ...this.getState(),\n ...(response as BasicUserInfo),\n isAuthenticated: true,\n isLoading: false,\n });\n\n dispatch({...(response as BasicUserInfo), isAuthenticated: true, isLoading: false});\n }\n\n callback && callback(response);\n\n return response;\n })\n .catch(error => {\n return Promise.reject(error);\n });\n }\n\n /**\n * This method ends a user session. The access token is revoked and the session information is destroyed.\n *\n * @return {Promise<boolean>} - A promise that resolves with `true` if the process is successful.\n */\n public async revokeAccessToken(dispatch: (state: AuthStateInterface) => void): Promise<boolean> {\n return this._client\n .revokeAccessToken()\n .then(() => {\n this.updateState({...AuthAPI.DEFAULT_STATE, isLoading: false});\n dispatch(AuthAPI.DEFAULT_STATE);\n return true;\n })\n .catch(error => {\n return Promise.reject(error);\n });\n }\n\n /**\n * This method returns a Promise that resolves with an object containing the service endpoints.\n *\n * @return {Promise<ServiceResourcesType} - A Promise that resolves with an object containing the service endpoints.\n */\n public async getOIDCServiceEndpoints(): Promise<OIDCEndpoints> {\n return this._client.getOIDCServiceEndpoints();\n }\n\n /**\n * This methods returns the Axios http client.\n *\n * @return {HttpClientInstance} - The Axios HTTP client.\n */\n public async getHttpClient(): Promise<HttpClientInstance> {\n return this._client.getHttpClient();\n }\n\n /**\n * This method decodes the payload of the id token and returns it.\n *\n * @return {Promise<DecodedIDTokenPayloadInterface>} - A Promise that resolves with\n * the decoded payload of the id token.\n */\n public async getDecodedIDToken(): Promise<IdTokenPayload> {\n return this._client.getDecodedIDToken();\n }\n\n /**\n * This method decodes the payload of the idp id token and returns it.\n *\n * @return {Promise<DecodedIDTokenPayloadInterface>} - A Promise that resolves with\n * the decoded payload of the idp id token.\n */\n public async getDecodedIDPIDToken(): Promise<IdTokenPayload> {\n return this._client.getDecodedIDToken();\n }\n\n /**\n * This method returns the ID token.\n *\n * @return {Promise<string>} - A Promise that resolves with the id token.\n */\n public async getIDToken(): Promise<string> {\n return this._client.getIDToken();\n }\n\n /**\n * This method return a Promise that resolves with the access token.\n *\n * **This method will not return the access token if the storage type is set to `webWorker`.**\n *\n * @return {Promise<string>} - A Promise that resolves with the access token.\n */\n public async getAccessToken(): Promise<string> {\n return this._client.getAccessToken();\n }\n\n /**\n * This method return a Promise that resolves with the idp access token.\n *\n * **This method will not return the idp access token if the storage type is set to `webWorker`.**\n * **This can be used to access the IDP access token when custom auth grant functionalities are used**\n *\n * @return {Promise<string>} - A Promise that resolves with the idp access token.\n */\n public async getIDPAccessToken(): Promise<string> {\n return this._client.getIDPAccessToken();\n }\n\n /**\n * This method refreshes the access token.\n *\n * @return {TokenResponseInterface} - A Promise that resolves with an object containing\n * information about the refreshed access token.\n */\n public async refreshAccessToken(): Promise<BasicUserInfo> {\n return this._client.refreshAccessToken();\n }\n\n /**\n * This method specifies if the user is authenticated or not.\n *\n * @return {Promise<boolean>} - A Promise that resolves with `true` if teh user is authenticated.\n */\n public async isAuthenticated(): Promise<boolean> {\n return this._client.isAuthenticated();\n }\n\n /**\n * This method specifies if the session is active or not.\n *\n * @return {Promise<boolean>} - A Promise that resolves with `true` if there is an active session.\n */\n public async isSessionActive(): Promise<boolean> {\n return this._client.isSessionActive();\n }\n\n /**\n * This method enables callback functions attached to the http client.\n *\n * @return {Promise<boolean>} - A promise that resolves with True.\n *\n */\n public async enableHttpHandler(): Promise<boolean> {\n return this._client.enableHttpHandler();\n }\n\n /**\n * This method disables callback functions attached to the http client.\n *\n * @return {Promise<boolean>} - A promise that resolves with True.\n */\n public async disableHttpHandler(): Promise<boolean> {\n return this._client.disableHttpHandler();\n }\n\n /**\n * This method updates the configuration that was passed into the constructor when instantiating this class.\n *\n * @param {Partial<AuthClientConfig<T>>} config - A config object to update the SDK configurations with.\n */\n public async updateConfig(config: Partial<AuthClientConfig<Config>>): Promise<void> {\n return this._client.updateConfig(config);\n }\n\n /**\n * This method attaches a callback function to an event hook that fires the callback when the event happens.\n *\n * @param {Hooks.CustomGrant} hook - The name of the hook.\n * @param {(response?: any) => void} callback - The callback function.\n * @param {string} id (optional) - The id of the hook. This is used when multiple custom grants are used.\n *\n */\n public on(hook: Hooks.CustomGrant, callback: (response?: any) => void, id: string): Promise<void>;\n public on(hook: Exclude<Hooks, Hooks.CustomGrant>, callback: (response?: any) => void): Promise<void>;\n public on(hook: Hooks, callback: (response?: any) => void, id?: string): Promise<void> {\n if (hook === Hooks.CustomGrant) {\n return this._client.on(hook, callback, id);\n }\n\n return this._client.on(hook, callback);\n }\n\n /**\n * This method allows you to sign in silently.\n * First, this method sends a prompt none request to see if there is an active user session in the identity server.\n * If there is one, then it requests the access token and stores it. Else, it returns false.\n *\n * @return {Promise<BasicUserInfo | boolean>} - A Promise that resolves with the user information after signing in\n * or with `false` if the user is not signed in.\n *\n * @example\n *```\n * client.trySignInSilently()\n *```\n */\n public async trySignInSilently(\n state: AuthStateInterface,\n dispatch: (state: AuthStateInterface) => void,\n additionalParams?: Record<string, string | boolean>,\n tokenRequestConfig?: {params: Record<string, unknown>},\n ): Promise<BasicUserInfo | boolean | undefined> {\n return this._client\n .trySignInSilently(additionalParams, tokenRequestConfig)\n .then(async (response: BasicUserInfo | boolean) => {\n if (!response) {\n this.updateState({...this.getState(), isLoading: false});\n dispatch({...state, isLoading: false});\n\n return false;\n }\n\n if (await this._client.isAuthenticated()) {\n const basicUserInfo = response as BasicUserInfo;\n const stateToUpdate = {\n allowedScopes: basicUserInfo.allowedScopes,\n displayName: basicUserInfo.displayName,\n email: basicUserInfo.email,\n isAuthenticated: true,\n isLoading: false,\n isSigningOut: false,\n sub: basicUserInfo.sub,\n username: basicUserInfo.username,\n };\n\n this.updateState(stateToUpdate);\n\n dispatch({...state, ...stateToUpdate});\n }\n\n return response;\n })\n .catch(error => {\n return Promise.reject(error);\n });\n }\n}\n\nAuthAPI.DEFAULT_STATE = {\n allowedScopes: '',\n displayName: '',\n email: '',\n isAuthenticated: false,\n isLoading: true,\n sub: '',\n username: '',\n};\n\nexport default AuthAPI;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {User, AsgardeoAPIError, HttpInstance, AsgardeoSPAClient, HttpRequestConfig} from '@asgardeo/browser';\n\nconst httpClient: HttpInstance = AsgardeoSPAClient.getInstance().httpRequest.bind(AsgardeoSPAClient.getInstance());\n\n/**\n * Retrieves the user profile information from the specified selfcare profile endpoint.\n *\n * @param requestConfig - Request configuration object.\n * @returns A promise that resolves with the user profile information.\n * @example\n * ```typescript\n * try {\n * const userProfile = await getUserProfile({\n * url: \"https://api.asgardeo.io/t/<ORGANIZATION>/scim2/Me\",\n * });\n * console.log(userProfile);\n * } catch (error) {\n * if (error instanceof AsgardeoAPIError) {\n * console.error('Failed to get user profile:', error.message);\n * }\n * }\n * ```\n */\nconst getMeProfile = async ({url, ...requestConfig}: Partial<Request>): Promise<User> => {\n try {\n new URL(url);\n } catch (error) {\n throw new AsgardeoAPIError(\n 'Invalid endpoint URL provided',\n 'getMeProfile-ValidationError-001',\n 'javascript',\n 400,\n 'Invalid Request',\n );\n }\n\n const response: any = await httpClient({\n url,\n method: 'GET',\n headers: {\n 'Content-Type': 'application/scim+json',\n Accept: 'application/json',\n },\n } as HttpRequestConfig);\n\n if (!response.data) {\n const errorText = await response.text();\n\n throw new AsgardeoAPIError(\n `Failed to fetch user profile: ${errorText}`,\n 'getMeProfile-ResponseError-001',\n 'javascript',\n response.status,\n response.statusText,\n );\n }\n\n return response.data;\n};\n\nexport default getMeProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport getMeProfile from '../api/scim2/getMeProfile';\nimport {AsgardeoAPIError, User, WellKnownSchemaIds} from '@asgardeo/browser';\nimport getSchemas from '../api/scim2/getSchemas';\n\n/**\n * Retrieves the authenticated user's profile information with all SCIM2 schema properties\n * flattened to the root level for easier access.\n *\n * The function flattens properties from all schemas defined in WellKnownSchemaIds:\n * - Core User properties (urn:ietf:params:scim:schemas:core:2.0:User)\n * - Enterprise User properties (urn:ietf:params:scim:schemas:extension:enterprise:2.0:User)\n * - System User properties (urn:scim:wso2:schema)\n * - Custom User properties (urn:scim:schemas:extension:custom:User)\n *\n * @param requestConfig - Request configuration object.\n * @returns A promise that resolves with the flattened user profile information.\n * @example\n * ```typescript\n * try {\n * const userProfile = await getUserProfile({\n * url: \"https://api.asgardeo.io/t/<ORGANIZATION>/scim2/Me\",\n * });\n *\n * // Access flattened properties directly:\n * console.log(\"Email:\", userProfile.emails[0]);\n * console.log(\"Name:\", userProfile.name.formatted);\n * console.log(\"Username:\", userProfile.userName);\n *\n * // WSO2 specific properties:\n * console.log(\"Account State:\", userProfile.accountState);\n * console.log(\"Email Verified:\", userProfile.emailVerified);\n *\n * // Enterprise properties (if available):\n * console.log(\"Employee Number:\", userProfile.employeeNumber);\n * console.log(\"Cost Center:\", userProfile.costCenter);\n * } catch (error) {\n * if (error instanceof AsgardeoAPIError) {\n * console.error('Failed to get user profile:', error.message);\n * }\n * }\n * ```\n */\nconst getUserProfile = async ({baseUrl}): Promise<any> => {\n try {\n const profile = await getMeProfile({url: `${baseUrl}/scim2/Me`});\n const schemas = await getSchemas({url: `${baseUrl}/scim2/Schemas`});\n\n const result = [];\n\n for (const schema of schemas) {\n const schemaId = schema.id;\n\n const source = schemaId.startsWith('urn:ietf:params:scim:schemas:core:2.0') ? profile : profile[schemaId] ?? {};\n\n for (const attr of schema.attributes || []) {\n const {name, type, subAttributes, multiValued, caseExact, returned} = attr;\n\n if (type === 'COMPLEX' && subAttributes?.length && typeof source[name] === 'object') {\n // For complex attributes with subAttributes, create an entry for each subAttribute\n const complexValue = source[name];\n for (const subAttr of subAttributes) {\n if (complexValue[subAttr.name] !== undefined) {\n const {subAttributes, ...attrWithoutSubAttrs} = attr;\n\n // UPDATED PATH: prefix with schemaId except for core user schema\n const basePath =\n schemaId === 'urn:ietf:params:scim:schemas:core:2.0:User'\n ? `${name}.${subAttr.name}`\n : `${schemaId}.${name}.${subAttr.name}`;\n\n result.push({\n schemaId,\n ...subAttr,\n value: complexValue[subAttr.name],\n parent: {\n ...attrWithoutSubAttrs,\n },\n path: basePath,\n });\n }\n }\n } else {\n const value = source[name];\n // Only include if value exists\n\n if (value !== undefined) {\n // UPDATED PATH: prefix with schemaId except for core user schema\n const basePath = schemaId === 'urn:ietf:params:scim:schemas:core:2.0:User' ? name : `${schemaId}.${name}`;\n\n result.push({\n schemaId,\n ...attr,\n value,\n path: basePath,\n });\n }\n }\n }\n }\n\n return result;\n } catch (error) {\n throw new AsgardeoAPIError(\n 'Failed to get user profile',\n 'getUserProfile-Error-001',\n 'javascript',\n 500,\n 'Internal Server Error',\n );\n }\n};\n\nexport default getUserProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Schema, AsgardeoAPIError, HttpInstance, AsgardeoSPAClient, HttpRequestConfig} from '@asgardeo/browser';\n\nconst httpClient: HttpInstance = AsgardeoSPAClient.getInstance().httpRequest.bind(AsgardeoSPAClient.getInstance());\n\n/**\n * Retrieves the SCIM2 schemas from the specified endpoint.\n *\n * @param requestConfig - Request configuration object.\n * @returns A promise that resolves with the SCIM2 schemas information.\n * @example\n * ```typescript\n * try {\n * const schemas = await getSchemas({\n * url: \"https://api.asgardeo.io/t/<ORGANIZATION>/scim2/Schemas\",\n * });\n * console.log(schemas);\n * } catch (error) {\n * if (error instanceof AsgardeoAPIError) {\n * console.error('Failed to get schemas:', error.message);\n * }\n * }\n * ```\n */\nconst getSchemas = async ({url}: Partial<Request>): Promise<Schema[]> => {\n try {\n new URL(url);\n } catch (error) {\n throw new AsgardeoAPIError(\n 'Invalid endpoint URL provided',\n 'getSchemas-ValidationError-001',\n 'javascript',\n 400,\n 'Invalid Request',\n );\n }\n\n const response = await httpClient({\n url,\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n }\n } as HttpRequestConfig);\n\n if (!response.data) {\n throw new AsgardeoAPIError(\n `Failed to fetch SCIM2 schemas`,\n 'getSchemas-ResponseError-001',\n 'javascript',\n response.status,\n response.statusText,\n );\n }\n\n return response.data;\n};\n\nexport default getSchemas;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Context, createContext} from 'react';\nimport {User} from '@asgardeo/browser';\n\n/**\n * Props interface of {@link AsgardeoContext}\n */\nexport type AsgardeoContextProps = {\n /**\n * Flag indicating whether the SDK is working in the background.\n */\n isLoading: boolean;\n /**\n * Flag indicating whether the user is signed in or not.\n */\n isSignedIn: boolean;\n /**\n * Sign-in function to initiate the authentication process.\n * @remark This is the programmatic version of the `SignInButton` component.\n * TODO: Fix the types.\n */\n signIn: any;\n /**\n * Sign-out function to terminate the authentication session.\n * @remark This is the programmatic version of the `SignOutButton` component.\n * FIXME: Fix the types.\n */\n signOut: any;\n /**\n * Sign-up function to initiate the registration process.\n * @remark This is the programmatic version of the `SignUpButton` component.\n * FIXME: Fix the types.\n */\n signUp: any;\n user: any;\n baseUrl: string;\n};\n\n/**\n * Context object for managing the Authentication flow builder core context.\n */\nconst AsgardeoContext: Context<AsgardeoContextProps | null> = createContext<null | AsgardeoContextProps>({\n isLoading: true,\n isSignedIn: false,\n signIn: null,\n signOut: null,\n signUp: null,\n user: null,\n baseUrl: ''\n});\n\nAsgardeoContext.displayName = 'AsgardeoContext';\n\nexport default AsgardeoContext;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {hasAuthParamsInUrl} from '@asgardeo/browser';\n\n/**\n * Interface for the useBrowserUrl hook return value.\n */\nexport interface UseBrowserUrl {\n /**\n * Checks if the current URL contains authentication parameters.\n *\n * @param url - The URL object to check for authentication parameters\n * @param afterSignInUrl - The URL where the authorization server should redirect after authentication\n * @returns True if the URL contains authentication parameters and matches the afterSignInUrl, or if it contains an error parameter\n */\n hasAuthParams: (url: URL, afterSignInUrl: string) => boolean;\n}\n\n/**\n * Hook that provides utilities for handling browser URLs in authentication flows.\n *\n * @returns An object containing URL utility functions\n *\n * @example\n * ```tsx\n * const { hasAuthParams } = useBrowserUrl();\n * const url = new URL(window.location.href);\n *\n * if (hasAuthParams(url, \"/after-signin\")) {\n * // Handle authentication callback\n * }\n * ```\n */\nconst useBrowserUrl = (): UseBrowserUrl => {\n const hasAuthParams = (url: URL, afterSignInUrl: string): boolean =>\n (hasAuthParamsInUrl() && new URL(url.origin + url.pathname).toString() === new URL(afterSignInUrl).toString()) ||\n // authParams?.authorizationCode || // FIXME: These are sent externally. Need to see what we can do about this.\n url.searchParams.get('error') !== null;\n\n return {hasAuthParams};\n};\n\nexport default useBrowserUrl;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC, PropsWithChildren, ReactElement, useEffect, useMemo, useState} from 'react';\nimport {createTheme, Theme, ThemeConfig, RecursivePartial} from '@asgardeo/browser';\nimport ThemeContext from './ThemeContext';\n\nexport interface ThemeProviderProps {\n theme?: RecursivePartial<ThemeConfig>;\n defaultColorScheme?: 'light' | 'dark';\n}\n\nconst applyThemeToDOM = (theme: Theme) => {\n Object.entries(theme.cssVariables).forEach(([key, value]) => {\n document.documentElement.style.setProperty(key, value);\n });\n};\n\nexport const ThemeProvider: FC<PropsWithChildren<ThemeProviderProps>> = ({\n children,\n theme: themeConfig,\n defaultColorScheme = 'light',\n}: PropsWithChildren<ThemeProviderProps>): ReactElement => {\n const [colorScheme, setColorScheme] = useState<'light' | 'dark'>(defaultColorScheme);\n\n const theme = useMemo(() => createTheme(themeConfig, colorScheme === 'dark'), [themeConfig, colorScheme]);\n\n const toggleTheme = () => {\n setColorScheme(prev => (prev === 'light' ? 'dark' : 'light'));\n };\n\n useEffect(() => {\n applyThemeToDOM(theme);\n }, [theme]);\n\n const value = {\n theme,\n colorScheme,\n toggleTheme,\n };\n\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;\n};\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {createContext} from 'react';\nimport {Theme} from '@asgardeo/browser';\n\nexport interface ThemeContextValue {\n theme: Theme;\n colorScheme: 'light' | 'dark';\n toggleTheme: () => void;\n}\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null);\n\nThemeContext.displayName = 'ThemeContext';\n\nexport default ThemeContext;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {useContext} from 'react';\nimport AsgardeoContext, {AsgardeoContextProps} from '../contexts/AsgardeoContext';\n\nconst useAsgardeo = (): AsgardeoContextProps => {\n const context: AsgardeoContextProps | null = useContext(AsgardeoContext);\n\n if (!context) {\n throw new Error('useAsgardeo must be used within an AsgardeoProvider');\n }\n\n return context;\n};\n\nexport default useAsgardeo;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n ButtonHTMLAttributes,\n forwardRef,\n ForwardRefExoticComponent,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n} from 'react';\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport clsx from 'clsx';\n\n/**\n * Common props shared by all {@link BaseSignInButton} components.\n */\nexport interface CommonBaseSignInButtonProps {\n /**\n * Function to initiate the sign-in process\n */\n signIn?: () => Promise<void>;\n /**\n * Loading state during sign-in process\n */\n isLoading?: boolean;\n}\n\n/**\n * Props passed to the render function of {@link BaseSignInButton}\n */\nexport type BaseSignInButtonRenderProps = CommonBaseSignInButtonProps;\n\n/**\n * Props interface of {@link BaseSignInButton}\n */\nexport interface BaseSignInButtonProps\n extends CommonBaseSignInButtonProps,\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n /**\n * Render prop function that receives sign-in props, or traditional ReactNode children\n */\n children?: ((props: BaseSignInButtonRenderProps) => ReactNode) | ReactNode;\n}\n\n/**\n * Base SignInButton component that supports both render props and traditional props patterns.\n *\n * @example Using render props\n * ```tsx\n * <BaseSignInButton>\n * {({ signIn, isLoading }) => (\n * <button onClick={signIn} disabled={isLoading}>\n * {isLoading ? 'Signing in...' : 'Sign In'}\n * </button>\n * )}\n * </BaseSignInButton>\n * ```\n *\n * @example Using traditional props\n * ```tsx\n * <BaseSignInButton className=\"custom-button\">Sign In</BaseSignInButton>\n * ```\n */\nconst BaseSignInButton: ForwardRefExoticComponent<BaseSignInButtonProps & RefAttributes<HTMLButtonElement>> =\n forwardRef<HTMLButtonElement, BaseSignInButtonProps>(\n (\n {children, className, style, signIn, isLoading, ...rest}: BaseSignInButtonProps,\n ref: Ref<HTMLButtonElement>,\n ): ReactElement => {\n if (typeof children === 'function') {\n return <>{children({signIn, isLoading})}</>;\n }\n\n return (\n <button\n ref={ref}\n className={clsx(withVendorCSSClassPrefix('sign-in-button'), className)}\n style={style}\n disabled={isLoading}\n type=\"button\"\n {...rest}\n >\n {children}\n </button>\n );\n },\n );\n\nBaseSignInButton.displayName = 'BaseSignInButton';\n\nexport default BaseSignInButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {forwardRef, ForwardRefExoticComponent, MouseEvent, ReactElement, Ref, RefAttributes, useState} from 'react';\nimport useAsgardeo from '../../../hooks/useAsgardeo';\nimport BaseSignInButton, {BaseSignInButtonProps} from './BaseSignInButton';\n\n/**\n * Props interface of {@link SignInButton}\n */\nexport type SignInButtonProps = BaseSignInButtonProps;\n\n/**\n * SignInButton component that supports both render props and traditional props patterns.\n *\n * @remarks This component is only supported in browser based React applications (CSR).\n *\n * @example Using render props\n * ```tsx\n * <SignInButton>\n * {({ handleSignIn, isLoading }) => (\n * <button onClick={handleSignIn} disabled={isLoading}>\n * {isLoading ? 'Signing in...' : 'Sign In'}\n * </button>\n * )}\n * </SignInButton>\n * ```\n *\n * @example Using traditional props\n * ```tsx\n * <SignInButton className=\"custom-button\">Sign In</SignInButton>\n * ```\n */\nconst SignInButton: ForwardRefExoticComponent<SignInButtonProps & RefAttributes<HTMLButtonElement>> = forwardRef<\n HTMLButtonElement,\n SignInButtonProps\n>(({children = 'Sign In', onClick, ...rest}: SignInButtonProps, ref: Ref<HTMLButtonElement>): ReactElement => {\n const {signIn} = useAsgardeo();\n const [isLoading, setIsLoading] = useState(false);\n\n const handleSignIn = async (e?: MouseEvent<HTMLButtonElement>): Promise<void> => {\n try {\n setIsLoading(true);\n\n await signIn();\n\n if (onClick) {\n onClick(e);\n }\n } catch (error) {\n throw new Error(`Sign in failed: ${error instanceof Error ? error.message : String(error)}`);\n } finally {\n setIsLoading(false);\n }\n };\n\n return (\n <BaseSignInButton ref={ref} onClick={handleSignIn} isLoading={isLoading} signIn={handleSignIn} {...rest}>\n {children}\n </BaseSignInButton>\n );\n});\n\nSignInButton.displayName = 'SignInButton';\n\nexport default SignInButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n forwardRef,\n ForwardRefExoticComponent,\n ButtonHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n} from 'react';\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport clsx from 'clsx';\n\n/**\n * Common props shared by all {@link BaseSignOutButton} components.\n */\nexport interface CommonBaseSignOutButtonProps {\n /**\n * Function to initiate the sign-out process\n */\n signOut?: () => Promise<void>;\n /**\n * Loading state during sign-out process\n */\n isLoading?: boolean;\n}\n\n/**\n * Props passed to the render function of {@link BaseSignOutButton}\n */\nexport type BaseSignOutButtonRenderProps = CommonBaseSignOutButtonProps;\n\n/**\n * Props interface of {@link BaseSignOutButton}\n */\nexport interface BaseSignOutButtonProps\n extends CommonBaseSignOutButtonProps,\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n /**\n * Render prop function that receives sign-out props, or traditional ReactNode children\n */\n children?: ((props: BaseSignOutButtonRenderProps) => ReactNode) | ReactNode;\n}\n\n/**\n * Base SignOutButton component that supports both render props and traditional props patterns.\n *\n * @example Using render props\n * ```tsx\n * <BaseSignOutButton>\n * {({ signOut, isLoading }) => (\n * <button onClick={signOut} disabled={isLoading}>\n * {isLoading ? 'Signing out...' : 'Sign Out'}\n * </button>\n * )}\n * </BaseSignOutButton>\n * ```\n *\n * @example Using traditional props\n * ```tsx\n * <BaseSignOutButton className=\"custom-button\">Sign Out</BaseSignOutButton>\n * ```\n */\nconst BaseSignOutButton: ForwardRefExoticComponent<BaseSignOutButtonProps & RefAttributes<HTMLButtonElement>> =\n forwardRef<HTMLButtonElement, BaseSignOutButtonProps>(\n (\n {children, className, style, signOut, isLoading, ...rest}: BaseSignOutButtonProps,\n ref: Ref<HTMLButtonElement>,\n ): ReactElement => {\n if (typeof children === 'function') {\n return <>{children({signOut, isLoading})}</>;\n }\n\n return (\n <button\n ref={ref}\n className={clsx(withVendorCSSClassPrefix('sign-out-button'), className)}\n style={style}\n disabled={isLoading}\n type=\"button\"\n {...rest}\n >\n {children}\n </button>\n );\n },\n );\n\nBaseSignOutButton.displayName = 'BaseSignOutButton';\n\nexport default BaseSignOutButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC, forwardRef, ForwardRefExoticComponent, MouseEvent, ReactElement, Ref, RefAttributes, useState} from 'react';\nimport useAsgardeo from '../../../hooks/useAsgardeo';\nimport BaseSignOutButton, {BaseSignOutButtonProps} from './BaseSignOutButton';\n\n/**\n * Props interface of {@link SignOutButton}\n */\nexport type SignOutButtonProps = BaseSignOutButtonProps;\n\n/**\n * SignOutButton component that supports both render props and traditional props patterns.\n *\n * @example Using render props pattern\n * ```tsx\n * <SignOutButton>\n * {({ signOut, isLoading }) => (\n * <button onClick={signOut} disabled={isLoading}>\n * {isLoading ? 'Signing out...' : 'Sign Out'}\n * </button>\n * )}\n * </SignOutButton>\n * ```\n *\n * @example Using traditional props pattern\n * ```tsx\n * <SignOutButton className=\"custom-button\">Sign Out</SignOutButton>\n * ```\n */\nconst SignOutButton: ForwardRefExoticComponent<SignOutButtonProps & RefAttributes<HTMLButtonElement>> = forwardRef<\n HTMLButtonElement,\n SignOutButtonProps\n>(({children = 'Sign Out', onClick, ...rest}: SignOutButtonProps, ref: Ref<HTMLButtonElement>): ReactElement => {\n const {signOut} = useAsgardeo();\n const [isLoading, setIsLoading] = useState(false);\n\n const handleSignOut = async (e?: MouseEvent<HTMLButtonElement>): Promise<void> => {\n try {\n setIsLoading(true);\n await signOut();\n\n if (onClick) {\n onClick(e);\n }\n } catch (error) {\n throw new Error(`Sign out failed: ${error instanceof Error ? error.message : String(error)}`);\n } finally {\n setIsLoading(false);\n }\n };\n\n return (\n <BaseSignOutButton ref={ref} onClick={handleSignOut} isLoading={isLoading} signOut={handleSignOut} {...rest}>\n {children}\n </BaseSignOutButton>\n );\n});\n\nSignOutButton.displayName = 'SignOutButton';\n\nexport default SignOutButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n forwardRef,\n ForwardRefExoticComponent,\n ButtonHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n} from 'react';\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport clsx from 'clsx';\n\n/**\n * Common props shared by all {@link BaseSignUpButton} components.\n */\nexport interface CommonBaseSignUpButtonProps {\n /**\n * Function to initiate the sign-up process\n */\n signUp?: () => Promise<void>;\n /**\n * Loading state during sign-up process\n */\n isLoading?: boolean;\n}\n\n/**\n * Props passed to the render function of {@link BaseSignUpButton}\n */\nexport type BaseSignUpButtonRenderProps = CommonBaseSignUpButtonProps;\n\n/**\n * Props interface of {@link BaseSignUpButton}\n */\nexport interface BaseSignUpButtonProps\n extends CommonBaseSignUpButtonProps,\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n /**\n * Render prop function that receives sign-up props, or traditional ReactNode children\n */\n children?: ((props: BaseSignUpButtonRenderProps) => ReactNode) | ReactNode;\n}\n\n/**\n * Base SignUpButton component that supports both render props and traditional props patterns.\n *\n * @example Using render props\n * ```tsx\n * <BaseSignUpButton>\n * {({ signUp, isLoading }) => (\n * <button onClick={signUp} disabled={isLoading}>\n * {isLoading ? 'Creating account...' : 'Create Account'}\n * </button>\n * )}\n * </BaseSignUpButton>\n * ```\n *\n * @example Using traditional props\n * ```tsx\n * <BaseSignUpButton className=\"custom-button\">Create Account</BaseSignUpButton>\n * ```\n */\nconst BaseSignUpButton: ForwardRefExoticComponent<BaseSignUpButtonProps & RefAttributes<HTMLButtonElement>> =\n forwardRef<HTMLButtonElement, BaseSignUpButtonProps>(\n (\n {children, className, style, signUp, isLoading, ...rest}: BaseSignUpButtonProps,\n ref: Ref<HTMLButtonElement>,\n ): ReactElement => {\n if (typeof children === 'function') {\n return <>{children({signUp, isLoading})}</>;\n }\n\n return (\n <button\n ref={ref}\n className={clsx(withVendorCSSClassPrefix('sign-up-button'), className)}\n style={style}\n disabled={isLoading}\n type=\"button\"\n {...rest}\n >\n {children}\n </button>\n );\n },\n );\n\nBaseSignUpButton.displayName = 'BaseSignUpButton';\n\nexport default BaseSignUpButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC, forwardRef, ForwardRefExoticComponent, MouseEvent, ReactElement, Ref, RefAttributes, useState} from 'react';\nimport useAsgardeo from '../../../hooks/useAsgardeo';\nimport BaseSignUpButton, {BaseSignUpButtonProps} from './BaseSignUpButton';\n\n/**\n * Props interface of {@link SignUpButton}\n */\nexport type SignUpButtonProps = BaseSignUpButtonProps;\n\n/**\n * SignUpButton component that supports both render props and traditional props patterns.\n * It redirects the user to the Asgardeo sign-up page configured for the application.\n *\n * @example Using render props pattern\n * ```tsx\n * <SignUpButton>\n * {({ signUp, isLoading }) => (\n * <button onClick={signUp} disabled={isLoading}>\n * {isLoading ? 'Creating Account...' : 'Create Account'}\n * </button>\n * )}\n * </SignUpButton>\n * ```\n *\n * @example Using traditional props pattern\n * ```tsx\n * <SignUpButton className=\"custom-button\">Create Account</SignUpButton>\n * ```\n */\nconst SignUpButton: ForwardRefExoticComponent<SignUpButtonProps & RefAttributes<HTMLButtonElement>> = forwardRef<\n HTMLButtonElement,\n SignUpButtonProps\n>(({children = 'Sign Up', onClick, ...rest}: SignUpButtonProps, ref: Ref<HTMLButtonElement>): ReactElement => {\n const {signUp} = useAsgardeo();\n const [isLoading, setIsLoading] = useState(false);\n\n const handleSignUp = async (e?: MouseEvent<HTMLButtonElement>): Promise<void> => {\n try {\n setIsLoading(true);\n await signUp();\n\n if (onClick) {\n onClick(e);\n }\n } catch (error) {\n throw new Error(`Sign up failed: ${error instanceof Error ? error.message : String(error)}`);\n } finally {\n setIsLoading(false);\n }\n };\n\n return (\n <BaseSignUpButton ref={ref} onClick={handleSignUp} isLoading={isLoading} signUp={handleSignUp} {...rest}>\n {children}\n </BaseSignUpButton>\n );\n});\n\nSignUpButton.displayName = 'SignUpButton';\n\nexport default SignUpButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC, PropsWithChildren, ReactNode} from 'react';\nimport useAsgardeo from '../../hooks/useAsgardeo';\n\n/**\n * Props for the SignedIn component.\n */\nexport interface SignedInProps {\n /**\n * Content to show when the user is not signed in.\n */\n fallback?: ReactNode;\n}\n\n/**\n * A component that only renders its children when the user is signed in.\n *\n * @example\n * ```tsx\n * import { SignedIn } from '@asgardeo/auth-react';\n *\n * const App = () => {\n * return (\n * <SignedIn fallback={<p>Please sign in to continue</p>}>\n * <p>Welcome! You are signed in.</p>\n * </SignedIn>\n * );\n * }\n * ```\n */\nconst SignedIn: FC<PropsWithChildren<SignedInProps>> = ({\n children,\n fallback = null,\n}: PropsWithChildren<SignedInProps>) => {\n const {isSignedIn} = useAsgardeo();\n\n if (!isSignedIn) {\n return <>{fallback}</>;\n }\n\n return <>{children}</>;\n};\n\nSignedIn.displayName = 'SignedIn';\n\nexport default SignedIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC, PropsWithChildren, ReactNode} from 'react';\nimport useAsgardeo from '../../hooks/useAsgardeo';\n\n/**\n * Props for the SignedOut component.\n */\nexport interface SignedOutProps {\n /**\n * Content to show when the user is signed in.\n */\n fallback?: ReactNode;\n}\n\n/**\n * A component that only renders its children when the user is signed out.\n *\n * @example\n * ```tsx\n * import { SignedOut } from '@asgardeo/auth-react';\n *\n * const App = () => {\n * return (\n * <SignedOut fallback={<p>You are already signed in</p>}>\n * <p>Please sign in to continue</p>\n * </SignedOut>\n * );\n * }\n * ```\n */\nconst SignedOut: FC<PropsWithChildren<SignedOutProps>> = ({\n children,\n fallback = null,\n}: PropsWithChildren<SignedOutProps>) => {\n const {isSignedIn} = useAsgardeo();\n\n if (!isSignedIn) {\n return <>{children}</>;\n }\n\n return <>{fallback}</>;\n};\n\nSignedOut.displayName = 'SignedOut';\n\nexport default SignedOut;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {User as AsgardeoUser} from '@asgardeo/browser';\nimport {FC, ReactElement, ReactNode} from 'react';\nimport useAsgardeo from '../../hooks/useAsgardeo';\n\n/**\n * Props for the User component.\n */\nexport interface UserProps {\n /**\n * Render prop that takes the user object and returns a ReactNode.\n * @param user - The authenticated user object from Asgardeo.\n * @returns A ReactNode to render.\n */\n children: (user: AsgardeoUser | null) => ReactNode;\n\n /**\n * Optional element to render when no user is signed in.\n */\n fallback?: ReactNode;\n}\n\n/**\n * A component that uses render props to expose the authenticated user object.\n *\n * @example\n * ```tsx\n * import { User } from '@asgardeo/auth-react';\n *\n * const App = () => {\n * return (\n * <User fallback={<p>Please sign in</p>}>\n * {(user) => (\n * <div>\n * <h1>Welcome, {user.displayName}!</h1>\n * <p>Email: {user.email}</p>\n * </div>\n * )}\n * </User>\n * );\n * }\n * ```\n */\nconst User: FC<UserProps> = ({children, fallback = null}): ReactElement => {\n const {user} = useAsgardeo();\n\n if (!user) {\n return <>{fallback}</>;\n }\n\n return <>{children(user)}</>;\n};\n\nUser.displayName = 'User';\n\nexport default User;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {CSSProperties, FC, ReactElement, useMemo, useState, useCallback} from 'react';\nimport {Popover} from '../../primitives/Popover/Popover';\nimport {Avatar} from '../../primitives/Avatar/Avatar';\nimport {TextField} from '../../primitives/TextField/TextField';\nimport {DatePicker} from '../../primitives/DatePicker/DatePicker';\nimport {Checkbox} from '../../primitives/Checkbox/Checkbox';\nimport {useTheme} from '../../../theme/useTheme';\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport clsx from 'clsx';\nimport getMappedUserProfileValue from '../../../utils/getMappedUserProfileValue';\n\ninterface ExtendedFlatSchema {\n schemaId?: string;\n path?: string;\n}\n\ninterface Schema extends ExtendedFlatSchema {\n caseExact?: boolean;\n description?: string;\n displayName?: string;\n multiValued?: boolean;\n mutability?: string;\n name?: string;\n required?: boolean;\n returned?: string;\n type?: string;\n uniqueness?: string;\n value?: any;\n subAttributes?: Schema[];\n}\n\nexport interface BaseUserProfileProps {\n fallback?: ReactElement;\n className?: string;\n cardLayout?: boolean;\n user: any;\n mode?: 'inline' | 'popup';\n portalId?: string;\n title?: string;\n attributeMapping?: {\n picture?: string | string[];\n firstName?: string | string[];\n lastName?: string | string[];\n username?: string | string[];\n [key: string]: string | string[] | undefined;\n };\n editable?: boolean;\n onChange?: (field: string, value: any) => void;\n onSubmit?: (data: any) => void;\n saveButtonText?: string;\n cancelButtonText?: string;\n onUpdate?: (payload: any) => Promise<void>;\n}\n\nconst BaseUserProfile: FC<BaseUserProfileProps> = ({\n fallback = <div>Please sign in to view your profile</div>,\n className = '',\n cardLayout = true,\n user,\n mode = 'inline',\n portalId = 'asgardeo-user-profile',\n title = 'User Profile',\n attributeMapping = {},\n editable = true,\n onChange,\n onSubmit,\n onUpdate,\n saveButtonText = 'Save Changes',\n cancelButtonText = 'Cancel',\n}): ReactElement => {\n const {theme} = useTheme();\n const [isOpen, setIsOpen] = useState(mode === 'popup');\n const [editedUser, setEditedUser] = useState(user);\n const [editingFields, setEditingFields] = useState<Record<string, boolean>>({});\n\n const PencilIcon = () => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z\" />\n </svg>\n );\n\n const toggleFieldEdit = useCallback((fieldName: string) => {\n setEditingFields(prev => ({\n ...prev,\n [fieldName]: !prev[fieldName],\n }));\n }, []);\n\n function set(obj: Record<string, any>, path: string, value: any): void {\n const keys = path.split('.');\n let current = obj;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n\n // If last key, set the value\n if (i === keys.length - 1) {\n current[key] = value;\n } else {\n // If the next level does not exist or is not an object, create an object\n if (!current[key] || typeof current[key] !== 'object') {\n current[key] = {};\n }\n current = current[key];\n }\n }\n }\n\n const handleFieldSave = useCallback(\n (schema: Schema) => {\n let payload = {};\n const fieldName = schema.name;\n const fieldValue =\n editedUser && fieldName && editedUser[fieldName] !== undefined ? editedUser[fieldName] : schema.value;\n\n set(payload, schema.path, fieldValue);\n\n onUpdate(payload);\n // Optionally, exit edit mode for this field after save\n toggleFieldEdit(fieldName!);\n },\n [editedUser, onUpdate, toggleFieldEdit],\n );\n\n const handleFieldCancel = useCallback(\n (fieldName: string) => {\n setEditedUser(prev => ({\n ...prev,\n [fieldName]: user[fieldName],\n }));\n toggleFieldEdit(fieldName);\n },\n [user, toggleFieldEdit],\n );\n\n const formatLabel = useCallback((key: string): string => {\n return key\n .split(/(?=[A-Z])|_/)\n .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n }, []);\n\n const styles = useStyles();\n const buttonStyle = useMemo(\n () => ({\n padding: `${theme.spacing.unit}px ${theme.spacing.unit * 2}px`,\n margin: `${theme.spacing.unit}px`,\n borderRadius: theme.borderRadius.small,\n border: 'none',\n cursor: 'pointer',\n fontSize: '0.875rem',\n fontWeight: 500,\n }),\n [theme],\n );\n\n const saveButtonStyle = useMemo(\n () => ({\n ...buttonStyle,\n backgroundColor: theme.colors.primary.main,\n color: theme.colors.primary.contrastText,\n }),\n [theme, buttonStyle],\n );\n\n const cancelButtonStyle = useMemo(\n () => ({\n ...buttonStyle,\n backgroundColor: theme.colors.secondary.main,\n border: `1px solid ${theme.colors.border}`,\n }),\n [theme, buttonStyle],\n );\n\n const defaultAttributeMappings = {\n picture: ['profile', 'profileUrl'],\n firstName: 'givenName',\n lastName: 'familyName',\n };\n\n const mergedMappings = {...defaultAttributeMappings, ...attributeMapping};\n\n // Combines label and value/field rendering for both view and edit modes\n const renderSchemaField = (\n schema: Schema,\n isEditing: boolean,\n onEditValue?: (value: any) => void,\n ): ReactElement | null => {\n if (!schema) return null;\n const {value, displayName, description, name, type, required, mutability, subAttributes} = schema;\n const label = displayName || description || name || '';\n\n // If complex or subAttributes, fallback to original renderSchemaValue\n if (subAttributes && Array.isArray(subAttributes)) {\n return (\n <>\n {subAttributes.map((subAttr, index) => (\n <div key={index} style={styles.field}>\n <span style={styles.label}>{subAttr.displayName || subAttr.description || ''}</span>\n <div style={styles.value}>\n {Array.isArray(subAttr.value)\n ? subAttr.value\n .map(item => (typeof item === 'object' ? JSON.stringify(item) : String(item)))\n .join(', ')\n : typeof subAttr.value === 'object'\n ? JSON.stringify(subAttr.value)\n : String(subAttr.value)}\n </div>\n </div>\n ))}\n </>\n );\n }\n if (Array.isArray(value)) {\n const displayValue = value\n .map(item => (typeof item === 'object' ? JSON.stringify(item) : String(item)))\n .join(', ');\n return (\n <>\n <span style={styles.label}>{label}</span>\n <div style={styles.value}>{displayValue}</div>\n </>\n );\n }\n if (type === 'COMPLEX' && typeof value === 'object') {\n return <ObjectDisplay data={value} />;\n }\n // If editing, show field instead of value\n if (isEditing && onEditValue && mutability !== 'READ_ONLY') {\n // Use editedUser value if available\n const fieldValue = editedUser && name && editedUser[name] !== undefined ? editedUser[name] : value || '';\n const commonProps = {\n label: undefined, // Don't show label in field, we render it outside\n required: required,\n value: fieldValue,\n onChange: (e: any) => onEditValue(e.target ? e.target.value : e),\n style: {\n marginBottom: 0,\n },\n };\n let field: ReactElement;\n switch (type) {\n case 'STRING':\n field = <TextField {...commonProps} />;\n break;\n case 'DATE_TIME':\n field = <DatePicker {...commonProps} />;\n break;\n case 'BOOLEAN':\n field = <Checkbox {...commonProps} checked={!!fieldValue} onChange={e => onEditValue(e.target.checked)} />;\n break;\n case 'COMPLEX':\n field = <TextField {...commonProps} />;\n break;\n default:\n field = <TextField {...commonProps} />;\n }\n return (\n <>\n <span style={styles.label}>{label}</span>\n <div style={styles.value}>{field}</div>\n </>\n );\n }\n // Default: view mode\n return (\n <>\n <span style={styles.label}>{label}</span>\n <div style={styles.value}>{String(value)}</div>\n </>\n );\n };\n\n const renderUserInfo = (schema: Schema) => {\n if (!schema || !schema.name) return null;\n\n const isFieldEditing = editingFields[schema.name];\n const fieldStyle = {\n ...styles.field,\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing.unit + 'px',\n };\n const actionButtonStyle = {\n ...buttonStyle,\n padding: `${theme.spacing.unit / 2}px ${theme.spacing.unit}px`,\n fontSize: '0.75rem',\n marginLeft: 'auto',\n };\n\n return (\n <div style={fieldStyle}>\n <div style={{flex: 1, display: 'flex', alignItems: 'center', gap: theme.spacing.unit + 'px'}}>\n {renderSchemaField(schema, isFieldEditing, value => {\n const tempEditedUser = {...editedUser};\n tempEditedUser[schema.name!] = value;\n setEditedUser(tempEditedUser);\n })}\n </div>\n {editable && schema.mutability !== 'READ_ONLY' && (\n <div\n style={{\n display: 'flex',\n gap: theme.spacing.unit / 2 + 'px',\n alignItems: 'center',\n marginLeft: theme.spacing.unit + 'px',\n }}\n >\n {isFieldEditing ? (\n <>\n <button style={{...actionButtonStyle, ...saveButtonStyle}} onClick={() => handleFieldSave(schema)}>\n Save\n </button>\n <button\n style={{...actionButtonStyle, ...cancelButtonStyle}}\n onClick={() => handleFieldCancel(schema.name!)}\n >\n Cancel\n </button>\n </>\n ) : (\n <button\n style={{\n ...actionButtonStyle,\n backgroundColor: 'transparent',\n border: 'none',\n margin: 0,\n padding: theme.spacing.unit / 2 + 'px',\n color: theme.colors.text.secondary,\n }}\n onClick={() => toggleFieldEdit(schema.name!)}\n title=\"Edit\"\n >\n <PencilIcon />\n </button>\n )}\n </div>\n )}\n </div>\n );\n };\n\n const ObjectDisplay: FC<{data: unknown}> = ({data}) => {\n if (!data || typeof data !== 'object') return null;\n\n return (\n <table style={{width: '100%', borderCollapse: 'collapse'}}>\n <tbody>\n {Object.entries(data).map(([key, value]) => (\n <tr key={key} style={{borderBottom: `1px solid ${theme.colors.border}`}}>\n <td style={{padding: theme.spacing.unit + 'px', verticalAlign: 'top'}}>\n <strong>{formatLabel(key)}:</strong>\n </td>\n <td style={{padding: theme.spacing.unit + 'px', verticalAlign: 'top'}}>\n {typeof value === 'object' ? <ObjectDisplay data={value} /> : String(value)}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n };\n\n const getDisplayName = () => {\n const firstName = getMappedUserProfileValue('firstName', mergedMappings, user);\n const lastName = getMappedUserProfileValue('lastName', mergedMappings, user);\n\n if (firstName && lastName) {\n return `${firstName} ${lastName}`;\n }\n\n return getMappedUserProfileValue('username', mergedMappings, user) || '';\n };\n\n if (!user) {\n return fallback;\n }\n\n const containerStyle = {\n ...styles.root,\n ...(cardLayout ? styles.card : {}),\n };\n\n const avatarAttributes = ['picture'];\n const excludedProps = avatarAttributes.map(attr => mergedMappings[attr] || attr);\n\n const profileContent = (\n <div style={containerStyle} className={clsx(withVendorCSSClassPrefix('user-profile'), className)}>\n <div style={styles.header}>\n <Avatar\n imageUrl={getMappedUserProfileValue('picture', mergedMappings, user)}\n name={getDisplayName()}\n size={80}\n alt={`${getDisplayName()}'s avatar`}\n />\n </div>\n <div style={styles.infoContainer}>\n {Array.isArray(user)\n ? user\n .filter(schema => !excludedProps.includes(schema.name) && schema.value)\n .map((schema, index) => <div key={index}>{renderUserInfo(schema)}</div>)\n : Object.entries(user)\n .filter(([key]) => !excludedProps.includes(key) && user[key])\n .map(([key, value]) =>\n renderUserInfo({\n name: key,\n value: value,\n displayName: formatLabel(key),\n }),\n )}\n </div>\n </div>\n );\n\n if (mode === 'popup') {\n return (\n <Popover isOpen={isOpen} onClose={() => setIsOpen(false)} portalId={portalId}>\n <Popover.Header>{title}</Popover.Header>\n <Popover.Content>{profileContent}</Popover.Content>\n </Popover>\n );\n }\n\n return profileContent;\n};\n\nconst useStyles = () => {\n const {theme, colorScheme} = useTheme();\n\n return useMemo(\n () => ({\n root: {\n padding: theme.spacing.unit * 4 + 'px',\n minWidth: '600px',\n margin: '0 auto',\n } as CSSProperties,\n card: {\n background: theme.colors.surface,\n borderRadius: theme.borderRadius.large,\n } as CSSProperties,\n header: {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing.unit * 1.5 + 'px',\n marginBottom: theme.spacing.unit * 1.5 + 'px',\n } as CSSProperties,\n profileInfo: {\n flex: 1,\n } as CSSProperties,\n name: {\n fontSize: '1.5rem',\n fontWeight: 600,\n margin: '0',\n color: theme.colors.text.primary,\n } as CSSProperties,\n infoContainer: {\n display: 'flex',\n flexDirection: 'column' as const,\n gap: theme.spacing.unit + 'px',\n } as CSSProperties,\n field: {\n display: 'flex',\n alignItems: 'center',\n padding: theme.spacing.unit + 'px 0',\n borderBottom: `1px solid ${theme.colors.border}`,\n minHeight: '32px',\n } as CSSProperties,\n lastField: {\n borderBottom: 'none',\n } as CSSProperties,\n label: {\n fontSize: '0.875rem',\n fontWeight: 500,\n color: theme.colors.text.secondary,\n width: '120px',\n flexShrink: 0,\n lineHeight: '32px',\n } as CSSProperties,\n value: {\n color: theme.colors.text.primary,\n flex: 1,\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing.unit + 'px',\n overflow: 'hidden',\n minHeight: '32px',\n '& input, & .MuiInputBase-root': {\n height: '32px',\n margin: 0,\n },\n lineHeight: '32px',\n '& table': {\n backgroundColor: theme.colors.background,\n borderRadius: theme.borderRadius.small,\n whiteSpace: 'normal',\n },\n '& td': {\n borderColor: theme.colors.border,\n },\n } as CSSProperties,\n popup: {\n padding: theme.spacing.unit * 2 + 'px',\n } as CSSProperties,\n }),\n [theme, colorScheme],\n );\n};\n\nexport default BaseUserProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport React, {CSSProperties, FC, ReactNode, useEffect, useMemo, useState} from 'react';\nimport {createPortal} from 'react-dom';\nimport {useTheme} from '../../../theme/useTheme';\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport clsx from 'clsx';\n\nconst useStyles = () => {\n const {theme, colorScheme} = useTheme();\n\n return useMemo(\n () => ({\n overlay: {\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n zIndex: 999,\n } as CSSProperties,\n content: {\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n zIndex: 1000,\n maxHeight: '90vh',\n overflowY: 'auto',\n background: theme.colors.surface,\n borderRadius: theme.borderRadius.large,\n boxShadow: `0 2px 8px ${colorScheme === 'dark' ? 'rgba(0, 0, 0, 0.3)' : 'rgba(0, 0, 0, 0.15)'}`,\n } as CSSProperties,\n contentBody: {} as CSSProperties,\n header: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: `${theme.spacing.unit * 3}px ${theme.spacing.unit * 4.5}px`,\n borderBottom: `1px solid ${theme.colors.border}`,\n } as CSSProperties,\n headerTitle: {\n margin: 0,\n fontSize: '1.2rem',\n fontWeight: 600,\n color: theme.colors.text.primary,\n } as CSSProperties,\n closeButton: {\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n padding: theme.spacing.unit / 2 + 'px',\n color: theme.colors.text.secondary,\n fontSize: '1.2rem',\n '&:hover': {\n color: theme.colors.text.primary,\n },\n } as CSSProperties,\n }),\n [theme, colorScheme],\n );\n};\n\ninterface PopoverContextType {\n onClose?: () => void;\n}\n\nconst PopoverContext = React.createContext<PopoverContextType>({});\n\ninterface PopoverHeaderProps {\n children?: ReactNode;\n}\n\nconst PopoverHeader: FC<PopoverHeaderProps> = ({children}) => {\n const styles = useStyles();\n const {onClose} = React.useContext(PopoverContext);\n\n return (\n <div style={styles.header}>\n {children && <h3 style={styles.headerTitle}>{children}</h3>}\n {onClose && (\n <button style={styles.closeButton} onClick={onClose} aria-label=\"Close\">\n \u00D7\n </button>\n )}\n </div>\n );\n};\n\ninterface PopoverContentProps {\n children: ReactNode;\n}\n\nconst PopoverContent: FC<PopoverContentProps> = ({children}) => {\n const styles = useStyles();\n return <div style={styles.contentBody}>{children}</div>;\n};\n\nexport interface PopoverProps {\n /**\n * Whether the popover is open\n */\n isOpen: boolean;\n /**\n * The content to display inside the popover\n */\n children: ReactNode;\n /**\n * Callback when the popover should close\n */\n onClose: () => void;\n /**\n * Optional custom class name for the popover container\n */\n className?: string;\n /**\n * The HTML element ID where the portal should be mounted\n */\n portalId?: string;\n /**\n * The display mode of the popover\n * 'modal' - shows overlay and centers content\n * 'dropdown' - no overlay, content positioned relative to trigger\n */\n mode?: 'modal' | 'dropdown';\n}\n\nexport const Popover: FC<PopoverProps> & {\n Header: typeof PopoverHeader;\n Content: typeof PopoverContent;\n} = ({isOpen, children, onClose, className = '', portalId = 'wso2-popover-root', mode = 'modal'}) => {\n const [portalEl, setPortalEl] = useState<HTMLElement | null>(null);\n const styles = useStyles();\n\n useEffect(() => {\n const existing = document.getElementById(portalId);\n if (existing) {\n setPortalEl(existing);\n return void 0;\n }\n\n const el = document.createElement('div');\n el.id = portalId;\n document.body.appendChild(el);\n setPortalEl(el);\n\n return () => {\n if (document.getElementById(portalId)) {\n document.getElementById(portalId)?.remove();\n }\n };\n }, [portalId]);\n\n useEffect(() => {\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && isOpen) {\n onClose();\n }\n };\n\n document.addEventListener('keydown', handleEscape);\n return () => document.removeEventListener('keydown', handleEscape);\n }, [isOpen, onClose]);\n\n if (!isOpen || !portalEl) {\n return null;\n }\n\n return createPortal(\n <PopoverContext.Provider value={{onClose}}>\n <div className={clsx(withVendorCSSClassPrefix('popover'), className)}>\n {mode === 'modal' && (\n <div className={withVendorCSSClassPrefix('popover-overlay')} style={styles['overlay']} onClick={onClose} />\n )}\n <div className={withVendorCSSClassPrefix('popover-content')} style={styles['content']}>\n {children}\n </div>\n </div>\n </PopoverContext.Provider>,\n portalEl,\n );\n};\n\nPopover.Header = PopoverHeader;\nPopover.Content = PopoverContent;\n\nexport default Popover;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {useContext} from 'react';\nimport ThemeContext, {ThemeContextValue} from './ThemeContext';\n\nexport const useTheme = (): ThemeContextValue => {\n const context = useContext(ThemeContext);\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n return context;\n};\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {CSSProperties, FC, useMemo} from 'react';\nimport {useTheme} from '../../../theme/useTheme';\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport clsx from 'clsx';\n\nexport interface AvatarProps {\n /**\n * The URL of the avatar image\n */\n imageUrl?: string;\n /**\n * Alternative text for the avatar image\n */\n alt?: string;\n /**\n * The size of the avatar in pixels\n */\n size?: number;\n /**\n * The name to use for generating initials when no image is provided\n */\n name?: string;\n /**\n * Optional className for the avatar\n */\n className?: string;\n}\n\nconst useStyles = ({size}) => {\n const {theme, colorScheme} = useTheme();\n\n return useMemo(\n () => ({\n avatar: {\n width: `${size}px`,\n height: `${size}px`,\n borderRadius: '50%',\n overflow: 'hidden',\n backgroundColor: theme.colors.surface,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: `${size * 0.4}px`,\n fontWeight: 500,\n color: theme.colors.text.primary,\n border: `1px solid ${theme.colors.border}`,\n boxShadow: colorScheme === 'dark' ? 'none' : '0 2px 4px rgba(0, 0, 0, 0.1)',\n } as CSSProperties,\n image: {\n width: '100%',\n height: '100%',\n objectFit: 'cover',\n } as CSSProperties,\n }),\n [size, theme, colorScheme],\n );\n};\n\nexport const Avatar: FC<AvatarProps> = ({imageUrl, alt = 'User avatar', size = 64, name, className = ''}) => {\n const styles = useStyles({size});\n\n const getInitials = (name: string): string => {\n return name\n .split(' ')\n .map(part => part[0])\n .slice(0, 2)\n .join('')\n .toUpperCase();\n };\n\n return (\n <div style={styles.avatar} className={clsx(withVendorCSSClassPrefix('avatar'), className)}>\n {imageUrl ? <img src={imageUrl} alt={alt} style={styles.image} /> : name ? getInitials(name) : '?'}\n </div>\n );\n};\n\nexport default Avatar;\n", "/**\n * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {CSSProperties, FC, InputHTMLAttributes} from 'react';\nimport {useTheme} from '../../../theme/useTheme';\nimport clsx from 'clsx';\n\nexport interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className'> {\n /**\n * Label text to display above the input\n */\n label?: string;\n /**\n * Error message to display below the input\n */\n error?: string;\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n /**\n * Whether the field is disabled\n */\n disabled?: boolean;\n /**\n * Helper text to display below the input\n */\n helperText?: string;\n}\n\nexport const TextField: FC<TextFieldProps> = ({label, error, required, className, disabled, helperText, style = {}, ...rest}) => {\n const {theme} = useTheme();\n\n const containerStyle: CSSProperties = {\n marginBottom: theme.spacing.unit * 2 + 'px',\n ...style\n };\n\n const labelStyle: CSSProperties = {\n display: 'block',\n marginBottom: theme.spacing.unit + 'px',\n color: error ? theme.colors.error.main : theme.colors.text.secondary,\n fontSize: '0.875rem',\n fontWeight: 500,\n };\n\n const inputStyle: CSSProperties = {\n width: '100%',\n padding: `${theme.spacing.unit}px ${theme.spacing.unit * 1.5}px`,\n border: `1px solid ${error ? theme.colors.error.main : theme.colors.border}`,\n borderRadius: theme.borderRadius.small,\n fontSize: '1rem',\n color: theme.colors.text.primary,\n backgroundColor: disabled ? theme.colors.background.disabled : theme.colors.background.surface,\n outline: 'none',\n transition: 'border-color 0.2s ease',\n };\n\n const helperTextStyle: CSSProperties = {\n fontSize: '0.75rem',\n color: error ? theme.colors.error.main : theme.colors.text.secondary,\n marginTop: theme.spacing.unit / 2 + 'px',\n };\n\n return (\n <div style={containerStyle} className={clsx('asgardeo-text-field', className)}>\n {label && (\n <label style={labelStyle}>\n {label}\n {required && <span style={{color: theme.colors.error.main}}> *</span>}\n </label>\n )}\n <input style={inputStyle} disabled={disabled} aria-invalid={!!error} aria-required={required} {...rest} />\n {(error || helperText) && <div style={helperTextStyle}>{error || helperText}</div>}\n </div>\n );\n};\n\nexport default TextField;\n", "/**\n * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {CSSProperties, FC, InputHTMLAttributes} from 'react';\nimport {useTheme} from '../../../theme/useTheme';\nimport clsx from 'clsx';\n\nexport interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'type'> {\n /**\n * Label text to display above the input\n */\n label?: string;\n /**\n * Error message to display below the input\n */\n error?: string;\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n /**\n * Whether the field is disabled\n */\n disabled?: boolean;\n /**\n * Helper text to display below the input\n */\n helperText?: string;\n /**\n * Custom date format for the regex pattern\n */\n dateFormat?: string;\n}\n\nexport const DatePicker: FC<DatePickerProps> = ({\n label,\n error,\n className,\n required,\n disabled,\n helperText,\n dateFormat = 'yyyy-MM-dd',\n style = {},\n ...rest\n}) => {\n const {theme} = useTheme();\n\n const containerStyle: CSSProperties = {\n marginBottom: theme.spacing.unit * 2 + 'px',\n ...style\n };\n\n const labelStyle: CSSProperties = {\n display: 'block',\n marginBottom: theme.spacing.unit + 'px',\n color: error ? theme.colors.error.main : theme.colors.text.secondary,\n fontSize: '0.875rem',\n fontWeight: 500,\n };\n\n const inputStyle: CSSProperties = {\n width: '100%',\n padding: `${theme.spacing.unit}px ${theme.spacing.unit * 1.5}px`,\n border: `1px solid ${error ? theme.colors.error.main : theme.colors.border}`,\n borderRadius: theme.borderRadius.small,\n fontSize: '1rem',\n color: theme.colors.text.primary,\n backgroundColor: disabled ? theme.colors.background.disabled : theme.colors.background.surface,\n outline: 'none',\n transition: 'border-color 0.2s ease',\n };\n\n const helperTextStyle: CSSProperties = {\n fontSize: '0.75rem',\n color: error ? theme.colors.error.main : theme.colors.text.secondary,\n marginTop: theme.spacing.unit / 2 + 'px',\n };\n\n return (\n <div style={containerStyle} className={clsx('asgardeo-date-picker', className)}>\n {label && (\n <label style={labelStyle}>\n {label}\n {required && <span style={{color: theme.colors.error.main}}> *</span>}\n </label>\n )}\n <input\n type=\"date\"\n pattern=\"\\d{4}-\\d{2}-\\d{2}\"\n placeholder={dateFormat}\n style={inputStyle}\n disabled={disabled}\n aria-invalid={!!error}\n aria-required={required}\n {...rest}\n />\n {(error || helperText) && <div style={helperTextStyle}>{error || helperText}</div>}\n </div>\n );\n};\n\nexport default DatePicker;\n", "/**\n * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {CSSProperties, FC, InputHTMLAttributes} from 'react';\nimport {useTheme} from '../../../theme/useTheme';\nimport clsx from 'clsx';\n\nexport interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'type'> {\n /**\n * Label text to display next to the checkbox\n */\n label?: string;\n /**\n * Error message to display below the checkbox\n */\n error?: string;\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n /**\n * Helper text to display below the checkbox\n */\n helperText?: string;\n}\n\nexport const Checkbox: FC<CheckboxProps> = ({label, error, className, required, helperText, style = {}, ...rest}) => {\n const {theme} = useTheme();\n\n const containerStyle: CSSProperties = {\n marginBottom: theme.spacing.unit * 2 + 'px',\n display: 'flex',\n alignItems: 'center',\n ...style\n };\n\n const inputStyle: CSSProperties = {\n width: theme.spacing.unit * 2.5 + 'px',\n height: theme.spacing.unit * 2.5 + 'px',\n marginRight: theme.spacing.unit + 'px',\n accentColor: theme.colors.primary.main,\n };\n\n const labelStyle: CSSProperties = {\n color: error ? theme.colors.error.main : theme.colors.text.primary,\n fontSize: '0.875rem',\n };\n\n const helperTextStyle: CSSProperties = {\n fontSize: '0.75rem',\n color: error ? theme.colors.error.main : theme.colors.text.secondary,\n marginTop: theme.spacing.unit / 2 + 'px',\n marginLeft: theme.spacing.unit * 3.5 + 'px',\n };\n\n return (\n <div className={clsx('asgardeo-checkbox', className)}>\n <div style={containerStyle}>\n <input type=\"checkbox\" style={inputStyle} aria-invalid={!!error} aria-required={required} {...rest} />\n {label && (\n <label style={labelStyle}>\n {label}\n {required && <span style={{color: theme.colors.error.main}}> *</span>}\n </label>\n )}\n </div>\n {(error || helperText) && <div style={helperTextStyle}>{error || helperText}</div>}\n </div>\n );\n};\n\nexport default Checkbox;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nconst getMappedUserProfileValue = (key: string, mappings, user) => {\n const mappedKey = mappings[key];\n\n if (Array.isArray(user)) {\n if (Array.isArray(mappedKey)) {\n for (const field of mappedKey) {\n const found = user.find(u => u.name === field);\n if (found?.value !== undefined) {\n return found.value;\n }\n }\n } else {\n const found = user.find(u => u.name === mappedKey);\n if (found?.value !== undefined) {\n return found.value;\n }\n }\n\n const found = user.find(u => u.name === key);\n\n return found?.value;\n }\n\n return mappedKey ? user[mappedKey] : user[key];\n};\n\nexport default getMappedUserProfileValue;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {User, AsgardeoAPIError, HttpInstance, AsgardeoSPAClient, HttpRequestConfig} from '@asgardeo/browser';\n\nconst httpClient: HttpInstance = AsgardeoSPAClient.getInstance().httpRequest.bind(AsgardeoSPAClient.getInstance());\n\n/**\n * Updates the user profile information at the specified SCIM2 Me endpoint.\n *\n * @param url - The SCIM2 Me endpoint URL.\n * @param value - The value object to patch (SCIM2 PATCH value).\n * @param requestConfig - Additional request config if needed.\n * @returns A promise that resolves with the updated user profile information.\n * @example\n * ```typescript\n * await updateMeProfile({\n * url: \"https://api.asgardeo.io/t/<ORG>/scim2/Me\",\n * value: { \"urn:scim:wso2:schema\": { mobileNumbers: [\"0777933830\"] } }\n * });\n * ```\n */\nconst updateMeProfile = async ({\n url,\n payload,\n ...requestConfig\n}: {url: string; payload: any} & Partial<Request>): Promise<User> => {\n try {\n new URL(url);\n } catch (error) {\n throw new AsgardeoAPIError(\n 'Invalid endpoint URL provided',\n 'updateMeProfile-ValidationError-001',\n 'javascript',\n 400,\n 'Invalid Request',\n );\n }\n\n const data = {\n Operations: [\n {\n op: 'replace',\n value: payload,\n },\n ],\n schemas: ['urn:ietf:params:scim:api:messages:2.0:PatchOp'],\n };\n\n const response: any = await httpClient({\n url,\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/scim+json',\n Accept: 'application/json',\n },\n data,\n ...requestConfig,\n } as HttpRequestConfig);\n\n if (!response.data) {\n const errorText = await response.text();\n\n throw new AsgardeoAPIError(\n `Failed to update user profile: ${errorText}`,\n 'updateMeProfile-ResponseError-001',\n 'javascript',\n response.status,\n response.statusText,\n );\n }\n\n return response.data;\n};\n\nexport default updateMeProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC, ReactElement} from 'react';\nimport useAsgardeo from '../../../hooks/useAsgardeo';\nimport BaseUserProfile, {BaseUserProfileProps} from './BaseUserProfile';\nimport updateMeProfile from 'packages/react/src/api/scim2/updateMeProfile';\nimport getMeProfile from 'packages/react/src/api/scim2/getMeProfile';\n\n/**\n * Props for the UserProfile component.\n * Extends BaseUserProfileProps but makes the user prop optional since it will be obtained from useAsgardeo\n */\nexport type UserProfileProps = Omit<BaseUserProfileProps, 'user'>;\n\n/**\n * UserProfile component displays the authenticated user's profile information in a\n * structured and styled format. It shows user details such as display name, email,\n * username, and other available profile information from Asgardeo.\n *\n * This component is the React-specific implementation that uses the BaseUserProfile\n * and automatically retrieves the user data from Asgardeo context if not provided.\n *\n * @example\n * ```tsx\n * // Basic usage - will use user from Asgardeo context\n * <UserProfile />\n *\n * // With explicit user data\n * <UserProfile user={specificUser} />\n *\n * // With card layout and custom fallback\n * <UserProfile\n * cardLayout={true}\n * fallback={<div>Please sign in to view your profile</div>}\n * />\n * ```\n */\nconst UserProfile: FC<UserProfileProps> = ({...rest}: UserProfileProps): ReactElement => {\n const {user, baseUrl} = useAsgardeo();\n\n const handleProfileUpdate = async (payload: any): Promise<void> => {\n await updateMeProfile({url: `${baseUrl}/scim2/Me`, payload});\n await getMeProfile({url: `${baseUrl}/scim2/Me` });\n };\n\n return <BaseUserProfile user={user} onUpdate={handleProfileUpdate} {...rest} />;\n};\n\nexport default UserProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {CSSProperties, FC, ReactElement, ReactNode, useMemo, useState} from 'react';\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport clsx from 'clsx';\nimport {useTheme} from '../../../theme/useTheme';\nimport {Avatar} from '../../primitives/Avatar/Avatar';\nimport {Popover} from '../../primitives/Popover/Popover';\nimport getMappedUserProfileValue from '../../../utils/getMappedUserProfileValue';\n\nconst useStyles = () => {\n const {theme} = useTheme();\n\n return useMemo(\n () => ({\n trigger: {\n display: 'inline-flex',\n alignItems: 'center',\n gap: theme.spacing.unit + 'px',\n padding: theme.spacing.unit * 0.5 + 'px',\n border: 'none',\n background: 'none',\n cursor: 'pointer',\n borderRadius: theme.borderRadius.small,\n '&:hover': {\n backgroundColor: theme.colors.background,\n },\n } as CSSProperties,\n userName: {\n color: theme.colors.text.primary,\n fontSize: '1rem',\n fontWeight: 500,\n } as CSSProperties,\n dropdownContent: {\n minWidth: '200px',\n maxWidth: '300px',\n } as CSSProperties,\n dropdownMenu: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n } as CSSProperties,\n menuItem: {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing.unit + 'px',\n padding: `${theme.spacing.unit * 2}px ${theme.spacing.unit * 2}px`,\n width: '100%',\n color: theme.colors.text.primary,\n textDecoration: 'none',\n border: 'none',\n background: 'none',\n cursor: 'pointer',\n fontSize: '0.875rem',\n '&:hover': {\n backgroundColor: theme.colors.background,\n },\n } as CSSProperties,\n divider: {\n margin: `${theme.spacing.unit * 0.5}px 0`,\n borderBottom: `1px solid ${theme.colors.border}`,\n } as CSSProperties,\n dropdownHeader: {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing.unit + 'px',\n padding: `${theme.spacing.unit * 1.5}px`,\n borderBottom: `1px solid ${theme.colors.border}`,\n } as CSSProperties,\n headerInfo: {\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing.unit / 2 + 'px',\n } as CSSProperties,\n headerName: {\n color: theme.colors.text.primary,\n fontSize: '1rem',\n fontWeight: 500,\n margin: 0,\n } as CSSProperties,\n headerEmail: {\n color: theme.colors.text.secondary,\n fontSize: '0.875rem',\n margin: 0,\n } as CSSProperties,\n }),\n [theme],\n );\n};\n\nexport interface MenuItem {\n label: string;\n icon?: ReactNode;\n onClick?: () => void;\n href?: string;\n}\n\nexport interface BaseUserDropdownProps {\n /**\n * Optional element to render when no user is signed in.\n */\n fallback?: ReactElement;\n /**\n * Optional className for the dropdown container.\n */\n className?: string;\n /**\n * The user object containing profile information\n */\n user: any;\n /**\n * The HTML element ID where the portal should be mounted\n */\n portalId?: string;\n /**\n * Menu items to display in the dropdown\n */\n menuItems?: MenuItem[];\n /**\n * Show user's display name next to avatar in the trigger button\n */\n showTriggerLable?: boolean;\n /**\n * Show dropdown header with user information\n */\n showDropdownHeader?: boolean;\n /**\n * Optional size for the avatar\n */\n avatarSize?: number;\n /**\n * Mapping of component attribute names to identity provider field names.\n * Allows customizing which user profile fields should be used for each attribute.\n */\n attributeMapping?: {\n picture?: string | string[];\n firstName?: string | string[];\n lastName?: string | string[];\n username?: string | string[];\n [key: string]: string | string[] | undefined;\n };\n}\n\n/**\n * BaseUserDropdown component displays a user avatar with a dropdown menu.\n * When clicked, it shows a popover with customizable menu items.\n * This component serves as the base for framework-specific implementations.\n */\nexport const BaseUserDropdown: FC<BaseUserDropdownProps> = ({\n fallback = <div>Please sign in</div>,\n className = '',\n user,\n portalId = 'asgardeo-user-dropdown',\n menuItems = [],\n showTriggerLable = false,\n showDropdownHeader = true,\n avatarSize = 32,\n attributeMapping = {},\n}): ReactElement => {\n const styles = useStyles();\n const [isOpen, setIsOpen] = useState(false);\n\n const defaultAttributeMappings = {\n picture: ['profile', 'profileUrl'],\n firstName: 'givenName',\n lastName: 'familyName',\n email: 'emails',\n };\n\n const mergedMappings = {...defaultAttributeMappings, ...attributeMapping};\n\n const getDisplayName = () => {\n const firstName = getMappedUserProfileValue('firstName', mergedMappings, user);\n const lastName = getMappedUserProfileValue('lastName', mergedMappings, user);\n\n if (firstName && lastName) {\n return `${firstName} ${lastName}`;\n }\n\n return getMappedUserProfileValue('username', mergedMappings, user) || '';\n };\n\n if (!user) {\n return fallback;\n }\n\n const handleMenuItemClick = (item: MenuItem) => {\n if (item.onClick) {\n item.onClick();\n }\n setIsOpen(false);\n };\n\n return (\n <div className={clsx(withVendorCSSClassPrefix('user-dropdown'), className)}>\n <button\n className={withVendorCSSClassPrefix('user-dropdown-trigger')}\n style={styles.trigger}\n onClick={() => setIsOpen(!isOpen)}\n >\n <Avatar\n imageUrl={getMappedUserProfileValue('picture', mergedMappings, user)}\n name={getDisplayName()}\n size={avatarSize}\n alt={`${getDisplayName()}'s avatar`}\n />\n {showTriggerLable && <span style={styles.userName}>{getDisplayName()}</span>}\n </button>\n\n <Popover isOpen={isOpen} onClose={() => setIsOpen(false)} portalId={portalId} mode=\"dropdown\">\n <Popover.Content>\n <div style={styles.dropdownContent}>\n {showDropdownHeader && (\n <div className={withVendorCSSClassPrefix('user-dropdown-header')} style={styles.dropdownHeader}>\n <Avatar\n imageUrl={getMappedUserProfileValue('picture', mergedMappings, user)}\n name={getDisplayName()}\n size={avatarSize * 1.25}\n alt={`${getDisplayName()}'s avatar`}\n />\n <div className={withVendorCSSClassPrefix('user-dropdown-header-info')} style={styles.headerInfo}>\n <span className={withVendorCSSClassPrefix('user-dropdown-header-name')} style={styles.headerName}>\n {getDisplayName()}\n </span>\n {getMappedUserProfileValue('email', mergedMappings, user) !== getDisplayName() &&\n getMappedUserProfileValue('email', mergedMappings, user) && (\n <span\n className={withVendorCSSClassPrefix('user-dropdown-header-email')}\n style={styles.headerEmail}\n >\n {getMappedUserProfileValue('email', mergedMappings, user)}\n </span>\n )}\n </div>\n </div>\n )}\n <div className={withVendorCSSClassPrefix('user-dropdown-menu')} style={styles.dropdownMenu}>\n {menuItems.map((item, index) => (\n <div key={index}>\n {item.href ? (\n <a\n href={item.href}\n style={styles.menuItem}\n className={withVendorCSSClassPrefix('user-dropdown-menu-item')}\n >\n {item.icon}\n {item.label}\n </a>\n ) : (\n <button\n onClick={() => handleMenuItemClick(item)}\n style={styles.menuItem}\n className={withVendorCSSClassPrefix('user-dropdown-menu-item')}\n >\n {item.icon}\n {item.label}\n </button>\n )}\n {index < menuItems.length - 1 && <div style={styles.divider} />}\n </div>\n ))}\n </div>\n </div>\n </Popover.Content>\n </Popover>\n </div>\n );\n};\n\nexport default BaseUserDropdown;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC, ReactElement} from 'react';\nimport useAsgardeo from '../../../hooks/useAsgardeo';\nimport BaseUserDropdown, {BaseUserDropdownProps} from './BaseUserDropdown';\n\n/**\n * Props for the UserDropdown component.\n * Extends BaseUserDropdownProps but makes the user prop optional since it will be obtained from useAsgardeo\n */\nexport type UserDropdownProps = Omit<BaseUserDropdownProps, 'user'>;\n\n/**\n * UserDropdown component displays a user avatar with a dropdown menu.\n * When clicked, it shows a popover with customizable menu items.\n * This component is the React-specific implementation that uses the BaseUserDropdown\n * and automatically retrieves the user data from Asgardeo context.\n *\n * @example\n * ```tsx\n * // Basic usage - will use user from Asgardeo context\n * <UserDropdown menuItems={[\n * { label: 'Profile', onClick: () => {} },\n * { label: 'Settings', href: '/settings' },\n * { label: 'Sign Out', onClick: () => {} }\n * ]} />\n *\n * // With custom configuration\n * <UserDropdown\n * showUsername={false}\n * avatarSize={40}\n * fallback={<div>Please sign in</div>}\n * />\n * ```\n */\nconst UserDropdown: FC<UserDropdownProps> = ({...rest}: UserDropdownProps): ReactElement => {\n const {user} = useAsgardeo();\n\n return <BaseUserDropdown user={user} {...rest} />;\n};\n\nexport default UserDropdown;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nexport {default as AsgardeoProvider} from './providers/AsgardeoProvider';\nexport * from './providers/AsgardeoProvider';\n\nexport {default as AsgardeoContext} from './contexts/AsgardeoContext';\nexport * from './contexts/AsgardeoContext';\n\nexport {default as useAsgardeo} from './hooks/useAsgardeo';\nexport * from './hooks/useAsgardeo';\n\nexport {default as useBrowserUrl} from './hooks/useBrowserUrl';\nexport * from './hooks/useBrowserUrl';\n\nexport {default as BaseSignInButton} from './components/actions/SignInButton/BaseSignInButton';\nexport * from './components/actions/SignInButton/BaseSignInButton';\n\nexport {default as SignInButton} from './components/actions/SignInButton/SignInButton';\nexport * from './components/actions/SignInButton/SignInButton';\n\nexport {default as BaseSignOutButton} from './components/actions/SignOutButton/BaseSignOutButton';\nexport * from './components/actions/SignOutButton/BaseSignOutButton';\n\nexport {default as SignOutButton} from './components/actions/SignOutButton/SignOutButton';\nexport * from './components/actions/SignOutButton/SignOutButton';\n\nexport {default as BaseSignUpButton} from './components/actions/SignUpButton/BaseSignUpButton';\nexport * from './components/actions/SignUpButton/BaseSignUpButton';\n\nexport {default as SignUpButton} from './components/actions/SignUpButton/SignUpButton';\nexport * from './components/actions/SignUpButton/SignUpButton';\n\nexport {default as SignedIn} from './components/control/SignedIn';\nexport * from './components/control/SignedIn';\n\nexport {default as SignedOut} from './components/control/SignedOut';\nexport * from './components/control/SignedOut';\n\nexport {default as User} from './components/presentation/User';\nexport * from './components/presentation/User';\n\nexport {default as BaseUserProfile} from './components/presentation/UserProfile/BaseUserProfile';\nexport * from './components/presentation/UserProfile/BaseUserProfile';\n\nexport {default as UserProfile} from './components/presentation/UserProfile/UserProfile';\nexport * from './components/presentation/UserProfile/UserProfile';\n\nexport {default as BaseUserDropdown} from './components/presentation/UserDropdown/BaseUserDropdown';\nexport * from './components/presentation/UserDropdown/BaseUserDropdown';\n\nexport {default as UserDropdown} from './components/presentation/UserDropdown/UserDropdown';\nexport * from './components/presentation/UserDropdown/UserDropdown';\n\nexport * from '@asgardeo/browser';\n"],
|
|
5
|
+
"mappings": ";;;;;AAmBA,SAAwD,aAAAA,YAAW,WAAAC,UAAS,QAAQ,YAAAC,iBAAoB;;;ACDxG;AAAA,EACE;AAAA,OAMK;;;ACPP;AAAA,EACE;AAAA,EAMA;AAAA,OAOK;AAGP,IAAM,WAAN,MAAM,SAAQ;AAAA,EAQZ,YAAY,WAA+B;AAL3C,wBAAQ,cAAa,SAAQ;AAC7B,wBAAQ;AAER,wBAAQ;AAGN,SAAK,UAAU,aAAa,kBAAkB,YAAY;AAE1D,SAAK,WAAW,KAAK,SAAS,KAAK,IAAI;AACvC,SAAK,OAAO,KAAK,KAAK,KAAK,IAAI;AAC/B,SAAK,SAAS,KAAK,OAAO,KAAK,IAAI;AACnC,SAAK,UAAU,KAAK,QAAQ,KAAK,IAAI;AACrC,SAAK,cAAc,KAAK,YAAY,KAAK,IAAI;AAAA,EAC/C;AAAA,EAEO,cAAc,WAA0B;AAC7C,SAAK,aAAa;AAAA,EACpB;AAAA,EAEO,gBAAyB;AAC9B,WAAO,KAAK;A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UAAC;AAAA;AAAA,YACC,SAAS,MAAM,oBAAoB,IAAI;AAAA,YACvC,OAAO,OAAO;AAAA,YACd,WAAWK,0BAAyB,yBAAyB;AAAA,YAE5D;AAAA,mBAAK;AAAA,cACL,KAAK;AAAA;AAAA;AAAA,QACR;AAAA,QAED,QAAQ,UAAU,SAAS,KAAK,gBAAAN,MAAC,SAAI,OAAO,OAAO,SAAS;AAAA,WApBrD,KAqBV,CACD,GACH;AAAA,OACF,GACF,GACF;AAAA,KACF;AAEJ;AAEA,IAAO,2BAAQ;;;ACvON,gBAAAO,aAAA;AAHT,IAAM,eAAsC,CAAC,EAAC,GAAG,KAAI,MAAuC;AAC1F,QAAM,EAAC,KAAI,IAAI,oBAAY;AAE3B,SAAO,gBAAAA,MAAC,4BAAiB,MAAa,GAAG,MAAM;AACjD;AAEA,IAAO,uBAAQ;;;ACYf,cAAc;",
|
|
6
|
+
"names": ["useEffect", "useMemo", "useState", "AsgardeoSPAClient", "AsgardeoAPIError", "AsgardeoAPIError", "AsgardeoSPAClient", "httpClient", "subAttributes", "AsgardeoAPIError", "createContext", "jsx", "useMemo", "useState", "useEffect", "jsx", "forwardRef", "useState", "jsx", "forwardRef", "useState", "forwardRef", "withVendorCSSClassPrefix", "clsx", "Fragment", "jsx", "forwardRef", "useState", "jsx", "forwardRef", "useState", "forwardRef", "withVendorCSSClassPrefix", "clsx", "Fragment", "jsx", "forwardRef", "useState", "jsx", "forwardRef", "useState", "Fragment", "jsx", "Fragment", "jsx", "Fragment", "jsx", "User", "useMemo", "useState", "useEffect", "useMemo", "useState", "useContext", "useContext", "withVendorCSSClassPrefix", "clsx", "jsx", "useMemo", "useState", "useEffect", "useMemo", "withVendorCSSClassPrefix", "clsx", "jsx", "useStyles", "useMemo", "name", "clsx", "jsx", "jsxs", "clsx", "jsx", "jsxs", "clsx", "jsx", "jsxs", "withVendorCSSClassPrefix", "clsx", "found", "Fragment", "jsx", "jsxs", "useState", "useStyles", "useMemo", "clsx", "withVendorCSSClassPrefix", "AsgardeoAPIError", "AsgardeoSPAClient", "httpClient", "jsx", "useMemo", "useState", "withVendorCSSClassPrefix", "clsx", "jsx", "jsxs", "useStyles", "useMemo", "useState", "clsx", "withVendorCSSClassPrefix", "jsx"]
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
3
|
*
|
|
4
4
|
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
5
|
* Version 2.0 (the "License"); you may not use this file except
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
|
-
export
|
|
18
|
+
import { AsgardeoBrowserConfig } from '@asgardeo/browser';
|
|
19
|
+
export type AsgardeoReactConfig = AsgardeoBrowserConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
3
|
*
|
|
4
4
|
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
5
|
* Version 2.0 (the "License"); you may not use this file except
|
|
@@ -15,9 +15,11 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import
|
|
18
|
+
import { FC, PropsWithChildren } from 'react';
|
|
19
|
+
import { AsgardeoReactConfig } from '../models/config';
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
-
* @returns An object containing the authentication configuration.
|
|
21
|
+
* Props interface of {@link AsgardeoProvider}
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
23
|
+
export type AsgardeoProviderProps = AsgardeoReactConfig;
|
|
24
|
+
declare const AsgardeoProvider: FC<PropsWithChildren<AsgardeoProviderProps>>;
|
|
25
|
+
export default AsgardeoProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
3
|
*
|
|
4
4
|
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
5
|
* Version 2.0 (the "License"); you may not use this file except
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import {
|
|
19
|
-
interface
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
import { Theme } from '@asgardeo/browser';
|
|
19
|
+
export interface ThemeContextValue {
|
|
20
|
+
theme: Theme;
|
|
21
|
+
colorScheme: 'light' | 'dark';
|
|
22
|
+
toggleTheme: () => void;
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
declare const ThemeContext: import("react").Context<ThemeContextValue>;
|
|
25
|
+
export default ThemeContext;
|
package/dist/{esm/types/models/branding-preference-provider-props.d.ts → theme/ThemeProvider.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
3
|
*
|
|
4
4
|
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
5
|
* Version 2.0 (the "License"); you may not use this file except
|
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
import { FC, PropsWithChildren } from 'react';
|
|
19
|
+
import { ThemeConfig, RecursivePartial } from '@asgardeo/browser';
|
|
20
|
+
export interface ThemeProviderProps {
|
|
21
|
+
theme?: RecursivePartial<ThemeConfig>;
|
|
22
|
+
defaultColorScheme?: 'light' | 'dark';
|
|
21
23
|
}
|
|
22
|
-
export
|
|
24
|
+
export declare const ThemeProvider: FC<PropsWithChildren<ThemeProviderProps>>;
|
|
@@ -15,17 +15,27 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
export interface ThemeColors {
|
|
19
|
+
primary: string;
|
|
20
|
+
background: string;
|
|
21
|
+
surface: string;
|
|
22
|
+
text: {
|
|
23
|
+
primary: string;
|
|
24
|
+
secondary: string;
|
|
25
|
+
};
|
|
26
|
+
border: string;
|
|
21
27
|
}
|
|
22
|
-
export interface
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
export interface ThemeConfig {
|
|
29
|
+
colors: ThemeColors;
|
|
30
|
+
spacing: {
|
|
31
|
+
unit: number;
|
|
32
|
+
};
|
|
33
|
+
borderRadius: {
|
|
34
|
+
small: string;
|
|
35
|
+
medium: string;
|
|
36
|
+
large: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface Theme extends ThemeConfig {
|
|
40
|
+
cssVariables: Record<string, string>;
|
|
31
41
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
3
|
*
|
|
4
4
|
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
5
|
* Version 2.0 (the "License"); you may not use this file except
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
|
-
export
|
|
18
|
+
import { ThemeContextValue } from './ThemeContext';
|
|
19
|
+
export declare const useTheme: () => ThemeContextValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
3
|
*
|
|
4
4
|
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
5
|
* Version 2.0 (the "License"); you may not use this file except
|
|
@@ -15,8 +15,5 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
fallback?: ReactElement;
|
|
21
|
-
}
|
|
22
|
-
export default SignedProps;
|
|
18
|
+
declare const getMappedUserProfileValue: (key: string, mappings: any, user: any) => any;
|
|
19
|
+
export default getMappedUserProfileValue;
|