@authing/react-ui-components 4.3.2-rc.4 → 4.3.2-rc.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/react-ui-components",
3
- "version": "4.3.2-rc.4",
3
+ "version": "4.3.2-rc.6",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "types/index.d.ts",
@@ -9,6 +9,7 @@ export interface ForgetPasswordEvents extends IG2Events {
9
9
  onPwdResetError?: (error: CommonMessage, authClient: AuthenticationClient) => void;
10
10
  }
11
11
  export interface ForgetPasswordConfig extends IG2Config {
12
+ goBack?: null | (() => void);
12
13
  }
13
14
  export interface ForgetPasswordProps extends IG2FCProps, ForgetPasswordEvents {
14
15
  config: Partial<IG2Config>;
@@ -1,8 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { GuardModuleType } from '.';
3
+ import { ForgetPasswordConfig } from '../ForgetPassword/interface';
3
4
  import { LoginConfig } from '../Login/interface';
4
5
  import { RegisterConfig } from '../Register/interface';
5
- export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
6
+ export interface GuardLocalConfig extends RegisterConfig, LoginConfig, ForgetPasswordConfig {
6
7
  isSSO?: boolean;
7
8
  defaultScenes?: GuardModuleType;
8
9
  defaultInitData?: any;
@@ -5,7 +5,8 @@ import { IdentityBindingEvents } from '../IdentityBinding/interface';
5
5
  import { IdentityBindingAskEvents } from '../IdentityBindingAsk';
6
6
  import { LoginEvents } from '../Login/interface';
7
7
  import { RegisterEvents } from '../Register/interface';
8
- export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
8
+ import { TenantPortalEvents } from '../TenantPortalSelect/interface';
9
+ export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents, TenantPortalEvents {
9
10
  onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
10
11
  }
11
12
  export declare const guardEventsFilter: (props: any, multipleInstance?: {
@@ -10,6 +10,8 @@ export interface SubmitSuccessInitData {
10
10
  text?: string;
11
11
  countDesc?: string;
12
12
  changeModule?: GuardModuleType;
13
+ needBack?: boolean;
14
+ goBack?: () => void;
13
15
  }
14
16
  export interface GuardNewSubmitSuccessViewProps extends IG2FCViewProps, SubmitSuccessEvents {
15
17
  config: SubmitSuccessConfig;
@@ -1,16 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import './styles.less';
3
- /** 租户门户选择状态机返回数据类型 */
4
- export interface TenantPortalSelectType {
5
- title: string;
6
- description: string;
7
- logo: string;
8
- list: {
9
- tenantName: string;
10
- tenantId: string;
11
- tenantLogo: string;
12
- host: string;
13
- userName: string;
14
- }[];
15
- }
16
3
  export declare const GuardTenantPortalSelectView: () => JSX.Element;
@@ -0,0 +1,33 @@
1
+ /// <reference types="react" />
2
+ import { AvatarProps } from 'antd/lib/avatar';
3
+ import { AuthenticationClient, IG2Events, User } from '../Type';
4
+ export interface TenantPortalListType {
5
+ tenantName: string;
6
+ tenantId: string;
7
+ tenantLogo: string;
8
+ host: string;
9
+ description: string;
10
+ /** 是否为用户池 */
11
+ isUserPool: boolean;
12
+ userName?: string;
13
+ }
14
+ export interface TenantPortalSelectType extends Omit<TenantPortalListType, 'userName'> {
15
+ }
16
+ /** 租户门户选择状态机返回数据类型 */
17
+ export interface TenantPortalDataType {
18
+ title: string;
19
+ description: string;
20
+ logo: string;
21
+ list: TenantPortalListType[];
22
+ }
23
+ export interface TenantPortalDataItem extends TenantPortalListType {
24
+ avatar?: AvatarProps;
25
+ extra?: React.ReactNode;
26
+ title?: string;
27
+ }
28
+ /** 租户门户相关事件 */
29
+ export interface TenantPortalEvents extends IG2Events {
30
+ onLogin?: (user: User, authClient: AuthenticationClient) => void;
31
+ /** 租户门户选择回调 */
32
+ onTenantSelect?: (data?: TenantPortalSelectType) => void;
33
+ }
@@ -100,6 +100,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
100
100
  withCustomData?: boolean | undefined;
101
101
  } | undefined;
102
102
  _closeLoopCheckQrcode?: boolean | undefined;
103
+ goBack?: (() => void) | null | undefined;
103
104
  };
104
105
  guardPageConfig: GuardPageConfig;
105
106
  } | {
@@ -1,2 +1,2 @@
1
- declare const _default: "4.3.2-rc.4";
1
+ declare const _default: "4.3.2-rc.6";
2
2
  export default _default;