@authing/react-ui-components 4.0.13-rc.1 → 4.0.14-hep.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/lib/index.min.css +1 -1
- package/lib/index.min.js +1 -1
- package/package.json +1 -1
- package/types/AccountMerge/UserRadio.d.ts +5 -0
- package/types/AccountMerge/index.d.ts +3 -0
- package/types/AccountMerge/interface.d.ts +27 -0
- package/types/AccountMerge/utils.d.ts +3 -0
- package/types/AuthClientProvider/AuthClientProvider.d.ts +2 -4
- package/types/Back/index.d.ts +1 -3
- package/types/ChangeAccoutType/index.d.ts +3 -0
- package/types/ChangePassword/index.d.ts +1 -2
- package/types/CompleteInfo/core/components/TreeSelect.d.ts +11 -0
- package/types/CompleteInfo/index.d.ts +1 -0
- package/types/CompleteInfo/interface.d.ts +8 -4
- package/types/ForgetPassword/interface.d.ts +1 -1
- package/types/Guard/core/renderContext.d.ts +1 -2
- package/types/Guard/module.d.ts +2 -0
- package/types/InputPassword/index.d.ts +4 -2
- package/types/Login/core/withWeComQrcode.d.ts +2 -0
- package/types/MFA/interface.d.ts +1 -0
- package/types/Qrcode/UiQrCode.d.ts +1 -1
- package/types/Type/application.d.ts +3 -0
- package/types/_utils/context.d.ts +2 -6
- package/types/_utils/hooks/index.d.ts +0 -4
- package/types/_utils/index.d.ts +1 -1
- package/types/_utils/responseManagement/interface.d.ts +1 -0
- package/types/version/version.d.ts +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface BriefUserInfo {
|
|
2
|
+
displayName: string;
|
|
3
|
+
avatar: string;
|
|
4
|
+
phone: string;
|
|
5
|
+
email: string;
|
|
6
|
+
username: string;
|
|
7
|
+
name: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GuardAccountMergeInitData {
|
|
10
|
+
currentUserInfo: BriefUserInfo;
|
|
11
|
+
existingUserInfo: BriefUserInfo;
|
|
12
|
+
mergeToken?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface UserRadioProps {
|
|
15
|
+
currentUserInfo: BriefUserInfo;
|
|
16
|
+
existingUserInfo: BriefUserInfo;
|
|
17
|
+
onChange?: (value: any) => void;
|
|
18
|
+
value?: any;
|
|
19
|
+
}
|
|
20
|
+
export interface UserRadioItemProps extends BriefUserInfo {
|
|
21
|
+
value: boolean;
|
|
22
|
+
selected: boolean;
|
|
23
|
+
onClick: (value: boolean) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare enum AuthFlowAction {
|
|
26
|
+
MERGE = "confirm-account-merge"
|
|
27
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { AuthClientContextProps } from './context';
|
|
3
|
-
export declare const AuthClientProvider: React.FC<AuthClientContextProps
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
}>;
|
|
3
|
+
export declare const AuthClientProvider: React.FC<AuthClientContextProps>;
|
|
6
4
|
export declare const useGlobalAuthClient: () => import("authing-js-sdk").AuthenticationClient | undefined;
|
package/types/Back/index.d.ts
CHANGED
|
@@ -7,6 +7,4 @@ export declare const BackLogin: React.FC<BackProps>;
|
|
|
7
7
|
export interface BackCustomProps extends BackProps {
|
|
8
8
|
onBack?: () => void;
|
|
9
9
|
}
|
|
10
|
-
export declare const BackCustom: React.FC<BackCustomProps
|
|
11
|
-
children: any;
|
|
12
|
-
}>;
|
|
10
|
+
export declare const BackCustom: React.FC<BackCustomProps>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export declare const GuardChangePassword: React.FC<{
|
|
3
3
|
title: string;
|
|
4
4
|
explain: string;
|
|
5
|
-
children: ReactNode;
|
|
6
5
|
}>;
|
|
7
6
|
export declare const GuardFirstLoginPasswordResetView: React.FC;
|
|
8
7
|
export declare const GuardPasswordNotSafeResetView: React.FC;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type OptionType = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
children: OptionType[];
|
|
6
|
+
};
|
|
7
|
+
interface TreeSelectProps {
|
|
8
|
+
options: OptionType[];
|
|
9
|
+
}
|
|
10
|
+
declare const TreeSelect: React.FC<TreeSelectProps>;
|
|
11
|
+
export default TreeSelect;
|
|
@@ -7,19 +7,21 @@ export interface CompleteInfoEvents extends IG2Events {
|
|
|
7
7
|
onRegisterInfoCompleted?: (user: User, udfs: {
|
|
8
8
|
key: any;
|
|
9
9
|
value: any;
|
|
10
|
-
}[], authClient: AuthenticationClient
|
|
10
|
+
}[], authClient: AuthenticationClient, opts?: {
|
|
11
|
+
phone?: string;
|
|
12
|
+
canMergeUser?: boolean;
|
|
13
|
+
}) => void;
|
|
11
14
|
onRegisterInfoCompletedError?: (error: CommonMessage, udfs: {
|
|
12
15
|
key: any;
|
|
13
16
|
value: any;
|
|
14
17
|
}[], authClient: AuthenticationClient) => void;
|
|
18
|
+
onAccountMergeCompleteInfo?: (user: User) => void;
|
|
15
19
|
}
|
|
16
20
|
export interface GuardCompleteInfoProps extends IG2FCProps, CompleteInfoEvents {
|
|
17
21
|
config: Partial<CompleteInfoConfig>;
|
|
18
22
|
}
|
|
19
23
|
export interface GuardCompleteInfoViewProps extends GuardCompleteInfoProps {
|
|
20
24
|
config: CompleteInfoConfig;
|
|
21
|
-
initData: any;
|
|
22
|
-
onLogin?: any;
|
|
23
25
|
}
|
|
24
26
|
export declare type ExtendsFieldType = 'user' | 'internal';
|
|
25
27
|
export interface ExtendsField {
|
|
@@ -52,6 +54,7 @@ export interface CompleteInfoMetaData {
|
|
|
52
54
|
name: string;
|
|
53
55
|
required: boolean;
|
|
54
56
|
validateRules: CompleteInfoRule[];
|
|
57
|
+
checkUnique?: boolean;
|
|
55
58
|
options?: CompleteInfoSelectOption[];
|
|
56
59
|
}
|
|
57
60
|
export declare enum CompleteInfoBaseControls {
|
|
@@ -70,7 +73,8 @@ export declare enum CompleteInfoExtendsControls {
|
|
|
70
73
|
STRING = "string",
|
|
71
74
|
TEXT = "text",
|
|
72
75
|
GENDER = "gender",
|
|
73
|
-
COUNTRY = "country"
|
|
76
|
+
COUNTRY = "country",
|
|
77
|
+
TREE = "tree"
|
|
74
78
|
}
|
|
75
79
|
export interface CompleteInfoInitData {
|
|
76
80
|
skip: boolean;
|
|
@@ -2,7 +2,7 @@ import { AuthenticationClient, CommonMessage, SceneType } from 'authing-js-sdk';
|
|
|
2
2
|
import { EmailScene, IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '../Type';
|
|
3
3
|
export interface ForgetPasswordEvents extends IG2Events {
|
|
4
4
|
onEmailSend?: (authClient: AuthenticationClient, sence?: EmailScene) => void;
|
|
5
|
-
onEmailSendError?: (error
|
|
5
|
+
onEmailSendError?: (error: CommonMessage, authClient: AuthenticationClient, sence?: EmailScene) => void;
|
|
6
6
|
onPhoneSend?: (authClient: AuthenticationClient, sence?: SceneType) => void;
|
|
7
7
|
onPhoneSendError?: (error: CommonMessage, authClient: AuthenticationClient, sence?: SceneType) => void;
|
|
8
8
|
onPwdReset?: (authClient: AuthenticationClient) => void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { GuardProps } from '..';
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { ModuleState } from '../GuardModule/stateMachine';
|
|
4
4
|
export declare const RenderContext: React.FC<{
|
|
5
5
|
guardProps: GuardProps;
|
|
6
6
|
initState: ModuleState;
|
|
7
|
-
children: ReactNode;
|
|
8
7
|
}>;
|
package/types/Guard/module.d.ts
CHANGED
|
@@ -14,10 +14,12 @@ export declare const enum GuardModuleType {
|
|
|
14
14
|
LOGIN_COMPLETE_INFO = "loginCompleteInfo",
|
|
15
15
|
REGISTER_PASSWORD = "registerPassword",
|
|
16
16
|
REGISTER_COMPLETE_INFO = "registerCompleteInfo",
|
|
17
|
+
CUSTOM_COMPLETE_INFO = "customCompleteInfo",
|
|
17
18
|
RECOVERY_CODE = "recoveryCode",
|
|
18
19
|
SUBMIT_SUCCESS = "submitSuccess",
|
|
19
20
|
IDENTITY_BINDING_ASK = "identityBindingAsk",
|
|
20
21
|
IDENTITY_BINDING = "identityBinding",
|
|
22
|
+
ACCOUNT_MERGE = "accountMerge",
|
|
21
23
|
SELF_UNLOCK = "selfUnlock",
|
|
22
24
|
FLOW_SELECT_ACCOUNT = "flowSelectAccount"
|
|
23
25
|
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Input } from 'antd';
|
|
2
|
+
import { PasswordProps } from 'antd/lib/input';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare const InputPassword: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.RefObject<Input>>>;
|
package/types/MFA/interface.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import './index.less';
|
|
3
3
|
import { CodeStatusDescriptions } from './WorkQrCode';
|
|
4
4
|
export declare type CodeStatus = 'loading' | 'ready' | 'already' | 'success' | 'error' | 'expired' | 'cancel' | 'MFA';
|
|
5
|
-
export declare const prefix
|
|
5
|
+
export declare const prefix = "refactor";
|
|
6
6
|
export interface UiQrProps {
|
|
7
7
|
/**
|
|
8
8
|
* Loading 组件
|
|
@@ -253,6 +253,9 @@ export interface ApplicationConfig {
|
|
|
253
253
|
verifyCodeLength: number;
|
|
254
254
|
websocket: string;
|
|
255
255
|
welcomeMessage: any;
|
|
256
|
+
userPortal?: {
|
|
257
|
+
mergeAccount?: boolean;
|
|
258
|
+
};
|
|
256
259
|
skipComplateFileds: boolean;
|
|
257
260
|
selfUnlockStrategy: 'captcha' | 'password-captcha';
|
|
258
261
|
defaultLanguageConfig: Lang;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig } from '..';
|
|
3
3
|
import { BackFillMultipleState, StoreInstance } from '../Guard/core/hooks/useMultipleAccounts';
|
|
4
4
|
import { ModuleState } from '../Guard/GuardModule/stateMachine';
|
|
@@ -46,14 +46,12 @@ export interface IGuardContext {
|
|
|
46
46
|
export declare const createGuardXContext: () => {
|
|
47
47
|
Provider: React.FC<{
|
|
48
48
|
value: Partial<IGuardContext>;
|
|
49
|
-
children: ReactNode;
|
|
50
49
|
}>;
|
|
51
50
|
Consumer: React.Consumer<IGuardContext>;
|
|
52
51
|
};
|
|
53
52
|
export declare const useGuardXContext: () => {
|
|
54
53
|
Provider: React.FC<{
|
|
55
54
|
value: Partial<IGuardContext>;
|
|
56
|
-
children: ReactNode;
|
|
57
55
|
}>;
|
|
58
56
|
Consumer: React.Consumer<IGuardContext>;
|
|
59
57
|
};
|
|
@@ -62,9 +60,7 @@ export interface IGuardContextProvider {
|
|
|
62
60
|
spinChange: (spin: boolean) => void;
|
|
63
61
|
}
|
|
64
62
|
export declare const useGuardButtonContext: () => {
|
|
65
|
-
GuardButtonProvider: React.FC<{
|
|
66
|
-
children: ReactNode;
|
|
67
|
-
}>;
|
|
63
|
+
GuardButtonProvider: React.FC<{}>;
|
|
68
64
|
};
|
|
69
65
|
export declare const useGuardButtonState: () => IGuardContextProvider;
|
|
70
66
|
export declare const useGuardPublicConfig: () => ApplicationConfig;
|
|
@@ -28,10 +28,6 @@ export declare const parsePhone: (isInternationSms: boolean, fieldValue: string,
|
|
|
28
28
|
countryCode: string | undefined;
|
|
29
29
|
phoneNumber: string;
|
|
30
30
|
};
|
|
31
|
-
export declare const enum SocialConnectionEvent {
|
|
32
|
-
Message = "message",
|
|
33
|
-
Auth = "auth"
|
|
34
|
-
}
|
|
35
31
|
/**
|
|
36
32
|
*
|
|
37
33
|
* @param config
|
package/types/_utils/index.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export declare function isObject(item: any): any;
|
|
|
34
34
|
* @param target
|
|
35
35
|
* @param ...sources
|
|
36
36
|
*/
|
|
37
|
-
export declare function deepMerge<T extends
|
|
37
|
+
export declare function deepMerge<T extends any = any>(target: T, ...sources: any[]): T;
|
|
38
38
|
/**
|
|
39
39
|
* 在托管页下上传query中指定的用户自定义字段进行补全
|
|
40
40
|
* @param params 指定上传的用户自定义字段
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.0.
|
|
1
|
+
declare const _default: "4.0.14-hep.0";
|
|
2
2
|
export default _default;
|