@asgardeo/react 0.11.1 → 0.11.3
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 +10 -10
- package/dist/__temp__/api.d.ts +6 -6
- package/dist/__temp__/models.d.ts +30 -30
- package/dist/cjs/index.js +5988 -5754
- package/dist/cjs/index.js.map +4 -4
- package/dist/components/adapters/FacebookButton.d.ts +1 -1
- package/dist/components/adapters/GitHubButton.d.ts +1 -1
- package/dist/components/adapters/GoogleButton.d.ts +1 -1
- package/dist/components/adapters/LinkedInButton.d.ts +1 -1
- package/dist/components/adapters/MicrosoftButton.d.ts +1 -1
- package/dist/components/adapters/SignInWithEthereumButton.d.ts +1 -1
- package/dist/components/adapters/SmsOtpButton.d.ts +1 -1
- package/dist/components/factories/FieldFactory.d.ts +25 -25
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.d.ts +1 -18
- package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts +1 -1
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.d.ts +26 -26
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.d.ts +1 -31
- package/dist/components/presentation/OrganizationList/OrganizationList.styles.d.ts +1 -6
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts +3 -3
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.d.ts +1 -27
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts +6 -6
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.d.ts +1 -25
- package/dist/components/presentation/User/BaseUser.d.ts +4 -4
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.d.ts +1 -15
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +3 -3
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts +1 -26
- package/dist/components/presentation/auth/AcceptInvite/index.d.ts +1 -1
- package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.d.ts +13 -13
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts +51 -51
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.d.ts +6 -10
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts +1 -1
- package/dist/components/presentation/auth/InviteUser/index.d.ts +1 -1
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts +57 -57
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.d.ts +6 -10
- package/dist/components/presentation/auth/InviteUser/v2/InviteUser.d.ts +15 -15
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.d.ts +1 -27
- package/dist/components/presentation/auth/SignIn/SignIn.d.ts +1 -1
- package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.d.ts +12 -12
- package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.d.ts +15 -15
- package/dist/components/presentation/auth/SignIn/v1/types.d.ts +30 -30
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts +47 -47
- package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts +20 -20
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.d.ts +1 -26
- package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.d.ts +40 -40
- package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.d.ts +1 -1
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts +46 -46
- package/dist/components/primitives/Alert/Alert.d.ts +8 -8
- package/dist/components/primitives/Alert/Alert.styles.d.ts +1 -8
- package/dist/components/primitives/Avatar/Avatar.d.ts +4 -4
- package/dist/components/primitives/Avatar/Avatar.styles.d.ts +1 -7
- package/dist/components/primitives/Button/Button.d.ts +14 -14
- package/dist/components/primitives/Button/Button.styles.d.ts +1 -13
- package/dist/components/primitives/Card/Card.d.ts +4 -4
- package/dist/components/primitives/Card/Card.styles.d.ts +1 -11
- package/dist/components/primitives/Checkbox/Checkbox.d.ts +8 -8
- package/dist/components/primitives/Checkbox/Checkbox.styles.d.ts +1 -8
- package/dist/components/primitives/DatePicker/DatePicker.d.ts +12 -12
- package/dist/components/primitives/DatePicker/DatePicker.styles.d.ts +1 -6
- package/dist/components/primitives/Dialog/Dialog.d.ts +17 -17
- package/dist/components/primitives/Dialog/Dialog.styles.d.ts +1 -9
- package/dist/components/primitives/Divider/Divider.d.ts +2 -2
- package/dist/components/primitives/Divider/Divider.styles.d.ts +1 -7
- package/dist/components/primitives/FormControl/FormControl.d.ts +4 -4
- package/dist/components/primitives/FormControl/FormControl.styles.d.ts +1 -5
- package/dist/components/primitives/InputLabel/InputLabel.d.ts +10 -10
- package/dist/components/primitives/InputLabel/InputLabel.styles.d.ts +1 -7
- package/dist/components/primitives/KeyValueInput/KeyValueInput.d.ts +4 -4
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.d.ts +1 -17
- package/dist/components/primitives/Logo/Logo.d.ts +8 -8
- package/dist/components/primitives/Logo/Logo.styles.d.ts +1 -7
- package/dist/components/primitives/MultiInput/MultiInput.d.ts +28 -28
- package/dist/components/primitives/MultiInput/MultiInput.styles.d.ts +1 -11
- package/dist/components/primitives/OtpField/OtpField.d.ts +20 -20
- package/dist/components/primitives/OtpField/OtpField.styles.d.ts +1 -6
- package/dist/components/primitives/PasswordField/PasswordField.styles.d.ts +1 -5
- package/dist/components/primitives/Select/Select.d.ts +18 -18
- package/dist/components/primitives/Select/Select.styles.d.ts +1 -6
- package/dist/components/primitives/Spinner/Spinner.d.ts +4 -4
- package/dist/components/primitives/Spinner/Spinner.styles.d.ts +1 -6
- package/dist/components/primitives/TextField/TextField.d.ts +18 -18
- package/dist/components/primitives/TextField/TextField.styles.d.ts +1 -9
- package/dist/components/primitives/Typography/Typography.d.ts +24 -24
- package/dist/components/primitives/Typography/Typography.styles.d.ts +1 -19
- package/dist/contexts/Asgardeo/AsgardeoContext.d.ts +62 -62
- package/dist/contexts/Branding/BrandingContext.d.ts +12 -11
- package/dist/contexts/Branding/BrandingProvider.d.ts +10 -10
- package/dist/contexts/Flow/FlowContext.d.ts +25 -24
- package/dist/contexts/Flow/FlowProvider.d.ts +4 -4
- package/dist/contexts/I18n/I18nContext.d.ts +6 -5
- package/dist/contexts/I18n/I18nProvider.d.ts +1 -1
- package/dist/contexts/Theme/ThemeContext.d.ts +12 -11
- package/dist/contexts/Theme/ThemeProvider.d.ts +10 -10
- package/dist/contexts/Theme/types.d.ts +30 -30
- package/dist/contexts/User/UserContext.d.ts +2 -2
- package/dist/contexts/User/UserProvider.d.ts +2 -2
- package/dist/hooks/useBranding.d.ts +17 -17
- package/dist/hooks/useForm.d.ts +10 -9
- package/dist/hooks/useTranslation.d.ts +4 -4
- package/dist/index.d.ts +6 -26
- package/dist/index.js +5969 -5705
- package/dist/index.js.map +4 -4
- package/dist/utils/v2/flowTransformer.d.ts +7 -7
- package/dist/utils/v2/getAuthComponentHeadings.d.ts +2 -2
- package/package.json +2 -2
|
@@ -21,103 +21,112 @@ import { CardProps } from '../../../../primitives/Card/Card';
|
|
|
21
21
|
* Flow response structure from the backend.
|
|
22
22
|
*/
|
|
23
23
|
export interface AcceptInviteFlowResponse {
|
|
24
|
-
flowId: string;
|
|
25
|
-
flowStatus: 'INCOMPLETE' | 'COMPLETE' | 'ERROR';
|
|
26
|
-
type?: 'VIEW' | 'REDIRECTION';
|
|
27
24
|
data?: {
|
|
25
|
+
additionalData?: Record<string, string>;
|
|
28
26
|
components?: any[];
|
|
29
27
|
meta?: {
|
|
30
28
|
components?: any[];
|
|
31
29
|
};
|
|
32
|
-
additionalData?: Record<string, string>;
|
|
33
30
|
};
|
|
34
31
|
failureReason?: string;
|
|
32
|
+
flowId: string;
|
|
33
|
+
flowStatus: 'INCOMPLETE' | 'COMPLETE' | 'ERROR';
|
|
34
|
+
type?: 'VIEW' | 'REDIRECTION';
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Render props for custom UI rendering of AcceptInvite.
|
|
38
38
|
*/
|
|
39
39
|
export interface BaseAcceptInviteRenderProps {
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Title from the password screen (for use in completion screen).
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
completionTitle?: string;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Flow components from the current step.
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
components: any[];
|
|
48
48
|
/**
|
|
49
49
|
* API error (if any).
|
|
50
50
|
*/
|
|
51
51
|
error?: Error | null;
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
touched: Record<string, boolean>;
|
|
56
|
-
/**
|
|
57
|
-
* Loading state.
|
|
58
|
-
*/
|
|
59
|
-
isLoading: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Flow components from the current step.
|
|
53
|
+
* Field validation errors.
|
|
62
54
|
*/
|
|
63
|
-
|
|
55
|
+
fieldErrors: Record<string, string>;
|
|
64
56
|
/**
|
|
65
57
|
* Current flow ID from URL.
|
|
66
58
|
*/
|
|
67
59
|
flowId?: string;
|
|
68
60
|
/**
|
|
69
|
-
*
|
|
70
|
-
*/
|
|
71
|
-
inviteToken?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Function to handle input changes.
|
|
61
|
+
* Navigate to sign in page.
|
|
74
62
|
*/
|
|
75
|
-
|
|
63
|
+
goToSignIn?: () => void;
|
|
76
64
|
/**
|
|
77
65
|
* Function to handle input blur.
|
|
78
66
|
*/
|
|
79
67
|
handleInputBlur: (name: string) => void;
|
|
68
|
+
/**
|
|
69
|
+
* Function to handle input changes.
|
|
70
|
+
*/
|
|
71
|
+
handleInputChange: (name: string, value: string) => void;
|
|
80
72
|
/**
|
|
81
73
|
* Function to handle form submission.
|
|
82
74
|
*/
|
|
83
75
|
handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Invite token from URL.
|
|
78
|
+
*/
|
|
79
|
+
inviteToken?: string;
|
|
84
80
|
/**
|
|
85
81
|
* Whether the flow has completed successfully.
|
|
86
82
|
*/
|
|
87
83
|
isComplete: boolean;
|
|
88
84
|
/**
|
|
89
|
-
*
|
|
85
|
+
* Loading state.
|
|
90
86
|
*/
|
|
91
|
-
|
|
87
|
+
isLoading: boolean;
|
|
92
88
|
/**
|
|
93
89
|
* Whether the token validation failed.
|
|
94
90
|
*/
|
|
95
91
|
isTokenInvalid: boolean;
|
|
96
92
|
/**
|
|
97
|
-
*
|
|
93
|
+
* Whether the form is valid.
|
|
98
94
|
*/
|
|
99
|
-
|
|
95
|
+
isValid: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the invite token is being validated.
|
|
98
|
+
*/
|
|
99
|
+
isValidatingToken: boolean;
|
|
100
100
|
/**
|
|
101
101
|
* Subtitle for the current step.
|
|
102
102
|
*/
|
|
103
103
|
subtitle?: string;
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
105
|
+
* Title for the current step.
|
|
106
106
|
*/
|
|
107
|
-
|
|
107
|
+
title?: string;
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
109
|
+
* Touched fields.
|
|
110
110
|
*/
|
|
111
|
-
|
|
111
|
+
touched: Record<string, boolean>;
|
|
112
112
|
/**
|
|
113
|
-
*
|
|
113
|
+
* Form values for the current step.
|
|
114
114
|
*/
|
|
115
|
-
|
|
115
|
+
values: Record<string, string>;
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
118
|
* Props for the BaseAcceptInvite component.
|
|
119
119
|
*/
|
|
120
120
|
export interface BaseAcceptInviteProps {
|
|
121
|
+
/**
|
|
122
|
+
* Render props function for custom UI.
|
|
123
|
+
* If not provided, default UI will be rendered.
|
|
124
|
+
*/
|
|
125
|
+
children?: (props: BaseAcceptInviteRenderProps) => ReactNode;
|
|
126
|
+
/**
|
|
127
|
+
* Custom CSS class name.
|
|
128
|
+
*/
|
|
129
|
+
className?: string;
|
|
121
130
|
/**
|
|
122
131
|
* Flow ID from the invite link URL.
|
|
123
132
|
*/
|
|
@@ -138,24 +147,23 @@ export interface BaseAcceptInviteProps {
|
|
|
138
147
|
* Callback when the flow state changes.
|
|
139
148
|
*/
|
|
140
149
|
onFlowChange?: (response: AcceptInviteFlowResponse) => void;
|
|
150
|
+
/**
|
|
151
|
+
* Callback to navigate to sign in page.
|
|
152
|
+
*/
|
|
153
|
+
onGoToSignIn?: () => void;
|
|
141
154
|
/**
|
|
142
155
|
* Function to submit flow step data.
|
|
143
156
|
* This makes a request to the flow/execute endpoint.
|
|
144
157
|
*/
|
|
145
158
|
onSubmit: (payload: Record<string, any>) => Promise<AcceptInviteFlowResponse>;
|
|
146
159
|
/**
|
|
147
|
-
*
|
|
148
|
-
*/
|
|
149
|
-
onGoToSignIn?: () => void;
|
|
150
|
-
/**
|
|
151
|
-
* Custom CSS class name.
|
|
160
|
+
* Whether to show the subtitle.
|
|
152
161
|
*/
|
|
153
|
-
|
|
162
|
+
showSubtitle?: boolean;
|
|
154
163
|
/**
|
|
155
|
-
*
|
|
156
|
-
* If not provided, default UI will be rendered.
|
|
164
|
+
* Whether to show the title.
|
|
157
165
|
*/
|
|
158
|
-
|
|
166
|
+
showTitle?: boolean;
|
|
159
167
|
/**
|
|
160
168
|
* Size variant for the component.
|
|
161
169
|
*/
|
|
@@ -164,14 +172,6 @@ export interface BaseAcceptInviteProps {
|
|
|
164
172
|
* Theme variant for the component.
|
|
165
173
|
*/
|
|
166
174
|
variant?: CardProps['variant'];
|
|
167
|
-
/**
|
|
168
|
-
* Whether to show the title.
|
|
169
|
-
*/
|
|
170
|
-
showTitle?: boolean;
|
|
171
|
-
/**
|
|
172
|
-
* Whether to show the subtitle.
|
|
173
|
-
*/
|
|
174
|
-
showSubtitle?: boolean;
|
|
175
175
|
}
|
|
176
176
|
/**
|
|
177
177
|
* Base component for accept invite flow (end-user).
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
10
|
*
|
|
11
11
|
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
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.
|
|
16
17
|
*/
|
|
17
18
|
import { Theme } from '@asgardeo/browser';
|
|
18
19
|
/**
|
|
@@ -21,10 +22,5 @@ import { Theme } from '@asgardeo/browser';
|
|
|
21
22
|
* @param colorScheme - The current color scheme (used for memoization)
|
|
22
23
|
* @returns Object containing CSS class names for component styling
|
|
23
24
|
*/
|
|
24
|
-
declare const useStyles: (theme: Theme, colorScheme: string) =>
|
|
25
|
-
card: string;
|
|
26
|
-
header: string;
|
|
27
|
-
title: string;
|
|
28
|
-
subtitle: string;
|
|
29
|
-
};
|
|
25
|
+
declare const useStyles: (theme: Theme, colorScheme: string) => Record<string, string>;
|
|
30
26
|
export default useStyles;
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { ReactElement } from 'react';
|
|
19
18
|
import { EmbeddedFlowComponentV2 as EmbeddedFlowComponent } from '@asgardeo/browser';
|
|
19
|
+
import { ReactElement } from 'react';
|
|
20
20
|
export type AuthType = 'signin' | 'signup';
|
|
21
21
|
/**
|
|
22
22
|
* Processes an array of components and renders them as React elements for sign-in.
|
|
@@ -18,4 +18,4 @@
|
|
|
18
18
|
export { default as InviteUser } from './v2/InviteUser';
|
|
19
19
|
export type { InviteUserProps, InviteUserRenderProps } from './v2/InviteUser';
|
|
20
20
|
export { default as BaseInviteUser } from './v2/BaseInviteUser';
|
|
21
|
-
export type { BaseInviteUserProps, BaseInviteUserRenderProps, InviteUserFlowResponse
|
|
21
|
+
export type { BaseInviteUserProps, BaseInviteUserRenderProps, InviteUserFlowResponse } from './v2/BaseInviteUser';
|
|
@@ -21,103 +21,112 @@ import { CardProps } from '../../../../primitives/Card/Card';
|
|
|
21
21
|
* Flow response structure from the backend.
|
|
22
22
|
*/
|
|
23
23
|
export interface InviteUserFlowResponse {
|
|
24
|
-
flowId: string;
|
|
25
|
-
flowStatus: 'INCOMPLETE' | 'COMPLETE' | 'ERROR';
|
|
26
|
-
type?: 'VIEW' | 'REDIRECTION';
|
|
27
24
|
data?: {
|
|
25
|
+
additionalData?: Record<string, string>;
|
|
28
26
|
components?: any[];
|
|
29
27
|
meta?: {
|
|
30
28
|
components?: any[];
|
|
31
29
|
};
|
|
32
|
-
additionalData?: Record<string, string>;
|
|
33
30
|
};
|
|
34
31
|
failureReason?: string;
|
|
32
|
+
flowId: string;
|
|
33
|
+
flowStatus: 'INCOMPLETE' | 'COMPLETE' | 'ERROR';
|
|
34
|
+
type?: 'VIEW' | 'REDIRECTION';
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Render props for custom UI rendering of InviteUser.
|
|
38
38
|
*/
|
|
39
39
|
export interface BaseInviteUserRenderProps {
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Flow components from the current step.
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
components: any[];
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Copy invite link to clipboard.
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
copyInviteLink: () => Promise<void>;
|
|
48
48
|
/**
|
|
49
49
|
* API error (if any).
|
|
50
50
|
*/
|
|
51
51
|
error?: Error | null;
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
touched: Record<string, boolean>;
|
|
56
|
-
/**
|
|
57
|
-
* Loading state.
|
|
58
|
-
*/
|
|
59
|
-
isLoading: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Flow components from the current step.
|
|
62
|
-
*/
|
|
63
|
-
components: any[];
|
|
64
|
-
/**
|
|
65
|
-
* Generated invite link (available after user provisioning).
|
|
53
|
+
* Field validation errors.
|
|
66
54
|
*/
|
|
67
|
-
|
|
55
|
+
fieldErrors: Record<string, string>;
|
|
68
56
|
/**
|
|
69
57
|
* Current flow ID.
|
|
70
58
|
*/
|
|
71
59
|
flowId?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Function to handle input changes.
|
|
74
|
-
*/
|
|
75
|
-
handleInputChange: (name: string, value: string) => void;
|
|
76
60
|
/**
|
|
77
61
|
* Function to handle input blur.
|
|
78
62
|
*/
|
|
79
63
|
handleInputBlur: (name: string) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Function to handle input changes.
|
|
66
|
+
*/
|
|
67
|
+
handleInputChange: (name: string, value: string) => void;
|
|
80
68
|
/**
|
|
81
69
|
* Function to handle form submission.
|
|
82
70
|
*/
|
|
83
71
|
handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;
|
|
84
72
|
/**
|
|
85
|
-
*
|
|
73
|
+
* Generated invite link (available after user provisioning).
|
|
86
74
|
*/
|
|
87
|
-
|
|
75
|
+
inviteLink?: string;
|
|
88
76
|
/**
|
|
89
|
-
*
|
|
77
|
+
* Whether the invite link was copied.
|
|
90
78
|
*/
|
|
91
|
-
|
|
79
|
+
inviteLinkCopied: boolean;
|
|
92
80
|
/**
|
|
93
|
-
*
|
|
81
|
+
* Whether the invite link has been generated (admin flow complete).
|
|
94
82
|
*/
|
|
95
|
-
|
|
83
|
+
isInviteGenerated: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Loading state.
|
|
86
|
+
*/
|
|
87
|
+
isLoading: boolean;
|
|
96
88
|
/**
|
|
97
89
|
* Whether the form is valid.
|
|
98
90
|
*/
|
|
99
91
|
isValid: boolean;
|
|
100
92
|
/**
|
|
101
|
-
*
|
|
93
|
+
* Reset the flow to invite another user.
|
|
102
94
|
*/
|
|
103
|
-
|
|
95
|
+
resetFlow: () => void;
|
|
104
96
|
/**
|
|
105
|
-
*
|
|
97
|
+
* Subtitle for the current step.
|
|
106
98
|
*/
|
|
107
|
-
|
|
99
|
+
subtitle?: string;
|
|
108
100
|
/**
|
|
109
|
-
*
|
|
101
|
+
* Title for the current step.
|
|
110
102
|
*/
|
|
111
|
-
|
|
103
|
+
title?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Touched fields.
|
|
106
|
+
*/
|
|
107
|
+
touched: Record<string, boolean>;
|
|
108
|
+
/**
|
|
109
|
+
* Form values for the current step.
|
|
110
|
+
*/
|
|
111
|
+
values: Record<string, string>;
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
114
|
* Props for the BaseInviteUser component.
|
|
115
115
|
*/
|
|
116
116
|
export interface BaseInviteUserProps {
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
118
|
+
* Render props function for custom UI.
|
|
119
|
+
* If not provided, default UI will be rendered.
|
|
119
120
|
*/
|
|
120
|
-
|
|
121
|
+
children?: (props: BaseInviteUserRenderProps) => ReactNode;
|
|
122
|
+
/**
|
|
123
|
+
* Custom CSS class name.
|
|
124
|
+
*/
|
|
125
|
+
className?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Whether the SDK is initialized.
|
|
128
|
+
*/
|
|
129
|
+
isInitialized?: boolean;
|
|
121
130
|
/**
|
|
122
131
|
* Callback when an error occurs.
|
|
123
132
|
*/
|
|
@@ -131,24 +140,23 @@ export interface BaseInviteUserProps {
|
|
|
131
140
|
* This should make an authenticated request to the flow/execute endpoint.
|
|
132
141
|
*/
|
|
133
142
|
onInitialize: (payload: Record<string, any>) => Promise<InviteUserFlowResponse>;
|
|
143
|
+
/**
|
|
144
|
+
* Callback when the invite link is generated successfully.
|
|
145
|
+
*/
|
|
146
|
+
onInviteLinkGenerated?: (inviteLink: string, flowId: string) => void;
|
|
134
147
|
/**
|
|
135
148
|
* Function to submit flow step data.
|
|
136
149
|
* This should make an authenticated request to the flow/execute endpoint.
|
|
137
150
|
*/
|
|
138
151
|
onSubmit: (payload: Record<string, any>) => Promise<InviteUserFlowResponse>;
|
|
139
152
|
/**
|
|
140
|
-
*
|
|
141
|
-
*/
|
|
142
|
-
className?: string;
|
|
143
|
-
/**
|
|
144
|
-
* Render props function for custom UI.
|
|
145
|
-
* If not provided, default UI will be rendered.
|
|
153
|
+
* Whether to show the subtitle.
|
|
146
154
|
*/
|
|
147
|
-
|
|
155
|
+
showSubtitle?: boolean;
|
|
148
156
|
/**
|
|
149
|
-
* Whether
|
|
157
|
+
* Whether to show the title.
|
|
150
158
|
*/
|
|
151
|
-
|
|
159
|
+
showTitle?: boolean;
|
|
152
160
|
/**
|
|
153
161
|
* Size variant for the component.
|
|
154
162
|
*/
|
|
@@ -157,14 +165,6 @@ export interface BaseInviteUserProps {
|
|
|
157
165
|
* Theme variant for the component.
|
|
158
166
|
*/
|
|
159
167
|
variant?: CardProps['variant'];
|
|
160
|
-
/**
|
|
161
|
-
* Whether to show the title.
|
|
162
|
-
*/
|
|
163
|
-
showTitle?: boolean;
|
|
164
|
-
/**
|
|
165
|
-
* Whether to show the subtitle.
|
|
166
|
-
*/
|
|
167
|
-
showSubtitle?: boolean;
|
|
168
168
|
}
|
|
169
169
|
/**
|
|
170
170
|
* Base component for invite user flow.
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
10
|
*
|
|
11
11
|
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
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.
|
|
16
17
|
*/
|
|
17
18
|
import { Theme } from '@asgardeo/browser';
|
|
18
19
|
/**
|
|
@@ -21,10 +22,5 @@ import { Theme } from '@asgardeo/browser';
|
|
|
21
22
|
* @param colorScheme - The current color scheme (used for memoization)
|
|
22
23
|
* @returns Object containing CSS class names for component styling
|
|
23
24
|
*/
|
|
24
|
-
declare const useStyles: (theme: Theme, colorScheme: string) =>
|
|
25
|
-
card: string;
|
|
26
|
-
header: string;
|
|
27
|
-
title: string;
|
|
28
|
-
subtitle: string;
|
|
29
|
-
};
|
|
25
|
+
declare const useStyles: (theme: Theme, colorScheme: string) => Record<string, string>;
|
|
30
26
|
export default useStyles;
|
|
@@ -26,9 +26,14 @@ export type InviteUserRenderProps = BaseInviteUserRenderProps;
|
|
|
26
26
|
*/
|
|
27
27
|
export interface InviteUserProps {
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Render props function for custom UI.
|
|
30
|
+
* If not provided, default UI will be rendered by the SDK.
|
|
30
31
|
*/
|
|
31
|
-
|
|
32
|
+
children?: (props: InviteUserRenderProps) => ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Custom CSS class name.
|
|
35
|
+
*/
|
|
36
|
+
className?: string;
|
|
32
37
|
/**
|
|
33
38
|
* Callback when an error occurs.
|
|
34
39
|
*/
|
|
@@ -38,14 +43,17 @@ export interface InviteUserProps {
|
|
|
38
43
|
*/
|
|
39
44
|
onFlowChange?: (response: InviteUserFlowResponse) => void;
|
|
40
45
|
/**
|
|
41
|
-
*
|
|
46
|
+
* Callback when the invite link is generated successfully.
|
|
42
47
|
*/
|
|
43
|
-
|
|
48
|
+
onInviteLinkGenerated?: (inviteLink: string, flowId: string) => void;
|
|
44
49
|
/**
|
|
45
|
-
*
|
|
46
|
-
* If not provided, default UI will be rendered by the SDK.
|
|
50
|
+
* Whether to show the subtitle.
|
|
47
51
|
*/
|
|
48
|
-
|
|
52
|
+
showSubtitle?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Whether to show the title.
|
|
55
|
+
*/
|
|
56
|
+
showTitle?: boolean;
|
|
49
57
|
/**
|
|
50
58
|
* Size variant for the component.
|
|
51
59
|
*/
|
|
@@ -54,14 +62,6 @@ export interface InviteUserProps {
|
|
|
54
62
|
* Theme variant for the component card.
|
|
55
63
|
*/
|
|
56
64
|
variant?: 'outlined' | 'elevated';
|
|
57
|
-
/**
|
|
58
|
-
* Whether to show the title.
|
|
59
|
-
*/
|
|
60
|
-
showTitle?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Whether to show the subtitle.
|
|
63
|
-
*/
|
|
64
|
-
showSubtitle?: boolean;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* InviteUser component for initiating invite user flow.
|
|
@@ -22,31 +22,5 @@ import { Theme } from '@asgardeo/browser';
|
|
|
22
22
|
* @param colorScheme - The current color scheme (used for memoization)
|
|
23
23
|
* @returns Object containing CSS class names for component styling
|
|
24
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
|
-
};
|
|
25
|
+
declare const useStyles: (theme: Theme, colorScheme: string) => Record<string, string>;
|
|
52
26
|
export default useStyles;
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
18
|
import { FC, ReactElement } from 'react';
|
|
19
|
-
import { SignInRenderProps } from './v2/SignIn';
|
|
20
19
|
import { BaseSignInProps } from './BaseSignIn';
|
|
20
|
+
import { SignInRenderProps } from './v2/SignIn';
|
|
21
21
|
/**
|
|
22
22
|
* Props for the SignIn component.
|
|
23
23
|
* Extends BaseSignInProps for full compatibility with the React BaseSignIn component
|
|
@@ -39,6 +39,10 @@ export interface BaseSignInProps {
|
|
|
39
39
|
* Custom CSS class name for form inputs.
|
|
40
40
|
*/
|
|
41
41
|
inputClassName?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Flag to determine the component is ready to be rendered.
|
|
44
|
+
*/
|
|
45
|
+
isLoading?: boolean;
|
|
42
46
|
/**
|
|
43
47
|
* Custom CSS class name for info messages.
|
|
44
48
|
*/
|
|
@@ -53,10 +57,6 @@ export interface BaseSignInProps {
|
|
|
53
57
|
* @param response - The current authentication response.
|
|
54
58
|
*/
|
|
55
59
|
onFlowChange?: (response: EmbeddedSignInFlowInitiateResponse | EmbeddedSignInFlowHandleResponse) => void;
|
|
56
|
-
/**
|
|
57
|
-
* Flag to determine the component is ready to be rendered.
|
|
58
|
-
*/
|
|
59
|
-
isLoading?: boolean;
|
|
60
60
|
/**
|
|
61
61
|
* Function to initialize authentication flow.
|
|
62
62
|
* @returns Promise resolving to the initial authentication response.
|
|
@@ -74,25 +74,25 @@ export interface BaseSignInProps {
|
|
|
74
74
|
*/
|
|
75
75
|
onSuccess?: (authData: Record<string, any>) => void;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* Whether to show the logo.
|
|
78
78
|
*/
|
|
79
|
-
|
|
79
|
+
showLogo?: boolean;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Whether to show the subtitle.
|
|
82
82
|
*/
|
|
83
|
-
|
|
83
|
+
showSubtitle?: boolean;
|
|
84
84
|
/**
|
|
85
85
|
* Whether to show the title.
|
|
86
86
|
*/
|
|
87
87
|
showTitle?: boolean;
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* Size variant for the component.
|
|
90
90
|
*/
|
|
91
|
-
|
|
91
|
+
size?: 'small' | 'medium' | 'large';
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
93
|
+
* Theme variant for the component.
|
|
94
94
|
*/
|
|
95
|
-
|
|
95
|
+
variant?: CardProps['variant'];
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
98
|
* Base SignIn component that provides native authentication flow.
|