@authing/guard-shim-react 4.5.33 → 4.5.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/guard.min.js +10546 -809
- package/dist/typings/src/Guard/core/hooks/useMultipleAccounts.d.ts +2 -2
- package/dist/typings/src/Login/core/withLDAP.d.ts +2 -1
- package/dist/typings/src/Login/core/withPassword/index.d.ts +2 -1
- package/dist/typings/src/Login/hooks/useLoginMultiple.d.ts +8 -5
- package/dist/typings/src/Login/interface.d.ts +1 -0
- package/dist/typings/src/_utils/config/index.d.ts +1 -0
- package/dist/typings/src/_utils/context.d.ts +1 -1
- package/package.json +1 -1
|
@@ -277,7 +277,7 @@ declare class MultipleAccount {
|
|
|
277
277
|
* MultipleAccounts 相关 Hook
|
|
278
278
|
* Finally Config 类型过滤
|
|
279
279
|
*/
|
|
280
|
-
declare const
|
|
280
|
+
declare const useSelectAccounts: ({ appId, finallyConfig }: {
|
|
281
281
|
appId?: string | undefined;
|
|
282
282
|
finallyConfig?: any;
|
|
283
283
|
}) => {
|
|
@@ -321,4 +321,4 @@ declare const useMultipleAccounts: ({ appId, finallyConfig }: {
|
|
|
321
321
|
multipleAccountData: BackFillMultipleState | undefined;
|
|
322
322
|
clearBackFillData: () => void;
|
|
323
323
|
};
|
|
324
|
-
export default
|
|
324
|
+
export default useSelectAccounts;
|
|
@@ -13,9 +13,10 @@ interface LoginWithLDAPProps {
|
|
|
13
13
|
*/
|
|
14
14
|
multipleInstance?: StoreInstance;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* 选择已登录账号回填的数据
|
|
17
17
|
*/
|
|
18
18
|
backfillData?: BackFillMultipleState;
|
|
19
|
+
loginHint?: string;
|
|
19
20
|
}
|
|
20
21
|
export declare const LoginWithLDAP: (props: LoginWithLDAPProps) => JSX.Element;
|
|
21
22
|
export {};
|
|
@@ -19,9 +19,10 @@ interface LoginWithPasswordProps {
|
|
|
19
19
|
*/
|
|
20
20
|
multipleInstance?: StoreInstance;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* 选择已登录账号回填的数据
|
|
23
23
|
*/
|
|
24
24
|
backfillData?: BackFillMultipleState;
|
|
25
|
+
loginHint?: string;
|
|
25
26
|
}
|
|
26
27
|
export declare const LoginWithPassword: (props: LoginWithPasswordProps) => JSX.Element;
|
|
27
28
|
export {};
|
|
@@ -2,26 +2,29 @@ import { FormInstance } from 'shim-antd/lib/form';
|
|
|
2
2
|
import { React } from 'shim-react';
|
|
3
3
|
import { BackFillMultipleState, LoginWay } from '../../Guard/core/hooks/useMultipleAccounts';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* 登录账号选择时:账户 & 登录方式自动回填
|
|
6
|
+
* oidc 时:login_hint 回填账号
|
|
7
|
+
*
|
|
6
8
|
* TODO: HOOK 参数有时间整理成为对象,开始没有想到有这么多
|
|
7
9
|
* 调用地方 core 中需要回填的两个登录方式
|
|
8
10
|
*/
|
|
9
|
-
declare function
|
|
11
|
+
declare function useLoginAccountBackFill(options: {
|
|
10
12
|
form: FormInstance<any>;
|
|
11
|
-
way: LoginWay;
|
|
13
|
+
way: LoginWay | LoginWay[];
|
|
12
14
|
formKey: string;
|
|
13
15
|
backfillData?: BackFillMultipleState;
|
|
14
16
|
isOnlyInternationSms?: boolean;
|
|
15
17
|
setAreaCode?: React.Dispatch<React.SetStateAction<string>>;
|
|
16
18
|
cancelBackfill?: boolean;
|
|
17
19
|
changeCurrentMethod?: (account: string) => void;
|
|
20
|
+
loginHint?: string;
|
|
18
21
|
}): void;
|
|
19
22
|
/**
|
|
20
23
|
* 多账号统一状态管理
|
|
21
24
|
* @param setLoginWay
|
|
22
25
|
* @returns
|
|
23
26
|
*/
|
|
24
|
-
declare function
|
|
27
|
+
declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
|
|
25
28
|
isMultipleAccount: boolean;
|
|
26
29
|
multipleInstance: {
|
|
27
30
|
initStore: (appId: string, options: {
|
|
@@ -62,4 +65,4 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
|
|
|
62
65
|
backfillData: BackFillMultipleState | undefined;
|
|
63
66
|
defaultQrWay: string | undefined;
|
|
64
67
|
};
|
|
65
|
-
export {
|
|
68
|
+
export { useLoginAccountBackFill, useLoginSelectAccount as useLoginMultiple };
|
|
@@ -20,6 +20,7 @@ export interface LoginConfig extends IG2Config {
|
|
|
20
20
|
* 关闭二维码状态check轮询(console上使用)
|
|
21
21
|
*/
|
|
22
22
|
_closeLoopCheckQrcode?: boolean;
|
|
23
|
+
loginHint?: string;
|
|
23
24
|
}
|
|
24
25
|
export interface LoginEvents extends IG2Events {
|
|
25
26
|
onLogin?: (user: User, authClient: AuthenticationClient) => void;
|
|
@@ -101,6 +101,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
101
101
|
withCustomData?: boolean | undefined;
|
|
102
102
|
} | undefined;
|
|
103
103
|
_closeLoopCheckQrcode?: boolean | undefined;
|
|
104
|
+
loginHint?: string | undefined;
|
|
104
105
|
goBack?: (() => void) | null | undefined;
|
|
105
106
|
};
|
|
106
107
|
guardPageConfig: GuardPageConfig;
|