@asgardeo/react 0.5.0 → 0.5.1
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 +3 -2
- package/dist/api/{scim2/createOrganization.d.ts → createOrganization.d.ts} +32 -25
- package/dist/api/{scim2/getAllOrganizations.d.ts → getAllOrganizations.d.ts} +30 -13
- package/dist/api/{scim2/getMeOrganizations.d.ts → getMeOrganizations.d.ts} +35 -10
- package/dist/api/{scim2/getOrganization.d.ts → getOrganization.d.ts} +28 -20
- package/dist/api/getSchemas.d.ts +67 -0
- package/dist/api/getScim2Me.d.ts +67 -0
- package/dist/api/updateMeProfile.d.ts +55 -0
- package/dist/api/{scim2/updateOrganization.d.ts → updateOrganization.d.ts} +27 -25
- package/dist/cjs/index.js +262 -482
- package/dist/cjs/index.js.map +4 -4
- package/dist/components/control/AsgardeoLoading.d.ts +2 -0
- package/dist/components/control/SignedIn.d.ts +2 -0
- package/dist/components/control/SignedOut.d.ts +2 -0
- package/dist/components/factories/FieldFactory.d.ts +4 -9
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.d.ts +1 -1
- package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts +1 -1
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts +1 -1
- package/dist/components/presentation/SignIn/BaseSignIn.d.ts +4 -0
- package/dist/components/presentation/SignIn/SignIn.d.ts +3 -15
- package/dist/contexts/Asgardeo/AsgardeoContext.d.ts +6 -2
- package/dist/index.d.ts +17 -4
- package/dist/index.js +301 -496
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/dist/api/scim2/getMeProfile.d.ts +0 -39
- package/dist/api/scim2/getSchemas.d.ts +0 -39
- package/dist/api/scim2/updateMeProfile.d.ts +0 -38
|
@@ -28,6 +28,8 @@ export interface AsgardeoLoadingProps {
|
|
|
28
28
|
/**
|
|
29
29
|
* A component that only renders its children when the Asgardeo is loading.
|
|
30
30
|
*
|
|
31
|
+
* @remarks This component is only supported in browser based React applications (CSR).
|
|
32
|
+
*
|
|
31
33
|
* @example
|
|
32
34
|
* ```tsx
|
|
33
35
|
* import { AsgardeoLoading } from '@asgardeo/auth-react';
|
|
@@ -28,6 +28,8 @@ export interface SignedInProps {
|
|
|
28
28
|
/**
|
|
29
29
|
* A component that only renders its children when the user is signed in.
|
|
30
30
|
*
|
|
31
|
+
* @remarks This component is only supported in browser based React applications (CSR).
|
|
32
|
+
*
|
|
31
33
|
* @example
|
|
32
34
|
* ```tsx
|
|
33
35
|
* import { SignedIn } from '@asgardeo/auth-react';
|
|
@@ -28,6 +28,8 @@ export interface SignedOutProps {
|
|
|
28
28
|
/**
|
|
29
29
|
* A component that only renders its children when the user is signed out.
|
|
30
30
|
*
|
|
31
|
+
* @remarks This component is only supported in browser based React applications (CSR).
|
|
32
|
+
*
|
|
31
33
|
* @example
|
|
32
34
|
* ```tsx
|
|
33
35
|
* import { SignedOut } from '@asgardeo/auth-react';
|
|
@@ -22,9 +22,12 @@ import { FieldType } from '@asgardeo/browser';
|
|
|
22
22
|
* Interface for field configuration.
|
|
23
23
|
*/
|
|
24
24
|
export interface FieldConfig {
|
|
25
|
+
/**
|
|
26
|
+
* The name of the field.
|
|
27
|
+
*/
|
|
25
28
|
name: string;
|
|
26
29
|
/**
|
|
27
|
-
* The field type
|
|
30
|
+
* The field type.
|
|
28
31
|
*/
|
|
29
32
|
type: FieldType;
|
|
30
33
|
/**
|
|
@@ -68,14 +71,6 @@ export interface FieldConfig {
|
|
|
68
71
|
*/
|
|
69
72
|
placeholder?: string;
|
|
70
73
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Utility function to parse multi-valued string into array
|
|
73
|
-
*/
|
|
74
|
-
export declare const parseMultiValuedString: (value: string) => string[];
|
|
75
|
-
/**
|
|
76
|
-
* Utility function to format array into multi-valued string
|
|
77
|
-
*/
|
|
78
|
-
export declare const formatMultiValuedString: (values: string[]) => string;
|
|
79
74
|
/**
|
|
80
75
|
* Utility function to validate field values based on type
|
|
81
76
|
*/
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
+
import { CreateOrganizationPayload } from '@asgardeo/browser';
|
|
18
19
|
import { CSSProperties, FC, ReactNode } from 'react';
|
|
19
|
-
import { CreateOrganizationPayload } from '../../../api/scim2/createOrganization';
|
|
20
20
|
/**
|
|
21
21
|
* Interface for organization form data.
|
|
22
22
|
*/
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { FC, ReactElement } from 'react';
|
|
19
19
|
import { BaseCreateOrganizationProps } from './BaseCreateOrganization';
|
|
20
|
-
import { CreateOrganizationPayload } from '
|
|
20
|
+
import { CreateOrganizationPayload } from '@asgardeo/browser';
|
|
21
21
|
/**
|
|
22
22
|
* Props interface for the CreateOrganization component.
|
|
23
23
|
*/
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
+
import { OrganizationDetails } from '@asgardeo/browser';
|
|
18
19
|
import { FC, ReactElement } from 'react';
|
|
19
|
-
import { OrganizationDetails } from '../../../api/scim2/getOrganization';
|
|
20
20
|
export interface BaseOrganizationProfileProps {
|
|
21
21
|
/**
|
|
22
22
|
* Callback fired when the cancel button is clicked (only used in editable mode).
|
|
@@ -53,6 +53,10 @@ export interface BaseSignInProps {
|
|
|
53
53
|
* @param response - The current authentication response.
|
|
54
54
|
*/
|
|
55
55
|
onFlowChange?: (response: EmbeddedSignInFlowInitiateResponse | EmbeddedSignInFlowHandleResponse) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Flag to determine the component is ready to be rendered.
|
|
58
|
+
*/
|
|
59
|
+
isLoading?: boolean;
|
|
56
60
|
/**
|
|
57
61
|
* Function to initialize authentication flow.
|
|
58
62
|
* @returns Promise resolving to the initial authentication response.
|
|
@@ -16,24 +16,12 @@
|
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
18
|
import { FC } from 'react';
|
|
19
|
-
import {
|
|
19
|
+
import { BaseSignInProps } from './BaseSignIn';
|
|
20
20
|
/**
|
|
21
21
|
* Props for the SignIn component.
|
|
22
|
+
* Extends BaseSignInProps for full compatibility with the React BaseSignIn component
|
|
22
23
|
*/
|
|
23
|
-
export
|
|
24
|
-
/**
|
|
25
|
-
* Additional CSS class names for customization.
|
|
26
|
-
*/
|
|
27
|
-
className?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Size variant for the component.
|
|
30
|
-
*/
|
|
31
|
-
size?: 'small' | 'medium' | 'large';
|
|
32
|
-
/**
|
|
33
|
-
* Theme variant for the component.
|
|
34
|
-
*/
|
|
35
|
-
variant?: CardProps['variant'];
|
|
36
|
-
}
|
|
24
|
+
export type SignInProps = Pick<BaseSignInProps, 'className' | 'onSuccess' | 'onError' | 'variant' | 'size'>;
|
|
37
25
|
/**
|
|
38
26
|
* A styled SignIn component that provides native authentication flow with pre-built styling.
|
|
39
27
|
* This component handles the API calls for authentication and delegates UI logic to BaseSignIn.
|
|
@@ -16,12 +16,15 @@
|
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
18
|
import { Context } from 'react';
|
|
19
|
+
import { Organization } from '@asgardeo/browser';
|
|
19
20
|
/**
|
|
20
21
|
* Props interface of {@link AsgardeoContext}
|
|
21
22
|
*/
|
|
22
23
|
export type AsgardeoContextProps = {
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
signInUrl: string | undefined;
|
|
25
|
+
signUpUrl: string | undefined;
|
|
26
|
+
afterSignInUrl: string | undefined;
|
|
27
|
+
baseUrl: string | undefined;
|
|
25
28
|
isInitialized: boolean;
|
|
26
29
|
/**
|
|
27
30
|
* Flag indicating whether the SDK is working in the background.
|
|
@@ -50,6 +53,7 @@ export type AsgardeoContextProps = {
|
|
|
50
53
|
*/
|
|
51
54
|
signUp: any;
|
|
52
55
|
user: any;
|
|
56
|
+
organization: Organization;
|
|
53
57
|
};
|
|
54
58
|
/**
|
|
55
59
|
* Context object for managing the Authentication flow builder core context.
|
package/dist/index.d.ts
CHANGED
|
@@ -167,10 +167,23 @@ export { default as TriangleAlert } from './components/primitives/Icons/Triangle
|
|
|
167
167
|
export { default as Info } from './components/primitives/Icons/Info';
|
|
168
168
|
export { default as UserIcon } from './components/primitives/Icons/User';
|
|
169
169
|
export { default as LogOut } from './components/primitives/Icons/LogOut';
|
|
170
|
-
export { createField, FieldFactory,
|
|
170
|
+
export { createField, FieldFactory, validateFieldValue } from './components/factories/FieldFactory';
|
|
171
171
|
export * from './components/factories/FieldFactory';
|
|
172
172
|
export type { FlowStep, FlowMessage, FlowContextValue } from './contexts/Flow/FlowContext';
|
|
173
173
|
export type { FlowProviderProps } from './contexts/Flow/FlowProvider';
|
|
174
|
-
export { default as
|
|
175
|
-
export
|
|
176
|
-
export { default as getMeOrganizations } from './api/
|
|
174
|
+
export { default as getAllOrganizations } from './api/getAllOrganizations';
|
|
175
|
+
export { default as createOrganization } from './api/createOrganization';
|
|
176
|
+
export { default as getMeOrganizations } from './api/getMeOrganizations';
|
|
177
|
+
export { default as getOrganization } from './api/getOrganization';
|
|
178
|
+
export { default as updateOrganization, createPatchOperations } from './api/updateOrganization';
|
|
179
|
+
export { default as getSchemas } from './api/getSchemas';
|
|
180
|
+
export { default as updateMeProfile } from './api/updateMeProfile';
|
|
181
|
+
export type { GetAllOrganizationsConfig } from './api/getAllOrganizations';
|
|
182
|
+
export type { CreateOrganizationConfig } from './api/createOrganization';
|
|
183
|
+
export type { GetMeOrganizationsConfig } from './api/getMeOrganizations';
|
|
184
|
+
export type { GetOrganizationConfig } from './api/getOrganization';
|
|
185
|
+
export type { UpdateOrganizationConfig } from './api/updateOrganization';
|
|
186
|
+
export type { GetSchemasConfig } from './api/getSchemas';
|
|
187
|
+
export type { UpdateMeProfileConfig } from './api/updateMeProfile';
|
|
188
|
+
export { default as getMeProfile } from './api/getScim2Me';
|
|
189
|
+
export * from './api/getScim2Me';
|