@authing/react18-ui-components 4.2.1-alpha.0 → 4.3.4-alpha.2
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/AppOtpVerify/DownloadVerifier.d.ts +1 -0
- package/types/AppOtpVerify/LoginApp.d.ts +1 -0
- package/types/AppOtpVerify/ScanQrcode.d.ts +2 -0
- package/types/AppOtpVerify/Steps.d.ts +11 -0
- package/types/AppOtpVerify/index.d.ts +2 -0
- package/types/ForgetPassword/core/resetPassword.d.ts +2 -1
- package/types/ForgetPassword/interface.d.ts +1 -0
- package/types/Guard/config.d.ts +2 -1
- package/types/Guard/core/hooks/useAgreements.d.ts +14 -0
- package/types/Guard/core/hooks/useGuardView.d.ts +7 -0
- package/types/Guard/core/hooks/useMultipleAccounts.d.ts +1 -1
- package/types/Guard/event.d.ts +10 -0
- package/types/Guard/module.d.ts +1 -0
- package/types/LazyloadImage/index.d.ts +12 -0
- package/types/Login/core/withAuthingOtpPush/BeforeLogin.d.ts +17 -0
- package/types/Login/core/withAuthingOtpPush/PendingLogin.d.ts +6 -0
- package/types/Login/core/withAuthingOtpPush/index.d.ts +2 -0
- package/types/Login/core/withAuthingOtpPush/types.d.ts +18 -0
- package/types/Login/hooks/useOtpPushLogin.d.ts +10 -0
- package/types/Login/multipleAccounts/panel.d.ts +1 -0
- package/types/NewSubmitSuccess/interface.d.ts +2 -0
- package/types/Type/application.d.ts +13 -1
- package/types/_utils/config/index.d.ts +1 -0
- package/types/_utils/context.d.ts +3 -0
- package/types/index.d.ts +1 -0
- package/types/version/version.d.ts +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function DownloadVerifier(): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function LoginApp(): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import './steps.styles.less';
|
|
3
|
+
interface StepsProps {
|
|
4
|
+
current: number;
|
|
5
|
+
items: StepItem[];
|
|
6
|
+
}
|
|
7
|
+
interface StepItem {
|
|
8
|
+
title: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function Steps(props: StepsProps): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export declare enum InputMethodMap {
|
|
2
3
|
email = "email-code",
|
|
3
4
|
phone = "phone-code"
|
|
4
5
|
}
|
|
5
6
|
interface ResetPasswordProps {
|
|
6
7
|
publicConfig: any;
|
|
7
|
-
setPhoneOrEmail: any;
|
|
8
8
|
setControlShow: any;
|
|
9
9
|
setPolicyStrength: any;
|
|
10
10
|
setCustomPasswordStrength: any;
|
|
11
11
|
setPhoneOrEmailText: any;
|
|
12
|
+
setResetToken: React.Dispatch<React.SetStateAction<string>>;
|
|
12
13
|
}
|
|
13
14
|
export declare const ResetPassword: (props: ResetPasswordProps) => JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -9,6 +9,7 @@ export interface ForgetPasswordEvents extends IG2Events {
|
|
|
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;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Agreement } from '../../../Type';
|
|
2
|
+
interface Options {
|
|
3
|
+
agreements: Agreement[];
|
|
4
|
+
checkedAgreements: (string | number)[];
|
|
5
|
+
checkAllAgreements: () => void;
|
|
6
|
+
unCheckAllAgreements: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useAgreements(options: Options): {
|
|
9
|
+
agreements: Agreement[];
|
|
10
|
+
checkedAgreements: (string | number)[];
|
|
11
|
+
checkAllAgreements: () => void;
|
|
12
|
+
unCheckAllAgreements: () => void;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -13,7 +13,7 @@ export declare const QR_CODE_WAY: LoginWay[];
|
|
|
13
13
|
* 登录时所有支持的登录列表(前端定义列表)
|
|
14
14
|
* 这里稍微有点乱 因为Login中的登录方式和这里的不匹配,暂时放在了一起
|
|
15
15
|
*/
|
|
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';
|
|
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
|
* 携带的回填数据信息
|
package/types/Guard/event.d.ts
CHANGED
|
@@ -6,8 +6,15 @@ import { IdentityBindingAskEvents } from '../IdentityBindingAsk';
|
|
|
6
6
|
import { LoginEvents } from '../Login/interface';
|
|
7
7
|
import { RegisterEvents } from '../Register/interface';
|
|
8
8
|
import { StoreInstance } from './core/hooks/useMultipleAccounts';
|
|
9
|
+
interface OnAfterChangeModuleOptions {
|
|
10
|
+
currentView: string;
|
|
11
|
+
currentModule: GuardModuleType;
|
|
12
|
+
currentTab?: string;
|
|
13
|
+
data?: any;
|
|
14
|
+
}
|
|
9
15
|
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
|
|
10
16
|
onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
|
|
17
|
+
onAfterChangeModule?: (options: OnAfterChangeModuleOptions) => void;
|
|
11
18
|
}
|
|
12
19
|
export declare const guardEventsFilter: (props: any, multipleInstance?: StoreInstance, openEventsMapping?: boolean) => GuardEvents;
|
|
13
20
|
export declare const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean) => GuardEvents;
|
|
@@ -33,6 +40,7 @@ export declare const GuardEventsCamelToKebabMapping: {
|
|
|
33
40
|
readonly onRegisterInfoCompletedError: "register-info-completed-error";
|
|
34
41
|
readonly onLangChange: "lang-change";
|
|
35
42
|
readonly onBeforeChangeModule: "before-change-module";
|
|
43
|
+
readonly onAfterChangeModule: "after-change-module";
|
|
36
44
|
};
|
|
37
45
|
export interface GuardEventsKebabToCamelType {
|
|
38
46
|
load: GuardEvents['onLoad'];
|
|
@@ -56,4 +64,6 @@ export interface GuardEventsKebabToCamelType {
|
|
|
56
64
|
'register-info-completed-error': GuardEvents['onRegisterInfoCompletedError'];
|
|
57
65
|
'lang-change': GuardEvents['onLangChange'];
|
|
58
66
|
'before-change-module': GuardEvents['onBeforeChangeModule'];
|
|
67
|
+
'after-change-module': GuardEvents['onAfterChangeModule'];
|
|
59
68
|
}
|
|
69
|
+
export {};
|
package/types/Guard/module.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export declare enum GuardModuleType {
|
|
|
20
20
|
IDENTITY_BINDING = "identityBinding",
|
|
21
21
|
SELF_UNLOCK = "selfUnlock",
|
|
22
22
|
FLOW_SELECT_ACCOUNT = "flowSelectAccount",
|
|
23
|
+
APP_OTP_VERIFY = "appOtpVerify",
|
|
23
24
|
/** 多租户门户选择页 */
|
|
24
25
|
TENANT_PORTAL = "tenant-portal",
|
|
25
26
|
New_SUBMIT_SUCCESS = "newSubmitSuccess"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
interface LazyloadImageProps {
|
|
3
|
+
src: string;
|
|
4
|
+
placeholder: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
alt?: string;
|
|
8
|
+
width?: string;
|
|
9
|
+
height?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function LazyloadImage(props: LazyloadImageProps): JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { OnPushSuccessProps, OnLoginProps } from './types';
|
|
3
|
+
import { AuthingGuardResponse } from '../../../_utils/http';
|
|
4
|
+
import { Agreement } from '../../../Type';
|
|
5
|
+
interface BeforeLoginProps {
|
|
6
|
+
onPushSuccess: (props: OnPushSuccessProps) => void;
|
|
7
|
+
signinByPush: (props: OnLoginProps) => Promise<AuthingGuardResponse<{
|
|
8
|
+
pushCodeId: string;
|
|
9
|
+
}>>;
|
|
10
|
+
pushLoginStatus: boolean;
|
|
11
|
+
onchangePushLoginStatus: () => void;
|
|
12
|
+
defaultAccount: string;
|
|
13
|
+
setAccount: React.Dispatch<any>;
|
|
14
|
+
agreements: Agreement[];
|
|
15
|
+
}
|
|
16
|
+
export declare function BeforeLogin(props: BeforeLoginProps): JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BackFillMultipleState, StoreInstance } from '../../../Guard/core/hooks/useMultipleAccounts';
|
|
2
|
+
import { Agreement } from '../../../Type';
|
|
3
|
+
export interface OnPushSuccessProps {
|
|
4
|
+
pushCodeId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface CheckPushCodeStatusProps {
|
|
7
|
+
pushCodeId: string;
|
|
8
|
+
}
|
|
9
|
+
export interface OnLoginProps {
|
|
10
|
+
account: string;
|
|
11
|
+
}
|
|
12
|
+
export type LoginStatus = 'before' | 'pending';
|
|
13
|
+
export interface LoginWithAuthingOtpPushProps {
|
|
14
|
+
onLoginSuccess?: any;
|
|
15
|
+
multipleInstance?: StoreInstance;
|
|
16
|
+
initData?: BackFillMultipleState;
|
|
17
|
+
agreements: Agreement[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function useOtpPushLoginWay(setLoginWay: React.Dispatch<any>): void;
|
|
3
|
+
export declare function useOtpPushLoginCache(): {
|
|
4
|
+
getCachedOtpLoginAccount: typeof getCachedOtpLoginAccount;
|
|
5
|
+
cacheOtpLoginAccount: typeof cacheOtpLoginAccount;
|
|
6
|
+
clearOtpLoginAccountCache: typeof clearOtpLoginAccountCache;
|
|
7
|
+
};
|
|
8
|
+
export declare function cacheOtpLoginAccount(account: string): void;
|
|
9
|
+
export declare function getCachedOtpLoginAccount(): string;
|
|
10
|
+
export declare function clearOtpLoginAccountCache(): void;
|
|
@@ -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;
|
|
@@ -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",
|
|
@@ -302,4 +303,15 @@ export interface ApplicationConfig {
|
|
|
302
303
|
mfa: {
|
|
303
304
|
faceScore: number;
|
|
304
305
|
};
|
|
306
|
+
authingOtpPushTabConfig: {
|
|
307
|
+
enabledLoginMethods: Array<string> | null;
|
|
308
|
+
validLoginMethods: Array<string> | null;
|
|
309
|
+
validRegisterMethods: Array<string> | null;
|
|
310
|
+
};
|
|
311
|
+
/** 是否开启自定义安全规则 */
|
|
312
|
+
customSecurityEnabled: boolean;
|
|
313
|
+
/** 应用的人机验证策略,始终开启、不开启、设置条件触发 */
|
|
314
|
+
appRobotVerify: 'always_enable' | 'disable' | 'condition_set';
|
|
315
|
+
/** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */
|
|
316
|
+
userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set';
|
|
305
317
|
}
|
|
@@ -100,6 +100,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
100
100
|
withCustomData?: boolean | undefined;
|
|
101
101
|
} | undefined;
|
|
102
102
|
_closeLoopCheckQrcode?: boolean | undefined;
|
|
103
|
+
goBack?: (() => void) | null | undefined;
|
|
103
104
|
};
|
|
104
105
|
guardPageConfig: GuardPageConfig;
|
|
105
106
|
} | {
|
|
@@ -82,6 +82,7 @@ export declare const useGuardEvents: () => Partial<GuardEvents>;
|
|
|
82
82
|
export declare const useGuardModule: () => {
|
|
83
83
|
changeModule: ((moduleName: GuardModuleType, initData?: any) => Promise<void>) | undefined;
|
|
84
84
|
backModule: (() => void) | undefined;
|
|
85
|
+
currentModule: ModuleState;
|
|
85
86
|
};
|
|
86
87
|
export declare const useGuardFinallyConfig: () => GuardLocalConfig;
|
|
87
88
|
export declare const useGuardContextLoaded: () => boolean;
|
|
@@ -152,3 +153,5 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
152
153
|
export declare const useGuardDefaultLanguage: () => Lang;
|
|
153
154
|
/** 用来操作和获取租户相关的内容 */
|
|
154
155
|
export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
|
|
156
|
+
/** 当前人机验证策略 */
|
|
157
|
+
export declare const useRobotVerify: () => "always_enable" | "disable" | "condition_set";
|
package/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.
|
|
1
|
+
declare const _default: "4.3.4-alpha.2";
|
|
2
2
|
export default _default;
|