@asgardeo/react 0.18.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1556 -1211
- package/dist/cjs/index.js.map +4 -4
- package/dist/components/adapters/Consent.d.ts +7 -18
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts +3 -1
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts +11 -2
- package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts +19 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.d.ts +29 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.d.ts +20 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1490 -1145
- package/dist/index.js.map +4 -4
- package/package.json +2 -2
|
@@ -18,22 +18,11 @@
|
|
|
18
18
|
import { type ConsentPurposeDataV2 as ConsentPurposeData } from '@asgardeo/browser';
|
|
19
19
|
import { FC, ReactNode } from 'react';
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* Backward-compatible consent purpose type exported by @asgardeo/react.
|
|
22
|
+
*
|
|
23
|
+
* Some consumers import this name directly; keep it as an alias to the v2 model.
|
|
24
24
|
*/
|
|
25
|
-
export
|
|
26
|
-
/** Optional human-readable description of the purpose */
|
|
27
|
-
description?: string;
|
|
28
|
-
/** Attributes that are always required and cannot be declined */
|
|
29
|
-
essential?: string[];
|
|
30
|
-
/** Attributes that the user can optionally decline */
|
|
31
|
-
optional?: string[];
|
|
32
|
-
/** Unique identifier for the purpose */
|
|
33
|
-
purpose_id: string;
|
|
34
|
-
/** Name of the purpose to display in the UI */
|
|
35
|
-
purpose_name: string;
|
|
36
|
-
}
|
|
25
|
+
export type ConsentPurpose = ConsentPurposeData;
|
|
37
26
|
/**
|
|
38
27
|
* Render props exposed by Consent when using the render-prop pattern.
|
|
39
28
|
*/
|
|
@@ -59,7 +48,7 @@ export interface ConsentProps {
|
|
|
59
48
|
* <Consent consentData={raw} formValues={formInputs} onInputChange={onChange} t={t}>
|
|
60
49
|
* {({ purposes, formValues, onInputChange, t }) => (
|
|
61
50
|
* <div>
|
|
62
|
-
* {purposes.map(p => <MyConsentSection key={p.
|
|
51
|
+
* {purposes.map(p => <MyConsentSection key={p.purposeId} purpose={p} />)}
|
|
63
52
|
* </div>
|
|
64
53
|
* )}
|
|
65
54
|
* </Consent>
|
|
@@ -69,8 +58,8 @@ export interface ConsentProps {
|
|
|
69
58
|
/**
|
|
70
59
|
* The raw JSON string returned by the backend in `additionalData.consentPrompt`.
|
|
71
60
|
*/
|
|
72
|
-
consentData?: string |
|
|
73
|
-
purposes:
|
|
61
|
+
consentData?: string | ConsentPurposeData[] | {
|
|
62
|
+
purposes: ConsentPurposeData[];
|
|
74
63
|
};
|
|
75
64
|
/**
|
|
76
65
|
* Current form values - used to read optional checkbox state.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { FlowMetadataResponse, EmbeddedFlowComponentV2 as EmbeddedFlowComponent } from '@asgardeo/browser';
|
|
18
|
+
import { FlowMetadataResponse, OrganizationUnitListResponse, EmbeddedFlowComponentV2 as EmbeddedFlowComponent } from '@asgardeo/browser';
|
|
19
19
|
import { ReactElement } from 'react';
|
|
20
20
|
import { UseTranslation } from '../../../hooks/useTranslation';
|
|
21
21
|
export type AuthType = 'signin' | 'signup';
|
|
@@ -63,6 +63,8 @@ export declare const renderInviteUserComponents: (components: EmbeddedFlowCompon
|
|
|
63
63
|
/** Additional data from the flow response */
|
|
64
64
|
additionalData?: Record<string, any>;
|
|
65
65
|
buttonClassName?: string;
|
|
66
|
+
/** Function to fetch child organization units. Used by OU_SELECT component type. */
|
|
67
|
+
fetchOrganizationUnitChildren?: (parentId: string, limit: number, offset: number) => Promise<OrganizationUnitListResponse>;
|
|
66
68
|
inputClassName?: string;
|
|
67
69
|
/** Flow metadata for resolving {{meta(...)}} expressions at render time */
|
|
68
70
|
meta?: FlowMetadataResponse | null;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { FlowMetadataResponse, Preferences } from '@asgardeo/browser';
|
|
18
|
+
import { FlowMetadataResponse, OrganizationUnitListResponse, Preferences } from '@asgardeo/browser';
|
|
19
19
|
import { FC, ReactNode } from 'react';
|
|
20
20
|
import { CardProps } from '../../../../primitives/Card/Card';
|
|
21
21
|
/**
|
|
@@ -23,7 +23,7 @@ import { CardProps } from '../../../../primitives/Card/Card';
|
|
|
23
23
|
*/
|
|
24
24
|
export interface InviteUserFlowResponse {
|
|
25
25
|
data?: {
|
|
26
|
-
additionalData?: Record<string,
|
|
26
|
+
additionalData?: Record<string, any>;
|
|
27
27
|
components?: any[];
|
|
28
28
|
meta?: {
|
|
29
29
|
components?: any[];
|
|
@@ -38,6 +38,10 @@ export interface InviteUserFlowResponse {
|
|
|
38
38
|
* Render props for custom UI rendering of InviteUser.
|
|
39
39
|
*/
|
|
40
40
|
export interface BaseInviteUserRenderProps {
|
|
41
|
+
/**
|
|
42
|
+
* Additional data from the current flow response (e.g. rootOuId, inviteLink).
|
|
43
|
+
*/
|
|
44
|
+
additionalData?: Record<string, any>;
|
|
41
45
|
/**
|
|
42
46
|
* Flow components from the current step.
|
|
43
47
|
*/
|
|
@@ -132,6 +136,11 @@ export interface BaseInviteUserProps {
|
|
|
132
136
|
* Custom CSS class name.
|
|
133
137
|
*/
|
|
134
138
|
className?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Function to fetch child organization units.
|
|
141
|
+
* When provided, enables the OU tree picker for OU_SELECT components.
|
|
142
|
+
*/
|
|
143
|
+
fetchOrganizationUnitChildren?: (parentId: string, limit: number, offset: number) => Promise<OrganizationUnitListResponse>;
|
|
135
144
|
/**
|
|
136
145
|
* Whether the SDK is initialized.
|
|
137
146
|
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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
|
+
export { default as OrganizationUnitPicker } from './v2/OrganizationUnitPicker';
|
|
19
|
+
export type { OrganizationUnitPickerProps } from './v2/OrganizationUnitPicker';
|
package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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 { OrganizationUnitListResponse } from '@asgardeo/browser';
|
|
19
|
+
import React from 'react';
|
|
20
|
+
export interface OrganizationUnitPickerProps {
|
|
21
|
+
className?: string;
|
|
22
|
+
fetchChildren: (parentId: string, limit: number, offset: number) => Promise<OrganizationUnitListResponse>;
|
|
23
|
+
onSelect: (ouId: string) => void;
|
|
24
|
+
pageSize?: number;
|
|
25
|
+
rootOuId: string;
|
|
26
|
+
selectedOuId?: string | null;
|
|
27
|
+
}
|
|
28
|
+
declare const OrganizationUnitPicker: ({ rootOuId, selectedOuId, onSelect, fetchChildren, pageSize, className, }: OrganizationUnitPickerProps) => React.ReactElement;
|
|
29
|
+
export default OrganizationUnitPicker;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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
|
+
declare const useStyles: (theme: Theme) => Record<string, string>;
|
|
20
|
+
export default useStyles;
|
package/dist/index.d.ts
CHANGED
|
@@ -83,6 +83,7 @@ export * from './components/presentation/auth/SignUp/BaseSignUp';
|
|
|
83
83
|
export { default as SignUp } from './components/presentation/auth/SignUp/SignUp';
|
|
84
84
|
export * from './components/presentation/auth/SignUp/SignUp';
|
|
85
85
|
export * from './components/presentation/auth/InviteUser';
|
|
86
|
+
export * from './components/presentation/auth/OrganizationUnitPicker';
|
|
86
87
|
export { BaseAcceptInvite, AcceptInvite } from './components/presentation/auth/AcceptInvite';
|
|
87
88
|
export * from './components/auth/Callback/Callback';
|
|
88
89
|
export { default as IdentifierFirst } from './components/presentation/auth/SignIn/v1/options/IdentifierFirst';
|