@asgardeo/react 0.19.0 → 0.20.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.
@@ -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, 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';
@@ -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';