@authing/react-ui-components 4.0.0-beta.2 → 4.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/asset-manifest.json +26 -0
- package/dist/index.html +1 -0
- package/dist/static/css/2.2cdfb9d1.chunk.css +3 -0
- package/dist/static/css/2.2cdfb9d1.chunk.css.map +1 -0
- package/dist/static/css/main.f438f284.chunk.css +2 -0
- package/dist/static/css/main.f438f284.chunk.css.map +1 -0
- package/dist/static/js/2.9a1287ca.chunk.js +3 -0
- package/dist/static/js/2.9a1287ca.chunk.js.LICENSE.txt +112 -0
- package/dist/static/js/2.9a1287ca.chunk.js.map +1 -0
- package/dist/static/js/3.d3328d89.chunk.js +2 -0
- package/dist/static/js/3.d3328d89.chunk.js.map +1 -0
- package/dist/static/js/main.5735e6f1.chunk.js +2 -0
- package/dist/static/js/main.5735e6f1.chunk.js.map +1 -0
- package/dist/static/js/runtime-main.e75981a3.js +2 -0
- package/dist/static/js/runtime-main.e75981a3.js.map +1 -0
- package/dist/static/media/loading.3cf0104f.svg +32 -0
- package/lib/index.min.css +1 -1
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.LICENSE.txt +9 -0
- package/package.json +3 -3
- package/types/Guard/core/hooks/useMultipleAccounts.d.ts +320 -0
- package/types/Guard/core/useAppendConfig.d.ts +1 -1
- package/types/Guard/event.d.ts +33 -1
- package/types/Login/core/withAD.d.ts +9 -0
- package/types/Login/core/withAppQrcode.d.ts +2 -0
- package/types/Login/core/withLDAP.d.ts +9 -0
- package/types/Login/core/withPassword/index.d.ts +9 -0
- package/types/Login/core/withVerifyCode/VirtualDropdown.d.ts +4 -0
- package/types/Login/core/withVerifyCode/index.d.ts +2 -1
- package/types/Login/core/withWechatMiniQrcode.d.ts +3 -0
- package/types/Login/core/withWechatmpQrcode.d.ts +6 -0
- package/types/Login/hooks/useLoginMultiple.d.ts +62 -0
- package/types/Login/multipleAccounts/index.d.ts +22 -0
- package/types/Login/multipleAccounts/panel.d.ts +45 -0
- package/types/Login/socialLogin/index.d.ts +5 -0
- package/types/Type/index.d.ts +2 -1
- package/types/_utils/config/index.d.ts +4 -2
- package/types/_utils/context.d.ts +82 -0
- package/types/version/version.d.ts +1 -1
package/types/Type/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { AuthenticationClient, CommonMessage } from 'authing-js-sdk';
|
|
1
|
+
import { AuthenticationClient, CommonMessage, User } from 'authing-js-sdk';
|
|
2
2
|
import { GuardModuleType } from '../Guard/module';
|
|
3
3
|
import { FacePlugin } from '../_utils/facePlugin/interface';
|
|
4
4
|
import { ApplicationConfig } from './application';
|
|
5
5
|
export * from './application';
|
|
6
|
+
export type { CommonMessage, User };
|
|
6
7
|
export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW';
|
|
7
8
|
export declare enum GuardMode {
|
|
8
9
|
Modal = "modal",
|
|
@@ -6,7 +6,7 @@ import { ApplicationConfig, 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 useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
|
|
9
|
-
export declare const useMergePublicConfig: (appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
|
|
9
|
+
export declare const useMergePublicConfig: (forceUpdate: number, appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
|
|
10
10
|
host: string;
|
|
11
11
|
isSSO?: boolean | undefined;
|
|
12
12
|
defaultScenes?: import("../..").GuardModuleType | undefined;
|
|
@@ -77,6 +77,8 @@ export declare const useMergePublicConfig: (appId?: string | undefined, config?:
|
|
|
77
77
|
expired?: string | undefined;
|
|
78
78
|
retry?: string | undefined;
|
|
79
79
|
failed?: string | undefined;
|
|
80
|
+
middleTitle?: string | undefined;
|
|
81
|
+
referText?: string | undefined;
|
|
80
82
|
} | undefined;
|
|
81
83
|
onAuthFlow?: ((flow: Record<string, any>) => {}) | undefined;
|
|
82
84
|
customData?: {
|
|
@@ -91,4 +93,4 @@ export declare const useMergePublicConfig: (appId?: string | undefined, config?:
|
|
|
91
93
|
export declare const getPageConfig: (appId: string) => GuardPageConfig;
|
|
92
94
|
export declare const setPageConfig: (appId: string, config: GuardPageConfig) => GuardPageConfig;
|
|
93
95
|
export declare const requestGuardPageConfig: (appId: string, httpClient: GuardHttp) => Promise<GuardPageConfig>;
|
|
94
|
-
export declare const useGuardPageConfig: (appId?: string | undefined, httpClient?: GuardHttp | undefined, serError?: any) => GuardPageConfig | undefined;
|
|
96
|
+
export declare const useGuardPageConfig: (forceUpdate: number, appId?: string | undefined, httpClient?: GuardHttp | undefined, serError?: any) => GuardPageConfig | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig } from '..';
|
|
3
|
+
import { BackFillMultipleState, StoreInstance } from '../Guard/core/hooks/useMultipleAccounts';
|
|
3
4
|
import { ModuleState } from '../Guard/GuardModule/stateMachine';
|
|
4
5
|
import { ApplicationConfig } from '../Type/application';
|
|
5
6
|
import { GuardHttp } from './guardHttp';
|
|
@@ -18,6 +19,29 @@ export interface IGuardContext {
|
|
|
18
19
|
isAuthFlow: boolean;
|
|
19
20
|
contextLoaded: boolean;
|
|
20
21
|
guardPageConfig: Partial<GuardPageConfig>;
|
|
22
|
+
multipleInstance: {
|
|
23
|
+
/**
|
|
24
|
+
* 多账号相关
|
|
25
|
+
*/
|
|
26
|
+
isMultipleAccount: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* when: 多账号页面跳转进入登录页面
|
|
29
|
+
* 携带的回填数据信息
|
|
30
|
+
*/
|
|
31
|
+
multipleAccountData?: BackFillMultipleState;
|
|
32
|
+
/**
|
|
33
|
+
* 多账号 store 实例
|
|
34
|
+
*/
|
|
35
|
+
instance?: StoreInstance;
|
|
36
|
+
/**
|
|
37
|
+
* 切换多账号 isMultipleAccount 状态
|
|
38
|
+
*/
|
|
39
|
+
referMultipleState?: (type: 'login' | 'multiple') => void;
|
|
40
|
+
/**
|
|
41
|
+
* 清空回填数据
|
|
42
|
+
*/
|
|
43
|
+
clearBackFillData?: () => void;
|
|
44
|
+
};
|
|
21
45
|
}
|
|
22
46
|
export declare const createGuardXContext: () => {
|
|
23
47
|
Provider: React.FC<{
|
|
@@ -55,3 +79,61 @@ export declare const useGuardFinallyConfig: () => GuardLocalConfig;
|
|
|
55
79
|
export declare const useGuardContextLoaded: () => boolean;
|
|
56
80
|
export declare const useGuardIsAuthFlow: () => boolean;
|
|
57
81
|
export declare const useGuardPageConfig: () => Partial<GuardPageConfig>;
|
|
82
|
+
/**
|
|
83
|
+
* 多账号登录 store 实例
|
|
84
|
+
*/
|
|
85
|
+
export declare const useGuardMultipleInstance: () => {
|
|
86
|
+
/**
|
|
87
|
+
* 多账号相关
|
|
88
|
+
*/
|
|
89
|
+
isMultipleAccount: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* when: 多账号页面跳转进入登录页面
|
|
92
|
+
* 携带的回填数据信息
|
|
93
|
+
*/
|
|
94
|
+
multipleAccountData?: BackFillMultipleState | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* 多账号 store 实例
|
|
97
|
+
*/
|
|
98
|
+
instance?: {
|
|
99
|
+
initStore: (appId: string, options: {
|
|
100
|
+
serverSideLoginMethods: import("../Guard/core/hooks/useMultipleAccounts").LoginWay[];
|
|
101
|
+
isInternationSms: boolean;
|
|
102
|
+
}) => void;
|
|
103
|
+
setLoginWay: (tab: "input" | "qrcode", way: import("../Guard/core/hooks/useMultipleAccounts").LoginWay, id?: string | undefined, internation?: {
|
|
104
|
+
phoneCountryCode: string;
|
|
105
|
+
areaCode: string;
|
|
106
|
+
} | undefined) => void;
|
|
107
|
+
setUserInfo: (user: Pick<import("../Guard/core/hooks/useMultipleAccounts").User & {
|
|
108
|
+
id: string;
|
|
109
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
110
|
+
setLoginWayByHttpData: (account: string, data: {
|
|
111
|
+
username?: string | undefined;
|
|
112
|
+
phone?: string | undefined;
|
|
113
|
+
email?: string | undefined;
|
|
114
|
+
}) => void;
|
|
115
|
+
setLoginWayByLDAPData: (account: string, data: {
|
|
116
|
+
name?: string | undefined;
|
|
117
|
+
phone?: string | undefined;
|
|
118
|
+
email?: string | undefined;
|
|
119
|
+
}) => void;
|
|
120
|
+
getMemoUser: (excludeWays?: import("../Guard/core/hooks/useMultipleAccounts").LoginWay[]) => import("../Login/multipleAccounts/panel").SelectOptions[];
|
|
121
|
+
getMemoSingleUser: (id: string) => {
|
|
122
|
+
way: import("../Guard/core/hooks/useMultipleAccounts").LoginWay;
|
|
123
|
+
account: string;
|
|
124
|
+
} | undefined;
|
|
125
|
+
delUserById: (id: string) => string;
|
|
126
|
+
getMemberState: () => boolean;
|
|
127
|
+
getFirstBackFillData: () => BackFillMultipleState | undefined;
|
|
128
|
+
getOriginAccount: () => string;
|
|
129
|
+
getOriginWay: () => string;
|
|
130
|
+
} | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* 切换多账号 isMultipleAccount 状态
|
|
133
|
+
*/
|
|
134
|
+
referMultipleState?: ((type: 'login' | 'multiple') => void) | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* 清空回填数据
|
|
137
|
+
*/
|
|
138
|
+
clearBackFillData?: (() => void) | undefined;
|
|
139
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.0.0-beta.
|
|
1
|
+
declare const _default: "4.0.0-beta.5";
|
|
2
2
|
export default _default;
|