@authing/react-ui-components 4.3.16-rc.6 → 4.3.16-rc.8
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/lib/index.min.js.LICENSE.txt +6 -0
- package/package.json +5 -3
- package/types/AuthClientProvider/AuthClientProvider.d.ts +4 -2
- package/types/Back/index.d.ts +3 -1
- package/types/ChangePassword/index.d.ts +2 -1
- package/types/CompleteInfo/interface.d.ts +4 -1
- package/types/CompleteInfo/utils.d.ts +6 -0
- package/types/ForgetPassword/core/resetPassword.d.ts +2 -2
- package/types/ForgetPassword/interface.d.ts +2 -1
- package/types/Guard/config.d.ts +2 -1
- package/types/Guard/core/hooks/useMultipleAccounts.d.ts +1 -1
- package/types/Guard/core/renderContext.d.ts +2 -1
- package/types/Guard/event.d.ts +12 -1
- package/types/Guard/module.d.ts +3 -1
- package/types/IdentityBinding/IdentityBinding.d.ts +3 -1
- package/types/IdentityBinding/businessRequest.d.ts +5 -2
- package/types/InputPassword/index.d.ts +2 -4
- package/types/Login/index.d.ts +4 -2
- package/types/Login/multipleAccounts/panel.d.ts +1 -0
- package/types/NewSubmitSuccess/interface.d.ts +2 -0
- package/types/Qrcode/UiQrCode.d.ts +1 -1
- package/types/SendCode/SendCodeByPhone.d.ts +2 -0
- package/types/TenantPortalSelect/index.d.ts +0 -13
- package/types/Type/application.d.ts +32 -1
- package/types/Type/index.d.ts +2 -0
- package/types/_utils/config/index.d.ts +2 -0
- package/types/_utils/context.d.ts +15 -2
- package/types/_utils/index.d.ts +2 -1
- package/types/_utils/responseManagement/interface.d.ts +3 -1
- package/types/index.d.ts +1 -0
- package/types/version/version.d.ts +1 -1
|
@@ -25,6 +25,12 @@
|
|
|
25
25
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* @license qrcode.react
|
|
30
|
+
* Copyright (c) Paul O'Shannessy
|
|
31
|
+
* SPDX-License-Identifier: ISC
|
|
32
|
+
*/
|
|
33
|
+
|
|
28
34
|
/** @license React v16.13.1
|
|
29
35
|
* react-is.production.min.js
|
|
30
36
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authing/react-ui-components",
|
|
3
|
-
"version": "4.3.16-rc.
|
|
3
|
+
"version": "4.3.16-rc.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "lib/index.min.js",
|
|
6
6
|
"typings": "types/index.d.ts",
|
|
@@ -11,12 +11,13 @@
|
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"antd": "^4.8.0",
|
|
14
|
-
"authing-js-sdk": "4.23.
|
|
14
|
+
"authing-js-sdk": "4.23.44",
|
|
15
15
|
"classnames": "^2.3.1",
|
|
16
16
|
"fastclick": "^1.0.6",
|
|
17
17
|
"global": "^4.4.0",
|
|
18
18
|
"phone": "^3.1.12",
|
|
19
19
|
"prompt": "^1.3.0",
|
|
20
|
+
"qrcode.react": "^3.1.0",
|
|
20
21
|
"qs": "^6.9.4",
|
|
21
22
|
"react-responsive": "^9.0.0-beta.5",
|
|
22
23
|
"react-use": "^17.3.1",
|
|
@@ -45,7 +46,8 @@
|
|
|
45
46
|
"vite": "vite",
|
|
46
47
|
"generate-version": "node ./scripts/generate-version",
|
|
47
48
|
"generate-examples": "node ./scripts/generate-examples.js",
|
|
48
|
-
"test": "node ./scripts/dev/pre-build.js"
|
|
49
|
+
"test": "node ./scripts/dev/pre-build.js",
|
|
50
|
+
"lint:fix": "eslint --fix --ext .ts,.tsx,.js ./components"
|
|
49
51
|
},
|
|
50
52
|
"publishConfig": {
|
|
51
53
|
"access": "public",
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { AuthClientContextProps } from './context';
|
|
3
|
-
export declare const AuthClientProvider: React.FC<AuthClientContextProps
|
|
3
|
+
export declare const AuthClientProvider: React.FC<AuthClientContextProps & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}>;
|
|
4
6
|
export declare const useGlobalAuthClient: () => import("authing-js-sdk").AuthenticationClient | undefined;
|
package/types/Back/index.d.ts
CHANGED
|
@@ -7,4 +7,6 @@ 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
|
|
10
|
+
export declare const BackCustom: React.FC<BackCustomProps & {
|
|
11
|
+
children: any;
|
|
12
|
+
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
export declare const GuardChangePassword: React.FC<{
|
|
3
3
|
title: string;
|
|
4
4
|
explain: string;
|
|
5
|
+
children: ReactNode;
|
|
5
6
|
}>;
|
|
6
7
|
export declare const GuardFirstLoginPasswordResetView: React.FC;
|
|
7
8
|
export declare const GuardPasswordNotSafeResetView: React.FC;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthenticationClient, CommonMessage, User } from 'authing-js-sdk';
|
|
2
|
-
import { IG2Config, IG2Events, IG2FCProps } from '../Type';
|
|
2
|
+
import { IG2Config, IG2Events, IG2FCProps, Lang } from '../Type';
|
|
3
3
|
export interface CompleteInfoConfig extends IG2Config {
|
|
4
4
|
}
|
|
5
5
|
export declare const getDefaultCompleteInfoConfig: () => CompleteInfoConfig;
|
|
@@ -41,6 +41,9 @@ export interface CompleteInfoRule {
|
|
|
41
41
|
type: FormValidateRule;
|
|
42
42
|
content: string;
|
|
43
43
|
errorMessage?: string;
|
|
44
|
+
i18n?: {
|
|
45
|
+
errorMessage: Record<Lang, []>;
|
|
46
|
+
};
|
|
44
47
|
}
|
|
45
48
|
export interface CompleteInfoSelectOption {
|
|
46
49
|
value: string;
|
|
@@ -20,3 +20,9 @@ export declare const fieldValuesToRegisterProfile: (extendsFields: ApplicationCo
|
|
|
20
20
|
value: string;
|
|
21
21
|
}[];
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* @description 获取对应key的国际化value
|
|
25
|
+
* @param record :example {key:"",i18n:{key:{zh_CN:{enabled:true,value:""}}}
|
|
26
|
+
* @param key
|
|
27
|
+
*/
|
|
28
|
+
export declare const getI18nValue: (record: any, key: string) => any;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export declare enum InputMethodMap {
|
|
3
3
|
email = "email-code",
|
|
4
4
|
phone = "phone-code"
|
|
5
5
|
}
|
|
6
6
|
interface ResetPasswordProps {
|
|
7
7
|
publicConfig: any;
|
|
8
|
-
setPhoneOrEmail: any;
|
|
9
8
|
setControlShow: any;
|
|
10
9
|
setPolicyStrength: any;
|
|
11
10
|
setCustomPasswordStrength: any;
|
|
12
11
|
setPhoneOrEmailText: any;
|
|
12
|
+
setResetToken: React.Dispatch<React.SetStateAction<string>>;
|
|
13
13
|
}
|
|
14
14
|
export declare const ResetPassword: (props: ResetPasswordProps) => JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -2,13 +2,14 @@ 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;
|
|
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>;
|
package/types/Guard/config.d.ts
CHANGED
|
@@ -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;
|
|
@@ -13,7 +13,7 @@ export declare const QR_CODE_WAY: LoginWay[];
|
|
|
13
13
|
* 登录时所有支持的登录列表(前端定义列表)
|
|
14
14
|
* 这里稍微有点乱 因为Login中的登录方式和这里的不匹配,暂时放在了一起
|
|
15
15
|
*/
|
|
16
|
-
export declare type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone';
|
|
16
|
+
export declare type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
|
|
17
17
|
/**
|
|
18
18
|
* when: 多账号页面跳转进入登录页面
|
|
19
19
|
* 携带的回填数据信息
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { GuardProps } from '..';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { ReactNode } 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;
|
|
7
8
|
}>;
|
package/types/Guard/event.d.ts
CHANGED
|
@@ -5,8 +5,16 @@ 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
|
-
|
|
8
|
+
import { TenantPortalEvents } from '../TenantPortalSelect/interface';
|
|
9
|
+
interface OnAfterChangeModuleOptions {
|
|
10
|
+
currentView: string;
|
|
11
|
+
currentModule: GuardModuleType;
|
|
12
|
+
currentTab?: string;
|
|
13
|
+
data?: any;
|
|
14
|
+
}
|
|
15
|
+
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents, TenantPortalEvents {
|
|
9
16
|
onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
|
|
17
|
+
onAfterChangeModule?: (options: OnAfterChangeModuleOptions) => void;
|
|
10
18
|
}
|
|
11
19
|
export declare const guardEventsFilter: (props: any, multipleInstance?: {
|
|
12
20
|
initStore: (appId: string, options: {
|
|
@@ -65,6 +73,7 @@ export declare const GuardEventsCamelToKebabMapping: {
|
|
|
65
73
|
readonly onRegisterInfoCompletedError: "register-info-completed-error";
|
|
66
74
|
readonly onLangChange: "lang-change";
|
|
67
75
|
readonly onBeforeChangeModule: "before-change-module";
|
|
76
|
+
readonly onAfterChangeModule: "after-change-module";
|
|
68
77
|
};
|
|
69
78
|
export interface GuardEventsKebabToCamelType {
|
|
70
79
|
load: GuardEvents['onLoad'];
|
|
@@ -88,4 +97,6 @@ export interface GuardEventsKebabToCamelType {
|
|
|
88
97
|
'register-info-completed-error': GuardEvents['onRegisterInfoCompletedError'];
|
|
89
98
|
'lang-change': GuardEvents['onLangChange'];
|
|
90
99
|
'before-change-module': GuardEvents['onBeforeChangeModule'];
|
|
100
|
+
'after-change-module': GuardEvents['onAfterChangeModule'];
|
|
91
101
|
}
|
|
102
|
+
export {};
|
package/types/Guard/module.d.ts
CHANGED
|
@@ -18,11 +18,13 @@ export declare enum GuardModuleType {
|
|
|
18
18
|
SUBMIT_SUCCESS = "submitSuccess",
|
|
19
19
|
IDENTITY_BINDING_ASK = "identityBindingAsk",
|
|
20
20
|
IDENTITY_BINDING = "identityBinding",
|
|
21
|
+
IDENTITY_BINDING_NO_ASK = "identityBindingNoAsk",
|
|
21
22
|
SELF_UNLOCK = "selfUnlock",
|
|
22
23
|
FLOW_SELECT_ACCOUNT = "flowSelectAccount",
|
|
23
24
|
/** 多租户门户选择页 */
|
|
24
25
|
TENANT_PORTAL = "tenant-portal",
|
|
25
|
-
New_SUBMIT_SUCCESS = "newSubmitSuccess"
|
|
26
|
+
New_SUBMIT_SUCCESS = "newSubmitSuccess",
|
|
27
|
+
RESET_ACCOUNT_NAME = "resetAccountName"
|
|
26
28
|
}
|
|
27
29
|
export interface GuardModuleAction {
|
|
28
30
|
action: string;
|
|
@@ -21,12 +21,15 @@ export declare enum IdentityBindingAction {
|
|
|
21
21
|
CreateUser = "create-federation-account",
|
|
22
22
|
BindByPassword = "bind-identity-by-password",
|
|
23
23
|
BindByPhoneCode = "bind-identity-by-phone-code",
|
|
24
|
-
BindByEmailCode = "bind-identity-by-email-code"
|
|
24
|
+
BindByEmailCode = "bind-identity-by-email-code",
|
|
25
|
+
RegisterByPassword = "register-bind-by-password",
|
|
26
|
+
RegisterByPhoneCode = "register-bind-by-phone-code",
|
|
27
|
+
RegisterByEmailCode = "register-bind-by-email-code"
|
|
25
28
|
}
|
|
26
29
|
export declare const PhoneCode: (params: PhoneCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
27
30
|
export declare const EmailCode: (params: EmailCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
28
31
|
export declare const Password: (params: PasswordParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
29
|
-
export declare const useIdentityBindingBusinessRequest: () => {
|
|
32
|
+
export declare const useIdentityBindingBusinessRequest: (type?: 'register' | 'bind') => {
|
|
30
33
|
"phone-code": (params: PhoneCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
31
34
|
"emial-code": (params: EmailCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
32
35
|
password: (params: PasswordParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
export declare const InputPassword: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.RefObject<Input>>>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const InputPassword: (props: any) => JSX.Element;
|
package/types/Login/index.d.ts
CHANGED
|
@@ -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;
|
|
@@ -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: string;
|
|
6
6
|
export interface UiQrProps {
|
|
7
7
|
/**
|
|
8
8
|
* Loading 组件
|
|
@@ -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;
|
|
@@ -8,7 +8,8 @@ export declare enum LoginMethods {
|
|
|
8
8
|
PhoneCode = "phone-code",
|
|
9
9
|
WxMinQr = "wechat-miniprogram-qrcode",
|
|
10
10
|
AD = "ad",
|
|
11
|
-
WechatMpQrcode = "wechatmp-qrcode"
|
|
11
|
+
WechatMpQrcode = "wechatmp-qrcode",
|
|
12
|
+
AuthingOtpPush = "authing-otp-push"
|
|
12
13
|
}
|
|
13
14
|
export declare enum OIDCConnectionMode {
|
|
14
15
|
FRONT_CHANNEL = "FRONT_CHANNEL",
|
|
@@ -177,6 +178,14 @@ export interface TabFieldsI18nItem {
|
|
|
177
178
|
[propName in Lang]?: string;
|
|
178
179
|
};
|
|
179
180
|
}
|
|
181
|
+
interface LoginTypeI18nProps {
|
|
182
|
+
tab: {
|
|
183
|
+
default: string;
|
|
184
|
+
i18n: {
|
|
185
|
+
[propName: string]: string;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
}
|
|
180
189
|
export interface ApplicationConfig {
|
|
181
190
|
id: string;
|
|
182
191
|
allowedOrigins: string[];
|
|
@@ -262,6 +271,12 @@ export interface ApplicationConfig {
|
|
|
262
271
|
socialLoginBtns: boolean;
|
|
263
272
|
userPasswordInput: boolean;
|
|
264
273
|
wxMpScanTab: boolean;
|
|
274
|
+
loginMethodsI18nDisplaySettings: {
|
|
275
|
+
password?: LoginTypeI18nProps;
|
|
276
|
+
verifyCode?: LoginTypeI18nProps;
|
|
277
|
+
ad?: LoginTypeI18nProps;
|
|
278
|
+
ldap?: LoginTypeI18nProps;
|
|
279
|
+
};
|
|
265
280
|
};
|
|
266
281
|
protocol: Protocol;
|
|
267
282
|
oidcConfig: OidcClientMetadata;
|
|
@@ -292,6 +307,11 @@ export interface ApplicationConfig {
|
|
|
292
307
|
loginMethodsSort: string[];
|
|
293
308
|
};
|
|
294
309
|
tabMethodsFields: TabFieldsI18nItem[];
|
|
310
|
+
regexRules?: {
|
|
311
|
+
key: string;
|
|
312
|
+
appLevel: string;
|
|
313
|
+
userpoolLevel: string;
|
|
314
|
+
}[];
|
|
295
315
|
/** 是否为租户控制台应用 */
|
|
296
316
|
isTenantConsole?: boolean;
|
|
297
317
|
/** 是否默认为租户应用面板应用 */
|
|
@@ -302,4 +322,15 @@ export interface ApplicationConfig {
|
|
|
302
322
|
mfa: {
|
|
303
323
|
faceScore: number;
|
|
304
324
|
};
|
|
325
|
+
authingOtpPushTabConfig: {
|
|
326
|
+
enabledLoginMethods: Array<string> | null;
|
|
327
|
+
validLoginMethods: Array<string> | null;
|
|
328
|
+
validRegisterMethods: Array<string> | null;
|
|
329
|
+
};
|
|
330
|
+
/** 是否开启自定义安全规则 */
|
|
331
|
+
customSecurityEnabled: boolean;
|
|
332
|
+
/** 应用的人机验证策略,始终开启、不开启、设置条件触发 */
|
|
333
|
+
appRobotVerify: 'always_enable' | 'disable' | 'condition_set';
|
|
334
|
+
/** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */
|
|
335
|
+
userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set';
|
|
305
336
|
}
|
package/types/Type/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { AuthenticationClient, CommonMessage, User } from 'authing-js-sdk';
|
|
2
3
|
import { GuardModuleType } from '../Guard/module';
|
|
3
4
|
import { FacePlugin } from '../_utils/facePlugin/interface';
|
|
@@ -42,6 +43,7 @@ export interface IG2Config {
|
|
|
42
43
|
userpool?: string;
|
|
43
44
|
contentCss?: string;
|
|
44
45
|
target?: HTMLElement | string;
|
|
46
|
+
style?: React.CSSProperties;
|
|
45
47
|
__internalRequest__?: boolean;
|
|
46
48
|
__singleComponent__?: boolean;
|
|
47
49
|
__unAuthFlow__?: boolean;
|
|
@@ -43,6 +43,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
43
43
|
userpool?: string | undefined;
|
|
44
44
|
contentCss?: string | undefined;
|
|
45
45
|
target?: string | HTMLElement | undefined;
|
|
46
|
+
style?: import("react").CSSProperties | undefined;
|
|
46
47
|
__internalRequest__?: boolean | undefined;
|
|
47
48
|
__singleComponent__?: boolean | undefined;
|
|
48
49
|
__unAuthFlow__?: boolean | undefined;
|
|
@@ -100,6 +101,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
100
101
|
withCustomData?: boolean | undefined;
|
|
101
102
|
} | undefined;
|
|
102
103
|
_closeLoopCheckQrcode?: boolean | undefined;
|
|
104
|
+
goBack?: (() => void) | null | undefined;
|
|
103
105
|
};
|
|
104
106
|
guardPageConfig: GuardPageConfig;
|
|
105
107
|
} | {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig, Lang } from '..';
|
|
3
3
|
import { BackFillMultipleState, StoreInstance } from '../Guard/core/hooks/useMultipleAccounts';
|
|
4
4
|
import { ModuleState } from '../Guard/GuardModule/stateMachine';
|
|
@@ -43,19 +43,24 @@ export interface IGuardContext {
|
|
|
43
43
|
*/
|
|
44
44
|
clearBackFillData?: () => void;
|
|
45
45
|
};
|
|
46
|
+
phoneRegex: RegExp | null;
|
|
46
47
|
defaultLanguageConfig: Lang;
|
|
47
48
|
/** 租户信息获取和操作处理相关 */
|
|
48
49
|
tenantInstance?: MultipleTenant;
|
|
50
|
+
/** 判断是否是国外的用户池 */
|
|
51
|
+
isForeignUserpool: boolean;
|
|
49
52
|
}
|
|
50
53
|
export declare const createGuardXContext: () => {
|
|
51
54
|
Provider: React.FC<{
|
|
52
55
|
value: Partial<IGuardContext>;
|
|
56
|
+
children: ReactNode;
|
|
53
57
|
}>;
|
|
54
58
|
Consumer: React.Consumer<IGuardContext>;
|
|
55
59
|
};
|
|
56
60
|
export declare const useGuardXContext: () => {
|
|
57
61
|
Provider: React.FC<{
|
|
58
62
|
value: Partial<IGuardContext>;
|
|
63
|
+
children: ReactNode;
|
|
59
64
|
}>;
|
|
60
65
|
Consumer: React.Consumer<IGuardContext>;
|
|
61
66
|
};
|
|
@@ -64,7 +69,9 @@ export interface IGuardContextProvider {
|
|
|
64
69
|
spinChange: (spin: boolean) => void;
|
|
65
70
|
}
|
|
66
71
|
export declare const useGuardButtonContext: () => {
|
|
67
|
-
GuardButtonProvider: React.FC<{
|
|
72
|
+
GuardButtonProvider: React.FC<{
|
|
73
|
+
children: ReactNode;
|
|
74
|
+
}>;
|
|
68
75
|
};
|
|
69
76
|
export declare const useGuardButtonState: () => IGuardContextProvider;
|
|
70
77
|
export declare const useGuardPublicConfig: () => ApplicationConfig;
|
|
@@ -78,6 +85,7 @@ export declare const useGuardEvents: () => Partial<GuardEvents>;
|
|
|
78
85
|
export declare const useGuardModule: () => {
|
|
79
86
|
changeModule: ((moduleName: GuardModuleType, initData?: any) => Promise<void>) | undefined;
|
|
80
87
|
backModule: (() => void) | undefined;
|
|
88
|
+
currentModule: ModuleState;
|
|
81
89
|
};
|
|
82
90
|
export declare const useGuardFinallyConfig: () => GuardLocalConfig;
|
|
83
91
|
export declare const useGuardContextLoaded: () => boolean;
|
|
@@ -142,9 +150,14 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
142
150
|
*/
|
|
143
151
|
clearBackFillData?: (() => void) | undefined;
|
|
144
152
|
};
|
|
153
|
+
export declare const useGuardPhoneRegex: () => RegExp | null;
|
|
145
154
|
/**
|
|
146
155
|
* 默认语言
|
|
147
156
|
*/
|
|
148
157
|
export declare const useGuardDefaultLanguage: () => Lang;
|
|
149
158
|
/** 用来操作和获取租户相关的内容 */
|
|
150
159
|
export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
|
|
160
|
+
/** 当前人机验证策略 */
|
|
161
|
+
export declare const useRobotVerify: () => "always_enable" | "disable" | "condition_set";
|
|
162
|
+
/** 当前用户池是否是国外用户池 */
|
|
163
|
+
export declare const useIsForeignUserpool: () => boolean;
|
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 object = any>(target: T, ...sources: any[]): T;
|
|
38
38
|
/**
|
|
39
39
|
* 在托管页下上传query中指定的用户自定义字段进行补全
|
|
40
40
|
* @param params 指定上传的用户自定义字段
|
|
@@ -92,6 +92,7 @@ export declare const getLoginTypePipe: (publicConfig: ApplicationConfig, registe
|
|
|
92
92
|
} | undefined;
|
|
93
93
|
export declare const getPasswordIdentify: (identity: string) => string;
|
|
94
94
|
export declare const getCurrentLng: () => Lang;
|
|
95
|
+
export declare const regexFromString: (string: string) => RegExp | null;
|
|
95
96
|
export declare const getI18nLabel: (method: string | RegisterSortMethods, i18nFields: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
|
|
96
97
|
export declare const getSortLabels: (methods: string[], i18nConfig: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
|
|
97
98
|
export declare const getSortTabs: (tabs: string[], tab?: string | undefined) => string[];
|
|
@@ -7,6 +7,7 @@ export declare enum CodeAction {
|
|
|
7
7
|
export declare enum ApiCode {
|
|
8
8
|
IDENTITY_BINDING_ASK = 1641,
|
|
9
9
|
IDENTITY_BINDING = 1640,
|
|
10
|
+
IDENTITY_BINDING_NO_ASK = 1666,
|
|
10
11
|
APP_MFA = 1636,
|
|
11
12
|
MFA = 1635,
|
|
12
13
|
ABORT_FLOW = 1699,
|
|
@@ -18,6 +19,7 @@ export declare enum ApiCode {
|
|
|
18
19
|
UNSAFE_PASSWORD_TIP = 2061,
|
|
19
20
|
UNSAFE_PASSWORD_RESET = 2071,
|
|
20
21
|
FLOW_SELECT_ACCOUNT = 2921,
|
|
21
|
-
TENANT_PORTAL = 1644
|
|
22
|
+
TENANT_PORTAL = 1644,
|
|
23
|
+
RESET_ACCOUNT_NAME = 1108
|
|
22
24
|
}
|
|
23
25
|
export declare const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
|
package/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.3.16-rc.
|
|
1
|
+
declare const _default: "4.3.16-rc.8";
|
|
2
2
|
export default _default;
|