@authing/react-ui-components 3.1.20-rc.9 → 3.1.22

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.d.ts CHANGED
@@ -378,9 +378,10 @@ declare module '@authing/react-ui-components/components/AuthingGuard/ToggleLang/
378
378
 
379
379
  }
380
380
  declare module '@authing/react-ui-components/components/AuthingGuard/api/appConfig' {
381
- import { Lang, LoginMethods, Protocol, RegisterMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
381
+ import { Lang, LoginMethods, Protocol } from '@authing/react-ui-components/components/AuthingGuard/types/index';
382
382
  import { IAzureAdConnectionConfig, ICasConnectionConfig, IOAuthConnectionConfig, ISamlConnectionConfig, OIDCConnectionConfig, SocialConnectionItem } from '@authing/react-ui-components/components/AuthingGuard/api/userPoolConfig';
383
383
  import { PasswordStrength } from '@authing/react-ui-components/components/_utils/index';
384
+ import { NewRegisterMethods } from '@authing/react-ui-components/components/Type/index';
384
385
  export enum ApplicationMfaType {
385
386
  SMS = "SMS",
386
387
  EMAIL = "EMAIL"
@@ -465,8 +466,8 @@ declare module '@authing/react-ui-components/components/AuthingGuard/api/appConf
465
466
  [x: string]: string;
466
467
  };
467
468
  registerTypeConfig: {
468
- emailRegisterType?: RegisterMethods[];
469
- phoneRegisterType?: RegisterMethods[];
469
+ emailRegisterType?: NewRegisterMethods[];
470
+ phoneRegisterType?: NewRegisterMethods[];
470
471
  };
471
472
  };
472
473
  qrcodeTabsSettings: QrcodeTabsSettings;
@@ -637,7 +638,7 @@ declare module '@authing/react-ui-components/components/AuthingGuard/api/userPoo
637
638
 
638
639
  }
639
640
  declare module '@authing/react-ui-components/components/AuthingGuard/constants' {
640
- import { UserConfig, LoginMethods, LocalesConfig } from '@authing/react-ui-components/components/AuthingGuard/types/index';
641
+ import { UserConfig, LoginMethods, RegisterMethods, LocalesConfig } from '@authing/react-ui-components/components/AuthingGuard/types/index';
641
642
  export const OTP_MFA_CODE = 1635;
642
643
  export const APP_MFA_CODE = 1636;
643
644
  export const NEED_CAPTCHA = 2000;
@@ -650,7 +651,10 @@ declare module '@authing/react-ui-components/components/AuthingGuard/constants'
650
651
  ad: string;
651
652
  "wechatmp-qrcode": string;
652
653
  };
653
- export const REGISTER_METHODS_MAP: any;
654
+ export const REGISTER_METHODS_MAP: () => {
655
+ email: string;
656
+ phone: string;
657
+ };
654
658
  export const HIDE_SOCIALS: string[];
655
659
  export const HIDE_SOCIALS_SHOWIN_ENTERPRISE: string[];
656
660
  export enum ApplicationMfaType {
@@ -824,8 +828,7 @@ declare module '@authing/react-ui-components/components/AuthingGuard/types/Guard
824
828
  }
825
829
  export enum RegisterMethods {
826
830
  Email = "email",
827
- Phone = "phone",
828
- EmailCode = "emailCode"
831
+ Phone = "phone"
829
832
  }
830
833
  export enum GuardScenes {
831
834
  Login = "login",
@@ -1332,8 +1335,6 @@ declare module '@authing/react-ui-components/components/CompleteInfo/interface'
1332
1335
  export interface RegisterCompleteInfoInitData {
1333
1336
  content: any;
1334
1337
  businessRequestName: 'registerByEmail' | 'registerByPhoneCode' | 'registerByEmailCode';
1335
- onRegisterFailed: Function;
1336
- onRegisterSuccess: Function;
1337
1338
  }
1338
1339
  export interface RegisterCompletePasswordInitData extends RegisterCompleteInfoInitData {
1339
1340
  isChangeComplete: boolean;
@@ -1500,6 +1501,7 @@ declare module '@authing/react-ui-components/components/Guard/GuardModule/stateM
1500
1501
  private changeModuleEvent;
1501
1502
  private stateMachineLog;
1502
1503
  constructor(changeModuleEvent: ChangeModuleEvent, initData: ModuleState);
1504
+ uninstallPopstate: () => void;
1503
1505
  globalWindow: () => Window | undefined;
1504
1506
  next: (nextModule: GuardModuleType, initData: any) => void;
1505
1507
  back: (initData?: any) => void;
@@ -1507,8 +1509,9 @@ declare module '@authing/react-ui-components/components/Guard/GuardModule/stateM
1507
1509
  historyPush: (data: ModuleState, actionType?: ActionType) => void;
1508
1510
  historyBack: (data: ModuleState) => void;
1509
1511
  setConfig: (config: GuardLocalConfig) => void;
1512
+ isUseHistoryHijack: () => boolean;
1513
+ onPopstate: () => void;
1510
1514
  }
1511
- export const useHistoryHijack: (back?: (() => void) | undefined) => ((state?: any) => void)[];
1512
1515
  export const initGuardStateMachine: (changeMouleEvent: ChangeModuleEvent, initData: ModuleState) => GuardStateMachine;
1513
1516
  export const getGuardStateMachine: () => GuardStateMachine;
1514
1517
  export const useGuardStateMachine: () => GuardStateMachine;
@@ -1725,6 +1728,19 @@ declare module '@authing/react-ui-components/components/Guard/sso' {
1725
1728
  }
1726
1729
  export const trackSession: () => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<SessionData>>;
1727
1730
 
1731
+ }
1732
+ declare module '@authing/react-ui-components/components/GuardButton/GuardButton' {
1733
+ import React from 'react';
1734
+ import { ButtonProps } from 'antd/lib/button';
1735
+ import './styles.less';
1736
+ export interface GuardButtonProps extends ButtonProps {
1737
+ }
1738
+ export const GuardButton: React.FC<GuardButtonProps>;
1739
+
1740
+ }
1741
+ declare module '@authing/react-ui-components/components/GuardButton/index' {
1742
+ export * from '@authing/react-ui-components/components/GuardButton/GuardButton';
1743
+
1728
1744
  }
1729
1745
  declare module '@authing/react-ui-components/components/IconFont/iconfont' {
1730
1746
  export const GenerateSvg: (guardDocument: Document, svgString: string) => void;
@@ -1995,7 +2011,7 @@ declare module '@authing/react-ui-components/components/Login/core/withVerifyCod
1995
2011
  export interface FormItemIdentifyProps extends FormItemProps {
1996
2012
  checkRepeat?: boolean;
1997
2013
  methods: VerifyLoginMethods[];
1998
- currentMethod: 'phone-code' | 'email-code';
2014
+ currentMethod?: 'phone-code' | 'email-code';
1999
2015
  areaCode?: string;
2000
2016
  }
2001
2017
  export const FormItemIdentify: React.FC<FormItemIdentifyProps>;
@@ -2100,11 +2116,6 @@ declare module '@authing/react-ui-components/components/Login/interface' {
2100
2116
  export interface GuardLoginViewProps extends GuardLoginProps, IG2FCViewProps {
2101
2117
  config: LoginConfig;
2102
2118
  }
2103
- export interface GuardLoginInitData {
2104
- specifyDefaultLoginMethod?: LoginMethods;
2105
- _firstItemInitialValue?: string;
2106
- _lockMethod?: string;
2107
- }
2108
2119
  export const getDefaultLoginConfig: () => LoginConfig;
2109
2120
 
2110
2121
  }
@@ -2466,47 +2477,45 @@ declare module '@authing/react-ui-components/components/Register/components/Agre
2466
2477
  export const Agreements: FC<AgreementsProps>;
2467
2478
 
2468
2479
  }
2469
- declare module '@authing/react-ui-components/components/Register/core/WithCode' {
2480
+ declare module '@authing/react-ui-components/components/Register/core/WithEmail' {
2470
2481
  import React from 'react';
2471
2482
  import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2472
- export interface RegisterWithCodeProps {
2483
+ export interface RegisterWithEmailProps {
2473
2484
  onRegisterSuccess: Function;
2474
2485
  onRegisterFailed: Function;
2475
2486
  onBeforeRegister?: Function;
2476
- agreements: Agreement[];
2477
2487
  publicConfig?: ApplicationConfig;
2488
+ agreements: Agreement[];
2478
2489
  registeContext?: any;
2479
- methods: any[];
2480
2490
  }
2481
- export const RegisterWithCode: React.FC<RegisterWithCodeProps>;
2491
+ export const RegisterWithEmail: React.FC<RegisterWithEmailProps>;
2482
2492
 
2483
2493
  }
2484
- declare module '@authing/react-ui-components/components/Register/core/WithEmail' {
2494
+ declare module '@authing/react-ui-components/components/Register/core/WithEmailCode' {
2485
2495
  import React from 'react';
2486
2496
  import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2487
- export interface RegisterWithEmailProps {
2497
+ export interface RegisterWithEmailCodeProps {
2488
2498
  onRegisterSuccess: Function;
2489
2499
  onRegisterFailed: Function;
2490
2500
  onBeforeRegister?: Function;
2491
- publicConfig?: ApplicationConfig;
2492
2501
  agreements: Agreement[];
2502
+ publicConfig?: ApplicationConfig;
2493
2503
  registeContext?: any;
2494
2504
  }
2495
- export const RegisterWithEmail: React.FC<RegisterWithEmailProps>;
2505
+ export const RegisterWithEmailCode: React.FC<RegisterWithEmailCodeProps>;
2496
2506
 
2497
2507
  }
2498
- declare module '@authing/react-ui-components/components/Register/core/WithEmailCode' {
2508
+ declare module '@authing/react-ui-components/components/Register/core/WithPhone' {
2499
2509
  import React from 'react';
2500
2510
  import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2501
- export interface RegisterWithEmailCodeProps {
2511
+ export interface RegisterWithPhoneProps {
2502
2512
  onRegisterSuccess: Function;
2503
2513
  onRegisterFailed: Function;
2504
- onBeforeRegister?: Function;
2505
2514
  agreements: Agreement[];
2506
2515
  publicConfig?: ApplicationConfig;
2507
2516
  registeContext?: any;
2508
2517
  }
2509
- export const RegisterWithEmailCode: React.FC<RegisterWithEmailCodeProps>;
2518
+ export const RegisterWithPhone: React.FC<RegisterWithPhoneProps>;
2510
2519
 
2511
2520
  }
2512
2521
  declare module '@authing/react-ui-components/components/Register/index' {
@@ -2515,13 +2524,13 @@ declare module '@authing/react-ui-components/components/Register/index' {
2515
2524
 
2516
2525
  }
2517
2526
  declare module '@authing/react-ui-components/components/Register/interface' {
2518
- import { IG2FCProps, IG2Config, IG2Events } from '@authing/react-ui-components/components/Type/index';
2519
- import { AuthenticationClient, User, EmailRegisterParams, PhoneRegisterParams, RegisterMethods } from '@authing/react-ui-components/components/index';
2527
+ import { IG2FCProps, IG2Config, IG2Events, NewRegisterMethods } from '@authing/react-ui-components/components/Type/index';
2528
+ import { AuthenticationClient, User, EmailRegisterParams, PhoneRegisterParams } from '@authing/react-ui-components/components/index';
2520
2529
  import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2521
2530
  export interface RegisterConfig extends IG2Config {
2522
2531
  disableRegister?: boolean;
2523
- registerMethods?: RegisterMethods[];
2524
- defaultRegisterMethod?: RegisterMethods;
2532
+ registerMethods?: NewRegisterMethods[];
2533
+ defaultRegisterMethod?: NewRegisterMethods;
2525
2534
  publicKey?: string;
2526
2535
  agreementEnabled?: boolean;
2527
2536
  agreements?: Agreement[];
@@ -2531,7 +2540,7 @@ declare module '@authing/react-ui-components/components/Register/interface' {
2531
2540
  onBeforeRegister?: (registerInfo: EmailRegisterParams | PhoneRegisterParams, authClient: AuthenticationClient) => boolean | Promise<boolean>;
2532
2541
  onRegister?: (user: User, authClient: AuthenticationClient) => void;
2533
2542
  onRegisterError?: (error: any) => void;
2534
- onRegisterTabChange?: (activeTab: RegisterMethods) => void;
2543
+ onRegisterTabChange?: (activeTab: NewRegisterMethods) => void;
2535
2544
  }
2536
2545
  export interface GuardRegisterProps extends IG2FCProps, RegisterEvents {
2537
2546
  config?: Partial<RegisterConfig>;
@@ -2661,7 +2670,8 @@ declare module '@authing/react-ui-components/components/SingleComponent/index' {
2661
2670
  }
2662
2671
  declare module '@authing/react-ui-components/components/SubmitButton/index' {
2663
2672
  import React from 'react';
2664
- interface SubmitButtonProps {
2673
+ import { ButtonProps } from 'antd/lib/button';
2674
+ interface SubmitButtonProps extends ButtonProps {
2665
2675
  text?: string;
2666
2676
  className?: string;
2667
2677
  onClick?: any;
@@ -2761,6 +2771,11 @@ declare module '@authing/react-ui-components/components/Type/index' {
2761
2771
  showChangeLanguage: boolean;
2762
2772
  };
2763
2773
  }
2774
+ export enum NewRegisterMethods {
2775
+ Email = "email",
2776
+ Phone = "phone",
2777
+ EmailCode = "emailCode"
2778
+ }
2764
2779
  export enum EmailScene {
2765
2780
  WELCOME_EMAIL = "WELCOME_EMAIL",
2766
2781
  FIRST_CREATED_USER = "FIRST_CREATED_USER",
@@ -2873,8 +2888,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2873
2888
  import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2874
2889
  import { GuardComponentConfig, GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
2875
2890
  import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
2891
+ import { NewRegisterMethods } from '@authing/react-ui-components/components/Type/index';
2876
2892
  import { GuardPageConfig } from '@authing/react-ui-components/components/Type/index';
2877
- import { RegisterMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
2878
2893
  export const getPublicConfig: (appId: string) => ApplicationConfig;
2879
2894
  export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
2880
2895
  export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
@@ -2888,8 +2903,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2888
2903
  openEventsMapping?: boolean | undefined;
2889
2904
  _qrCodeScanOptions?: Record<import("@authing/react-ui-components/components/Guard/config").QrCodeScanType, import("../../Guard/config").QrCodeScanOptions> | undefined;
2890
2905
  disableRegister?: boolean | undefined;
2891
- registerMethods?: RegisterMethods[] | undefined;
2892
- defaultRegisterMethod?: RegisterMethods | undefined;
2906
+ registerMethods?: NewRegisterMethods[] | undefined;
2907
+ defaultRegisterMethod?: NewRegisterMethods | undefined;
2893
2908
  publicKey?: string | undefined;
2894
2909
  agreementEnabled?: boolean | undefined;
2895
2910
  agreements?: import("@authing/react-ui-components/components/AuthingGuard/api/index").Agreement[] | undefined;
@@ -2899,7 +2914,7 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2899
2914
  lang: string;
2900
2915
  langRange: string[];
2901
2916
  isHost?: boolean | undefined;
2902
- mode: import("@authing/react-ui-components/components/AuthingGuard/types/index").GuardMode;
2917
+ mode: import("@authing/react-ui-components/components/index").GuardMode;
2903
2918
  clickCloseable: boolean;
2904
2919
  escCloseable: boolean;
2905
2920
  userpool?: string | undefined;
@@ -2910,8 +2925,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2910
2925
  __unAuthFlow__?: boolean | undefined;
2911
2926
  autoRegister?: boolean | undefined;
2912
2927
  disableResetPwd?: boolean | undefined;
2913
- defaultLoginMethod?: import("@authing/react-ui-components/components/AuthingGuard/types/index").LoginMethods | undefined;
2914
- loginMethods?: import("@authing/react-ui-components/components/AuthingGuard/types/index").LoginMethods[] | undefined;
2928
+ defaultLoginMethod?: import("@authing/react-ui-components/components/index").LoginMethods | undefined;
2929
+ loginMethods?: import("@authing/react-ui-components/components/index").LoginMethods[] | undefined;
2915
2930
  passwordLoginMethods?: import("@authing/react-ui-components/components/AuthingGuard/api/index").PasswordLoginMethods[] | undefined;
2916
2931
  socialConnections?: import("authing-js-sdk").SocialConnectionProvider[] | undefined;
2917
2932
  socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
@@ -3000,6 +3015,14 @@ declare module '@authing/react-ui-components/components/_utils/context' {
3000
3015
  }>;
3001
3016
  Consumer: React.Consumer<IGuardContext>;
3002
3017
  };
3018
+ export interface IGuardContextProvider {
3019
+ spin: boolean;
3020
+ spinChange: (spin: boolean) => void;
3021
+ }
3022
+ export const useGuardButtonContext: () => {
3023
+ GuardButtonProvider: React.FC<{}>;
3024
+ };
3025
+ export const useGuardButtonState: () => IGuardContextProvider;
3003
3026
  export const useGuardPublicConfig: () => ApplicationConfig;
3004
3027
  export const useGuardHttpClient: () => GuardHttp;
3005
3028
  export const useGuardDefaultMergedConfig: () => GuardLocalConfig;
@@ -3049,7 +3072,8 @@ declare module '@authing/react-ui-components/components/_utils/errorFace' {
3049
3072
  }
3050
3073
  declare module '@authing/react-ui-components/components/_utils/facePlugin/index' {
3051
3074
  import { FacePlugin } from '@authing/react-ui-components/components/_utils/facePlugin/interface';
3052
- export const getFacePlugin: () => FacePlugin;
3075
+ export const getFacePlugin: () => FacePlugin | undefined;
3076
+ export const useFacePlugin: () => FacePlugin | undefined;
3053
3077
  export const initFacePlugin: (facePlugin: FacePlugin) => FacePlugin;
3054
3078
 
3055
3079
  }
@@ -3187,7 +3211,7 @@ declare module '@authing/react-ui-components/components/_utils/index' {
3187
3211
  import { User } from 'authing-js-sdk';
3188
3212
  import { ApplicationConfig, ComplateFiledsPlace } from '@authing/react-ui-components/components/AuthingGuard/api/index';
3189
3213
  import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
3190
- import { LoginMethods, RegisterMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
3214
+ import { NewRegisterMethods } from '@authing/react-ui-components/components/Type/index';
3191
3215
  export * from '@authing/react-ui-components/components/_utils/popupCenter';
3192
3216
  export * from '@authing/react-ui-components/components/_utils/clipboard';
3193
3217
  export const VALIDATE_PATTERN: {
@@ -3256,19 +3280,12 @@ declare module '@authing/react-ui-components/components/_utils/index' {
3256
3280
  export const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string | undefined) => Rule[];
3257
3281
  export const sleep: (delay: number) => Promise<unknown>;
3258
3282
  export const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean | undefined) => boolean;
3259
- export const tabSort: (defaultValue: any, tabList: RegisterMethods[]) => RegisterMethods[];
3283
+ export const tabSort: (defaultValue: NewRegisterMethods, tabList: NewRegisterMethods[]) => NewRegisterMethods[];
3260
3284
  export const mailDesensitization: (mail: string) => string;
3261
3285
  export const phoneDesensitization: (phone: string) => string;
3262
3286
  export const getHundreds: (num: number) => number;
3263
3287
  export const GuardPropsFilter: (pre: GuardProps, current: GuardProps) => boolean;
3264
3288
  export const getDocumentNode: (node: Node & ParentNode) => Document;
3265
- export const getLoginTypePipe: (publicConfig: ApplicationConfig, registerMethod: RegisterMethods) => {
3266
- specifyDefaultLoginMethod: LoginMethods;
3267
- lockMethod: string;
3268
- } | {
3269
- specifyDefaultLoginMethod: LoginMethods;
3270
- lockMethod?: undefined;
3271
- } | undefined;
3272
3289
 
3273
3290
  }
3274
3291
  declare module '@authing/react-ui-components/components/_utils/initAppId' {
@@ -3463,7 +3480,7 @@ declare module '@authing/react-ui-components/components/version/index' {
3463
3480
 
3464
3481
  }
3465
3482
  declare module '@authing/react-ui-components/components/version/version' {
3466
- const _default: "3.1.20-rc.9";
3483
+ const _default: "3.1.22";
3467
3484
  export default _default;
3468
3485
 
3469
3486
  }