@asgardeo/react 0.5.28 → 0.5.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AsgardeoReactClient.d.ts +1 -0
- package/dist/__temp__/api.d.ts +8 -0
- package/dist/cjs/index.js +1881 -1136
- package/dist/cjs/index.js.map +4 -4
- package/dist/components/{presentation/SignUp/options → adapters}/CheckboxInput.d.ts +1 -1
- package/dist/components/{presentation/SignUp/options → adapters}/DateInput.d.ts +1 -1
- package/dist/components/{presentation/SignUp/options → adapters}/DividerComponent.d.ts +1 -1
- package/dist/components/{presentation/SignUp/options → adapters}/EmailInput.d.ts +1 -1
- package/dist/components/{presentation/options → adapters}/FacebookButton.d.ts +8 -2
- package/dist/components/{presentation/SignUp/options → adapters}/FormContainer.d.ts +1 -1
- package/dist/components/{presentation/options → adapters}/GitHubButton.d.ts +8 -2
- package/dist/components/{presentation/options → adapters}/GoogleButton.d.ts +8 -2
- package/dist/components/{presentation/SignUp/options → adapters}/ImageComponent.d.ts +1 -1
- package/dist/components/{presentation/options → adapters}/LinkedInButton.d.ts +8 -2
- package/dist/components/{presentation/options → adapters}/MicrosoftButton.d.ts +8 -2
- package/dist/components/{presentation/SignUp/options → adapters}/NumberInput.d.ts +1 -1
- package/dist/components/{presentation/SignUp/options → adapters}/PasswordInput.d.ts +1 -1
- package/dist/components/{presentation/options → adapters}/SignInWithEthereumButton.d.ts +8 -2
- package/dist/components/adapters/SmsOtpButton.d.ts +31 -0
- package/dist/components/{presentation/SignUp/options → adapters}/SocialButton.d.ts +1 -1
- package/dist/components/{presentation/SignUp/options → adapters}/SubmitButton.d.ts +1 -1
- package/dist/components/{presentation/SignUp/options → adapters}/TelephoneInput.d.ts +1 -1
- package/dist/components/{presentation/SignUp/options → adapters}/TextInput.d.ts +1 -1
- package/dist/components/{presentation/SignUp/options → adapters}/Typography.d.ts +1 -1
- package/dist/components/presentation/SignIn/SignIn.d.ts +9 -3
- package/dist/components/presentation/SignIn/component-driven/BaseSignIn.d.ts +195 -0
- package/dist/components/presentation/SignIn/component-driven/SignIn.d.ts +144 -0
- package/dist/components/presentation/SignIn/component-driven/SignInOptionFactory.d.ts +30 -0
- package/dist/components/presentation/SignIn/component-driven/transformer.d.ts +30 -0
- package/dist/components/presentation/SignIn/{BaseSignIn.d.ts → non-component-driven/BaseSignIn.d.ts} +1 -1
- package/dist/components/presentation/SignIn/non-component-driven/BaseSignIn.styles.d.ts +52 -0
- package/dist/components/presentation/{options → SignIn/non-component-driven/options}/SocialButton.d.ts +1 -1
- package/dist/contexts/Asgardeo/AsgardeoContext.d.ts +1 -1
- package/dist/index.d.ts +22 -22
- package/dist/index.js +1831 -1075
- package/dist/index.js.map +4 -4
- package/dist/utils/getDisplayName.d.ts +49 -0
- package/package.json +3 -3
- /package/dist/components/control/{Loading/Loading.d.ts → Loading.d.ts} +0 -0
- /package/dist/components/control/{SignedIn/SignedIn.d.ts → SignedIn.d.ts} +0 -0
- /package/dist/components/control/{SignedOut/SignedOut.d.ts → SignedOut.d.ts} +0 -0
- /package/dist/components/presentation/SignIn/{options → non-component-driven/options}/EmailOtp.d.ts +0 -0
- /package/dist/components/presentation/SignIn/{options → non-component-driven/options}/IdentifierFirst.d.ts +0 -0
- /package/dist/components/presentation/SignIn/{options → non-component-driven/options}/MultiOptionButton.d.ts +0 -0
- /package/dist/components/presentation/SignIn/{options → non-component-driven/options}/SignInOptionFactory.d.ts +0 -0
- /package/dist/components/presentation/SignIn/{options → non-component-driven/options}/SmsOtp.d.ts +0 -0
- /package/dist/components/presentation/SignIn/{options → non-component-driven/options}/Totp.d.ts +0 -0
- /package/dist/components/presentation/SignIn/{options → non-component-driven/options}/UsernamePassword.d.ts +0 -0
- /package/dist/components/presentation/SignIn/{types.d.ts → non-component-driven/types.d.ts} +0 -0
- /package/dist/components/presentation/SignUp/{options/SignUpOptionFactory.d.ts → SignUpOptionFactory.d.ts} +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { ReactElement } from 'react';
|
|
19
|
+
import { EmbeddedFlowComponent } from '@asgardeo/browser';
|
|
20
|
+
/**
|
|
21
|
+
* Processes an array of components and renders them as React elements.
|
|
22
|
+
*/
|
|
23
|
+
export declare const renderSignInComponents: (components: EmbeddedFlowComponent[], formValues: Record<string, string>, touchedFields: Record<string, boolean>, formErrors: Record<string, string>, isLoading: boolean, isFormValid: boolean, onInputChange: (name: string, value: string) => void, options?: {
|
|
24
|
+
buttonClassName?: string;
|
|
25
|
+
error?: string | null;
|
|
26
|
+
inputClassName?: string;
|
|
27
|
+
onSubmit?: (component: EmbeddedFlowComponent, data?: Record<string, any>) => void;
|
|
28
|
+
size?: "small" | "medium" | "large";
|
|
29
|
+
variant?: any;
|
|
30
|
+
}) => ReactElement[];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { EmbeddedFlowComponent } from '@asgardeo/browser';
|
|
19
|
+
import { UseTranslation } from '../../../../hooks/useTranslation';
|
|
20
|
+
/**
|
|
21
|
+
* Transform simple flow response to component-driven format
|
|
22
|
+
*/
|
|
23
|
+
export declare const transformSimpleToComponentDriven: (response: any, t: UseTranslation["t"]) => EmbeddedFlowComponent[];
|
|
24
|
+
/**
|
|
25
|
+
* Generic transformer that handles both simple and component-driven responses
|
|
26
|
+
*/
|
|
27
|
+
export declare const normalizeFlowResponse: (response: any, t: UseTranslation["t"]) => {
|
|
28
|
+
flowId: string;
|
|
29
|
+
components: EmbeddedFlowComponent[];
|
|
30
|
+
};
|
package/dist/components/presentation/SignIn/{BaseSignIn.d.ts → non-component-driven/BaseSignIn.d.ts}
RENAMED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { EmbeddedSignInFlowInitiateResponse, EmbeddedSignInFlowHandleResponse, EmbeddedSignInFlowHandleRequestPayload, EmbeddedFlowExecuteRequestConfig } from '@asgardeo/browser';
|
|
19
19
|
import { FC } from 'react';
|
|
20
|
-
import { CardProps } from '
|
|
20
|
+
import { CardProps } from '../../../primitives/Card/Card';
|
|
21
21
|
/**
|
|
22
22
|
* Props for the BaseSignIn component.
|
|
23
23
|
*/
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { Theme } from '@asgardeo/browser';
|
|
19
|
+
/**
|
|
20
|
+
* Creates styles for the BaseSignIn component
|
|
21
|
+
* @param theme - The theme object containing design tokens
|
|
22
|
+
* @param colorScheme - The current color scheme (used for memoization)
|
|
23
|
+
* @returns Object containing CSS class names for component styling
|
|
24
|
+
*/
|
|
25
|
+
declare const useStyles: (theme: Theme, colorScheme: string) => {
|
|
26
|
+
signIn: string;
|
|
27
|
+
card: string;
|
|
28
|
+
logoContainer: string;
|
|
29
|
+
header: string;
|
|
30
|
+
title: string;
|
|
31
|
+
subtitle: string;
|
|
32
|
+
messagesContainer: string;
|
|
33
|
+
messageItem: string;
|
|
34
|
+
errorContainer: string;
|
|
35
|
+
contentContainer: string;
|
|
36
|
+
loadingContainer: string;
|
|
37
|
+
loadingText: string;
|
|
38
|
+
divider: string;
|
|
39
|
+
centeredContainer: string;
|
|
40
|
+
passkeyContainer: string;
|
|
41
|
+
passkeyText: string;
|
|
42
|
+
form: string;
|
|
43
|
+
formDivider: string;
|
|
44
|
+
authenticatorSection: string;
|
|
45
|
+
authenticatorItem: string;
|
|
46
|
+
noAuthenticatorCard: string;
|
|
47
|
+
errorAlert: string;
|
|
48
|
+
messagesAlert: string;
|
|
49
|
+
flowMessagesContainer: string;
|
|
50
|
+
flowMessageItem: string;
|
|
51
|
+
};
|
|
52
|
+
export default useStyles;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
18
|
import { FC, HTMLAttributes } from 'react';
|
|
19
|
-
import { BaseSignInOptionProps } from '
|
|
19
|
+
import { BaseSignInOptionProps } from './SignInOptionFactory';
|
|
20
20
|
/**
|
|
21
21
|
* Social Login Sign-In Option Component.
|
|
22
22
|
* Handles authentication with external identity providers (Google, GitHub, etc.).
|
|
@@ -119,7 +119,7 @@ export type AsgardeoContextProps = {
|
|
|
119
119
|
* @returns Promise resolving to boolean indicating success.
|
|
120
120
|
*/
|
|
121
121
|
reInitialize: (config: Partial<AsgardeoReactConfig>) => Promise<boolean>;
|
|
122
|
-
} & Pick<AsgardeoReactConfig, 'storage'>;
|
|
122
|
+
} & Pick<AsgardeoReactConfig, 'storage' | 'platform'> & Pick<AsgardeoReactClient, 'clearSession'>;
|
|
123
123
|
/**
|
|
124
124
|
* Context object for managing the Authentication flow builder core context.
|
|
125
125
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -77,34 +77,34 @@ export { default as BaseSignUpButton } from './components/actions/SignUpButton/B
|
|
|
77
77
|
export * from './components/actions/SignUpButton/BaseSignUpButton';
|
|
78
78
|
export { default as SignUpButton } from './components/actions/SignUpButton/SignUpButton';
|
|
79
79
|
export * from './components/actions/SignUpButton/SignUpButton';
|
|
80
|
-
export { default as SignedIn } from './components/control/SignedIn
|
|
81
|
-
export * from './components/control/SignedIn
|
|
82
|
-
export { default as SignedOut } from './components/control/SignedOut
|
|
83
|
-
export * from './components/control/SignedOut
|
|
84
|
-
export { default as Loading } from './components/control/Loading
|
|
85
|
-
export * from './components/control/Loading
|
|
86
|
-
export { default as BaseSignIn } from './components/presentation/SignIn/BaseSignIn';
|
|
87
|
-
export * from './components/presentation/SignIn/BaseSignIn';
|
|
80
|
+
export { default as SignedIn } from './components/control/SignedIn';
|
|
81
|
+
export * from './components/control/SignedIn';
|
|
82
|
+
export { default as SignedOut } from './components/control/SignedOut';
|
|
83
|
+
export * from './components/control/SignedOut';
|
|
84
|
+
export { default as Loading } from './components/control/Loading';
|
|
85
|
+
export * from './components/control/Loading';
|
|
86
|
+
export { default as BaseSignIn } from './components/presentation/SignIn/non-component-driven/BaseSignIn';
|
|
87
|
+
export * from './components/presentation/SignIn/non-component-driven/BaseSignIn';
|
|
88
88
|
export { default as SignIn } from './components/presentation/SignIn/SignIn';
|
|
89
89
|
export * from './components/presentation/SignIn/SignIn';
|
|
90
90
|
export { default as BaseSignUp } from './components/presentation/SignUp/BaseSignUp';
|
|
91
91
|
export * from './components/presentation/SignUp/BaseSignUp';
|
|
92
92
|
export { default as SignUp } from './components/presentation/SignUp/SignUp';
|
|
93
93
|
export * from './components/presentation/SignUp/SignUp';
|
|
94
|
-
export { default as IdentifierFirst } from './components/presentation/SignIn/options/IdentifierFirst';
|
|
95
|
-
export { default as UsernamePassword } from './components/presentation/SignIn/options/UsernamePassword';
|
|
96
|
-
export { default as GoogleButton } from './components/
|
|
97
|
-
export { default as GitHubButton } from './components/
|
|
98
|
-
export { default as MicrosoftButton } from './components/
|
|
99
|
-
export { default as FacebookButton } from './components/
|
|
100
|
-
export { default as LinkedInButton } from './components/
|
|
101
|
-
export { default as SignInWithEthereumButton } from './components/
|
|
102
|
-
export { default as EmailOtp } from './components/presentation/SignIn/options/EmailOtp';
|
|
103
|
-
export { default as Totp } from './components/presentation/SignIn/options/Totp';
|
|
104
|
-
export { default as SmsOtp } from './components/presentation/SignIn/options/SmsOtp';
|
|
105
|
-
export { default as SocialButton } from './components/presentation/options/SocialButton';
|
|
106
|
-
export { default as MultiOptionButton } from './components/presentation/SignIn/options/MultiOptionButton';
|
|
107
|
-
export * from './components/presentation/SignIn/options/SignInOptionFactory';
|
|
94
|
+
export { default as IdentifierFirst } from './components/presentation/SignIn/non-component-driven/options/IdentifierFirst';
|
|
95
|
+
export { default as UsernamePassword } from './components/presentation/SignIn/non-component-driven/options/UsernamePassword';
|
|
96
|
+
export { default as GoogleButton } from './components/adapters/GoogleButton';
|
|
97
|
+
export { default as GitHubButton } from './components/adapters/GitHubButton';
|
|
98
|
+
export { default as MicrosoftButton } from './components/adapters/MicrosoftButton';
|
|
99
|
+
export { default as FacebookButton } from './components/adapters/FacebookButton';
|
|
100
|
+
export { default as LinkedInButton } from './components/adapters/LinkedInButton';
|
|
101
|
+
export { default as SignInWithEthereumButton } from './components/adapters/SignInWithEthereumButton';
|
|
102
|
+
export { default as EmailOtp } from './components/presentation/SignIn/non-component-driven/options/EmailOtp';
|
|
103
|
+
export { default as Totp } from './components/presentation/SignIn/non-component-driven/options/Totp';
|
|
104
|
+
export { default as SmsOtp } from './components/presentation/SignIn/non-component-driven/options/SmsOtp';
|
|
105
|
+
export { default as SocialButton } from './components/presentation/SignIn/non-component-driven/options/SocialButton';
|
|
106
|
+
export { default as MultiOptionButton } from './components/presentation/SignIn/non-component-driven/options/MultiOptionButton';
|
|
107
|
+
export * from './components/presentation/SignIn/non-component-driven/options/SignInOptionFactory';
|
|
108
108
|
export { default as BaseUser } from './components/presentation/User/BaseUser';
|
|
109
109
|
export * from './components/presentation/User/BaseUser';
|
|
110
110
|
export { default as User } from './components/presentation/User/User';
|