@authing/react-ui-components 4.2.3-alpha.6 → 4.2.3-alpha.7

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.6",
3
+ "version": "4.2.3-alpha.7",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "types/index.d.ts",
@@ -2,6 +2,7 @@ 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';
5
6
  export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
6
7
  isSSO?: boolean;
7
8
  defaultScenes?: GuardModuleType;
@@ -12,5 +13,6 @@ export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
12
13
  * @description 是否调用 eventsMapping 中的事件
13
14
  */
14
15
  openEventsMapping?: boolean;
16
+ currentView?: CurrentView;
15
17
  }
16
18
  export declare const getDefaultGuardLocalConfig: () => GuardLocalConfig;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface Options {
3
+ changeTab?: React.Dispatch<any>;
4
+ currentTab?: string;
5
+ }
6
+ export declare function useGuardView(options?: Options): void;
7
+ export {};
@@ -13,7 +13,7 @@ export declare const QR_CODE_WAY: LoginWay[];
13
13
  * 登录时所有支持的登录列表(前端定义列表)
14
14
  * 这里稍微有点乱 因为Login中的登录方式和这里的不匹配,暂时放在了一起
15
15
  */
16
- export declare type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
16
+ export declare type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone';
17
17
  /**
18
18
  * when: 多账号页面跳转进入登录页面
19
19
  * 携带的回填数据信息
@@ -5,8 +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 {
9
+ currentView: string;
10
+ moduleName: GuardModuleType;
11
+ tabName?: string;
12
+ data?: any;
13
+ }
8
14
  export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
9
15
  onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
16
+ onChangeView?: (options: OnChangeViewOptions) => void;
10
17
  }
11
18
  export declare const guardEventsFilter: (props: any, multipleInstance?: {
12
19
  initStore: (appId: string, options: {
@@ -65,6 +72,7 @@ export declare const GuardEventsCamelToKebabMapping: {
65
72
  readonly onRegisterInfoCompletedError: "register-info-completed-error";
66
73
  readonly onLangChange: "lang-change";
67
74
  readonly onBeforeChangeModule: "before-change-module";
75
+ readonly onChangeView: "change-view";
68
76
  };
69
77
  export interface GuardEventsKebabToCamelType {
70
78
  load: GuardEvents['onLoad'];
@@ -88,4 +96,6 @@ export interface GuardEventsKebabToCamelType {
88
96
  'register-info-completed-error': GuardEvents['onRegisterInfoCompletedError'];
89
97
  'lang-change': GuardEvents['onLangChange'];
90
98
  'before-change-module': GuardEvents['onBeforeChangeModule'];
99
+ 'change-view': GuardEvents['onChangeView'];
91
100
  }
101
+ export {};
@@ -20,7 +20,6 @@ export declare enum GuardModuleType {
20
20
  IDENTITY_BINDING = "identityBinding",
21
21
  SELF_UNLOCK = "selfUnlock",
22
22
  FLOW_SELECT_ACCOUNT = "flowSelectAccount",
23
- APP_OTP_VERIFY = "appOtpVerify",
24
23
  /** 多租户门户选择页 */
25
24
  TENANT_PORTAL = "tenant-portal",
26
25
  New_SUBMIT_SUCCESS = "newSubmitSuccess"
@@ -5,7 +5,6 @@ export declare function useOtpPushLoginCache(): {
5
5
  cacheOtpLoginAccount: typeof cacheOtpLoginAccount;
6
6
  clearOtpLoginAccountCache: typeof clearOtpLoginAccountCache;
7
7
  };
8
- declare function cacheOtpLoginAccount(account: string): void;
9
- declare function getCachedOtpLoginAccount(): string;
10
- declare function clearOtpLoginAccountCache(): void;
11
- export {};
8
+ export declare function cacheOtpLoginAccount(account: string): void;
9
+ export declare function getCachedOtpLoginAccount(): string;
10
+ export declare function clearOtpLoginAccountCache(): void;
@@ -40,7 +40,6 @@ export interface SelectOptions {
40
40
  * 替代图片元素
41
41
  */
42
42
  element?: React.ReactElement;
43
- way: string;
44
43
  }
45
44
  declare const SelectPanel: React.FC<SelectPanelProps>;
46
45
  export { SelectPanel };
@@ -8,8 +8,7 @@ export declare enum LoginMethods {
8
8
  PhoneCode = "phone-code",
9
9
  WxMinQr = "wechat-miniprogram-qrcode",
10
10
  AD = "ad",
11
- WechatMpQrcode = "wechatmp-qrcode",
12
- AuthingOtpPush = "authing-otp-push"
11
+ WechatMpQrcode = "wechatmp-qrcode"
13
12
  }
14
13
  export declare enum OIDCConnectionMode {
15
14
  FRONT_CHANNEL = "FRONT_CHANNEL",
@@ -308,9 +307,4 @@ export interface ApplicationConfig {
308
307
  mfa: {
309
308
  faceScore: number;
310
309
  };
311
- authingOtpPushTabConfig: {
312
- enabledLoginMethods: Array<string> | null;
313
- validLoginMethods: Array<string> | null;
314
- validRegisterMethods: Array<string> | null;
315
- };
316
310
  }
@@ -25,6 +25,7 @@ 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;
28
29
  disableRegister?: boolean | undefined;
29
30
  registerMethods?: string[] | undefined;
30
31
  defaultRegisterMethod?: string | undefined;
@@ -83,6 +83,7 @@ export declare const useGuardEvents: () => Partial<GuardEvents>;
83
83
  export declare const useGuardModule: () => {
84
84
  changeModule: ((moduleName: GuardModuleType, initData?: any) => Promise<void>) | undefined;
85
85
  backModule: (() => void) | undefined;
86
+ currentModule: ModuleState;
86
87
  };
87
88
  export declare const useGuardFinallyConfig: () => GuardLocalConfig;
88
89
  export declare const useGuardContextLoaded: () => boolean;
@@ -1,2 +1,2 @@
1
- declare const _default: "4.2.3-alpha.5";
1
+ declare const _default: "4.2.1";
2
2
  export default _default;