@authing/react-ui-components 4.0.11-rc.0 → 4.0.12-rc.0
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 -9
- 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 -34
- 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/hooks/useLoginMultiple.d.ts +2 -2
- package/types/Qrcode/UiQrCode.d.ts +1 -1
- package/types/Qrcode/hooks/useStatus.d.ts +2 -1
- package/types/SelectAccount/index.d.ts +3 -0
- package/types/_utils/config/index.d.ts +2 -2
- package/types/_utils/context.d.ts +8 -4
- 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/_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,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
|
|
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
|
-
}, "
|
|
251
|
+
}, "tab" | "way" | "phoneCountryCode">) => 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
|
|
287
|
+
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string, internation?: {
|
|
288
288
|
phoneCountryCode: string;
|
|
289
289
|
areaCode: string;
|
|
290
|
-
}
|
|
291
|
-
setUserInfo: (user:
|
|
290
|
+
}) => void;
|
|
291
|
+
setUserInfo: (user: Omit<User & {
|
|
292
292
|
id: string;
|
|
293
|
-
}, "
|
|
293
|
+
}, "tab" | "way" | "phoneCountryCode">) => 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
|
|
316
|
+
referMultipleState: (type: 'login' | 'multiple', data?: BackFillMultipleState) => void;
|
|
317
317
|
multipleAccountData: BackFillMultipleState | undefined;
|
|
318
318
|
clearBackFillData: () => void;
|
|
319
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,43 +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
|
-
}, "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;
|
|
12
|
+
export declare const guardEventsFilter: (props: any, multipleInstance?: StoreInstance, openEventsMapping?: boolean) => GuardEvents;
|
|
13
|
+
export declare const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean) => GuardEvents;
|
|
45
14
|
export declare const GuardEventsCamelToKebabMapping: {
|
|
46
15
|
readonly onLoad: "load";
|
|
47
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;
|
|
@@ -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: Omit<import("../../Guard/core/hooks/useMultipleAccounts").User & {
|
|
36
36
|
id: string;
|
|
37
|
-
}, "
|
|
37
|
+
}, "tab" | "way" | "phoneCountryCode">) => 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: 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 };
|
|
@@ -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>
|
|
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;
|
|
@@ -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,9 +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
|
-
}, "
|
|
113
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
110
114
|
setLoginWayByHttpData: (account: string, data: {
|
|
111
115
|
username?: string | undefined;
|
|
112
116
|
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
|
-
}
|
|
17
|
+
}) => Promise<AuthingGuardResponse<T>>;
|
|
18
18
|
postForm: <T = any>(path: string, formData: any, config?: {
|
|
19
19
|
headers: any;
|
|
20
|
-
}
|
|
20
|
+
}) => 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
|
|
12
|
+
export declare const useAppId: (appId?: string) => 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: RequestInfo, init?: RequestInit | undefined): Promise<any>;
|
|
5
|
-
get<T>(path: string, query?: Record<string, any>, init?: AxiosRequestConfig
|
|
4
|
+
(input: URL | RequestInfo, init?: RequestInit | undefined): Promise<any>;
|
|
5
|
+
get<T>(path: string, query?: Record<string, any>, init?: AxiosRequestConfig): 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
|
-
}
|
|
11
|
+
}): 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
|
|
18
|
+
export declare const fieldRequiredRule: (fieldRequiredRule: string, fieldRequiredRuleMessage?: string) => 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?: STYLE_RECORD_KEY) => 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 object = 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[]) => {
|
|
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
|
|
75
|
+
export declare const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string) => 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
|
|
77
|
+
export declare const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean) => 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
|
|
7
|
+
export declare const useInitAppId: (propsAppid?: string, propsAuthClient?: AuthenticationClient, setError?: any) => string | undefined;
|
|
@@ -16,6 +16,7 @@ export declare const enum ApiCode {
|
|
|
16
16
|
FIRST_LOGIN_PASSWORD = 1639,
|
|
17
17
|
FORCED_PASSWORD_RESET = 2058,
|
|
18
18
|
UNSAFE_PASSWORD_TIP = 2061,
|
|
19
|
-
UNSAFE_PASSWORD_RESET = 2071
|
|
19
|
+
UNSAFE_PASSWORD_RESET = 2071,
|
|
20
|
+
FLOW_SELECT_ACCOUNT = 2921
|
|
20
21
|
}
|
|
21
22
|
export declare const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.0.
|
|
1
|
+
declare const _default: "4.0.12-rc.0";
|
|
2
2
|
export default _default;
|