@authing/react-ui-components 4.2.3-alpha.7 → 4.2.3-alpha.9
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.js +1 -1
- package/package.json +1 -1
- package/types/Guard/config.d.ts +0 -2
- package/types/Guard/core/hooks/useAgreements.d.ts +15 -0
- package/types/Guard/event.d.ts +6 -6
- package/types/_utils/config/index.d.ts +0 -1
- package/types/index.d.ts +1 -0
- package/types/version/version.d.ts +1 -1
package/package.json
CHANGED
package/types/Guard/config.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { GuardModuleType } from '.';
|
|
3
3
|
import { LoginConfig } from '../Login/interface';
|
|
4
4
|
import { RegisterConfig } from '../Register/interface';
|
|
5
|
-
export declare type CurrentView = 'login:ldap' | 'login:app-qrcode' | 'login:password' | 'login:phone-code' | 'login:wechat-miniprogram-qrcode' | 'login:ad' | 'login:wechatmp-qrcode' | 'register:username-password' | 'register:email-password' | 'register:phone-password' | 'register:emp_id-password' | 'register:phone-code' | 'forgetPassword' | 'anyQuestions';
|
|
6
5
|
export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
|
|
7
6
|
isSSO?: boolean;
|
|
8
7
|
defaultScenes?: GuardModuleType;
|
|
@@ -13,6 +12,5 @@ export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
|
|
|
13
12
|
* @description 是否调用 eventsMapping 中的事件
|
|
14
13
|
*/
|
|
15
14
|
openEventsMapping?: boolean;
|
|
16
|
-
currentView?: CurrentView;
|
|
17
15
|
}
|
|
18
16
|
export declare const getDefaultGuardLocalConfig: () => GuardLocalConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Agreement } from '../../../Type';
|
|
3
|
+
interface Options {
|
|
4
|
+
agreements: Agreement[];
|
|
5
|
+
checkedAgreements: (string | number)[];
|
|
6
|
+
checkAllAgreements: React.Dispatch<any>;
|
|
7
|
+
noCheckAllAgreements: React.Dispatch<any>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useAgreements(options: Options): {
|
|
10
|
+
agreements: Agreement[];
|
|
11
|
+
checkedAgreements: import("react").ReactText[];
|
|
12
|
+
checkAllAgreements: import("react").Dispatch<any>;
|
|
13
|
+
noCheckAllAgreements: import("react").Dispatch<any>;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
package/types/Guard/event.d.ts
CHANGED
|
@@ -5,15 +5,15 @@ 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
|
-
interface
|
|
8
|
+
interface OnAfterChangeModuleOptions {
|
|
9
9
|
currentView: string;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
currentModule: GuardModuleType;
|
|
11
|
+
currentTab?: string;
|
|
12
12
|
data?: any;
|
|
13
13
|
}
|
|
14
14
|
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
|
|
15
15
|
onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
|
|
16
|
-
|
|
16
|
+
onAfterChangeModule?: (options: OnAfterChangeModuleOptions) => void;
|
|
17
17
|
}
|
|
18
18
|
export declare const guardEventsFilter: (props: any, multipleInstance?: {
|
|
19
19
|
initStore: (appId: string, options: {
|
|
@@ -72,7 +72,7 @@ export declare const GuardEventsCamelToKebabMapping: {
|
|
|
72
72
|
readonly onRegisterInfoCompletedError: "register-info-completed-error";
|
|
73
73
|
readonly onLangChange: "lang-change";
|
|
74
74
|
readonly onBeforeChangeModule: "before-change-module";
|
|
75
|
-
readonly
|
|
75
|
+
readonly onAfterChangeModule: "after-change-module";
|
|
76
76
|
};
|
|
77
77
|
export interface GuardEventsKebabToCamelType {
|
|
78
78
|
load: GuardEvents['onLoad'];
|
|
@@ -96,6 +96,6 @@ export interface GuardEventsKebabToCamelType {
|
|
|
96
96
|
'register-info-completed-error': GuardEvents['onRegisterInfoCompletedError'];
|
|
97
97
|
'lang-change': GuardEvents['onLangChange'];
|
|
98
98
|
'before-change-module': GuardEvents['onBeforeChangeModule'];
|
|
99
|
-
'change-
|
|
99
|
+
'after-change-module': GuardEvents['onAfterChangeModule'];
|
|
100
100
|
}
|
|
101
101
|
export {};
|
|
@@ -25,7 +25,6 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
25
25
|
showLoading?: boolean | undefined;
|
|
26
26
|
loadingComponent?: import("react").ReactNode;
|
|
27
27
|
openEventsMapping?: boolean | undefined;
|
|
28
|
-
currentView?: "login:ldap" | "login:app-qrcode" | "login:password" | "login:phone-code" | "login:wechat-miniprogram-qrcode" | "login:ad" | "login:wechatmp-qrcode" | "register:username-password" | "register:email-password" | "register:phone-password" | "register:emp_id-password" | "register:phone-code" | "forgetPassword" | "anyQuestions" | undefined;
|
|
29
28
|
disableRegister?: boolean | undefined;
|
|
30
29
|
registerMethods?: string[] | undefined;
|
|
31
30
|
defaultRegisterMethod?: string | undefined;
|
package/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.2.
|
|
1
|
+
declare const _default: "4.2.3-alpha.9";
|
|
2
2
|
export default _default;
|