@authing/react-ui-components 4.0.10-rc.0 → 4.0.10-rc.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/lib/index.min.css +2 -2
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.LICENSE.txt +129 -12
- package/package.json +1 -1
- package/types/AuthClientProvider/AuthClientProvider.d.ts +4 -2
- package/types/Back/index.d.ts +3 -1
- package/types/ChangePassword/index.d.ts +2 -1
- package/types/CompleteInfo/businessRequest.d.ts +1 -1
- package/types/CompleteInfo/utils.d.ts +2 -6
- package/types/ForgetPassword/interface.d.ts +1 -1
- package/types/Guard/authClient.d.ts +1 -1
- package/types/Guard/core/hooks/useMultipleAccounts.d.ts +9 -11
- package/types/Guard/core/renderContext.d.ts +2 -1
- 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 -35
- package/types/Guard/module.d.ts +2 -1
- package/types/IconFont/useGuardIconfont.d.ts +1 -1
- package/types/InputPassword/index.d.ts +2 -4
- package/types/Login/core/withPassword/FormItemAccount.d.ts +2 -1
- package/types/Login/core/withPassword/InputAccount.d.ts +0 -1
- package/types/Login/hooks/useLoginMultiple.d.ts +2 -3
- package/types/Qrcode/UiQrCode.d.ts +1 -1
- package/types/Qrcode/hooks/useStatus.d.ts +2 -1
- package/types/Register/core/WithEmail.d.ts +0 -2
- package/types/Register/interface.d.ts +2 -2
- package/types/SelectAccount/index.d.ts +3 -0
- package/types/Type/application.d.ts +0 -24
- package/types/ValidatorRules/ValidatorFormItem.d.ts +0 -1
- package/types/ValidatorRules/index.d.ts +2 -4
- package/types/_utils/config/index.d.ts +5 -5
- package/types/_utils/context.d.ts +8 -5
- 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 -11
- package/types/_utils/initAppId.d.ts +1 -1
- package/types/_utils/responseManagement/interface.d.ts +2 -1
- package/types/version/version.d.ts +1 -1
|
@@ -1,20 +1,128 @@
|
|
|
1
1
|
/*
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
6
|
|
|
7
7
|
/*!
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Copyright (c) 2018 Jed Watson.
|
|
9
|
+
Licensed under the MIT License (MIT), see
|
|
10
|
+
http://jedwatson.github.io/classnames
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
/*!
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
13
|
+
/*! ./Component */
|
|
14
|
+
|
|
15
|
+
/*! ./Context */
|
|
16
|
+
|
|
17
|
+
/*! ./checkPropTypes */
|
|
18
|
+
|
|
19
|
+
/*! ./cjs/react-is.development.js */
|
|
20
|
+
|
|
21
|
+
/*! ./factoryWithTypeCheckers */
|
|
22
|
+
|
|
23
|
+
/*! ./lib/ReactPropTypesSecret */
|
|
24
|
+
|
|
25
|
+
/*! ./lib/has */
|
|
26
|
+
|
|
27
|
+
/*! ./mediaQuery */
|
|
28
|
+
|
|
29
|
+
/*! ./toQuery */
|
|
30
|
+
|
|
31
|
+
/*! ./useMediaQuery */
|
|
32
|
+
|
|
33
|
+
/*! css-mediaquery */
|
|
34
|
+
|
|
35
|
+
/*! hyphenate-style-name */
|
|
36
|
+
|
|
37
|
+
/*! matchmediaquery */
|
|
38
|
+
|
|
39
|
+
/*! object-assign */
|
|
40
|
+
|
|
41
|
+
/*! prop-types */
|
|
42
|
+
|
|
43
|
+
/*! react */
|
|
44
|
+
|
|
45
|
+
/*! react-is */
|
|
46
|
+
|
|
47
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
48
|
+
|
|
49
|
+
/*! shallow-equal */
|
|
50
|
+
|
|
51
|
+
/*!**********************!*\
|
|
52
|
+
!*** ./src/index.ts ***!
|
|
53
|
+
\**********************/
|
|
54
|
+
|
|
55
|
+
/*!************************!*\
|
|
56
|
+
!*** ./src/Context.ts ***!
|
|
57
|
+
\************************/
|
|
58
|
+
|
|
59
|
+
/*!************************!*\
|
|
60
|
+
!*** ./src/toQuery.ts ***!
|
|
61
|
+
\************************/
|
|
62
|
+
|
|
63
|
+
/*!**************************!*\
|
|
64
|
+
!*** ./src/Component.ts ***!
|
|
65
|
+
\**************************/
|
|
66
|
+
|
|
67
|
+
/*!***************************!*\
|
|
68
|
+
!*** ./src/mediaQuery.ts ***!
|
|
69
|
+
\***************************/
|
|
70
|
+
|
|
71
|
+
/*!******************************!*\
|
|
72
|
+
!*** ./src/useMediaQuery.ts ***!
|
|
73
|
+
\******************************/
|
|
74
|
+
|
|
75
|
+
/*!****************************************!*\
|
|
76
|
+
!*** ./node_modules/react-is/index.js ***!
|
|
77
|
+
\****************************************/
|
|
78
|
+
|
|
79
|
+
/*!******************************************!*\
|
|
80
|
+
!*** ./node_modules/prop-types/index.js ***!
|
|
81
|
+
\******************************************/
|
|
82
|
+
|
|
83
|
+
/*!********************************************!*\
|
|
84
|
+
!*** ./node_modules/prop-types/lib/has.js ***!
|
|
85
|
+
\********************************************/
|
|
86
|
+
|
|
87
|
+
/*!*********************************************!*\
|
|
88
|
+
!*** ./node_modules/object-assign/index.js ***!
|
|
89
|
+
\*********************************************/
|
|
90
|
+
|
|
91
|
+
/*!**********************************************!*\
|
|
92
|
+
!*** ./node_modules/css-mediaquery/index.js ***!
|
|
93
|
+
\**********************************************/
|
|
94
|
+
|
|
95
|
+
/*!***********************************************!*\
|
|
96
|
+
!*** ./node_modules/matchmediaquery/index.js ***!
|
|
97
|
+
\***********************************************/
|
|
98
|
+
|
|
99
|
+
/*!***************************************************!*\
|
|
100
|
+
!*** ./node_modules/prop-types/checkPropTypes.js ***!
|
|
101
|
+
\***************************************************/
|
|
102
|
+
|
|
103
|
+
/*!****************************************************!*\
|
|
104
|
+
!*** ./node_modules/hyphenate-style-name/index.js ***!
|
|
105
|
+
\****************************************************/
|
|
106
|
+
|
|
107
|
+
/*!******************************************************!*\
|
|
108
|
+
!*** ./node_modules/shallow-equal/dist/index.esm.js ***!
|
|
109
|
+
\******************************************************/
|
|
110
|
+
|
|
111
|
+
/*!***********************************************************!*\
|
|
112
|
+
!*** ./node_modules/react-is/cjs/react-is.development.js ***!
|
|
113
|
+
\***********************************************************/
|
|
114
|
+
|
|
115
|
+
/*!************************************************************!*\
|
|
116
|
+
!*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
|
|
117
|
+
\************************************************************/
|
|
118
|
+
|
|
119
|
+
/*!*************************************************************!*\
|
|
120
|
+
!*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
|
|
121
|
+
\*************************************************************/
|
|
122
|
+
|
|
123
|
+
/*!**************************************************************************************!*\
|
|
124
|
+
!*** external {"commonjs":"react","commonjs2":"react","amd":"react","root":"React"} ***!
|
|
125
|
+
\**************************************************************************************/
|
|
18
126
|
|
|
19
127
|
/**
|
|
20
128
|
* @license
|
|
@@ -25,6 +133,15 @@
|
|
|
25
133
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
26
134
|
*/
|
|
27
135
|
|
|
136
|
+
/** @license React v16.13.1
|
|
137
|
+
* react-is.development.js
|
|
138
|
+
*
|
|
139
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
140
|
+
*
|
|
141
|
+
* This source code is licensed under the MIT license found in the
|
|
142
|
+
* LICENSE file in the root directory of this source tree.
|
|
143
|
+
*/
|
|
144
|
+
|
|
28
145
|
/** @license React v16.13.1
|
|
29
146
|
* react-is.production.min.js
|
|
30
147
|
*
|
package/package.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { AuthClientContextProps } from './context';
|
|
3
|
-
export declare const AuthClientProvider: React.FC<AuthClientContextProps
|
|
3
|
+
export declare const AuthClientProvider: React.FC<AuthClientContextProps & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}>;
|
|
4
6
|
export declare const useGlobalAuthClient: () => import("authing-js-sdk").AuthenticationClient | undefined;
|
package/types/Back/index.d.ts
CHANGED
|
@@ -7,4 +7,6 @@ export declare const BackLogin: React.FC<BackProps>;
|
|
|
7
7
|
export interface BackCustomProps extends BackProps {
|
|
8
8
|
onBack?: () => void;
|
|
9
9
|
}
|
|
10
|
-
export declare const BackCustom: React.FC<BackCustomProps
|
|
10
|
+
export declare const BackCustom: React.FC<BackCustomProps & {
|
|
11
|
+
children: any;
|
|
12
|
+
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
export declare const GuardChangePassword: React.FC<{
|
|
3
3
|
title: string;
|
|
4
4
|
explain: string;
|
|
5
|
+
children: ReactNode;
|
|
5
6
|
}>;
|
|
6
7
|
export declare const GuardFirstLoginPasswordResetView: React.FC;
|
|
7
8
|
export declare const GuardPasswordNotSafeResetView: React.FC;
|
|
@@ -4,6 +4,6 @@ export declare const 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'], content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>> | undefined;
|
|
9
9
|
export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<User | import("../_utils/http").AuthingGuardResponse<any> | undefined>;
|
|
@@ -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,11 +9,7 @@ export declare const extendsFieldsToMetaData: (extendsFields: import("../Type/ap
|
|
|
9
9
|
label: string;
|
|
10
10
|
}[];
|
|
11
11
|
}[]) => CompleteInfoMetaData[];
|
|
12
|
-
export declare const fieldValuesToRegisterProfile: (extendsFields: ApplicationConfig['extendsFields'], fieldValues?: {
|
|
13
|
-
name: string;
|
|
14
|
-
value: string;
|
|
15
|
-
code?: string | undefined;
|
|
16
|
-
}[] | undefined) => {
|
|
12
|
+
export declare const fieldValuesToRegisterProfile: (extendsFields: ApplicationConfig['extendsFields'], fieldValues?: CompleteInfoRequest['fieldValues']) => {
|
|
17
13
|
registerProfile: Record<string, any>;
|
|
18
14
|
udf: {
|
|
19
15
|
key: string;
|
|
@@ -2,7 +2,7 @@ import { AuthenticationClient, CommonMessage, SceneType } from 'authing-js-sdk';
|
|
|
2
2
|
import { EmailScene, IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '../Type';
|
|
3
3
|
export interface ForgetPasswordEvents extends IG2Events {
|
|
4
4
|
onEmailSend?: (authClient: AuthenticationClient, sence?: EmailScene) => void;
|
|
5
|
-
onEmailSendError?: (error
|
|
5
|
+
onEmailSendError?: (error?: CommonMessage, authClient?: AuthenticationClient, sence?: EmailScene) => void;
|
|
6
6
|
onPhoneSend?: (authClient: AuthenticationClient, sence?: SceneType) => void;
|
|
7
7
|
onPhoneSendError?: (error: CommonMessage, authClient: AuthenticationClient, sence?: SceneType) => void;
|
|
8
8
|
onPwdReset?: (authClient: AuthenticationClient) => void;
|
|
@@ -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;
|
|
@@ -242,14 +242,13 @@ 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
|
-
|
|
252
|
-
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
251
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
253
252
|
setLoginWayByHttpData: (account: string, data: {
|
|
254
253
|
username?: string | undefined;
|
|
255
254
|
phone?: string | undefined;
|
|
@@ -285,14 +284,13 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
|
|
|
285
284
|
serverSideLoginMethods: LoginWay[];
|
|
286
285
|
isInternationSms: boolean;
|
|
287
286
|
}) => void;
|
|
288
|
-
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string
|
|
287
|
+
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string, internation?: {
|
|
289
288
|
phoneCountryCode: string;
|
|
290
289
|
areaCode: string;
|
|
291
|
-
}
|
|
292
|
-
setUserInfo: (user:
|
|
290
|
+
}) => void;
|
|
291
|
+
setUserInfo: (user: Omit<User & {
|
|
293
292
|
id: string;
|
|
294
|
-
|
|
295
|
-
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
293
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
296
294
|
setLoginWayByHttpData: (account: string, data: {
|
|
297
295
|
username?: string | undefined;
|
|
298
296
|
phone?: string | undefined;
|
|
@@ -315,7 +313,7 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
|
|
|
315
313
|
getOriginWay: () => string;
|
|
316
314
|
} | undefined;
|
|
317
315
|
isMultipleAccount: boolean;
|
|
318
|
-
referMultipleState: (type: 'login' | 'multiple', data?: BackFillMultipleState
|
|
316
|
+
referMultipleState: (type: 'login' | 'multiple', data?: BackFillMultipleState) => void;
|
|
319
317
|
multipleAccountData: BackFillMultipleState | undefined;
|
|
320
318
|
clearBackFillData: () => void;
|
|
321
319
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { GuardProps } from '..';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { ReactNode } from 'react';
|
|
3
3
|
import { ModuleState } from '../GuardModule/stateMachine';
|
|
4
4
|
export declare const RenderContext: React.FC<{
|
|
5
5
|
guardProps: GuardProps;
|
|
6
6
|
initState: ModuleState;
|
|
7
|
+
children: ReactNode;
|
|
7
8
|
}>;
|
|
@@ -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
|
@@ -5,44 +5,12 @@ import { IdentityBindingEvents } from '../IdentityBinding/interface';
|
|
|
5
5
|
import { IdentityBindingAskEvents } from '../IdentityBindingAsk';
|
|
6
6
|
import { LoginEvents } from '../Login/interface';
|
|
7
7
|
import { RegisterEvents } from '../Register/interface';
|
|
8
|
+
import { StoreInstance } from './core/hooks/useMultipleAccounts';
|
|
8
9
|
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
|
|
9
10
|
onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
|
|
10
11
|
}
|
|
11
|
-
export declare const guardEventsFilter: (props: any, multipleInstance?:
|
|
12
|
-
|
|
13
|
-
serverSideLoginMethods: import("./core/hooks/useMultipleAccounts").LoginWay[];
|
|
14
|
-
isInternationSms: boolean;
|
|
15
|
-
}) => void;
|
|
16
|
-
setLoginWay: (tab: "input" | "qrcode", way: import("./core/hooks/useMultipleAccounts").LoginWay, id?: string | undefined, internation?: {
|
|
17
|
-
phoneCountryCode: string;
|
|
18
|
-
areaCode: string;
|
|
19
|
-
} | undefined) => void;
|
|
20
|
-
setUserInfo: (user: Pick<import("./core/hooks/useMultipleAccounts").User & {
|
|
21
|
-
id: string;
|
|
22
|
-
loginAccount?: string | undefined;
|
|
23
|
-
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
24
|
-
setLoginWayByHttpData: (account: string, data: {
|
|
25
|
-
username?: string | undefined;
|
|
26
|
-
phone?: string | undefined;
|
|
27
|
-
email?: string | undefined;
|
|
28
|
-
}) => void;
|
|
29
|
-
setLoginWayByLDAPData: (account: string, data: {
|
|
30
|
-
name?: string | undefined;
|
|
31
|
-
phone?: string | undefined;
|
|
32
|
-
email?: string | undefined;
|
|
33
|
-
}) => void;
|
|
34
|
-
getMemoUser: (excludeWays?: import("./core/hooks/useMultipleAccounts").LoginWay[]) => import("../Login/multipleAccounts/panel").SelectOptions[];
|
|
35
|
-
getMemoSingleUser: (id: string) => {
|
|
36
|
-
way: import("./core/hooks/useMultipleAccounts").LoginWay;
|
|
37
|
-
account: string;
|
|
38
|
-
} | undefined;
|
|
39
|
-
delUserById: (id: string) => string;
|
|
40
|
-
getMemberState: () => boolean;
|
|
41
|
-
getFirstBackFillData: () => import("./core/hooks/useMultipleAccounts").BackFillMultipleState | undefined;
|
|
42
|
-
getOriginAccount: () => string;
|
|
43
|
-
getOriginWay: () => string;
|
|
44
|
-
} | undefined, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
45
|
-
export declare const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
12
|
+
export declare const guardEventsFilter: (props: any, multipleInstance?: StoreInstance, openEventsMapping?: boolean) => GuardEvents;
|
|
13
|
+
export declare const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean) => GuardEvents;
|
|
46
14
|
export declare const GuardEventsCamelToKebabMapping: {
|
|
47
15
|
readonly onLoad: "load";
|
|
48
16
|
readonly onLoadError: "load-error";
|
package/types/Guard/module.d.ts
CHANGED
|
@@ -18,7 +18,8 @@ export declare const enum GuardModuleType {
|
|
|
18
18
|
SUBMIT_SUCCESS = "submitSuccess",
|
|
19
19
|
IDENTITY_BINDING_ASK = "identityBindingAsk",
|
|
20
20
|
IDENTITY_BINDING = "identityBinding",
|
|
21
|
-
SELF_UNLOCK = "selfUnlock"
|
|
21
|
+
SELF_UNLOCK = "selfUnlock",
|
|
22
|
+
FLOW_SELECT_ACCOUNT = "flowSelectAccount"
|
|
22
23
|
}
|
|
23
24
|
export interface GuardModuleAction {
|
|
24
25
|
action: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useGuardIconfont: (cdnBase?: string
|
|
1
|
+
export declare const useGuardIconfont: (cdnBase?: string, setError?: any) => boolean;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
export declare const InputPassword: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.RefObject<Input>>>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const InputPassword: (props: any) => JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FormItemProps } from 'antd/lib/form';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { PasswordLoginMethods } from '../../../Type/application';
|
|
3
4
|
export interface FormItemAccountProps extends FormItemProps {
|
|
4
|
-
|
|
5
|
+
passwordLoginMethods: PasswordLoginMethods[];
|
|
5
6
|
}
|
|
6
7
|
export declare const FormItemAccount: React.FC<FormItemAccountProps>;
|
|
@@ -3,6 +3,5 @@ import React from 'react';
|
|
|
3
3
|
import { PasswordLoginMethods } from '../../../Type/application';
|
|
4
4
|
export interface InputAccountProps extends InputProps {
|
|
5
5
|
passwordLoginMethods: PasswordLoginMethods[];
|
|
6
|
-
placeholder: string;
|
|
7
6
|
}
|
|
8
7
|
export declare const InputAccount: React.FC<InputAccountProps>;
|
|
@@ -32,10 +32,9 @@ 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
|
-
|
|
38
|
-
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
37
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
39
38
|
setLoginWayByHttpData: (account: string, data: {
|
|
40
39
|
username?: string | undefined;
|
|
41
40
|
phone?: string | undefined;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import './index.less';
|
|
3
3
|
import { CodeStatusDescriptions } from './WorkQrCode';
|
|
4
4
|
export declare type CodeStatus = 'loading' | 'ready' | 'already' | 'success' | 'error' | 'expired' | 'cancel' | 'MFA';
|
|
5
|
-
export declare const prefix
|
|
5
|
+
export declare const prefix: string;
|
|
6
6
|
export interface UiQrProps {
|
|
7
7
|
/**
|
|
8
8
|
* Loading 组件
|
|
@@ -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 };
|
|
@@ -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?: RegisterMethods[];
|
|
7
|
+
defaultRegisterMethod?: RegisterMethods;
|
|
8
8
|
publicKey?: string;
|
|
9
9
|
agreementEnabled?: boolean;
|
|
10
10
|
agreements?: Agreement[];
|
|
@@ -103,11 +103,6 @@ export declare const enum RegisterMethods {
|
|
|
103
103
|
Phone = "phone",
|
|
104
104
|
EmailCode = "emailCode"
|
|
105
105
|
}
|
|
106
|
-
export declare const enum RegisterSortMethods {
|
|
107
|
-
Email = "email-password",
|
|
108
|
-
Phone = "phone-code",
|
|
109
|
-
EmailCode = "email-code"
|
|
110
|
-
}
|
|
111
106
|
export declare type QrcodeTabsSettings = Record<LoginMethods, Array<{
|
|
112
107
|
id: string;
|
|
113
108
|
title: string;
|
|
@@ -150,13 +145,9 @@ export interface UserExtendsField {
|
|
|
150
145
|
export declare type ExtendsField = InternalExtendsField | UserExtendsField;
|
|
151
146
|
export interface ApplicationPasswordTabConfig {
|
|
152
147
|
enabledLoginMethods?: PasswordLoginMethods[];
|
|
153
|
-
validRegisterMethods?: string[];
|
|
154
|
-
validLoginMethods?: string[];
|
|
155
148
|
}
|
|
156
149
|
export interface ApplicationVerifyCodeTabConfig {
|
|
157
150
|
enabledLoginMethods: VerifyLoginMethods[];
|
|
158
|
-
validRegisterMethods?: string[];
|
|
159
|
-
validLoginMethods?: string[];
|
|
160
151
|
}
|
|
161
152
|
export interface Agreement {
|
|
162
153
|
id: number;
|
|
@@ -168,14 +159,6 @@ export interface Agreement {
|
|
|
168
159
|
export declare type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
|
|
169
160
|
export declare type VerifyLoginMethods = 'email-code' | 'phone-code';
|
|
170
161
|
export declare type ComplateFiledsPlace = 'register' | 'login';
|
|
171
|
-
export interface TabFieldsI18nItem {
|
|
172
|
-
key: string;
|
|
173
|
-
label: string;
|
|
174
|
-
labelEn: string;
|
|
175
|
-
i18n: {
|
|
176
|
-
[propName in Lang]?: string;
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
162
|
export interface ApplicationConfig {
|
|
180
163
|
id: string;
|
|
181
164
|
allowedOrigins: string[];
|
|
@@ -281,11 +264,4 @@ export interface ApplicationConfig {
|
|
|
281
264
|
* 是否开启注册密码补全
|
|
282
265
|
*/
|
|
283
266
|
enableCompletePassword: boolean;
|
|
284
|
-
/**
|
|
285
|
-
* 登录注册排序
|
|
286
|
-
*/
|
|
287
|
-
tabMethodsSortConfig: {
|
|
288
|
-
loginMethodsSort: string[];
|
|
289
|
-
};
|
|
290
|
-
tabMethodsFields: TabFieldsI18nItem[];
|
|
291
267
|
}
|
|
@@ -3,4 +3,3 @@ 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
|
|
4
|
+
import { EmailFormItem, PhoneFormItem, UserNameFormItem } from './ValidatorFormItem';
|
|
5
5
|
export interface ValidatorFormItemProps extends FormItemProps {
|
|
6
6
|
form?: FormInstance;
|
|
7
7
|
checkRepeat?: boolean;
|
|
@@ -11,10 +11,9 @@ export interface ValidatorFormItemProps extends FormItemProps {
|
|
|
11
11
|
* 控制内部FormItem组件关于pattern的校验规则
|
|
12
12
|
*/
|
|
13
13
|
isCheckPattern?: boolean;
|
|
14
|
-
defaultMethod?: string;
|
|
15
14
|
}
|
|
16
15
|
export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
|
|
17
|
-
method: 'email' | 'phone' | 'username'
|
|
16
|
+
method: 'email' | 'phone' | 'username';
|
|
18
17
|
}
|
|
19
18
|
export interface PasswordFormItemProps extends FormItemProps {
|
|
20
19
|
}
|
|
@@ -27,7 +26,6 @@ interface FormItemInterface extends InternalFormItemType {
|
|
|
27
26
|
Email: typeof EmailFormItem;
|
|
28
27
|
Phone: typeof PhoneFormItem;
|
|
29
28
|
UserName: typeof UserNameFormItem;
|
|
30
|
-
CustomName: typeof CustomNameFormItem;
|
|
31
29
|
}
|
|
32
30
|
declare const CustomFormItem: FormItemInterface;
|
|
33
31
|
export default CustomFormItem;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { GuardLocalConfig } from '../../Guard/config';
|
|
3
3
|
import { GuardHttp } from '../guardHttp';
|
|
4
4
|
import { GuardPageConfig } from '../../Type';
|
|
5
|
-
import { ApplicationConfig, LoginMethods } from '../../Type/application';
|
|
5
|
+
import { ApplicationConfig, LoginMethods, RegisterMethods } 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;
|
|
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
|
isSSO?: boolean | undefined;
|
|
@@ -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?: RegisterMethods[] | undefined;
|
|
30
|
+
defaultRegisterMethod?: RegisterMethods | undefined;
|
|
31
31
|
publicKey?: string | undefined;
|
|
32
32
|
agreementEnabled?: boolean | undefined;
|
|
33
33
|
agreements?: import("../../Type").Agreement[] | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig } from '..';
|
|
3
3
|
import { BackFillMultipleState, StoreInstance } from '../Guard/core/hooks/useMultipleAccounts';
|
|
4
4
|
import { ModuleState } from '../Guard/GuardModule/stateMachine';
|
|
@@ -46,12 +46,14 @@ export interface IGuardContext {
|
|
|
46
46
|
export declare const createGuardXContext: () => {
|
|
47
47
|
Provider: React.FC<{
|
|
48
48
|
value: Partial<IGuardContext>;
|
|
49
|
+
children: ReactNode;
|
|
49
50
|
}>;
|
|
50
51
|
Consumer: React.Consumer<IGuardContext>;
|
|
51
52
|
};
|
|
52
53
|
export declare const useGuardXContext: () => {
|
|
53
54
|
Provider: React.FC<{
|
|
54
55
|
value: Partial<IGuardContext>;
|
|
56
|
+
children: ReactNode;
|
|
55
57
|
}>;
|
|
56
58
|
Consumer: React.Consumer<IGuardContext>;
|
|
57
59
|
};
|
|
@@ -60,7 +62,9 @@ export interface IGuardContextProvider {
|
|
|
60
62
|
spinChange: (spin: boolean) => void;
|
|
61
63
|
}
|
|
62
64
|
export declare const useGuardButtonContext: () => {
|
|
63
|
-
GuardButtonProvider: React.FC<{
|
|
65
|
+
GuardButtonProvider: React.FC<{
|
|
66
|
+
children: ReactNode;
|
|
67
|
+
}>;
|
|
64
68
|
};
|
|
65
69
|
export declare const useGuardButtonState: () => IGuardContextProvider;
|
|
66
70
|
export declare const useGuardPublicConfig: () => ApplicationConfig;
|
|
@@ -104,10 +108,9 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
104
108
|
phoneCountryCode: string;
|
|
105
109
|
areaCode: string;
|
|
106
110
|
} | undefined) => void;
|
|
107
|
-
setUserInfo: (user:
|
|
111
|
+
setUserInfo: (user: Omit<import("../Guard/core/hooks/useMultipleAccounts").User & {
|
|
108
112
|
id: string;
|
|
109
|
-
|
|
110
|
-
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
113
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
111
114
|
setLoginWayByHttpData: (account: string, data: {
|
|
112
115
|
username?: string | undefined;
|
|
113
116
|
phone?: string | undefined;
|