@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/react-ui-components",
3
- "version": "4.2.3-alpha.7",
3
+ "version": "4.2.3-alpha.9",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "types/index.d.ts",
@@ -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 {};
@@ -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 OnChangeViewOptions {
8
+ interface OnAfterChangeModuleOptions {
9
9
  currentView: string;
10
- moduleName: GuardModuleType;
11
- tabName?: string;
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
- onChangeView?: (options: OnChangeViewOptions) => void;
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 onChangeView: "change-view";
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-view': GuardEvents['onChangeView'];
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
@@ -4,3 +4,4 @@ export * from './AuthClientProvider';
4
4
  export * from './Guard';
5
5
  export * from './Type';
6
6
  export * from './version';
7
+ export * from './Guard/core/hooks/useGuardView';
@@ -1,2 +1,2 @@
1
- declare const _default: "4.2.1";
1
+ declare const _default: "4.2.3-alpha.9";
2
2
  export default _default;