@authing/react-ui-components 4.3.4-alpha.4 → 4.3.5-alpha.1
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/dist/asset-manifest.json +26 -0
- package/dist/index.html +1 -0
- package/dist/static/css/2.31681d53.chunk.css +3 -0
- package/dist/static/css/2.31681d53.chunk.css.map +1 -0
- package/dist/static/css/main.5aec6972.chunk.css +2 -0
- package/dist/static/css/main.5aec6972.chunk.css.map +1 -0
- package/dist/static/js/2.d2a1168e.chunk.js +3 -0
- package/dist/static/js/2.d2a1168e.chunk.js.LICENSE.txt +86 -0
- package/dist/static/js/2.d2a1168e.chunk.js.map +1 -0
- package/dist/static/js/3.b3dd7130.chunk.js +2 -0
- package/dist/static/js/3.b3dd7130.chunk.js.map +1 -0
- package/dist/static/js/main.b635a15a.chunk.js +2 -0
- package/dist/static/js/main.b635a15a.chunk.js.map +1 -0
- package/dist/static/js/runtime-main.6f6a6483.js +2 -0
- package/dist/static/js/runtime-main.6f6a6483.js.map +1 -0
- package/dist/static/media/loading.3cf0104f.svg +32 -0
- package/lib/index.min.css +2 -2
- package/lib/index.min.js +1 -1
- package/package.json +1 -1
- package/types/Guard/core/hooks/useMultipleAccounts.d.ts +3 -3
- package/types/Guard/event.d.ts +1 -11
- package/types/Guard/module.d.ts +0 -1
- package/types/Login/hooks/useLoginMultiple.d.ts +1 -1
- package/types/Login/multipleAccounts/panel.d.ts +0 -1
- package/types/Type/application.d.ts +15 -7
- package/types/_utils/context.d.ts +1 -2
- package/types/_utils/index.d.ts +1 -1
- package/types/index.d.ts +0 -1
- package/types/version/version.d.ts +1 -1
- package/types/AppOtpVerify/DownloadVerifier.d.ts +0 -2
- package/types/AppOtpVerify/LoginApp.d.ts +0 -2
- package/types/AppOtpVerify/ScanQrcode.d.ts +0 -2
- package/types/AppOtpVerify/Steps.d.ts +0 -11
- package/types/AppOtpVerify/index.d.ts +0 -3
- package/types/Guard/core/hooks/useAgreements.d.ts +0 -15
- package/types/Guard/core/hooks/useGuardView.d.ts +0 -7
- package/types/LazyloadImage/index.d.ts +0 -12
- package/types/Login/core/withAuthingOtpPush/BeforeLogin.d.ts +0 -17
- package/types/Login/core/withAuthingOtpPush/PendingLogin.d.ts +0 -7
- package/types/Login/core/withAuthingOtpPush/index.d.ts +0 -3
- package/types/Login/core/withAuthingOtpPush/types.d.ts +0 -18
- package/types/Login/hooks/useOtpPushLogin.d.ts +0 -10
package/package.json
CHANGED
|
@@ -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';
|
|
17
17
|
/**
|
|
18
18
|
* when: 多账号页面跳转进入登录页面
|
|
19
19
|
* 携带的回填数据信息
|
|
@@ -249,7 +249,7 @@ declare class MultipleAccount {
|
|
|
249
249
|
setUserInfo: (user: Pick<User & {
|
|
250
250
|
id: string;
|
|
251
251
|
loginAccount?: string | undefined;
|
|
252
|
-
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "
|
|
252
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
253
253
|
setLoginWayByHttpData: (account: string, data: {
|
|
254
254
|
username?: string | undefined;
|
|
255
255
|
phone?: string | undefined;
|
|
@@ -292,7 +292,7 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
|
|
|
292
292
|
setUserInfo: (user: Pick<User & {
|
|
293
293
|
id: string;
|
|
294
294
|
loginAccount?: string | undefined;
|
|
295
|
-
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "
|
|
295
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
296
296
|
setLoginWayByHttpData: (account: string, data: {
|
|
297
297
|
username?: string | undefined;
|
|
298
298
|
phone?: string | undefined;
|
package/types/Guard/event.d.ts
CHANGED
|
@@ -6,15 +6,8 @@ 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
9
|
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents, TenantPortalEvents {
|
|
16
10
|
onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
|
|
17
|
-
onAfterChangeModule?: (options: OnAfterChangeModuleOptions) => void;
|
|
18
11
|
}
|
|
19
12
|
export declare const guardEventsFilter: (props: any, multipleInstance?: {
|
|
20
13
|
initStore: (appId: string, options: {
|
|
@@ -28,7 +21,7 @@ export declare const guardEventsFilter: (props: any, multipleInstance?: {
|
|
|
28
21
|
setUserInfo: (user: Pick<import("./core/hooks/useMultipleAccounts").User & {
|
|
29
22
|
id: string;
|
|
30
23
|
loginAccount?: string | undefined;
|
|
31
|
-
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "
|
|
24
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
32
25
|
setLoginWayByHttpData: (account: string, data: {
|
|
33
26
|
username?: string | undefined;
|
|
34
27
|
phone?: string | undefined;
|
|
@@ -73,7 +66,6 @@ export declare const GuardEventsCamelToKebabMapping: {
|
|
|
73
66
|
readonly onRegisterInfoCompletedError: "register-info-completed-error";
|
|
74
67
|
readonly onLangChange: "lang-change";
|
|
75
68
|
readonly onBeforeChangeModule: "before-change-module";
|
|
76
|
-
readonly onAfterChangeModule: "after-change-module";
|
|
77
69
|
};
|
|
78
70
|
export interface GuardEventsKebabToCamelType {
|
|
79
71
|
load: GuardEvents['onLoad'];
|
|
@@ -97,6 +89,4 @@ export interface GuardEventsKebabToCamelType {
|
|
|
97
89
|
'register-info-completed-error': GuardEvents['onRegisterInfoCompletedError'];
|
|
98
90
|
'lang-change': GuardEvents['onLangChange'];
|
|
99
91
|
'before-change-module': GuardEvents['onBeforeChangeModule'];
|
|
100
|
-
'after-change-module': GuardEvents['onAfterChangeModule'];
|
|
101
92
|
}
|
|
102
|
-
export {};
|
package/types/Guard/module.d.ts
CHANGED
|
@@ -21,7 +21,6 @@ export declare enum GuardModuleType {
|
|
|
21
21
|
IDENTITY_BINDING_NO_ASK = "identityBindingNoAsk",
|
|
22
22
|
SELF_UNLOCK = "selfUnlock",
|
|
23
23
|
FLOW_SELECT_ACCOUNT = "flowSelectAccount",
|
|
24
|
-
APP_OTP_VERIFY = "appOtpVerify",
|
|
25
24
|
/** 多租户门户选择页 */
|
|
26
25
|
TENANT_PORTAL = "tenant-portal",
|
|
27
26
|
New_SUBMIT_SUCCESS = "newSubmitSuccess",
|
|
@@ -35,7 +35,7 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
|
|
|
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" | "
|
|
38
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
39
39
|
setLoginWayByHttpData: (account: string, data: {
|
|
40
40
|
username?: string | undefined;
|
|
41
41
|
phone?: string | undefined;
|
|
@@ -8,8 +8,7 @@ export declare enum LoginMethods {
|
|
|
8
8
|
PhoneCode = "phone-code",
|
|
9
9
|
WxMinQr = "wechat-miniprogram-qrcode",
|
|
10
10
|
AD = "ad",
|
|
11
|
-
WechatMpQrcode = "wechatmp-qrcode"
|
|
12
|
-
AuthingOtpPush = "authing-otp-push"
|
|
11
|
+
WechatMpQrcode = "wechatmp-qrcode"
|
|
13
12
|
}
|
|
14
13
|
export declare enum OIDCConnectionMode {
|
|
15
14
|
FRONT_CHANNEL = "FRONT_CHANNEL",
|
|
@@ -178,6 +177,14 @@ export interface TabFieldsI18nItem {
|
|
|
178
177
|
[propName in Lang]?: string;
|
|
179
178
|
};
|
|
180
179
|
}
|
|
180
|
+
interface LoginTypeI18nProps {
|
|
181
|
+
tab: {
|
|
182
|
+
default: string;
|
|
183
|
+
i18n: {
|
|
184
|
+
[propName: string]: string;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
}
|
|
181
188
|
export interface ApplicationConfig {
|
|
182
189
|
id: string;
|
|
183
190
|
allowedOrigins: string[];
|
|
@@ -263,6 +270,12 @@ export interface ApplicationConfig {
|
|
|
263
270
|
socialLoginBtns: boolean;
|
|
264
271
|
userPasswordInput: boolean;
|
|
265
272
|
wxMpScanTab: boolean;
|
|
273
|
+
loginMethodsI18nDisplaySettings: {
|
|
274
|
+
password?: LoginTypeI18nProps;
|
|
275
|
+
verifyCode?: LoginTypeI18nProps;
|
|
276
|
+
ad?: LoginTypeI18nProps;
|
|
277
|
+
ldap?: LoginTypeI18nProps;
|
|
278
|
+
};
|
|
266
279
|
};
|
|
267
280
|
protocol: Protocol;
|
|
268
281
|
oidcConfig: OidcClientMetadata;
|
|
@@ -308,11 +321,6 @@ export interface ApplicationConfig {
|
|
|
308
321
|
mfa: {
|
|
309
322
|
faceScore: number;
|
|
310
323
|
};
|
|
311
|
-
authingOtpPushTabConfig: {
|
|
312
|
-
enabledLoginMethods: Array<string> | null;
|
|
313
|
-
validLoginMethods: Array<string> | null;
|
|
314
|
-
validRegisterMethods: Array<string> | null;
|
|
315
|
-
};
|
|
316
324
|
/** 是否开启自定义安全规则 */
|
|
317
325
|
customSecurityEnabled: boolean;
|
|
318
326
|
/** 应用的人机验证策略,始终开启、不开启、设置条件触发 */
|
|
@@ -83,7 +83,6 @@ export declare const useGuardEvents: () => Partial<GuardEvents>;
|
|
|
83
83
|
export declare const useGuardModule: () => {
|
|
84
84
|
changeModule: ((moduleName: GuardModuleType, initData?: any) => Promise<void>) | undefined;
|
|
85
85
|
backModule: (() => void) | undefined;
|
|
86
|
-
currentModule: ModuleState;
|
|
87
86
|
};
|
|
88
87
|
export declare const useGuardFinallyConfig: () => GuardLocalConfig;
|
|
89
88
|
export declare const useGuardContextLoaded: () => boolean;
|
|
@@ -117,7 +116,7 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
117
116
|
setUserInfo: (user: Pick<import("../Guard/core/hooks/useMultipleAccounts").User & {
|
|
118
117
|
id: string;
|
|
119
118
|
loginAccount?: string | undefined;
|
|
120
|
-
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "
|
|
119
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
121
120
|
setLoginWayByHttpData: (account: string, data: {
|
|
122
121
|
username?: string | undefined;
|
|
123
122
|
phone?: string | undefined;
|
package/types/_utils/index.d.ts
CHANGED
|
@@ -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.
|
package/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.3.
|
|
1
|
+
declare const _default: "4.3.5-alpha.1";
|
|
2
2
|
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
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,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Agreement } from '../../../Type';
|
|
3
|
-
interface Options {
|
|
4
|
-
agreements: Agreement[];
|
|
5
|
-
checkedAgreements: (string | number)[];
|
|
6
|
-
checkAllAgreements: () => void;
|
|
7
|
-
unCheckAllAgreements: () => void;
|
|
8
|
-
}
|
|
9
|
-
export declare function useAgreements(options: Options): {
|
|
10
|
-
agreements: Agreement[];
|
|
11
|
-
checkedAgreements: import("react").ReactText[];
|
|
12
|
-
checkAllAgreements: () => void;
|
|
13
|
-
unCheckAllAgreements: () => void;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,17 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,18 +0,0 @@
|
|
|
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 declare type LoginStatus = 'before' | 'pending';
|
|
13
|
-
export interface LoginWithAuthingOtpPushProps {
|
|
14
|
-
onLoginSuccess?: any;
|
|
15
|
-
multipleInstance?: StoreInstance;
|
|
16
|
-
initData?: BackFillMultipleState;
|
|
17
|
-
agreements: Agreement[];
|
|
18
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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;
|