@authing/react-ui-components 4.2.2-alpha.0 → 4.2.3-alpha.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/package.json +1 -1
- package/types/AuthClientProvider/AuthClientProvider.d.ts +2 -4
- package/types/Back/index.d.ts +1 -3
- package/types/BindTotp/businessRequest.d.ts +1 -1
- package/types/ChangePassword/businessRequest.d.ts +1 -1
- package/types/ChangePassword/index.d.ts +1 -2
- package/types/CompleteInfo/businessRequest.d.ts +2 -2
- package/types/CompleteInfo/interface.d.ts +1 -2
- package/types/ForgetPassword/core/resetPassword.d.ts +1 -5
- package/types/ForgetPassword/interface.d.ts +1 -1
- package/types/Guard/GuardModule/stateMachine.d.ts +1 -1
- package/types/Guard/core/hooks/useMultipleAccounts.d.ts +2 -4
- package/types/Guard/core/renderContext.d.ts +1 -2
- package/types/Guard/core/renderModule.d.ts +1 -1
- package/types/Guard/event.d.ts +1 -2
- package/types/Guard/module.d.ts +2 -6
- package/types/IdentityBinding/businessRequest.d.ts +2 -2
- package/types/ImagePro/index.d.ts +0 -1
- package/types/InputPassword/index.d.ts +4 -2
- package/types/Login/core/withPassword/FormItemAccount.d.ts +2 -1
- 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 -2
- package/types/Login/interface.d.ts +2 -2
- package/types/MFA/businessRequest.d.ts +1 -1
- package/types/MFA/interface.d.ts +1 -4
- package/types/Qrcode/UiQrCode.d.ts +1 -1
- package/types/RecoveryCode/businessRequest.d.ts +1 -1
- package/types/Register/core/WithEmail.d.ts +0 -2
- package/types/Register/interface.d.ts +2 -2
- package/types/Type/application.d.ts +7 -50
- package/types/Type/index.d.ts +4 -4
- package/types/ValidatorRules/ValidatorFormItem.d.ts +0 -3
- package/types/ValidatorRules/index.d.ts +2 -3
- package/types/_utils/GuardErrorCode.d.ts +1 -1
- package/types/_utils/config/index.d.ts +4 -4
- package/types/_utils/context.d.ts +4 -21
- package/types/_utils/hooks/index.d.ts +1 -1
- package/types/_utils/index.d.ts +5 -11
- package/types/_utils/logger/interface.d.ts +1 -1
- package/types/_utils/responseManagement/interface.d.ts +3 -5
- package/types/version/version.d.ts +1 -1
- package/types/ForgetPassword/InputPassword/index.d.ts +0 -4
- package/types/ForgetPassword/core/inputIdentify.d.ts +0 -7
- package/types/GuardFace/index.d.ts +0 -16
- package/types/GuardSelect/index.d.ts +0 -29
- package/types/NewSubmitSuccess/index.d.ts +0 -2
- package/types/NewSubmitSuccess/interface.d.ts +0 -17
- package/types/SelectAccount/index.d.ts +0 -3
- package/types/TenantPortalSelect/index.d.ts +0 -16
- package/types/_utils/getCaptchaUrl.d.ts +0 -1
- package/types/_utils/tenant.d.ts +0 -19
|
@@ -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 enum SocialConnectionEvent {
|
|
31
|
+
export declare const 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
|
|
5
|
+
import { ApplicationConfig, ComplateFiledsPlace, LoginMethods, RegisterMethods } from '../Type/application';
|
|
6
6
|
import { Lang } from '../Type';
|
|
7
7
|
export * from './popupCenter';
|
|
8
8
|
export * from './clipboard';
|
|
@@ -27,14 +27,14 @@ export declare const getClassnames: (classnames: (string | boolean | undefined)[
|
|
|
27
27
|
* @param item
|
|
28
28
|
* @returns {boolean}
|
|
29
29
|
*/
|
|
30
|
-
export declare function isObject(item: any):
|
|
30
|
+
export declare function isObject(item: any): any;
|
|
31
31
|
/**
|
|
32
32
|
* https://www.itranslater.com/qa/details/2115518846294557696
|
|
33
33
|
* Deep merge two objects.
|
|
34
34
|
* @param target
|
|
35
35
|
* @param ...sources
|
|
36
36
|
*/
|
|
37
|
-
export declare function deepMerge<T extends
|
|
37
|
+
export declare function deepMerge<T extends any = 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 enum PasswordStrength {
|
|
63
|
+
export declare const enum PasswordStrength {
|
|
64
64
|
NoCheck = 0,
|
|
65
65
|
Low = 1,
|
|
66
66
|
Middle = 2,
|
|
@@ -73,11 +73,9 @@ 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[];
|
|
77
76
|
export declare const sleep: (delay: number) => Promise<unknown>;
|
|
78
77
|
export declare const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean | undefined) => boolean;
|
|
79
|
-
export declare const
|
|
80
|
-
export declare const transformSortMethod: (method: RegisterSortMethods | string) => string;
|
|
78
|
+
export declare const tabSort: (defaultValue: any, tabList: RegisterMethods[]) => RegisterMethods[];
|
|
81
79
|
export declare const mailDesensitization: (mail: string) => string;
|
|
82
80
|
export declare const phoneDesensitization: (phone: string) => string;
|
|
83
81
|
export declare const getHundreds: (num: number) => number;
|
|
@@ -92,7 +90,3 @@ export declare const getLoginTypePipe: (publicConfig: ApplicationConfig, registe
|
|
|
92
90
|
} | undefined;
|
|
93
91
|
export declare const getPasswordIdentify: (identity: string) => string;
|
|
94
92
|
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 enum CodeAction {
|
|
2
|
+
export declare const enum CodeAction {
|
|
3
3
|
CHANGE_MODULE = "changeModule",
|
|
4
4
|
RENDER_MESSAGE = "renderMessage",
|
|
5
5
|
FLOW_END = "flowEnd"
|
|
6
6
|
}
|
|
7
|
-
export declare enum ApiCode {
|
|
7
|
+
export declare const enum ApiCode {
|
|
8
8
|
IDENTITY_BINDING_ASK = 1641,
|
|
9
9
|
IDENTITY_BINDING = 1640,
|
|
10
10
|
APP_MFA = 1636,
|
|
@@ -16,8 +16,6 @@ export declare 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
|
|
20
|
-
FLOW_SELECT_ACCOUNT = 2921,
|
|
21
|
-
TENANT_PORTAL = 1644
|
|
19
|
+
UNSAFE_PASSWORD_RESET = 2071
|
|
22
20
|
}
|
|
23
21
|
export declare const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.
|
|
1
|
+
declare const _default: "4.0.9";
|
|
2
2
|
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { InputProps } from 'antd/lib/input';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { VerifyLoginMethods } from '../../Type/application';
|
|
4
|
-
export interface InputIdentifyProps extends InputProps {
|
|
5
|
-
methods: VerifyLoginMethods[];
|
|
6
|
-
}
|
|
7
|
-
export declare const InputIdentify: React.FC<InputIdentifyProps>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import './styles.less';
|
|
2
|
-
import { AvatarProps } from 'antd/lib/avatar';
|
|
3
|
-
import { TagProps } from 'antd/lib/tag';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
export interface GuardFaceProps {
|
|
6
|
-
/** 顶部 avatar 头像展示 */
|
|
7
|
-
avatar: AvatarProps | string;
|
|
8
|
-
/** 标题头部 */
|
|
9
|
-
title: React.ReactNode;
|
|
10
|
-
/** 标题描述 */
|
|
11
|
-
description?: React.ReactNode;
|
|
12
|
-
/** 标签功能 */
|
|
13
|
-
tags?: TagProps[];
|
|
14
|
-
}
|
|
15
|
-
/** 顶部通用区域封装,同时兼容样式的层叠和功能的自定义 */
|
|
16
|
-
export declare const GuardFace: (props: GuardFaceProps) => JSX.Element;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import './styles.less';
|
|
2
|
-
import { AvatarProps } from 'antd/lib/avatar';
|
|
3
|
-
import { ListItemProps, ListProps } from 'antd/lib/list';
|
|
4
|
-
import React, { CSSProperties } from 'react';
|
|
5
|
-
export interface GuardSelectItem {
|
|
6
|
-
/** avatar 头像展示 */
|
|
7
|
-
avatar?: AvatarProps | string;
|
|
8
|
-
/** 标题 */
|
|
9
|
-
title?: React.ReactNode;
|
|
10
|
-
/** 描述 */
|
|
11
|
-
description?: React.ReactNode;
|
|
12
|
-
/** 右侧操作组 */
|
|
13
|
-
actions?: ListItemProps['actions'];
|
|
14
|
-
/** 右侧额外的渲染内容 */
|
|
15
|
-
extra?: ListItemProps['extra'];
|
|
16
|
-
/** 数据项子内容,便于自定义 */
|
|
17
|
-
children?: React.ReactNode;
|
|
18
|
-
/** 其他元字段 */
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
}
|
|
21
|
-
export interface GuardSelectProps<T = any> extends ListProps<any> {
|
|
22
|
-
/**数据项之间的间隙,默认`20px` */
|
|
23
|
-
gap?: CSSProperties['marginBottom'];
|
|
24
|
-
/** 数据源 */
|
|
25
|
-
dataSource: T[];
|
|
26
|
-
onSelect?: (item?: T, index?: number) => void;
|
|
27
|
-
}
|
|
28
|
-
/** 选择列表组件 兼容绝大多数选择场景 */
|
|
29
|
-
export declare const GuardSelect: <D extends GuardSelectItem = any>(props: GuardSelectProps<D>) => JSX.Element;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { GuardModuleType } from '../Guard';
|
|
2
|
-
import { IG2Config, IG2Events, IG2FCViewProps } from '../Type';
|
|
3
|
-
export interface SubmitSuccessEvents extends IG2Events {
|
|
4
|
-
}
|
|
5
|
-
export interface SubmitSuccessConfig extends IG2Config {
|
|
6
|
-
}
|
|
7
|
-
export interface SubmitSuccessInitData {
|
|
8
|
-
title?: string;
|
|
9
|
-
message?: string;
|
|
10
|
-
text?: string;
|
|
11
|
-
countDesc?: string;
|
|
12
|
-
changeModule?: GuardModuleType;
|
|
13
|
-
}
|
|
14
|
-
export interface GuardNewSubmitSuccessViewProps extends IG2FCViewProps, SubmitSuccessEvents {
|
|
15
|
-
config: SubmitSuccessConfig;
|
|
16
|
-
initData?: SubmitSuccessInitData;
|
|
17
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
export declare const getCaptchaUrl: (host: string) => string;
|
package/types/_utils/tenant.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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;
|