@authing/react-ui-components 4.4.4-ey.22 → 4.4.4-ey.24
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 +3 -1
- package/types/CompleteInfo/businessRequest.d.ts +1 -1
- package/types/CompleteInfo/interface.d.ts +1 -1
- package/types/CompleteInfo/utils.d.ts +3 -13
- package/types/Guard/GuardModule/stateMachine.d.ts +1 -1
- package/types/Guard/authClient.d.ts +1 -1
- package/types/Guard/core/hooks/useMultipleAccounts.d.ts +11 -11
- package/types/Guard/core/useAppendConfig.d.ts +1 -1
- package/types/Guard/core/usePlugin.d.ts +1 -1
- package/types/Guard/event.d.ts +3 -36
- package/types/Guard/module.d.ts +24 -24
- package/types/IconFont/useGuardIconfont.d.ts +1 -1
- package/types/Login/core/withAuthingOtpPush/types.d.ts +3 -3
- package/types/Login/hooks/useLoginMultiple.d.ts +2 -2
- package/types/MFA/VerifyCodeInput/ey.d.ts +1 -1
- package/types/MFA/VerifyCodeInput/index.d.ts +5 -1
- package/types/Qrcode/UiQrCode.d.ts +1 -1
- package/types/Qrcode/WorkQrCode.d.ts +1 -1
- package/types/Qrcode/hooks/usePreQrCode.d.ts +2 -2
- package/types/Qrcode/hooks/useStatus.d.ts +2 -1
- package/types/Qrcode/index.d.ts +1 -1
- package/types/Type/application.d.ts +11 -11
- package/types/Type/index.d.ts +1 -1
- package/types/ValidatorRules/index.d.ts +1 -1
- package/types/_utils/config/index.d.ts +2 -2
- package/types/_utils/context.d.ts +2 -2
- package/types/_utils/guardHttp.d.ts +2 -2
- package/types/_utils/hooks/index.d.ts +1 -1
- package/types/_utils/http.d.ts +3 -3
- package/types/_utils/index.d.ts +8 -8
- package/types/_utils/initAppId.d.ts +1 -1
- package/types/_utils/responseManagement/interface.d.ts +1 -1
- package/types/version/version.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authing/react-ui-components",
|
|
3
|
-
"version": "4.4.4-ey.
|
|
3
|
+
"version": "4.4.4-ey.24",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "lib/index.min.js",
|
|
6
6
|
"typings": "types/index.d.ts",
|
|
@@ -17,12 +17,14 @@
|
|
|
17
17
|
"crypto-js": "^4.1.1",
|
|
18
18
|
"fastclick": "^1.0.6",
|
|
19
19
|
"global": "^4.4.0",
|
|
20
|
+
"input-otp": "^1.2.4",
|
|
20
21
|
"phone": "^3.1.12",
|
|
21
22
|
"prompt": "^1.3.0",
|
|
22
23
|
"qrcode.react": "^3.1.0",
|
|
23
24
|
"qs": "^6.9.4",
|
|
24
25
|
"react-responsive": "^9.0.0-beta.5",
|
|
25
26
|
"react-use": "^17.3.1",
|
|
27
|
+
"typescript": "5.3.3",
|
|
26
28
|
"ua-parser-js": "^1.0.2",
|
|
27
29
|
"wildcard": "^1.1.2"
|
|
28
30
|
},
|
|
@@ -4,6 +4,6 @@ export declare enum CompleteInfoAuthFlowAction {
|
|
|
4
4
|
Complete = "complete-completion",
|
|
5
5
|
Skip = "skip-completion"
|
|
6
6
|
}
|
|
7
|
-
export declare const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest
|
|
7
|
+
export declare const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
8
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>;
|
|
@@ -21,7 +21,7 @@ export interface GuardCompleteInfoViewProps extends GuardCompleteInfoProps {
|
|
|
21
21
|
initData: any;
|
|
22
22
|
onLogin?: any;
|
|
23
23
|
}
|
|
24
|
-
export
|
|
24
|
+
export type ExtendsFieldType = 'user' | 'internal';
|
|
25
25
|
export interface ExtendsField {
|
|
26
26
|
type: ExtendsFieldType;
|
|
27
27
|
name: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { User } from 'authing-js-sdk';
|
|
2
|
-
import { CompleteInfoMetaData, ExtendsField } from '../CompleteInfo/interface';
|
|
2
|
+
import { CompleteInfoMetaData, CompleteInfoRequest, ExtendsField } from '../CompleteInfo/interface';
|
|
3
3
|
import { ApplicationConfig } from '../Type/application';
|
|
4
4
|
export declare const completeFieldsFilter: (user: User, field: ExtendsField) => boolean;
|
|
5
5
|
export declare const extendsFieldsToMetaData: (extendsFields: import("../Type/application").ExtendsField[] | undefined, selectOptions: {
|
|
@@ -9,24 +9,14 @@ export declare const extendsFieldsToMetaData: (extendsFields: import("../Type/ap
|
|
|
9
9
|
label: string;
|
|
10
10
|
}[];
|
|
11
11
|
}[]) => CompleteInfoMetaData[];
|
|
12
|
-
export declare const eyFieldValuesToRegisterProfile: (extendsFields: ApplicationConfig['extendsFields'], fieldValues?: {
|
|
13
|
-
name: string;
|
|
14
|
-
value: string;
|
|
15
|
-
code?: string | undefined;
|
|
16
|
-
phoneCountryCode?: string | undefined;
|
|
17
|
-
}[] | undefined) => {
|
|
12
|
+
export declare const eyFieldValuesToRegisterProfile: (extendsFields: ApplicationConfig['extendsFields'], fieldValues?: CompleteInfoRequest['fieldValues']) => {
|
|
18
13
|
registerProfile: Record<string, any>;
|
|
19
14
|
udf: {
|
|
20
15
|
key: string;
|
|
21
16
|
value: string;
|
|
22
17
|
}[];
|
|
23
18
|
};
|
|
24
|
-
export declare const fieldValuesToRegisterProfile: (extendsFields: ApplicationConfig['extendsFields'], fieldValues?: {
|
|
25
|
-
name: string;
|
|
26
|
-
value: string;
|
|
27
|
-
code?: string | undefined;
|
|
28
|
-
phoneCountryCode?: string | undefined;
|
|
29
|
-
}[] | undefined) => {
|
|
19
|
+
export declare const fieldValuesToRegisterProfile: (extendsFields: ApplicationConfig['extendsFields'], fieldValues?: CompleteInfoRequest['fieldValues']) => {
|
|
30
20
|
registerProfile: Record<string, any>;
|
|
31
21
|
udf: {
|
|
32
22
|
key: string;
|
|
@@ -14,7 +14,7 @@ export interface StateMachineLog {
|
|
|
14
14
|
date: number;
|
|
15
15
|
dataSource: ModuleState;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type ChangeModuleEvent = (nextModule: GuardModuleType, initData?: any) => void;
|
|
18
18
|
export declare class GuardStateMachine {
|
|
19
19
|
private order;
|
|
20
20
|
private config;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AuthenticationClient } from 'authing-js-sdk';
|
|
2
2
|
import { GuardLocalConfig } from './config';
|
|
3
3
|
declare let authClient: AuthenticationClient;
|
|
4
|
-
export declare const initGuardAuthClient: (config: GuardLocalConfig, appId: string, tenantId?: string
|
|
4
|
+
export declare const initGuardAuthClient: (config: GuardLocalConfig, appId: string, tenantId?: string) => AuthenticationClient;
|
|
5
5
|
export declare const useInitGuardAuthClient: (props: {
|
|
6
6
|
config?: GuardLocalConfig | undefined;
|
|
7
7
|
appId?: string | undefined;
|
|
@@ -13,7 +13,7 @@ export declare const QR_CODE_WAY: LoginWay[];
|
|
|
13
13
|
* 登录时所有支持的登录列表(前端定义列表)
|
|
14
14
|
* 这里稍微有点乱 因为Login中的登录方式和这里的不匹配,暂时放在了一起
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export 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
|
* 携带的回填数据信息
|
|
@@ -27,7 +27,7 @@ export interface BackFillMultipleState extends Omit<User, 'id' | 'name' | 'nickn
|
|
|
27
27
|
/**
|
|
28
28
|
* Store instance
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
30
|
+
export type StoreInstance = ReturnType<MultipleAccount['getStore']>;
|
|
31
31
|
/**
|
|
32
32
|
* 当前 userId 对应的类型
|
|
33
33
|
*/
|
|
@@ -242,15 +242,15 @@ declare class MultipleAccount {
|
|
|
242
242
|
serverSideLoginMethods: LoginWay[];
|
|
243
243
|
isInternationSms: boolean;
|
|
244
244
|
}) => void;
|
|
245
|
-
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string
|
|
245
|
+
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string, internation?: {
|
|
246
246
|
phoneCountryCode: string;
|
|
247
247
|
areaCode: string;
|
|
248
|
-
}
|
|
249
|
-
setUserInfo: (user:
|
|
248
|
+
}) => void;
|
|
249
|
+
setUserInfo: (user: Omit<User & {
|
|
250
250
|
id: string;
|
|
251
251
|
loginAccount?: string | undefined;
|
|
252
252
|
usertype?: string | undefined;
|
|
253
|
-
}, "
|
|
253
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
254
254
|
setLoginWayByHttpData: (account: string, data: {
|
|
255
255
|
username?: string | undefined;
|
|
256
256
|
phone?: string | undefined;
|
|
@@ -286,15 +286,15 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
|
|
|
286
286
|
serverSideLoginMethods: LoginWay[];
|
|
287
287
|
isInternationSms: boolean;
|
|
288
288
|
}) => void;
|
|
289
|
-
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string
|
|
289
|
+
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string, internation?: {
|
|
290
290
|
phoneCountryCode: string;
|
|
291
291
|
areaCode: string;
|
|
292
|
-
}
|
|
293
|
-
setUserInfo: (user:
|
|
292
|
+
}) => void;
|
|
293
|
+
setUserInfo: (user: Omit<User & {
|
|
294
294
|
id: string;
|
|
295
295
|
loginAccount?: string | undefined;
|
|
296
296
|
usertype?: string | undefined;
|
|
297
|
-
}, "
|
|
297
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
298
298
|
setLoginWayByHttpData: (account: string, data: {
|
|
299
299
|
username?: string | undefined;
|
|
300
300
|
phone?: string | undefined;
|
|
@@ -317,7 +317,7 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
|
|
|
317
317
|
getOriginWay: () => string;
|
|
318
318
|
} | undefined;
|
|
319
319
|
isMultipleAccount: boolean;
|
|
320
|
-
referMultipleState: (type: 'login' | 'multiple', data?: BackFillMultipleState
|
|
320
|
+
referMultipleState: (type: 'login' | 'multiple', data?: BackFillMultipleState) => void;
|
|
321
321
|
multipleAccountData: BackFillMultipleState | undefined;
|
|
322
322
|
clearBackFillData: () => void;
|
|
323
323
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GuardAppendConfig } from '../..';
|
|
2
2
|
export declare const getGuardWindow: () => (Window & typeof globalThis) | undefined;
|
|
3
3
|
export declare const useGuardWindow: () => (Window & typeof globalThis) | undefined;
|
|
4
|
-
export declare const useInitGuardAppendConfig: (setForceUpdate: any, appId?: string
|
|
4
|
+
export declare const useInitGuardAppendConfig: (setForceUpdate: any, appId?: string, appendConfig?: GuardAppendConfig) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FacePlugin } from '../../_utils/facePlugin/interface';
|
|
2
2
|
export declare const useGuardPlugin: any;
|
|
3
|
-
export declare const useGuardFacePlugin: (facePlugin?: FacePlugin
|
|
3
|
+
export declare const useGuardFacePlugin: (facePlugin?: FacePlugin) => boolean;
|
package/types/Guard/event.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ 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
|
+
import { StoreInstance } from './core/hooks/useMultipleAccounts';
|
|
9
10
|
interface OnAfterChangeModuleOptions {
|
|
10
11
|
currentView: string;
|
|
11
12
|
currentModule: GuardModuleType;
|
|
@@ -16,42 +17,8 @@ export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEv
|
|
|
16
17
|
onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
|
|
17
18
|
onAfterChangeModule?: (options: OnAfterChangeModuleOptions) => void;
|
|
18
19
|
}
|
|
19
|
-
export declare const guardEventsFilter: (props: any, multipleInstance?:
|
|
20
|
-
|
|
21
|
-
serverSideLoginMethods: import("./core/hooks/useMultipleAccounts").LoginWay[];
|
|
22
|
-
isInternationSms: boolean;
|
|
23
|
-
}) => void;
|
|
24
|
-
setLoginWay: (tab: "input" | "qrcode", way: import("./core/hooks/useMultipleAccounts").LoginWay, id?: string | undefined, internation?: {
|
|
25
|
-
phoneCountryCode: string;
|
|
26
|
-
areaCode: string;
|
|
27
|
-
} | undefined) => void;
|
|
28
|
-
setUserInfo: (user: Pick<import("./core/hooks/useMultipleAccounts").User & {
|
|
29
|
-
id: string;
|
|
30
|
-
loginAccount?: string | undefined;
|
|
31
|
-
usertype?: string | undefined;
|
|
32
|
-
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount" | "usertype">) => void;
|
|
33
|
-
setLoginWayByHttpData: (account: string, data: {
|
|
34
|
-
username?: string | undefined;
|
|
35
|
-
phone?: string | undefined;
|
|
36
|
-
email?: string | undefined;
|
|
37
|
-
}) => void;
|
|
38
|
-
setLoginWayByLDAPData: (account: string, data: {
|
|
39
|
-
name?: string | undefined;
|
|
40
|
-
phone?: string | undefined;
|
|
41
|
-
email?: string | undefined;
|
|
42
|
-
}) => void;
|
|
43
|
-
getMemoUser: (excludeWays?: import("./core/hooks/useMultipleAccounts").LoginWay[]) => import("../Login/multipleAccounts/panel").SelectOptions[];
|
|
44
|
-
getMemoSingleUser: (id: string) => {
|
|
45
|
-
way: import("./core/hooks/useMultipleAccounts").LoginWay;
|
|
46
|
-
account: string;
|
|
47
|
-
} | undefined;
|
|
48
|
-
delUserById: (id: string) => string;
|
|
49
|
-
getMemberState: () => boolean;
|
|
50
|
-
getFirstBackFillData: () => import("./core/hooks/useMultipleAccounts").BackFillMultipleState | undefined;
|
|
51
|
-
getOriginAccount: () => string;
|
|
52
|
-
getOriginWay: () => string;
|
|
53
|
-
} | undefined, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
54
|
-
export declare const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
20
|
+
export declare const guardEventsFilter: (props: any, multipleInstance?: StoreInstance, openEventsMapping?: boolean) => GuardEvents;
|
|
21
|
+
export declare const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean) => GuardEvents;
|
|
55
22
|
export declare const GuardEventsCamelToKebabMapping: {
|
|
56
23
|
readonly onLoad: "load";
|
|
57
24
|
readonly onLoadError: "load-error";
|
package/types/Guard/module.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
export declare enum GuardModuleType {
|
|
2
|
-
ERROR = "error"
|
|
3
|
-
LOGIN = "login"
|
|
4
|
-
REGISTER = "register"
|
|
5
|
-
MFA = "mfa"
|
|
6
|
-
FORGET_PWD = "forgetPassword"
|
|
7
|
-
FORCED_PASSWORD_RESET = "forcedPasswordReset"
|
|
8
|
-
NOTICE_PASSWORD_RESET = "noticePasswordReset"
|
|
9
|
-
FIRST_LOGIN_PASSWORD = "firstLoginPassword"
|
|
10
|
-
UNSAFE_PASSWORD_RESET = "unsafePasswordReset"
|
|
11
|
-
DOWNLOAD_AT = "downloadAT"
|
|
12
|
-
BIND_TOTP = "bindTotp"
|
|
13
|
-
ANY_QUESTIONS = "anyQuestions"
|
|
14
|
-
LOGIN_COMPLETE_INFO = "loginCompleteInfo"
|
|
15
|
-
REGISTER_PASSWORD = "registerPassword"
|
|
16
|
-
REGISTER_COMPLETE_INFO = "registerCompleteInfo"
|
|
17
|
-
RECOVERY_CODE = "recoveryCode"
|
|
18
|
-
SUBMIT_SUCCESS = "submitSuccess"
|
|
19
|
-
IDENTITY_BINDING_ASK = "identityBindingAsk"
|
|
20
|
-
IDENTITY_BINDING = "identityBinding"
|
|
21
|
-
IDENTITY_BINDING_NO_ASK = "identityBindingNoAsk"
|
|
22
|
-
SELF_UNLOCK = "selfUnlock"
|
|
23
|
-
FLOW_SELECT_ACCOUNT = "flowSelectAccount"
|
|
24
|
-
SELECT_ACCOUNT_2_LOGIN = "selectAccout2Login"
|
|
2
|
+
ERROR = "error",//错误页
|
|
3
|
+
LOGIN = "login",//登录页
|
|
4
|
+
REGISTER = "register",//注册页
|
|
5
|
+
MFA = "mfa",// 二次 mfa 认证页
|
|
6
|
+
FORGET_PWD = "forgetPassword",// 忘记密码页
|
|
7
|
+
FORCED_PASSWORD_RESET = "forcedPasswordReset",// 登陆安全策略 密码轮换页
|
|
8
|
+
NOTICE_PASSWORD_RESET = "noticePasswordReset",//提示修改密码页
|
|
9
|
+
FIRST_LOGIN_PASSWORD = "firstLoginPassword",//首次登录修改密码页
|
|
10
|
+
UNSAFE_PASSWORD_RESET = "unsafePasswordReset",// 密码强度不符合要求修改密码页
|
|
11
|
+
DOWNLOAD_AT = "downloadAT",//下载 Authenticator 页
|
|
12
|
+
BIND_TOTP = "bindTotp",// 绑定 TOTP页
|
|
13
|
+
ANY_QUESTIONS = "anyQuestions",// 问题反馈页
|
|
14
|
+
LOGIN_COMPLETE_INFO = "loginCompleteInfo",// 登录信息补全
|
|
15
|
+
REGISTER_PASSWORD = "registerPassword",// 验证码注册拉起密码补全页
|
|
16
|
+
REGISTER_COMPLETE_INFO = "registerCompleteInfo",//注册信息补全页
|
|
17
|
+
RECOVERY_CODE = "recoveryCode",// MFA 恢复码展示页
|
|
18
|
+
SUBMIT_SUCCESS = "submitSuccess",// 提交成功展示页
|
|
19
|
+
IDENTITY_BINDING_ASK = "identityBindingAsk",// 身份源绑定 问询页
|
|
20
|
+
IDENTITY_BINDING = "identityBinding",// 身份源绑定页
|
|
21
|
+
IDENTITY_BINDING_NO_ASK = "identityBindingNoAsk",// 身份源绑定页不问询
|
|
22
|
+
SELF_UNLOCK = "selfUnlock",// 自助解锁页
|
|
23
|
+
FLOW_SELECT_ACCOUNT = "flowSelectAccount",// 选择登录账号
|
|
24
|
+
SELECT_ACCOUNT_2_LOGIN = "selectAccout2Login",// 选择登录身份
|
|
25
25
|
/** 多租户门户选择页 */
|
|
26
26
|
TENANT_PORTAL = "tenant-portal",
|
|
27
|
-
New_SUBMIT_SUCCESS = "newSubmitSuccess"
|
|
27
|
+
New_SUBMIT_SUCCESS = "newSubmitSuccess",// 提交成功展示页
|
|
28
28
|
RESET_ACCOUNT_NAME = "resetAccountName",
|
|
29
29
|
/**
|
|
30
30
|
* pre check email
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useGuardIconfont: (cdnBase?: string
|
|
1
|
+
export declare const useGuardIconfont: (cdnBase?: string, setError?: any) => boolean;
|
|
@@ -9,7 +9,7 @@ export interface CheckPushCodeStatusProps {
|
|
|
9
9
|
export interface OnLoginProps {
|
|
10
10
|
account: string;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type LoginStatus = 'before' | 'pending';
|
|
13
13
|
export interface LoginWithAuthingOtpPushProps {
|
|
14
14
|
onLoginSuccess?: any;
|
|
15
15
|
multipleInstance?: StoreInstance;
|
|
@@ -20,9 +20,9 @@ export interface PushLoginGudeModalProps {
|
|
|
20
20
|
visible: boolean;
|
|
21
21
|
onClose: () => void;
|
|
22
22
|
}
|
|
23
|
-
export
|
|
23
|
+
export type Selector = 'howUsePushLogin' | 'howBindClient' | 'howGetAppLoginUrl';
|
|
24
24
|
export interface SelectorOption {
|
|
25
25
|
value: Selector;
|
|
26
26
|
label: string;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
28
|
+
export type SelectorOptions = SelectorOption[];
|
|
@@ -32,11 +32,11 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
|
|
|
32
32
|
phoneCountryCode: string;
|
|
33
33
|
areaCode: string;
|
|
34
34
|
} | undefined) => void;
|
|
35
|
-
setUserInfo: (user:
|
|
35
|
+
setUserInfo: (user: Omit<import("../../Guard/core/hooks/useMultipleAccounts").User & {
|
|
36
36
|
id: string;
|
|
37
37
|
loginAccount?: string | undefined;
|
|
38
38
|
usertype?: string | undefined;
|
|
39
|
-
}, "
|
|
39
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
40
40
|
setLoginWayByHttpData: (account: string, data: {
|
|
41
41
|
username?: string | undefined;
|
|
42
42
|
phone?: string | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SlotProps } from 'input-otp';
|
|
1
2
|
import React, { FC } from 'react';
|
|
2
3
|
import './style.less';
|
|
3
4
|
interface VerifyCodeInputProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -7,9 +8,12 @@ interface VerifyCodeInputProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
7
8
|
onEenter?: Function;
|
|
8
9
|
showDivider?: boolean;
|
|
9
10
|
onChange?: any;
|
|
10
|
-
value?:
|
|
11
|
+
value?: string;
|
|
11
12
|
onFinish?: any;
|
|
12
13
|
ResentBtnSort?: () => JSX.Element;
|
|
13
14
|
}
|
|
15
|
+
export declare const SoltInput: (solt: SlotProps & {
|
|
16
|
+
style: any;
|
|
17
|
+
}) => JSX.Element;
|
|
14
18
|
export declare const VerifyCodeInput: FC<VerifyCodeInputProps>;
|
|
15
19
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
3
|
import { CodeStatusDescriptions } from './WorkQrCode';
|
|
4
|
-
export
|
|
4
|
+
export type CodeStatus = 'loading' | 'ready' | 'already' | 'success' | 'error' | 'expired' | 'cancel' | 'MFA';
|
|
5
5
|
export declare const prefix: string;
|
|
6
6
|
export interface UiQrProps {
|
|
7
7
|
/**
|
|
@@ -4,7 +4,7 @@ import { CodeStatus, UiQrProps } from './UiQrCode';
|
|
|
4
4
|
/**
|
|
5
5
|
* 二维码不同状态下的底部描述文字
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type CodeStatusDescriptions = Partial<Record<Exclude<CodeStatus, 'loading'>, React.ReactNode | ((referQrCode?: () => void) => React.ReactNode)>>;
|
|
8
8
|
export interface WorkQrCodeRef {
|
|
9
9
|
referQrCode: () => Promise<{
|
|
10
10
|
random: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CodeStatus } from '../UiQrCode';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type ReducerType = 'change' | 'changeStatus' | 'changeDesc';
|
|
4
|
+
export type RootState = {
|
|
5
5
|
/**
|
|
6
6
|
* 状态
|
|
7
7
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { CodeStatus } from '../UiQrCode';
|
|
2
3
|
/**
|
|
3
4
|
* 根据不同状态添加不同的元素
|
|
4
5
|
* 维护不同状态的处理
|
|
5
6
|
*/
|
|
6
|
-
declare const useStatus: (status: CodeStatus) =>
|
|
7
|
+
declare const useStatus: (status: CodeStatus) => React.ReactNode[];
|
|
7
8
|
export { useStatus };
|
package/types/Qrcode/index.d.ts
CHANGED
|
@@ -6,12 +6,12 @@ export declare enum LoginMethods {
|
|
|
6
6
|
AppQr = "app-qrcode",
|
|
7
7
|
Password = "password",
|
|
8
8
|
PhoneCode = "phone-code",
|
|
9
|
-
EmailCode = "email-code"
|
|
10
|
-
WxMinQr = "wechat-miniprogram-qrcode"
|
|
11
|
-
AD = "ad"
|
|
12
|
-
WechatMpQrcode = "wechatmp-qrcode"
|
|
13
|
-
AuthingOtpPush = "authing-otp-push"
|
|
14
|
-
WechatworkCorpQrconnect = "wechatwork-service-provider-qrconnect"
|
|
9
|
+
EmailCode = "email-code",// 这是前端单独加的,后端只会返回 phone-code
|
|
10
|
+
WxMinQr = "wechat-miniprogram-qrcode",// 对应社会化登录的 wechat:miniprogram:qrconnect(小程序扫码登录)
|
|
11
|
+
AD = "ad",// 对应企业身份源的 Windows AD 登录
|
|
12
|
+
WechatMpQrcode = "wechatmp-qrcode",// 微信扫码关注登录
|
|
13
|
+
AuthingOtpPush = "authing-otp-push",// App 扫码登录
|
|
14
|
+
WechatworkCorpQrconnect = "wechatwork-service-provider-qrconnect",// 微信企业扫码关注登录
|
|
15
15
|
WechatworkCorpQrconnectNew = "wechatwork-service-provider-qrconnect-v2"
|
|
16
16
|
}
|
|
17
17
|
export declare enum OIDCConnectionMode {
|
|
@@ -123,7 +123,7 @@ export interface QrCodeItem {
|
|
|
123
123
|
identifier: string;
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
export
|
|
126
|
+
export type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
|
|
127
127
|
export interface OidcClientMetadata {
|
|
128
128
|
grant_types: string[];
|
|
129
129
|
client_id: string;
|
|
@@ -158,7 +158,7 @@ export interface UserExtendsField {
|
|
|
158
158
|
required: boolean;
|
|
159
159
|
validateRules: any[];
|
|
160
160
|
}
|
|
161
|
-
export
|
|
161
|
+
export type ExtendsField = InternalExtendsField | UserExtendsField;
|
|
162
162
|
export interface ApplicationPasswordTabConfig {
|
|
163
163
|
enabledLoginMethods?: PasswordLoginMethods[];
|
|
164
164
|
validRegisterMethods?: string[];
|
|
@@ -176,9 +176,9 @@ export interface Agreement {
|
|
|
176
176
|
lang: Lang;
|
|
177
177
|
availableAt?: number;
|
|
178
178
|
}
|
|
179
|
-
export
|
|
180
|
-
export
|
|
181
|
-
export
|
|
179
|
+
export type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
|
|
180
|
+
export type VerifyLoginMethods = 'email-code' | 'phone-code';
|
|
181
|
+
export type ComplateFiledsPlace = 'register' | 'login';
|
|
182
182
|
export interface TabFieldsI18nItem {
|
|
183
183
|
key: string;
|
|
184
184
|
label: string;
|
package/types/Type/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { FacePlugin } from '../_utils/facePlugin/interface';
|
|
|
5
5
|
import { ApplicationConfig } from './application';
|
|
6
6
|
export * from './application';
|
|
7
7
|
export type { CommonMessage, User };
|
|
8
|
-
export
|
|
8
|
+
export type Lang = 'zh-CN' | 'en-US';
|
|
9
9
|
export declare enum GuardMode {
|
|
10
10
|
Modal = "modal",
|
|
11
11
|
Normal = "normal"
|
|
@@ -20,7 +20,7 @@ export interface PasswordFormItemProps extends FormItemProps {
|
|
|
20
20
|
export interface ICheckProps {
|
|
21
21
|
check: (values: any) => void;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
type InternalFormItemType = typeof FormItem;
|
|
24
24
|
interface FormItemInterface extends InternalFormItemType {
|
|
25
25
|
Password: typeof PasswordFormItem;
|
|
26
26
|
Email: typeof EmailFormItem;
|
|
@@ -7,7 +7,7 @@ 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;
|
|
9
9
|
export declare const setPageConfig: (appId: string, config: GuardPageConfig) => GuardPageConfig;
|
|
10
|
-
export declare const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: Partial<GuardLocalConfig>
|
|
10
|
+
export declare const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: Partial<GuardLocalConfig>) => GuardLocalConfig | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* 请求服务console关于guard的配置
|
|
13
13
|
* @param forceUpdate
|
|
@@ -16,7 +16,7 @@ export declare const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, co
|
|
|
16
16
|
* @param httpClient
|
|
17
17
|
* @param setError
|
|
18
18
|
*/
|
|
19
|
-
export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
19
|
+
export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string, config?: GuardLocalConfig, httpClient?: GuardHttp, setError?: any) => {
|
|
20
20
|
finallyConfig: {
|
|
21
21
|
host: string;
|
|
22
22
|
isInvited?: boolean | undefined;
|
|
@@ -202,11 +202,11 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
202
202
|
phoneCountryCode: string;
|
|
203
203
|
areaCode: string;
|
|
204
204
|
} | undefined) => void;
|
|
205
|
-
setUserInfo: (user:
|
|
205
|
+
setUserInfo: (user: Omit<import("../Guard/core/hooks/useMultipleAccounts").User & {
|
|
206
206
|
id: string;
|
|
207
207
|
loginAccount?: string | undefined;
|
|
208
208
|
usertype?: string | undefined;
|
|
209
|
-
}, "
|
|
209
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
210
210
|
setLoginWayByHttpData: (account: string, data: {
|
|
211
211
|
username?: string | undefined;
|
|
212
212
|
phone?: string | undefined;
|
|
@@ -15,10 +15,10 @@ export declare class GuardHttp {
|
|
|
15
15
|
get: <T = any>(path: string, query?: Record<string, any>, config?: any) => Promise<AuthingGuardResponse<T>>;
|
|
16
16
|
post: <T = any>(path: string, data: any, config?: {
|
|
17
17
|
headers: any;
|
|
18
|
-
}
|
|
18
|
+
}) => Promise<AuthingGuardResponse<T>>;
|
|
19
19
|
postForm: <T = any>(path: string, formData: any, config?: {
|
|
20
20
|
headers: any;
|
|
21
|
-
}
|
|
21
|
+
}) => Promise<AuthingGuardResponse<T>>;
|
|
22
22
|
authFlow: <T = any>(action: string, data?: any) => Promise<AuthingGuardResponse<T>>;
|
|
23
23
|
initErrorCodeInterceptor: (callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => this | undefined;
|
|
24
24
|
responseIntercept: (res: AuthingResponse) => AuthingGuardResponse;
|
|
@@ -9,7 +9,7 @@ export interface PhoneValidResult {
|
|
|
9
9
|
}
|
|
10
10
|
export declare const HIDE_SOCIALS: string[];
|
|
11
11
|
export declare const HIDE_SOCIALS_SHOWIN_ENTERPRISE: string[];
|
|
12
|
-
export declare const useAppId: (appId?: string
|
|
12
|
+
export declare const useAppId: (appId?: string) => string;
|
|
13
13
|
export declare const useDebounce: (fn: any, delay: number) => (...args: any[]) => void;
|
|
14
14
|
export declare const useMediaSize: () => {
|
|
15
15
|
isPhoneMedia: boolean;
|
package/types/_utils/http.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { CodeAction } from './responseManagement/interface';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
export declare const requestClient: {
|
|
4
|
-
(input: RequestInfo, init?: RequestInit | undefined): Promise<any>;
|
|
5
|
-
get<T>(path: string, query?: Record<string, any>, init?: AxiosRequestConfig
|
|
4
|
+
(input: URL | RequestInfo, init?: RequestInit | undefined): Promise<any>;
|
|
5
|
+
get<T>(path: string, query?: Record<string, any>, init?: AxiosRequestConfig): Promise<AuthingResponse<T>>;
|
|
6
6
|
post<T_1>(path: string, data: any, config?: {
|
|
7
7
|
headers: any;
|
|
8
8
|
} | undefined): Promise<AuthingResponse<T_1>>;
|
|
9
9
|
postForm<T_2>(path: string, formData: any, config?: {
|
|
10
10
|
headers: any;
|
|
11
|
-
}
|
|
11
|
+
}): Promise<AuthingResponse<T_2>>;
|
|
12
12
|
baseUrl: string;
|
|
13
13
|
setBaseUrl(base: string): void;
|
|
14
14
|
langHeader: string;
|
package/types/_utils/index.d.ts
CHANGED
|
@@ -15,10 +15,10 @@ export declare const VALIDATE_PATTERN: {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const validate: (type: keyof typeof VALIDATE_PATTERN, val: string) => boolean;
|
|
17
17
|
export declare const getRequiredRules: (msg: string) => Rule[];
|
|
18
|
-
export declare const fieldRequiredRule: (fieldRequiredRule: string, fieldRequiredRuleMessage?: string
|
|
18
|
+
export declare const fieldRequiredRule: (fieldRequiredRule: string, fieldRequiredRuleMessage?: string) => Rule[];
|
|
19
19
|
export declare function getDeviceName(): string | null | undefined;
|
|
20
|
-
export
|
|
21
|
-
export declare const insertStyles: (styles: string | any, recordKey?:
|
|
20
|
+
export type STYLE_RECORD_KEY = 'appConfig' | 'userConfig';
|
|
21
|
+
export declare const insertStyles: (styles: string | any, recordKey?: STYLE_RECORD_KEY) => void;
|
|
22
22
|
export declare const removeStyles: (recordKey: STYLE_RECORD_KEY) => void;
|
|
23
23
|
export declare const getClassnames: (classnames: (string | boolean | undefined)[]) => string;
|
|
24
24
|
/**
|
|
@@ -39,7 +39,7 @@ export declare function deepMerge<T extends object = any>(target: T, ...sources:
|
|
|
39
39
|
* 在托管页下上传query中指定的用户自定义字段进行补全
|
|
40
40
|
* @param params 指定上传的用户自定义字段
|
|
41
41
|
*/
|
|
42
|
-
export declare const getUserRegisterParams: (params?: string[]
|
|
42
|
+
export declare const getUserRegisterParams: (params?: string[]) => {
|
|
43
43
|
key: string;
|
|
44
44
|
value: string | string[] | qs.ParsedQs | qs.ParsedQs[] | undefined;
|
|
45
45
|
}[];
|
|
@@ -73,10 +73,10 @@ export declare const PASSWORD_STRENGTH_TEXT_MAP: Record<PasswordStrength, {
|
|
|
73
73
|
validateMessage: () => string;
|
|
74
74
|
}>;
|
|
75
75
|
export declare const getSymbolTypeLength: (pwd: string) => number;
|
|
76
|
-
export declare const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string
|
|
77
|
-
export declare const getPasswordValidateRules: (strength?: PasswordStrength, customPasswordStrength?: any, customValidateTrigger?: string
|
|
76
|
+
export declare const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string, userId?: string) => Rule[];
|
|
77
|
+
export declare const getPasswordValidateRules: (strength?: PasswordStrength, customPasswordStrength?: any, customValidateTrigger?: string, fieldRequiredRuleMessage?: string, userId?: string) => Rule[];
|
|
78
78
|
export declare const sleep: (delay: number) => Promise<unknown>;
|
|
79
|
-
export declare const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean
|
|
79
|
+
export declare const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean) => boolean;
|
|
80
80
|
export declare const transformMethod: (method: RegisterMethods | string) => string;
|
|
81
81
|
export declare const transformSortMethod: (method: RegisterSortMethods | string) => string;
|
|
82
82
|
export declare const mailDesensitization: (mail: string) => string;
|
|
@@ -96,5 +96,5 @@ export declare const getCurrentLng: () => Lang;
|
|
|
96
96
|
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
|
-
export declare const getSortTabs: (tabs: string[], tab?: string
|
|
99
|
+
export declare const getSortTabs: (tabs: string[], tab?: string) => string[];
|
|
100
100
|
export declare const isWeComOrigin: (event: MessageEvent) => boolean;
|
|
@@ -4,4 +4,4 @@ export interface UseInitAppidProps {
|
|
|
4
4
|
propsAuthClient?: AuthenticationClient;
|
|
5
5
|
setError?: any;
|
|
6
6
|
}
|
|
7
|
-
export declare const useInitAppId: (propsAppid?: string
|
|
7
|
+
export declare const useInitAppId: (propsAppid?: string, propsAuthClient?: AuthenticationClient, setError?: any) => string | undefined;
|