@authing/react-ui-components 4.0.12-rc.1 → 4.0.12-rc.3
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 +12 -129
- package/package.json +1 -1
- package/types/AuthClientProvider/AuthClientProvider.d.ts +2 -4
- package/types/Back/index.d.ts +1 -3
- package/types/ChangePassword/index.d.ts +1 -2
- package/types/CompleteInfo/businessRequest.d.ts +1 -1
- package/types/CompleteInfo/utils.d.ts +6 -2
- 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 -9
- package/types/Guard/core/renderContext.d.ts +1 -2
- package/types/Guard/core/useAppendConfig.d.ts +1 -1
- package/types/Guard/core/usePlugin.d.ts +1 -1
- package/types/Guard/event.d.ts +34 -3
- package/types/IconFont/useGuardIconfont.d.ts +1 -1
- package/types/InputPassword/index.d.ts +4 -2
- package/types/Login/hooks/useLoginMultiple.d.ts +2 -2
- package/types/Qrcode/UiQrCode.d.ts +1 -1
- package/types/Qrcode/hooks/useStatus.d.ts +1 -2
- package/types/_utils/config/index.d.ts +2 -2
- package/types/_utils/context.d.ts +4 -8
- 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 +6 -6
- package/types/_utils/initAppId.d.ts +1 -1
- package/types/version/version.d.ts +1 -1
|
@@ -1,128 +1,20 @@
|
|
|
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) 2017 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
|
-
|
|
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
|
-
\**************************************************************************************/
|
|
13
|
+
/*!
|
|
14
|
+
Copyright (c) 2018 Jed Watson.
|
|
15
|
+
Licensed under the MIT License (MIT), see
|
|
16
|
+
http://jedwatson.github.io/classnames
|
|
17
|
+
*/
|
|
126
18
|
|
|
127
19
|
/**
|
|
128
20
|
* @license
|
|
@@ -133,15 +25,6 @@
|
|
|
133
25
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
134
26
|
*/
|
|
135
27
|
|
|
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
|
-
|
|
145
28
|
/** @license React v16.13.1
|
|
146
29
|
* react-is.production.min.js
|
|
147
30
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { AuthClientContextProps } from './context';
|
|
3
|
-
export declare const AuthClientProvider: React.FC<AuthClientContextProps
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
}>;
|
|
3
|
+
export declare const AuthClientProvider: React.FC<AuthClientContextProps>;
|
|
6
4
|
export declare const useGlobalAuthClient: () => import("authing-js-sdk").AuthenticationClient | undefined;
|
package/types/Back/index.d.ts
CHANGED
|
@@ -7,6 +7,4 @@ 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
|
|
11
|
-
children: any;
|
|
12
|
-
}>;
|
|
10
|
+
export declare const BackCustom: React.FC<BackCustomProps>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export declare const GuardChangePassword: React.FC<{
|
|
3
3
|
title: string;
|
|
4
4
|
explain: string;
|
|
5
|
-
children: ReactNode;
|
|
6
5
|
}>;
|
|
7
6
|
export declare const GuardFirstLoginPasswordResetView: React.FC;
|
|
8
7
|
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) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
7
|
+
export declare const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined) => 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,
|
|
2
|
+
import { CompleteInfoMetaData, 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,7 +9,11 @@ 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?:
|
|
12
|
+
export declare const fieldValuesToRegisterProfile: (extendsFields: ApplicationConfig['extendsFields'], fieldValues?: {
|
|
13
|
+
name: string;
|
|
14
|
+
value: string;
|
|
15
|
+
code?: string | undefined;
|
|
16
|
+
}[] | undefined) => {
|
|
13
17
|
registerProfile: Record<string, any>;
|
|
14
18
|
udf: {
|
|
15
19
|
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) => AuthenticationClient;
|
|
4
|
+
export declare const initGuardAuthClient: (config: GuardLocalConfig, appId: string, tenantId?: string | undefined) => AuthenticationClient;
|
|
5
5
|
export declare const useInitGuardAuthClient: (props: {
|
|
6
6
|
config?: GuardLocalConfig | undefined;
|
|
7
7
|
appId?: string | undefined;
|
|
@@ -242,13 +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, internation?: {
|
|
245
|
+
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string | undefined, internation?: {
|
|
246
246
|
phoneCountryCode: string;
|
|
247
247
|
areaCode: string;
|
|
248
|
-
}) => void;
|
|
249
|
-
setUserInfo: (user:
|
|
248
|
+
} | undefined) => void;
|
|
249
|
+
setUserInfo: (user: Pick<User & {
|
|
250
250
|
id: string;
|
|
251
|
-
}, "
|
|
251
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
252
252
|
setLoginWayByHttpData: (account: string, data: {
|
|
253
253
|
username?: string | undefined;
|
|
254
254
|
phone?: string | undefined;
|
|
@@ -284,13 +284,13 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
|
|
|
284
284
|
serverSideLoginMethods: LoginWay[];
|
|
285
285
|
isInternationSms: boolean;
|
|
286
286
|
}) => void;
|
|
287
|
-
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string, internation?: {
|
|
287
|
+
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string | undefined, internation?: {
|
|
288
288
|
phoneCountryCode: string;
|
|
289
289
|
areaCode: string;
|
|
290
|
-
}) => void;
|
|
291
|
-
setUserInfo: (user:
|
|
290
|
+
} | undefined) => void;
|
|
291
|
+
setUserInfo: (user: Pick<User & {
|
|
292
292
|
id: string;
|
|
293
|
-
}, "
|
|
293
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
294
294
|
setLoginWayByHttpData: (account: string, data: {
|
|
295
295
|
username?: string | undefined;
|
|
296
296
|
phone?: string | undefined;
|
|
@@ -313,7 +313,7 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
|
|
|
313
313
|
getOriginWay: () => string;
|
|
314
314
|
} | undefined;
|
|
315
315
|
isMultipleAccount: boolean;
|
|
316
|
-
referMultipleState: (type: 'login' | 'multiple', data?: BackFillMultipleState) => void;
|
|
316
|
+
referMultipleState: (type: 'login' | 'multiple', data?: BackFillMultipleState | undefined) => void;
|
|
317
317
|
multipleAccountData: BackFillMultipleState | undefined;
|
|
318
318
|
clearBackFillData: () => void;
|
|
319
319
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { GuardProps } from '..';
|
|
2
|
-
import React
|
|
2
|
+
import React 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;
|
|
8
7
|
}>;
|
|
@@ -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, appendConfig?: GuardAppendConfig) => void;
|
|
4
|
+
export declare const useInitGuardAppendConfig: (setForceUpdate: any, appId?: string | undefined, appendConfig?: GuardAppendConfig | undefined) => 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) => boolean;
|
|
3
|
+
export declare const useGuardFacePlugin: (facePlugin?: FacePlugin | undefined) => boolean;
|
package/types/Guard/event.d.ts
CHANGED
|
@@ -5,12 +5,43 @@ 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';
|
|
9
8
|
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
|
|
10
9
|
onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
|
|
11
10
|
}
|
|
12
|
-
export declare const guardEventsFilter: (props: any, multipleInstance?:
|
|
13
|
-
|
|
11
|
+
export declare const guardEventsFilter: (props: any, multipleInstance?: {
|
|
12
|
+
initStore: (appId: string, options: {
|
|
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
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
23
|
+
setLoginWayByHttpData: (account: string, data: {
|
|
24
|
+
username?: string | undefined;
|
|
25
|
+
phone?: string | undefined;
|
|
26
|
+
email?: string | undefined;
|
|
27
|
+
}) => void;
|
|
28
|
+
setLoginWayByLDAPData: (account: string, data: {
|
|
29
|
+
name?: string | undefined;
|
|
30
|
+
phone?: string | undefined;
|
|
31
|
+
email?: string | undefined;
|
|
32
|
+
}) => void;
|
|
33
|
+
getMemoUser: (excludeWays?: import("./core/hooks/useMultipleAccounts").LoginWay[]) => import("../Login/multipleAccounts/panel").SelectOptions[];
|
|
34
|
+
getMemoSingleUser: (id: string) => {
|
|
35
|
+
way: import("./core/hooks/useMultipleAccounts").LoginWay;
|
|
36
|
+
account: string;
|
|
37
|
+
} | undefined;
|
|
38
|
+
delUserById: (id: string) => string;
|
|
39
|
+
getMemberState: () => boolean;
|
|
40
|
+
getFirstBackFillData: () => import("./core/hooks/useMultipleAccounts").BackFillMultipleState | undefined;
|
|
41
|
+
getOriginAccount: () => string;
|
|
42
|
+
getOriginWay: () => string;
|
|
43
|
+
} | undefined, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
44
|
+
export declare const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
14
45
|
export declare const GuardEventsCamelToKebabMapping: {
|
|
15
46
|
readonly onLoad: "load";
|
|
16
47
|
readonly onLoadError: "load-error";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useGuardIconfont: (cdnBase?: string, setError?: any) => boolean;
|
|
1
|
+
export declare const useGuardIconfont: (cdnBase?: string | undefined, setError?: any) => boolean;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Input } from 'antd';
|
|
2
|
+
import { PasswordProps } from 'antd/lib/input';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare const InputPassword: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.RefObject<Input>>>;
|
|
@@ -32,9 +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: Pick<import("../../Guard/core/hooks/useMultipleAccounts").User & {
|
|
36
36
|
id: string;
|
|
37
|
-
}, "
|
|
37
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
38
38
|
setLoginWayByHttpData: (account: string, data: {
|
|
39
39
|
username?: string | undefined;
|
|
40
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 = "refactor";
|
|
6
6
|
export interface UiQrProps {
|
|
7
7
|
/**
|
|
8
8
|
* Loading 组件
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { CodeStatus } from '../UiQrCode';
|
|
3
2
|
/**
|
|
4
3
|
* 根据不同状态添加不同的元素
|
|
5
4
|
* 维护不同状态的处理
|
|
6
5
|
*/
|
|
7
|
-
declare const useStatus: (status: CodeStatus) =>
|
|
6
|
+
declare const useStatus: (status: CodeStatus) => ({} | null | undefined)[];
|
|
8
7
|
export { useStatus };
|
|
@@ -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>) => GuardLocalConfig | undefined;
|
|
10
|
+
export declare const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: Partial<GuardLocalConfig> | undefined) => 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, config?: GuardLocalConfig, httpClient?: GuardHttp, setError?: any) => {
|
|
19
|
+
export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
|
|
20
20
|
finallyConfig: {
|
|
21
21
|
host: string;
|
|
22
22
|
isSSO?: boolean | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React 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,14 +46,12 @@ export interface IGuardContext {
|
|
|
46
46
|
export declare const createGuardXContext: () => {
|
|
47
47
|
Provider: React.FC<{
|
|
48
48
|
value: Partial<IGuardContext>;
|
|
49
|
-
children: ReactNode;
|
|
50
49
|
}>;
|
|
51
50
|
Consumer: React.Consumer<IGuardContext>;
|
|
52
51
|
};
|
|
53
52
|
export declare const useGuardXContext: () => {
|
|
54
53
|
Provider: React.FC<{
|
|
55
54
|
value: Partial<IGuardContext>;
|
|
56
|
-
children: ReactNode;
|
|
57
55
|
}>;
|
|
58
56
|
Consumer: React.Consumer<IGuardContext>;
|
|
59
57
|
};
|
|
@@ -62,9 +60,7 @@ export interface IGuardContextProvider {
|
|
|
62
60
|
spinChange: (spin: boolean) => void;
|
|
63
61
|
}
|
|
64
62
|
export declare const useGuardButtonContext: () => {
|
|
65
|
-
GuardButtonProvider: React.FC<{
|
|
66
|
-
children: ReactNode;
|
|
67
|
-
}>;
|
|
63
|
+
GuardButtonProvider: React.FC<{}>;
|
|
68
64
|
};
|
|
69
65
|
export declare const useGuardButtonState: () => IGuardContextProvider;
|
|
70
66
|
export declare const useGuardPublicConfig: () => ApplicationConfig;
|
|
@@ -108,9 +104,9 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
108
104
|
phoneCountryCode: string;
|
|
109
105
|
areaCode: string;
|
|
110
106
|
} | undefined) => void;
|
|
111
|
-
setUserInfo: (user:
|
|
107
|
+
setUserInfo: (user: Pick<import("../Guard/core/hooks/useMultipleAccounts").User & {
|
|
112
108
|
id: string;
|
|
113
|
-
}, "
|
|
109
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
114
110
|
setLoginWayByHttpData: (account: string, data: {
|
|
115
111
|
username?: string | undefined;
|
|
116
112
|
phone?: string | undefined;
|
|
@@ -14,10 +14,10 @@ export declare class GuardHttp {
|
|
|
14
14
|
get: <T = any>(path: string, query?: Record<string, any>, config?: any) => Promise<AuthingGuardResponse<T>>;
|
|
15
15
|
post: <T = any>(path: string, data: any, config?: {
|
|
16
16
|
headers: any;
|
|
17
|
-
}) => Promise<AuthingGuardResponse<T>>;
|
|
17
|
+
} | undefined) => Promise<AuthingGuardResponse<T>>;
|
|
18
18
|
postForm: <T = any>(path: string, formData: any, config?: {
|
|
19
19
|
headers: any;
|
|
20
|
-
}) => Promise<AuthingGuardResponse<T>>;
|
|
20
|
+
} | undefined) => Promise<AuthingGuardResponse<T>>;
|
|
21
21
|
authFlow: <T = any>(action: string, data?: any) => Promise<AuthingGuardResponse<T>>;
|
|
22
22
|
initErrorCodeInterceptor: (callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => this | undefined;
|
|
23
23
|
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) => string;
|
|
12
|
+
export declare const useAppId: (appId?: string | undefined) => 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:
|
|
5
|
-
get<T>(path: string, query?: Record<string, any>, init?: AxiosRequestConfig): Promise<AuthingResponse<T>>;
|
|
4
|
+
(input: RequestInfo, init?: RequestInit | undefined): Promise<any>;
|
|
5
|
+
get<T>(path: string, query?: Record<string, any>, init?: AxiosRequestConfig<any> | undefined): 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
|
-
}): Promise<AuthingResponse<T_2>>;
|
|
11
|
+
} | undefined): 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) => Rule[];
|
|
18
|
+
export declare const fieldRequiredRule: (fieldRequiredRule: string, fieldRequiredRuleMessage?: string | undefined) => Rule[];
|
|
19
19
|
export declare function getDeviceName(): string | null | undefined;
|
|
20
20
|
export declare type STYLE_RECORD_KEY = 'appConfig' | 'userConfig';
|
|
21
|
-
export declare const insertStyles: (styles: string | any, recordKey?:
|
|
21
|
+
export declare const insertStyles: (styles: string | any, recordKey?: "appConfig" | "userConfig" | undefined) => 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
|
/**
|
|
@@ -34,12 +34,12 @@ export declare function isObject(item: any): any;
|
|
|
34
34
|
* @param target
|
|
35
35
|
* @param ...sources
|
|
36
36
|
*/
|
|
37
|
-
export declare function deepMerge<T extends
|
|
37
|
+
export declare function deepMerge<T extends any = any>(target: T, ...sources: any[]): T;
|
|
38
38
|
/**
|
|
39
39
|
* 在托管页下上传query中指定的用户自定义字段进行补全
|
|
40
40
|
* @param params 指定上传的用户自定义字段
|
|
41
41
|
*/
|
|
42
|
-
export declare const getUserRegisterParams: (params?: string[]) => {
|
|
42
|
+
export declare const getUserRegisterParams: (params?: string[] | undefined) => {
|
|
43
43
|
key: string;
|
|
44
44
|
value: string | string[] | qs.ParsedQs | qs.ParsedQs[] | undefined;
|
|
45
45
|
}[];
|
|
@@ -72,9 +72,9 @@ export declare const PASSWORD_STRENGTH_TEXT_MAP: Record<PasswordStrength, {
|
|
|
72
72
|
validateMessage: () => string;
|
|
73
73
|
}>;
|
|
74
74
|
export declare const getSymbolTypeLength: (pwd: string) => number;
|
|
75
|
-
export declare const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string) => Rule[];
|
|
75
|
+
export declare const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string | undefined) => Rule[];
|
|
76
76
|
export declare const sleep: (delay: number) => Promise<unknown>;
|
|
77
|
-
export declare const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean) => boolean;
|
|
77
|
+
export declare const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean | undefined) => boolean;
|
|
78
78
|
export declare const tabSort: (defaultValue: any, tabList: RegisterMethods[]) => RegisterMethods[];
|
|
79
79
|
export declare const mailDesensitization: (mail: string) => string;
|
|
80
80
|
export declare const phoneDesensitization: (phone: string) => string;
|
|
@@ -4,4 +4,4 @@ export interface UseInitAppidProps {
|
|
|
4
4
|
propsAuthClient?: AuthenticationClient;
|
|
5
5
|
setError?: any;
|
|
6
6
|
}
|
|
7
|
-
export declare const useInitAppId: (propsAppid?: string, propsAuthClient?: AuthenticationClient, setError?: any) => string | undefined;
|
|
7
|
+
export declare const useInitAppId: (propsAppid?: string | undefined, propsAuthClient?: AuthenticationClient | undefined, setError?: any) => string | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.0.12-rc.
|
|
1
|
+
declare const _default: "4.0.12-rc.3";
|
|
2
2
|
export default _default;
|