@authing/react-ui-components 3.1.22 → 3.1.23-rc.0

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;
@@ -2010,8 +2009,9 @@ declare module '@authing/react-ui-components/components/Login/core/withVerifyCod
2010
2009
  import { VerifyLoginMethods } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2011
2010
  export interface FormItemIdentifyProps extends FormItemProps {
2012
2011
  checkRepeat?: boolean;
2012
+ checkExist?: boolean;
2013
2013
  methods: VerifyLoginMethods[];
2014
- currentMethod?: 'phone-code' | 'email-code';
2014
+ currentMethod: 'phone-code' | 'email-code';
2015
2015
  areaCode?: string;
2016
2016
  }
2017
2017
  export const FormItemIdentify: React.FC<FormItemIdentifyProps>;
@@ -2116,6 +2116,11 @@ declare module '@authing/react-ui-components/components/Login/interface' {
2116
2116
  export interface GuardLoginViewProps extends GuardLoginProps, IG2FCViewProps {
2117
2117
  config: LoginConfig;
2118
2118
  }
2119
+ export interface GuardLoginInitData {
2120
+ specifyDefaultLoginMethod?: LoginMethods;
2121
+ _firstItemInitialValue?: string;
2122
+ _lockMethod?: string;
2123
+ }
2119
2124
  export const getDefaultLoginConfig: () => LoginConfig;
2120
2125
 
2121
2126
  }
@@ -2476,6 +2481,21 @@ declare module '@authing/react-ui-components/components/Register/components/Agre
2476
2481
  }
2477
2482
  export const Agreements: FC<AgreementsProps>;
2478
2483
 
2484
+ }
2485
+ declare module '@authing/react-ui-components/components/Register/core/WithCode' {
2486
+ import React from 'react';
2487
+ import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2488
+ export interface RegisterWithCodeProps {
2489
+ onRegisterSuccess: Function;
2490
+ onRegisterFailed: Function;
2491
+ onBeforeRegister?: Function;
2492
+ agreements: Agreement[];
2493
+ publicConfig?: ApplicationConfig;
2494
+ registeContext?: any;
2495
+ methods: any[];
2496
+ }
2497
+ export const RegisterWithCode: React.FC<RegisterWithCodeProps>;
2498
+
2479
2499
  }
2480
2500
  declare module '@authing/react-ui-components/components/Register/core/WithEmail' {
2481
2501
  import React from 'react';
@@ -2524,13 +2544,13 @@ declare module '@authing/react-ui-components/components/Register/index' {
2524
2544
 
2525
2545
  }
2526
2546
  declare module '@authing/react-ui-components/components/Register/interface' {
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';
2547
+ import { IG2FCProps, IG2Config, IG2Events } from '@authing/react-ui-components/components/Type/index';
2548
+ import { AuthenticationClient, User, EmailRegisterParams, PhoneRegisterParams, RegisterMethods } from '@authing/react-ui-components/components/index';
2529
2549
  import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2530
2550
  export interface RegisterConfig extends IG2Config {
2531
2551
  disableRegister?: boolean;
2532
- registerMethods?: NewRegisterMethods[];
2533
- defaultRegisterMethod?: NewRegisterMethods;
2552
+ registerMethods?: RegisterMethods[];
2553
+ defaultRegisterMethod?: RegisterMethods;
2534
2554
  publicKey?: string;
2535
2555
  agreementEnabled?: boolean;
2536
2556
  agreements?: Agreement[];
@@ -2540,7 +2560,7 @@ declare module '@authing/react-ui-components/components/Register/interface' {
2540
2560
  onBeforeRegister?: (registerInfo: EmailRegisterParams | PhoneRegisterParams, authClient: AuthenticationClient) => boolean | Promise<boolean>;
2541
2561
  onRegister?: (user: User, authClient: AuthenticationClient) => void;
2542
2562
  onRegisterError?: (error: any) => void;
2543
- onRegisterTabChange?: (activeTab: NewRegisterMethods) => void;
2563
+ onRegisterTabChange?: (activeTab: RegisterMethods) => void;
2544
2564
  }
2545
2565
  export interface GuardRegisterProps extends IG2FCProps, RegisterEvents {
2546
2566
  config?: Partial<RegisterConfig>;
@@ -2771,11 +2791,6 @@ declare module '@authing/react-ui-components/components/Type/index' {
2771
2791
  showChangeLanguage: boolean;
2772
2792
  };
2773
2793
  }
2774
- export enum NewRegisterMethods {
2775
- Email = "email",
2776
- Phone = "phone",
2777
- EmailCode = "emailCode"
2778
- }
2779
2794
  export enum EmailScene {
2780
2795
  WELCOME_EMAIL = "WELCOME_EMAIL",
2781
2796
  FIRST_CREATED_USER = "FIRST_CREATED_USER",
@@ -2817,12 +2832,11 @@ declare module '@authing/react-ui-components/components/ValidatorRules/index' {
2817
2832
  export interface ValidatorFormItemProps extends FormItemProps {
2818
2833
  form?: FormInstance;
2819
2834
  checkRepeat?: boolean;
2835
+ checkExist?: boolean;
2820
2836
  areaCode?: string;
2821
2837
  isCheckI18nSms?: boolean;
2822
2838
  }
2823
2839
  export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
2824
- form?: FormInstance;
2825
- checkRepeat?: boolean;
2826
2840
  method: 'email' | 'phone' | 'username';
2827
2841
  }
2828
2842
  export interface PasswordFormItemProps extends FormItemProps {
@@ -2888,8 +2902,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2888
2902
  import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2889
2903
  import { GuardComponentConfig, GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
2890
2904
  import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
2891
- import { NewRegisterMethods } from '@authing/react-ui-components/components/Type/index';
2892
2905
  import { GuardPageConfig } from '@authing/react-ui-components/components/Type/index';
2906
+ import { RegisterMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
2893
2907
  export const getPublicConfig: (appId: string) => ApplicationConfig;
2894
2908
  export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
2895
2909
  export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
@@ -2903,8 +2917,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2903
2917
  openEventsMapping?: boolean | undefined;
2904
2918
  _qrCodeScanOptions?: Record<import("@authing/react-ui-components/components/Guard/config").QrCodeScanType, import("../../Guard/config").QrCodeScanOptions> | undefined;
2905
2919
  disableRegister?: boolean | undefined;
2906
- registerMethods?: NewRegisterMethods[] | undefined;
2907
- defaultRegisterMethod?: NewRegisterMethods | undefined;
2920
+ registerMethods?: RegisterMethods[] | undefined;
2921
+ defaultRegisterMethod?: RegisterMethods | undefined;
2908
2922
  publicKey?: string | undefined;
2909
2923
  agreementEnabled?: boolean | undefined;
2910
2924
  agreements?: import("@authing/react-ui-components/components/AuthingGuard/api/index").Agreement[] | undefined;
@@ -2914,7 +2928,7 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2914
2928
  lang: string;
2915
2929
  langRange: string[];
2916
2930
  isHost?: boolean | undefined;
2917
- mode: import("@authing/react-ui-components/components/index").GuardMode;
2931
+ mode: import("@authing/react-ui-components/components/AuthingGuard/types/index").GuardMode;
2918
2932
  clickCloseable: boolean;
2919
2933
  escCloseable: boolean;
2920
2934
  userpool?: string | undefined;
@@ -2925,8 +2939,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2925
2939
  __unAuthFlow__?: boolean | undefined;
2926
2940
  autoRegister?: boolean | undefined;
2927
2941
  disableResetPwd?: boolean | undefined;
2928
- defaultLoginMethod?: import("@authing/react-ui-components/components/index").LoginMethods | undefined;
2929
- loginMethods?: import("@authing/react-ui-components/components/index").LoginMethods[] | undefined;
2942
+ defaultLoginMethod?: import("@authing/react-ui-components/components/AuthingGuard/types/index").LoginMethods | undefined;
2943
+ loginMethods?: import("@authing/react-ui-components/components/AuthingGuard/types/index").LoginMethods[] | undefined;
2930
2944
  passwordLoginMethods?: import("@authing/react-ui-components/components/AuthingGuard/api/index").PasswordLoginMethods[] | undefined;
2931
2945
  socialConnections?: import("authing-js-sdk").SocialConnectionProvider[] | undefined;
2932
2946
  socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
@@ -3159,6 +3173,10 @@ declare module '@authing/react-ui-components/components/_utils/hooks/index' {
3159
3173
  countryCode: string | undefined;
3160
3174
  phoneNumber: string;
3161
3175
  };
3176
+ export enum SocialConnectionEvent {
3177
+ Message = "message",
3178
+ Auth = "auth"
3179
+ }
3162
3180
  /**
3163
3181
  *
3164
3182
  * @param config
@@ -3211,7 +3229,7 @@ declare module '@authing/react-ui-components/components/_utils/index' {
3211
3229
  import { User } from 'authing-js-sdk';
3212
3230
  import { ApplicationConfig, ComplateFiledsPlace } from '@authing/react-ui-components/components/AuthingGuard/api/index';
3213
3231
  import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
3214
- import { NewRegisterMethods } from '@authing/react-ui-components/components/Type/index';
3232
+ import { LoginMethods, RegisterMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
3215
3233
  export * from '@authing/react-ui-components/components/_utils/popupCenter';
3216
3234
  export * from '@authing/react-ui-components/components/_utils/clipboard';
3217
3235
  export const VALIDATE_PATTERN: {
@@ -3280,12 +3298,19 @@ declare module '@authing/react-ui-components/components/_utils/index' {
3280
3298
  export const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string | undefined) => Rule[];
3281
3299
  export const sleep: (delay: number) => Promise<unknown>;
3282
3300
  export const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean | undefined) => boolean;
3283
- export const tabSort: (defaultValue: NewRegisterMethods, tabList: NewRegisterMethods[]) => NewRegisterMethods[];
3301
+ export const tabSort: (defaultValue: any, tabList: RegisterMethods[]) => RegisterMethods[];
3284
3302
  export const mailDesensitization: (mail: string) => string;
3285
3303
  export const phoneDesensitization: (phone: string) => string;
3286
3304
  export const getHundreds: (num: number) => number;
3287
3305
  export const GuardPropsFilter: (pre: GuardProps, current: GuardProps) => boolean;
3288
3306
  export const getDocumentNode: (node: Node & ParentNode) => Document;
3307
+ export const getLoginTypePipe: (publicConfig: ApplicationConfig, registerMethod: RegisterMethods) => {
3308
+ specifyDefaultLoginMethod: LoginMethods;
3309
+ lockMethod: string;
3310
+ } | {
3311
+ specifyDefaultLoginMethod: LoginMethods;
3312
+ lockMethod?: undefined;
3313
+ } | undefined;
3289
3314
 
3290
3315
  }
3291
3316
  declare module '@authing/react-ui-components/components/_utils/initAppId' {
@@ -3480,7 +3505,7 @@ declare module '@authing/react-ui-components/components/version/index' {
3480
3505
 
3481
3506
  }
3482
3507
  declare module '@authing/react-ui-components/components/version/version' {
3483
- const _default: "3.1.22";
3508
+ const _default: "3.1.23-rc.0";
3484
3509
  export default _default;
3485
3510
 
3486
3511
  }