@authing/react-ui-components 4.1.1-rc.2 → 4.2.0-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 +1 -1
- package/lib/index.min.js +1 -1
- package/package.json +1 -1
- package/types/BindTotp/businessRequest.d.ts +1 -1
- package/types/ChangePassword/businessRequest.d.ts +1 -1
- package/types/CompleteInfo/businessRequest.d.ts +2 -2
- package/types/CompleteInfo/interface.d.ts +2 -1
- package/types/Guard/GuardModule/stateMachine.d.ts +1 -1
- package/types/Guard/core/hooks/useMultipleAccounts.d.ts +4 -2
- package/types/Guard/core/renderModule.d.ts +1 -1
- package/types/Guard/event.d.ts +2 -1
- package/types/Guard/module.d.ts +2 -4
- package/types/IdentityBinding/businessRequest.d.ts +2 -2
- package/types/Login/core/withPassword/FormItemAccount.d.ts +1 -2
- package/types/Login/core/withPassword/InputAccount.d.ts +2 -2
- package/types/Login/core/withPassword/index.d.ts +2 -2
- package/types/Login/hooks/useLoginMultiple.d.ts +2 -1
- package/types/Login/interface.d.ts +2 -2
- 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/Register/core/WithEmail.d.ts +2 -0
- package/types/Register/interface.d.ts +2 -2
- package/types/Type/application.d.ts +34 -16
- package/types/Type/index.d.ts +4 -4
- package/types/ValidatorRules/ValidatorFormItem.d.ts +1 -0
- package/types/ValidatorRules/index.d.ts +4 -2
- package/types/_utils/GuardErrorCode.d.ts +1 -1
- package/types/_utils/config/index.d.ts +4 -4
- package/types/_utils/context.d.ts +8 -7
- package/types/_utils/hooks/index.d.ts +1 -1
- package/types/_utils/index.d.ts +7 -4
- package/types/_utils/logger/interface.d.ts +1 -1
- package/types/_utils/responseManagement/interface.d.ts +3 -4
- package/types/version/version.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare enum ChangePasswordBusinessAction {
|
|
2
2
|
ResetPassword = "reset-password-first-time",
|
|
3
3
|
FirstLoginReset = "reset-password-forced",
|
|
4
4
|
ResetPasswordStrengthDetection = "reset-password-strength-detection"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { User } from 'authing-js-sdk';
|
|
2
2
|
import { CompleteInfoRequest, RegisterCompleteInfoInitData } from './interface';
|
|
3
|
-
export declare
|
|
3
|
+
export declare enum CompleteInfoAuthFlowAction {
|
|
4
4
|
Complete = "complete-completion",
|
|
5
5
|
Skip = "skip-completion"
|
|
6
6
|
}
|
|
7
7
|
export declare const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
8
|
-
export declare const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'], content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any
|
|
8
|
+
export declare const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'] | string, content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
9
9
|
export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<User | import("../_utils/http").AuthingGuardResponse<any> | undefined>;
|
|
@@ -248,7 +248,8 @@ declare class MultipleAccount {
|
|
|
248
248
|
} | undefined) => void;
|
|
249
249
|
setUserInfo: (user: Pick<User & {
|
|
250
250
|
id: string;
|
|
251
|
-
|
|
251
|
+
loginAccount?: string | undefined;
|
|
252
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
252
253
|
setLoginWayByHttpData: (account: string, data: {
|
|
253
254
|
username?: string | undefined;
|
|
254
255
|
phone?: string | undefined;
|
|
@@ -290,7 +291,8 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
|
|
|
290
291
|
} | undefined) => void;
|
|
291
292
|
setUserInfo: (user: Pick<User & {
|
|
292
293
|
id: string;
|
|
293
|
-
|
|
294
|
+
loginAccount?: string | undefined;
|
|
295
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
294
296
|
setLoginWayByHttpData: (account: string, data: {
|
|
295
297
|
username?: string | undefined;
|
|
296
298
|
phone?: string | undefined;
|
package/types/Guard/event.d.ts
CHANGED
|
@@ -19,7 +19,8 @@ export declare const guardEventsFilter: (props: any, multipleInstance?: {
|
|
|
19
19
|
} | undefined) => void;
|
|
20
20
|
setUserInfo: (user: Pick<import("./core/hooks/useMultipleAccounts").User & {
|
|
21
21
|
id: string;
|
|
22
|
-
|
|
22
|
+
loginAccount?: string | undefined;
|
|
23
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
23
24
|
setLoginWayByHttpData: (account: string, data: {
|
|
24
25
|
username?: string | undefined;
|
|
25
26
|
phone?: string | undefined;
|
package/types/Guard/module.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare enum GuardModuleType {
|
|
2
2
|
ERROR = "error",
|
|
3
3
|
LOGIN = "login",
|
|
4
4
|
REGISTER = "register",
|
|
@@ -19,9 +19,7 @@ export declare const enum GuardModuleType {
|
|
|
19
19
|
IDENTITY_BINDING_ASK = "identityBindingAsk",
|
|
20
20
|
IDENTITY_BINDING = "identityBinding",
|
|
21
21
|
SELF_UNLOCK = "selfUnlock",
|
|
22
|
-
FLOW_SELECT_ACCOUNT = "flowSelectAccount"
|
|
23
|
-
/** 多租户门户选择页 */
|
|
24
|
-
TENANT_PORTAL = "tenant-portal"
|
|
22
|
+
FLOW_SELECT_ACCOUNT = "flowSelectAccount"
|
|
25
23
|
}
|
|
26
24
|
export interface GuardModuleAction {
|
|
27
25
|
action: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare 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
|
|
20
|
+
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",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FormItemProps } from 'antd/lib/form';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { PasswordLoginMethods } from '../../../Type/application';
|
|
4
3
|
export interface FormItemAccountProps extends FormItemProps {
|
|
5
|
-
|
|
4
|
+
validPasswordLoginMethods: string[];
|
|
6
5
|
}
|
|
7
6
|
export declare const FormItemAccount: React.FC<FormItemAccountProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InputProps } from 'antd/lib/input';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { PasswordLoginMethods } from '../../../Type/application';
|
|
4
3
|
export interface InputAccountProps extends InputProps {
|
|
5
|
-
passwordLoginMethods:
|
|
4
|
+
passwordLoginMethods: string[];
|
|
5
|
+
placeholder: string;
|
|
6
6
|
}
|
|
7
7
|
export declare const InputAccount: React.FC<InputAccountProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AuthingResponse } from '../../../_utils/http';
|
|
3
|
-
import { Agreement, LoginMethods
|
|
3
|
+
import { Agreement, LoginMethods } from '../../../Type/application';
|
|
4
4
|
import { BackFillMultipleState, StoreInstance } from '../../../Guard/core/hooks/useMultipleAccounts';
|
|
5
5
|
interface LoginWithPasswordProps {
|
|
6
6
|
publicKey: string;
|
|
@@ -10,7 +10,7 @@ interface LoginWithPasswordProps {
|
|
|
10
10
|
onLoginSuccess?: any;
|
|
11
11
|
onLoginFailed?: any;
|
|
12
12
|
onLoginRequest?: (loginInfo: any) => Promise<AuthingResponse>;
|
|
13
|
-
passwordLoginMethods:
|
|
13
|
+
passwordLoginMethods: string[];
|
|
14
14
|
agreements: Agreement[];
|
|
15
15
|
loginWay?: LoginMethods;
|
|
16
16
|
submitButText?: string;
|
|
@@ -34,7 +34,8 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
|
|
|
34
34
|
} | undefined) => void;
|
|
35
35
|
setUserInfo: (user: Pick<import("../../Guard/core/hooks/useMultipleAccounts").User & {
|
|
36
36
|
id: string;
|
|
37
|
-
|
|
37
|
+
loginAccount?: string | undefined;
|
|
38
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
38
39
|
setLoginWayByHttpData: (account: string, data: {
|
|
39
40
|
username?: string | undefined;
|
|
40
41
|
phone?: string | undefined;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '../Type';
|
|
2
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,
|
|
4
|
+
import { Agreement, LoginMethods, SocialConnectionProvider } from '../Type/application';
|
|
5
5
|
export interface LoginConfig extends IG2Config {
|
|
6
6
|
autoRegister?: boolean;
|
|
7
7
|
disableResetPwd?: boolean;
|
|
8
8
|
disableRegister?: boolean;
|
|
9
9
|
defaultLoginMethod?: LoginMethods;
|
|
10
10
|
loginMethods?: LoginMethods[];
|
|
11
|
-
passwordLoginMethods?:
|
|
11
|
+
passwordLoginMethods?: string[];
|
|
12
12
|
socialConnections?: SocialConnectionProvider[];
|
|
13
13
|
socialConnectionsBtnShape?: 'default' | 'button' | 'icon';
|
|
14
14
|
enterpriseConnections?: string[];
|
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
|
|
10
|
+
export declare enum MFAType {
|
|
11
11
|
SMS = "SMS",
|
|
12
12
|
EMAIL = "EMAIL",
|
|
13
13
|
TOTP = "OTP",
|
|
@@ -3,8 +3,8 @@ import { IG2FCProps, IG2Config, IG2Events } from '../Type';
|
|
|
3
3
|
import { Agreement, RegisterMethods } from '../Type/application';
|
|
4
4
|
export interface RegisterConfig extends IG2Config {
|
|
5
5
|
disableRegister?: boolean;
|
|
6
|
-
registerMethods?:
|
|
7
|
-
defaultRegisterMethod?:
|
|
6
|
+
registerMethods?: string[];
|
|
7
|
+
defaultRegisterMethod?: string;
|
|
8
8
|
publicKey?: string;
|
|
9
9
|
agreementEnabled?: boolean;
|
|
10
10
|
agreements?: Agreement[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Lang } from '..';
|
|
2
2
|
import { PasswordStrength } from '../_utils';
|
|
3
3
|
export * from 'authing-js-sdk';
|
|
4
|
-
export declare
|
|
4
|
+
export declare enum LoginMethods {
|
|
5
5
|
LDAP = "ldap",
|
|
6
6
|
AppQr = "app-qrcode",
|
|
7
7
|
Password = "password",
|
|
@@ -10,11 +10,11 @@ export declare const enum LoginMethods {
|
|
|
10
10
|
AD = "ad",
|
|
11
11
|
WechatMpQrcode = "wechatmp-qrcode"
|
|
12
12
|
}
|
|
13
|
-
export declare
|
|
13
|
+
export declare enum OIDCConnectionMode {
|
|
14
14
|
FRONT_CHANNEL = "FRONT_CHANNEL",
|
|
15
15
|
BACK_CHANNEL = "BACK_CHANNEL"
|
|
16
16
|
}
|
|
17
|
-
export declare
|
|
17
|
+
export declare enum SocialConnectionProvider {
|
|
18
18
|
ALIPAY = "alipay",
|
|
19
19
|
GOOGLE = "google",
|
|
20
20
|
WECHATPC = "wechat:pc",
|
|
@@ -41,7 +41,7 @@ export declare const enum SocialConnectionProvider {
|
|
|
41
41
|
QINGCLOUD = "qingcloud",
|
|
42
42
|
FACEBOOK = "facebook"
|
|
43
43
|
}
|
|
44
|
-
export declare
|
|
44
|
+
export declare enum Protocol {
|
|
45
45
|
AD = "ad",
|
|
46
46
|
CAS = "cas",
|
|
47
47
|
LDAP = "ldap",
|
|
@@ -98,16 +98,22 @@ export interface SocialConnectionItem {
|
|
|
98
98
|
authorizationUrl: string;
|
|
99
99
|
tooltip: Record<Lang, string>;
|
|
100
100
|
}
|
|
101
|
-
export declare
|
|
101
|
+
export declare enum RegisterMethods {
|
|
102
102
|
Email = "email",
|
|
103
103
|
Phone = "phone",
|
|
104
104
|
EmailCode = "emailCode"
|
|
105
105
|
}
|
|
106
|
-
export declare
|
|
106
|
+
export declare enum RegisterSortMethods {
|
|
107
|
+
Email = "email-password",
|
|
108
|
+
Phone = "phone-code",
|
|
109
|
+
EmailCode = "email-code"
|
|
110
|
+
}
|
|
111
|
+
export interface QrCodeItem {
|
|
107
112
|
id: string;
|
|
108
113
|
title: string;
|
|
109
114
|
isDefault?: boolean;
|
|
110
|
-
}
|
|
115
|
+
}
|
|
116
|
+
export declare type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
|
|
111
117
|
export interface OidcClientMetadata {
|
|
112
118
|
grant_types: string[];
|
|
113
119
|
client_id: string;
|
|
@@ -145,9 +151,13 @@ export interface UserExtendsField {
|
|
|
145
151
|
export declare type ExtendsField = InternalExtendsField | UserExtendsField;
|
|
146
152
|
export interface ApplicationPasswordTabConfig {
|
|
147
153
|
enabledLoginMethods?: PasswordLoginMethods[];
|
|
154
|
+
validRegisterMethods?: string[];
|
|
155
|
+
validLoginMethods?: string[];
|
|
148
156
|
}
|
|
149
157
|
export interface ApplicationVerifyCodeTabConfig {
|
|
150
158
|
enabledLoginMethods: VerifyLoginMethods[];
|
|
159
|
+
validRegisterMethods?: string[];
|
|
160
|
+
validLoginMethods?: string[];
|
|
151
161
|
}
|
|
152
162
|
export interface Agreement {
|
|
153
163
|
id: number;
|
|
@@ -159,6 +169,14 @@ export interface Agreement {
|
|
|
159
169
|
export declare type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
|
|
160
170
|
export declare type VerifyLoginMethods = 'email-code' | 'phone-code';
|
|
161
171
|
export declare type ComplateFiledsPlace = 'register' | 'login';
|
|
172
|
+
export interface TabFieldsI18nItem {
|
|
173
|
+
key: string;
|
|
174
|
+
label: string;
|
|
175
|
+
labelEn: string;
|
|
176
|
+
i18n: {
|
|
177
|
+
[propName in Lang]?: string;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
162
180
|
export interface ApplicationConfig {
|
|
163
181
|
id: string;
|
|
164
182
|
allowedOrigins: string[];
|
|
@@ -198,6 +216,9 @@ export interface ApplicationConfig {
|
|
|
198
216
|
};
|
|
199
217
|
};
|
|
200
218
|
qrcodeTabsSettings: QrcodeTabsSettings;
|
|
219
|
+
qrCodeSortConfig: {
|
|
220
|
+
loginMethodsSort?: string[];
|
|
221
|
+
};
|
|
201
222
|
loginTabs: {
|
|
202
223
|
list: string[];
|
|
203
224
|
default: string;
|
|
@@ -264,14 +285,11 @@ export interface ApplicationConfig {
|
|
|
264
285
|
* 是否开启注册密码补全
|
|
265
286
|
*/
|
|
266
287
|
enableCompletePassword: boolean;
|
|
267
|
-
/**
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
tenantInfo?: Record<string, any>;
|
|
273
|
-
/** mfa 相关 */
|
|
274
|
-
mfa: {
|
|
275
|
-
faceScore: number;
|
|
288
|
+
/**
|
|
289
|
+
* 登录注册排序
|
|
290
|
+
*/
|
|
291
|
+
tabMethodsSortConfig: {
|
|
292
|
+
loginMethodsSort: string[];
|
|
276
293
|
};
|
|
294
|
+
tabMethodsFields: TabFieldsI18nItem[];
|
|
277
295
|
}
|
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
|
|
8
|
+
export declare enum GuardMode {
|
|
9
9
|
Modal = "modal",
|
|
10
10
|
Normal = "normal"
|
|
11
11
|
}
|
|
@@ -55,11 +55,11 @@ export interface IG2Events {
|
|
|
55
55
|
}
|
|
56
56
|
export declare const getDefaultG2Config: () => IG2Config;
|
|
57
57
|
export declare const LanguageMap: any;
|
|
58
|
-
export declare
|
|
58
|
+
export declare enum InputMethod {
|
|
59
59
|
EmailCode = "email-code",
|
|
60
60
|
PhoneCode = "phone-code"
|
|
61
61
|
}
|
|
62
|
-
export declare
|
|
62
|
+
export declare 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
|
|
71
|
+
export declare enum EmailScene {
|
|
72
72
|
WELCOME_EMAIL = "WELCOME_EMAIL",
|
|
73
73
|
FIRST_CREATED_USER = "FIRST_CREATED_USER",
|
|
74
74
|
REGISTER_VERIFY_CODE = "REGISTER_VERIFY_CODE",
|
|
@@ -3,3 +3,4 @@ import { ValidatorFormItemProps } from '.';
|
|
|
3
3
|
export declare const EmailFormItem: React.FC<ValidatorFormItemProps>;
|
|
4
4
|
export declare const PhoneFormItem: React.FC<ValidatorFormItemProps>;
|
|
5
5
|
export declare const UserNameFormItem: React.FC<ValidatorFormItemProps>;
|
|
6
|
+
export declare const CustomNameFormItem: React.FC<ValidatorFormItemProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormInstance, FormItemProps } from 'antd/lib/form';
|
|
2
2
|
import FormItem from 'antd/lib/form/FormItem';
|
|
3
3
|
import { PasswordFormItem } from './PasswordFormItem';
|
|
4
|
-
import { EmailFormItem, PhoneFormItem, UserNameFormItem } from './ValidatorFormItem';
|
|
4
|
+
import { EmailFormItem, PhoneFormItem, UserNameFormItem, CustomNameFormItem } from './ValidatorFormItem';
|
|
5
5
|
export interface ValidatorFormItemProps extends FormItemProps {
|
|
6
6
|
form?: FormInstance;
|
|
7
7
|
checkRepeat?: boolean;
|
|
@@ -11,9 +11,10 @@ export interface ValidatorFormItemProps extends FormItemProps {
|
|
|
11
11
|
* 控制内部FormItem组件关于pattern的校验规则
|
|
12
12
|
*/
|
|
13
13
|
isCheckPattern?: boolean;
|
|
14
|
+
defaultMethod?: string;
|
|
14
15
|
}
|
|
15
16
|
export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
|
|
16
|
-
method: 'email' | 'phone' | 'username';
|
|
17
|
+
method: 'email' | 'phone' | 'username' | string;
|
|
17
18
|
}
|
|
18
19
|
export interface PasswordFormItemProps extends FormItemProps {
|
|
19
20
|
}
|
|
@@ -26,6 +27,7 @@ interface FormItemInterface extends InternalFormItemType {
|
|
|
26
27
|
Email: typeof EmailFormItem;
|
|
27
28
|
Phone: typeof PhoneFormItem;
|
|
28
29
|
UserName: typeof UserNameFormItem;
|
|
30
|
+
CustomName: typeof CustomNameFormItem;
|
|
29
31
|
}
|
|
30
32
|
declare const CustomFormItem: FormItemInterface;
|
|
31
33
|
export default CustomFormItem;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { GuardLocalConfig } from '../../Guard/config';
|
|
3
3
|
import { GuardHttp } from '../guardHttp';
|
|
4
4
|
import { GuardPageConfig } from '../../Type';
|
|
5
|
-
import { ApplicationConfig, LoginMethods
|
|
5
|
+
import { ApplicationConfig, LoginMethods } from '../../Type/application';
|
|
6
6
|
export declare const getPublicConfig: (appId: string) => ApplicationConfig;
|
|
7
7
|
export declare const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
|
|
8
8
|
export declare const getPageConfig: (appId: string) => GuardPageConfig;
|
|
@@ -26,8 +26,8 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
26
26
|
loadingComponent?: import("react").ReactNode;
|
|
27
27
|
openEventsMapping?: boolean | undefined;
|
|
28
28
|
disableRegister?: boolean | undefined;
|
|
29
|
-
registerMethods?:
|
|
30
|
-
defaultRegisterMethod?:
|
|
29
|
+
registerMethods?: string[] | undefined;
|
|
30
|
+
defaultRegisterMethod?: string | undefined;
|
|
31
31
|
publicKey?: string | undefined;
|
|
32
32
|
agreementEnabled?: boolean | undefined;
|
|
33
33
|
agreements?: import("../../Type").Agreement[] | undefined;
|
|
@@ -50,7 +50,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
50
50
|
disableResetPwd?: boolean | undefined;
|
|
51
51
|
defaultLoginMethod?: LoginMethods | undefined;
|
|
52
52
|
loginMethods?: LoginMethods[] | undefined;
|
|
53
|
-
passwordLoginMethods?:
|
|
53
|
+
passwordLoginMethods?: string[] | undefined;
|
|
54
54
|
socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
|
|
55
55
|
socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
|
|
56
56
|
enterpriseConnections?: string[] | undefined;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig } from '..';
|
|
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';
|
|
5
5
|
import { ApplicationConfig } from '../Type/application';
|
|
6
6
|
import { GuardHttp } from './guardHttp';
|
|
7
|
-
import { MultipleTenant } from './tenant';
|
|
8
7
|
export interface IGuardContext {
|
|
9
8
|
finallyConfig: GuardLocalConfig;
|
|
10
9
|
defaultMergedConfig: GuardLocalConfig;
|
|
@@ -43,8 +42,7 @@ export interface IGuardContext {
|
|
|
43
42
|
*/
|
|
44
43
|
clearBackFillData?: () => void;
|
|
45
44
|
};
|
|
46
|
-
|
|
47
|
-
tenantInstance?: MultipleTenant;
|
|
45
|
+
defaultLanguageConfig: Lang;
|
|
48
46
|
}
|
|
49
47
|
export declare const createGuardXContext: () => {
|
|
50
48
|
Provider: React.FC<{
|
|
@@ -109,7 +107,8 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
109
107
|
} | undefined) => void;
|
|
110
108
|
setUserInfo: (user: Pick<import("../Guard/core/hooks/useMultipleAccounts").User & {
|
|
111
109
|
id: string;
|
|
112
|
-
|
|
110
|
+
loginAccount?: string | undefined;
|
|
111
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
113
112
|
setLoginWayByHttpData: (account: string, data: {
|
|
114
113
|
username?: string | undefined;
|
|
115
114
|
phone?: string | undefined;
|
|
@@ -140,5 +139,7 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
140
139
|
*/
|
|
141
140
|
clearBackFillData?: (() => void) | undefined;
|
|
142
141
|
};
|
|
143
|
-
/**
|
|
144
|
-
|
|
142
|
+
/**
|
|
143
|
+
* 默认语言
|
|
144
|
+
*/
|
|
145
|
+
export declare const useGuardDefaultLanguage: () => Lang;
|
|
@@ -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
|
|
31
|
+
export declare enum SocialConnectionEvent {
|
|
32
32
|
Message = "message",
|
|
33
33
|
Auth = "auth"
|
|
34
34
|
}
|
package/types/_utils/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Rule } from 'antd/lib/form';
|
|
|
2
2
|
import qs from 'qs';
|
|
3
3
|
import { User } from 'authing-js-sdk';
|
|
4
4
|
import { GuardProps } from '../Guard';
|
|
5
|
-
import { ApplicationConfig, ComplateFiledsPlace, LoginMethods, RegisterMethods } from '../Type/application';
|
|
5
|
+
import { ApplicationConfig, ComplateFiledsPlace, LoginMethods, RegisterMethods, RegisterSortMethods, TabFieldsI18nItem } from '../Type/application';
|
|
6
6
|
import { Lang } from '../Type';
|
|
7
7
|
export * from './popupCenter';
|
|
8
8
|
export * from './clipboard';
|
|
@@ -27,7 +27,7 @@ export declare const getClassnames: (classnames: (string | boolean | undefined)[
|
|
|
27
27
|
* @param item
|
|
28
28
|
* @returns {boolean}
|
|
29
29
|
*/
|
|
30
|
-
export declare function isObject(item: any):
|
|
30
|
+
export declare function isObject(item: any): boolean;
|
|
31
31
|
/**
|
|
32
32
|
* https://www.itranslater.com/qa/details/2115518846294557696
|
|
33
33
|
* Deep merge two objects.
|
|
@@ -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
|
|
63
|
+
export declare enum PasswordStrength {
|
|
64
64
|
NoCheck = 0,
|
|
65
65
|
Low = 1,
|
|
66
66
|
Middle = 2,
|
|
@@ -76,7 +76,7 @@ export declare const getPasswordValidate: (strength?: PasswordStrength, customPa
|
|
|
76
76
|
export declare const getPasswordValidateRules: (strength?: PasswordStrength, customPasswordStrength?: any, customValidateTrigger?: string | undefined, fieldRequiredRuleMessage?: string | undefined) => Rule[];
|
|
77
77
|
export declare const sleep: (delay: number) => Promise<unknown>;
|
|
78
78
|
export declare const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean | undefined) => boolean;
|
|
79
|
-
export declare const
|
|
79
|
+
export declare const transformMethod: (method: RegisterMethods | string) => string;
|
|
80
80
|
export declare const mailDesensitization: (mail: string) => string;
|
|
81
81
|
export declare const phoneDesensitization: (phone: string) => string;
|
|
82
82
|
export declare const getHundreds: (num: number) => number;
|
|
@@ -91,3 +91,6 @@ export declare const getLoginTypePipe: (publicConfig: ApplicationConfig, registe
|
|
|
91
91
|
} | undefined;
|
|
92
92
|
export declare const getPasswordIdentify: (identity: string) => string;
|
|
93
93
|
export declare const getCurrentLng: () => Lang;
|
|
94
|
+
export declare const getI18nLabel: (method: string | RegisterSortMethods, i18nFields: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
|
|
95
|
+
export declare const getSortLabels: (methods: string[], i18nConfig: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
|
|
96
|
+
export declare const getSortTabs: (tabs: string[], tab?: string | undefined) => string[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { GuardModuleType } from '../../Guard';
|
|
2
|
-
export declare
|
|
2
|
+
export declare enum CodeAction {
|
|
3
3
|
CHANGE_MODULE = "changeModule",
|
|
4
4
|
RENDER_MESSAGE = "renderMessage",
|
|
5
5
|
FLOW_END = "flowEnd"
|
|
6
6
|
}
|
|
7
|
-
export declare
|
|
7
|
+
export declare enum ApiCode {
|
|
8
8
|
IDENTITY_BINDING_ASK = 1641,
|
|
9
9
|
IDENTITY_BINDING = 1640,
|
|
10
10
|
APP_MFA = 1636,
|
|
@@ -17,7 +17,6 @@ export declare const enum ApiCode {
|
|
|
17
17
|
FORCED_PASSWORD_RESET = 2058,
|
|
18
18
|
UNSAFE_PASSWORD_TIP = 2061,
|
|
19
19
|
UNSAFE_PASSWORD_RESET = 2071,
|
|
20
|
-
FLOW_SELECT_ACCOUNT = 2921
|
|
21
|
-
TENANT_PORTAL = 1644
|
|
20
|
+
FLOW_SELECT_ACCOUNT = 2921
|
|
22
21
|
}
|
|
23
22
|
export declare const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.
|
|
1
|
+
declare const _default: "4.2.0-alpha.0";
|
|
2
2
|
export default _default;
|