@authing/react-ui-components 4.4.3-ey.2 → 4.4.3-ey.21
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/lib/static/media/EYInterstate-Regular.54dfade4.ttf +0 -0
- package/lib/static/media/ey_loading.24d3e4d0.gif +0 -0
- package/package.json +2 -2
- package/types/CompleteInfo/core/completeInfo.d.ts +8 -0
- package/types/EY/CheckCaptcha/index.d.ts +2 -0
- package/types/EY/Error/index.d.ts +2 -0
- package/types/EY/ForgetPassword/index.d.ts +2 -0
- package/types/EY/InviteComplete/index.d.ts +2 -0
- package/types/EY/InviteIdentityBind/component/WeComQrcode.d.ts +2 -0
- package/types/EY/InviteIdentityBind/index.d.ts +2 -0
- package/types/EY/InviteLoading/index.d.ts +2 -0
- package/types/EY/Login/components/EyLoginWithWeComQrcode.d.ts +2 -0
- package/types/EY/Login/core/EmailPassword.d.ts +8 -0
- package/types/EY/Login/core/ScanCode.d.ts +8 -0
- package/types/EY/Login/index.d.ts +9 -0
- package/types/EY/PreCheckEmail/index.d.ts +2 -0
- package/types/EY/Protocol/index.d.ts +2 -0
- package/types/EY/components/EmailFormItem.d.ts +2 -0
- package/types/EY/components/GoBack.d.ts +2 -0
- package/types/EY/interface.d.ts +57 -0
- package/types/ForgetPassword/core/resetPassword.d.ts +3 -0
- package/types/Guard/config.d.ts +1 -0
- package/types/Guard/module.d.ts +29 -1
- package/types/Login/core/withWeComQrcode.d.ts +2 -0
- package/types/Login/index.d.ts +4 -0
- package/types/MFA/VerifyCodeInput/ey.d.ts +15 -0
- package/types/Type/application.d.ts +12 -1
- package/types/_utils/config/index.d.ts +1 -0
- package/types/_utils/http.d.ts +1 -1
- package/types/_utils/index.d.ts +1 -0
- package/types/_utils/responseManagement/interface.d.ts +9 -1
- package/types/version/version.d.ts +1 -1
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authing/react-ui-components",
|
|
3
|
-
"version": "4.4.3-ey.
|
|
3
|
+
"version": "4.4.3-ey.21",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "lib/index.min.js",
|
|
6
6
|
"typings": "types/index.d.ts",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"prebuild:lib": "yarn log-tag && yarn generate-version && yarn generate-examples",
|
|
43
43
|
"prepare": "cd ../.. && husky install packages/react-components/.husky",
|
|
44
44
|
"pub": "yarn build:lib && node ./scripts/publish.js",
|
|
45
|
-
"start": "cross-env PORT=
|
|
45
|
+
"start": "cross-env PORT=1024 node ./scripts/start.js",
|
|
46
46
|
"vite": "vite",
|
|
47
47
|
"generate-version": "node ./scripts/generate-version",
|
|
48
48
|
"generate-examples": "node ./scripts/generate-examples.js",
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CompleteInfoMetaData, CompleteInfoRequest } from '../interface';
|
|
3
|
+
import { Lang } from '../../Type';
|
|
3
4
|
export interface CompleteInfoProps {
|
|
4
5
|
metaData: CompleteInfoMetaData[];
|
|
5
6
|
businessRequest: (data: CompleteInfoRequest) => Promise<void>;
|
|
7
|
+
submitText?: string;
|
|
8
|
+
extendsFieldsI18n?: {
|
|
9
|
+
[key: string]: Record<Lang, {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
value: string;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
6
14
|
}
|
|
7
15
|
export interface FieldMetadata {
|
|
8
16
|
key: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface EmailPasswordProps {
|
|
3
|
+
onBeforeLogin?: (loginInfo: any) => void;
|
|
4
|
+
onLoginSuccess?: (data: any, message?: string) => void;
|
|
5
|
+
onLoginFailed?: (code: number, data: any, message?: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const EmailPasswordScene: React.FC<EmailPasswordProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ScanCodeSceneProps {
|
|
3
|
+
onBeforeLogin?: (loginInfo: any) => void;
|
|
4
|
+
onLoginSuccess?: (data: any, message?: string) => void;
|
|
5
|
+
onLoginFailed?: (code: number, data: any, message?: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ScanCodeScene: React.FC<ScanCodeSceneProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { GuardModuleType, Lang } from '..';
|
|
2
|
+
export interface InviteContext {
|
|
3
|
+
autoLogin: boolean;
|
|
4
|
+
email: string | null;
|
|
5
|
+
ticket: string;
|
|
6
|
+
enabledIdentifierCodeConfig: boolean;
|
|
7
|
+
enabledRegisterFillInfo: boolean;
|
|
8
|
+
enabledExtIdpBind: boolean;
|
|
9
|
+
allowSkipBindExtIdp: boolean;
|
|
10
|
+
sendIdentifierCodeMethod: 'prioritySMS' | 'priorityEmail' | 'SMS' | 'email';
|
|
11
|
+
receiverType: 'emailCode' | 'phoneCode';
|
|
12
|
+
phone: string | null;
|
|
13
|
+
username: string | null;
|
|
14
|
+
verifyCodeMaxLength: number;
|
|
15
|
+
verifyCodeMaxErrCount: number;
|
|
16
|
+
extendsFieldsI18n?: {
|
|
17
|
+
[key: string]: Record<Lang, {
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
value: string;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
extendsFields: any;
|
|
23
|
+
qrCodeBindMethods: Record<string, {
|
|
24
|
+
QRConfig: any;
|
|
25
|
+
id: string;
|
|
26
|
+
isDefault: boolean;
|
|
27
|
+
title: string;
|
|
28
|
+
}[]>;
|
|
29
|
+
socialConnections: any[];
|
|
30
|
+
}
|
|
31
|
+
export interface EyGuardInviteLoginInitData extends Partial<InviteContext> {
|
|
32
|
+
verifyAccount: string;
|
|
33
|
+
context: any;
|
|
34
|
+
}
|
|
35
|
+
export interface EyGuardInviteCompleteInitData extends Partial<EyGuardInviteLoginInitData> {
|
|
36
|
+
metaData: any;
|
|
37
|
+
}
|
|
38
|
+
export interface EyGuardInviteIdentityBindInitData extends Partial<EyGuardInviteLoginInitData> {
|
|
39
|
+
weComConfig: {
|
|
40
|
+
QRConfig: any;
|
|
41
|
+
id: string;
|
|
42
|
+
isDefault: boolean;
|
|
43
|
+
title: string;
|
|
44
|
+
};
|
|
45
|
+
originModule: GuardModuleType;
|
|
46
|
+
originContext: any;
|
|
47
|
+
socialConnections: any[];
|
|
48
|
+
}
|
|
49
|
+
export interface EyGuardProtocolInitData {
|
|
50
|
+
onAcceptHandle: () => void;
|
|
51
|
+
onRejectHandle: () => void;
|
|
52
|
+
}
|
|
53
|
+
export declare const useRegisterHandleHook: (initData: any, submitButtonRef?: {
|
|
54
|
+
current: {
|
|
55
|
+
onSpin: (arg0: boolean) => void;
|
|
56
|
+
};
|
|
57
|
+
} | undefined) => (context: any) => Promise<void>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { VerifyLoginMethods } from '../../Type';
|
|
2
3
|
export declare enum InputMethodMap {
|
|
3
4
|
email = "email-code",
|
|
4
5
|
phone = "phone-code"
|
|
@@ -11,6 +12,8 @@ interface ResetPasswordProps {
|
|
|
11
12
|
setPhoneOrEmailText: any;
|
|
12
13
|
setResetToken: React.Dispatch<React.SetStateAction<string>>;
|
|
13
14
|
setUserId: React.Dispatch<React.SetStateAction<string>>;
|
|
15
|
+
supportMethods?: VerifyLoginMethods[];
|
|
16
|
+
firstValidate?: 'phone' | 'email';
|
|
14
17
|
}
|
|
15
18
|
export declare const ResetPassword: (props: ResetPasswordProps) => JSX.Element;
|
|
16
19
|
export {};
|
package/types/Guard/config.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ForgetPasswordConfig } from '../ForgetPassword/interface';
|
|
|
4
4
|
import { LoginConfig } from '../Login/interface';
|
|
5
5
|
import { RegisterConfig } from '../Register/interface';
|
|
6
6
|
export interface GuardLocalConfig extends RegisterConfig, LoginConfig, ForgetPasswordConfig {
|
|
7
|
+
isInvited?: boolean;
|
|
7
8
|
isSSO?: boolean;
|
|
8
9
|
defaultScenes?: GuardModuleType;
|
|
9
10
|
defaultInitData?: any;
|
package/types/Guard/module.d.ts
CHANGED
|
@@ -25,7 +25,35 @@ export declare enum GuardModuleType {
|
|
|
25
25
|
/** 多租户门户选择页 */
|
|
26
26
|
TENANT_PORTAL = "tenant-portal",
|
|
27
27
|
New_SUBMIT_SUCCESS = "newSubmitSuccess",
|
|
28
|
-
RESET_ACCOUNT_NAME = "resetAccountName"
|
|
28
|
+
RESET_ACCOUNT_NAME = "resetAccountName",
|
|
29
|
+
/**
|
|
30
|
+
* pre check email
|
|
31
|
+
*/
|
|
32
|
+
EY_PRE_CHECK_EMAIL = "ey_pre_check_email",
|
|
33
|
+
/**
|
|
34
|
+
* protocols
|
|
35
|
+
*/
|
|
36
|
+
EY_PROTOCOLS = "ey_protocols",
|
|
37
|
+
/**
|
|
38
|
+
* check captcha
|
|
39
|
+
*/
|
|
40
|
+
EY_CHECK_CAPTCHA = "ey_check_captcha",
|
|
41
|
+
/**
|
|
42
|
+
* invite expire
|
|
43
|
+
*/
|
|
44
|
+
EY_INVITE_EXPIRE = "ey_invite_expire",
|
|
45
|
+
/**
|
|
46
|
+
* invite loading
|
|
47
|
+
*/
|
|
48
|
+
EY_INVITE_LOADING = "ey_invite_loading",
|
|
49
|
+
/**
|
|
50
|
+
* identity bind
|
|
51
|
+
*/
|
|
52
|
+
EY_IDENTITY_BIND = "ey_identity_bind",
|
|
53
|
+
/**
|
|
54
|
+
* invite complete
|
|
55
|
+
*/
|
|
56
|
+
EY_INVITE_COMPLETE = "ey_invite_complete"
|
|
29
57
|
}
|
|
30
58
|
export interface GuardModuleAction {
|
|
31
59
|
action: string;
|
package/types/Login/index.d.ts
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import './style.less';
|
|
3
|
+
interface VerifyCodeInputProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
length?: number;
|
|
5
|
+
size?: string;
|
|
6
|
+
gutter?: string;
|
|
7
|
+
onEenter?: Function;
|
|
8
|
+
showDivider?: boolean;
|
|
9
|
+
onChange?: any;
|
|
10
|
+
value?: Array<number | string>;
|
|
11
|
+
onFinish?: any;
|
|
12
|
+
beforeSend: () => Promise<boolean>;
|
|
13
|
+
}
|
|
14
|
+
export declare const EyVerifyCodeInput: FC<VerifyCodeInputProps>;
|
|
15
|
+
export {};
|
|
@@ -10,7 +10,8 @@ export declare enum LoginMethods {
|
|
|
10
10
|
WxMinQr = "wechat-miniprogram-qrcode",
|
|
11
11
|
AD = "ad",
|
|
12
12
|
WechatMpQrcode = "wechatmp-qrcode",
|
|
13
|
-
AuthingOtpPush = "authing-otp-push"
|
|
13
|
+
AuthingOtpPush = "authing-otp-push",
|
|
14
|
+
WechatworkCorpQrconnect = "wechatwork-service-provider-qrconnect"
|
|
14
15
|
}
|
|
15
16
|
export declare enum OIDCConnectionMode {
|
|
16
17
|
FRONT_CHANNEL = "FRONT_CHANNEL",
|
|
@@ -114,6 +115,12 @@ export interface QrCodeItem {
|
|
|
114
115
|
id: string;
|
|
115
116
|
title: string;
|
|
116
117
|
isDefault?: boolean;
|
|
118
|
+
QRConfig?: {
|
|
119
|
+
corpId: string;
|
|
120
|
+
agentId: string;
|
|
121
|
+
redirectUrl: string;
|
|
122
|
+
identifier: string;
|
|
123
|
+
};
|
|
117
124
|
}
|
|
118
125
|
export declare type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
|
|
119
126
|
export interface OidcClientMetadata {
|
|
@@ -335,4 +342,8 @@ export interface ApplicationConfig {
|
|
|
335
342
|
appRobotVerify: 'always_enable' | 'disable' | 'condition_set';
|
|
336
343
|
/** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */
|
|
337
344
|
userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set';
|
|
345
|
+
/**
|
|
346
|
+
* 是否为官方应用
|
|
347
|
+
*/
|
|
348
|
+
isOfficial?: boolean;
|
|
338
349
|
}
|
|
@@ -19,6 +19,7 @@ export declare const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, co
|
|
|
19
19
|
export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
|
|
20
20
|
finallyConfig: {
|
|
21
21
|
host: string;
|
|
22
|
+
isInvited?: boolean | undefined;
|
|
22
23
|
isSSO?: boolean | undefined;
|
|
23
24
|
defaultScenes?: import("../..").GuardModuleType | undefined;
|
|
24
25
|
defaultInitData?: any;
|
package/types/_utils/http.d.ts
CHANGED
|
@@ -28,6 +28,6 @@ export interface AuthingResponse<T = any> {
|
|
|
28
28
|
flowHandle?: string;
|
|
29
29
|
}
|
|
30
30
|
export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
|
|
31
|
-
onGuardHandling?: () => CodeAction;
|
|
31
|
+
onGuardHandling?: (initData?: any) => CodeAction;
|
|
32
32
|
isFlowEnd?: boolean;
|
|
33
33
|
}
|
package/types/_utils/index.d.ts
CHANGED
|
@@ -97,3 +97,4 @@ export declare const regexFromString: (string: string) => RegExp | null;
|
|
|
97
97
|
export declare const getI18nLabel: (method: string | RegisterSortMethods, i18nFields: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
|
|
98
98
|
export declare const getSortLabels: (methods: string[], i18nConfig: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
|
|
99
99
|
export declare const getSortTabs: (tabs: string[], tab?: string | undefined) => string[];
|
|
100
|
+
export declare const isWeComOrigin: (event: MessageEvent) => boolean;
|
|
@@ -21,6 +21,14 @@ export declare enum ApiCode {
|
|
|
21
21
|
FLOW_SELECT_ACCOUNT = 2921,
|
|
22
22
|
SELECT_ACCOUNT_2_LOGIN = 2930,
|
|
23
23
|
TENANT_PORTAL = 1644,
|
|
24
|
-
RESET_ACCOUNT_NAME = 1108
|
|
24
|
+
RESET_ACCOUNT_NAME = 1108,
|
|
25
|
+
/**
|
|
26
|
+
* ey 登录协议条款
|
|
27
|
+
*/
|
|
28
|
+
EY_PROTOCOLS = 1008,
|
|
29
|
+
/**
|
|
30
|
+
* ey 邀请码过期
|
|
31
|
+
*/
|
|
32
|
+
EY_INVITE_EXPIRE = 4032
|
|
25
33
|
}
|
|
26
34
|
export declare const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.4.3-ey.
|
|
1
|
+
declare const _default: "4.4.3-ey.21";
|
|
2
2
|
export default _default;
|