From f3f525ac53f4fed57ca8155af822c8a76ade2d64 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 04:51:05 +0530 Subject: [PATCH 01/51] feat(react): :sparkles: add SignIn component --- .../react/src/components/SignIn/SignIn.tsx | 281 ++++++++++++++++++ .../contexts/branding-preference-context.ts | 4 +- packages/react/src/models/sign-in-props.ts | 25 ++ 3 files changed, 308 insertions(+), 2 deletions(-) create mode 100644 packages/react/src/components/SignIn/SignIn.tsx create mode 100644 packages/react/src/models/sign-in-props.ts diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx new file mode 100644 index 00000000..78f9b9b9 --- /dev/null +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -0,0 +1,281 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { + AsgardeoUIException, + AuthApiResponse, + AuthClient, + Authenticator, + Branding, + FlowStatus, + Metadata, + PromptType, + ScreenType, + UIAuthClient, + authenticate, + authorize, + getBranding, +} from '@asgardeo/js-ui-core'; +import {CircularProgress, ThemeProvider} from '@oxygen-ui/react'; +import {FC, ReactElement, useContext, useEffect, useState} from 'react'; +import BasicAuth from './fragments/BasicAuth'; +import LoginOptionsBox from './fragments/LoginOptionsBox'; +import Totp from './fragments/Totp'; +import AsgardeoContext from '../../contexts/asgardeo-context'; +import BrandingPreferenceContext from '../../contexts/branding-preference-context'; +import useAuthentication from '../../hooks/use-authentication'; +import {useConfig} from '../../hooks/use-config'; +import useTranslations from '../../hooks/use-translations'; +import AuthContext from '../../models/auth-context'; +import SignInProps from '../../models/sign-in-props'; +import {SignIn as UISignIn} from '../../oxygen-ui-react-auth-components'; +import generateThemeSignIn from '../../theme/generate-theme-sign-in'; +import SPACryptoUtils from '../../utils/crypto-utils'; + +const SignIn: FC = (props: SignInProps) => { + const {brandingProps} = props; + const [authResponse, setAuthResponse] = useState(); + const [isComponentLoading, setIsComponentLoading] = useState(true); + const [Alert, setAlert] = useState(); + const [showSelfSignUp, setShowSelfSignUp] = useState(true); + const [componentBranding, setComponentBranding] = useState(); + + const {isAuthenticated} = useAuthentication(); + + const authContext: AuthContext | undefined = useContext(AsgardeoContext); + + const {config} = useConfig(); + + const brandingPreference: Branding = useContext(BrandingPreferenceContext); + + const {isLoading, t} = useTranslations({ + componentLocaleOverride: brandingProps?.locale, + componentTextOverrides: brandingProps?.preference?.text, + screen: ScreenType.Common, + }); + + useEffect(() => { + getBranding({branding: brandingProps, merged: brandingPreference}).then((response: Branding) => { + setComponentBranding(response); + }); + + /** + * Calling authorize function and initiating the flow + */ + authorize() + .then((response: AuthApiResponse) => { + setAuthResponse(response); + setIsComponentLoading(false); + }) + .catch((error: Error) => { + setAlert(error.message); + setIsComponentLoading(false); + throw new AsgardeoUIException('REACT_UI-SIGN_IN-SI-SE01', 'Authorization failed', error.stack); + }); + }, [brandingPreference, brandingProps]); + + /** + * Handles the generalized authentication process. + * @param {any} authParams - The authentication parameters. + */ + const handleAuthenticate = async (authenticatorId: string, authParams?: any): Promise => { + if (authResponse === undefined) { + throw new AsgardeoUIException('REACT_UI-SIGN_IN-HA-IV02', 'Auth response is undefined.'); + } + + setIsComponentLoading(true); + + const resp: AuthApiResponse = await authenticate({ + flowId: authResponse.flowId, + selectedAuthenticator: { + authenticatorId, + params: authParams, + }, + }); + + if (!authParams) { + const metaData: Metadata = resp.nextStep.authenticators[0].metadata; + if (metaData.promptType === PromptType.RedirectionPromt) { + /** + * Open a popup window to handle redirection prompts + */ + window.open( + metaData.additionalData?.redirectUrl, + resp.nextStep.authenticators[0].authenticator, + 'width=500,height=600', + ); + + /** + * Add an event listener to the window to capture the message from the popup + */ + window.addEventListener('message', function messageEventHandler(event: MessageEvent) { + /** + * Check the origin of the message to ensure it's from the popup window + */ + if (event.origin !== config.signInRedirectURL) return; + + const {code, state} = event.data; + + if (code && state) { + handleAuthenticate(resp.nextStep.authenticators[0].authenticatorId, {code, state}); + } + + /** + * Remove the event listener + */ + window.removeEventListener('message', messageEventHandler); + }); + } else if (metaData.promptType === PromptType.UserPrompt) { + setAuthResponse(resp); + } + } else if (resp.flowStatus === FlowStatus.SuccessCompleted && resp.authData) { + /** + * when the authentication is successful, generate the token + */ + setAuthResponse(resp); + + const authInstance: UIAuthClient = AuthClient.getInstance(); + const state: string = (await authInstance.getDataLayer().getTemporaryDataParameter('state')).toString(); + + await authInstance.requestAccessToken(resp.authData.code, resp.authData.session_state, state); + + authContext.setAuthentication(); + } else if (resp.flowStatus === FlowStatus.FailIncomplete) { + setAuthResponse({ + ...resp, + nextStep: authResponse.nextStep, + }); + + // TODO: Move this to core: and take from i18n + setAlert('Retry'); + } else { + setAuthResponse(resp); + setShowSelfSignUp(false); + } + + setIsComponentLoading(false); + }; + + const renderLoginOptions = (authenticators: Authenticator[]): ReactElement[] => { + const LoginOptions: ReactElement[] = []; + + authenticators.forEach((authenticator: Authenticator) => { + LoginOptions.push( + => handleAuthenticate(authenticator.authenticatorId)} + key={authenticator.authenticatorId} + />, + ); + }); + + return LoginOptions; + }; + + const renderSignIn = (): ReactElement => { + const {authenticators} = authResponse.nextStep; + let SignInCore: JSX.Element =
; + + if (authenticators) { + let usernamePassword: boolean = false; + let isMultipleAuthenticators: boolean = false; + let usernamePasswordID: string = ''; + + if (authenticators.length > 1) { + isMultipleAuthenticators = true; + } + + authenticators.forEach((authenticator: Authenticator) => { + if (authenticator.authenticator === 'Username & Password') { + usernamePassword = true; + usernamePasswordID = authenticator.authenticatorId; + SignInCore = ( + auth.authenticatorId !== usernamePasswordID), + )} + /> + ); + } + }); + + if (authenticators.length === 1) { + if (authenticators[0].authenticator === 'TOTP') { + SignInCore = ( + + ); + } else if ( + // TODO: change after api based auth gets fixed + new SPACryptoUtils() + .base64URLDecode(authResponse.nextStep.authenticators[0].authenticatorId) + .split(':')[0] === 'email-otp-authenticator' + ) { + SignInCore = ; + } + } + } + + return SignInCore; + }; + + if (isComponentLoading) { + return ( +
+ +
+ ); + } + if (Alert) { + return ( +
+ {Alert} +
+ ); + } + + const imgUrl: string = brandingPreference?.preference?.theme?.LIGHT?.images?.logo?.imgURL; + + return ( + + + + {authResponse?.flowStatus !== FlowStatus.SuccessCompleted && !isAuthenticated && ( + <> + {renderSignIn()} + + + )} + {(authResponse?.flowStatus === FlowStatus.SuccessCompleted || isAuthenticated) && ( +
Successfully Authenticated
+ )} +
+
+ ); +}; + +export default SignIn; diff --git a/packages/react/src/contexts/branding-preference-context.ts b/packages/react/src/contexts/branding-preference-context.ts index 602111e5..1477b451 100644 --- a/packages/react/src/contexts/branding-preference-context.ts +++ b/packages/react/src/contexts/branding-preference-context.ts @@ -16,9 +16,9 @@ * under the License. */ -import {BrandingProps} from '@asgardeo/js-ui-core'; +import {Branding} from '@asgardeo/js-ui-core'; import {Context, createContext} from 'react'; -const BrandingPreferenceContext: Context = createContext(undefined); +const BrandingPreferenceContext: Context = createContext(undefined); export default BrandingPreferenceContext; diff --git a/packages/react/src/models/sign-in-props.ts b/packages/react/src/models/sign-in-props.ts new file mode 100644 index 00000000..80b8c42f --- /dev/null +++ b/packages/react/src/models/sign-in-props.ts @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {BrandingProps} from '@asgardeo/js-ui-core'; + +interface SignInProps { + brandingProps?: BrandingProps; +} + +export default SignInProps; From 85523139de80417090588d246f680e3633eee7e7 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 07:21:43 +0530 Subject: [PATCH 02/51] feat(react): :sparkles: add basic auth fragment --- .../react/src/components/SignIn/SignIn.tsx | 8 +- .../components/SignIn/fragments/BasicAuth.tsx | 108 ++++++++++++++++++ packages/react/src/models/basic-auth-props.ts | 37 ++++++ .../models/{sign-in-props.ts => sign-in.ts} | 10 +- 4 files changed, 157 insertions(+), 6 deletions(-) create mode 100644 packages/react/src/components/SignIn/fragments/BasicAuth.tsx create mode 100644 packages/react/src/models/basic-auth-props.ts rename packages/react/src/models/{sign-in-props.ts => sign-in.ts} (74%) diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index 78f9b9b9..cd081b33 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -42,7 +42,7 @@ import useAuthentication from '../../hooks/use-authentication'; import {useConfig} from '../../hooks/use-config'; import useTranslations from '../../hooks/use-translations'; import AuthContext from '../../models/auth-context'; -import SignInProps from '../../models/sign-in-props'; +import {AlertType, SignInProps} from '../../models/sign-in'; import {SignIn as UISignIn} from '../../oxygen-ui-react-auth-components'; import generateThemeSignIn from '../../theme/generate-theme-sign-in'; import SPACryptoUtils from '../../utils/crypto-utils'; @@ -51,7 +51,7 @@ const SignIn: FC = (props: SignInProps) => { const {brandingProps} = props; const [authResponse, setAuthResponse] = useState(); const [isComponentLoading, setIsComponentLoading] = useState(true); - const [Alert, setAlert] = useState(); + const [Alert, setAlert] = useState(); const [showSelfSignUp, setShowSelfSignUp] = useState(true); const [componentBranding, setComponentBranding] = useState(); @@ -162,7 +162,7 @@ const SignIn: FC = (props: SignInProps) => { }); // TODO: Move this to core: and take from i18n - setAlert('Retry'); + setAlert({alertType: {error: true}, message: 'authentication failed'}); } else { setAuthResponse(resp); setShowSelfSignUp(false); @@ -253,7 +253,7 @@ const SignIn: FC = (props: SignInProps) => { if (Alert) { return (
- {Alert} + {Alert.message}
); } diff --git a/packages/react/src/components/SignIn/fragments/BasicAuth.tsx b/packages/react/src/components/SignIn/fragments/BasicAuth.tsx new file mode 100644 index 00000000..fbef732f --- /dev/null +++ b/packages/react/src/components/SignIn/fragments/BasicAuth.tsx @@ -0,0 +1,108 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {ScreenType, keys} from '@asgardeo/js-ui-core'; +import {CircularProgress, Grid} from '@oxygen-ui/react'; +import {useState} from 'react'; +import useTranslations from '../../../hooks/use-translations'; +import BasicAuthProps from '../../../models/basic-auth-props'; +import {SignIn as UISignIn} from '../../../oxygen-ui-react-auth-components'; + +const BasicAuth = ({ + handleAuthenticate, + authenticatorId, + isAlert, + brandingProps, + showSelfSignUp, + renderLoginOptions, +}: BasicAuthProps): JSX.Element => { + const [username, setUsername] = useState(''); + const [password, setPassword] = useState(''); + + const {t, isLoading} = useTranslations({ + componentLocaleOverride: brandingProps?.locale, + componentTextOverrides: brandingProps?.preference?.text, + screen: ScreenType.Login, + }); + + if (isLoading) { + return ( +
+ +
+ ); + } + + return ( + + {t(keys.login.login.heading)} + + {isAlert && {isAlert.message}} + + ): void => setUsername(e.target.value)} + /> + + ): void => setPassword(e.target.value)} + /> + + { + handleAuthenticate(authenticatorId, {password, username}); + setUsername(''); + setPassword(''); + }} + > + {t(keys.login.button)} + + + {showSelfSignUp && ( + + Don't have an account? + + Register + + + )} + + OR + + {renderLoginOptions} + + ); +}; + +export default BasicAuth; diff --git a/packages/react/src/models/basic-auth-props.ts b/packages/react/src/models/basic-auth-props.ts new file mode 100644 index 00000000..f10dd6df --- /dev/null +++ b/packages/react/src/models/basic-auth-props.ts @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {BrandingProps} from '@asgardeo/js-ui-core'; +import {ReactElement} from 'react'; + +interface BasicAuthProps { + authenticatorId: string; + brandingProps?: BrandingProps; + handleAuthenticate: Function; + isAlert?: { + alertType: + | {error?: boolean; info?: never; warning?: never} + | {error?: never; info?: boolean; warning?: never} + | {error?: never; infor?: never; warning?: boolean}; + message: string; + }; + renderLoginOptions?: ReactElement[]; + showSelfSignUp: boolean; +} + +export default BasicAuthProps; diff --git a/packages/react/src/models/sign-in-props.ts b/packages/react/src/models/sign-in.ts similarity index 74% rename from packages/react/src/models/sign-in-props.ts rename to packages/react/src/models/sign-in.ts index 80b8c42f..cf1ad51d 100644 --- a/packages/react/src/models/sign-in-props.ts +++ b/packages/react/src/models/sign-in.ts @@ -18,8 +18,14 @@ import {BrandingProps} from '@asgardeo/js-ui-core'; -interface SignInProps { +export interface SignInProps { brandingProps?: BrandingProps; } -export default SignInProps; +export type AlertType = { + alertType: + | {error?: boolean; info?: never; warning?: never} + | {error?: never; info?: boolean; warning?: never} + | {error?: never; infor?: never; warning?: boolean}; + message: string; +}; From 300b36415e09450a389d6560504e9e0b68ea02dd Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 07:25:46 +0530 Subject: [PATCH 03/51] feat(react): :bento: add social login svgs --- .../src/assets/social-logins/facebook.svg | 24 ++++++++++++++ .../react/src/assets/social-logins/github.svg | 32 +++++++++++++++++++ .../react/src/assets/social-logins/google.svg | 28 ++++++++++++++++ .../src/assets/social-logins/microsoft.svg | 27 ++++++++++++++++ 4 files changed, 111 insertions(+) create mode 100644 packages/react/src/assets/social-logins/facebook.svg create mode 100644 packages/react/src/assets/social-logins/github.svg create mode 100644 packages/react/src/assets/social-logins/google.svg create mode 100644 packages/react/src/assets/social-logins/microsoft.svg diff --git a/packages/react/src/assets/social-logins/facebook.svg b/packages/react/src/assets/social-logins/facebook.svg new file mode 100644 index 00000000..b217c013 --- /dev/null +++ b/packages/react/src/assets/social-logins/facebook.svg @@ -0,0 +1,24 @@ + + + diff --git a/packages/react/src/assets/social-logins/github.svg b/packages/react/src/assets/social-logins/github.svg new file mode 100644 index 00000000..e1b19871 --- /dev/null +++ b/packages/react/src/assets/social-logins/github.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + diff --git a/packages/react/src/assets/social-logins/google.svg b/packages/react/src/assets/social-logins/google.svg new file mode 100644 index 00000000..6375b41b --- /dev/null +++ b/packages/react/src/assets/social-logins/google.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + diff --git a/packages/react/src/assets/social-logins/microsoft.svg b/packages/react/src/assets/social-logins/microsoft.svg new file mode 100644 index 00000000..431b21e9 --- /dev/null +++ b/packages/react/src/assets/social-logins/microsoft.svg @@ -0,0 +1,27 @@ + + + + + From 7040dc53ef54924a7359c75fb0bef45a3496d963 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 07:34:04 +0530 Subject: [PATCH 04/51] feat(react): :sparkles: add login options box --- packages/react/declarations.d.ts | 22 ++++++++ .../react/src/components/SignIn/SignIn.tsx | 2 +- .../SignIn/fragments/LoginOptionsBox.tsx | 52 +++++++++++++++++++ .../src/models/login-options-box-props.ts | 25 +++++++++ 4 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 packages/react/declarations.d.ts create mode 100644 packages/react/src/components/SignIn/fragments/LoginOptionsBox.tsx create mode 100644 packages/react/src/models/login-options-box-props.ts diff --git a/packages/react/declarations.d.ts b/packages/react/declarations.d.ts new file mode 100644 index 00000000..46bbf16f --- /dev/null +++ b/packages/react/declarations.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +declare module '*.svg' { + const content: any; + export default content; +} diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index cd081b33..f8317862 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -178,7 +178,7 @@ const SignIn: FC = (props: SignInProps) => { LoginOptions.push( => handleAuthenticate(authenticator.authenticatorId)} key={authenticator.authenticatorId} />, diff --git a/packages/react/src/components/SignIn/fragments/LoginOptionsBox.tsx b/packages/react/src/components/SignIn/fragments/LoginOptionsBox.tsx new file mode 100644 index 00000000..dc1d0222 --- /dev/null +++ b/packages/react/src/components/SignIn/fragments/LoginOptionsBox.tsx @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import facebook from '../../../assets/social-logins/facebook.svg'; +import github from '../../../assets/social-logins/github.svg'; +import google from '../../../assets/social-logins/google.svg'; +import microsoft from '../../../assets/social-logins/microsoft.svg'; +import LoginOptionsBoxProps from '../../../models/login-options-box-props'; +import {SignIn as UISignIn} from '../../../oxygen-ui-react-auth-components'; + +const images: {[key: string]: string} = { + Facebook: facebook, + Github: github, + Google: google, + Microsoft: microsoft, +}; + +/** + * This component renders the login options box. + * + * @param {LoginOptionsBoxProps} props - Props injected to the component. + * @param {string} props.socialName - Name of the social login. + * @param {string} props.displayName - Display name of the social login. + * @param {Function} props.handleOnClick - On click handler. + * @return {JSX.Element} + */ +const LoginOptionsBox = ({socialName, displayName, handleOnClick}: LoginOptionsBoxProps): JSX.Element => ( + } + onClick={handleOnClick} + > + Sign In with {displayName} + +); + +export default LoginOptionsBox; diff --git a/packages/react/src/models/login-options-box-props.ts b/packages/react/src/models/login-options-box-props.ts new file mode 100644 index 00000000..62778bd2 --- /dev/null +++ b/packages/react/src/models/login-options-box-props.ts @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +interface LoginOptionsBoxProps { + displayName: string; + handleOnClick: () => void; + socialName: string; +} + +export default LoginOptionsBoxProps; From 914cec2155f22b4978ea84251eb1ab62eb4956b6 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 07:42:16 +0530 Subject: [PATCH 05/51] feat(react): :sparkles: add totp fragment --- .../react/src/components/SignIn/SignIn.tsx | 2 +- .../src/components/SignIn/fragments/Totp.tsx | 83 +++++++++++++++++++ packages/react/src/models/totp-props.ts | 27 ++++++ 3 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 packages/react/src/components/SignIn/fragments/Totp.tsx create mode 100644 packages/react/src/models/totp-props.ts diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index f8317862..948cdbcc 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -83,7 +83,7 @@ const SignIn: FC = (props: SignInProps) => { setIsComponentLoading(false); }) .catch((error: Error) => { - setAlert(error.message); + setAlert({alertType: {error: true}, message: error.message}); setIsComponentLoading(false); throw new AsgardeoUIException('REACT_UI-SIGN_IN-SI-SE01', 'Authorization failed', error.stack); }); diff --git a/packages/react/src/components/SignIn/fragments/Totp.tsx b/packages/react/src/components/SignIn/fragments/Totp.tsx new file mode 100644 index 00000000..e73786b6 --- /dev/null +++ b/packages/react/src/components/SignIn/fragments/Totp.tsx @@ -0,0 +1,83 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {ScreenType, keys} from '@asgardeo/js-ui-core'; +import {CircularProgress} from '@oxygen-ui/react'; +import {useState, ReactElement} from 'react'; +import useTranslations from '../../../hooks/use-translations'; +import TotpProps from '../../../models/totp-props'; +import {SignIn as UISignIn} from '../../../oxygen-ui-react-auth-components'; + +/** + * This component renders the TOTP authentication screen. + * + * @param {TotpProps} props - Props injected to the component. + * @param {string} props.authenticatorId - Authenticator ID. + * @param {BrandingProps} props.brandingProps - Branding props. + * @param {Function} props.handleAuthenticate - Callback to handle authentication. + * + * @return {ReactElement} + */ +const Totp = ({brandingProps, authenticatorId, handleAuthenticate}: TotpProps): ReactElement => { + const [totp, setTotp] = useState(); + + const {isLoading, t} = useTranslations({ + componentLocaleOverride: brandingProps?.locale, + componentTextOverrides: brandingProps?.preference?.text, + screen: ScreenType.TOTP, + }); + + if (isLoading) { + return ( +
+ +
+ ); + } + + return ( + + {t(keys.totp.heading)} + + {t(keys.totp.enter.verification.code.got.by.device)} + + + + handleAuthenticate(authenticatorId, {token: totp})} + > + totp.continue + + + + {t(keys.totp.enroll.message1)} +
+ {t(keys.totp.enroll.message2)} +
+ + {t(keys.totp.enroll.message2)} +
+ ); +}; + +export default Totp; diff --git a/packages/react/src/models/totp-props.ts b/packages/react/src/models/totp-props.ts new file mode 100644 index 00000000..852d2faa --- /dev/null +++ b/packages/react/src/models/totp-props.ts @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {BrandingProps} from '@asgardeo/js-ui-core'; + +interface TotpProps { + authenticatorId: string; + brandingProps?: BrandingProps; + handleAuthenticate: Function; +} + +export default TotpProps; From 99d78dae2485f6cfa0f4e404d5a35f48326e926c Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 08:26:23 +0530 Subject: [PATCH 06/51] chore(sample-app): :tada: init react vite sample app --- .vscode/settings.json | 3 +- package.json | 3 +- pnpm-lock.yaml | 542 ++++++++++++++++++++++++++ recipes/react-vite/.eslintrc.cjs | 18 + recipes/react-vite/.gitignore | 24 ++ recipes/react-vite/README.md | 1 + recipes/react-vite/index.html | 13 + recipes/react-vite/package.json | 29 ++ recipes/react-vite/public/vite.svg | 1 + recipes/react-vite/src/App.css | 4 + recipes/react-vite/src/App.tsx | 7 + recipes/react-vite/src/main.tsx | 9 + recipes/react-vite/src/vite-env.d.ts | 1 + recipes/react-vite/tsconfig.json | 25 ++ recipes/react-vite/tsconfig.node.json | 11 + recipes/react-vite/vite.config.ts | 7 + 16 files changed, 696 insertions(+), 2 deletions(-) create mode 100644 recipes/react-vite/.eslintrc.cjs create mode 100644 recipes/react-vite/.gitignore create mode 100644 recipes/react-vite/README.md create mode 100644 recipes/react-vite/index.html create mode 100644 recipes/react-vite/package.json create mode 100644 recipes/react-vite/public/vite.svg create mode 100644 recipes/react-vite/src/App.css create mode 100644 recipes/react-vite/src/App.tsx create mode 100644 recipes/react-vite/src/main.tsx create mode 100644 recipes/react-vite/src/vite-env.d.ts create mode 100644 recipes/react-vite/tsconfig.json create mode 100644 recipes/react-vite/tsconfig.node.json create mode 100644 recipes/react-vite/vite.config.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 522634ab..2e34a441 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,7 +3,8 @@ "workspace", "core", "react", - "auth-components" + "auth-components", + "sample-app" ], "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" diff --git a/package.json b/package.json index 220637cb..10cd326a 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "nx": "18.2.4" }, "workspaces": [ - "packages/*" + "packages/*", + "recipes/*" ] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 87817104..55bb7c8a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -143,6 +143,49 @@ importers: specifier: 5.1.6 version: 5.1.6 + recipes/react-vite: + dependencies: + react: + specifier: ^18.2.0 + version: 18.3.1 + react-dom: + specifier: ^18.2.0 + version: 18.3.1(react@18.3.1) + react-vite: + specifier: 'link:' + version: 'link:' + devDependencies: + '@types/react': + specifier: ^18.2.66 + version: 18.3.1 + '@types/react-dom': + specifier: ^18.2.22 + version: 18.3.0 + '@typescript-eslint/eslint-plugin': + specifier: ^7.2.0 + version: 7.9.0(@typescript-eslint/parser@7.9.0)(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': + specifier: ^7.2.0 + version: 7.9.0(eslint@8.57.0)(typescript@5.4.5) + '@vitejs/plugin-react': + specifier: ^4.2.1 + version: 4.2.1(vite@5.2.11) + eslint: + specifier: ^8.57.0 + version: 8.57.0 + eslint-plugin-react-hooks: + specifier: ^4.6.0 + version: 4.6.0(eslint@8.57.0) + eslint-plugin-react-refresh: + specifier: ^0.4.6 + version: 0.4.7(eslint@8.57.0) + typescript: + specifier: ^5.2.2 + version: 5.4.5 + vite: + specifier: ^5.2.0 + version: 5.2.11 + packages: /@aashutoshrathi/word-wrap@1.2.6: @@ -272,6 +315,11 @@ packages: '@babel/helper-validator-identifier': 7.22.20 dev: true + /@babel/helper-plugin-utils@7.24.5: + resolution: {integrity: sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-simple-access@7.22.5: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} @@ -328,6 +376,26 @@ packages: '@babel/types': 7.24.0 dev: true + /@babel/plugin-transform-react-jsx-self@7.24.5(@babel/core@7.24.4): + resolution: {integrity: sha512-RtCJoUO2oYrYwFPtR1/jkoBEcFuI1ae9a9IMxeyAVa3a1Ap4AnxmyIKG2b2FaJKqkidw/0cxRbWN+HOs6ZWd1w==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.24.4 + '@babel/helper-plugin-utils': 7.24.5 + dev: true + + /@babel/plugin-transform-react-jsx-source@7.24.1(@babel/core@7.24.4): + resolution: {integrity: sha512-1v202n7aUq4uXAieRTKcwPzNyphlCuqHHDcdSNc+vdhoTEZcFMh+L5yZuCmGaIO7bs1nJUNfHB89TZyoL48xNA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.24.4 + '@babel/helper-plugin-utils': 7.24.5 + dev: true + /@babel/runtime@7.24.4: resolution: {integrity: sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==} engines: {node: '>=6.9.0'} @@ -519,6 +587,213 @@ packages: resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} dev: false + /@esbuild/aix-ppc64@0.20.2: + resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64@0.20.2: + resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.20.2: + resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.20.2: + resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.20.2: + resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.20.2: + resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.20.2: + resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.20.2: + resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.20.2: + resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.20.2: + resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.20.2: + resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.20.2: + resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.20.2: + resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.20.2: + resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.20.2: + resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.20.2: + resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.20.2: + resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.20.2: + resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.20.2: + resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.20.2: + resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.20.2: + resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.20.2: + resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.20.2: + resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@eslint-community/eslint-utils@4.4.0(eslint@8.57.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1331,6 +1606,35 @@ packages: engines: {node: '>=10.13.0'} dev: false + /@types/babel__core@7.20.5: + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + dependencies: + '@babel/parser': 7.24.4 + '@babel/types': 7.24.0 + '@types/babel__generator': 7.6.8 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.20.5 + dev: true + + /@types/babel__generator@7.6.8: + resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} + dependencies: + '@babel/types': 7.24.0 + dev: true + + /@types/babel__template@7.4.4: + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + dependencies: + '@babel/parser': 7.24.4 + '@babel/types': 7.24.0 + dev: true + + /@types/babel__traverse@7.20.5: + resolution: {integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==} + dependencies: + '@babel/types': 7.24.0 + dev: true + /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} dev: true @@ -1468,6 +1772,33 @@ packages: - supports-color dev: true + /@typescript-eslint/eslint-plugin@7.9.0(@typescript-eslint/parser@7.9.0)(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-6e+X0X3sFe/G/54aC3jt0txuMTURqLyekmEHViqyA2VnxhLMpvA6nqmcjIy+Cr9tLDHPssA74BP5Mx9HQIxBEA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.10.0 + '@typescript-eslint/parser': 7.9.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.9.0 + '@typescript-eslint/type-utils': 7.9.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.9.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.9.0 + eslint: 8.57.0 + graphemer: 1.4.0 + ignore: 5.3.1 + natural-compare: 1.4.0 + ts-api-utils: 1.3.0(typescript@5.4.5) + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/experimental-utils@5.62.0(eslint@8.57.0)(typescript@5.1.6): resolution: {integrity: sha512-RTXpeB3eMkpoclG3ZHft6vG/Z30azNHuqY6wKPBHlVMZFuEvrtlEDe8gMqDb+SO+9hjC/pLekeSCryf9vMZlCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1534,6 +1865,27 @@ packages: - supports-color dev: true + /@typescript-eslint/parser@7.9.0(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-qHMJfkL5qvgQB2aLvhUSXxbK7OLnDkwPzFalg458pxQgfxKDfT1ZDbHQM/I6mDIf/svlMkj21kzKuQ2ixJlatQ==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 7.9.0 + '@typescript-eslint/types': 7.9.0 + '@typescript-eslint/typescript-estree': 7.9.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.9.0 + debug: 4.3.4 + eslint: 8.57.0 + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/scope-manager@5.62.0: resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1542,6 +1894,14 @@ packages: '@typescript-eslint/visitor-keys': 5.62.0 dev: true + /@typescript-eslint/scope-manager@7.9.0: + resolution: {integrity: sha512-ZwPK4DeCDxr3GJltRz5iZejPFAAr4Wk3+2WIBaj1L5PYK5RgxExu/Y68FFVclN0y6GGwH8q+KgKRCvaTmFBbgQ==} + engines: {node: ^18.18.0 || >=20.0.0} + dependencies: + '@typescript-eslint/types': 7.9.0 + '@typescript-eslint/visitor-keys': 7.9.0 + dev: true + /@typescript-eslint/type-utils@5.62.0(eslint@8.57.0)(typescript@5.1.6): resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1582,11 +1942,36 @@ packages: - supports-color dev: true + /@typescript-eslint/type-utils@7.9.0(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-6Qy8dfut0PFrFRAZsGzuLoM4hre4gjzWJB6sUvdunCYZsYemTkzZNwF1rnGea326PHPT3zn5Lmg32M/xfJfByA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 7.9.0(typescript@5.4.5) + '@typescript-eslint/utils': 7.9.0(eslint@8.57.0)(typescript@5.4.5) + debug: 4.3.4 + eslint: 8.57.0 + ts-api-utils: 1.3.0(typescript@5.4.5) + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/types@5.62.0: resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@typescript-eslint/types@7.9.0: + resolution: {integrity: sha512-oZQD9HEWQanl9UfsbGVcZ2cGaR0YT5476xfWE0oE5kQa2sNK2frxOlkeacLOTh9po4AlUT5rtkGyYM5kew0z5w==} + engines: {node: ^18.18.0 || >=20.0.0} + dev: true + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.1.6): resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1629,6 +2014,28 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree@7.9.0(typescript@5.4.5): + resolution: {integrity: sha512-zBCMCkrb2YjpKV3LA0ZJubtKCDxLttxfdGmwZvTqqWevUPN0FZvSI26FalGFFUZU/9YQK/A4xcQF9o/VVaCKAg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 7.9.0 + '@typescript-eslint/visitor-keys': 7.9.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.4 + semver: 7.6.0 + ts-api-utils: 1.3.0(typescript@5.4.5) + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.1.6): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1669,6 +2076,22 @@ packages: - typescript dev: true + /@typescript-eslint/utils@7.9.0(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-5KVRQCzZajmT4Ep+NEgjXCvjuypVvYHUW7RHlXzNPuak2oWpVoD1jf5xCP0dPAuNIchjC7uQyvbdaSTFaLqSdA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@typescript-eslint/scope-manager': 7.9.0 + '@typescript-eslint/types': 7.9.0 + '@typescript-eslint/typescript-estree': 7.9.0(typescript@5.4.5) + eslint: 8.57.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/visitor-keys@5.62.0: resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1677,10 +2100,34 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@typescript-eslint/visitor-keys@7.9.0: + resolution: {integrity: sha512-iESPx2TNLDNGQLyjKhUvIKprlP49XNEK+MvIf9nIO7ZZaZdbnfWKHnXAgufpxqfA0YryH8XToi4+CjBgVnFTSQ==} + engines: {node: ^18.18.0 || >=20.0.0} + dependencies: + '@typescript-eslint/types': 7.9.0 + eslint-visitor-keys: 3.4.3 + dev: true + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true + /@vitejs/plugin-react@4.2.1(vite@5.2.11): + resolution: {integrity: sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 + dependencies: + '@babel/core': 7.24.4 + '@babel/plugin-transform-react-jsx-self': 7.24.5(@babel/core@7.24.4) + '@babel/plugin-transform-react-jsx-source': 7.24.1(@babel/core@7.24.4) + '@types/babel__core': 7.20.5 + react-refresh: 0.14.2 + vite: 5.2.11 + transitivePeerDependencies: + - supports-color + dev: true + /@yarnpkg/lockfile@1.1.0: resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==} dev: true @@ -2619,6 +3066,37 @@ packages: is-symbol: 1.0.4 dev: true + /esbuild@0.20.2: + resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.20.2 + '@esbuild/android-arm': 0.20.2 + '@esbuild/android-arm64': 0.20.2 + '@esbuild/android-x64': 0.20.2 + '@esbuild/darwin-arm64': 0.20.2 + '@esbuild/darwin-x64': 0.20.2 + '@esbuild/freebsd-arm64': 0.20.2 + '@esbuild/freebsd-x64': 0.20.2 + '@esbuild/linux-arm': 0.20.2 + '@esbuild/linux-arm64': 0.20.2 + '@esbuild/linux-ia32': 0.20.2 + '@esbuild/linux-loong64': 0.20.2 + '@esbuild/linux-mips64el': 0.20.2 + '@esbuild/linux-ppc64': 0.20.2 + '@esbuild/linux-riscv64': 0.20.2 + '@esbuild/linux-s390x': 0.20.2 + '@esbuild/linux-x64': 0.20.2 + '@esbuild/netbsd-x64': 0.20.2 + '@esbuild/openbsd-x64': 0.20.2 + '@esbuild/sunos-x64': 0.20.2 + '@esbuild/win32-arm64': 0.20.2 + '@esbuild/win32-ia32': 0.20.2 + '@esbuild/win32-x64': 0.20.2 + dev: true + /escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} engines: {node: '>=6'} @@ -2903,6 +3381,14 @@ packages: eslint: 8.57.0 dev: true + /eslint-plugin-react-refresh@0.4.7(eslint@8.57.0): + resolution: {integrity: sha512-yrj+KInFmwuQS2UQcg1SF83ha1tuHC1jMQbRNyuWtlEzzKRDgAl7L4Yp4NlDUZTZNlWvHEzOtJhMi40R7JxcSw==} + peerDependencies: + eslint: '>=7' + dependencies: + eslint: 8.57.0 + dev: true + /eslint-plugin-react@7.34.1(eslint@8.57.0): resolution: {integrity: sha512-N97CxlouPT1AHt8Jn0mhhN2RrADlUAsk1/atcT2KyA/l9Q/E6ll7OIGwNumFmWfZ9skV3XXccYS19h80rHtgkw==} engines: {node: '>=4'} @@ -4116,6 +4602,13 @@ packages: brace-expansion: 2.0.1 dev: true + /minimatch@9.0.4: + resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimist-options@4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} @@ -4580,6 +5073,11 @@ packages: /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} + /react-refresh@0.14.2: + resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} + engines: {node: '>=0.10.0'} + dev: true + /react-transition-group@4.4.5(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==} peerDependencies: @@ -5273,6 +5771,15 @@ packages: engines: {node: '>=8'} dev: true + /ts-api-utils@1.3.0(typescript@5.4.5): + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.4.5 + dev: true + /tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} dependencies: @@ -5451,6 +5958,41 @@ packages: spdx-expression-parse: 3.0.1 dev: true + /vite@5.2.11: + resolution: {integrity: sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.20.2 + postcss: 8.4.38 + rollup: 4.16.4 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: diff --git a/recipes/react-vite/.eslintrc.cjs b/recipes/react-vite/.eslintrc.cjs new file mode 100644 index 00000000..d6c95379 --- /dev/null +++ b/recipes/react-vite/.eslintrc.cjs @@ -0,0 +1,18 @@ +module.exports = { + root: true, + env: { browser: true, es2020: true }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:react-hooks/recommended', + ], + ignorePatterns: ['dist', '.eslintrc.cjs'], + parser: '@typescript-eslint/parser', + plugins: ['react-refresh'], + rules: { + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, +} diff --git a/recipes/react-vite/.gitignore b/recipes/react-vite/.gitignore new file mode 100644 index 00000000..a547bf36 --- /dev/null +++ b/recipes/react-vite/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/recipes/react-vite/README.md b/recipes/react-vite/README.md new file mode 100644 index 00000000..408858c9 --- /dev/null +++ b/recipes/react-vite/README.md @@ -0,0 +1 @@ +# React + TypeScript + Vite Sample Application diff --git a/recipes/react-vite/index.html b/recipes/react-vite/index.html new file mode 100644 index 00000000..e4b78eae --- /dev/null +++ b/recipes/react-vite/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + React + TS + + +
+ + + diff --git a/recipes/react-vite/package.json b/recipes/react-vite/package.json new file mode 100644 index 00000000..d930e8ac --- /dev/null +++ b/recipes/react-vite/package.json @@ -0,0 +1,29 @@ +{ + "name": "react-vite", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview" + }, + "dependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-vite": "link:" + }, + "devDependencies": { + "@types/react": "^18.2.66", + "@types/react-dom": "^18.2.22", + "@typescript-eslint/eslint-plugin": "^7.2.0", + "@typescript-eslint/parser": "^7.2.0", + "@vitejs/plugin-react": "^4.2.1", + "eslint": "^8.57.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.6", + "typescript": "^5.2.2", + "vite": "^5.2.0" + } +} diff --git a/recipes/react-vite/public/vite.svg b/recipes/react-vite/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/recipes/react-vite/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/recipes/react-vite/src/App.css b/recipes/react-vite/src/App.css new file mode 100644 index 00000000..ec7fe416 --- /dev/null +++ b/recipes/react-vite/src/App.css @@ -0,0 +1,4 @@ +#root { + margin: 0 auto; + padding: 2rem; +} diff --git a/recipes/react-vite/src/App.tsx b/recipes/react-vite/src/App.tsx new file mode 100644 index 00000000..505841a4 --- /dev/null +++ b/recipes/react-vite/src/App.tsx @@ -0,0 +1,7 @@ +import "./App.css"; + +function App() { + return <>Hello World; +} + +export default App; diff --git a/recipes/react-vite/src/main.tsx b/recipes/react-vite/src/main.tsx new file mode 100644 index 00000000..118a059f --- /dev/null +++ b/recipes/react-vite/src/main.tsx @@ -0,0 +1,9 @@ +import ReactDOM from 'react-dom/client' +import App from "./App.tsx"; +import React from "react"; + +ReactDOM.createRoot(document.getElementById("root")!).render( + + + +); diff --git a/recipes/react-vite/src/vite-env.d.ts b/recipes/react-vite/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/recipes/react-vite/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/recipes/react-vite/tsconfig.json b/recipes/react-vite/tsconfig.json new file mode 100644 index 00000000..a7fc6fbf --- /dev/null +++ b/recipes/react-vite/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/recipes/react-vite/tsconfig.node.json b/recipes/react-vite/tsconfig.node.json new file mode 100644 index 00000000..97ede7ee --- /dev/null +++ b/recipes/react-vite/tsconfig.node.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true + }, + "include": ["vite.config.ts"] +} diff --git a/recipes/react-vite/vite.config.ts b/recipes/react-vite/vite.config.ts new file mode 100644 index 00000000..5a33944a --- /dev/null +++ b/recipes/react-vite/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], +}) From cb4ba0782b1f3e38cf040f2e4313738696e26281 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 08:38:02 +0530 Subject: [PATCH 07/51] feat(react): :sparkles: export components and models --- .../react/src/components/public-components.ts | 19 +++++++++++++++++ packages/react/src/index.ts | 20 ++++++++++++++++++ .../src/models/asgardeo-provider-props.ts | 4 ++-- packages/react/src/models/public-models.ts | 21 +++++++++++++++++++ .../react/src/providers/AsgardeoProvider.tsx | 8 +++---- recipes/react-vite/src/App.tsx | 2 +- 6 files changed, 67 insertions(+), 7 deletions(-) create mode 100644 packages/react/src/components/public-components.ts create mode 100644 packages/react/src/index.ts create mode 100644 packages/react/src/models/public-models.ts diff --git a/packages/react/src/components/public-components.ts b/packages/react/src/components/public-components.ts new file mode 100644 index 00000000..ebe7d160 --- /dev/null +++ b/packages/react/src/components/public-components.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export {default as SignIn} from './SignIn/SignIn'; diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts new file mode 100644 index 00000000..fcc79190 --- /dev/null +++ b/packages/react/src/index.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export * from './components/public-components'; +export * from './models/public-models'; diff --git a/packages/react/src/models/asgardeo-provider-props.ts b/packages/react/src/models/asgardeo-provider-props.ts index b080687b..8deb0965 100644 --- a/packages/react/src/models/asgardeo-provider-props.ts +++ b/packages/react/src/models/asgardeo-provider-props.ts @@ -18,10 +18,10 @@ import {BrandingProps, Store, UIAuthConfig} from '@asgardeo/js-ui-core'; -interface AsgardeProviderProps { +interface AsgardeoProviderProps { branding?: BrandingProps; config: UIAuthConfig; store?: Store; } -export default AsgardeProviderProps; +export default AsgardeoProviderProps; diff --git a/packages/react/src/models/public-models.ts b/packages/react/src/models/public-models.ts new file mode 100644 index 00000000..705effac --- /dev/null +++ b/packages/react/src/models/public-models.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export type {UIAuthConfig} from '@asgardeo/js-ui-core'; +export {SignInProps} from './sign-in'; +export {default as AsgardeoProviderProps} from './asgardeo-provider-props'; diff --git a/packages/react/src/providers/AsgardeoProvider.tsx b/packages/react/src/providers/AsgardeoProvider.tsx index bab24026..887d463c 100644 --- a/packages/react/src/providers/AsgardeoProvider.tsx +++ b/packages/react/src/providers/AsgardeoProvider.tsx @@ -21,7 +21,7 @@ import {FC, PropsWithChildren, useCallback, useEffect, useMemo, useState} from ' import BrandingPreferenceProvider from './BrandingPreferenceProvider'; import I18nProvider from './I18nProvider'; import AsgardeoContext from '../contexts/asgardeo-context'; -import AsgardeProviderProps from '../models/asgardeo-provider-props'; +import AsgardeoProviderProps from '../models/asgardeo-provider-props'; import AuthContext from '../models/auth-context'; import SPACryptoUtils from '../utils/crypto-utils'; import SessionStore from '../utils/session-store'; @@ -31,7 +31,7 @@ import SessionStore from '../utils/session-store'; * It takes an object of type `AsgardeProviderProps` as props, which includes the children to render, * a configuration object, a store instance, and a branding object. * - * @param {PropsWithChildren} props - The properties passed to the component. + * @param {PropsWithChildren} props - The properties passed to the component. * @param {ReactNode} props.children - The children to render inside the provider. * @param {Config} props.config - The configuration object for the Asgardeo context. * @param {Store} [props.store] - An optional store instance. If not provided, a new SessionStore will be created. @@ -39,8 +39,8 @@ import SessionStore from '../utils/session-store'; * * @returns {ReactElement} A React element that provides the Asgardeo context to all its children. */ -const AsgardeoProvider: FC> = ( - props: PropsWithChildren, +const AsgardeoProvider: FC> = ( + props: PropsWithChildren, ) => { const {children, config, store, branding} = props; diff --git a/recipes/react-vite/src/App.tsx b/recipes/react-vite/src/App.tsx index 505841a4..bcffb8e6 100644 --- a/recipes/react-vite/src/App.tsx +++ b/recipes/react-vite/src/App.tsx @@ -1,7 +1,7 @@ import "./App.css"; function App() { - return <>Hello World; + return <>; } export default App; From c2d66f0ec0e6af5bfe7975f26720557c6b06bfe8 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 08:48:18 +0530 Subject: [PATCH 08/51] feat(sample-app): :package: add components to sample app --- recipes/react-vite/src/App.tsx | 7 ++++++- recipes/react-vite/src/main.tsx | 15 +++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/recipes/react-vite/src/App.tsx b/recipes/react-vite/src/App.tsx index bcffb8e6..a268ffbf 100644 --- a/recipes/react-vite/src/App.tsx +++ b/recipes/react-vite/src/App.tsx @@ -1,7 +1,12 @@ import "./App.css"; +import { SignIn } from "../../../packages/react/src"; // ToDO: temporary function App() { - return <>; + return ( + <> + + + ); } export default App; diff --git a/recipes/react-vite/src/main.tsx b/recipes/react-vite/src/main.tsx index 118a059f..bda16e70 100644 --- a/recipes/react-vite/src/main.tsx +++ b/recipes/react-vite/src/main.tsx @@ -1,9 +1,20 @@ -import ReactDOM from 'react-dom/client' +import ReactDOM from "react-dom/client"; import App from "./App.tsx"; import React from "react"; +import { AsgardeoProvider, UIAuthConfig } from "../../../packages/react/src"; //TODO: temporary + +const config: UIAuthConfig = { + baseUrl: "https://localhost:9443", + clientID: "b1uRjwpqydvxjGR42Y6BnIdQMRMa", + scope: ["openid", "internal_login", "profile"], + signInRedirectURL: "https://localhost:5173", + enableConsoleTextBranding: true, +}; ReactDOM.createRoot(document.getElementById("root")!).render( - + + + ); From 852969bb52c92a73d67d5d201b18612a8cbad15d Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 08:49:13 +0530 Subject: [PATCH 09/51] feat(react): :sparkles: export components from react --- packages/react/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index fcc79190..ee3020e7 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -18,3 +18,5 @@ export * from './components/public-components'; export * from './models/public-models'; +export {default as AsgardeoProvider} from './providers/AsgardeoProvider'; +export {default as useAuthentication} from './hooks/use-authentication'; From fca61894e8fdc43a253853cbec7b00178514419a Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 08:56:24 +0530 Subject: [PATCH 10/51] feat(react): :sparkles: add generateThemeSignIn function --- .../react/src/components/SignIn/SignIn.tsx | 2 +- .../react/src/theme/generate-theme-sign-in.ts | 132 ++++++++++++++++++ 2 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 packages/react/src/theme/generate-theme-sign-in.ts diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index 948cdbcc..a1e0ff9c 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -261,7 +261,7 @@ const SignIn: FC = (props: SignInProps) => { const imgUrl: string = brandingPreference?.preference?.theme?.LIGHT?.images?.logo?.imgURL; return ( - + {authResponse?.flowStatus !== FlowStatus.SuccessCompleted && !isAuthenticated && ( diff --git a/packages/react/src/theme/generate-theme-sign-in.ts b/packages/react/src/theme/generate-theme-sign-in.ts new file mode 100644 index 00000000..62ce6d3b --- /dev/null +++ b/packages/react/src/theme/generate-theme-sign-in.ts @@ -0,0 +1,132 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {BrandingPreferenceTheme, ThemeConfig} from '@asgardeo/js-ui-core'; +import {extendTheme, Theme} from '@oxygen-ui/react'; + +const generateThemeSignIn: (brandingPreferenceTheme: BrandingPreferenceTheme) => Theme = ( + brandingPreferenceTheme: BrandingPreferenceTheme, +) => { + const mode: string = brandingPreferenceTheme?.activeTheme.toLowerCase() ?? 'light'; + const brandingTheme: ThemeConfig = brandingPreferenceTheme[mode.toUpperCase()]; + + return extendTheme({ + colorSchemes: { + dark: { + brand: { + logo: { + main: brandingTheme?.images?.myAccountLogo?.imgURL ?? `../assets/asgardeo-logo.svg`, + }, + }, + palette: { + primary: { + main: brandingTheme?.colors?.primary?.main ?? 'var(--oxygen-palette-primary-main)', + }, + }, + }, + light: { + brand: { + logo: { + main: brandingTheme?.images?.myAccountLogo?.imgURL ?? `../assets/asgardeo-logo.svg`, + }, + }, + palette: { + primary: { + main: brandingTheme?.colors?.primary?.main ?? 'var(--oxygen-palette-primary-main)', + }, + }, + }, + }, + components: { + MuiButton: { + styleOverrides: { + root: { + borderRadius: brandingTheme?.buttons?.primary?.base?.border?.borderRadius, + color: brandingTheme?.buttons?.primary?.base?.font?.color, + }, + }, + }, + MuiFormControl: { + styleOverrides: { + root: { + background: brandingTheme?.inputs?.base?.background?.backgroundColor, + borderColor: brandingTheme?.inputs?.base?.border?.borderColor, + borderRadius: brandingTheme?.inputs?.base?.border?.borderRadius, + color: brandingTheme?.inputs?.base?.font?.color, + }, + }, + }, + MuiInputLabel: { + styleOverrides: { + root: { + color: `${ + brandingTheme?.inputs?.base?.labels?.font?.color !== '' + ? brandingTheme?.inputs?.base?.labels?.font?.color + : brandingTheme?.colors?.text?.primary + } !important`, + }, + }, + }, + MuiOutlinedInput: { + styleOverrides: { + input: { + padding: '0.67857143em 1em', + }, + }, + }, + MuiPaper: { + styleOverrides: { + root: { + '.OxygenSignInButton-social': { + backgroundColor: brandingTheme?.buttons.externalConnection.base.background.backgroundColor, + borderRadius: brandingTheme?.buttons.externalConnection.base.border.borderRadius, + color: brandingTheme?.buttons.externalConnection.base.font.color, + }, + background: brandingTheme?.colors?.background?.surface?.main, + borderColor: brandingTheme?.colors?.outlined?.default, + }, + }, + }, + MuiTextField: { + styleOverrides: { + root: { + color: 'purple', + }, + }, + }, + MuiTypography: { + styleOverrides: { + root: { + color: brandingTheme?.colors?.text?.primary, + }, + }, + }, + }, + shape: { + borderRadius: 4, + }, + typography: { + fontFamily: brandingTheme?.typography.font.fontFamily ?? 'Gilmer, sans-serif', + h1: { + fontWeight: 700, + }, + }, + }); +}; + +export default generateThemeSignIn; From 91c4e4a8b929e4f4b46498317e1a9419e06c3763 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 09:51:15 +0530 Subject: [PATCH 11/51] chore(sample-app): :heavy_plus_sign: add vite plugins for ssl and node polyfills --- pnpm-lock.yaml | 656 ++++++++++++++++++++++++++---- recipes/react-vite/package.json | 4 +- recipes/react-vite/vite.config.ts | 4 +- 3 files changed, 578 insertions(+), 86 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 55bb7c8a..bed53417 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -145,6 +145,9 @@ importers: recipes/react-vite: dependencies: + '@vitejs/plugin-basic-ssl': + specifier: ^1.1.0 + version: 1.1.0(vite@5.2.11) react: specifier: ^18.2.0 version: 18.3.1 @@ -154,6 +157,9 @@ importers: react-vite: specifier: 'link:' version: 'link:' + vite-plugin-node-polyfills: + specifier: ^0.21.0 + version: 0.21.0(vite@5.2.11) devDependencies: '@types/react': specifier: ^18.2.66 @@ -593,7 +599,6 @@ packages: cpu: [ppc64] os: [aix] requiresBuild: true - dev: true optional: true /@esbuild/android-arm64@0.20.2: @@ -602,7 +607,6 @@ packages: cpu: [arm64] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/android-arm@0.20.2: @@ -611,7 +615,6 @@ packages: cpu: [arm] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/android-x64@0.20.2: @@ -620,7 +623,6 @@ packages: cpu: [x64] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/darwin-arm64@0.20.2: @@ -629,7 +631,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /@esbuild/darwin-x64@0.20.2: @@ -638,7 +639,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /@esbuild/freebsd-arm64@0.20.2: @@ -647,7 +647,6 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true - dev: true optional: true /@esbuild/freebsd-x64@0.20.2: @@ -656,7 +655,6 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true - dev: true optional: true /@esbuild/linux-arm64@0.20.2: @@ -665,7 +663,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-arm@0.20.2: @@ -674,7 +671,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-ia32@0.20.2: @@ -683,7 +679,6 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-loong64@0.20.2: @@ -692,7 +687,6 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-mips64el@0.20.2: @@ -701,7 +695,6 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-ppc64@0.20.2: @@ -710,7 +703,6 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-riscv64@0.20.2: @@ -719,7 +711,6 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-s390x@0.20.2: @@ -728,7 +719,6 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-x64@0.20.2: @@ -737,7 +727,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/netbsd-x64@0.20.2: @@ -746,7 +735,6 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true - dev: true optional: true /@esbuild/openbsd-x64@0.20.2: @@ -755,7 +743,6 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true - dev: true optional: true /@esbuild/sunos-x64@0.20.2: @@ -764,7 +751,6 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true - dev: true optional: true /@esbuild/win32-arm64@0.20.2: @@ -773,7 +759,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /@esbuild/win32-ia32@0.20.2: @@ -782,7 +767,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /@esbuild/win32-x64@0.20.2: @@ -791,7 +775,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true /@eslint-community/eslint-utils@4.4.0(eslint@8.57.0): @@ -907,7 +890,6 @@ packages: /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - dev: true /@jridgewell/trace-mapping@0.3.25: resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} @@ -1416,6 +1398,20 @@ packages: rollup: 4.16.4 dev: true + /@rollup/plugin-inject@5.0.5: + resolution: {integrity: sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0 + estree-walker: 2.0.2 + magic-string: 0.30.10 + dev: false + /@rollup/plugin-node-resolve@15.2.3(rollup@4.16.4): resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} engines: {node: '>=14.0.0'} @@ -1454,6 +1450,20 @@ packages: typescript: 5.4.5 dev: true + /@rollup/pluginutils@5.1.0: + resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.5 + estree-walker: 2.0.2 + picomatch: 2.3.1 + dev: false + /@rollup/pluginutils@5.1.0(rollup@4.16.4): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} @@ -1474,7 +1484,6 @@ packages: cpu: [arm] os: [android] requiresBuild: true - dev: true optional: true /@rollup/rollup-android-arm64@4.16.4: @@ -1482,7 +1491,6 @@ packages: cpu: [arm64] os: [android] requiresBuild: true - dev: true optional: true /@rollup/rollup-darwin-arm64@4.16.4: @@ -1490,7 +1498,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /@rollup/rollup-darwin-x64@4.16.4: @@ -1498,7 +1505,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /@rollup/rollup-linux-arm-gnueabihf@4.16.4: @@ -1506,7 +1512,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@rollup/rollup-linux-arm-musleabihf@4.16.4: @@ -1514,7 +1519,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@rollup/rollup-linux-arm64-gnu@4.16.4: @@ -1522,7 +1526,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@rollup/rollup-linux-arm64-musl@4.16.4: @@ -1530,7 +1533,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@rollup/rollup-linux-powerpc64le-gnu@4.16.4: @@ -1538,7 +1540,6 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true - dev: true optional: true /@rollup/rollup-linux-riscv64-gnu@4.16.4: @@ -1546,7 +1547,6 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true - dev: true optional: true /@rollup/rollup-linux-s390x-gnu@4.16.4: @@ -1554,7 +1554,6 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true - dev: true optional: true /@rollup/rollup-linux-x64-gnu@4.16.4: @@ -1562,7 +1561,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@rollup/rollup-linux-x64-musl@4.16.4: @@ -1570,7 +1568,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@rollup/rollup-win32-arm64-msvc@4.16.4: @@ -1578,7 +1575,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /@rollup/rollup-win32-ia32-msvc@4.16.4: @@ -1586,7 +1582,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /@rollup/rollup-win32-x64-msvc@4.16.4: @@ -1594,7 +1589,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true /@sinclair/typebox@0.27.8: @@ -1637,7 +1631,6 @@ packages: /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - dev: true /@types/json-schema@7.0.15: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -2112,6 +2105,15 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true + /@vitejs/plugin-basic-ssl@1.1.0(vite@5.2.11): + resolution: {integrity: sha512-wO4Dk/rm8u7RNhOf95ZzcEmC9rYOncYgvq4z3duaJrCgjN8BxAnDVyndanfcJZ0O6XZzHz6Q0hTimxTg8Y9g/A==} + engines: {node: '>=14.6.0'} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + dependencies: + vite: 5.2.11 + dev: false + /@vitejs/plugin-react@4.2.1(vite@5.2.11): resolution: {integrity: sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==} engines: {node: ^14.18.0 || >=16.0.0} @@ -2339,6 +2341,24 @@ packages: engines: {node: '>=0.10.0'} dev: true + /asn1.js@4.10.1: + resolution: {integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==} + dependencies: + bn.js: 4.12.0 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: false + + /assert@2.1.0: + resolution: {integrity: sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==} + dependencies: + call-bind: 1.0.7 + is-nan: 1.3.2 + object-is: 1.1.6 + object.assign: 4.1.5 + util: 0.12.5 + dev: false + /ast-types-flow@0.0.8: resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} dev: true @@ -2362,7 +2382,6 @@ packages: engines: {node: '>= 0.4'} dependencies: possible-typed-array-names: 1.0.0 - dev: true /axe-core@4.7.0: resolution: {integrity: sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==} @@ -2423,6 +2442,14 @@ packages: readable-stream: 3.6.2 dev: true + /bn.js@4.12.0: + resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + dev: false + + /bn.js@5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + dev: false + /boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} dev: false @@ -2447,6 +2474,73 @@ packages: fill-range: 7.0.1 dev: true + /brorand@1.1.0: + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + dev: false + + /browser-resolve@2.0.0: + resolution: {integrity: sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==} + dependencies: + resolve: 1.22.8 + dev: false + + /browserify-aes@1.2.0: + resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} + dependencies: + buffer-xor: 1.0.3 + cipher-base: 1.0.4 + create-hash: 1.2.0 + evp_bytestokey: 1.0.3 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + + /browserify-cipher@1.0.1: + resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} + dependencies: + browserify-aes: 1.2.0 + browserify-des: 1.0.2 + evp_bytestokey: 1.0.3 + dev: false + + /browserify-des@1.0.2: + resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} + dependencies: + cipher-base: 1.0.4 + des.js: 1.1.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + + /browserify-rsa@4.1.0: + resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==} + dependencies: + bn.js: 5.2.1 + randombytes: 2.1.0 + dev: false + + /browserify-sign@4.2.3: + resolution: {integrity: sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==} + engines: {node: '>= 0.12'} + dependencies: + bn.js: 5.2.1 + browserify-rsa: 4.1.0 + create-hash: 1.2.0 + create-hmac: 1.1.7 + elliptic: 6.5.5 + hash-base: 3.0.4 + inherits: 2.0.4 + parse-asn1: 5.1.7 + readable-stream: 2.3.8 + safe-buffer: 5.2.1 + dev: false + + /browserify-zlib@0.2.0: + resolution: {integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==} + dependencies: + pako: 1.0.11 + dev: false + /browserslist@4.23.0: resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -2458,12 +2552,15 @@ packages: update-browserslist-db: 1.0.13(browserslist@4.23.0) dev: true + /buffer-xor@1.0.3: + resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} + dev: false + /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: base64-js: 1.5.1 ieee754: 1.2.1 - dev: true /buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} @@ -2477,6 +2574,10 @@ packages: engines: {node: '>=6'} dev: true + /builtin-status-codes@3.0.0: + resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} + dev: false + /call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} @@ -2486,7 +2587,6 @@ packages: function-bind: 1.1.2 get-intrinsic: 1.2.4 set-function-length: 1.2.2 - dev: true /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} @@ -2542,6 +2642,13 @@ packages: fsevents: 2.3.3 dev: true + /cipher-base@1.0.4: + resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + /cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} @@ -2632,6 +2739,14 @@ packages: resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} dev: true + /console-browserify@1.2.0: + resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} + dev: false + + /constants-browserify@1.0.0: + resolution: {integrity: sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==} + dev: false + /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: false @@ -2640,6 +2755,10 @@ packages: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true + /core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + dev: false + /cosmiconfig@7.1.0: resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} engines: {node: '>=10'} @@ -2667,6 +2786,38 @@ packages: typescript: 5.1.6 dev: true + /create-ecdh@4.0.4: + resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} + dependencies: + bn.js: 4.12.0 + elliptic: 6.5.5 + dev: false + + /create-hash@1.2.0: + resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + dependencies: + cipher-base: 1.0.4 + inherits: 2.0.4 + md5.js: 1.3.5 + ripemd160: 2.0.2 + sha.js: 2.4.11 + dev: false + + /create-hmac@1.1.7: + resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + dependencies: + cipher-base: 1.0.4 + create-hash: 1.2.0 + inherits: 2.0.4 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + dev: false + + /create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + dev: false + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -2676,6 +2827,22 @@ packages: which: 2.0.2 dev: true + /crypto-browserify@3.12.0: + resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} + dependencies: + browserify-cipher: 1.0.1 + browserify-sign: 4.2.3 + create-ecdh: 4.0.4 + create-hash: 1.2.0 + create-hmac: 1.1.7 + diffie-hellman: 5.0.3 + inherits: 2.0.4 + pbkdf2: 3.1.2 + public-encrypt: 4.0.3 + randombytes: 2.1.0 + randomfill: 1.0.4 + dev: false + /css-functions-list@3.2.2: resolution: {integrity: sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==} engines: {node: '>=12 || >=16'} @@ -2816,7 +2983,6 @@ packages: es-define-property: 1.0.0 es-errors: 1.3.0 gopd: 1.0.1 - dev: true /define-lazy-prop@2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} @@ -2830,7 +2996,6 @@ packages: define-data-property: 1.1.4 has-property-descriptors: 1.0.2 object-keys: 1.1.1 - dev: true /delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} @@ -2842,11 +3007,26 @@ packages: engines: {node: '>=6'} dev: true + /des.js@1.1.0: + resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: false + /diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true + /diffie-hellman@5.0.3: + resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} + dependencies: + bn.js: 4.12.0 + miller-rabin: 4.0.1 + randombytes: 2.1.0 + dev: false + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -2883,6 +3063,11 @@ packages: entities: 4.5.0 dev: false + /domain-browser@4.23.0: + resolution: {integrity: sha512-ArzcM/II1wCCujdCNyQjXrAFwS4mrLh4C7DZWlaI8mdh7h3BfKdNd3bKXITfl2PT9FtfQqaGvhi1vPRQPimjGA==} + engines: {node: '>=10'} + dev: false + /domelementtype@2.3.0: resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} dev: false @@ -2920,6 +3105,18 @@ packages: resolution: {integrity: sha512-+FnSWZIAvFHbsNVmUxhEqWiaOiPMcfum1GQzlWCg/wLigVtshOsjXHyEFfmt6cFK6+HkS3QOJBv6/3OPumbBfw==} dev: true + /elliptic@6.5.5: + resolution: {integrity: sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==} + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + dev: false + /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true @@ -3008,12 +3205,10 @@ packages: engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.4 - dev: true /es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - dev: true /es-iterator-helpers@1.0.18: resolution: {integrity: sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==} @@ -3095,7 +3290,6 @@ packages: '@esbuild/win32-arm64': 0.20.2 '@esbuild/win32-ia32': 0.20.2 '@esbuild/win32-x64': 0.20.2 - dev: true /escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} @@ -3621,13 +3815,24 @@ packages: /estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - dev: true /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} dev: true + /events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + dev: false + + /evp_bytestokey@1.0.3: + resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + dependencies: + md5.js: 1.3.5 + safe-buffer: 5.2.1 + dev: false + /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true @@ -3709,7 +3914,6 @@ packages: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - dev: true /flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} @@ -3743,7 +3947,6 @@ packages: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: is-callable: 1.2.7 - dev: true /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} @@ -3776,7 +3979,6 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true - dev: true optional: true /function-bind@1.1.2: @@ -3815,7 +4017,6 @@ packages: has-proto: 1.0.3 has-symbols: 1.0.3 hasown: 2.0.2 - dev: true /get-symbol-description@1.0.2: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} @@ -3917,7 +4118,6 @@ packages: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: get-intrinsic: 1.2.4 - dev: true /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -3950,24 +4150,44 @@ packages: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} dependencies: es-define-property: 1.0.0 - dev: true /has-proto@1.0.3: resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} engines: {node: '>= 0.4'} - dev: true /has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} - dev: true /has-tostringtag@1.0.2: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 - dev: true + + /hash-base@3.0.4: + resolution: {integrity: sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==} + engines: {node: '>=4'} + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + + /hash-base@3.1.0: + resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} + engines: {node: '>=4'} + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.2 + safe-buffer: 5.2.1 + dev: false + + /hash.js@1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: false /hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} @@ -3975,6 +4195,14 @@ packages: dependencies: function-bind: 1.1.2 + /hmac-drbg@1.0.1: + resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + dependencies: + hash.js: 1.1.7 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + dev: false + /hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} dependencies: @@ -3997,6 +4225,10 @@ packages: engines: {node: '>=8'} dev: true + /https-browserify@1.0.0: + resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} + dev: false + /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -4040,7 +4272,6 @@ packages: /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true /ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} @@ -4055,6 +4286,14 @@ packages: side-channel: 1.0.6 dev: true + /is-arguments@1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + dev: false + /is-array-buffer@3.0.4: resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} engines: {node: '>= 0.4'} @@ -4104,7 +4343,6 @@ packages: /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} - dev: true /is-core-module@2.13.1: resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} @@ -4152,7 +4390,6 @@ packages: engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.2 - dev: true /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} @@ -4175,6 +4412,14 @@ packages: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} dev: true + /is-nan@1.3.2: + resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + dev: false + /is-negative-zero@2.0.3: resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} engines: {node: '>= 0.4'} @@ -4252,7 +4497,6 @@ packages: engines: {node: '>= 0.4'} dependencies: which-typed-array: 1.1.15 - dev: true /is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} @@ -4285,6 +4529,10 @@ packages: is-docker: 2.2.1 dev: true + /isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + dev: false + /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true @@ -4293,6 +4541,11 @@ packages: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true + /isomorphic-timers-promises@1.0.1: + resolution: {integrity: sha512-u4sej9B1LPSxTGKB/HiuzvEQnXH0ECYkSVQU39koSwmFAxhlEAFl9RdTvLv4TOTQUgBS5O3O5fwUxk6byBZ+IQ==} + engines: {node: '>=10'} + dev: false + /iterator.prototype@1.1.2: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} dependencies: @@ -4462,7 +4715,6 @@ packages: engines: {node: '>=10'} dependencies: p-locate: 5.0.0 - dev: true /lodash.isempty@4.4.0: resolution: {integrity: sha512-oKMuF3xEeqDltrGMfDxAPGIVMSSRv8tbRSODbrs4KGsRRLEhrW8N8Rd4DRgB2+621hY8A8XwwrTVhXWpxFvMzg==} @@ -4506,7 +4758,6 @@ packages: resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 - dev: true /map-obj@1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} @@ -4522,6 +4773,14 @@ packages: resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==} dev: true + /md5.js@1.3.5: + resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + /mdn-data@2.0.28: resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==} dev: false @@ -4560,6 +4819,14 @@ packages: picomatch: 2.3.1 dev: true + /miller-rabin@4.0.1: + resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} + hasBin: true + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + dev: false + /mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -4582,6 +4849,14 @@ packages: engines: {node: '>=4'} dev: true + /minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + dev: false + + /minimalistic-crypto-utils@1.0.1: + resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + dev: false + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -4630,7 +4905,6 @@ packages: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - dev: true /natural-compare-lite@1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} @@ -4648,6 +4922,39 @@ packages: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true + /node-stdlib-browser@1.2.0: + resolution: {integrity: sha512-VSjFxUhRhkyed8AtLwSCkMrJRfQ3e2lGtG3sP6FEgaLKBBbxM/dLfjRe1+iLhjvyLFW3tBQ8+c0pcOtXGbAZJg==} + engines: {node: '>=10'} + dependencies: + assert: 2.1.0 + browser-resolve: 2.0.0 + browserify-zlib: 0.2.0 + buffer: 5.7.1 + console-browserify: 1.2.0 + constants-browserify: 1.0.0 + create-require: 1.1.1 + crypto-browserify: 3.12.0 + domain-browser: 4.23.0 + events: 3.3.0 + https-browserify: 1.0.0 + isomorphic-timers-promises: 1.0.1 + os-browserify: 0.3.0 + path-browserify: 1.0.1 + pkg-dir: 5.0.0 + process: 0.11.10 + punycode: 1.4.1 + querystring-es3: 0.2.1 + readable-stream: 3.6.2 + stream-browserify: 3.0.0 + stream-http: 3.2.0 + string_decoder: 1.3.0 + timers-browserify: 2.0.12 + tty-browserify: 0.0.1 + url: 0.11.3 + util: 0.12.5 + vm-browserify: 1.1.2 + dev: false + /normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -4753,12 +5060,18 @@ packages: /object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} - dev: true + + /object-is@1.1.6: + resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + dev: false /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} - dev: true /object.assign@4.1.5: resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} @@ -4768,7 +5081,6 @@ packages: define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 - dev: true /object.entries@1.1.8: resolution: {integrity: sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==} @@ -4864,6 +5176,10 @@ packages: wcwidth: 1.0.1 dev: true + /os-browserify@0.3.0: + resolution: {integrity: sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==} + dev: false + /p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -4876,7 +5192,6 @@ packages: engines: {node: '>=10'} dependencies: yocto-queue: 0.1.0 - dev: true /p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} @@ -4890,19 +5205,34 @@ packages: engines: {node: '>=10'} dependencies: p-limit: 3.1.0 - dev: true /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} dev: true + /pako@1.0.11: + resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} + dev: false + /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} dependencies: callsites: 3.1.0 + /parse-asn1@5.1.7: + resolution: {integrity: sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==} + engines: {node: '>= 0.10'} + dependencies: + asn1.js: 4.10.1 + browserify-aes: 1.2.0 + evp_bytestokey: 1.0.3 + hash-base: 3.0.4 + pbkdf2: 3.1.2 + safe-buffer: 5.2.1 + dev: false + /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -4912,10 +5242,13 @@ packages: json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 + /path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + dev: false + /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - dev: true /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} @@ -4934,18 +5267,34 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + /pbkdf2@3.1.2: + resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} + engines: {node: '>=0.12'} + dependencies: + create-hash: 1.2.0 + create-hmac: 1.1.7 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + dev: false + /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - dev: true + + /pkg-dir@5.0.0: + resolution: {integrity: sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==} + engines: {node: '>=10'} + dependencies: + find-up: 5.0.0 + dev: false /possible-typed-array-names@1.0.0: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} - dev: true /postcss-media-query-parser@0.2.3: resolution: {integrity: sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==} @@ -4992,7 +5341,6 @@ packages: nanoid: 3.3.7 picocolors: 1.0.0 source-map-js: 1.2.0 - dev: true /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} @@ -5027,6 +5375,15 @@ packages: react-is: 18.2.0 dev: true + /process-nextick-args@2.0.1: + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + dev: false + + /process@0.11.10: + resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} + engines: {node: '>= 0.6.0'} + dev: false + /prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} dependencies: @@ -5038,11 +5395,38 @@ packages: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} dev: true + /public-encrypt@4.0.3: + resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} + dependencies: + bn.js: 4.12.0 + browserify-rsa: 4.1.0 + create-hash: 1.2.0 + parse-asn1: 5.1.7 + randombytes: 2.1.0 + safe-buffer: 5.2.1 + dev: false + + /punycode@1.4.1: + resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} + dev: false + /punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} dev: true + /qs@6.12.1: + resolution: {integrity: sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==} + engines: {node: '>=0.6'} + dependencies: + side-channel: 1.0.6 + dev: false + + /querystring-es3@0.2.1: + resolution: {integrity: sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==} + engines: {node: '>=0.4.x'} + dev: false + /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true @@ -5058,6 +5442,13 @@ packages: safe-buffer: 5.2.1 dev: false + /randomfill@1.0.4: + resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} + dependencies: + randombytes: 2.1.0 + safe-buffer: 5.2.1 + dev: false + /react-dom@18.3.1(react@18.3.1): resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} peerDependencies: @@ -5128,6 +5519,18 @@ packages: type-fest: 0.6.0 dev: true + /readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + dependencies: + core-util-is: 1.0.3 + inherits: 2.0.4 + isarray: 1.0.0 + process-nextick-args: 2.0.1 + safe-buffer: 5.1.2 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + dev: false + /readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -5135,7 +5538,6 @@ packages: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 - dev: true /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} @@ -5255,6 +5657,13 @@ packages: glob: 7.1.7 dev: true + /ripemd160@2.0.2: + resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + dev: false + /rollup-plugin-dts@6.1.0(rollup@4.16.4)(typescript@5.4.5): resolution: {integrity: sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==} engines: {node: '>=16'} @@ -5293,7 +5702,6 @@ packages: '@rollup/rollup-win32-ia32-msvc': 4.16.4 '@rollup/rollup-win32-x64-msvc': 4.16.4 fsevents: 2.3.3 - dev: true /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -5311,6 +5719,10 @@ packages: isarray: 2.0.5 dev: true + /safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + dev: false + /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -5366,7 +5778,6 @@ packages: get-intrinsic: 1.2.4 gopd: 1.0.1 has-property-descriptors: 1.0.2 - dev: true /set-function-name@2.0.2: resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} @@ -5378,6 +5789,18 @@ packages: has-property-descriptors: 1.0.2 dev: true + /setimmediate@1.0.5: + resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + dev: false + + /sha.js@2.4.11: + resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} + hasBin: true + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -5398,7 +5821,6 @@ packages: es-errors: 1.3.0 get-intrinsic: 1.2.4 object-inspect: 1.13.1 - dev: true /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -5458,6 +5880,22 @@ packages: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: true + /stream-browserify@3.0.0: + resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.2 + dev: false + + /stream-http@3.2.0: + resolution: {integrity: sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==} + dependencies: + builtin-status-codes: 3.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + xtend: 4.0.2 + dev: false + /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -5512,11 +5950,16 @@ packages: es-object-atoms: 1.0.0 dev: true + /string_decoder@1.1.1: + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + dependencies: + safe-buffer: 5.1.2 + dev: false + /string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 - dev: true /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} @@ -5750,6 +6193,13 @@ packages: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true + /timers-browserify@2.0.12: + resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==} + engines: {node: '>=0.6.0'} + dependencies: + setimmediate: 1.0.5 + dev: false + /tmp@0.2.3: resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} engines: {node: '>=14.14'} @@ -5826,6 +6276,10 @@ packages: typescript: 5.4.5 dev: true + /tty-browserify@0.0.1: + resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} + dev: false + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -5943,9 +6397,25 @@ packages: punycode: 2.3.1 dev: true + /url@0.11.3: + resolution: {integrity: sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw==} + dependencies: + punycode: 1.4.1 + qs: 6.12.1 + dev: false + /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - dev: true + + /util@0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + dependencies: + inherits: 2.0.4 + is-arguments: 1.1.1 + is-generator-function: 1.0.10 + is-typed-array: 1.1.13 + which-typed-array: 1.1.15 + dev: false /v8-compile-cache@2.4.0: resolution: {integrity: sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==} @@ -5958,6 +6428,18 @@ packages: spdx-expression-parse: 3.0.1 dev: true + /vite-plugin-node-polyfills@0.21.0(vite@5.2.11): + resolution: {integrity: sha512-Sk4DiKnmxN8E0vhgEhzLudfJQfaT8k4/gJ25xvUPG54KjLJ6HAmDKbr4rzDD/QWEY+Lwg80KE85fGYBQihEPQA==} + peerDependencies: + vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 + dependencies: + '@rollup/plugin-inject': 5.0.5 + node-stdlib-browser: 1.2.0 + vite: 5.2.11 + transitivePeerDependencies: + - rollup + dev: false + /vite@5.2.11: resolution: {integrity: sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==} engines: {node: ^18.0.0 || >=20.0.0} @@ -5991,7 +6473,10 @@ packages: rollup: 4.16.4 optionalDependencies: fsevents: 2.3.3 - dev: true + + /vm-browserify@1.1.2: + resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} + dev: false /wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} @@ -6046,7 +6531,6 @@ packages: for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.2 - dev: true /which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} @@ -6088,6 +6572,11 @@ packages: signal-exit: 4.1.0 dev: true + /xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + dev: false + /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -6132,7 +6621,6 @@ packages: /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - dev: true '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?fa0b844715320a3953d6d055997c0770f8695082(eslint@8.57.0)(typescript@5.1.6)': resolution: {tarball: https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?fa0b844715320a3953d6d055997c0770f8695082} diff --git a/recipes/react-vite/package.json b/recipes/react-vite/package.json index d930e8ac..bbb9aa35 100644 --- a/recipes/react-vite/package.json +++ b/recipes/react-vite/package.json @@ -10,9 +10,11 @@ "preview": "vite preview" }, "dependencies": { + "@vitejs/plugin-basic-ssl": "^1.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-vite": "link:" + "react-vite": "link:", + "vite-plugin-node-polyfills": "^0.21.0" }, "devDependencies": { "@types/react": "^18.2.66", diff --git a/recipes/react-vite/vite.config.ts b/recipes/react-vite/vite.config.ts index 5a33944a..1c59cea3 100644 --- a/recipes/react-vite/vite.config.ts +++ b/recipes/react-vite/vite.config.ts @@ -1,7 +1,9 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' +import basicSsl from "@vitejs/plugin-basic-ssl"; +import { nodePolyfills } from "vite-plugin-node-polyfills"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react()], + plugins: [react(), basicSsl(), nodePolyfills()], }) From 84b0a1f00735fdc94aaef75e52bb88f7e0642b8d Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 09:58:42 +0530 Subject: [PATCH 12/51] fix(core): :bug: make the function continue with the default branding, if branding from console cannot be fetched --- packages/core/src/branding/get-branding.ts | 10 ++++++++-- packages/core/src/i18n/get-localization.ts | 8 +++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/core/src/branding/get-branding.ts b/packages/core/src/branding/get-branding.ts index 0f63c92c..81c051ec 100644 --- a/packages/core/src/branding/get-branding.ts +++ b/packages/core/src/branding/get-branding.ts @@ -41,8 +41,14 @@ const getBranding = async (props: GetBrandingProps): Promise => { if (!merged) { let brandingFromConsole: BrandingPreferenceAPIResponse; - if ((await AuthClient.getInstance().getDataLayer().getConfigData()).enableConsoleBranding ?? true) { - brandingFromConsole = await getBrandingPreference(); + try { + if ((await AuthClient.getInstance().getDataLayer().getConfigData()).enableConsoleBranding ?? true) { + brandingFromConsole = await getBrandingPreference(); + } + } catch { + /** + * If the branding from the console cannot be fetched, proceed with the default branding. + */ } if (brandingFromConsole?.preference?.configs?.isBrandingEnabled) { diff --git a/packages/core/src/i18n/get-localization.ts b/packages/core/src/i18n/get-localization.ts index 84844730..25e5b77e 100644 --- a/packages/core/src/i18n/get-localization.ts +++ b/packages/core/src/i18n/get-localization.ts @@ -52,11 +52,9 @@ const getLocalization = async (props: GetLocalizationProps): Promise }); } } catch (error) { - throw new AsgardeoUIException( - 'JS_UI_CORE-LOCALIZATION-IV', - 'Error occurred while fetching text from console branding.', - error.stack, - ); + /** + * If the branding from the console cannot be fetched, proceed with the default branding. + */ } /** From d2e6b18de9eff841a45fa3e358f9486f6b727d0a Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 10:04:45 +0530 Subject: [PATCH 13/51] fix(core): :art: remove unwanted import --- packages/core/src/i18n/get-localization.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/core/src/i18n/get-localization.ts b/packages/core/src/i18n/get-localization.ts index 25e5b77e..a4982a39 100644 --- a/packages/core/src/i18n/get-localization.ts +++ b/packages/core/src/i18n/get-localization.ts @@ -21,7 +21,6 @@ import merge from 'lodash.merge'; import {TextObject} from './screens/model'; import getBrandingPreferenceText from '../api/get-branding-preference-text'; import {AuthClient} from '../auth-client'; -import AsgardeoUIException from '../exception'; import {UIAuthConfig} from '../models/auth-config'; import {BrandingPreferenceTypes} from '../models/branding-api-response'; import {BrandingPreferenceTextAPIResponse} from '../models/branding-text-api-response'; From 3b933b53ed44815fdd046c7bd05de8b704f5c5ec Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 10:12:10 +0530 Subject: [PATCH 14/51] feat(react): :sparkles: add a circular progress until branding is fetched --- .../react/src/providers/BrandingPreferenceProvider.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/react/src/providers/BrandingPreferenceProvider.tsx b/packages/react/src/providers/BrandingPreferenceProvider.tsx index 845928e1..cb46a81b 100644 --- a/packages/react/src/providers/BrandingPreferenceProvider.tsx +++ b/packages/react/src/providers/BrandingPreferenceProvider.tsx @@ -17,7 +17,7 @@ */ import {Branding, getBranding} from '@asgardeo/js-ui-core'; -import {ThemeProvider} from '@oxygen-ui/react'; +import {CircularProgress, ThemeProvider} from '@oxygen-ui/react'; import {FC, PropsWithChildren, useEffect, useState} from 'react'; import BrandingPreferenceContext from '../contexts/branding-preference-context'; import BrandingPreferenceProviderProps from '../models/branding-preference-provider-props'; @@ -47,6 +47,14 @@ const BrandingPreferenceProvider: FC + +
+ ); + } + return ( {children} From e7941bb32f78e961fe1db5f0855741a1ed667021 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 10:13:18 +0530 Subject: [PATCH 15/51] fix(react): :label: update exported interfaces --- packages/react/src/models/public-models.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/react/src/models/public-models.ts b/packages/react/src/models/public-models.ts index 705effac..f51eee77 100644 --- a/packages/react/src/models/public-models.ts +++ b/packages/react/src/models/public-models.ts @@ -17,5 +17,3 @@ */ export type {UIAuthConfig} from '@asgardeo/js-ui-core'; -export {SignInProps} from './sign-in'; -export {default as AsgardeoProviderProps} from './asgardeo-provider-props'; From db32402d7c6c67134df845c3a20425652474da22 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 10:15:03 +0530 Subject: [PATCH 16/51] fix(sample-app): remove strict mode --- recipes/react-vite/src/main.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/recipes/react-vite/src/main.tsx b/recipes/react-vite/src/main.tsx index bda16e70..318bae98 100644 --- a/recipes/react-vite/src/main.tsx +++ b/recipes/react-vite/src/main.tsx @@ -12,9 +12,7 @@ const config: UIAuthConfig = { }; ReactDOM.createRoot(document.getElementById("root")!).render( - - - - - + + + ); From 0b3f671505292110ec870f30c036faf095559cb4 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 10:25:12 +0530 Subject: [PATCH 17/51] feat(react): :sparkles: update alert usage --- packages/react/src/components/SignIn/SignIn.tsx | 9 ++------- packages/react/src/components/SignIn/fragments/Totp.tsx | 4 +++- packages/react/src/models/totp-props.ts | 2 ++ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index a1e0ff9c..5a973a32 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -226,6 +226,7 @@ const SignIn: FC = (props: SignInProps) => { ); @@ -250,13 +251,6 @@ const SignIn: FC = (props: SignInProps) => { ); } - if (Alert) { - return ( -
- {Alert.message} -
- ); - } const imgUrl: string = brandingPreference?.preference?.theme?.LIGHT?.images?.logo?.imgURL; @@ -276,6 +270,7 @@ const SignIn: FC = (props: SignInProps) => { ); + }; export default SignIn; diff --git a/packages/react/src/components/SignIn/fragments/Totp.tsx b/packages/react/src/components/SignIn/fragments/Totp.tsx index e73786b6..86a4a6e7 100644 --- a/packages/react/src/components/SignIn/fragments/Totp.tsx +++ b/packages/react/src/components/SignIn/fragments/Totp.tsx @@ -33,7 +33,7 @@ import {SignIn as UISignIn} from '../../../oxygen-ui-react-auth-components'; * * @return {ReactElement} */ -const Totp = ({brandingProps, authenticatorId, handleAuthenticate}: TotpProps): ReactElement => { +const Totp = ({brandingProps, authenticatorId, handleAuthenticate, isAlert}: TotpProps): ReactElement => { const [totp, setTotp] = useState(); const {isLoading, t} = useTranslations({ @@ -56,6 +56,8 @@ const Totp = ({brandingProps, authenticatorId, handleAuthenticate}: TotpProps): {t(keys.totp.enter.verification.code.got.by.device)} + {isAlert && {isAlert.message}} + Date: Wed, 15 May 2024 10:28:43 +0530 Subject: [PATCH 18/51] fix(auth-components): :lipstick: add max height for social login images --- .../SignInButton/sign-in-button.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/react/src/oxygen-ui-react-auth-components/SignInButton/sign-in-button.scss b/packages/react/src/oxygen-ui-react-auth-components/SignInButton/sign-in-button.scss index 6498e7ab..315220b9 100644 --- a/packages/react/src/oxygen-ui-react-auth-components/SignInButton/sign-in-button.scss +++ b/packages/react/src/oxygen-ui-react-auth-components/SignInButton/sign-in-button.scss @@ -27,6 +27,10 @@ padding: 8px 0; box-shadow: 0 1px 1px 2px rgb(0 0 0 / 12%), 0 1px 1px 0 rgb(0 0 0 / 24%); + img { + max-height: 22px; + } + &:hover { background: rgb(213 212 212); box-shadow: 0 1px 1px 2px rgb(0 0 0 / 12%), 0 1px 1px 0 rgb(0 0 0 / 24%); From 85d7c5fdce935628253e693c1929a334f44b0a01 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 10:37:32 +0530 Subject: [PATCH 19/51] fix(react): :bug: update usages of `any` type --- packages/react/declarations.d.ts | 2 +- packages/react/src/components/SignIn/SignIn.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/declarations.d.ts b/packages/react/declarations.d.ts index 46bbf16f..875a50f8 100644 --- a/packages/react/declarations.d.ts +++ b/packages/react/declarations.d.ts @@ -17,6 +17,6 @@ */ declare module '*.svg' { - const content: any; + const content: string; export default content; } diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index 5a973a32..9b968d1a 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -93,7 +93,7 @@ const SignIn: FC = (props: SignInProps) => { * Handles the generalized authentication process. * @param {any} authParams - The authentication parameters. */ - const handleAuthenticate = async (authenticatorId: string, authParams?: any): Promise => { + const handleAuthenticate = async (authenticatorId: string, authParams?: {[key: string]: string}): Promise => { if (authResponse === undefined) { throw new AsgardeoUIException('REACT_UI-SIGN_IN-HA-IV02', 'Auth response is undefined.'); } From b8b7f28ac42ae71ef108ee593f110e31bf116d40 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 11:23:59 +0530 Subject: [PATCH 20/51] feat(react): :lipstick: update the button to get color from branding --- packages/react/src/theme/generate-theme.ts | 12 + pnpm-lock.yaml | 1160 ++------------------ 2 files changed, 77 insertions(+), 1095 deletions(-) diff --git a/packages/react/src/theme/generate-theme.ts b/packages/react/src/theme/generate-theme.ts index 5f2cee55..1aed12ed 100644 --- a/packages/react/src/theme/generate-theme.ts +++ b/packages/react/src/theme/generate-theme.ts @@ -43,6 +43,12 @@ const generateTheme: (brandingPreferenceTheme: BrandingPreferenceTheme) => Theme }, }, palette: { + gradients: { + primary: { + stop1: brandingTheme.colors.primary.main, + stop2: brandingTheme.colors.primary.main, + }, + }, primary: { main: brandingTheme?.colors?.primary?.main ?? 'var(--oxygen-palette-primary-main)', }, @@ -55,6 +61,12 @@ const generateTheme: (brandingPreferenceTheme: BrandingPreferenceTheme) => Theme }, }, palette: { + gradients: { + primary: { + stop1: brandingTheme.colors.primary.main, + stop2: brandingTheme.colors.primary.main, + }, + }, primary: { main: brandingTheme?.colors?.primary?.main ?? 'var(--oxygen-palette-primary-main)', }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bed53417..fb8a4b15 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -143,55 +143,6 @@ importers: specifier: 5.1.6 version: 5.1.6 - recipes/react-vite: - dependencies: - '@vitejs/plugin-basic-ssl': - specifier: ^1.1.0 - version: 1.1.0(vite@5.2.11) - react: - specifier: ^18.2.0 - version: 18.3.1 - react-dom: - specifier: ^18.2.0 - version: 18.3.1(react@18.3.1) - react-vite: - specifier: 'link:' - version: 'link:' - vite-plugin-node-polyfills: - specifier: ^0.21.0 - version: 0.21.0(vite@5.2.11) - devDependencies: - '@types/react': - specifier: ^18.2.66 - version: 18.3.1 - '@types/react-dom': - specifier: ^18.2.22 - version: 18.3.0 - '@typescript-eslint/eslint-plugin': - specifier: ^7.2.0 - version: 7.9.0(@typescript-eslint/parser@7.9.0)(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': - specifier: ^7.2.0 - version: 7.9.0(eslint@8.57.0)(typescript@5.4.5) - '@vitejs/plugin-react': - specifier: ^4.2.1 - version: 4.2.1(vite@5.2.11) - eslint: - specifier: ^8.57.0 - version: 8.57.0 - eslint-plugin-react-hooks: - specifier: ^4.6.0 - version: 4.6.0(eslint@8.57.0) - eslint-plugin-react-refresh: - specifier: ^0.4.6 - version: 0.4.7(eslint@8.57.0) - typescript: - specifier: ^5.2.2 - version: 5.4.5 - vite: - specifier: ^5.2.0 - version: 5.2.11 - packages: /@aashutoshrathi/word-wrap@1.2.6: @@ -321,11 +272,6 @@ packages: '@babel/helper-validator-identifier': 7.22.20 dev: true - /@babel/helper-plugin-utils@7.24.5: - resolution: {integrity: sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/helper-simple-access@7.22.5: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} @@ -382,26 +328,6 @@ packages: '@babel/types': 7.24.0 dev: true - /@babel/plugin-transform-react-jsx-self@7.24.5(@babel/core@7.24.4): - resolution: {integrity: sha512-RtCJoUO2oYrYwFPtR1/jkoBEcFuI1ae9a9IMxeyAVa3a1Ap4AnxmyIKG2b2FaJKqkidw/0cxRbWN+HOs6ZWd1w==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.4 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-react-jsx-source@7.24.1(@babel/core@7.24.4): - resolution: {integrity: sha512-1v202n7aUq4uXAieRTKcwPzNyphlCuqHHDcdSNc+vdhoTEZcFMh+L5yZuCmGaIO7bs1nJUNfHB89TZyoL48xNA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.4 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - /@babel/runtime@7.24.4: resolution: {integrity: sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==} engines: {node: '>=6.9.0'} @@ -593,190 +519,6 @@ packages: resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} dev: false - /@esbuild/aix-ppc64@0.20.2: - resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [aix] - requiresBuild: true - optional: true - - /@esbuild/android-arm64@0.20.2: - resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - optional: true - - /@esbuild/android-arm@0.20.2: - resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - requiresBuild: true - optional: true - - /@esbuild/android-x64@0.20.2: - resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - optional: true - - /@esbuild/darwin-arm64@0.20.2: - resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - optional: true - - /@esbuild/darwin-x64@0.20.2: - resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - optional: true - - /@esbuild/freebsd-arm64@0.20.2: - resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - optional: true - - /@esbuild/freebsd-x64@0.20.2: - resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - optional: true - - /@esbuild/linux-arm64@0.20.2: - resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - optional: true - - /@esbuild/linux-arm@0.20.2: - resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - optional: true - - /@esbuild/linux-ia32@0.20.2: - resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - optional: true - - /@esbuild/linux-loong64@0.20.2: - resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - optional: true - - /@esbuild/linux-mips64el@0.20.2: - resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - optional: true - - /@esbuild/linux-ppc64@0.20.2: - resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - optional: true - - /@esbuild/linux-riscv64@0.20.2: - resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - optional: true - - /@esbuild/linux-s390x@0.20.2: - resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - optional: true - - /@esbuild/linux-x64@0.20.2: - resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - optional: true - - /@esbuild/netbsd-x64@0.20.2: - resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - optional: true - - /@esbuild/openbsd-x64@0.20.2: - resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - optional: true - - /@esbuild/sunos-x64@0.20.2: - resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - optional: true - - /@esbuild/win32-arm64@0.20.2: - resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - optional: true - - /@esbuild/win32-ia32@0.20.2: - resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - optional: true - - /@esbuild/win32-x64@0.20.2: - resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.57.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -890,6 +632,7 @@ packages: /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: true /@jridgewell/trace-mapping@0.3.25: resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} @@ -1398,20 +1141,6 @@ packages: rollup: 4.16.4 dev: true - /@rollup/plugin-inject@5.0.5: - resolution: {integrity: sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.1.0 - estree-walker: 2.0.2 - magic-string: 0.30.10 - dev: false - /@rollup/plugin-node-resolve@15.2.3(rollup@4.16.4): resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} engines: {node: '>=14.0.0'} @@ -1450,20 +1179,6 @@ packages: typescript: 5.4.5 dev: true - /@rollup/pluginutils@5.1.0: - resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@types/estree': 1.0.5 - estree-walker: 2.0.2 - picomatch: 2.3.1 - dev: false - /@rollup/pluginutils@5.1.0(rollup@4.16.4): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} @@ -1484,6 +1199,7 @@ packages: cpu: [arm] os: [android] requiresBuild: true + dev: true optional: true /@rollup/rollup-android-arm64@4.16.4: @@ -1491,6 +1207,7 @@ packages: cpu: [arm64] os: [android] requiresBuild: true + dev: true optional: true /@rollup/rollup-darwin-arm64@4.16.4: @@ -1498,6 +1215,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: true optional: true /@rollup/rollup-darwin-x64@4.16.4: @@ -1505,6 +1223,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: true optional: true /@rollup/rollup-linux-arm-gnueabihf@4.16.4: @@ -1512,6 +1231,7 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: true optional: true /@rollup/rollup-linux-arm-musleabihf@4.16.4: @@ -1519,6 +1239,7 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: true optional: true /@rollup/rollup-linux-arm64-gnu@4.16.4: @@ -1526,6 +1247,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /@rollup/rollup-linux-arm64-musl@4.16.4: @@ -1533,6 +1255,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /@rollup/rollup-linux-powerpc64le-gnu@4.16.4: @@ -1540,6 +1263,7 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true + dev: true optional: true /@rollup/rollup-linux-riscv64-gnu@4.16.4: @@ -1547,6 +1271,7 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true + dev: true optional: true /@rollup/rollup-linux-s390x-gnu@4.16.4: @@ -1554,6 +1279,7 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true + dev: true optional: true /@rollup/rollup-linux-x64-gnu@4.16.4: @@ -1561,6 +1287,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /@rollup/rollup-linux-x64-musl@4.16.4: @@ -1568,6 +1295,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /@rollup/rollup-win32-arm64-msvc@4.16.4: @@ -1575,6 +1303,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: true optional: true /@rollup/rollup-win32-ia32-msvc@4.16.4: @@ -1582,6 +1311,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: true optional: true /@rollup/rollup-win32-x64-msvc@4.16.4: @@ -1589,6 +1319,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: true optional: true /@sinclair/typebox@0.27.8: @@ -1600,37 +1331,9 @@ packages: engines: {node: '>=10.13.0'} dev: false - /@types/babel__core@7.20.5: - resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} - dependencies: - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 - '@types/babel__generator': 7.6.8 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.5 - dev: true - - /@types/babel__generator@7.6.8: - resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} - dependencies: - '@babel/types': 7.24.0 - dev: true - - /@types/babel__template@7.4.4: - resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} - dependencies: - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 - dev: true - - /@types/babel__traverse@7.20.5: - resolution: {integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==} - dependencies: - '@babel/types': 7.24.0 - dev: true - /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + dev: true /@types/json-schema@7.0.15: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -1765,33 +1468,6 @@ packages: - supports-color dev: true - /@typescript-eslint/eslint-plugin@7.9.0(@typescript-eslint/parser@7.9.0)(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-6e+X0X3sFe/G/54aC3jt0txuMTURqLyekmEHViqyA2VnxhLMpvA6nqmcjIy+Cr9tLDHPssA74BP5Mx9HQIxBEA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.9.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.9.0 - '@typescript-eslint/type-utils': 7.9.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.9.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.9.0 - eslint: 8.57.0 - graphemer: 1.4.0 - ignore: 5.3.1 - natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.4.5) - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/experimental-utils@5.62.0(eslint@8.57.0)(typescript@5.1.6): resolution: {integrity: sha512-RTXpeB3eMkpoclG3ZHft6vG/Z30azNHuqY6wKPBHlVMZFuEvrtlEDe8gMqDb+SO+9hjC/pLekeSCryf9vMZlCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1858,27 +1534,6 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@7.9.0(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-qHMJfkL5qvgQB2aLvhUSXxbK7OLnDkwPzFalg458pxQgfxKDfT1ZDbHQM/I6mDIf/svlMkj21kzKuQ2ixJlatQ==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/scope-manager': 7.9.0 - '@typescript-eslint/types': 7.9.0 - '@typescript-eslint/typescript-estree': 7.9.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.9.0 - debug: 4.3.4 - eslint: 8.57.0 - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/scope-manager@5.62.0: resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1887,14 +1542,6 @@ packages: '@typescript-eslint/visitor-keys': 5.62.0 dev: true - /@typescript-eslint/scope-manager@7.9.0: - resolution: {integrity: sha512-ZwPK4DeCDxr3GJltRz5iZejPFAAr4Wk3+2WIBaj1L5PYK5RgxExu/Y68FFVclN0y6GGwH8q+KgKRCvaTmFBbgQ==} - engines: {node: ^18.18.0 || >=20.0.0} - dependencies: - '@typescript-eslint/types': 7.9.0 - '@typescript-eslint/visitor-keys': 7.9.0 - dev: true - /@typescript-eslint/type-utils@5.62.0(eslint@8.57.0)(typescript@5.1.6): resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1935,36 +1582,11 @@ packages: - supports-color dev: true - /@typescript-eslint/type-utils@7.9.0(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-6Qy8dfut0PFrFRAZsGzuLoM4hre4gjzWJB6sUvdunCYZsYemTkzZNwF1rnGea326PHPT3zn5Lmg32M/xfJfByA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/typescript-estree': 7.9.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.9.0(eslint@8.57.0)(typescript@5.4.5) - debug: 4.3.4 - eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.4.5) - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/types@5.62.0: resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/types@7.9.0: - resolution: {integrity: sha512-oZQD9HEWQanl9UfsbGVcZ2cGaR0YT5476xfWE0oE5kQa2sNK2frxOlkeacLOTh9po4AlUT5rtkGyYM5kew0z5w==} - engines: {node: ^18.18.0 || >=20.0.0} - dev: true - /@typescript-eslint/typescript-estree@5.62.0(typescript@5.1.6): resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2007,28 +1629,6 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@7.9.0(typescript@5.4.5): - resolution: {integrity: sha512-zBCMCkrb2YjpKV3LA0ZJubtKCDxLttxfdGmwZvTqqWevUPN0FZvSI26FalGFFUZU/9YQK/A4xcQF9o/VVaCKAg==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 7.9.0 - '@typescript-eslint/visitor-keys': 7.9.0 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.4 - semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.5) - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.1.6): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2069,22 +1669,6 @@ packages: - typescript dev: true - /@typescript-eslint/utils@7.9.0(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-5KVRQCzZajmT4Ep+NEgjXCvjuypVvYHUW7RHlXzNPuak2oWpVoD1jf5xCP0dPAuNIchjC7uQyvbdaSTFaLqSdA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@typescript-eslint/scope-manager': 7.9.0 - '@typescript-eslint/types': 7.9.0 - '@typescript-eslint/typescript-estree': 7.9.0(typescript@5.4.5) - eslint: 8.57.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /@typescript-eslint/visitor-keys@5.62.0: resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2093,43 +1677,10 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@typescript-eslint/visitor-keys@7.9.0: - resolution: {integrity: sha512-iESPx2TNLDNGQLyjKhUvIKprlP49XNEK+MvIf9nIO7ZZaZdbnfWKHnXAgufpxqfA0YryH8XToi4+CjBgVnFTSQ==} - engines: {node: ^18.18.0 || >=20.0.0} - dependencies: - '@typescript-eslint/types': 7.9.0 - eslint-visitor-keys: 3.4.3 - dev: true - /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@vitejs/plugin-basic-ssl@1.1.0(vite@5.2.11): - resolution: {integrity: sha512-wO4Dk/rm8u7RNhOf95ZzcEmC9rYOncYgvq4z3duaJrCgjN8BxAnDVyndanfcJZ0O6XZzHz6Q0hTimxTg8Y9g/A==} - engines: {node: '>=14.6.0'} - peerDependencies: - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 - dependencies: - vite: 5.2.11 - dev: false - - /@vitejs/plugin-react@4.2.1(vite@5.2.11): - resolution: {integrity: sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - vite: ^4.2.0 || ^5.0.0 - dependencies: - '@babel/core': 7.24.4 - '@babel/plugin-transform-react-jsx-self': 7.24.5(@babel/core@7.24.4) - '@babel/plugin-transform-react-jsx-source': 7.24.1(@babel/core@7.24.4) - '@types/babel__core': 7.20.5 - react-refresh: 0.14.2 - vite: 5.2.11 - transitivePeerDependencies: - - supports-color - dev: true - /@yarnpkg/lockfile@1.1.0: resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==} dev: true @@ -2341,24 +1892,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /asn1.js@4.10.1: - resolution: {integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==} - dependencies: - bn.js: 4.12.0 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - dev: false - - /assert@2.1.0: - resolution: {integrity: sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==} - dependencies: - call-bind: 1.0.7 - is-nan: 1.3.2 - object-is: 1.1.6 - object.assign: 4.1.5 - util: 0.12.5 - dev: false - /ast-types-flow@0.0.8: resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} dev: true @@ -2382,6 +1915,7 @@ packages: engines: {node: '>= 0.4'} dependencies: possible-typed-array-names: 1.0.0 + dev: true /axe-core@4.7.0: resolution: {integrity: sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==} @@ -2442,14 +1976,6 @@ packages: readable-stream: 3.6.2 dev: true - /bn.js@4.12.0: - resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} - dev: false - - /bn.js@5.2.1: - resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} - dev: false - /boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} dev: false @@ -2474,73 +2000,6 @@ packages: fill-range: 7.0.1 dev: true - /brorand@1.1.0: - resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} - dev: false - - /browser-resolve@2.0.0: - resolution: {integrity: sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==} - dependencies: - resolve: 1.22.8 - dev: false - - /browserify-aes@1.2.0: - resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} - dependencies: - buffer-xor: 1.0.3 - cipher-base: 1.0.4 - create-hash: 1.2.0 - evp_bytestokey: 1.0.3 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - - /browserify-cipher@1.0.1: - resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} - dependencies: - browserify-aes: 1.2.0 - browserify-des: 1.0.2 - evp_bytestokey: 1.0.3 - dev: false - - /browserify-des@1.0.2: - resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} - dependencies: - cipher-base: 1.0.4 - des.js: 1.1.0 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - - /browserify-rsa@4.1.0: - resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==} - dependencies: - bn.js: 5.2.1 - randombytes: 2.1.0 - dev: false - - /browserify-sign@4.2.3: - resolution: {integrity: sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==} - engines: {node: '>= 0.12'} - dependencies: - bn.js: 5.2.1 - browserify-rsa: 4.1.0 - create-hash: 1.2.0 - create-hmac: 1.1.7 - elliptic: 6.5.5 - hash-base: 3.0.4 - inherits: 2.0.4 - parse-asn1: 5.1.7 - readable-stream: 2.3.8 - safe-buffer: 5.2.1 - dev: false - - /browserify-zlib@0.2.0: - resolution: {integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==} - dependencies: - pako: 1.0.11 - dev: false - /browserslist@4.23.0: resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -2552,15 +2011,12 @@ packages: update-browserslist-db: 1.0.13(browserslist@4.23.0) dev: true - /buffer-xor@1.0.3: - resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} - dev: false - /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: base64-js: 1.5.1 ieee754: 1.2.1 + dev: true /buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} @@ -2574,10 +2030,6 @@ packages: engines: {node: '>=6'} dev: true - /builtin-status-codes@3.0.0: - resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} - dev: false - /call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} @@ -2587,6 +2039,7 @@ packages: function-bind: 1.1.2 get-intrinsic: 1.2.4 set-function-length: 1.2.2 + dev: true /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} @@ -2642,13 +2095,6 @@ packages: fsevents: 2.3.3 dev: true - /cipher-base@1.0.4: - resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - /cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} @@ -2739,14 +2185,6 @@ packages: resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} dev: true - /console-browserify@1.2.0: - resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} - dev: false - - /constants-browserify@1.0.0: - resolution: {integrity: sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==} - dev: false - /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: false @@ -2755,10 +2193,6 @@ packages: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true - /core-util-is@1.0.3: - resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - dev: false - /cosmiconfig@7.1.0: resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} engines: {node: '>=10'} @@ -2786,38 +2220,6 @@ packages: typescript: 5.1.6 dev: true - /create-ecdh@4.0.4: - resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} - dependencies: - bn.js: 4.12.0 - elliptic: 6.5.5 - dev: false - - /create-hash@1.2.0: - resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} - dependencies: - cipher-base: 1.0.4 - inherits: 2.0.4 - md5.js: 1.3.5 - ripemd160: 2.0.2 - sha.js: 2.4.11 - dev: false - - /create-hmac@1.1.7: - resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} - dependencies: - cipher-base: 1.0.4 - create-hash: 1.2.0 - inherits: 2.0.4 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - dev: false - - /create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - dev: false - /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -2827,22 +2229,6 @@ packages: which: 2.0.2 dev: true - /crypto-browserify@3.12.0: - resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} - dependencies: - browserify-cipher: 1.0.1 - browserify-sign: 4.2.3 - create-ecdh: 4.0.4 - create-hash: 1.2.0 - create-hmac: 1.1.7 - diffie-hellman: 5.0.3 - inherits: 2.0.4 - pbkdf2: 3.1.2 - public-encrypt: 4.0.3 - randombytes: 2.1.0 - randomfill: 1.0.4 - dev: false - /css-functions-list@3.2.2: resolution: {integrity: sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==} engines: {node: '>=12 || >=16'} @@ -2983,6 +2369,7 @@ packages: es-define-property: 1.0.0 es-errors: 1.3.0 gopd: 1.0.1 + dev: true /define-lazy-prop@2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} @@ -2996,6 +2383,7 @@ packages: define-data-property: 1.1.4 has-property-descriptors: 1.0.2 object-keys: 1.1.1 + dev: true /delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} @@ -3007,26 +2395,11 @@ packages: engines: {node: '>=6'} dev: true - /des.js@1.1.0: - resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - dev: false - /diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /diffie-hellman@5.0.3: - resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} - dependencies: - bn.js: 4.12.0 - miller-rabin: 4.0.1 - randombytes: 2.1.0 - dev: false - /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -3063,11 +2436,6 @@ packages: entities: 4.5.0 dev: false - /domain-browser@4.23.0: - resolution: {integrity: sha512-ArzcM/II1wCCujdCNyQjXrAFwS4mrLh4C7DZWlaI8mdh7h3BfKdNd3bKXITfl2PT9FtfQqaGvhi1vPRQPimjGA==} - engines: {node: '>=10'} - dev: false - /domelementtype@2.3.0: resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} dev: false @@ -3102,20 +2470,8 @@ packages: dev: true /electron-to-chromium@1.4.747: - resolution: {integrity: sha512-+FnSWZIAvFHbsNVmUxhEqWiaOiPMcfum1GQzlWCg/wLigVtshOsjXHyEFfmt6cFK6+HkS3QOJBv6/3OPumbBfw==} - dev: true - - /elliptic@6.5.5: - resolution: {integrity: sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==} - dependencies: - bn.js: 4.12.0 - brorand: 1.1.0 - hash.js: 1.1.7 - hmac-drbg: 1.0.1 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - dev: false + resolution: {integrity: sha512-+FnSWZIAvFHbsNVmUxhEqWiaOiPMcfum1GQzlWCg/wLigVtshOsjXHyEFfmt6cFK6+HkS3QOJBv6/3OPumbBfw==} + dev: true /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -3205,10 +2561,12 @@ packages: engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.4 + dev: true /es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + dev: true /es-iterator-helpers@1.0.18: resolution: {integrity: sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==} @@ -3261,36 +2619,6 @@ packages: is-symbol: 1.0.4 dev: true - /esbuild@0.20.2: - resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/aix-ppc64': 0.20.2 - '@esbuild/android-arm': 0.20.2 - '@esbuild/android-arm64': 0.20.2 - '@esbuild/android-x64': 0.20.2 - '@esbuild/darwin-arm64': 0.20.2 - '@esbuild/darwin-x64': 0.20.2 - '@esbuild/freebsd-arm64': 0.20.2 - '@esbuild/freebsd-x64': 0.20.2 - '@esbuild/linux-arm': 0.20.2 - '@esbuild/linux-arm64': 0.20.2 - '@esbuild/linux-ia32': 0.20.2 - '@esbuild/linux-loong64': 0.20.2 - '@esbuild/linux-mips64el': 0.20.2 - '@esbuild/linux-ppc64': 0.20.2 - '@esbuild/linux-riscv64': 0.20.2 - '@esbuild/linux-s390x': 0.20.2 - '@esbuild/linux-x64': 0.20.2 - '@esbuild/netbsd-x64': 0.20.2 - '@esbuild/openbsd-x64': 0.20.2 - '@esbuild/sunos-x64': 0.20.2 - '@esbuild/win32-arm64': 0.20.2 - '@esbuild/win32-ia32': 0.20.2 - '@esbuild/win32-x64': 0.20.2 - /escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} engines: {node: '>=6'} @@ -3327,8 +2655,8 @@ packages: eslint: ^7.32.0 || ^8.2.0 eslint-plugin-import: ^2.25.3 dependencies: - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.57.0)(typescript@5.1.6) - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.1.6) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.4.5) eslint: 8.57.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1)(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0)(eslint@8.57.0) @@ -3394,7 +2722,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.1.6) + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.4.5) debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -3442,7 +2770,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.1.6) + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.4.5) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 @@ -3575,14 +2903,6 @@ packages: eslint: 8.57.0 dev: true - /eslint-plugin-react-refresh@0.4.7(eslint@8.57.0): - resolution: {integrity: sha512-yrj+KInFmwuQS2UQcg1SF83ha1tuHC1jMQbRNyuWtlEzzKRDgAl7L4Yp4NlDUZTZNlWvHEzOtJhMi40R7JxcSw==} - peerDependencies: - eslint: '>=7' - dependencies: - eslint: 8.57.0 - dev: true - /eslint-plugin-react@7.34.1(eslint@8.57.0): resolution: {integrity: sha512-N97CxlouPT1AHt8Jn0mhhN2RrADlUAsk1/atcT2KyA/l9Q/E6ll7OIGwNumFmWfZ9skV3XXccYS19h80rHtgkw==} engines: {node: '>=4'} @@ -3815,24 +3135,13 @@ packages: /estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} dev: true - /events@3.3.0: - resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} - engines: {node: '>=0.8.x'} - dev: false - - /evp_bytestokey@1.0.3: - resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} - dependencies: - md5.js: 1.3.5 - safe-buffer: 5.2.1 - dev: false - /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true @@ -3914,6 +3223,7 @@ packages: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 + dev: true /flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} @@ -3947,6 +3257,7 @@ packages: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: is-callable: 1.2.7 + dev: true /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} @@ -3979,6 +3290,7 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true + dev: true optional: true /function-bind@1.1.2: @@ -4017,6 +3329,7 @@ packages: has-proto: 1.0.3 has-symbols: 1.0.3 hasown: 2.0.2 + dev: true /get-symbol-description@1.0.2: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} @@ -4118,6 +3431,7 @@ packages: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: get-intrinsic: 1.2.4 + dev: true /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -4150,44 +3464,24 @@ packages: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} dependencies: es-define-property: 1.0.0 + dev: true /has-proto@1.0.3: resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} engines: {node: '>= 0.4'} + dev: true /has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} + dev: true /has-tostringtag@1.0.2: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 - - /hash-base@3.0.4: - resolution: {integrity: sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==} - engines: {node: '>=4'} - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - - /hash-base@3.1.0: - resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} - engines: {node: '>=4'} - dependencies: - inherits: 2.0.4 - readable-stream: 3.6.2 - safe-buffer: 5.2.1 - dev: false - - /hash.js@1.1.7: - resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - dev: false + dev: true /hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} @@ -4195,14 +3489,6 @@ packages: dependencies: function-bind: 1.1.2 - /hmac-drbg@1.0.1: - resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} - dependencies: - hash.js: 1.1.7 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - dev: false - /hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} dependencies: @@ -4225,10 +3511,6 @@ packages: engines: {node: '>=8'} dev: true - /https-browserify@1.0.0: - resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} - dev: false - /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -4272,6 +3554,7 @@ packages: /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true /ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} @@ -4286,14 +3569,6 @@ packages: side-channel: 1.0.6 dev: true - /is-arguments@1.1.1: - resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.7 - has-tostringtag: 1.0.2 - dev: false - /is-array-buffer@3.0.4: resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} engines: {node: '>= 0.4'} @@ -4343,6 +3618,7 @@ packages: /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} + dev: true /is-core-module@2.13.1: resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} @@ -4390,6 +3666,7 @@ packages: engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.2 + dev: true /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} @@ -4412,14 +3689,6 @@ packages: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} dev: true - /is-nan@1.3.2: - resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - dev: false - /is-negative-zero@2.0.3: resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} engines: {node: '>= 0.4'} @@ -4497,6 +3766,7 @@ packages: engines: {node: '>= 0.4'} dependencies: which-typed-array: 1.1.15 + dev: true /is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} @@ -4529,10 +3799,6 @@ packages: is-docker: 2.2.1 dev: true - /isarray@1.0.0: - resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - dev: false - /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true @@ -4541,11 +3807,6 @@ packages: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true - /isomorphic-timers-promises@1.0.1: - resolution: {integrity: sha512-u4sej9B1LPSxTGKB/HiuzvEQnXH0ECYkSVQU39koSwmFAxhlEAFl9RdTvLv4TOTQUgBS5O3O5fwUxk6byBZ+IQ==} - engines: {node: '>=10'} - dev: false - /iterator.prototype@1.1.2: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} dependencies: @@ -4715,6 +3976,7 @@ packages: engines: {node: '>=10'} dependencies: p-locate: 5.0.0 + dev: true /lodash.isempty@4.4.0: resolution: {integrity: sha512-oKMuF3xEeqDltrGMfDxAPGIVMSSRv8tbRSODbrs4KGsRRLEhrW8N8Rd4DRgB2+621hY8A8XwwrTVhXWpxFvMzg==} @@ -4758,6 +4020,7 @@ packages: resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 + dev: true /map-obj@1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} @@ -4773,14 +4036,6 @@ packages: resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==} dev: true - /md5.js@1.3.5: - resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - /mdn-data@2.0.28: resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==} dev: false @@ -4819,14 +4074,6 @@ packages: picomatch: 2.3.1 dev: true - /miller-rabin@4.0.1: - resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} - hasBin: true - dependencies: - bn.js: 4.12.0 - brorand: 1.1.0 - dev: false - /mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -4849,14 +4096,6 @@ packages: engines: {node: '>=4'} dev: true - /minimalistic-assert@1.0.1: - resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} - dev: false - - /minimalistic-crypto-utils@1.0.1: - resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} - dev: false - /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -4877,13 +4116,6 @@ packages: brace-expansion: 2.0.1 dev: true - /minimatch@9.0.4: - resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} - engines: {node: '>=16 || 14 >=14.17'} - dependencies: - brace-expansion: 2.0.1 - dev: true - /minimist-options@4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} @@ -4905,6 +4137,7 @@ packages: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + dev: true /natural-compare-lite@1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} @@ -4922,39 +4155,6 @@ packages: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true - /node-stdlib-browser@1.2.0: - resolution: {integrity: sha512-VSjFxUhRhkyed8AtLwSCkMrJRfQ3e2lGtG3sP6FEgaLKBBbxM/dLfjRe1+iLhjvyLFW3tBQ8+c0pcOtXGbAZJg==} - engines: {node: '>=10'} - dependencies: - assert: 2.1.0 - browser-resolve: 2.0.0 - browserify-zlib: 0.2.0 - buffer: 5.7.1 - console-browserify: 1.2.0 - constants-browserify: 1.0.0 - create-require: 1.1.1 - crypto-browserify: 3.12.0 - domain-browser: 4.23.0 - events: 3.3.0 - https-browserify: 1.0.0 - isomorphic-timers-promises: 1.0.1 - os-browserify: 0.3.0 - path-browserify: 1.0.1 - pkg-dir: 5.0.0 - process: 0.11.10 - punycode: 1.4.1 - querystring-es3: 0.2.1 - readable-stream: 3.6.2 - stream-browserify: 3.0.0 - stream-http: 3.2.0 - string_decoder: 1.3.0 - timers-browserify: 2.0.12 - tty-browserify: 0.0.1 - url: 0.11.3 - util: 0.12.5 - vm-browserify: 1.1.2 - dev: false - /normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -5060,18 +4260,12 @@ packages: /object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} - - /object-is@1.1.6: - resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - dev: false + dev: true /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} + dev: true /object.assign@4.1.5: resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} @@ -5081,6 +4275,7 @@ packages: define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 + dev: true /object.entries@1.1.8: resolution: {integrity: sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==} @@ -5176,10 +4371,6 @@ packages: wcwidth: 1.0.1 dev: true - /os-browserify@0.3.0: - resolution: {integrity: sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==} - dev: false - /p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -5192,6 +4383,7 @@ packages: engines: {node: '>=10'} dependencies: yocto-queue: 0.1.0 + dev: true /p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} @@ -5205,34 +4397,19 @@ packages: engines: {node: '>=10'} dependencies: p-limit: 3.1.0 + dev: true /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} dev: true - /pako@1.0.11: - resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} - dev: false - /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} dependencies: callsites: 3.1.0 - /parse-asn1@5.1.7: - resolution: {integrity: sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==} - engines: {node: '>= 0.10'} - dependencies: - asn1.js: 4.10.1 - browserify-aes: 1.2.0 - evp_bytestokey: 1.0.3 - hash-base: 3.0.4 - pbkdf2: 3.1.2 - safe-buffer: 5.2.1 - dev: false - /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -5242,13 +4419,10 @@ packages: json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 - /path-browserify@1.0.1: - resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} - dev: false - /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} + dev: true /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} @@ -5267,34 +4441,18 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - /pbkdf2@3.1.2: - resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} - engines: {node: '>=0.12'} - dependencies: - create-hash: 1.2.0 - create-hmac: 1.1.7 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - dev: false - /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - - /pkg-dir@5.0.0: - resolution: {integrity: sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==} - engines: {node: '>=10'} - dependencies: - find-up: 5.0.0 - dev: false + dev: true /possible-typed-array-names@1.0.0: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} + dev: true /postcss-media-query-parser@0.2.3: resolution: {integrity: sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==} @@ -5341,6 +4499,7 @@ packages: nanoid: 3.3.7 picocolors: 1.0.0 source-map-js: 1.2.0 + dev: true /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} @@ -5375,15 +4534,6 @@ packages: react-is: 18.2.0 dev: true - /process-nextick-args@2.0.1: - resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - dev: false - - /process@0.11.10: - resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} - engines: {node: '>= 0.6.0'} - dev: false - /prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} dependencies: @@ -5395,38 +4545,11 @@ packages: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} dev: true - /public-encrypt@4.0.3: - resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} - dependencies: - bn.js: 4.12.0 - browserify-rsa: 4.1.0 - create-hash: 1.2.0 - parse-asn1: 5.1.7 - randombytes: 2.1.0 - safe-buffer: 5.2.1 - dev: false - - /punycode@1.4.1: - resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} - dev: false - /punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} dev: true - /qs@6.12.1: - resolution: {integrity: sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==} - engines: {node: '>=0.6'} - dependencies: - side-channel: 1.0.6 - dev: false - - /querystring-es3@0.2.1: - resolution: {integrity: sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==} - engines: {node: '>=0.4.x'} - dev: false - /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true @@ -5442,13 +4565,6 @@ packages: safe-buffer: 5.2.1 dev: false - /randomfill@1.0.4: - resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} - dependencies: - randombytes: 2.1.0 - safe-buffer: 5.2.1 - dev: false - /react-dom@18.3.1(react@18.3.1): resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} peerDependencies: @@ -5464,11 +4580,6 @@ packages: /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} - /react-refresh@0.14.2: - resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} - engines: {node: '>=0.10.0'} - dev: true - /react-transition-group@4.4.5(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==} peerDependencies: @@ -5519,18 +4630,6 @@ packages: type-fest: 0.6.0 dev: true - /readable-stream@2.3.8: - resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} - dependencies: - core-util-is: 1.0.3 - inherits: 2.0.4 - isarray: 1.0.0 - process-nextick-args: 2.0.1 - safe-buffer: 5.1.2 - string_decoder: 1.1.1 - util-deprecate: 1.0.2 - dev: false - /readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -5538,6 +4637,7 @@ packages: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 + dev: true /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} @@ -5657,13 +4757,6 @@ packages: glob: 7.1.7 dev: true - /ripemd160@2.0.2: - resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - dev: false - /rollup-plugin-dts@6.1.0(rollup@4.16.4)(typescript@5.4.5): resolution: {integrity: sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==} engines: {node: '>=16'} @@ -5702,6 +4795,7 @@ packages: '@rollup/rollup-win32-ia32-msvc': 4.16.4 '@rollup/rollup-win32-x64-msvc': 4.16.4 fsevents: 2.3.3 + dev: true /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -5719,10 +4813,6 @@ packages: isarray: 2.0.5 dev: true - /safe-buffer@5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - dev: false - /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -5778,6 +4868,7 @@ packages: get-intrinsic: 1.2.4 gopd: 1.0.1 has-property-descriptors: 1.0.2 + dev: true /set-function-name@2.0.2: resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} @@ -5789,18 +4880,6 @@ packages: has-property-descriptors: 1.0.2 dev: true - /setimmediate@1.0.5: - resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} - dev: false - - /sha.js@2.4.11: - resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} - hasBin: true - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -5821,6 +4900,7 @@ packages: es-errors: 1.3.0 get-intrinsic: 1.2.4 object-inspect: 1.13.1 + dev: true /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -5880,22 +4960,6 @@ packages: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: true - /stream-browserify@3.0.0: - resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} - dependencies: - inherits: 2.0.4 - readable-stream: 3.6.2 - dev: false - - /stream-http@3.2.0: - resolution: {integrity: sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==} - dependencies: - builtin-status-codes: 3.0.0 - inherits: 2.0.4 - readable-stream: 3.6.2 - xtend: 4.0.2 - dev: false - /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -5950,16 +5014,11 @@ packages: es-object-atoms: 1.0.0 dev: true - /string_decoder@1.1.1: - resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} - dependencies: - safe-buffer: 5.1.2 - dev: false - /string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 + dev: true /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} @@ -6193,13 +5252,6 @@ packages: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true - /timers-browserify@2.0.12: - resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==} - engines: {node: '>=0.6.0'} - dependencies: - setimmediate: 1.0.5 - dev: false - /tmp@0.2.3: resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} engines: {node: '>=14.14'} @@ -6221,15 +5273,6 @@ packages: engines: {node: '>=8'} dev: true - /ts-api-utils@1.3.0(typescript@5.4.5): - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' - dependencies: - typescript: 5.4.5 - dev: true - /tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} dependencies: @@ -6276,10 +5319,6 @@ packages: typescript: 5.4.5 dev: true - /tty-browserify@0.0.1: - resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} - dev: false - /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -6397,25 +5436,9 @@ packages: punycode: 2.3.1 dev: true - /url@0.11.3: - resolution: {integrity: sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw==} - dependencies: - punycode: 1.4.1 - qs: 6.12.1 - dev: false - /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - - /util@0.12.5: - resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} - dependencies: - inherits: 2.0.4 - is-arguments: 1.1.1 - is-generator-function: 1.0.10 - is-typed-array: 1.1.13 - which-typed-array: 1.1.15 - dev: false + dev: true /v8-compile-cache@2.4.0: resolution: {integrity: sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==} @@ -6428,56 +5451,6 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /vite-plugin-node-polyfills@0.21.0(vite@5.2.11): - resolution: {integrity: sha512-Sk4DiKnmxN8E0vhgEhzLudfJQfaT8k4/gJ25xvUPG54KjLJ6HAmDKbr4rzDD/QWEY+Lwg80KE85fGYBQihEPQA==} - peerDependencies: - vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 - dependencies: - '@rollup/plugin-inject': 5.0.5 - node-stdlib-browser: 1.2.0 - vite: 5.2.11 - transitivePeerDependencies: - - rollup - dev: false - - /vite@5.2.11: - resolution: {integrity: sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - esbuild: 0.20.2 - postcss: 8.4.38 - rollup: 4.16.4 - optionalDependencies: - fsevents: 2.3.3 - - /vm-browserify@1.1.2: - resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} - dev: false - /wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -6531,6 +5504,7 @@ packages: for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.2 + dev: true /which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} @@ -6572,11 +5546,6 @@ packages: signal-exit: 4.1.0 dev: true - /xtend@4.0.2: - resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} - engines: {node: '>=0.4'} - dev: false - /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -6621,6 +5590,7 @@ packages: /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + dev: true '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?fa0b844715320a3953d6d055997c0770f8695082(eslint@8.57.0)(typescript@5.1.6)': resolution: {tarball: https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?fa0b844715320a3953d6d055997c0770f8695082} From 61e597250d22730fcffc496abcb55c3ea0987dd4 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 11:46:36 +0530 Subject: [PATCH 21/51] feat(react): :sparkles: add email otp fragment --- packages/core/src/models/screen-type.ts | 1 + .../react/src/components/SignIn/SignIn.tsx | 13 ++- .../components/SignIn/fragments/EmailOtp.tsx | 81 +++++++++++++++++++ .../react/src/components/SignIn/sign-in.scss | 23 ++++++ packages/react/src/models/email-otp-props.ts | 27 +++++++ 5 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 packages/react/src/components/SignIn/fragments/EmailOtp.tsx create mode 100644 packages/react/src/components/SignIn/sign-in.scss create mode 100644 packages/react/src/models/email-otp-props.ts diff --git a/packages/core/src/models/screen-type.ts b/packages/core/src/models/screen-type.ts index 686add22..9568ca3f 100644 --- a/packages/core/src/models/screen-type.ts +++ b/packages/core/src/models/screen-type.ts @@ -21,6 +21,7 @@ */ export enum ScreenType { Common = 'common', + EmailOTP = 'email_otp', Login = 'login', TOTP = 'totp', } diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index 9b968d1a..6b08a2a3 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -34,6 +34,7 @@ import { import {CircularProgress, ThemeProvider} from '@oxygen-ui/react'; import {FC, ReactElement, useContext, useEffect, useState} from 'react'; import BasicAuth from './fragments/BasicAuth'; +import EmailOtp from './fragments/EmailOtp'; import LoginOptionsBox from './fragments/LoginOptionsBox'; import Totp from './fragments/Totp'; import AsgardeoContext from '../../contexts/asgardeo-context'; @@ -46,6 +47,7 @@ import {AlertType, SignInProps} from '../../models/sign-in'; import {SignIn as UISignIn} from '../../oxygen-ui-react-auth-components'; import generateThemeSignIn from '../../theme/generate-theme-sign-in'; import SPACryptoUtils from '../../utils/crypto-utils'; +import './sign-in.scss'; const SignIn: FC = (props: SignInProps) => { const {brandingProps} = props; @@ -236,7 +238,13 @@ const SignIn: FC = (props: SignInProps) => { .base64URLDecode(authResponse.nextStep.authenticators[0].authenticatorId) .split(':')[0] === 'email-otp-authenticator' ) { - SignInCore = ; + SignInCore = ( + + ); } } } @@ -256,7 +264,7 @@ const SignIn: FC = (props: SignInProps) => { return ( - + {authResponse?.flowStatus !== FlowStatus.SuccessCompleted && !isAuthenticated && ( <> @@ -270,7 +278,6 @@ const SignIn: FC = (props: SignInProps) => { ); - }; export default SignIn; diff --git a/packages/react/src/components/SignIn/fragments/EmailOtp.tsx b/packages/react/src/components/SignIn/fragments/EmailOtp.tsx new file mode 100644 index 00000000..78eacd7c --- /dev/null +++ b/packages/react/src/components/SignIn/fragments/EmailOtp.tsx @@ -0,0 +1,81 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {ScreenType} from '@asgardeo/js-ui-core'; +import {CircularProgress} from '@oxygen-ui/react'; +import {ReactElement, useState} from 'react'; +import useTranslations from '../../../hooks/use-translations'; +import EmailOtpProps from '../../../models/email-otp-props'; +import {SignIn as UISignIn} from '../../../oxygen-ui-react-auth-components'; + +const EmailOtp = ({brandingProps, authenticator, handleAuthenticate}: EmailOtpProps): ReactElement => { + const [otp, setOtp] = useState(); + + const {isLoading, t} = useTranslations({ + componentLocaleOverride: brandingProps?.locale, + componentTextOverrides: brandingProps?.preference?.text, + screen: ScreenType.EmailOTP, + }); + + if (isLoading) { + return ( +
+ +
+ ); + } + + return ( + + OTP Verfication + + ): void => setOtp(e.target.value)} + /> + + { + handleAuthenticate(); + setOtp(''); + }} + > + Continue + + + handleAuthenticate(authenticator.authenticatorId)} + color="secondary" + variant="contained" + > + Resend Code + + + ); +}; + +export default EmailOtp; diff --git a/packages/react/src/components/SignIn/sign-in.scss b/packages/react/src/components/SignIn/sign-in.scss new file mode 100644 index 00000000..f178f417 --- /dev/null +++ b/packages/react/src/components/SignIn/sign-in.scss @@ -0,0 +1,23 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +.asgardeo-sign-in { + .email-otp-resend-button { + margin-top: 0; + } +} diff --git a/packages/react/src/models/email-otp-props.ts b/packages/react/src/models/email-otp-props.ts new file mode 100644 index 00000000..555d5ee5 --- /dev/null +++ b/packages/react/src/models/email-otp-props.ts @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {Authenticator, BrandingProps} from '@asgardeo/js-ui-core'; + +interface EmailOtpProps { + authenticator?: Authenticator; + brandingProps?: BrandingProps; + handleAuthenticate: Function; +} + +export default EmailOtpProps; From 113e7b69f9d716d162c58a653497a5f6c29d397d Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 12:13:57 +0530 Subject: [PATCH 22/51] feat(core): :sparkles: add localization for email otp --- .../core/src/i18n/screens/emailOtp/en-US.ts | 26 +++++++++++ .../core/src/i18n/screens/emailOtp/model.ts | 27 ++++++++++++ packages/core/src/i18n/screens/keys.ts | 44 +++++++++++++++++++ packages/core/src/models/screen-type.ts | 2 +- .../components/SignIn/fragments/EmailOtp.tsx | 10 ++--- 5 files changed, 103 insertions(+), 6 deletions(-) create mode 100644 packages/core/src/i18n/screens/emailOtp/en-US.ts create mode 100644 packages/core/src/i18n/screens/emailOtp/model.ts diff --git a/packages/core/src/i18n/screens/emailOtp/en-US.ts b/packages/core/src/i18n/screens/emailOtp/en-US.ts new file mode 100644 index 00000000..cc0c43fe --- /dev/null +++ b/packages/core/src/i18n/screens/emailOtp/en-US.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {EmailOTP} from './model'; + +export const emailOtp: EmailOTP = { + continue: 'Continue', + 'email.otp.heading': 'OTP Verification', + 'enter.verification.code.got.by.device': 'Enter the code sent to your email ID.', + 'resend.code': 'Resend code', +}; diff --git a/packages/core/src/i18n/screens/emailOtp/model.ts b/packages/core/src/i18n/screens/emailOtp/model.ts new file mode 100644 index 00000000..8b8b9b41 --- /dev/null +++ b/packages/core/src/i18n/screens/emailOtp/model.ts @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * Interface for the TOTP text. + */ +export interface EmailOTP { + continue: string; + 'email.otp.heading': string; + 'enter.verification.code.got.by.device': string; + 'resend.code': string; +} diff --git a/packages/core/src/i18n/screens/keys.ts b/packages/core/src/i18n/screens/keys.ts index 52a63054..be8c7c94 100644 --- a/packages/core/src/i18n/screens/keys.ts +++ b/packages/core/src/i18n/screens/keys.ts @@ -34,6 +34,28 @@ interface Keys { }; }; }; + emailOtp: { + continue: string; + email: { + otp: { + heading: string; + }; + }; + enter: { + verification: { + code: { + got: { + by: { + device: string; + }; + }; + }; + }; + }; + resend: { + code: string; + }; + }; login: { button: string; enter: { @@ -87,6 +109,28 @@ export const keys: Keys = { }, }, }, + emailOtp: { + continue: 'emailOtp.continue', + email: { + otp: { + heading: 'emailOtp.email.otp.heading', + }, + }, + enter: { + verification: { + code: { + got: { + by: { + device: 'emailOtp.enter.verification.code.got.by.device', + }, + }, + }, + }, + }, + resend: { + code: 'emailOtp.resend.code', + }, + }, login: { button: 'login.login.button', enter: { diff --git a/packages/core/src/models/screen-type.ts b/packages/core/src/models/screen-type.ts index 9568ca3f..cb18d45a 100644 --- a/packages/core/src/models/screen-type.ts +++ b/packages/core/src/models/screen-type.ts @@ -21,7 +21,7 @@ */ export enum ScreenType { Common = 'common', - EmailOTP = 'email_otp', + EmailOTP = 'emailOtp', Login = 'login', TOTP = 'totp', } diff --git a/packages/react/src/components/SignIn/fragments/EmailOtp.tsx b/packages/react/src/components/SignIn/fragments/EmailOtp.tsx index 78eacd7c..dc84bfa7 100644 --- a/packages/react/src/components/SignIn/fragments/EmailOtp.tsx +++ b/packages/react/src/components/SignIn/fragments/EmailOtp.tsx @@ -16,7 +16,7 @@ * under the License. */ -import {ScreenType} from '@asgardeo/js-ui-core'; +import {ScreenType, keys} from '@asgardeo/js-ui-core'; import {CircularProgress} from '@oxygen-ui/react'; import {ReactElement, useState} from 'react'; import useTranslations from '../../../hooks/use-translations'; @@ -42,12 +42,12 @@ const EmailOtp = ({brandingProps, authenticator, handleAuthenticate}: EmailOtpPr return ( - OTP Verfication + {t(keys.emailOtp.email.otp.heading)} - Continue + {t(keys.emailOtp.continue)}
- Resend Code + {t(keys.emailOtp.resend.code)} ); From 773fa4456ecaad5cf38ace36da321a7b85b63ce4 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 12:16:06 +0530 Subject: [PATCH 23/51] fix(react): :fire: remove a property from AuthContext interface --- packages/react/src/models/auth-context.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/react/src/models/auth-context.ts b/packages/react/src/models/auth-context.ts index 1960de6d..5a07ebeb 100644 --- a/packages/react/src/models/auth-context.ts +++ b/packages/react/src/models/auth-context.ts @@ -21,7 +21,6 @@ import {UIAuthConfig, MeAPIResponse} from '@asgardeo/js-ui-core'; interface AuthContext { accessToken: string; config: UIAuthConfig; - customizationOptions?: any; isAuthenticated: boolean | undefined; setAuthentication: () => void; user: MeAPIResponse; From e2878e262a92becc6707d326919510cfba043472 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 12:22:07 +0530 Subject: [PATCH 24/51] refactor(core): :recycle: move defaultName to a separate constant --- packages/core/src/i18n/get-localization.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/src/i18n/get-localization.ts b/packages/core/src/i18n/get-localization.ts index a4982a39..fc708692 100644 --- a/packages/core/src/i18n/get-localization.ts +++ b/packages/core/src/i18n/get-localization.ts @@ -41,11 +41,13 @@ const getLocalization = async (props: GetLocalizationProps): Promise const configData: AuthClientConfig = await AuthClient.getInstance().getDataLayer().getConfigData(); + const DEFAULT_NAME: string = 'carbon.super'; + try { if (configData.enableConsoleTextBranding ?? true) { textFromConsoleBranding = await getBrandingPreferenceText({ locale, - name: configData.name ?? 'carbon.super', + name: configData.name ?? DEFAULT_NAME, screen, type: configData.type ?? BrandingPreferenceTypes.Org, }); From 317d904d9104908b559eaae8001ed2e15c5173c9 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 12:24:18 +0530 Subject: [PATCH 25/51] refactor(react): :recycle: rename parts variable to keySegments in useTranslations hook --- packages/react/src/hooks/use-translations.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react/src/hooks/use-translations.ts b/packages/react/src/hooks/use-translations.ts index f8750ca2..65e962a2 100644 --- a/packages/react/src/hooks/use-translations.ts +++ b/packages/react/src/hooks/use-translations.ts @@ -57,10 +57,10 @@ const useTranslations = (props: SetTranslationsProps): UseTranslations => { * @returns {string} The requested translation. */ const t = (key: string): string => { - const parts: string[] = key.split('.'); + const keySegments: string[] = key.split('.'); - const screenKey: string = parts[0]; - const rightPart: string = parts.slice(1).join('.'); + const screenKey: string = keySegments[0]; + const rightPart: string = keySegments.slice(1).join('.'); return text[screenKey][rightPart]; }; From b792009d0b2a6f3540b7b9ebf2c8819e0107cdfb Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 12:31:19 +0530 Subject: [PATCH 26/51] feat(react): :bento: add email icon --- packages/react/src/assets/email-solid.svg | 21 +++++++++++++++++++ .../SignIn/fragments/LoginOptionsBox.tsx | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 packages/react/src/assets/email-solid.svg diff --git a/packages/react/src/assets/email-solid.svg b/packages/react/src/assets/email-solid.svg new file mode 100644 index 00000000..a7a67eb4 --- /dev/null +++ b/packages/react/src/assets/email-solid.svg @@ -0,0 +1,21 @@ + + + + + diff --git a/packages/react/src/components/SignIn/fragments/LoginOptionsBox.tsx b/packages/react/src/components/SignIn/fragments/LoginOptionsBox.tsx index dc1d0222..dec0358c 100644 --- a/packages/react/src/components/SignIn/fragments/LoginOptionsBox.tsx +++ b/packages/react/src/components/SignIn/fragments/LoginOptionsBox.tsx @@ -16,6 +16,7 @@ * under the License. */ +import emailSolid from '../../../assets/email-solid.svg'; import facebook from '../../../assets/social-logins/facebook.svg'; import github from '../../../assets/social-logins/github.svg'; import google from '../../../assets/social-logins/google.svg'; @@ -24,6 +25,7 @@ import LoginOptionsBoxProps from '../../../models/login-options-box-props'; import {SignIn as UISignIn} from '../../../oxygen-ui-react-auth-components'; const images: {[key: string]: string} = { + 'Email OTP': emailSolid, Facebook: facebook, Github: github, Google: google, From 595f9b988f571f704798fdb182e84fed04ce0344 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 12:34:44 +0530 Subject: [PATCH 27/51] docs(react): :memo: add js docs for components --- packages/react/src/components/SignIn/SignIn.tsx | 8 ++++++++ .../react/src/components/SignIn/fragments/EmailOtp.tsx | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index 6b08a2a3..0fbf05ff 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -49,6 +49,14 @@ import generateThemeSignIn from '../../theme/generate-theme-sign-in'; import SPACryptoUtils from '../../utils/crypto-utils'; import './sign-in.scss'; +/** + * This component provides the sign-in functionality. + * + * @param {SignInProps} props - Props injected to the component. + * @param {BrandingProps} props.brandingProps - Branding related props. + * + * @returns {ReactElement} - React element. + */ const SignIn: FC = (props: SignInProps) => { const {brandingProps} = props; const [authResponse, setAuthResponse] = useState(); diff --git a/packages/react/src/components/SignIn/fragments/EmailOtp.tsx b/packages/react/src/components/SignIn/fragments/EmailOtp.tsx index dc84bfa7..f2aedea3 100644 --- a/packages/react/src/components/SignIn/fragments/EmailOtp.tsx +++ b/packages/react/src/components/SignIn/fragments/EmailOtp.tsx @@ -23,6 +23,15 @@ import useTranslations from '../../../hooks/use-translations'; import EmailOtpProps from '../../../models/email-otp-props'; import {SignIn as UISignIn} from '../../../oxygen-ui-react-auth-components'; +/** + * Email OTP component. + * + * @param {EmailOtpProps} props - Props injected to the component. + * @param {BrandingProps} props.brandingProps - Branding props. + * @param {Authenticator} props.authenticator - Authenticator. + * @param {Function} props.handleAuthenticate - Callback to handle authentication. + * @return {ReactElement} + */ const EmailOtp = ({brandingProps, authenticator, handleAuthenticate}: EmailOtpProps): ReactElement => { const [otp, setOtp] = useState(); From cd58d97f50d3185216a396cfa8f80460e9c50f85 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 12:39:41 +0530 Subject: [PATCH 28/51] refactor(react): :recycle: update component's parametres take the complete authenticator object as a parameter --- packages/react/src/components/SignIn/SignIn.tsx | 4 ++-- .../react/src/components/SignIn/fragments/BasicAuth.tsx | 4 ++-- packages/react/src/components/SignIn/fragments/Totp.tsx | 6 +++--- packages/react/src/models/basic-auth-props.ts | 4 ++-- packages/react/src/models/totp-props.ts | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index 0fbf05ff..1c1c9b05 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -218,7 +218,7 @@ const SignIn: FC = (props: SignInProps) => { SignInCore = ( = (props: SignInProps) => { SignInCore = ( diff --git a/packages/react/src/components/SignIn/fragments/BasicAuth.tsx b/packages/react/src/components/SignIn/fragments/BasicAuth.tsx index fbef732f..cb285db9 100644 --- a/packages/react/src/components/SignIn/fragments/BasicAuth.tsx +++ b/packages/react/src/components/SignIn/fragments/BasicAuth.tsx @@ -25,7 +25,7 @@ import {SignIn as UISignIn} from '../../../oxygen-ui-react-auth-components'; const BasicAuth = ({ handleAuthenticate, - authenticatorId, + authenticator, isAlert, brandingProps, showSelfSignUp, @@ -81,7 +81,7 @@ const BasicAuth = ({ type="submit" fullWidth onClick={(): void => { - handleAuthenticate(authenticatorId, {password, username}); + handleAuthenticate(authenticator.authenticatorId, {password, username}); setUsername(''); setPassword(''); }} diff --git a/packages/react/src/components/SignIn/fragments/Totp.tsx b/packages/react/src/components/SignIn/fragments/Totp.tsx index 86a4a6e7..4c7ffbf4 100644 --- a/packages/react/src/components/SignIn/fragments/Totp.tsx +++ b/packages/react/src/components/SignIn/fragments/Totp.tsx @@ -27,13 +27,13 @@ import {SignIn as UISignIn} from '../../../oxygen-ui-react-auth-components'; * This component renders the TOTP authentication screen. * * @param {TotpProps} props - Props injected to the component. - * @param {string} props.authenticatorId - Authenticator ID. + * @param {string} props.authenticator - Authenticator. * @param {BrandingProps} props.brandingProps - Branding props. * @param {Function} props.handleAuthenticate - Callback to handle authentication. * * @return {ReactElement} */ -const Totp = ({brandingProps, authenticatorId, handleAuthenticate, isAlert}: TotpProps): ReactElement => { +const Totp = ({brandingProps, authenticator, handleAuthenticate, isAlert}: TotpProps): ReactElement => { const [totp, setTotp] = useState(); const {isLoading, t} = useTranslations({ @@ -66,7 +66,7 @@ const Totp = ({brandingProps, authenticatorId, handleAuthenticate, isAlert}: Tot className="oxygen-sign-in-cta" type="submit" fullWidth - onClick={(): void => handleAuthenticate(authenticatorId, {token: totp})} + onClick={(): void => handleAuthenticate(authenticator.authenticatorId, {token: totp})} > totp.continue diff --git a/packages/react/src/models/basic-auth-props.ts b/packages/react/src/models/basic-auth-props.ts index f10dd6df..8718715c 100644 --- a/packages/react/src/models/basic-auth-props.ts +++ b/packages/react/src/models/basic-auth-props.ts @@ -16,11 +16,11 @@ * under the License. */ -import {BrandingProps} from '@asgardeo/js-ui-core'; +import {Authenticator, BrandingProps} from '@asgardeo/js-ui-core'; import {ReactElement} from 'react'; interface BasicAuthProps { - authenticatorId: string; + authenticator: Authenticator; brandingProps?: BrandingProps; handleAuthenticate: Function; isAlert?: { diff --git a/packages/react/src/models/totp-props.ts b/packages/react/src/models/totp-props.ts index 755efa76..d605a594 100644 --- a/packages/react/src/models/totp-props.ts +++ b/packages/react/src/models/totp-props.ts @@ -16,11 +16,11 @@ * under the License. */ -import {BrandingProps} from '@asgardeo/js-ui-core'; +import {Authenticator, BrandingProps} from '@asgardeo/js-ui-core'; import {AlertType} from './sign-in'; interface TotpProps { - authenticatorId: string; + authenticator: Authenticator; brandingProps?: BrandingProps; handleAuthenticate: Function; isAlert?: AlertType; From 4840051f070a54c49adfecb75937788f213b94e8 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 12:41:05 +0530 Subject: [PATCH 29/51] docs(react): :memo: add js docs for BasicAuth component --- .../src/components/SignIn/fragments/BasicAuth.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/react/src/components/SignIn/fragments/BasicAuth.tsx b/packages/react/src/components/SignIn/fragments/BasicAuth.tsx index cb285db9..387be992 100644 --- a/packages/react/src/components/SignIn/fragments/BasicAuth.tsx +++ b/packages/react/src/components/SignIn/fragments/BasicAuth.tsx @@ -23,6 +23,19 @@ import useTranslations from '../../../hooks/use-translations'; import BasicAuthProps from '../../../models/basic-auth-props'; import {SignIn as UISignIn} from '../../../oxygen-ui-react-auth-components'; +/** + * This component renders the basic authentication form. + * + * @param {BasicAuthProps} props - Props injected to the basic authentication component. + * @param {BrandingProps} props.brandingProps - Branding props. + * @param {Function} props.handleAuthenticate - Callback to handle authentication. + * @param {Authenticator} props.authenticator - Authenticator. + * @param {AlertType} props.isAlert - Alert type. + * @param {ReactElement[]} props.renderLoginOptions - Login options. + * @param {boolean} props.showSelfSignUp - Show self sign up. + * + * @return {JSX.Element} + */ const BasicAuth = ({ handleAuthenticate, authenticator, From 74d1a91797f98a4eb23285e970f4d3496aa7bf36 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 12:43:13 +0530 Subject: [PATCH 30/51] feat(react): :sparkles: add alert for email otp --- packages/react/src/components/SignIn/fragments/EmailOtp.tsx | 5 ++++- packages/react/src/models/email-otp-props.ts | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/react/src/components/SignIn/fragments/EmailOtp.tsx b/packages/react/src/components/SignIn/fragments/EmailOtp.tsx index f2aedea3..22d402f2 100644 --- a/packages/react/src/components/SignIn/fragments/EmailOtp.tsx +++ b/packages/react/src/components/SignIn/fragments/EmailOtp.tsx @@ -30,9 +30,10 @@ import {SignIn as UISignIn} from '../../../oxygen-ui-react-auth-components'; * @param {BrandingProps} props.brandingProps - Branding props. * @param {Authenticator} props.authenticator - Authenticator. * @param {Function} props.handleAuthenticate - Callback to handle authentication. + * @param {AlertType} props.isAlert - Alert type. * @return {ReactElement} */ -const EmailOtp = ({brandingProps, authenticator, handleAuthenticate}: EmailOtpProps): ReactElement => { +const EmailOtp = ({alert, brandingProps, authenticator, handleAuthenticate}: EmailOtpProps): ReactElement => { const [otp, setOtp] = useState(); const {isLoading, t} = useTranslations({ @@ -53,6 +54,8 @@ const EmailOtp = ({brandingProps, authenticator, handleAuthenticate}: EmailOtpPr {t(keys.emailOtp.email.otp.heading)} + {alert && {alert.message}} + Date: Wed, 15 May 2024 12:46:51 +0530 Subject: [PATCH 31/51] refactor(react): :recycle: rename variable isAlert to alert --- packages/react/src/components/SignIn/SignIn.tsx | 7 ++++--- .../react/src/components/SignIn/fragments/BasicAuth.tsx | 6 +++--- .../react/src/components/SignIn/fragments/EmailOtp.tsx | 2 +- packages/react/src/components/SignIn/fragments/Totp.tsx | 5 +++-- packages/react/src/models/basic-auth-props.ts | 8 ++++---- packages/react/src/models/totp-props.ts | 2 +- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index 1c1c9b05..f9f0583a 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -61,7 +61,7 @@ const SignIn: FC = (props: SignInProps) => { const {brandingProps} = props; const [authResponse, setAuthResponse] = useState(); const [isComponentLoading, setIsComponentLoading] = useState(true); - const [Alert, setAlert] = useState(); + const [alert, setAlert] = useState(); const [showSelfSignUp, setShowSelfSignUp] = useState(true); const [componentBranding, setComponentBranding] = useState(); @@ -221,7 +221,7 @@ const SignIn: FC = (props: SignInProps) => { authenticator={authenticator} handleAuthenticate={handleAuthenticate} showSelfSignUp={showSelfSignUp} - isAlert={Alert} + alert={alert} renderLoginOptions={renderLoginOptions( authenticators.filter((auth: Authenticator) => auth.authenticatorId !== usernamePasswordID), )} @@ -236,7 +236,7 @@ const SignIn: FC = (props: SignInProps) => { ); @@ -248,6 +248,7 @@ const SignIn: FC = (props: SignInProps) => { ) { SignInCore = ( {t(keys.login.login.heading)} - {isAlert && {isAlert.message}} + {alert && {alert.message}} { diff --git a/packages/react/src/components/SignIn/fragments/Totp.tsx b/packages/react/src/components/SignIn/fragments/Totp.tsx index 4c7ffbf4..e2541a20 100644 --- a/packages/react/src/components/SignIn/fragments/Totp.tsx +++ b/packages/react/src/components/SignIn/fragments/Totp.tsx @@ -27,13 +27,14 @@ import {SignIn as UISignIn} from '../../../oxygen-ui-react-auth-components'; * This component renders the TOTP authentication screen. * * @param {TotpProps} props - Props injected to the component. + * @param {AlertType} props.alert - Alert type. * @param {string} props.authenticator - Authenticator. * @param {BrandingProps} props.brandingProps - Branding props. * @param {Function} props.handleAuthenticate - Callback to handle authentication. * * @return {ReactElement} */ -const Totp = ({brandingProps, authenticator, handleAuthenticate, isAlert}: TotpProps): ReactElement => { +const Totp = ({brandingProps, authenticator, handleAuthenticate, alert}: TotpProps): ReactElement => { const [totp, setTotp] = useState(); const {isLoading, t} = useTranslations({ @@ -56,7 +57,7 @@ const Totp = ({brandingProps, authenticator, handleAuthenticate, isAlert}: TotpP {t(keys.totp.enter.verification.code.got.by.device)} - {isAlert && {isAlert.message}} + {alert && {alert.message}} diff --git a/packages/react/src/models/basic-auth-props.ts b/packages/react/src/models/basic-auth-props.ts index 8718715c..0fc09aad 100644 --- a/packages/react/src/models/basic-auth-props.ts +++ b/packages/react/src/models/basic-auth-props.ts @@ -20,16 +20,16 @@ import {Authenticator, BrandingProps} from '@asgardeo/js-ui-core'; import {ReactElement} from 'react'; interface BasicAuthProps { - authenticator: Authenticator; - brandingProps?: BrandingProps; - handleAuthenticate: Function; - isAlert?: { + alert?: { alertType: | {error?: boolean; info?: never; warning?: never} | {error?: never; info?: boolean; warning?: never} | {error?: never; infor?: never; warning?: boolean}; message: string; }; + authenticator: Authenticator; + brandingProps?: BrandingProps; + handleAuthenticate: Function; renderLoginOptions?: ReactElement[]; showSelfSignUp: boolean; } diff --git a/packages/react/src/models/totp-props.ts b/packages/react/src/models/totp-props.ts index d605a594..d5da0c42 100644 --- a/packages/react/src/models/totp-props.ts +++ b/packages/react/src/models/totp-props.ts @@ -20,10 +20,10 @@ import {Authenticator, BrandingProps} from '@asgardeo/js-ui-core'; import {AlertType} from './sign-in'; interface TotpProps { + alert?: AlertType; authenticator: Authenticator; brandingProps?: BrandingProps; handleAuthenticate: Function; - isAlert?: AlertType; } export default TotpProps; From 188bf3010a68daa32b9995fc2e58087dd9b316ec Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 13:45:15 +0530 Subject: [PATCH 32/51] feat(react): :sparkles: configure footer component --- .../react/src/components/SignIn/SignIn.tsx | 30 +++++++++++++++++-- .../SignIn/sign-in.scss | 1 + recipes/react-vite/src/App.css | 4 ++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index f9f0583a..b68ddfa3 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -30,6 +30,7 @@ import { authenticate, authorize, getBranding, + keys, } from '@asgardeo/js-ui-core'; import {CircularProgress, ThemeProvider} from '@oxygen-ui/react'; import {FC, ReactElement, useContext, useEffect, useState} from 'react'; @@ -261,7 +262,7 @@ const SignIn: FC = (props: SignInProps) => { return SignInCore; }; - if (isComponentLoading) { + if (isComponentLoading || isLoading) { return (
@@ -270,6 +271,11 @@ const SignIn: FC = (props: SignInProps) => { } const imgUrl: string = brandingPreference?.preference?.theme?.LIGHT?.images?.logo?.imgURL; + let copyrightText: string = t(keys.common.copyright); + + if (copyrightText.includes('{{currentYear}}')) { + copyrightText = copyrightText.replace('{{currentYear}}', new Date().getFullYear().toString()); + } return ( @@ -278,7 +284,27 @@ const SignIn: FC = (props: SignInProps) => { {authResponse?.flowStatus !== FlowStatus.SuccessCompleted && !isAuthenticated && ( <> {renderSignIn()} - + + + {t(keys.common.terms.of.service)} + + ), + }, + { + children: ( + + {t(keys.common.privacy.policy)} + + ), + }, + {children: {componentBranding?.locale ?? 'en-US'}}, + ]} + /> )} {(authResponse?.flowStatus === FlowStatus.SuccessCompleted || isAuthenticated) && ( diff --git a/packages/react/src/oxygen-ui-react-auth-components/SignIn/sign-in.scss b/packages/react/src/oxygen-ui-react-auth-components/SignIn/sign-in.scss index 0db727a4..609fac01 100644 --- a/packages/react/src/oxygen-ui-react-auth-components/SignIn/sign-in.scss +++ b/packages/react/src/oxygen-ui-react-auth-components/SignIn/sign-in.scss @@ -24,4 +24,5 @@ align-items: center; text-align: left; padding: 20px; + max-width: fit-content; } diff --git a/recipes/react-vite/src/App.css b/recipes/react-vite/src/App.css index ec7fe416..5b2e3cda 100644 --- a/recipes/react-vite/src/App.css +++ b/recipes/react-vite/src/App.css @@ -1,4 +1,6 @@ #root { - margin: 0 auto; + display: flex; + justify-content: center; padding: 2rem; + text-align: center; } From baaf5bacb64602f27f52c859e0cd47a591b298c7 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 14:43:40 +0530 Subject: [PATCH 33/51] feat(react): :sparkles: modify SignIn component to cater all combinations --- .../react/src/components/SignIn/SignIn.tsx | 66 +++++++++++-------- .../react/src/components/SignIn/sign-in.scss | 8 +++ 2 files changed, 46 insertions(+), 28 deletions(-) diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index b68ddfa3..cf51d2a6 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -201,39 +201,35 @@ const SignIn: FC = (props: SignInProps) => { const renderSignIn = (): ReactElement => { const {authenticators} = authResponse.nextStep; - let SignInCore: JSX.Element =
; + let usernamePasswordAuthenticator: Authenticator; if (authenticators) { - let usernamePassword: boolean = false; - let isMultipleAuthenticators: boolean = false; - let usernamePasswordID: string = ''; - - if (authenticators.length > 1) { - isMultipleAuthenticators = true; - } - authenticators.forEach((authenticator: Authenticator) => { if (authenticator.authenticator === 'Username & Password') { - usernamePassword = true; - usernamePasswordID = authenticator.authenticatorId; - SignInCore = ( - auth.authenticatorId !== usernamePasswordID), - )} - /> - ); + usernamePasswordAuthenticator = authenticator; } }); + if (usernamePasswordAuthenticator) { + return ( + auth.authenticatorId !== usernamePasswordAuthenticator.authenticatorId, + ), + )} + /> + ); + } + if (authenticators.length === 1) { if (authenticators[0].authenticator === 'TOTP') { - SignInCore = ( + return ( = (props: SignInProps) => { handleAuthenticate={handleAuthenticate} /> ); - } else if ( + } + if ( // TODO: change after api based auth gets fixed new SPACryptoUtils() .base64URLDecode(authResponse.nextStep.authenticators[0].authenticatorId) .split(':')[0] === 'email-otp-authenticator' ) { - SignInCore = ( + return ( = (props: SignInProps) => { ); } } - } - return SignInCore; + if (authenticators.length > 1) { + return ( + + + Sign In + + {renderLoginOptions(authenticators)} + + ); + } + } + return null; }; + /** + * Renders the circular progress component while the component or text is loading. + */ if (isComponentLoading || isLoading) { return (
diff --git a/packages/react/src/components/SignIn/sign-in.scss b/packages/react/src/components/SignIn/sign-in.scss index f178f417..9d79e662 100644 --- a/packages/react/src/components/SignIn/sign-in.scss +++ b/packages/react/src/components/SignIn/sign-in.scss @@ -20,4 +20,12 @@ .email-otp-resend-button { margin-top: 0; } + + .multiple-otions-title { + margin: 16px 0 34px; + } + + .multiple-options-paper { + padding-bottom: 64px; + } } From 1429b2f8f63e4478e1c957eb168d18cace3dafa0 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 15:00:01 +0530 Subject: [PATCH 34/51] feat(react): :lipstick: add styling for links and refactor authenticators finding function --- packages/react/src/components/SignIn/SignIn.tsx | 12 ++++++------ packages/react/src/theme/generate-theme-sign-in.ts | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index cf51d2a6..c21088eb 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -201,14 +201,11 @@ const SignIn: FC = (props: SignInProps) => { const renderSignIn = (): ReactElement => { const {authenticators} = authResponse.nextStep; - let usernamePasswordAuthenticator: Authenticator; if (authenticators) { - authenticators.forEach((authenticator: Authenticator) => { - if (authenticator.authenticator === 'Username & Password') { - usernamePasswordAuthenticator = authenticator; - } - }); + const usernamePasswordAuthenticator: Authenticator = authenticators.find( + (authenticator: Authenticator) => authenticator.authenticator === 'Username & Password', + ); if (usernamePasswordAuthenticator) { return ( @@ -255,6 +252,9 @@ const SignIn: FC = (props: SignInProps) => { } } + /** + * If there are multiple authenticators without Username and password, render the multiple options screen + */ if (authenticators.length > 1) { return ( diff --git a/packages/react/src/theme/generate-theme-sign-in.ts b/packages/react/src/theme/generate-theme-sign-in.ts index 62ce6d3b..ba87e142 100644 --- a/packages/react/src/theme/generate-theme-sign-in.ts +++ b/packages/react/src/theme/generate-theme-sign-in.ts @@ -82,6 +82,13 @@ const generateThemeSignIn: (brandingPreferenceTheme: BrandingPreferenceTheme) => }, }, }, + MuiLink: { + styleOverrides: { + root: { + color: `${brandingTheme?.colors?.text?.primary} !important`, + }, + }, + }, MuiOutlinedInput: { styleOverrides: { input: { From ba87e3c68a8c6664e22b55fea32096f736aca4b6 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 15:15:10 +0530 Subject: [PATCH 35/51] feat(core): :sparkles: add more common text keys --- packages/core/src/i18n/screens/common/en-US.ts | 3 +++ packages/core/src/i18n/screens/common/fr-FR.ts | 3 +++ packages/core/src/i18n/screens/common/model.ts | 3 +++ packages/core/src/i18n/screens/keys.ts | 10 ++++++++++ 4 files changed, 19 insertions(+) diff --git a/packages/core/src/i18n/screens/common/en-US.ts b/packages/core/src/i18n/screens/common/en-US.ts index 9a57d9c6..746eb5bc 100644 --- a/packages/core/src/i18n/screens/common/en-US.ts +++ b/packages/core/src/i18n/screens/common/en-US.ts @@ -20,7 +20,10 @@ import {Common} from './model'; export const common: Common = { copyright: '© {{currentYear}} WSO2 LLC.', + or: 'OR', + 'prefix.register': 'Don't have an account?', 'privacy.policy': 'Privacy Policy', + register: 'Register', 'site.title': 'WSO2 Identity Server', 'terms.of.service': 'Terms of Servicet', }; diff --git a/packages/core/src/i18n/screens/common/fr-FR.ts b/packages/core/src/i18n/screens/common/fr-FR.ts index 6cac3ee7..120b9f1d 100644 --- a/packages/core/src/i18n/screens/common/fr-FR.ts +++ b/packages/core/src/i18n/screens/common/fr-FR.ts @@ -20,7 +20,10 @@ import {Common} from './model'; export const common: Common = { copyright: '© {{currentYear}} WSO2 LLC.', + or: 'OU', + 'prefix.register': "Vous n'avez pas de compte?", 'privacy.policy': 'Politique de confidentialité', + register: "S'inscrire", 'site.title': 'Identity Server WSO2', 'terms.of.service': 'Conditions de service', }; diff --git a/packages/core/src/i18n/screens/common/model.ts b/packages/core/src/i18n/screens/common/model.ts index d63ac8dd..02204b98 100644 --- a/packages/core/src/i18n/screens/common/model.ts +++ b/packages/core/src/i18n/screens/common/model.ts @@ -21,7 +21,10 @@ */ export interface Common { copyright: string; + or: string; + 'prefix.register': string; 'privacy.policy': string; + register: string; 'site.title': string; 'terms.of.service': string; } diff --git a/packages/core/src/i18n/screens/keys.ts b/packages/core/src/i18n/screens/keys.ts index be8c7c94..ec3aed78 100644 --- a/packages/core/src/i18n/screens/keys.ts +++ b/packages/core/src/i18n/screens/keys.ts @@ -22,9 +22,14 @@ interface Keys { common: { copyright: string; + or: string; + prefix: { + register: string; + }; privacy: { policy: string; }; + register: string; site: { title: string; }; @@ -97,9 +102,14 @@ interface Keys { export const keys: Keys = { common: { copyright: 'common.copyright', + or: 'common.or', + prefix: { + register: 'common.prefix.register', + }, privacy: { policy: 'common.privacy.policy', }, + register: 'common.register', site: { title: 'common.site.title', }, From eebf8f71235c22c4e405b1126d3ea73c2f84cda9 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 15:34:40 +0530 Subject: [PATCH 36/51] refactor: handle alert keys, added localization keys --- packages/core/src/i18n/screens/common/en-US.ts | 3 ++- packages/core/src/i18n/screens/common/fr-FR.ts | 1 + packages/core/src/i18n/screens/common/model.ts | 1 + packages/core/src/i18n/screens/keys.ts | 4 ++++ packages/core/src/i18n/screens/login/en-US.ts | 1 + packages/core/src/i18n/screens/login/fr-FR.ts | 1 + packages/core/src/i18n/screens/login/model.ts | 1 + packages/react/src/components/SignIn/SignIn.tsx | 6 ++++-- .../react/src/components/SignIn/fragments/BasicAuth.tsx | 8 ++++---- .../react/src/components/SignIn/fragments/EmailOtp.tsx | 2 +- packages/react/src/components/SignIn/fragments/Totp.tsx | 2 +- packages/react/src/models/basic-auth-props.ts | 9 ++------- packages/react/src/models/sign-in.ts | 2 +- 13 files changed, 24 insertions(+), 17 deletions(-) diff --git a/packages/core/src/i18n/screens/common/en-US.ts b/packages/core/src/i18n/screens/common/en-US.ts index 746eb5bc..0d732c12 100644 --- a/packages/core/src/i18n/screens/common/en-US.ts +++ b/packages/core/src/i18n/screens/common/en-US.ts @@ -20,8 +20,9 @@ import {Common} from './model'; export const common: Common = { copyright: '© {{currentYear}} WSO2 LLC.', + error: 'Something went wrong. Please try again.', or: 'OR', - 'prefix.register': 'Don't have an account?', + 'prefix.register': "Don't have an account?", 'privacy.policy': 'Privacy Policy', register: 'Register', 'site.title': 'WSO2 Identity Server', diff --git a/packages/core/src/i18n/screens/common/fr-FR.ts b/packages/core/src/i18n/screens/common/fr-FR.ts index 120b9f1d..fe34a940 100644 --- a/packages/core/src/i18n/screens/common/fr-FR.ts +++ b/packages/core/src/i18n/screens/common/fr-FR.ts @@ -20,6 +20,7 @@ import {Common} from './model'; export const common: Common = { copyright: '© {{currentYear}} WSO2 LLC.', + error: "Quelque chose s'est mal passé. Veuillez réessayer.", or: 'OU', 'prefix.register': "Vous n'avez pas de compte?", 'privacy.policy': 'Politique de confidentialité', diff --git a/packages/core/src/i18n/screens/common/model.ts b/packages/core/src/i18n/screens/common/model.ts index 02204b98..d2aaadc0 100644 --- a/packages/core/src/i18n/screens/common/model.ts +++ b/packages/core/src/i18n/screens/common/model.ts @@ -21,6 +21,7 @@ */ export interface Common { copyright: string; + error: string; or: string; 'prefix.register': string; 'privacy.policy': string; diff --git a/packages/core/src/i18n/screens/keys.ts b/packages/core/src/i18n/screens/keys.ts index ec3aed78..1d380181 100644 --- a/packages/core/src/i18n/screens/keys.ts +++ b/packages/core/src/i18n/screens/keys.ts @@ -22,6 +22,7 @@ interface Keys { common: { copyright: string; + error: string; or: string; prefix: { register: string; @@ -76,6 +77,7 @@ interface Keys { remember: { me: string; }; + retry: string; username: string; }; totp: { @@ -102,6 +104,7 @@ interface Keys { export const keys: Keys = { common: { copyright: 'common.copyright', + error: 'common.error', or: 'common.or', prefix: { register: 'common.prefix.register', @@ -156,6 +159,7 @@ export const keys: Keys = { remember: { me: 'login.remember.me', }, + retry: 'login.retry', username: 'login.username', }, totp: { diff --git a/packages/core/src/i18n/screens/login/en-US.ts b/packages/core/src/i18n/screens/login/en-US.ts index 173742de..dff3ce0d 100644 --- a/packages/core/src/i18n/screens/login/en-US.ts +++ b/packages/core/src/i18n/screens/login/en-US.ts @@ -25,5 +25,6 @@ export const login: Login = { 'login.heading': 'Sign In', password: 'Password', 'remember.me': 'Remember me on this computer', + retry: 'Login failed! Please check your username and password and try again.', username: 'Username', }; diff --git a/packages/core/src/i18n/screens/login/fr-FR.ts b/packages/core/src/i18n/screens/login/fr-FR.ts index f5277a65..571b8c15 100644 --- a/packages/core/src/i18n/screens/login/fr-FR.ts +++ b/packages/core/src/i18n/screens/login/fr-FR.ts @@ -25,5 +25,6 @@ export const login: Login = { 'login.heading': 'Se connecter', password: 'Mot de passe', 'remember.me': 'Se souvenir de moi sur cet ordinateur', + retry: "Échec de la connexion! Veuillez vérifier votre nom d'utilisateur et votre mot de passe et réessayer.", username: "Nom d'utilisateur", }; diff --git a/packages/core/src/i18n/screens/login/model.ts b/packages/core/src/i18n/screens/login/model.ts index b550eb90..e9e51dc7 100644 --- a/packages/core/src/i18n/screens/login/model.ts +++ b/packages/core/src/i18n/screens/login/model.ts @@ -26,5 +26,6 @@ export interface Login { 'login.heading': string; password: string; 'remember.me': string; + retry: string; username: string; } diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index c21088eb..bc648257 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -94,7 +94,7 @@ const SignIn: FC = (props: SignInProps) => { setIsComponentLoading(false); }) .catch((error: Error) => { - setAlert({alertType: {error: true}, message: error.message}); + setAlert({alertType: {error: true}, key: keys.common.error}); setIsComponentLoading(false); throw new AsgardeoUIException('REACT_UI-SIGN_IN-SI-SE01', 'Authorization failed', error.stack); }); @@ -105,6 +105,8 @@ const SignIn: FC = (props: SignInProps) => { * @param {any} authParams - The authentication parameters. */ const handleAuthenticate = async (authenticatorId: string, authParams?: {[key: string]: string}): Promise => { + setAlert(undefined); + if (authResponse === undefined) { throw new AsgardeoUIException('REACT_UI-SIGN_IN-HA-IV02', 'Auth response is undefined.'); } @@ -173,7 +175,7 @@ const SignIn: FC = (props: SignInProps) => { }); // TODO: Move this to core: and take from i18n - setAlert({alertType: {error: true}, message: 'authentication failed'}); + setAlert({alertType: {error: true}, key: keys.login.retry}); } else { setAuthResponse(resp); setShowSelfSignUp(false); diff --git a/packages/react/src/components/SignIn/fragments/BasicAuth.tsx b/packages/react/src/components/SignIn/fragments/BasicAuth.tsx index 1417754d..012f6481 100644 --- a/packages/react/src/components/SignIn/fragments/BasicAuth.tsx +++ b/packages/react/src/components/SignIn/fragments/BasicAuth.tsx @@ -65,7 +65,7 @@ const BasicAuth = ({ {t(keys.login.login.heading)} - {alert && {alert.message}} + {alert && {t(alert.key)}} - Don't have an account? + {t(keys.common.prefix.register)} - Register + {t(keys.common.register)} )} - OR + {t(keys.common.or)} {renderLoginOptions} diff --git a/packages/react/src/components/SignIn/fragments/EmailOtp.tsx b/packages/react/src/components/SignIn/fragments/EmailOtp.tsx index f8b482ee..ab6718cb 100644 --- a/packages/react/src/components/SignIn/fragments/EmailOtp.tsx +++ b/packages/react/src/components/SignIn/fragments/EmailOtp.tsx @@ -54,7 +54,7 @@ const EmailOtp = ({alert, brandingProps, authenticator, handleAuthenticate}: Ema {t(keys.emailOtp.email.otp.heading)} - {alert && {alert.message}} + {alert && {alert.key}} {t(keys.totp.enter.verification.code.got.by.device)} - {alert && {alert.message}} + {alert && {alert.key}} diff --git a/packages/react/src/models/basic-auth-props.ts b/packages/react/src/models/basic-auth-props.ts index 0fc09aad..e7f4feeb 100644 --- a/packages/react/src/models/basic-auth-props.ts +++ b/packages/react/src/models/basic-auth-props.ts @@ -18,15 +18,10 @@ import {Authenticator, BrandingProps} from '@asgardeo/js-ui-core'; import {ReactElement} from 'react'; +import {AlertType} from './sign-in'; interface BasicAuthProps { - alert?: { - alertType: - | {error?: boolean; info?: never; warning?: never} - | {error?: never; info?: boolean; warning?: never} - | {error?: never; infor?: never; warning?: boolean}; - message: string; - }; + alert?: AlertType; authenticator: Authenticator; brandingProps?: BrandingProps; handleAuthenticate: Function; diff --git a/packages/react/src/models/sign-in.ts b/packages/react/src/models/sign-in.ts index cf1ad51d..99c61414 100644 --- a/packages/react/src/models/sign-in.ts +++ b/packages/react/src/models/sign-in.ts @@ -27,5 +27,5 @@ export type AlertType = { | {error?: boolean; info?: never; warning?: never} | {error?: never; info?: boolean; warning?: never} | {error?: never; infor?: never; warning?: boolean}; - message: string; + key: string; }; From 90ae0da59b8308ddc89249ee47b24116e1d4936b Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 15:37:04 +0530 Subject: [PATCH 37/51] feat(react): :lipstick: update border radius of paper --- packages/react/src/theme/generate-theme-sign-in.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react/src/theme/generate-theme-sign-in.ts b/packages/react/src/theme/generate-theme-sign-in.ts index ba87e142..948b254c 100644 --- a/packages/react/src/theme/generate-theme-sign-in.ts +++ b/packages/react/src/theme/generate-theme-sign-in.ts @@ -106,6 +106,7 @@ const generateThemeSignIn: (brandingPreferenceTheme: BrandingPreferenceTheme) => }, background: brandingTheme?.colors?.background?.surface?.main, borderColor: brandingTheme?.colors?.outlined?.default, + borderRadius: brandingTheme?.loginBox?.border?.borderRadius, }, }, }, From 22764b81315f331ccd9fffc812776df608d609b2 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 22:21:39 +0530 Subject: [PATCH 38/51] feat(sample-app): :wrench: add config for asgardeo --- packages/react/src/models/i18n.ts | 2 +- recipes/react-vite/src/main.tsx | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/react/src/models/i18n.ts b/packages/react/src/models/i18n.ts index 343a78ff..36513c3d 100644 --- a/packages/react/src/models/i18n.ts +++ b/packages/react/src/models/i18n.ts @@ -27,7 +27,7 @@ export type I18nLocalization = export interface SetTranslationsProps { componentLocaleOverride?: string; componentTextOverrides?: BrandingPreferenceTextProps; - screen: ScreenType; + screen?: ScreenType; } export interface I18n { setTranslations: (props: SetTranslationsProps) => Promise; diff --git a/recipes/react-vite/src/main.tsx b/recipes/react-vite/src/main.tsx index 318bae98..345e2d5a 100644 --- a/recipes/react-vite/src/main.tsx +++ b/recipes/react-vite/src/main.tsx @@ -1,6 +1,5 @@ import ReactDOM from "react-dom/client"; import App from "./App.tsx"; -import React from "react"; import { AsgardeoProvider, UIAuthConfig } from "../../../packages/react/src"; //TODO: temporary const config: UIAuthConfig = { @@ -11,8 +10,15 @@ const config: UIAuthConfig = { enableConsoleTextBranding: true, }; +const devConfig: UIAuthConfig = { + baseUrl: "https://dev.api.asgardeo.io/t/movinorg", + clientID: "kH5OfXOvpGLOvp1iAw4zQmNvv4oa", + scope: ["openid", "internal_login", "profile"], + signInRedirectURL: "https://localhost:5173", +}; + ReactDOM.createRoot(document.getElementById("root")!).render( - + ); From ee323343ced090229f14e7f7e962156b28b481a1 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Wed, 15 May 2024 22:37:20 +0530 Subject: [PATCH 39/51] feat(react): :lipstick: add styling for circular progress component --- packages/react/src/components/SignIn/sign-in.scss | 14 ++++++++++++++ packages/react/src/theme/generate-theme-sign-in.ts | 7 +++++++ packages/react/src/theme/generate-theme.ts | 7 +++++++ recipes/react-vite/src/App.css | 1 - 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/packages/react/src/components/SignIn/sign-in.scss b/packages/react/src/components/SignIn/sign-in.scss index 9d79e662..d5f6bc24 100644 --- a/packages/react/src/components/SignIn/sign-in.scss +++ b/packages/react/src/components/SignIn/sign-in.scss @@ -17,6 +17,9 @@ */ .asgardeo-sign-in { + min-width: 350px; + min-height: 200px; + .email-otp-resend-button { margin-top: 0; } @@ -29,3 +32,14 @@ padding-bottom: 64px; } } + +.circular-progress-holder { + min-height: 0.7*100vh; + display: flex; + justify-content: center; + align-items: center; + + .circular-progress { + color: rgb(214, 211, 211); + } +} diff --git a/packages/react/src/theme/generate-theme-sign-in.ts b/packages/react/src/theme/generate-theme-sign-in.ts index 948b254c..a0e5729c 100644 --- a/packages/react/src/theme/generate-theme-sign-in.ts +++ b/packages/react/src/theme/generate-theme-sign-in.ts @@ -61,6 +61,13 @@ const generateThemeSignIn: (brandingPreferenceTheme: BrandingPreferenceTheme) => }, }, }, + MuiCircularProgress: { + styleOverrides: { + root: { + color: `${brandingTheme?.colors?.primary?.main} !important`, + }, + }, + }, MuiFormControl: { styleOverrides: { root: { diff --git a/packages/react/src/theme/generate-theme.ts b/packages/react/src/theme/generate-theme.ts index 1aed12ed..f25efcad 100644 --- a/packages/react/src/theme/generate-theme.ts +++ b/packages/react/src/theme/generate-theme.ts @@ -82,6 +82,13 @@ const generateTheme: (brandingPreferenceTheme: BrandingPreferenceTheme) => Theme }, }, }, + MuiCircularProgress: { + styleOverrides: { + root: { + color: `${brandingTheme?.colors?.primary?.main} !important`, + }, + }, + }, MuiFormControl: { styleOverrides: { root: { diff --git a/recipes/react-vite/src/App.css b/recipes/react-vite/src/App.css index 5b2e3cda..03069eec 100644 --- a/recipes/react-vite/src/App.css +++ b/recipes/react-vite/src/App.css @@ -1,6 +1,5 @@ #root { display: flex; justify-content: center; - padding: 2rem; text-align: center; } From 0714b382c3ea0f0da5536c67b693667ae31fc43c Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Thu, 16 May 2024 04:49:14 +0530 Subject: [PATCH 40/51] feat(react): :sparkles: add sms otp --- .../react/src/components/SignIn/SignIn.tsx | 17 ++++ .../components/SignIn/fragments/SmsOtp.tsx | 77 +++++++++++++++++++ recipes/react-vite/src/main.tsx | 2 +- 3 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 packages/react/src/components/SignIn/fragments/SmsOtp.tsx diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index bc648257..56854d7e 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -37,6 +37,7 @@ import {FC, ReactElement, useContext, useEffect, useState} from 'react'; import BasicAuth from './fragments/BasicAuth'; import EmailOtp from './fragments/EmailOtp'; import LoginOptionsBox from './fragments/LoginOptionsBox'; +import SmsOtp from './fragments/SmsOtp'; import Totp from './fragments/Totp'; import AsgardeoContext from '../../contexts/asgardeo-context'; import BrandingPreferenceContext from '../../contexts/branding-preference-context'; @@ -252,6 +253,22 @@ const SignIn: FC = (props: SignInProps) => { /> ); } + + if ( + // TODO: change after api based auth gets fixed + new SPACryptoUtils() + .base64URLDecode(authResponse.nextStep.authenticators[0].authenticatorId) + .split(':')[0] === 'sms-otp-authenticator' + ) { + return ( + + ); + } } /** diff --git a/packages/react/src/components/SignIn/fragments/SmsOtp.tsx b/packages/react/src/components/SignIn/fragments/SmsOtp.tsx new file mode 100644 index 00000000..28b1f0b5 --- /dev/null +++ b/packages/react/src/components/SignIn/fragments/SmsOtp.tsx @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {ScreenType, keys} from '@asgardeo/js-ui-core'; +import {CircularProgress} from '@oxygen-ui/react'; +import {ReactElement, useState} from 'react'; +import useTranslations from '../../../hooks/use-translations'; +import EmailOtpProps from '../../../models/email-otp-props'; +import {SignIn as UISignIn} from '../../../oxygen-ui-react-auth-components'; + +const SmsOtp = ({alert, brandingProps, authenticator, handleAuthenticate}: EmailOtpProps): ReactElement => { + const [otp, setOtp] = useState(); + + const {isLoading, t} = useTranslations({ + componentLocaleOverride: brandingProps?.locale, + componentTextOverrides: brandingProps?.preference?.text, + screen: ScreenType.EmailOTP, + }); + + if (isLoading) { + return ( +
+ +
+ ); + } + + return ( + + {t(keys.emailOtp.email.otp.heading)} + + Enter the code sent to your mobile phone + + {alert && {alert.key}} + + + + { + handleAuthenticate(authenticator.authenticatorId, {OTPCode: otp}); + setOtp(''); + }} + > + {t(keys.emailOtp.continue)} + + + handleAuthenticate(authenticator.authenticatorId)} + color="secondary" + variant="contained" + > + {t(keys.emailOtp.resend.code)} + + + ); +}; + +export default SmsOtp; diff --git a/recipes/react-vite/src/main.tsx b/recipes/react-vite/src/main.tsx index 345e2d5a..b4319810 100644 --- a/recipes/react-vite/src/main.tsx +++ b/recipes/react-vite/src/main.tsx @@ -18,7 +18,7 @@ const devConfig: UIAuthConfig = { }; ReactDOM.createRoot(document.getElementById("root")!).render( - + ); From 30a94594a6fd3407d37e89e13e4eff72dc021959 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Thu, 16 May 2024 05:17:46 +0530 Subject: [PATCH 41/51] feat(core): :globe_with_meridians: add i18n for sms otp --- packages/core/src/i18n/screens/keys.ts | 26 ++++++++++++++++++ .../core/src/i18n/screens/smsOtp/en-US.ts | 26 ++++++++++++++++++ .../core/src/i18n/screens/smsOtp/model.ts | 27 +++++++++++++++++++ packages/core/src/models/screen-type.ts | 1 + .../components/SignIn/fragments/SmsOtp.tsx | 10 +++---- 5 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 packages/core/src/i18n/screens/smsOtp/en-US.ts create mode 100644 packages/core/src/i18n/screens/smsOtp/model.ts diff --git a/packages/core/src/i18n/screens/keys.ts b/packages/core/src/i18n/screens/keys.ts index 1d380181..52f34777 100644 --- a/packages/core/src/i18n/screens/keys.ts +++ b/packages/core/src/i18n/screens/keys.ts @@ -80,6 +80,19 @@ interface Keys { retry: string; username: string; }; + smsOtp: { + continue: string; + resend: { + code: string; + }; + + sms: { + otp: { + heading: string; + subheading: string; + }; + }; + }; totp: { continue: string; enroll: { @@ -162,6 +175,19 @@ export const keys: Keys = { retry: 'login.retry', username: 'login.username', }, + smsOtp: { + continue: 'smsOtp.continue', + resend: { + code: 'smsOtp.resend.code', + }, + + sms: { + otp: { + heading: 'smsOtp.sms.otp.heading', + subheading: 'smsOtp.sms.otp.subheading', + }, + }, + }, totp: { continue: 'totp.continue', enroll: { diff --git a/packages/core/src/i18n/screens/smsOtp/en-US.ts b/packages/core/src/i18n/screens/smsOtp/en-US.ts new file mode 100644 index 00000000..39078995 --- /dev/null +++ b/packages/core/src/i18n/screens/smsOtp/en-US.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {SmsOTP} from './model'; + +export const smsOtp: SmsOTP = { + continue: 'Continue', + 'resend.code': 'Resend code', + 'sms.otp.heading': 'OTP Verification', + 'sms.otp.subheading': 'Enter the code sent to your mobile device.', +}; diff --git a/packages/core/src/i18n/screens/smsOtp/model.ts b/packages/core/src/i18n/screens/smsOtp/model.ts new file mode 100644 index 00000000..b44b4646 --- /dev/null +++ b/packages/core/src/i18n/screens/smsOtp/model.ts @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * Interface for the TOTP text. + */ +export interface SmsOTP { + continue: string; + 'resend.code': string; + 'sms.otp.heading': string; + 'sms.otp.subheading': string; +} diff --git a/packages/core/src/models/screen-type.ts b/packages/core/src/models/screen-type.ts index cb18d45a..078ee062 100644 --- a/packages/core/src/models/screen-type.ts +++ b/packages/core/src/models/screen-type.ts @@ -23,5 +23,6 @@ export enum ScreenType { Common = 'common', EmailOTP = 'emailOtp', Login = 'login', + SMSOTP = 'smsOtp', TOTP = 'totp', } diff --git a/packages/react/src/components/SignIn/fragments/SmsOtp.tsx b/packages/react/src/components/SignIn/fragments/SmsOtp.tsx index 28b1f0b5..518d8a8f 100644 --- a/packages/react/src/components/SignIn/fragments/SmsOtp.tsx +++ b/packages/react/src/components/SignIn/fragments/SmsOtp.tsx @@ -29,7 +29,7 @@ const SmsOtp = ({alert, brandingProps, authenticator, handleAuthenticate}: Email const {isLoading, t} = useTranslations({ componentLocaleOverride: brandingProps?.locale, componentTextOverrides: brandingProps?.preference?.text, - screen: ScreenType.EmailOTP, + screen: ScreenType.SMSOTP, }); if (isLoading) { @@ -42,9 +42,9 @@ const SmsOtp = ({alert, brandingProps, authenticator, handleAuthenticate}: Email return ( - {t(keys.emailOtp.email.otp.heading)} + {t(keys.smsOtp.sms.otp.heading)} - Enter the code sent to your mobile phone + {t(keys.smsOtp.sms.otp.subheading)} {alert && {alert.key}} @@ -59,7 +59,7 @@ const SmsOtp = ({alert, brandingProps, authenticator, handleAuthenticate}: Email setOtp(''); }} > - {t(keys.emailOtp.continue)} + {t(keys.smsOtp.continue)} - {t(keys.emailOtp.resend.code)} + {t(keys.smsOtp.resend.code)} ); From 1460277dd783a791785dba60101e5996eacaf4c3 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Thu, 16 May 2024 05:19:33 +0530 Subject: [PATCH 42/51] style(react): :art: fix format in css --- packages/react/src/components/SignIn/sign-in.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/components/SignIn/sign-in.scss b/packages/react/src/components/SignIn/sign-in.scss index d5f6bc24..c24aa658 100644 --- a/packages/react/src/components/SignIn/sign-in.scss +++ b/packages/react/src/components/SignIn/sign-in.scss @@ -40,6 +40,6 @@ align-items: center; .circular-progress { - color: rgb(214, 211, 211); + color: rgb(214 211 211); } } From 2b5259c4bca610a221e8d7e23653046bed88f834 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Thu, 16 May 2024 05:31:48 +0530 Subject: [PATCH 43/51] feat(react): :sparkles: add SignedIn component --- .../src/components/SignedIn/SignedIn.tsx | 33 +++++++++++++++++++ .../react/src/components/public-components.ts | 1 + recipes/react-vite/src/App.css | 2 ++ recipes/react-vite/src/App.tsx | 6 +++- 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 packages/react/src/components/SignedIn/SignedIn.tsx diff --git a/packages/react/src/components/SignedIn/SignedIn.tsx b/packages/react/src/components/SignedIn/SignedIn.tsx new file mode 100644 index 00000000..fc405ce0 --- /dev/null +++ b/packages/react/src/components/SignedIn/SignedIn.tsx @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {FC, PropsWithChildren, ReactElement} from 'react'; +import useAuthentication from '../../hooks/use-authentication'; + +interface SignedPropsInterface { + fallback?: ReactElement; +} + +const SignedIn: FC> = (props: PropsWithChildren) => { + const {fallback, children} = props; + const {isAuthenticated} = useAuthentication(); + + return isAuthenticated ? children : fallback ?? null; +}; + +export default SignedIn; diff --git a/packages/react/src/components/public-components.ts b/packages/react/src/components/public-components.ts index ebe7d160..37347967 100644 --- a/packages/react/src/components/public-components.ts +++ b/packages/react/src/components/public-components.ts @@ -17,3 +17,4 @@ */ export {default as SignIn} from './SignIn/SignIn'; +export {default as SignedIn} from './SignedIn/SignedIn'; diff --git a/recipes/react-vite/src/App.css b/recipes/react-vite/src/App.css index 03069eec..2eb1147c 100644 --- a/recipes/react-vite/src/App.css +++ b/recipes/react-vite/src/App.css @@ -1,5 +1,7 @@ #root { display: flex; + flex-direction: column; justify-content: center; + align-items: center; text-align: center; } diff --git a/recipes/react-vite/src/App.tsx b/recipes/react-vite/src/App.tsx index a268ffbf..a836ec0f 100644 --- a/recipes/react-vite/src/App.tsx +++ b/recipes/react-vite/src/App.tsx @@ -1,10 +1,14 @@ import "./App.css"; -import { SignIn } from "../../../packages/react/src"; // ToDO: temporary +import { SignIn, SignedIn } from "../../../packages/react/src"; // ToDO: temporary function App() { return ( <> + + Fallback content
}> +
Protected content
+ ); } From e93accf2da83bbb280fb3a878a627771677708d4 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Thu, 16 May 2024 05:36:17 +0530 Subject: [PATCH 44/51] feat(react): :sparkles: add SignedOut component --- .../src/components/SignedIn/SignedIn.tsx | 9 ++---- .../src/components/SignedOut/SignedOut.tsx | 30 +++++++++++++++++++ .../react/src/components/public-components.ts | 1 + packages/react/src/models/signed-props.ts | 25 ++++++++++++++++ recipes/react-vite/src/App.tsx | 6 +++- 5 files changed, 64 insertions(+), 7 deletions(-) create mode 100644 packages/react/src/components/SignedOut/SignedOut.tsx create mode 100644 packages/react/src/models/signed-props.ts diff --git a/packages/react/src/components/SignedIn/SignedIn.tsx b/packages/react/src/components/SignedIn/SignedIn.tsx index fc405ce0..27e84807 100644 --- a/packages/react/src/components/SignedIn/SignedIn.tsx +++ b/packages/react/src/components/SignedIn/SignedIn.tsx @@ -16,14 +16,11 @@ * under the License. */ -import {FC, PropsWithChildren, ReactElement} from 'react'; +import {FC, PropsWithChildren} from 'react'; import useAuthentication from '../../hooks/use-authentication'; +import SignedProps from '../../models/signed-props'; -interface SignedPropsInterface { - fallback?: ReactElement; -} - -const SignedIn: FC> = (props: PropsWithChildren) => { +const SignedIn: FC> = (props: PropsWithChildren) => { const {fallback, children} = props; const {isAuthenticated} = useAuthentication(); diff --git a/packages/react/src/components/SignedOut/SignedOut.tsx b/packages/react/src/components/SignedOut/SignedOut.tsx new file mode 100644 index 00000000..c80d08a2 --- /dev/null +++ b/packages/react/src/components/SignedOut/SignedOut.tsx @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {FC, PropsWithChildren} from 'react'; +import useAuthentication from '../../hooks/use-authentication'; +import SignedProps from '../../models/signed-props'; + +const SignedOut: FC> = (props: PropsWithChildren) => { + const {fallback, children} = props; + const {isAuthenticated} = useAuthentication(); + + return !isAuthenticated ? children : fallback ?? null; +}; + +export default SignedOut; diff --git a/packages/react/src/components/public-components.ts b/packages/react/src/components/public-components.ts index 37347967..4dc6cb96 100644 --- a/packages/react/src/components/public-components.ts +++ b/packages/react/src/components/public-components.ts @@ -18,3 +18,4 @@ export {default as SignIn} from './SignIn/SignIn'; export {default as SignedIn} from './SignedIn/SignedIn'; +export {default as SignedOut} from './SignedOut/SignedOut'; diff --git a/packages/react/src/models/signed-props.ts b/packages/react/src/models/signed-props.ts new file mode 100644 index 00000000..acc02059 --- /dev/null +++ b/packages/react/src/models/signed-props.ts @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {ReactElement} from 'react'; + +interface SignedProps { + fallback?: ReactElement; +} + +export default SignedProps; diff --git a/recipes/react-vite/src/App.tsx b/recipes/react-vite/src/App.tsx index a836ec0f..12ae8a87 100644 --- a/recipes/react-vite/src/App.tsx +++ b/recipes/react-vite/src/App.tsx @@ -1,5 +1,5 @@ import "./App.css"; -import { SignIn, SignedIn } from "../../../packages/react/src"; // ToDO: temporary +import { SignIn, SignedIn, SignedOut } from "../../../packages/react/src"; // ToDO: temporary function App() { return ( @@ -9,6 +9,10 @@ function App() { Fallback content
}>
Protected content
+ + signedout fallback
}> +
Public content
+ ); } From 55cd68763513c37b0b762935a15122ba1eeae1b9 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Thu, 16 May 2024 07:32:54 +0530 Subject: [PATCH 45/51] feat(react): :sparkles: add SignInButton component --- .../components/SignInButton/SignInButton.tsx | 58 +++++++++++++++++++ .../SignInButton/sign-in-button.scss | 46 +++++++++++++++ .../react/src/components/public-components.ts | 1 + recipes/react-vite/src/App.tsx | 8 ++- 4 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 packages/react/src/components/SignInButton/SignInButton.tsx create mode 100644 packages/react/src/components/SignInButton/sign-in-button.scss diff --git a/packages/react/src/components/SignInButton/SignInButton.tsx b/packages/react/src/components/SignInButton/SignInButton.tsx new file mode 100644 index 00000000..2750f202 --- /dev/null +++ b/packages/react/src/components/SignInButton/SignInButton.tsx @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {Box, Button} from '@oxygen-ui/react'; +import React, {ReactElement, useState} from 'react'; +import './sign-in-button.scss'; +import SignIn from '../SignIn/SignIn'; + +const SignInButton = ({customComponent}: {customComponent?: ReactElement}): ReactElement => { + const [modalVisible, setModalVisible] = useState(false); + + const openModal = (): void => { + setModalVisible(true); + }; + + const closeModal = (): void => { + setModalVisible(false); + }; + + return ( +
+ {customComponent ? ( + React.cloneElement(customComponent, { + onClick: openModal, + }) + ) : ( + + )} + + {modalVisible && ( + + + + )} + + {modalVisible && } +
+ ); +}; + +export default SignInButton; diff --git a/packages/react/src/components/SignInButton/sign-in-button.scss b/packages/react/src/components/SignInButton/sign-in-button.scss new file mode 100644 index 00000000..0138146c --- /dev/null +++ b/packages/react/src/components/SignInButton/sign-in-button.scss @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +.asgardeo { + .asgardeo-sign-in-button { + color: var(--oxygen-palette-text-primary); + } + + .popup-box { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 1000; + min-height: 65%; + min-width: 35%; + display: flex; + justify-content: center; + align-items: center; + } + + .popup-box-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgb(0 0 0 / 76.8%); + z-index: 100; + } +} diff --git a/packages/react/src/components/public-components.ts b/packages/react/src/components/public-components.ts index 4dc6cb96..e3d8d3e2 100644 --- a/packages/react/src/components/public-components.ts +++ b/packages/react/src/components/public-components.ts @@ -19,3 +19,4 @@ export {default as SignIn} from './SignIn/SignIn'; export {default as SignedIn} from './SignedIn/SignedIn'; export {default as SignedOut} from './SignedOut/SignedOut'; +export {default as SignInButton} from './SignInButton/SignInButton'; diff --git a/recipes/react-vite/src/App.tsx b/recipes/react-vite/src/App.tsx index 12ae8a87..4c277f6b 100644 --- a/recipes/react-vite/src/App.tsx +++ b/recipes/react-vite/src/App.tsx @@ -1,5 +1,10 @@ import "./App.css"; -import { SignIn, SignedIn, SignedOut } from "../../../packages/react/src"; // ToDO: temporary +import { + SignIn, + SignedIn, + SignedOut, + SignInButton, +} from "../../../packages/react/src"; // ToDO: temporary function App() { return ( @@ -12,6 +17,7 @@ function App() { signedout fallback}>
Public content
+
); From 144321161db750136cf03be9cb535f665c244af4 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Thu, 16 May 2024 07:49:17 +0530 Subject: [PATCH 46/51] feat(react): :sparkles: add sign out button and improve styling in sing in popup box --- .../SignInButton/sign-in-button.scss | 16 +++++++++ .../SignOutButton/SignOutButton.tsx | 35 +++++++++++++++++++ .../react/src/components/public-components.ts | 1 + recipes/react-vite/src/App.tsx | 4 ++- 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 packages/react/src/components/SignOutButton/SignOutButton.tsx diff --git a/packages/react/src/components/SignInButton/sign-in-button.scss b/packages/react/src/components/SignInButton/sign-in-button.scss index 0138146c..7a59663c 100644 --- a/packages/react/src/components/SignInButton/sign-in-button.scss +++ b/packages/react/src/components/SignInButton/sign-in-button.scss @@ -21,6 +21,10 @@ color: var(--oxygen-palette-text-primary); } + .OxygenSignInImage { + height: 45px; + } + .popup-box { position: fixed; top: 50%; @@ -29,9 +33,21 @@ z-index: 1000; min-height: 65%; min-width: 35%; + max-height: 100%; display: flex; justify-content: center; align-items: center; + overflow: auto; + padding-top: 40px; + + /* Hide scrollbar for Chrome, Safari and Opera */ + ::-webkit-scrollbar { + display: none; + } + + /* Hide scrollbar for IE, Edge and Firefox */ + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ } .popup-box-overlay { diff --git a/packages/react/src/components/SignOutButton/SignOutButton.tsx b/packages/react/src/components/SignOutButton/SignOutButton.tsx new file mode 100644 index 00000000..6ef4c2fc --- /dev/null +++ b/packages/react/src/components/SignOutButton/SignOutButton.tsx @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {Button} from '@oxygen-ui/react'; +import {ReactElement} from 'react'; +import useAuthentication from '../../hooks/use-authentication'; + +const SignOutButton = (): ReactElement => { + const {signOut} = useAuthentication(); + + return ( +
+ +
+ ); +}; + +export default SignOutButton; diff --git a/packages/react/src/components/public-components.ts b/packages/react/src/components/public-components.ts index e3d8d3e2..5e518d19 100644 --- a/packages/react/src/components/public-components.ts +++ b/packages/react/src/components/public-components.ts @@ -20,3 +20,4 @@ export {default as SignIn} from './SignIn/SignIn'; export {default as SignedIn} from './SignedIn/SignedIn'; export {default as SignedOut} from './SignedOut/SignedOut'; export {default as SignInButton} from './SignInButton/SignInButton'; +export {default as SignOutButton} from './SignOutButton/SignOutButton'; diff --git a/recipes/react-vite/src/App.tsx b/recipes/react-vite/src/App.tsx index 4c277f6b..6125c022 100644 --- a/recipes/react-vite/src/App.tsx +++ b/recipes/react-vite/src/App.tsx @@ -4,6 +4,7 @@ import { SignedIn, SignedOut, SignInButton, + SignOutButton, } from "../../../packages/react/src"; // ToDO: temporary function App() { @@ -13,11 +14,12 @@ function App() { Fallback content}>
Protected content
+
signedout fallback}>
Public content
- +
); From 16a7c5d3e4f95220a4555994fb66c727d698de8e Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Thu, 16 May 2024 07:51:09 +0530 Subject: [PATCH 47/51] docs(react): :memo: add js docs for sing in and sign out components --- .../react/src/components/SignInButton/SignInButton.tsx | 7 +++++++ .../react/src/components/SignOutButton/SignOutButton.tsx | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/packages/react/src/components/SignInButton/SignInButton.tsx b/packages/react/src/components/SignInButton/SignInButton.tsx index 2750f202..b8fa2f78 100644 --- a/packages/react/src/components/SignInButton/SignInButton.tsx +++ b/packages/react/src/components/SignInButton/SignInButton.tsx @@ -21,6 +21,13 @@ import React, {ReactElement, useState} from 'react'; import './sign-in-button.scss'; import SignIn from '../SignIn/SignIn'; +/** + * SignInButton component. + * + * @param {Object} props - Component props. + * @param {ReactElement} props.customComponent - Optional custom component to be rendered. + * @returns {ReactElement} Rendered SignInButton component. + */ const SignInButton = ({customComponent}: {customComponent?: ReactElement}): ReactElement => { const [modalVisible, setModalVisible] = useState(false); diff --git a/packages/react/src/components/SignOutButton/SignOutButton.tsx b/packages/react/src/components/SignOutButton/SignOutButton.tsx index 6ef4c2fc..bd529209 100644 --- a/packages/react/src/components/SignOutButton/SignOutButton.tsx +++ b/packages/react/src/components/SignOutButton/SignOutButton.tsx @@ -20,6 +20,13 @@ import {Button} from '@oxygen-ui/react'; import {ReactElement} from 'react'; import useAuthentication from '../../hooks/use-authentication'; +/** + * SignOutButton component. + * + * This component renders a sign out button. When clicked, it triggers the sign out process. + * + * @returns {ReactElement} Rendered SignOutButton component. + */ const SignOutButton = (): ReactElement => { const {signOut} = useAuthentication(); From ec76186a6c8c9f51b2107b9b9e1e406bdb6211ea Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Thu, 16 May 2024 09:34:30 +0530 Subject: [PATCH 48/51] fix: fix sign out function and use hooks in sample app --- packages/core/src/api/sign-out.ts | 10 +++++++--- .../react/src/hooks/use-authentication.ts | 7 ++++--- recipes/react-vite/src/App.tsx | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/packages/core/src/api/sign-out.ts b/packages/core/src/api/sign-out.ts index c5f4b771..54235386 100644 --- a/packages/core/src/api/sign-out.ts +++ b/packages/core/src/api/sign-out.ts @@ -18,6 +18,7 @@ import {AuthClient, ResponseMode} from '../auth-client'; import AsgardeoUIException from '../exception'; +import {UIAuthClient} from '../models/auth-config'; /** * Sign out the user. @@ -45,9 +46,11 @@ const signOut = async (): Promise => { const formBody: URLSearchParams = new URLSearchParams(); + const authClient: UIAuthClient = AuthClient.getInstance(); + try { - formBody.append('id_token_hint', await AuthClient.getInstance().getIDToken()); - formBody.append('client_id', (await AuthClient.getInstance().getDataLayer().getConfigData()).clientID); + formBody.append('id_token_hint', await authClient.getIDToken()); + formBody.append('client_id', (await authClient.getDataLayer().getConfigData()).clientID); formBody.append('response_mode', ResponseMode.direct); } catch (error) { throw new AsgardeoUIException('JS_UI_CORE-SIGNOUT-SO-IV', 'Failed to build the body of the signout request.'); @@ -60,7 +63,8 @@ const signOut = async (): Promise => { }; try { - signOutUrl = (await AuthClient.getInstance().getOIDCServiceEndpoints()).endSessionEndpoint; + const {endSessionEndpoint} = await authClient.getOIDCServiceEndpoints(); + signOutUrl = endSessionEndpoint; } catch (error) { throw new AsgardeoUIException('JS_UI_CORE-SIGNOUT-SO-NF', 'Failed to retrieve the sign out endpoint.'); } diff --git a/packages/react/src/hooks/use-authentication.ts b/packages/react/src/hooks/use-authentication.ts index 701093bc..f31d9352 100644 --- a/packages/react/src/hooks/use-authentication.ts +++ b/packages/react/src/hooks/use-authentication.ts @@ -35,9 +35,10 @@ const useAuthentication = (): UseAuthentication => { const {user, isAuthenticated, accessToken} = contextValue; const signOut: () => void = () => { - signOutApiCall(); - sessionStorage.clear(); - window.location.reload(); + signOutApiCall().then(() => { + sessionStorage.clear(); + window.location.reload(); + }); }; return {accessToken, isAuthenticated, signOut, user}; diff --git a/recipes/react-vite/src/App.tsx b/recipes/react-vite/src/App.tsx index 6125c022..79b2b171 100644 --- a/recipes/react-vite/src/App.tsx +++ b/recipes/react-vite/src/App.tsx @@ -5,9 +5,12 @@ import { SignedOut, SignInButton, SignOutButton, + useAuthentication, } from "../../../packages/react/src"; // ToDO: temporary function App() { + const {user, accessToken} = useAuthentication(); + console.log(user); return ( <> @@ -15,6 +18,22 @@ function App() { Fallback content}>
Protected content
+
+ {accessToken} + {user && ( + <> + { +
" + ), + }} + /> + } + + )}
signedout fallback
}> From d16d41e7d8bbb10aceff9121e724e1f87324dd7e Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Thu, 16 May 2024 10:52:54 +0530 Subject: [PATCH 49/51] fix(react): :bug: fix sign in divider component rendering --- packages/react/src/components/SignIn/fragments/BasicAuth.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/components/SignIn/fragments/BasicAuth.tsx b/packages/react/src/components/SignIn/fragments/BasicAuth.tsx index 012f6481..a70ea66a 100644 --- a/packages/react/src/components/SignIn/fragments/BasicAuth.tsx +++ b/packages/react/src/components/SignIn/fragments/BasicAuth.tsx @@ -111,7 +111,7 @@ const BasicAuth = ({ )} - {t(keys.common.or)} + {renderLoginOptions.length !== 0 && {t(keys.common.or)} } {renderLoginOptions}
From 2eb35c8f23065a83c07d3028c1fb4dc4bfabca4f Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Thu, 16 May 2024 11:58:39 +0530 Subject: [PATCH 50/51] docs(react): :memo: add js docs --- .../react/src/components/SignInButton/SignInButton.tsx | 2 +- packages/react/src/components/SignedIn/SignedIn.tsx | 8 ++++++++ packages/react/src/components/SignedOut/SignedOut.tsx | 8 ++++++++ packages/react/src/theme/generate-theme-sign-in.ts | 7 +++++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/react/src/components/SignInButton/SignInButton.tsx b/packages/react/src/components/SignInButton/SignInButton.tsx index b8fa2f78..9bb78943 100644 --- a/packages/react/src/components/SignInButton/SignInButton.tsx +++ b/packages/react/src/components/SignInButton/SignInButton.tsx @@ -22,7 +22,7 @@ import './sign-in-button.scss'; import SignIn from '../SignIn/SignIn'; /** - * SignInButton component. + * SignInButton component. This button will render a modal with the SignIn component when clicked. * * @param {Object} props - Component props. * @param {ReactElement} props.customComponent - Optional custom component to be rendered. diff --git a/packages/react/src/components/SignedIn/SignedIn.tsx b/packages/react/src/components/SignedIn/SignedIn.tsx index 27e84807..44ec80d5 100644 --- a/packages/react/src/components/SignedIn/SignedIn.tsx +++ b/packages/react/src/components/SignedIn/SignedIn.tsx @@ -20,6 +20,14 @@ import {FC, PropsWithChildren} from 'react'; import useAuthentication from '../../hooks/use-authentication'; import SignedProps from '../../models/signed-props'; +/** + * This component renders its children if the user is signed out. + * + * @param {PropsWithChildren} props - Props injected to the component. + * @param {ReactElement} props.fallback - Fallback element to render. + * + * @return {JSX.Element} + */ const SignedIn: FC> = (props: PropsWithChildren) => { const {fallback, children} = props; const {isAuthenticated} = useAuthentication(); diff --git a/packages/react/src/components/SignedOut/SignedOut.tsx b/packages/react/src/components/SignedOut/SignedOut.tsx index c80d08a2..77664846 100644 --- a/packages/react/src/components/SignedOut/SignedOut.tsx +++ b/packages/react/src/components/SignedOut/SignedOut.tsx @@ -20,6 +20,14 @@ import {FC, PropsWithChildren} from 'react'; import useAuthentication from '../../hooks/use-authentication'; import SignedProps from '../../models/signed-props'; +/** + * This component renders its children if the user is signed out. + * + * @param {PropsWithChildren} props - Props injected to the component. + * @param {ReactElement} props.fallback - Fallback element to render. + * + * @return {JSX.Element} + */ const SignedOut: FC> = (props: PropsWithChildren) => { const {fallback, children} = props; const {isAuthenticated} = useAuthentication(); diff --git a/packages/react/src/theme/generate-theme-sign-in.ts b/packages/react/src/theme/generate-theme-sign-in.ts index a0e5729c..05c457e3 100644 --- a/packages/react/src/theme/generate-theme-sign-in.ts +++ b/packages/react/src/theme/generate-theme-sign-in.ts @@ -19,6 +19,13 @@ import {BrandingPreferenceTheme, ThemeConfig} from '@asgardeo/js-ui-core'; import {extendTheme, Theme} from '@oxygen-ui/react'; +/** + * This function generates the theme for the sign-in component. + * + * @param {BrandingPreferenceTheme} brandingPreferenceTheme - The branding preference theme. + * + * @return {Theme} The generated theme. + */ const generateThemeSignIn: (brandingPreferenceTheme: BrandingPreferenceTheme) => Theme = ( brandingPreferenceTheme: BrandingPreferenceTheme, ) => { From 50868d00870fcadf6c791bce63d936e761ce93a3 Mon Sep 17 00:00:00 2001 From: Movin Silva Date: Thu, 16 May 2024 12:15:17 +0530 Subject: [PATCH 51/51] docs(react): :bulb: update comments in SignIn --- packages/react/src/components/SignIn/SignIn.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/components/SignIn/SignIn.tsx b/packages/react/src/components/SignIn/SignIn.tsx index 56854d7e..215699ca 100644 --- a/packages/react/src/components/SignIn/SignIn.tsx +++ b/packages/react/src/components/SignIn/SignIn.tsx @@ -103,7 +103,8 @@ const SignIn: FC = (props: SignInProps) => { /** * Handles the generalized authentication process. - * @param {any} authParams - The authentication parameters. + * @param {string} authenticatorId - Authenticator ID. + * @param {object} [authParams] - Authentication parameters. */ const handleAuthenticate = async (authenticatorId: string, authParams?: {[key: string]: string}): Promise => { setAlert(undefined); @@ -175,7 +176,6 @@ const SignIn: FC = (props: SignInProps) => { nextStep: authResponse.nextStep, }); - // TODO: Move this to core: and take from i18n setAlert({alertType: {error: true}, key: keys.login.retry}); } else { setAuthResponse(resp);