@authing/react18-ui-components 4.1.0 → 4.2.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 +78 -59
- package/package.json +1 -1
- package/types/BindTotp/businessRequest.d.ts +1 -1
- package/types/ChangePassword/businessRequest.d.ts +1 -1
- package/types/CompleteInfo/businessRequest.d.ts +2 -2
- package/types/CompleteInfo/interface.d.ts +3 -2
- package/types/ForgetPassword/InputPassword/index.d.ts +3 -0
- package/types/ForgetPassword/core/inputIdentify.d.ts +7 -0
- package/types/ForgetPassword/core/resetPassword.d.ts +5 -1
- package/types/Guard/GuardModule/stateMachine.d.ts +2 -2
- package/types/Guard/core/hooks/useMultipleAccounts.d.ts +4 -2
- package/types/Guard/core/renderModule.d.ts +1 -1
- package/types/Guard/module.d.ts +6 -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/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 +1 -0
- package/types/Login/interface.d.ts +2 -2
- 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/Qrcode/WorkQrCode.d.ts +1 -1
- package/types/Qrcode/hooks/usePreQrCode.d.ts +2 -2
- package/types/Qrcode/index.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 +2 -0
- package/types/TenantPortalSelect/index.d.ts +15 -0
- package/types/Type/application.d.ts +49 -11
- package/types/Type/index.d.ts +5 -5
- package/types/ValidatorRules/ValidatorFormItem.d.ts +3 -0
- package/types/ValidatorRules/index.d.ts +4 -3
- package/types/_utils/GuardErrorCode.d.ts +1 -1
- package/types/_utils/config/index.d.ts +4 -4
- package/types/_utils/context.d.ts +12 -1
- package/types/_utils/hooks/index.d.ts +1 -1
- package/types/_utils/index.d.ts +9 -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/version/version.d.ts +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './styles.less';
|
|
2
|
+
/** 租户门户选择状态机返回数据类型 */
|
|
3
|
+
export interface TenantPortalSelectType {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
logo: string;
|
|
7
|
+
list: {
|
|
8
|
+
tenantName: string;
|
|
9
|
+
tenantId: string;
|
|
10
|
+
tenantLogo: string;
|
|
11
|
+
host: string;
|
|
12
|
+
userName: string;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
export declare const GuardTenantPortalSelectView: () => JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
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",
|
|
@@ -10,11 +10,11 @@ export declare const enum LoginMethods {
|
|
|
10
10
|
AD = "ad",
|
|
11
11
|
WechatMpQrcode = "wechatmp-qrcode"
|
|
12
12
|
}
|
|
13
|
-
export declare
|
|
13
|
+
export declare enum OIDCConnectionMode {
|
|
14
14
|
FRONT_CHANNEL = "FRONT_CHANNEL",
|
|
15
15
|
BACK_CHANNEL = "BACK_CHANNEL"
|
|
16
16
|
}
|
|
17
|
-
export declare
|
|
17
|
+
export declare enum SocialConnectionProvider {
|
|
18
18
|
ALIPAY = "alipay",
|
|
19
19
|
GOOGLE = "google",
|
|
20
20
|
WECHATPC = "wechat:pc",
|
|
@@ -41,7 +41,7 @@ export declare const enum SocialConnectionProvider {
|
|
|
41
41
|
QINGCLOUD = "qingcloud",
|
|
42
42
|
FACEBOOK = "facebook"
|
|
43
43
|
}
|
|
44
|
-
export declare
|
|
44
|
+
export declare enum Protocol {
|
|
45
45
|
AD = "ad",
|
|
46
46
|
CAS = "cas",
|
|
47
47
|
LDAP = "ldap",
|
|
@@ -98,16 +98,22 @@ export interface SocialConnectionItem {
|
|
|
98
98
|
authorizationUrl: string;
|
|
99
99
|
tooltip: Record<Lang, string>;
|
|
100
100
|
}
|
|
101
|
-
export declare
|
|
101
|
+
export declare enum RegisterMethods {
|
|
102
102
|
Email = "email",
|
|
103
103
|
Phone = "phone",
|
|
104
104
|
EmailCode = "emailCode"
|
|
105
105
|
}
|
|
106
|
-
export declare
|
|
106
|
+
export declare enum RegisterSortMethods {
|
|
107
|
+
Email = "email-password",
|
|
108
|
+
Phone = "phone-code",
|
|
109
|
+
EmailCode = "email-code"
|
|
110
|
+
}
|
|
111
|
+
export interface QrCodeItem {
|
|
107
112
|
id: string;
|
|
108
113
|
title: string;
|
|
109
114
|
isDefault?: boolean;
|
|
110
|
-
}
|
|
115
|
+
}
|
|
116
|
+
export type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
|
|
111
117
|
export interface OidcClientMetadata {
|
|
112
118
|
grant_types: string[];
|
|
113
119
|
client_id: string;
|
|
@@ -142,12 +148,16 @@ export interface UserExtendsField {
|
|
|
142
148
|
required: boolean;
|
|
143
149
|
validateRules: any[];
|
|
144
150
|
}
|
|
145
|
-
export
|
|
151
|
+
export type ExtendsField = InternalExtendsField | UserExtendsField;
|
|
146
152
|
export interface ApplicationPasswordTabConfig {
|
|
147
153
|
enabledLoginMethods?: PasswordLoginMethods[];
|
|
154
|
+
validRegisterMethods?: string[];
|
|
155
|
+
validLoginMethods?: string[];
|
|
148
156
|
}
|
|
149
157
|
export interface ApplicationVerifyCodeTabConfig {
|
|
150
158
|
enabledLoginMethods: VerifyLoginMethods[];
|
|
159
|
+
validRegisterMethods?: string[];
|
|
160
|
+
validLoginMethods?: string[];
|
|
151
161
|
}
|
|
152
162
|
export interface Agreement {
|
|
153
163
|
id: number;
|
|
@@ -156,9 +166,17 @@ export interface Agreement {
|
|
|
156
166
|
lang: Lang;
|
|
157
167
|
availableAt?: number;
|
|
158
168
|
}
|
|
159
|
-
export
|
|
160
|
-
export
|
|
161
|
-
export
|
|
169
|
+
export type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
|
|
170
|
+
export type VerifyLoginMethods = 'email-code' | 'phone-code';
|
|
171
|
+
export type ComplateFiledsPlace = 'register' | 'login';
|
|
172
|
+
export interface TabFieldsI18nItem {
|
|
173
|
+
key: string;
|
|
174
|
+
label: string;
|
|
175
|
+
labelEn: string;
|
|
176
|
+
i18n: {
|
|
177
|
+
[propName in Lang]?: string;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
162
180
|
export interface ApplicationConfig {
|
|
163
181
|
id: string;
|
|
164
182
|
allowedOrigins: string[];
|
|
@@ -198,6 +216,9 @@ export interface ApplicationConfig {
|
|
|
198
216
|
};
|
|
199
217
|
};
|
|
200
218
|
qrcodeTabsSettings: QrcodeTabsSettings;
|
|
219
|
+
qrCodeSortConfig: {
|
|
220
|
+
loginMethodsSort?: string[];
|
|
221
|
+
};
|
|
201
222
|
loginTabs: {
|
|
202
223
|
list: string[];
|
|
203
224
|
default: string;
|
|
@@ -264,4 +285,21 @@ export interface ApplicationConfig {
|
|
|
264
285
|
* 是否开启注册密码补全
|
|
265
286
|
*/
|
|
266
287
|
enableCompletePassword: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* 登录注册排序
|
|
290
|
+
*/
|
|
291
|
+
tabMethodsSortConfig: {
|
|
292
|
+
loginMethodsSort: string[];
|
|
293
|
+
};
|
|
294
|
+
tabMethodsFields: TabFieldsI18nItem[];
|
|
295
|
+
/** 是否为租户控制台应用 */
|
|
296
|
+
isTenantConsole?: boolean;
|
|
297
|
+
/** 是否默认为租户应用面板应用 */
|
|
298
|
+
isTenantDefault?: boolean;
|
|
299
|
+
/** 租户详情 */
|
|
300
|
+
tenantInfo?: Record<string, any>;
|
|
301
|
+
/** mfa 相关 */
|
|
302
|
+
mfa: {
|
|
303
|
+
faceScore: number;
|
|
304
|
+
};
|
|
267
305
|
}
|
package/types/Type/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { FacePlugin } from '../_utils/facePlugin/interface';
|
|
|
4
4
|
import { ApplicationConfig } from './application';
|
|
5
5
|
export * from './application';
|
|
6
6
|
export type { CommonMessage, User };
|
|
7
|
-
export
|
|
8
|
-
export declare
|
|
7
|
+
export type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
|
|
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,19 +13,20 @@ 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
|
}
|
|
20
20
|
export interface ICheckProps {
|
|
21
21
|
check: (values: any) => void;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
type InternalFormItemType = typeof FormItem;
|
|
24
24
|
interface FormItemInterface extends InternalFormItemType {
|
|
25
25
|
Password: typeof PasswordFormItem;
|
|
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
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig } from '..';
|
|
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,6 +43,9 @@ export interface IGuardContext {
|
|
|
42
43
|
*/
|
|
43
44
|
clearBackFillData?: () => void;
|
|
44
45
|
};
|
|
46
|
+
defaultLanguageConfig: Lang;
|
|
47
|
+
/** 租户信息获取和操作处理相关 */
|
|
48
|
+
tenantInstance?: MultipleTenant;
|
|
45
49
|
}
|
|
46
50
|
export declare const createGuardXContext: () => {
|
|
47
51
|
Provider: React.FC<{
|
|
@@ -110,6 +114,7 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
110
114
|
} | undefined) => void;
|
|
111
115
|
setUserInfo: (user: Omit<import("../Guard/core/hooks/useMultipleAccounts").User & {
|
|
112
116
|
id: string;
|
|
117
|
+
loginAccount?: string | undefined;
|
|
113
118
|
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
114
119
|
setLoginWayByHttpData: (account: string, data: {
|
|
115
120
|
username?: string | undefined;
|
|
@@ -141,3 +146,9 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
141
146
|
*/
|
|
142
147
|
clearBackFillData?: (() => void) | undefined;
|
|
143
148
|
};
|
|
149
|
+
/**
|
|
150
|
+
* 默认语言
|
|
151
|
+
*/
|
|
152
|
+
export declare const useGuardDefaultLanguage: () => Lang;
|
|
153
|
+
/** 用来操作和获取租户相关的内容 */
|
|
154
|
+
export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
|
|
@@ -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';
|
|
@@ -17,7 +17,7 @@ export declare const validate: (type: keyof typeof VALIDATE_PATTERN, val: string
|
|
|
17
17
|
export declare const getRequiredRules: (msg: string) => Rule[];
|
|
18
18
|
export declare const fieldRequiredRule: (fieldRequiredRule: string, fieldRequiredRuleMessage?: string) => Rule[];
|
|
19
19
|
export declare function getDeviceName(): string | null | undefined;
|
|
20
|
-
export
|
|
20
|
+
export type STYLE_RECORD_KEY = 'appConfig' | 'userConfig';
|
|
21
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;
|
|
@@ -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) => Rule[];
|
|
76
|
+
export declare const getPasswordValidateRules: (strength?: PasswordStrength, customPasswordStrength?: any, customValidateTrigger?: string, fieldRequiredRuleMessage?: string) => 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) => 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,6 @@ 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 getI18nLabel: (method: string | RegisterSortMethods, i18nFields: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
|
|
96
|
+
export declare const getSortLabels: (methods: string[], i18nConfig: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
|
|
97
|
+
export declare const getSortTabs: (tabs: string[], tab?: string) => 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;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.
|
|
1
|
+
declare const _default: "4.2.0";
|
|
2
2
|
export default _default;
|