@authing/react-ui-components 3.1.22-rc-7 → 3.1.22-rc-8

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,10 +378,9 @@ 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 } from '@authing/react-ui-components/components/AuthingGuard/types/index';
381
+ import { Lang, LoginMethods, Protocol, RegisterMethods } 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';
385
384
  export enum ApplicationMfaType {
386
385
  SMS = "SMS",
387
386
  EMAIL = "EMAIL"
@@ -466,8 +465,8 @@ declare module '@authing/react-ui-components/components/AuthingGuard/api/appConf
466
465
  [x: string]: string;
467
466
  };
468
467
  registerTypeConfig: {
469
- emailRegisterType?: NewRegisterMethods[];
470
- phoneRegisterType?: NewRegisterMethods[];
468
+ emailRegisterType?: RegisterMethods[];
469
+ phoneRegisterType?: RegisterMethods[];
471
470
  };
472
471
  };
473
472
  qrcodeTabsSettings: QrcodeTabsSettings;
@@ -638,7 +637,7 @@ declare module '@authing/react-ui-components/components/AuthingGuard/api/userPoo
638
637
 
639
638
  }
640
639
  declare module '@authing/react-ui-components/components/AuthingGuard/constants' {
641
- import { UserConfig, LoginMethods, RegisterMethods, LocalesConfig } from '@authing/react-ui-components/components/AuthingGuard/types/index';
640
+ import { UserConfig, LoginMethods, LocalesConfig } from '@authing/react-ui-components/components/AuthingGuard/types/index';
642
641
  export const OTP_MFA_CODE = 1635;
643
642
  export const APP_MFA_CODE = 1636;
644
643
  export const NEED_CAPTCHA = 2000;
@@ -651,10 +650,7 @@ declare module '@authing/react-ui-components/components/AuthingGuard/constants'
651
650
  ad: string;
652
651
  "wechatmp-qrcode": string;
653
652
  };
654
- export const REGISTER_METHODS_MAP: () => {
655
- email: string;
656
- phone: string;
657
- };
653
+ export const REGISTER_METHODS_MAP: any;
658
654
  export const HIDE_SOCIALS: string[];
659
655
  export const HIDE_SOCIALS_SHOWIN_ENTERPRISE: string[];
660
656
  export enum ApplicationMfaType {
@@ -828,7 +824,8 @@ declare module '@authing/react-ui-components/components/AuthingGuard/types/Guard
828
824
  }
829
825
  export enum RegisterMethods {
830
826
  Email = "email",
831
- Phone = "phone"
827
+ Phone = "phone",
828
+ EmailCode = "emailCode"
832
829
  }
833
830
  export enum GuardScenes {
834
831
  Login = "login",
@@ -1335,6 +1332,8 @@ declare module '@authing/react-ui-components/components/CompleteInfo/interface'
1335
1332
  export interface RegisterCompleteInfoInitData {
1336
1333
  content: any;
1337
1334
  businessRequestName: 'registerByEmail' | 'registerByPhoneCode' | 'registerByEmailCode';
1335
+ onRegisterFailed: Function;
1336
+ onRegisterSuccess: Function;
1338
1337
  }
1339
1338
  export interface RegisterCompletePasswordInitData extends RegisterCompleteInfoInitData {
1340
1339
  isChangeComplete: boolean;
@@ -2011,8 +2010,9 @@ declare module '@authing/react-ui-components/components/Login/core/withVerifyCod
2011
2010
  import { VerifyLoginMethods } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2012
2011
  export interface FormItemIdentifyProps extends FormItemProps {
2013
2012
  checkRepeat?: boolean;
2013
+ checkExist?: boolean;
2014
2014
  methods: VerifyLoginMethods[];
2015
- currentMethod?: 'phone-code' | 'email-code';
2015
+ currentMethod: 'phone-code' | 'email-code';
2016
2016
  areaCode?: string;
2017
2017
  }
2018
2018
  export const FormItemIdentify: React.FC<FormItemIdentifyProps>;
@@ -2117,6 +2117,11 @@ declare module '@authing/react-ui-components/components/Login/interface' {
2117
2117
  export interface GuardLoginViewProps extends GuardLoginProps, IG2FCViewProps {
2118
2118
  config: LoginConfig;
2119
2119
  }
2120
+ export interface GuardLoginInitData {
2121
+ specifyDefaultLoginMethod?: LoginMethods;
2122
+ _firstItemInitialValue?: string;
2123
+ _lockMethod?: string;
2124
+ }
2120
2125
  export const getDefaultLoginConfig: () => LoginConfig;
2121
2126
 
2122
2127
  }
@@ -2477,6 +2482,21 @@ declare module '@authing/react-ui-components/components/Register/components/Agre
2477
2482
  }
2478
2483
  export const Agreements: FC<AgreementsProps>;
2479
2484
 
2485
+ }
2486
+ declare module '@authing/react-ui-components/components/Register/core/WithCode' {
2487
+ import React from 'react';
2488
+ import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2489
+ export interface RegisterWithCodeProps {
2490
+ onRegisterSuccess: Function;
2491
+ onRegisterFailed: Function;
2492
+ onBeforeRegister?: Function;
2493
+ agreements: Agreement[];
2494
+ publicConfig?: ApplicationConfig;
2495
+ registeContext?: any;
2496
+ methods: any[];
2497
+ }
2498
+ export const RegisterWithCode: React.FC<RegisterWithCodeProps>;
2499
+
2480
2500
  }
2481
2501
  declare module '@authing/react-ui-components/components/Register/core/WithEmail' {
2482
2502
  import React from 'react';
@@ -2525,13 +2545,13 @@ declare module '@authing/react-ui-components/components/Register/index' {
2525
2545
 
2526
2546
  }
2527
2547
  declare module '@authing/react-ui-components/components/Register/interface' {
2528
- import { IG2FCProps, IG2Config, IG2Events, NewRegisterMethods } from '@authing/react-ui-components/components/Type/index';
2529
- import { AuthenticationClient, User, EmailRegisterParams, PhoneRegisterParams } from '@authing/react-ui-components/components/index';
2548
+ import { IG2FCProps, IG2Config, IG2Events } from '@authing/react-ui-components/components/Type/index';
2549
+ import { AuthenticationClient, User, EmailRegisterParams, PhoneRegisterParams, RegisterMethods } from '@authing/react-ui-components/components/index';
2530
2550
  import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2531
2551
  export interface RegisterConfig extends IG2Config {
2532
2552
  disableRegister?: boolean;
2533
- registerMethods?: NewRegisterMethods[];
2534
- defaultRegisterMethod?: NewRegisterMethods;
2553
+ registerMethods?: RegisterMethods[];
2554
+ defaultRegisterMethod?: RegisterMethods;
2535
2555
  publicKey?: string;
2536
2556
  agreementEnabled?: boolean;
2537
2557
  agreements?: Agreement[];
@@ -2541,7 +2561,7 @@ declare module '@authing/react-ui-components/components/Register/interface' {
2541
2561
  onBeforeRegister?: (registerInfo: EmailRegisterParams | PhoneRegisterParams, authClient: AuthenticationClient) => boolean | Promise<boolean>;
2542
2562
  onRegister?: (user: User, authClient: AuthenticationClient) => void;
2543
2563
  onRegisterError?: (error: any) => void;
2544
- onRegisterTabChange?: (activeTab: NewRegisterMethods) => void;
2564
+ onRegisterTabChange?: (activeTab: RegisterMethods) => void;
2545
2565
  }
2546
2566
  export interface GuardRegisterProps extends IG2FCProps, RegisterEvents {
2547
2567
  config?: Partial<RegisterConfig>;
@@ -2774,11 +2794,6 @@ declare module '@authing/react-ui-components/components/Type/index' {
2774
2794
  showChangeLanguage: boolean;
2775
2795
  };
2776
2796
  }
2777
- export enum NewRegisterMethods {
2778
- Email = "email",
2779
- Phone = "phone",
2780
- EmailCode = "emailCode"
2781
- }
2782
2797
  export enum EmailScene {
2783
2798
  WELCOME_EMAIL = "WELCOME_EMAIL",
2784
2799
  FIRST_CREATED_USER = "FIRST_CREATED_USER",
@@ -2820,12 +2835,11 @@ declare module '@authing/react-ui-components/components/ValidatorRules/index' {
2820
2835
  export interface ValidatorFormItemProps extends FormItemProps {
2821
2836
  form?: FormInstance;
2822
2837
  checkRepeat?: boolean;
2838
+ checkExist?: boolean;
2823
2839
  areaCode?: string;
2824
2840
  isCheckI18nSms?: boolean;
2825
2841
  }
2826
2842
  export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
2827
- form?: FormInstance;
2828
- checkRepeat?: boolean;
2829
2843
  method: 'email' | 'phone' | 'username';
2830
2844
  }
2831
2845
  export interface PasswordFormItemProps extends FormItemProps {
@@ -2891,8 +2905,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2891
2905
  import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2892
2906
  import { GuardComponentConfig, GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
2893
2907
  import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
2894
- import { NewRegisterMethods } from '@authing/react-ui-components/components/Type/index';
2895
2908
  import { GuardPageConfig } from '@authing/react-ui-components/components/Type/index';
2909
+ import { RegisterMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
2896
2910
  export const getPublicConfig: (appId: string) => ApplicationConfig;
2897
2911
  export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
2898
2912
  export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
@@ -2906,8 +2920,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2906
2920
  openEventsMapping?: boolean | undefined;
2907
2921
  _qrCodeScanOptions?: Record<import("@authing/react-ui-components/components/Guard/config").QrCodeScanType, import("../../Guard/config").QrCodeScanOptions> | undefined;
2908
2922
  disableRegister?: boolean | undefined;
2909
- registerMethods?: NewRegisterMethods[] | undefined;
2910
- defaultRegisterMethod?: NewRegisterMethods | undefined;
2923
+ registerMethods?: RegisterMethods[] | undefined;
2924
+ defaultRegisterMethod?: RegisterMethods | undefined;
2911
2925
  publicKey?: string | undefined;
2912
2926
  agreementEnabled?: boolean | undefined;
2913
2927
  agreements?: import("@authing/react-ui-components/components/AuthingGuard/api/index").Agreement[] | undefined;
@@ -2917,7 +2931,7 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2917
2931
  lang: string;
2918
2932
  langRange: string[];
2919
2933
  isHost?: boolean | undefined;
2920
- mode: import("@authing/react-ui-components/components/index").GuardMode;
2934
+ mode: import("@authing/react-ui-components/components/AuthingGuard/types/index").GuardMode;
2921
2935
  clickCloseable: boolean;
2922
2936
  escCloseable: boolean;
2923
2937
  userpool?: string | undefined;
@@ -2928,8 +2942,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2928
2942
  __unAuthFlow__?: boolean | undefined;
2929
2943
  autoRegister?: boolean | undefined;
2930
2944
  disableResetPwd?: boolean | undefined;
2931
- defaultLoginMethod?: import("@authing/react-ui-components/components/index").LoginMethods | undefined;
2932
- loginMethods?: import("@authing/react-ui-components/components/index").LoginMethods[] | undefined;
2945
+ defaultLoginMethod?: import("@authing/react-ui-components/components/AuthingGuard/types/index").LoginMethods | undefined;
2946
+ loginMethods?: import("@authing/react-ui-components/components/AuthingGuard/types/index").LoginMethods[] | undefined;
2933
2947
  passwordLoginMethods?: import("@authing/react-ui-components/components/AuthingGuard/api/index").PasswordLoginMethods[] | undefined;
2934
2948
  socialConnections?: import("authing-js-sdk").SocialConnectionProvider[] | undefined;
2935
2949
  socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
@@ -3214,7 +3228,7 @@ declare module '@authing/react-ui-components/components/_utils/index' {
3214
3228
  import { User } from 'authing-js-sdk';
3215
3229
  import { ApplicationConfig, ComplateFiledsPlace } from '@authing/react-ui-components/components/AuthingGuard/api/index';
3216
3230
  import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
3217
- import { NewRegisterMethods } from '@authing/react-ui-components/components/Type/index';
3231
+ import { LoginMethods, RegisterMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
3218
3232
  export * from '@authing/react-ui-components/components/_utils/popupCenter';
3219
3233
  export * from '@authing/react-ui-components/components/_utils/clipboard';
3220
3234
  export const VALIDATE_PATTERN: {
@@ -3283,12 +3297,19 @@ declare module '@authing/react-ui-components/components/_utils/index' {
3283
3297
  export const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string | undefined) => Rule[];
3284
3298
  export const sleep: (delay: number) => Promise<unknown>;
3285
3299
  export const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean | undefined) => boolean;
3286
- export const tabSort: (defaultValue: NewRegisterMethods, tabList: NewRegisterMethods[]) => NewRegisterMethods[];
3300
+ export const tabSort: (defaultValue: any, tabList: RegisterMethods[]) => RegisterMethods[];
3287
3301
  export const mailDesensitization: (mail: string) => string;
3288
3302
  export const phoneDesensitization: (phone: string) => string;
3289
3303
  export const getHundreds: (num: number) => number;
3290
3304
  export const GuardPropsFilter: (pre: GuardProps, current: GuardProps) => boolean;
3291
3305
  export const getDocumentNode: (node: Node & ParentNode) => Document;
3306
+ export const getLoginTypePipe: (publicConfig: ApplicationConfig, registerMethod: RegisterMethods) => {
3307
+ specifyDefaultLoginMethod: LoginMethods;
3308
+ lockMethod: string;
3309
+ } | {
3310
+ specifyDefaultLoginMethod: LoginMethods;
3311
+ lockMethod?: undefined;
3312
+ } | undefined;
3292
3313
 
3293
3314
  }
3294
3315
  declare module '@authing/react-ui-components/components/_utils/initAppId' {
@@ -3483,7 +3504,7 @@ declare module '@authing/react-ui-components/components/version/index' {
3483
3504
 
3484
3505
  }
3485
3506
  declare module '@authing/react-ui-components/components/version/version' {
3486
- const _default: "3.1.22-rc-7";
3507
+ const _default: "3.1.22-rc-8";
3487
3508
  export default _default;
3488
3509
 
3489
3510
  }