@authing/react-ui-components 4.0.6-zhihu.0 → 4.0.7-alpha.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 +2 -2
- package/lib/index.min.js +1 -1
- package/package.json +2 -2
- 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/BindTotp/businessRequest.d.ts +1 -1
- package/types/ChangeAccoutType/index.d.ts +3 -0
- package/types/ChangeLanguage/index.d.ts +1 -1
- package/types/ChangePassword/businessRequest.d.ts +1 -1
- package/types/CompleteInfo/businessRequest.d.ts +1 -1
- package/types/CompleteInfo/core/components/TreeSelect.d.ts +11 -0
- package/types/CompleteInfo/interface.d.ts +2 -2
- package/types/ForgetPassword/core/resetPassword.d.ts +0 -2
- package/types/ForgetPassword/interface.d.ts +6 -6
- package/types/Guard/GuardModule/stateMachine.d.ts +2 -2
- package/types/Guard/config.d.ts +0 -2
- package/types/Guard/core/renderModule.d.ts +1 -1
- package/types/Guard/event.d.ts +10 -8
- package/types/Guard/module.d.ts +2 -1
- package/types/IdentityBinding/businessRequest.d.ts +2 -2
- package/types/Login/interface.d.ts +2 -2
- package/types/Login/socialLogin/index.d.ts +1 -1
- package/types/MFA/businessRequest.d.ts +1 -1
- package/types/MFA/interface.d.ts +1 -1
- package/types/RecoveryCode/businessRequest.d.ts +1 -1
- package/types/Type/application.d.ts +7 -13
- package/types/Type/index.d.ts +6 -6
- package/types/_utils/GuardErrorCode.d.ts +1 -1
- package/types/_utils/config/index.d.ts +101 -89
- package/types/_utils/hooks/index.d.ts +1 -1
- package/types/_utils/index.d.ts +1 -3
- package/types/_utils/logger/interface.d.ts +1 -1
- package/types/_utils/responseManagement/interface.d.ts +4 -3
- package/types/version/version.d.ts +1 -1
- package/dist/asset-manifest.json +0 -26
- package/dist/index.html +0 -1
- package/dist/static/css/2.2cdfb9d1.chunk.css +0 -3
- package/dist/static/css/2.2cdfb9d1.chunk.css.map +0 -1
- package/dist/static/css/main.f438f284.chunk.css +0 -2
- package/dist/static/css/main.f438f284.chunk.css.map +0 -1
- package/dist/static/js/2.9a1287ca.chunk.js +0 -3
- package/dist/static/js/2.9a1287ca.chunk.js.LICENSE.txt +0 -112
- package/dist/static/js/2.9a1287ca.chunk.js.map +0 -1
- package/dist/static/js/3.d3328d89.chunk.js +0 -2
- package/dist/static/js/3.d3328d89.chunk.js.map +0 -1
- package/dist/static/js/main.5735e6f1.chunk.js +0 -2
- package/dist/static/js/main.5735e6f1.chunk.js.map +0 -1
- package/dist/static/js/runtime-main.e75981a3.js +0 -2
- package/dist/static/js/runtime-main.e75981a3.js.map +0 -1
- package/dist/static/media/loading.3cf0104f.svg +0 -32
- package/types/Login/core/withLandrayQrcode.d.ts +0 -11
- package/types/Login/core/withWeComQrcode.d.ts +0 -2
- package/types/_utils/types.d.ts +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authing/react-ui-components",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.7-alpha.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "lib/index.min.js",
|
|
6
6
|
"typings": "types/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"antd": "^4.8.0",
|
|
14
|
-
"authing-js-sdk": "4.23.
|
|
14
|
+
"authing-js-sdk": "4.23.36-alpha.1",
|
|
15
15
|
"classnames": "^2.3.1",
|
|
16
16
|
"fastclick": "^1.0.6",
|
|
17
17
|
"global": "^4.4.0",
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
export declare enum ChangePasswordBusinessAction {
|
|
1
|
+
export declare const enum ChangePasswordBusinessAction {
|
|
2
2
|
ResetPassword = "reset-password-first-time",
|
|
3
3
|
FirstLoginReset = "reset-password-forced",
|
|
4
4
|
ResetPasswordStrengthDetection = "reset-password-strength-detection"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { User } from 'authing-js-sdk';
|
|
2
2
|
import { CompleteInfoRequest, RegisterCompleteInfoInitData } from './interface';
|
|
3
|
-
export declare enum CompleteInfoAuthFlowAction {
|
|
3
|
+
export declare const enum CompleteInfoAuthFlowAction {
|
|
4
4
|
Complete = "complete-completion",
|
|
5
5
|
Skip = "skip-completion"
|
|
6
6
|
}
|
|
@@ -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;
|
|
@@ -5,11 +5,11 @@ export interface CompleteInfoConfig extends IG2Config {
|
|
|
5
5
|
export declare const getDefaultCompleteInfoConfig: () => CompleteInfoConfig;
|
|
6
6
|
export interface CompleteInfoEvents extends IG2Events {
|
|
7
7
|
onRegisterInfoCompleted?: (user: User, udfs: {
|
|
8
|
-
|
|
8
|
+
key: any;
|
|
9
9
|
value: any;
|
|
10
10
|
}[], authClient: AuthenticationClient) => void;
|
|
11
11
|
onRegisterInfoCompletedError?: (error: CommonMessage, udfs: {
|
|
12
|
-
|
|
12
|
+
key: any;
|
|
13
13
|
value: any;
|
|
14
14
|
}[], authClient: AuthenticationClient) => void;
|
|
15
15
|
}
|
|
@@ -6,8 +6,6 @@ export declare enum InputMethodMap {
|
|
|
6
6
|
interface ResetPasswordProps {
|
|
7
7
|
onReset: any;
|
|
8
8
|
publicConfig: any;
|
|
9
|
-
onSend: (type: 'email' | 'phone') => void;
|
|
10
|
-
onSendError: (type: 'email' | 'phone', error: any) => void;
|
|
11
9
|
}
|
|
12
10
|
export declare const ResetPassword: (props: ResetPasswordProps) => JSX.Element;
|
|
13
11
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AuthenticationClient, CommonMessage } from 'authing-js-sdk';
|
|
2
|
-
import { IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '../Type';
|
|
1
|
+
import { AuthenticationClient, CommonMessage, SceneType } from 'authing-js-sdk';
|
|
2
|
+
import { EmailScene, IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '../Type';
|
|
3
3
|
export interface ForgetPasswordEvents extends IG2Events {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
onEmailSend?: (authClient: AuthenticationClient, sence?: EmailScene) => void;
|
|
5
|
+
onEmailSendError?: (error: CommonMessage, authClient: AuthenticationClient, sence?: EmailScene) => void;
|
|
6
|
+
onPhoneSend?: (authClient: AuthenticationClient, sence?: SceneType) => void;
|
|
7
|
+
onPhoneSendError?: (error: CommonMessage, authClient: AuthenticationClient, sence?: SceneType) => void;
|
|
8
8
|
onPwdReset?: (authClient: AuthenticationClient) => void;
|
|
9
9
|
onPwdResetError?: (error: CommonMessage, authClient: AuthenticationClient) => void;
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ export interface ModuleState {
|
|
|
4
4
|
moduleName: GuardModuleType;
|
|
5
5
|
initData?: any;
|
|
6
6
|
}
|
|
7
|
-
export declare enum ActionType {
|
|
7
|
+
export declare const enum ActionType {
|
|
8
8
|
ChangeModule = "ChangeModule",
|
|
9
9
|
Back = "Back",
|
|
10
10
|
Init = "Init"
|
|
@@ -29,7 +29,7 @@ export declare class GuardStateMachine {
|
|
|
29
29
|
end: () => void;
|
|
30
30
|
historyPush: (data: ModuleState, actionType?: ActionType) => void;
|
|
31
31
|
historyBack: (data: ModuleState) => void;
|
|
32
|
-
setConfig: (config: GuardLocalConfig) => void;
|
|
32
|
+
setConfig: (config: Partial<GuardLocalConfig>) => void;
|
|
33
33
|
isUseHistoryHijack: () => boolean;
|
|
34
34
|
onPopstate: () => void;
|
|
35
35
|
}
|
package/types/Guard/config.d.ts
CHANGED
|
@@ -2,8 +2,6 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { GuardModuleType } from '.';
|
|
3
3
|
import { LoginConfig } from '../Login/interface';
|
|
4
4
|
import { RegisterConfig } from '../Register/interface';
|
|
5
|
-
export interface GuardComponentConfig extends Partial<GuardLocalConfig> {
|
|
6
|
-
}
|
|
7
5
|
export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
|
|
8
6
|
isSSO?: boolean;
|
|
9
7
|
defaultScenes?: GuardModuleType;
|
package/types/Guard/event.d.ts
CHANGED
|
@@ -51,10 +51,10 @@ export declare const GuardEventsCamelToKebabMapping: {
|
|
|
51
51
|
readonly onRegister: "register";
|
|
52
52
|
readonly onBeforeRegister: "before-register";
|
|
53
53
|
readonly onRegisterError: "register-error";
|
|
54
|
-
readonly
|
|
55
|
-
readonly
|
|
56
|
-
readonly
|
|
57
|
-
readonly
|
|
54
|
+
readonly onEmailSend: "email-send";
|
|
55
|
+
readonly onEmailSendError: "email-send-error";
|
|
56
|
+
readonly onPhoneSend: "phone-send";
|
|
57
|
+
readonly onPhoneSendError: "phone-send-error";
|
|
58
58
|
readonly onPwdReset: "pwd-reset";
|
|
59
59
|
readonly onPwdResetError: "pwd-reset-error";
|
|
60
60
|
readonly onClose: "close";
|
|
@@ -63,6 +63,7 @@ export declare const GuardEventsCamelToKebabMapping: {
|
|
|
63
63
|
readonly onRegisterInfoCompleted: "register-info-completed";
|
|
64
64
|
readonly onRegisterInfoCompletedError: "register-info-completed-error";
|
|
65
65
|
readonly onLangChange: "lang-change";
|
|
66
|
+
readonly onBeforeChangeModule: "before-change-module";
|
|
66
67
|
};
|
|
67
68
|
export interface GuardEventsKebabToCamelType {
|
|
68
69
|
load: GuardEvents['onLoad'];
|
|
@@ -73,10 +74,10 @@ export interface GuardEventsKebabToCamelType {
|
|
|
73
74
|
'before-register': GuardEvents['onBeforeRegister'];
|
|
74
75
|
register: GuardEvents['onRegister'];
|
|
75
76
|
'register-error': GuardEvents['onRegisterError'];
|
|
76
|
-
'
|
|
77
|
-
'
|
|
78
|
-
'
|
|
79
|
-
'
|
|
77
|
+
'email-send': GuardEvents['onEmailSend'];
|
|
78
|
+
'email-send-error': GuardEvents['onEmailSendError'];
|
|
79
|
+
'phone-send': GuardEvents['onPhoneSend'];
|
|
80
|
+
'phone-send-error': GuardEvents['onPhoneSendError'];
|
|
80
81
|
'pwd-reset': GuardEvents['onPwdReset'];
|
|
81
82
|
'pwd-reset-error': GuardEvents['onPwdResetError'];
|
|
82
83
|
close: GuardEvents['onClose'];
|
|
@@ -85,4 +86,5 @@ export interface GuardEventsKebabToCamelType {
|
|
|
85
86
|
'register-info-completed': GuardEvents['onRegisterInfoCompleted'];
|
|
86
87
|
'register-info-completed-error': GuardEvents['onRegisterInfoCompletedError'];
|
|
87
88
|
'lang-change': GuardEvents['onLangChange'];
|
|
89
|
+
'before-change-module': GuardEvents['onBeforeChangeModule'];
|
|
88
90
|
}
|
package/types/Guard/module.d.ts
CHANGED
|
@@ -18,7 +18,8 @@ export declare enum GuardModuleType {
|
|
|
18
18
|
SUBMIT_SUCCESS = "submitSuccess",
|
|
19
19
|
IDENTITY_BINDING_ASK = "identityBindingAsk",
|
|
20
20
|
IDENTITY_BINDING = "identityBinding",
|
|
21
|
-
SELF_UNLOCK = "selfUnlock"
|
|
21
|
+
SELF_UNLOCK = "selfUnlock",
|
|
22
|
+
ACCOUNT_TYPE_SELECTION = "account_type_selection"
|
|
22
23
|
}
|
|
23
24
|
export interface GuardModuleAction {
|
|
24
25
|
action: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare enum IdentityBindingBusinessAction {
|
|
1
|
+
export declare const enum IdentityBindingBusinessAction {
|
|
2
2
|
PhoneCode = "phone-code",
|
|
3
3
|
EmailCode = "emial-code",
|
|
4
4
|
Password = "password"
|
|
@@ -17,7 +17,7 @@ export interface PasswordParams {
|
|
|
17
17
|
password: string;
|
|
18
18
|
captchaCode: string;
|
|
19
19
|
}
|
|
20
|
-
export declare enum IdentityBindingAction {
|
|
20
|
+
export declare const enum IdentityBindingAction {
|
|
21
21
|
CreateUser = "create-federation-account",
|
|
22
22
|
BindByPassword = "bind-identity-by-password",
|
|
23
23
|
BindByPhoneCode = "bind-identity-by-phone-code",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '../Type';
|
|
2
|
-
import { AuthenticationClient,
|
|
2
|
+
import { AuthenticationClient, User } from 'authing-js-sdk';
|
|
3
3
|
import { QrCodeAuthenticationClient } from 'authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient';
|
|
4
|
-
import { Agreement, LoginMethods, PasswordLoginMethods } from '../Type/application';
|
|
4
|
+
import { Agreement, LoginMethods, PasswordLoginMethods, SocialConnectionProvider } from '../Type/application';
|
|
5
5
|
export interface LoginConfig extends IG2Config {
|
|
6
6
|
autoRegister?: boolean;
|
|
7
7
|
disableResetPwd?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './style.less';
|
|
3
3
|
import { GuardLocalConfig } from '../../Guard';
|
|
4
|
+
import { ApplicationConfig, SocialConnectionItem } from '../../Type/application';
|
|
4
5
|
import { StoreInstance } from '../../Guard/core/hooks/useMultipleAccounts';
|
|
5
|
-
import { ApplicationConfig, SocialConnectionItem } from '../../Type';
|
|
6
6
|
export interface SocialLoginProps {
|
|
7
7
|
appId: string;
|
|
8
8
|
config: GuardLocalConfig;
|
package/types/MFA/interface.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const getDefaultMFAConfig: () => MFAConfig;
|
|
|
7
7
|
export interface MFAEvents extends IG2Events {
|
|
8
8
|
onLogin?: (user: User, authClient: AuthenticationClient) => void;
|
|
9
9
|
}
|
|
10
|
-
export declare enum MFAType {
|
|
10
|
+
export declare const enum MFAType {
|
|
11
11
|
SMS = "SMS",
|
|
12
12
|
EMAIL = "EMAIL",
|
|
13
13
|
TOTP = "OTP",
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Lang } from '..';
|
|
2
2
|
import { PasswordStrength } from '../_utils';
|
|
3
|
-
export
|
|
3
|
+
export * from 'authing-js-sdk';
|
|
4
|
+
export declare const enum LoginMethods {
|
|
4
5
|
LDAP = "ldap",
|
|
5
6
|
AppQr = "app-qrcode",
|
|
6
7
|
Password = "password",
|
|
7
8
|
PhoneCode = "phone-code",
|
|
8
9
|
WxMinQr = "wechat-miniprogram-qrcode",
|
|
9
10
|
AD = "ad",
|
|
10
|
-
WechatMpQrcode = "wechatmp-qrcode"
|
|
11
|
-
WechatworkCorpQrconnect = "wechatwork-corp-qrconnect"
|
|
11
|
+
WechatMpQrcode = "wechatmp-qrcode"
|
|
12
12
|
}
|
|
13
|
-
export declare enum OIDCConnectionMode {
|
|
13
|
+
export declare const enum OIDCConnectionMode {
|
|
14
14
|
FRONT_CHANNEL = "FRONT_CHANNEL",
|
|
15
15
|
BACK_CHANNEL = "BACK_CHANNEL"
|
|
16
16
|
}
|
|
17
|
-
export declare enum SocialConnectionProvider {
|
|
17
|
+
export declare const enum SocialConnectionProvider {
|
|
18
18
|
ALIPAY = "alipay",
|
|
19
19
|
GOOGLE = "google",
|
|
20
20
|
WECHATPC = "wechat:pc",
|
|
@@ -41,7 +41,7 @@ export declare enum SocialConnectionProvider {
|
|
|
41
41
|
QINGCLOUD = "qingcloud",
|
|
42
42
|
FACEBOOK = "facebook"
|
|
43
43
|
}
|
|
44
|
-
export declare enum Protocol {
|
|
44
|
+
export declare const enum Protocol {
|
|
45
45
|
AD = "ad",
|
|
46
46
|
CAS = "cas",
|
|
47
47
|
LDAP = "ldap",
|
|
@@ -98,7 +98,7 @@ export interface SocialConnectionItem {
|
|
|
98
98
|
authorizationUrl: string;
|
|
99
99
|
tooltip: Record<Lang, string>;
|
|
100
100
|
}
|
|
101
|
-
export declare enum RegisterMethods {
|
|
101
|
+
export declare const enum RegisterMethods {
|
|
102
102
|
Email = "email",
|
|
103
103
|
Phone = "phone",
|
|
104
104
|
EmailCode = "emailCode"
|
|
@@ -107,12 +107,6 @@ export declare type QrcodeTabsSettings = Record<LoginMethods, Array<{
|
|
|
107
107
|
id: string;
|
|
108
108
|
title: string;
|
|
109
109
|
isDefault?: boolean;
|
|
110
|
-
QRConfig?: {
|
|
111
|
-
corpId: string;
|
|
112
|
-
agentId: string;
|
|
113
|
-
redirectUrl: string;
|
|
114
|
-
identifier: string;
|
|
115
|
-
};
|
|
116
110
|
}>>;
|
|
117
111
|
export interface OidcClientMetadata {
|
|
118
112
|
grant_types: string[];
|
package/types/Type/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ApplicationConfig } from './application';
|
|
|
5
5
|
export * from './application';
|
|
6
6
|
export type { CommonMessage, User };
|
|
7
7
|
export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
|
|
8
|
-
export declare enum GuardMode {
|
|
8
|
+
export declare const enum GuardMode {
|
|
9
9
|
Modal = "modal",
|
|
10
10
|
Normal = "normal"
|
|
11
11
|
}
|
|
@@ -33,7 +33,7 @@ export interface IG2Config {
|
|
|
33
33
|
title?: string;
|
|
34
34
|
logo?: string;
|
|
35
35
|
lang?: string;
|
|
36
|
-
langRange?:
|
|
36
|
+
langRange?: Lang[];
|
|
37
37
|
host: string;
|
|
38
38
|
isHost?: boolean;
|
|
39
39
|
mode: GuardMode;
|
|
@@ -48,18 +48,18 @@ export interface IG2Config {
|
|
|
48
48
|
}
|
|
49
49
|
export interface IG2Events {
|
|
50
50
|
onLoad?: (authClient: AuthenticationClient) => void;
|
|
51
|
-
onLoadError?: (error:
|
|
51
|
+
onLoadError?: (error: any) => void;
|
|
52
52
|
onClose?: () => void;
|
|
53
53
|
onLangChange?: (lang: Lang) => void;
|
|
54
54
|
__changeModule?: (moduleName: GuardModuleType, initData?: any) => void;
|
|
55
55
|
}
|
|
56
56
|
export declare const getDefaultG2Config: () => IG2Config;
|
|
57
57
|
export declare const LanguageMap: any;
|
|
58
|
-
export declare enum InputMethod {
|
|
58
|
+
export declare const enum InputMethod {
|
|
59
59
|
EmailCode = "email-code",
|
|
60
60
|
PhoneCode = "phone-code"
|
|
61
61
|
}
|
|
62
|
-
export declare enum GuardPageSene {
|
|
62
|
+
export declare const enum GuardPageSene {
|
|
63
63
|
Global = "global"
|
|
64
64
|
}
|
|
65
65
|
export interface GuardPageConfig {
|
|
@@ -68,7 +68,7 @@ export interface GuardPageConfig {
|
|
|
68
68
|
defaultLanguage: Lang | 'browser';
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
export declare enum EmailScene {
|
|
71
|
+
export declare const enum EmailScene {
|
|
72
72
|
WELCOME_EMAIL = "WELCOME_EMAIL",
|
|
73
73
|
FIRST_CREATED_USER = "FIRST_CREATED_USER",
|
|
74
74
|
REGISTER_VERIFY_CODE = "REGISTER_VERIFY_CODE",
|
|
@@ -1,96 +1,108 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { GuardLocalConfig } from '../../Guard/config';
|
|
3
3
|
import { GuardHttp } from '../guardHttp';
|
|
4
4
|
import { GuardPageConfig } from '../../Type';
|
|
5
|
-
import { ApplicationConfig, RegisterMethods } from '../../Type/application';
|
|
5
|
+
import { ApplicationConfig, LoginMethods, RegisterMethods } from '../../Type/application';
|
|
6
6
|
export declare const getPublicConfig: (appId: string) => ApplicationConfig;
|
|
7
7
|
export declare const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
|
|
8
|
-
export declare const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
|
|
9
|
-
export declare const useMergePublicConfig: (forceUpdate: number, appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
|
|
10
|
-
host: string;
|
|
11
|
-
isSSO?: boolean | undefined;
|
|
12
|
-
defaultScenes?: import("../..").GuardModuleType | undefined;
|
|
13
|
-
defaultInitData?: any;
|
|
14
|
-
showLoading?: boolean | undefined;
|
|
15
|
-
loadingComponent?: import("react").ReactNode;
|
|
16
|
-
openEventsMapping?: boolean | undefined;
|
|
17
|
-
disableRegister?: boolean | undefined;
|
|
18
|
-
registerMethods?: RegisterMethods[] | undefined;
|
|
19
|
-
defaultRegisterMethod?: RegisterMethods | undefined;
|
|
20
|
-
publicKey?: string | undefined;
|
|
21
|
-
agreementEnabled?: boolean | undefined;
|
|
22
|
-
agreements?: import("../../Type").Agreement[] | undefined;
|
|
23
|
-
registerContext?: any;
|
|
24
|
-
title?: string | undefined;
|
|
25
|
-
logo?: string | undefined;
|
|
26
|
-
lang?: string | undefined;
|
|
27
|
-
langRange?: string[] | undefined;
|
|
28
|
-
isHost?: boolean | undefined;
|
|
29
|
-
mode: import("../../Type").GuardMode;
|
|
30
|
-
clickCloseable: boolean;
|
|
31
|
-
escCloseable: boolean;
|
|
32
|
-
userpool?: string | undefined;
|
|
33
|
-
contentCss?: string | undefined;
|
|
34
|
-
target?: string | HTMLElement | undefined;
|
|
35
|
-
__internalRequest__?: boolean | undefined;
|
|
36
|
-
__singleComponent__?: boolean | undefined;
|
|
37
|
-
__unAuthFlow__?: boolean | undefined;
|
|
38
|
-
autoRegister?: boolean | undefined;
|
|
39
|
-
disableResetPwd?: boolean | undefined;
|
|
40
|
-
defaultLoginMethod?: import("../../Type").LoginMethods | undefined;
|
|
41
|
-
loginMethods?: import("../../Type").LoginMethods[] | undefined;
|
|
42
|
-
passwordLoginMethods?: import("../../Type").PasswordLoginMethods[] | undefined;
|
|
43
|
-
socialConnections?: import("authing-js-sdk").SocialConnectionProvider[] | undefined;
|
|
44
|
-
socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
|
|
45
|
-
enterpriseConnections?: string[] | undefined;
|
|
46
|
-
qrCodeScanOptions?: {
|
|
47
|
-
extIdpConnId?: string | undefined;
|
|
48
|
-
autoExchangeUserInfo?: boolean | undefined;
|
|
49
|
-
size?: {
|
|
50
|
-
height: number;
|
|
51
|
-
width: number;
|
|
52
|
-
} | undefined;
|
|
53
|
-
containerSize?: {
|
|
54
|
-
height: number;
|
|
55
|
-
width: number;
|
|
56
|
-
} | undefined;
|
|
57
|
-
interval?: number | undefined;
|
|
58
|
-
onStart?: ((timer: any) => any) | undefined;
|
|
59
|
-
onResult?: ((data: import("authing-js-sdk").QRCodeStatus) => any) | undefined;
|
|
60
|
-
onScanned?: ((userInfo: import("authing-js-sdk").QRCodeUserInfo) => any) | undefined;
|
|
61
|
-
onSuccess?: ((userInfo: import("authing-js-sdk").QRCodeUserInfo, ticket: string) => any) | undefined;
|
|
62
|
-
onCancel?: (() => any) | undefined;
|
|
63
|
-
onError?: ((message: string) => any) | undefined;
|
|
64
|
-
onExpired?: (() => any) | undefined;
|
|
65
|
-
onCodeShow?: ((random: string, url: string) => any) | undefined;
|
|
66
|
-
onCodeLoaded?: ((random: string, url: string) => any) | undefined;
|
|
67
|
-
onCodeLoadFailed?: ((message: string) => any) | undefined;
|
|
68
|
-
onCodeDestroyed?: ((random: string) => any) | undefined;
|
|
69
|
-
onRetry?: (() => any) | undefined;
|
|
70
|
-
onMfa?: ((code: number, message: string, data: Record<string, any>) => {}) | undefined;
|
|
71
|
-
tips?: {
|
|
72
|
-
title?: string | undefined;
|
|
73
|
-
scanned?: string | undefined;
|
|
74
|
-
succeed?: string | undefined;
|
|
75
|
-
canceled?: string | undefined;
|
|
76
|
-
expired?: string | undefined;
|
|
77
|
-
retry?: string | undefined;
|
|
78
|
-
failed?: string | undefined;
|
|
79
|
-
middleTitle?: string | undefined;
|
|
80
|
-
referText?: string | undefined;
|
|
81
|
-
} | undefined;
|
|
82
|
-
onAuthFlow?: ((flow: Record<string, any>) => {}) | undefined;
|
|
83
|
-
customData?: {
|
|
84
|
-
[x: string]: any;
|
|
85
|
-
} | undefined;
|
|
86
|
-
context?: {
|
|
87
|
-
[x: string]: any;
|
|
88
|
-
} | undefined;
|
|
89
|
-
withCustomData?: boolean | undefined;
|
|
90
|
-
} | undefined;
|
|
91
|
-
_closeLoopCheckQrcode?: boolean | undefined;
|
|
92
|
-
} | undefined;
|
|
93
8
|
export declare const getPageConfig: (appId: string) => GuardPageConfig;
|
|
94
9
|
export declare const setPageConfig: (appId: string, config: GuardPageConfig) => GuardPageConfig;
|
|
95
|
-
export declare const
|
|
96
|
-
|
|
10
|
+
export declare const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: Partial<GuardLocalConfig> | undefined) => GuardLocalConfig | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* 请求服务console关于guard的配置
|
|
13
|
+
* @param forceUpdate
|
|
14
|
+
* @param appId
|
|
15
|
+
* @param config
|
|
16
|
+
* @param httpClient
|
|
17
|
+
* @param setError
|
|
18
|
+
*/
|
|
19
|
+
export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
|
|
20
|
+
finallyConfig: {
|
|
21
|
+
host: string;
|
|
22
|
+
isSSO?: boolean | undefined;
|
|
23
|
+
defaultScenes?: import("../..").GuardModuleType | undefined;
|
|
24
|
+
defaultInitData?: any;
|
|
25
|
+
showLoading?: boolean | undefined;
|
|
26
|
+
loadingComponent?: import("react").ReactNode;
|
|
27
|
+
openEventsMapping?: boolean | undefined;
|
|
28
|
+
disableRegister?: boolean | undefined;
|
|
29
|
+
registerMethods?: RegisterMethods[] | undefined;
|
|
30
|
+
defaultRegisterMethod?: RegisterMethods | undefined;
|
|
31
|
+
publicKey?: string | undefined;
|
|
32
|
+
agreementEnabled?: boolean | undefined;
|
|
33
|
+
agreements?: import("../../Type").Agreement[] | undefined;
|
|
34
|
+
registerContext?: any;
|
|
35
|
+
title?: string | undefined;
|
|
36
|
+
logo?: string | undefined;
|
|
37
|
+
lang?: string | undefined;
|
|
38
|
+
langRange?: import("../../Type").Lang[] | undefined;
|
|
39
|
+
isHost?: boolean | undefined;
|
|
40
|
+
mode: import("../../Type").GuardMode;
|
|
41
|
+
clickCloseable: boolean;
|
|
42
|
+
escCloseable: boolean;
|
|
43
|
+
userpool?: string | undefined;
|
|
44
|
+
contentCss?: string | undefined;
|
|
45
|
+
target?: string | HTMLElement | undefined;
|
|
46
|
+
__internalRequest__?: boolean | undefined;
|
|
47
|
+
__singleComponent__?: boolean | undefined;
|
|
48
|
+
__unAuthFlow__?: boolean | undefined;
|
|
49
|
+
autoRegister?: boolean | undefined;
|
|
50
|
+
disableResetPwd?: boolean | undefined;
|
|
51
|
+
defaultLoginMethod?: LoginMethods | undefined;
|
|
52
|
+
loginMethods?: LoginMethods[] | undefined;
|
|
53
|
+
passwordLoginMethods?: import("../../Type").PasswordLoginMethods[] | undefined;
|
|
54
|
+
socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
|
|
55
|
+
socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
|
|
56
|
+
enterpriseConnections?: string[] | undefined;
|
|
57
|
+
qrCodeScanOptions?: {
|
|
58
|
+
extIdpConnId?: string | undefined;
|
|
59
|
+
autoExchangeUserInfo?: boolean | undefined;
|
|
60
|
+
size?: {
|
|
61
|
+
height: number;
|
|
62
|
+
width: number;
|
|
63
|
+
} | undefined;
|
|
64
|
+
containerSize?: {
|
|
65
|
+
height: number;
|
|
66
|
+
width: number;
|
|
67
|
+
} | undefined;
|
|
68
|
+
interval?: number | undefined;
|
|
69
|
+
onStart?: ((timer: any) => any) | undefined;
|
|
70
|
+
onResult?: ((data: import("authing-js-sdk/build/main/lib/authentication/types").QRCodeStatus) => any) | undefined;
|
|
71
|
+
onScanned?: ((userInfo: import("authing-js-sdk/build/main/lib/authentication/types").QRCodeUserInfo) => any) | undefined;
|
|
72
|
+
onSuccess?: ((userInfo: import("authing-js-sdk/build/main/lib/authentication/types").QRCodeUserInfo, ticket: string) => any) | undefined;
|
|
73
|
+
onCancel?: (() => any) | undefined;
|
|
74
|
+
onError?: ((message: string) => any) | undefined;
|
|
75
|
+
onExpired?: (() => any) | undefined;
|
|
76
|
+
onCodeShow?: ((random: string, url: string) => any) | undefined;
|
|
77
|
+
onCodeLoaded?: ((random: string, url: string) => any) | undefined;
|
|
78
|
+
onCodeLoadFailed?: ((message: string) => any) | undefined;
|
|
79
|
+
onCodeDestroyed?: ((random: string) => any) | undefined;
|
|
80
|
+
onRetry?: (() => any) | undefined;
|
|
81
|
+
onMfa?: ((code: number, message: string, data: Record<string, any>) => {}) | undefined;
|
|
82
|
+
tips?: {
|
|
83
|
+
title?: string | undefined;
|
|
84
|
+
scanned?: string | undefined;
|
|
85
|
+
succeed?: string | undefined;
|
|
86
|
+
canceled?: string | undefined;
|
|
87
|
+
expired?: string | undefined;
|
|
88
|
+
retry?: string | undefined;
|
|
89
|
+
failed?: string | undefined;
|
|
90
|
+
middleTitle?: string | undefined;
|
|
91
|
+
referText?: string | undefined;
|
|
92
|
+
} | undefined;
|
|
93
|
+
onAuthFlow?: ((flow: Record<string, any>) => {}) | undefined;
|
|
94
|
+
customData?: {
|
|
95
|
+
[x: string]: any;
|
|
96
|
+
} | undefined;
|
|
97
|
+
context?: {
|
|
98
|
+
[x: string]: any;
|
|
99
|
+
} | undefined;
|
|
100
|
+
withCustomData?: boolean | undefined;
|
|
101
|
+
} | undefined;
|
|
102
|
+
_closeLoopCheckQrcode?: boolean | undefined;
|
|
103
|
+
};
|
|
104
|
+
guardPageConfig: GuardPageConfig;
|
|
105
|
+
} | {
|
|
106
|
+
finallyConfig: undefined;
|
|
107
|
+
guardPageConfig: undefined;
|
|
108
|
+
};
|
|
@@ -28,7 +28,7 @@ export declare const parsePhone: (isInternationSms: boolean, fieldValue: string,
|
|
|
28
28
|
countryCode: string | undefined;
|
|
29
29
|
phoneNumber: string;
|
|
30
30
|
};
|
|
31
|
-
export declare enum SocialConnectionEvent {
|
|
31
|
+
export declare const enum SocialConnectionEvent {
|
|
32
32
|
Message = "message",
|
|
33
33
|
Auth = "auth"
|
|
34
34
|
}
|
package/types/_utils/index.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export declare const isMobile: () => RegExpMatchArray | null;
|
|
|
60
60
|
export declare const isSpecialBrowser: () => boolean;
|
|
61
61
|
export declare const assembledAppHost: (identifier: string, host: string) => string;
|
|
62
62
|
export declare const assembledRequestHost: (requestHostname: string, configHost: string) => string;
|
|
63
|
-
export declare enum PasswordStrength {
|
|
63
|
+
export declare const enum PasswordStrength {
|
|
64
64
|
NoCheck = 0,
|
|
65
65
|
Low = 1,
|
|
66
66
|
Middle = 2,
|
|
@@ -90,5 +90,3 @@ export declare const getLoginTypePipe: (publicConfig: ApplicationConfig, registe
|
|
|
90
90
|
} | undefined;
|
|
91
91
|
export declare const getPasswordIdentify: (identity: string) => string;
|
|
92
92
|
export declare const getCurrentLng: () => Lang;
|
|
93
|
-
export declare const isDingTalkOrigin: (origin: string) => boolean;
|
|
94
|
-
export declare const isWeComOrigin: (event: MessageEvent) => boolean;
|