@authing/react-ui-components 4.2.3-alpha.0 → 4.2.3-alpha.10
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 +1 -1
- package/lib/index.min.js +1 -1
- package/package.json +1 -1
- package/types/AppOtpVerify/DownloadVerifier.d.ts +2 -0
- package/types/AppOtpVerify/LoginApp.d.ts +2 -0
- package/types/AppOtpVerify/ScanQrcode.d.ts +2 -0
- package/types/AppOtpVerify/Steps.d.ts +11 -0
- package/types/AppOtpVerify/index.d.ts +3 -0
- package/types/AuthClientProvider/AuthClientProvider.d.ts +4 -2
- package/types/Back/index.d.ts +3 -1
- package/types/BindTotp/businessRequest.d.ts +1 -1
- package/types/ChangePassword/businessRequest.d.ts +1 -1
- package/types/ChangePassword/index.d.ts +2 -1
- package/types/CompleteInfo/businessRequest.d.ts +2 -2
- package/types/CompleteInfo/interface.d.ts +2 -1
- package/types/ForgetPassword/InputPassword/index.d.ts +4 -0
- package/types/ForgetPassword/core/inputIdentify.d.ts +7 -0
- package/types/ForgetPassword/core/resetPassword.d.ts +5 -1
- package/types/ForgetPassword/interface.d.ts +1 -1
- package/types/Guard/GuardModule/stateMachine.d.ts +1 -1
- package/types/Guard/core/hooks/useAgreements.d.ts +15 -0
- package/types/Guard/core/hooks/useGuardView.d.ts +7 -0
- package/types/Guard/core/hooks/useMultipleAccounts.d.ts +5 -3
- package/types/Guard/core/renderContext.d.ts +2 -1
- package/types/Guard/core/renderModule.d.ts +1 -1
- package/types/Guard/event.d.ts +12 -1
- package/types/Guard/module.d.ts +7 -2
- package/types/GuardFace/index.d.ts +16 -0
- package/types/GuardSelect/index.d.ts +29 -0
- package/types/IdentityBinding/businessRequest.d.ts +2 -2
- package/types/ImagePro/index.d.ts +1 -0
- package/types/InputPassword/index.d.ts +2 -4
- package/types/LazyloadImage/index.d.ts +12 -0
- package/types/Login/core/withAuthingOtpPush/BeforeLogin.d.ts +17 -0
- package/types/Login/core/withAuthingOtpPush/PendingLogin.d.ts +7 -0
- package/types/Login/core/withAuthingOtpPush/index.d.ts +3 -0
- package/types/Login/core/withAuthingOtpPush/types.d.ts +18 -0
- package/types/Login/core/withPassword/FormItemAccount.d.ts +1 -2
- package/types/Login/core/withPassword/InputAccount.d.ts +2 -2
- package/types/Login/core/withPassword/index.d.ts +2 -2
- package/types/Login/hooks/useLoginMultiple.d.ts +2 -1
- package/types/Login/hooks/useOtpPushLogin.d.ts +10 -0
- package/types/Login/interface.d.ts +2 -2
- package/types/Login/multipleAccounts/panel.d.ts +1 -0
- package/types/MFA/businessRequest.d.ts +1 -1
- package/types/MFA/interface.d.ts +4 -1
- package/types/NewSubmitSuccess/index.d.ts +2 -0
- package/types/NewSubmitSuccess/interface.d.ts +17 -0
- package/types/Qrcode/UiQrCode.d.ts +1 -1
- package/types/RecoveryCode/businessRequest.d.ts +1 -1
- package/types/Register/core/WithEmail.d.ts +2 -0
- package/types/Register/interface.d.ts +2 -2
- package/types/SelectAccount/index.d.ts +3 -0
- package/types/TenantPortalSelect/index.d.ts +16 -0
- package/types/Type/application.d.ts +57 -8
- package/types/Type/index.d.ts +4 -4
- package/types/ValidatorRules/ValidatorFormItem.d.ts +3 -0
- package/types/ValidatorRules/index.d.ts +3 -2
- package/types/_utils/GuardErrorCode.d.ts +1 -1
- package/types/_utils/config/index.d.ts +4 -4
- package/types/_utils/context.d.ts +22 -4
- package/types/_utils/getCaptchaUrl.d.ts +1 -0
- package/types/_utils/hooks/index.d.ts +1 -1
- package/types/_utils/index.d.ts +10 -4
- package/types/_utils/logger/interface.d.ts +1 -1
- package/types/_utils/responseManagement/interface.d.ts +5 -3
- package/types/_utils/tenant.d.ts +19 -0
- package/types/index.d.ts +1 -0
- package/types/version/version.d.ts +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './styles.less';
|
|
3
|
+
/** 租户门户选择状态机返回数据类型 */
|
|
4
|
+
export interface TenantPortalSelectType {
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
logo: string;
|
|
8
|
+
list: {
|
|
9
|
+
tenantName: string;
|
|
10
|
+
tenantId: string;
|
|
11
|
+
tenantLogo: string;
|
|
12
|
+
host: string;
|
|
13
|
+
userName: string;
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
export declare const GuardTenantPortalSelectView: () => JSX.Element;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { Lang } from '..';
|
|
2
2
|
import { PasswordStrength } from '../_utils';
|
|
3
3
|
export * from 'authing-js-sdk';
|
|
4
|
-
export declare
|
|
4
|
+
export declare enum LoginMethods {
|
|
5
5
|
LDAP = "ldap",
|
|
6
6
|
AppQr = "app-qrcode",
|
|
7
7
|
Password = "password",
|
|
8
8
|
PhoneCode = "phone-code",
|
|
9
9
|
WxMinQr = "wechat-miniprogram-qrcode",
|
|
10
10
|
AD = "ad",
|
|
11
|
-
WechatMpQrcode = "wechatmp-qrcode"
|
|
11
|
+
WechatMpQrcode = "wechatmp-qrcode",
|
|
12
|
+
AuthingOtpPush = "authing-otp-push"
|
|
12
13
|
}
|
|
13
|
-
export declare
|
|
14
|
+
export declare enum OIDCConnectionMode {
|
|
14
15
|
FRONT_CHANNEL = "FRONT_CHANNEL",
|
|
15
16
|
BACK_CHANNEL = "BACK_CHANNEL"
|
|
16
17
|
}
|
|
17
|
-
export declare
|
|
18
|
+
export declare enum SocialConnectionProvider {
|
|
18
19
|
ALIPAY = "alipay",
|
|
19
20
|
GOOGLE = "google",
|
|
20
21
|
WECHATPC = "wechat:pc",
|
|
@@ -41,7 +42,7 @@ export declare const enum SocialConnectionProvider {
|
|
|
41
42
|
QINGCLOUD = "qingcloud",
|
|
42
43
|
FACEBOOK = "facebook"
|
|
43
44
|
}
|
|
44
|
-
export declare
|
|
45
|
+
export declare enum Protocol {
|
|
45
46
|
AD = "ad",
|
|
46
47
|
CAS = "cas",
|
|
47
48
|
LDAP = "ldap",
|
|
@@ -98,16 +99,22 @@ export interface SocialConnectionItem {
|
|
|
98
99
|
authorizationUrl: string;
|
|
99
100
|
tooltip: Record<Lang, string>;
|
|
100
101
|
}
|
|
101
|
-
export declare
|
|
102
|
+
export declare enum RegisterMethods {
|
|
102
103
|
Email = "email",
|
|
103
104
|
Phone = "phone",
|
|
104
105
|
EmailCode = "emailCode"
|
|
105
106
|
}
|
|
106
|
-
export declare
|
|
107
|
+
export declare enum RegisterSortMethods {
|
|
108
|
+
Email = "email-password",
|
|
109
|
+
Phone = "phone-code",
|
|
110
|
+
EmailCode = "email-code"
|
|
111
|
+
}
|
|
112
|
+
export interface QrCodeItem {
|
|
107
113
|
id: string;
|
|
108
114
|
title: string;
|
|
109
115
|
isDefault?: boolean;
|
|
110
|
-
}
|
|
116
|
+
}
|
|
117
|
+
export declare type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
|
|
111
118
|
export interface OidcClientMetadata {
|
|
112
119
|
grant_types: string[];
|
|
113
120
|
client_id: string;
|
|
@@ -145,9 +152,13 @@ export interface UserExtendsField {
|
|
|
145
152
|
export declare type ExtendsField = InternalExtendsField | UserExtendsField;
|
|
146
153
|
export interface ApplicationPasswordTabConfig {
|
|
147
154
|
enabledLoginMethods?: PasswordLoginMethods[];
|
|
155
|
+
validRegisterMethods?: string[];
|
|
156
|
+
validLoginMethods?: string[];
|
|
148
157
|
}
|
|
149
158
|
export interface ApplicationVerifyCodeTabConfig {
|
|
150
159
|
enabledLoginMethods: VerifyLoginMethods[];
|
|
160
|
+
validRegisterMethods?: string[];
|
|
161
|
+
validLoginMethods?: string[];
|
|
151
162
|
}
|
|
152
163
|
export interface Agreement {
|
|
153
164
|
id: number;
|
|
@@ -159,6 +170,14 @@ export interface Agreement {
|
|
|
159
170
|
export declare type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
|
|
160
171
|
export declare type VerifyLoginMethods = 'email-code' | 'phone-code';
|
|
161
172
|
export declare type ComplateFiledsPlace = 'register' | 'login';
|
|
173
|
+
export interface TabFieldsI18nItem {
|
|
174
|
+
key: string;
|
|
175
|
+
label: string;
|
|
176
|
+
labelEn: string;
|
|
177
|
+
i18n: {
|
|
178
|
+
[propName in Lang]?: string;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
162
181
|
export interface ApplicationConfig {
|
|
163
182
|
id: string;
|
|
164
183
|
allowedOrigins: string[];
|
|
@@ -198,6 +217,9 @@ export interface ApplicationConfig {
|
|
|
198
217
|
};
|
|
199
218
|
};
|
|
200
219
|
qrcodeTabsSettings: QrcodeTabsSettings;
|
|
220
|
+
qrCodeSortConfig: {
|
|
221
|
+
loginMethodsSort?: string[];
|
|
222
|
+
};
|
|
201
223
|
loginTabs: {
|
|
202
224
|
list: string[];
|
|
203
225
|
default: string;
|
|
@@ -264,4 +286,31 @@ export interface ApplicationConfig {
|
|
|
264
286
|
* 是否开启注册密码补全
|
|
265
287
|
*/
|
|
266
288
|
enableCompletePassword: boolean;
|
|
289
|
+
/**
|
|
290
|
+
* 登录注册排序
|
|
291
|
+
*/
|
|
292
|
+
tabMethodsSortConfig: {
|
|
293
|
+
loginMethodsSort: string[];
|
|
294
|
+
};
|
|
295
|
+
tabMethodsFields: TabFieldsI18nItem[];
|
|
296
|
+
regexRules?: {
|
|
297
|
+
key: string;
|
|
298
|
+
appLevel: string;
|
|
299
|
+
userpoolLevel: string;
|
|
300
|
+
}[];
|
|
301
|
+
/** 是否为租户控制台应用 */
|
|
302
|
+
isTenantConsole?: boolean;
|
|
303
|
+
/** 是否默认为租户应用面板应用 */
|
|
304
|
+
isTenantDefault?: boolean;
|
|
305
|
+
/** 租户详情 */
|
|
306
|
+
tenantInfo?: Record<string, any>;
|
|
307
|
+
/** mfa 相关 */
|
|
308
|
+
mfa: {
|
|
309
|
+
faceScore: number;
|
|
310
|
+
};
|
|
311
|
+
authingOtpPushTabConfig: {
|
|
312
|
+
enabledLoginMethods: Array<string> | null;
|
|
313
|
+
validLoginMethods: Array<string> | null;
|
|
314
|
+
validRegisterMethods: Array<string> | null;
|
|
315
|
+
};
|
|
267
316
|
}
|
package/types/Type/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ApplicationConfig } from './application';
|
|
|
5
5
|
export * from './application';
|
|
6
6
|
export type { CommonMessage, User };
|
|
7
7
|
export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
|
|
8
|
-
export declare
|
|
8
|
+
export declare enum GuardMode {
|
|
9
9
|
Modal = "modal",
|
|
10
10
|
Normal = "normal"
|
|
11
11
|
}
|
|
@@ -55,11 +55,11 @@ export interface IG2Events {
|
|
|
55
55
|
}
|
|
56
56
|
export declare const getDefaultG2Config: () => IG2Config;
|
|
57
57
|
export declare const LanguageMap: any;
|
|
58
|
-
export declare
|
|
58
|
+
export declare enum InputMethod {
|
|
59
59
|
EmailCode = "email-code",
|
|
60
60
|
PhoneCode = "phone-code"
|
|
61
61
|
}
|
|
62
|
-
export declare
|
|
62
|
+
export declare enum GuardPageSene {
|
|
63
63
|
Global = "global"
|
|
64
64
|
}
|
|
65
65
|
export interface GuardPageConfig {
|
|
@@ -68,7 +68,7 @@ export interface GuardPageConfig {
|
|
|
68
68
|
defaultLanguage: Lang | 'browser';
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
export declare
|
|
71
|
+
export declare enum EmailScene {
|
|
72
72
|
WELCOME_EMAIL = "WELCOME_EMAIL",
|
|
73
73
|
FIRST_CREATED_USER = "FIRST_CREATED_USER",
|
|
74
74
|
REGISTER_VERIFY_CODE = "REGISTER_VERIFY_CODE",
|
|
@@ -3,3 +3,6 @@ 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 & {
|
|
7
|
+
method: string;
|
|
8
|
+
}>;
|
|
@@ -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 } from './ValidatorFormItem';
|
|
4
|
+
import { EmailFormItem, PhoneFormItem, UserNameFormItem, CustomNameFormItem } from './ValidatorFormItem';
|
|
5
5
|
export interface ValidatorFormItemProps extends FormItemProps {
|
|
6
6
|
form?: FormInstance;
|
|
7
7
|
checkRepeat?: boolean;
|
|
@@ -13,7 +13,7 @@ export interface ValidatorFormItemProps extends FormItemProps {
|
|
|
13
13
|
isCheckPattern?: boolean;
|
|
14
14
|
}
|
|
15
15
|
export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
|
|
16
|
-
method: 'email' | 'phone' | 'username';
|
|
16
|
+
method: 'email' | 'phone' | 'username' | string;
|
|
17
17
|
}
|
|
18
18
|
export interface PasswordFormItemProps extends FormItemProps {
|
|
19
19
|
}
|
|
@@ -26,6 +26,7 @@ interface FormItemInterface extends InternalFormItemType {
|
|
|
26
26
|
Email: typeof EmailFormItem;
|
|
27
27
|
Phone: typeof PhoneFormItem;
|
|
28
28
|
UserName: typeof UserNameFormItem;
|
|
29
|
+
CustomName: typeof CustomNameFormItem;
|
|
29
30
|
}
|
|
30
31
|
declare const CustomFormItem: FormItemInterface;
|
|
31
32
|
export default CustomFormItem;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { GuardLocalConfig } from '../../Guard/config';
|
|
3
3
|
import { GuardHttp } from '../guardHttp';
|
|
4
4
|
import { GuardPageConfig } from '../../Type';
|
|
5
|
-
import { ApplicationConfig, LoginMethods
|
|
5
|
+
import { ApplicationConfig, LoginMethods } 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;
|
|
@@ -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?: string[] | undefined;
|
|
30
|
+
defaultRegisterMethod?: string | undefined;
|
|
31
31
|
publicKey?: string | undefined;
|
|
32
32
|
agreementEnabled?: boolean | undefined;
|
|
33
33
|
agreements?: import("../../Type").Agreement[] | undefined;
|
|
@@ -50,7 +50,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
50
50
|
disableResetPwd?: boolean | undefined;
|
|
51
51
|
defaultLoginMethod?: LoginMethods | undefined;
|
|
52
52
|
loginMethods?: LoginMethods[] | undefined;
|
|
53
|
-
passwordLoginMethods?:
|
|
53
|
+
passwordLoginMethods?: string[] | undefined;
|
|
54
54
|
socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
|
|
55
55
|
socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
|
|
56
56
|
enterpriseConnections?: string[] | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig } from '..';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig, Lang } from '..';
|
|
3
3
|
import { BackFillMultipleState, StoreInstance } from '../Guard/core/hooks/useMultipleAccounts';
|
|
4
4
|
import { ModuleState } from '../Guard/GuardModule/stateMachine';
|
|
5
5
|
import { ApplicationConfig } from '../Type/application';
|
|
6
6
|
import { GuardHttp } from './guardHttp';
|
|
7
|
+
import { MultipleTenant } from './tenant';
|
|
7
8
|
export interface IGuardContext {
|
|
8
9
|
finallyConfig: GuardLocalConfig;
|
|
9
10
|
defaultMergedConfig: GuardLocalConfig;
|
|
@@ -42,16 +43,22 @@ export interface IGuardContext {
|
|
|
42
43
|
*/
|
|
43
44
|
clearBackFillData?: () => void;
|
|
44
45
|
};
|
|
46
|
+
phoneRegex: RegExp | null;
|
|
47
|
+
defaultLanguageConfig: Lang;
|
|
48
|
+
/** 租户信息获取和操作处理相关 */
|
|
49
|
+
tenantInstance?: MultipleTenant;
|
|
45
50
|
}
|
|
46
51
|
export declare const createGuardXContext: () => {
|
|
47
52
|
Provider: React.FC<{
|
|
48
53
|
value: Partial<IGuardContext>;
|
|
54
|
+
children: ReactNode;
|
|
49
55
|
}>;
|
|
50
56
|
Consumer: React.Consumer<IGuardContext>;
|
|
51
57
|
};
|
|
52
58
|
export declare const useGuardXContext: () => {
|
|
53
59
|
Provider: React.FC<{
|
|
54
60
|
value: Partial<IGuardContext>;
|
|
61
|
+
children: ReactNode;
|
|
55
62
|
}>;
|
|
56
63
|
Consumer: React.Consumer<IGuardContext>;
|
|
57
64
|
};
|
|
@@ -60,7 +67,9 @@ export interface IGuardContextProvider {
|
|
|
60
67
|
spinChange: (spin: boolean) => void;
|
|
61
68
|
}
|
|
62
69
|
export declare const useGuardButtonContext: () => {
|
|
63
|
-
GuardButtonProvider: React.FC<{
|
|
70
|
+
GuardButtonProvider: React.FC<{
|
|
71
|
+
children: ReactNode;
|
|
72
|
+
}>;
|
|
64
73
|
};
|
|
65
74
|
export declare const useGuardButtonState: () => IGuardContextProvider;
|
|
66
75
|
export declare const useGuardPublicConfig: () => ApplicationConfig;
|
|
@@ -74,6 +83,7 @@ export declare const useGuardEvents: () => Partial<GuardEvents>;
|
|
|
74
83
|
export declare const useGuardModule: () => {
|
|
75
84
|
changeModule: ((moduleName: GuardModuleType, initData?: any) => Promise<void>) | undefined;
|
|
76
85
|
backModule: (() => void) | undefined;
|
|
86
|
+
currentModule: ModuleState;
|
|
77
87
|
};
|
|
78
88
|
export declare const useGuardFinallyConfig: () => GuardLocalConfig;
|
|
79
89
|
export declare const useGuardContextLoaded: () => boolean;
|
|
@@ -106,7 +116,8 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
106
116
|
} | undefined) => void;
|
|
107
117
|
setUserInfo: (user: Pick<import("../Guard/core/hooks/useMultipleAccounts").User & {
|
|
108
118
|
id: string;
|
|
109
|
-
|
|
119
|
+
loginAccount?: string | undefined;
|
|
120
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "qrCodeId" | "areaCode" | "_updateTime" | "loginAccount">) => void;
|
|
110
121
|
setLoginWayByHttpData: (account: string, data: {
|
|
111
122
|
username?: string | undefined;
|
|
112
123
|
phone?: string | undefined;
|
|
@@ -137,3 +148,10 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
137
148
|
*/
|
|
138
149
|
clearBackFillData?: (() => void) | undefined;
|
|
139
150
|
};
|
|
151
|
+
export declare const useGuardPhoneRegex: () => RegExp | null;
|
|
152
|
+
/**
|
|
153
|
+
* 默认语言
|
|
154
|
+
*/
|
|
155
|
+
export declare const useGuardDefaultLanguage: () => Lang;
|
|
156
|
+
/** 用来操作和获取租户相关的内容 */
|
|
157
|
+
export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCaptchaUrl: (host: string) => string;
|
|
@@ -28,7 +28,7 @@ export declare const parsePhone: (isInternationSms: boolean, fieldValue: string,
|
|
|
28
28
|
countryCode: string | undefined;
|
|
29
29
|
phoneNumber: string;
|
|
30
30
|
};
|
|
31
|
-
export declare
|
|
31
|
+
export declare enum SocialConnectionEvent {
|
|
32
32
|
Message = "message",
|
|
33
33
|
Auth = "auth"
|
|
34
34
|
}
|
package/types/_utils/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Rule } from 'antd/lib/form';
|
|
|
2
2
|
import qs from 'qs';
|
|
3
3
|
import { User } from 'authing-js-sdk';
|
|
4
4
|
import { GuardProps } from '../Guard';
|
|
5
|
-
import { ApplicationConfig, ComplateFiledsPlace, LoginMethods, RegisterMethods } from '../Type/application';
|
|
5
|
+
import { ApplicationConfig, ComplateFiledsPlace, LoginMethods, RegisterMethods, RegisterSortMethods, TabFieldsI18nItem } from '../Type/application';
|
|
6
6
|
import { Lang } from '../Type';
|
|
7
7
|
export * from './popupCenter';
|
|
8
8
|
export * from './clipboard';
|
|
@@ -34,7 +34,7 @@ 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 指定上传的用户自定义字段
|
|
@@ -60,7 +60,7 @@ export declare const isMobile: () => RegExpMatchArray | null;
|
|
|
60
60
|
export declare const isSpecialBrowser: () => boolean;
|
|
61
61
|
export declare const assembledAppHost: (identifier: string, host: string) => string;
|
|
62
62
|
export declare const assembledRequestHost: (requestHostname: string, configHost: string) => string;
|
|
63
|
-
export declare
|
|
63
|
+
export declare enum PasswordStrength {
|
|
64
64
|
NoCheck = 0,
|
|
65
65
|
Low = 1,
|
|
66
66
|
Middle = 2,
|
|
@@ -73,9 +73,11 @@ export declare const PASSWORD_STRENGTH_TEXT_MAP: Record<PasswordStrength, {
|
|
|
73
73
|
}>;
|
|
74
74
|
export declare const getSymbolTypeLength: (pwd: string) => number;
|
|
75
75
|
export declare const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string | undefined) => Rule[];
|
|
76
|
+
export declare const getPasswordValidateRules: (strength?: PasswordStrength, customPasswordStrength?: any, customValidateTrigger?: string | undefined, fieldRequiredRuleMessage?: string | undefined) => Rule[];
|
|
76
77
|
export declare const sleep: (delay: number) => Promise<unknown>;
|
|
77
78
|
export declare const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean | undefined) => boolean;
|
|
78
|
-
export declare const
|
|
79
|
+
export declare const transformMethod: (method: RegisterMethods | string) => string;
|
|
80
|
+
export declare const transformSortMethod: (method: RegisterSortMethods | string) => string;
|
|
79
81
|
export declare const mailDesensitization: (mail: string) => string;
|
|
80
82
|
export declare const phoneDesensitization: (phone: string) => string;
|
|
81
83
|
export declare const getHundreds: (num: number) => number;
|
|
@@ -90,3 +92,7 @@ export declare const getLoginTypePipe: (publicConfig: ApplicationConfig, registe
|
|
|
90
92
|
} | undefined;
|
|
91
93
|
export declare const getPasswordIdentify: (identity: string) => string;
|
|
92
94
|
export declare const getCurrentLng: () => Lang;
|
|
95
|
+
export declare const regexFromString: (string: string) => RegExp | null;
|
|
96
|
+
export declare const getI18nLabel: (method: string | RegisterSortMethods, i18nFields: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
|
|
97
|
+
export declare const getSortLabels: (methods: string[], i18nConfig: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
|
|
98
|
+
export declare const getSortTabs: (tabs: string[], tab?: string | undefined) => string[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { GuardModuleType } from '../../Guard';
|
|
2
|
-
export declare
|
|
2
|
+
export declare enum CodeAction {
|
|
3
3
|
CHANGE_MODULE = "changeModule",
|
|
4
4
|
RENDER_MESSAGE = "renderMessage",
|
|
5
5
|
FLOW_END = "flowEnd"
|
|
6
6
|
}
|
|
7
|
-
export declare
|
|
7
|
+
export declare enum ApiCode {
|
|
8
8
|
IDENTITY_BINDING_ASK = 1641,
|
|
9
9
|
IDENTITY_BINDING = 1640,
|
|
10
10
|
APP_MFA = 1636,
|
|
@@ -16,6 +16,8 @@ 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,
|
|
21
|
+
TENANT_PORTAL = 1644
|
|
20
22
|
}
|
|
21
23
|
export declare const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ApplicationConfig } from '../Type';
|
|
2
|
+
/** **当前租户应用** 下的租户信息获取和操作处理,将租户相关的处理收拢 */
|
|
3
|
+
export declare class MultipleTenant {
|
|
4
|
+
private $config;
|
|
5
|
+
private $tenantId;
|
|
6
|
+
constructor(tenantId: string, config: ApplicationConfig);
|
|
7
|
+
/** 获取租户ID */
|
|
8
|
+
getCurrentTenantId: () => string | null;
|
|
9
|
+
/** 获取租户详情 */
|
|
10
|
+
getCurrentTenantInfo: () => Record<string, any> | undefined;
|
|
11
|
+
/**是否为【租户控制台】 */
|
|
12
|
+
isTenantConsole: () => boolean | undefined;
|
|
13
|
+
/** 是否为租户【单点登录】 */
|
|
14
|
+
isTenantSSO: () => boolean | "" | null;
|
|
15
|
+
/** 是否为租户【单点登录面板】 */
|
|
16
|
+
isTenantSSOLaunchPad: () => boolean | "" | null;
|
|
17
|
+
}
|
|
18
|
+
/** 初始化多租户实例 */
|
|
19
|
+
export declare const useMultipleTenant: (tenantId: string, publicConfig: ApplicationConfig) => MultipleTenant | undefined;
|
package/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.
|
|
1
|
+
declare const _default: "4.2.3-alpha.9";
|
|
2
2
|
export default _default;
|