@authing/react-ui-components 4.4.0-alpha.0 → 4.4.1-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 +18 -18
- package/dist/index.html +1 -1
- package/dist/static/css/{2.31681d53.chunk.css → 2.839329b5.chunk.css} +2 -2
- package/dist/static/css/2.839329b5.chunk.css.map +1 -0
- package/dist/static/css/main.98fc077f.chunk.css +2 -0
- package/dist/static/css/main.98fc077f.chunk.css.map +1 -0
- package/dist/static/js/2.acd455a5.chunk.js +3 -0
- package/dist/static/js/{2.d2a1168e.chunk.js.LICENSE.txt → 2.acd455a5.chunk.js.LICENSE.txt} +38 -0
- package/dist/static/js/2.acd455a5.chunk.js.map +1 -0
- package/dist/static/js/{3.b3dd7130.chunk.js → 3.ca746d7e.chunk.js} +2 -2
- package/dist/static/js/{3.b3dd7130.chunk.js.map → 3.ca746d7e.chunk.js.map} +1 -1
- package/dist/static/js/main.59425d4f.chunk.js +2 -0
- package/dist/static/js/main.59425d4f.chunk.js.map +1 -0
- package/dist/static/js/runtime-main.5d2cd96c.js +2 -0
- package/dist/static/js/{runtime-main.6f6a6483.js.map → runtime-main.5d2cd96c.js.map} +1 -1
- 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 +2 -1
- package/types/Guard/core/hooks/useAgreements.d.ts +15 -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/LazyloadImage/index.d.ts +12 -0
- package/types/Login/core/withAuthingOtpPush/BeforeLogin.d.ts +17 -0
- package/types/Login/core/withAuthingOtpPush/HowBindClient.d.ts +2 -0
- package/types/Login/core/withAuthingOtpPush/HowGetAppLoginUrl.d.ts +2 -0
- package/types/Login/core/withAuthingOtpPush/HowUsePushLogin.d.ts +2 -0
- package/types/Login/core/withAuthingOtpPush/PendingLogin.d.ts +7 -0
- package/types/Login/core/withAuthingOtpPush/PushLoginGuideModal.d.ts +3 -0
- package/types/Login/core/withAuthingOtpPush/PushLoginGuideSelector.d.ts +9 -0
- package/types/Login/core/withAuthingOtpPush/index.d.ts +3 -0
- package/types/Login/core/withAuthingOtpPush/types.d.ts +28 -0
- package/types/Login/hooks/useOtpPushLogin.d.ts +10 -0
- package/types/Login/multipleAccounts/panel.d.ts +1 -0
- package/types/Type/application.d.ts +22 -1
- package/types/_utils/context.d.ts +1 -0
- package/types/_utils/guardHttp.d.ts +1 -0
- package/types/_utils/http.d.ts +1 -0
- package/types/_utils/workflowHandleStorage.d.ts +4 -0
- package/types/index.d.ts +1 -0
- package/types/version/version.d.ts +1 -1
- package/dist/static/css/2.31681d53.chunk.css.map +0 -1
- package/dist/static/css/main.5aec6972.chunk.css +0 -2
- package/dist/static/css/main.5aec6972.chunk.css.map +0 -1
- package/dist/static/js/2.d2a1168e.chunk.js +0 -3
- package/dist/static/js/2.d2a1168e.chunk.js.map +0 -1
- package/dist/static/js/main.b635a15a.chunk.js +0 -2
- package/dist/static/js/main.b635a15a.chunk.js.map +0 -1
- package/dist/static/js/runtime-main.6f6a6483.js +0 -2
|
@@ -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.4.
|
|
3
|
+
"version": "4.4.1-alpha.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "lib/index.min.js",
|
|
6
6
|
"typings": "types/index.d.ts",
|
|
@@ -17,6 +17,7 @@
|
|
|
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",
|
|
@@ -0,0 +1,15 @@
|
|
|
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 {};
|
|
@@ -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
|
* 携带的回填数据信息
|
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 { TenantPortalEvents } from '../TenantPortalSelect/interface';
|
|
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, TenantPortalEvents {
|
|
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?: {
|
|
13
20
|
initStore: (appId: string, options: {
|
|
@@ -66,6 +73,7 @@ export declare const GuardEventsCamelToKebabMapping: {
|
|
|
66
73
|
readonly onRegisterInfoCompletedError: "register-info-completed-error";
|
|
67
74
|
readonly onLangChange: "lang-change";
|
|
68
75
|
readonly onBeforeChangeModule: "before-change-module";
|
|
76
|
+
readonly onAfterChangeModule: "after-change-module";
|
|
69
77
|
};
|
|
70
78
|
export interface GuardEventsKebabToCamelType {
|
|
71
79
|
load: GuardEvents['onLoad'];
|
|
@@ -89,4 +97,6 @@ export interface GuardEventsKebabToCamelType {
|
|
|
89
97
|
'register-info-completed-error': GuardEvents['onRegisterInfoCompletedError'];
|
|
90
98
|
'lang-change': GuardEvents['onLangChange'];
|
|
91
99
|
'before-change-module': GuardEvents['onBeforeChangeModule'];
|
|
100
|
+
'after-change-module': GuardEvents['onAfterChangeModule'];
|
|
92
101
|
}
|
|
102
|
+
export {};
|
|
@@ -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,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SelectorOptions, Selector } from './types';
|
|
3
|
+
interface PushLoginGuideSelectorProps {
|
|
4
|
+
defaultValue: Selector;
|
|
5
|
+
onChange: (value: Selector) => void;
|
|
6
|
+
options: SelectorOptions;
|
|
7
|
+
}
|
|
8
|
+
export declare function PushLoginGuideSelector(props: PushLoginGuideSelectorProps): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
}
|
|
19
|
+
export interface PushLoginGudeModalProps {
|
|
20
|
+
visible: boolean;
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare type Selector = 'howUsePushLogin' | 'howBindClient' | 'howGetAppLoginUrl';
|
|
24
|
+
export interface SelectorOption {
|
|
25
|
+
value: Selector;
|
|
26
|
+
label: string;
|
|
27
|
+
}
|
|
28
|
+
export declare type SelectorOptions = SelectorOption[];
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -307,10 +322,16 @@ export interface ApplicationConfig {
|
|
|
307
322
|
mfa: {
|
|
308
323
|
faceScore: number;
|
|
309
324
|
};
|
|
325
|
+
authingOtpPushTabConfig: {
|
|
326
|
+
enabledLoginMethods: Array<string> | null;
|
|
327
|
+
validLoginMethods: Array<string> | null;
|
|
328
|
+
validRegisterMethods: Array<string> | null;
|
|
329
|
+
};
|
|
310
330
|
/** 是否开启自定义安全规则 */
|
|
311
331
|
customSecurityEnabled: boolean;
|
|
312
332
|
/** 应用的人机验证策略,始终开启、不开启、设置条件触发 */
|
|
313
333
|
appRobotVerify: 'always_enable' | 'disable' | 'condition_set';
|
|
314
334
|
/** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */
|
|
315
335
|
userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set';
|
|
336
|
+
enabledAuthnWorkflow: boolean;
|
|
316
337
|
}
|
|
@@ -83,6 +83,7 @@ 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;
|
|
86
87
|
};
|
|
87
88
|
export declare const useGuardFinallyConfig: () => GuardLocalConfig;
|
|
88
89
|
export declare const useGuardContextLoaded: () => boolean;
|
|
@@ -19,6 +19,7 @@ export declare class GuardHttp {
|
|
|
19
19
|
headers: any;
|
|
20
20
|
} | undefined) => Promise<AuthingGuardResponse<T>>;
|
|
21
21
|
authFlow: <T = any>(action: string, data?: any) => Promise<AuthingGuardResponse<T>>;
|
|
22
|
+
authWorkFlow: <T = any>(action: string, data?: any) => Promise<AuthingGuardResponse<T>>;
|
|
22
23
|
initErrorCodeInterceptor: (callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => this | undefined;
|
|
23
24
|
responseIntercept: (res: AuthingResponse) => AuthingGuardResponse;
|
|
24
25
|
}
|
package/types/_utils/http.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export interface AuthingResponse<T = any> {
|
|
|
26
26
|
messages?: string;
|
|
27
27
|
message?: string;
|
|
28
28
|
flowHandle?: string;
|
|
29
|
+
workflowInstanceId?: string;
|
|
29
30
|
}
|
|
30
31
|
export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
|
|
31
32
|
onGuardHandling?: () => CodeAction;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getWorkflowHandle: () => string | undefined;
|
|
2
|
+
export declare const useWorkflowHandle: () => string | undefined;
|
|
3
|
+
export declare const updateWorkflowHandle: (workflowHandle: string) => void;
|
|
4
|
+
export declare const useUpdateFlowHandle: (workflowHandle: string) => void;
|
package/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.4.
|
|
1
|
+
declare const _default: "4.4.1-alpha.1";
|
|
2
2
|
export default _default;
|