@authing/react18-ui-components 4.3.4-alpha.4 → 4.3.4-alpha.6
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/lib/index.min.js.LICENSE.txt +6 -0
- package/package.json +2 -1
- package/types/Guard/event.d.ts +2 -1
- package/types/Guard/module.d.ts +3 -2
- package/types/IdentityBinding/IdentityBinding.d.ts +3 -1
- package/types/IdentityBinding/businessRequest.d.ts +5 -2
- package/types/Login/core/withAuthingOtpPush/HowBindClient.d.ts +1 -0
- package/types/Login/core/withAuthingOtpPush/HowGetAppLoginUrl.d.ts +1 -0
- package/types/Login/core/withAuthingOtpPush/HowUsePushLogin.d.ts +1 -0
- package/types/Login/core/withAuthingOtpPush/PushLoginGuideModal.d.ts +2 -0
- package/types/Login/core/withAuthingOtpPush/PushLoginGuideSelector.d.ts +8 -0
- package/types/Login/core/withAuthingOtpPush/types.d.ts +10 -0
- package/types/Login/index.d.ts +4 -1
- package/types/Login/resetAccountName/businessRequest.d.ts +6 -0
- package/types/Login/resetAccountName/index.d.ts +3 -0
- package/types/TenantPortalSelect/index.d.ts +0 -13
- package/types/TenantPortalSelect/interface.d.ts +33 -0
- package/types/Type/application.d.ts +19 -0
- package/types/_utils/context.d.ts +2 -0
- package/types/_utils/index.d.ts +1 -0
- package/types/_utils/responseManagement/interface.d.ts +3 -1
- package/types/version/version.d.ts +1 -1
|
@@ -133,6 +133,12 @@ object-assign
|
|
|
133
133
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
134
134
|
*/
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* @license qrcode.react
|
|
138
|
+
* Copyright (c) Paul O'Shannessy
|
|
139
|
+
* SPDX-License-Identifier: ISC
|
|
140
|
+
*/
|
|
141
|
+
|
|
136
142
|
/** @license React v16.13.1
|
|
137
143
|
* react-is.development.js
|
|
138
144
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authing/react18-ui-components",
|
|
3
|
-
"version": "4.3.4-alpha.
|
|
3
|
+
"version": "4.3.4-alpha.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "lib/index.min.js",
|
|
6
6
|
"typings": "types/index.d.ts",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"global": "^4.4.0",
|
|
18
18
|
"phone": "^3.1.12",
|
|
19
19
|
"prompt": "^1.3.0",
|
|
20
|
+
"qrcode.react": "^3.1.0",
|
|
20
21
|
"qs": "^6.9.4",
|
|
21
22
|
"react": "18.2.0",
|
|
22
23
|
"react-dom": "18.2.0",
|
package/types/Guard/event.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { IdentityBindingEvents } from '../IdentityBinding/interface';
|
|
|
5
5
|
import { IdentityBindingAskEvents } from '../IdentityBindingAsk';
|
|
6
6
|
import { LoginEvents } from '../Login/interface';
|
|
7
7
|
import { RegisterEvents } from '../Register/interface';
|
|
8
|
+
import { TenantPortalEvents } from '../TenantPortalSelect/interface';
|
|
8
9
|
import { StoreInstance } from './core/hooks/useMultipleAccounts';
|
|
9
10
|
export interface OnAfterChangeModuleOptions {
|
|
10
11
|
currentView: string;
|
|
@@ -12,7 +13,7 @@ export interface OnAfterChangeModuleOptions {
|
|
|
12
13
|
currentTab?: string;
|
|
13
14
|
data?: any;
|
|
14
15
|
}
|
|
15
|
-
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
|
|
16
|
+
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents, TenantPortalEvents {
|
|
16
17
|
onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
|
|
17
18
|
onAfterChangeModule?: (options: OnAfterChangeModuleOptions) => void;
|
|
18
19
|
}
|
package/types/Guard/module.d.ts
CHANGED
|
@@ -18,12 +18,13 @@ export declare enum GuardModuleType {
|
|
|
18
18
|
SUBMIT_SUCCESS = "submitSuccess",
|
|
19
19
|
IDENTITY_BINDING_ASK = "identityBindingAsk",
|
|
20
20
|
IDENTITY_BINDING = "identityBinding",
|
|
21
|
+
IDENTITY_BINDING_NO_ASK = "identityBindingNoAsk",
|
|
21
22
|
SELF_UNLOCK = "selfUnlock",
|
|
22
23
|
FLOW_SELECT_ACCOUNT = "flowSelectAccount",
|
|
23
|
-
APP_OTP_VERIFY = "appOtpVerify",
|
|
24
24
|
/** 多租户门户选择页 */
|
|
25
25
|
TENANT_PORTAL = "tenant-portal",
|
|
26
|
-
New_SUBMIT_SUCCESS = "newSubmitSuccess"
|
|
26
|
+
New_SUBMIT_SUCCESS = "newSubmitSuccess",
|
|
27
|
+
RESET_ACCOUNT_NAME = "resetAccountName"
|
|
27
28
|
}
|
|
28
29
|
export interface GuardModuleAction {
|
|
29
30
|
action: string;
|
|
@@ -21,12 +21,15 @@ export declare enum IdentityBindingAction {
|
|
|
21
21
|
CreateUser = "create-federation-account",
|
|
22
22
|
BindByPassword = "bind-identity-by-password",
|
|
23
23
|
BindByPhoneCode = "bind-identity-by-phone-code",
|
|
24
|
-
BindByEmailCode = "bind-identity-by-email-code"
|
|
24
|
+
BindByEmailCode = "bind-identity-by-email-code",
|
|
25
|
+
RegisterByPassword = "register-bind-by-password",
|
|
26
|
+
RegisterByPhoneCode = "register-bind-by-phone-code",
|
|
27
|
+
RegisterByEmailCode = "register-bind-by-email-code"
|
|
25
28
|
}
|
|
26
29
|
export declare const PhoneCode: (params: PhoneCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
27
30
|
export declare const EmailCode: (params: EmailCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
28
31
|
export declare const Password: (params: PasswordParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
29
|
-
export declare const useIdentityBindingBusinessRequest: () => {
|
|
32
|
+
export declare const useIdentityBindingBusinessRequest: (type?: 'register' | 'bind') => {
|
|
30
33
|
"phone-code": (params: PhoneCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
31
34
|
"emial-code": (params: EmailCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
32
35
|
password: (params: PasswordParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function HowBindClient(): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function HowGetAppLoginUrl(): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function HowUsePushLogin(): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SelectorOptions, Selector } from './types';
|
|
2
|
+
interface PushLoginGuideSelectorProps {
|
|
3
|
+
defaultValue: Selector;
|
|
4
|
+
onChange: (value: Selector) => void;
|
|
5
|
+
options: SelectorOptions;
|
|
6
|
+
}
|
|
7
|
+
export declare function PushLoginGuideSelector(props: PushLoginGuideSelectorProps): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -16,3 +16,13 @@ export interface LoginWithAuthingOtpPushProps {
|
|
|
16
16
|
initData?: BackFillMultipleState;
|
|
17
17
|
agreements: Agreement[];
|
|
18
18
|
}
|
|
19
|
+
export interface PushLoginGudeModalProps {
|
|
20
|
+
visible: boolean;
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
}
|
|
23
|
+
export type Selector = 'howUsePushLogin' | 'howBindClient' | 'howGetAppLoginUrl';
|
|
24
|
+
export interface SelectorOption {
|
|
25
|
+
value: Selector;
|
|
26
|
+
label: string;
|
|
27
|
+
}
|
|
28
|
+
export type SelectorOptions = SelectorOption[];
|
package/types/Login/index.d.ts
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const enum ResetAccountBusinessAction {
|
|
2
|
+
ResetName = "reset-username-before-auth"
|
|
3
|
+
}
|
|
4
|
+
export declare const authFlow: (action: ResetAccountBusinessAction, content: {
|
|
5
|
+
username: string;
|
|
6
|
+
}) => Promise<import("../../_utils/http").AuthingGuardResponse<any>>;
|
|
@@ -1,15 +1,2 @@
|
|
|
1
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
2
|
export declare const GuardTenantPortalSelectView: () => JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AvatarProps } from 'antd/lib/avatar';
|
|
3
|
+
import { AuthenticationClient, IG2Events, User } from '../Type';
|
|
4
|
+
export interface TenantPortalListType {
|
|
5
|
+
tenantName: string;
|
|
6
|
+
tenantId: string;
|
|
7
|
+
tenantLogo: string;
|
|
8
|
+
host: string;
|
|
9
|
+
description: string;
|
|
10
|
+
/** 是否为用户池 */
|
|
11
|
+
isUserPool: boolean;
|
|
12
|
+
userName?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface TenantPortalSelectType extends Omit<TenantPortalListType, 'userName'> {
|
|
15
|
+
}
|
|
16
|
+
/** 租户门户选择状态机返回数据类型 */
|
|
17
|
+
export interface TenantPortalDataType {
|
|
18
|
+
title: string;
|
|
19
|
+
description: string;
|
|
20
|
+
logo: string;
|
|
21
|
+
list: TenantPortalListType[];
|
|
22
|
+
}
|
|
23
|
+
export interface TenantPortalDataItem extends TenantPortalListType {
|
|
24
|
+
avatar?: AvatarProps;
|
|
25
|
+
extra?: React.ReactNode;
|
|
26
|
+
title?: string;
|
|
27
|
+
}
|
|
28
|
+
/** 租户门户相关事件 */
|
|
29
|
+
export interface TenantPortalEvents extends IG2Events {
|
|
30
|
+
onLogin?: (user: User, authClient: AuthenticationClient) => void;
|
|
31
|
+
/** 租户门户选择回调 */
|
|
32
|
+
onTenantSelect?: (data?: TenantPortalSelectType) => void;
|
|
33
|
+
}
|
|
@@ -178,6 +178,14 @@ export interface TabFieldsI18nItem {
|
|
|
178
178
|
[propName in Lang]?: string;
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
+
interface LoginTypeI18nProps {
|
|
182
|
+
tab: {
|
|
183
|
+
default: string;
|
|
184
|
+
i18n: {
|
|
185
|
+
[propName: string]: string;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
}
|
|
181
189
|
export interface ApplicationConfig {
|
|
182
190
|
id: string;
|
|
183
191
|
allowedOrigins: string[];
|
|
@@ -263,6 +271,12 @@ export interface ApplicationConfig {
|
|
|
263
271
|
socialLoginBtns: boolean;
|
|
264
272
|
userPasswordInput: boolean;
|
|
265
273
|
wxMpScanTab: boolean;
|
|
274
|
+
loginMethodsI18nDisplaySettings: {
|
|
275
|
+
password?: LoginTypeI18nProps;
|
|
276
|
+
verifyCode?: LoginTypeI18nProps;
|
|
277
|
+
ad?: LoginTypeI18nProps;
|
|
278
|
+
ldap?: LoginTypeI18nProps;
|
|
279
|
+
};
|
|
266
280
|
};
|
|
267
281
|
protocol: Protocol;
|
|
268
282
|
oidcConfig: OidcClientMetadata;
|
|
@@ -293,6 +307,11 @@ export interface ApplicationConfig {
|
|
|
293
307
|
loginMethodsSort: string[];
|
|
294
308
|
};
|
|
295
309
|
tabMethodsFields: TabFieldsI18nItem[];
|
|
310
|
+
regexRules?: {
|
|
311
|
+
key: string;
|
|
312
|
+
appLevel: string;
|
|
313
|
+
userpoolLevel: string;
|
|
314
|
+
}[];
|
|
296
315
|
/** 是否为租户控制台应用 */
|
|
297
316
|
isTenantConsole?: boolean;
|
|
298
317
|
/** 是否默认为租户应用面板应用 */
|
|
@@ -43,6 +43,7 @@ export interface IGuardContext {
|
|
|
43
43
|
*/
|
|
44
44
|
clearBackFillData?: () => void;
|
|
45
45
|
};
|
|
46
|
+
phoneRegex: RegExp | null;
|
|
46
47
|
defaultLanguageConfig: Lang;
|
|
47
48
|
/** 租户信息获取和操作处理相关 */
|
|
48
49
|
tenantInstance?: MultipleTenant;
|
|
@@ -147,6 +148,7 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
147
148
|
*/
|
|
148
149
|
clearBackFillData?: (() => void) | undefined;
|
|
149
150
|
};
|
|
151
|
+
export declare const useGuardPhoneRegex: () => RegExp | null;
|
|
150
152
|
/**
|
|
151
153
|
* 默认语言
|
|
152
154
|
*/
|
package/types/_utils/index.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ export declare const getLoginTypePipe: (publicConfig: ApplicationConfig, registe
|
|
|
92
92
|
} | undefined;
|
|
93
93
|
export declare const getPasswordIdentify: (identity: string) => string;
|
|
94
94
|
export declare const getCurrentLng: () => Lang;
|
|
95
|
+
export declare const regexFromString: (string: string) => RegExp | null;
|
|
95
96
|
export declare const getI18nLabel: (method: string | RegisterSortMethods, i18nFields: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
|
|
96
97
|
export declare const getSortLabels: (methods: string[], i18nConfig: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
|
|
97
98
|
export declare const getSortTabs: (tabs: string[], tab?: string) => string[];
|
|
@@ -7,6 +7,7 @@ export declare enum CodeAction {
|
|
|
7
7
|
export declare enum ApiCode {
|
|
8
8
|
IDENTITY_BINDING_ASK = 1641,
|
|
9
9
|
IDENTITY_BINDING = 1640,
|
|
10
|
+
IDENTITY_BINDING_NO_ASK = 1666,
|
|
10
11
|
APP_MFA = 1636,
|
|
11
12
|
MFA = 1635,
|
|
12
13
|
ABORT_FLOW = 1699,
|
|
@@ -18,6 +19,7 @@ export declare enum ApiCode {
|
|
|
18
19
|
UNSAFE_PASSWORD_TIP = 2061,
|
|
19
20
|
UNSAFE_PASSWORD_RESET = 2071,
|
|
20
21
|
FLOW_SELECT_ACCOUNT = 2921,
|
|
21
|
-
TENANT_PORTAL = 1644
|
|
22
|
+
TENANT_PORTAL = 1644,
|
|
23
|
+
RESET_ACCOUNT_NAME = 1108
|
|
22
24
|
}
|
|
23
25
|
export declare const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.3.4-alpha.
|
|
1
|
+
declare const _default: "4.3.4-alpha.6";
|
|
2
2
|
export default _default;
|