@authing/react-ui-components 3.1.15-rc.1 → 3.1.15-rc.2

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
@@ -381,6 +381,7 @@ declare module '@authing/react-ui-components/components/AuthingGuard/api/appConf
381
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"
@@ -457,6 +458,17 @@ declare module '@authing/react-ui-components/components/AuthingGuard/api/appConf
457
458
  [x: string]: string;
458
459
  };
459
460
  };
461
+ registerTabsConfig: {
462
+ list: string[];
463
+ default: string;
464
+ title: {
465
+ [x: string]: string;
466
+ };
467
+ registerTypeConfig: {
468
+ emailRegisterType?: NewRegisterMethods[];
469
+ phoneRegisterType?: NewRegisterMethods[];
470
+ };
471
+ };
460
472
  qrcodeTabsSettings: QrcodeTabsSettings;
461
473
  loginTabs: {
462
474
  list: string[];
@@ -1193,14 +1205,15 @@ declare module '@authing/react-ui-components/components/ChangePassword/index' {
1193
1205
 
1194
1206
  }
1195
1207
  declare module '@authing/react-ui-components/components/CompleteInfo/businessRequest' {
1196
- import { CompleteInfoRequest } from '@authing/react-ui-components/components/CompleteInfo/interface';
1208
+ import { User } from 'authing-js-sdk';
1209
+ import { CompleteInfoRequest, RegisterCompleteInfoInitData } from '@authing/react-ui-components/components/CompleteInfo/interface';
1197
1210
  export enum CompleteInfoAuthFlowAction {
1198
1211
  Complete = "complete-completion",
1199
1212
  Skip = "skip-completion"
1200
1213
  }
1201
1214
  export const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1202
- export const registerSkipMethod: (fnName: 'registerByEmail' | 'registerByPhoneCode', content: any) => Promise<import("authing-js-sdk").User> | undefined;
1203
- export const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: 'registerByEmail' | 'registerByPhoneCode', registerContent: any, registerProfile?: any) => Promise<import("authing-js-sdk").User | undefined>;
1215
+ export const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'], content: any) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>> | Promise<User> | undefined;
1216
+ export const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<User | import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any> | undefined>;
1204
1217
 
1205
1218
  }
1206
1219
  declare module '@authing/react-ui-components/components/CompleteInfo/core/completeInfo' {
@@ -1312,7 +1325,7 @@ declare module '@authing/react-ui-components/components/CompleteInfo/interface'
1312
1325
  }
1313
1326
  export interface RegisterCompleteInfoInitData {
1314
1327
  content: any;
1315
- businessRequestName: 'registerByEmail' | 'registerByPhoneCode';
1328
+ businessRequestName: 'registerByEmail' | 'registerByPhoneCode' | 'registerByEmailCode';
1316
1329
  }
1317
1330
  export interface CompleteInfoRequest {
1318
1331
  fieldValues: {
@@ -1323,7 +1336,8 @@ declare module '@authing/react-ui-components/components/CompleteInfo/interface'
1323
1336
  }
1324
1337
  export enum OmitCompleteInfo {
1325
1338
  'registerByEmail' = "email",
1326
- 'registerByPhoneCode' = "phone"
1339
+ 'registerByPhoneCode' = "phone",
1340
+ 'registerByEmailCode' = "email"
1327
1341
  }
1328
1342
 
1329
1343
  }
@@ -2392,6 +2406,20 @@ declare module '@authing/react-ui-components/components/Register/core/WithEmail'
2392
2406
  }
2393
2407
  export const RegisterWithEmail: React.FC<RegisterWithEmailProps>;
2394
2408
 
2409
+ }
2410
+ declare module '@authing/react-ui-components/components/Register/core/WithEmailCode' {
2411
+ import React from 'react';
2412
+ import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2413
+ export interface RegisterWithEmailCodeProps {
2414
+ onRegisterSuccess: Function;
2415
+ onRegisterFailed: Function;
2416
+ onBeforeRegister?: Function;
2417
+ agreements: Agreement[];
2418
+ publicConfig?: ApplicationConfig;
2419
+ registeContext?: any;
2420
+ }
2421
+ export const RegisterWithEmailCode: React.FC<RegisterWithEmailCodeProps>;
2422
+
2395
2423
  }
2396
2424
  declare module '@authing/react-ui-components/components/Register/core/WithPhone' {
2397
2425
  import React from 'react';
@@ -2412,14 +2440,13 @@ declare module '@authing/react-ui-components/components/Register/index' {
2412
2440
 
2413
2441
  }
2414
2442
  declare module '@authing/react-ui-components/components/Register/interface' {
2415
- import { RegisterMethods } from 'authing-js-sdk';
2416
- import { IG2FCProps, IG2Config, IG2Events } from '@authing/react-ui-components/components/Type/index';
2443
+ import { IG2FCProps, IG2Config, IG2Events, NewRegisterMethods } from '@authing/react-ui-components/components/Type/index';
2417
2444
  import { AuthenticationClient, User, EmailRegisterParams, PhoneRegisterParams } from '@authing/react-ui-components/components/index';
2418
2445
  import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2419
2446
  export interface RegisterConfig extends IG2Config {
2420
2447
  disableRegister?: boolean;
2421
- registerMethods?: RegisterMethods[];
2422
- defaultRegisterMethod?: RegisterMethods;
2448
+ registerMethods?: NewRegisterMethods[];
2449
+ defaultRegisterMethod?: NewRegisterMethods;
2423
2450
  publicKey?: string;
2424
2451
  agreementEnabled?: boolean;
2425
2452
  agreements?: Agreement[];
@@ -2429,7 +2456,7 @@ declare module '@authing/react-ui-components/components/Register/interface' {
2429
2456
  onBeforeRegister?: (registerInfo: EmailRegisterParams | PhoneRegisterParams, authClient: AuthenticationClient) => boolean | Promise<boolean>;
2430
2457
  onRegister?: (user: User, authClient: AuthenticationClient) => void;
2431
2458
  onRegisterError?: (error: any) => void;
2432
- onRegisterTabChange?: (activeTab: RegisterMethods) => void;
2459
+ onRegisterTabChange?: (activeTab: NewRegisterMethods) => void;
2433
2460
  }
2434
2461
  export interface GuardRegisterProps extends IG2FCProps, RegisterEvents {
2435
2462
  config?: Partial<RegisterConfig>;
@@ -2463,7 +2490,7 @@ declare module '@authing/react-ui-components/components/SendCode/SendCodeByEmail
2463
2490
  import { InputProps } from 'antd/lib/input';
2464
2491
  import { EmailScene } from '@authing/react-ui-components/components/Type/index';
2465
2492
  export interface SendCodeByEmailProps extends InputProps {
2466
- data: string;
2493
+ data?: string;
2467
2494
  form?: any;
2468
2495
  onSendCodeBefore?: any;
2469
2496
  fieldName?: string;
@@ -2531,6 +2558,7 @@ declare module '@authing/react-ui-components/components/SubmitButton/index' {
2531
2558
  text?: string;
2532
2559
  className?: string;
2533
2560
  onClick?: any;
2561
+ disabled?: boolean;
2534
2562
  }
2535
2563
  const _default: React.ForwardRefExoticComponent<SubmitButtonProps & React.RefAttributes<unknown>>;
2536
2564
  export default _default;
@@ -2625,6 +2653,11 @@ declare module '@authing/react-ui-components/components/Type/index' {
2625
2653
  showChangeLanguage: boolean;
2626
2654
  };
2627
2655
  }
2656
+ export enum NewRegisterMethods {
2657
+ Email = "email",
2658
+ Phone = "phone",
2659
+ EmailCode = "emailCode"
2660
+ }
2628
2661
  export enum EmailScene {
2629
2662
  WELCOME_EMAIL = "WELCOME_EMAIL",
2630
2663
  FIRST_CREATED_USER = "FIRST_CREATED_USER",
@@ -2732,10 +2765,10 @@ declare module '@authing/react-ui-components/components/_utils/clipboard' {
2732
2765
  }
2733
2766
  declare module '@authing/react-ui-components/components/_utils/config/index' {
2734
2767
  /// <reference types="react" />
2735
- import { RegisterMethods } from 'authing-js-sdk';
2736
2768
  import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2737
2769
  import { GuardComponentConfig, GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
2738
2770
  import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
2771
+ import { NewRegisterMethods } from '@authing/react-ui-components/components/Type/index';
2739
2772
  import { GuardPageConfig } from '@authing/react-ui-components/components/Type/index';
2740
2773
  export const getPublicConfig: (appId: string) => ApplicationConfig;
2741
2774
  export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
@@ -2751,8 +2784,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2751
2784
  _qrCodeScanOptions?: Record<import("@authing/react-ui-components/components/Guard/config").QrCodeScanType, import("../../Guard/config").QrCodeScanOptions> | undefined;
2752
2785
  authClient?: import("authing-js-sdk").AuthenticationClient | undefined;
2753
2786
  disableRegister?: boolean | undefined;
2754
- registerMethods?: RegisterMethods[] | undefined;
2755
- defaultRegisterMethod?: RegisterMethods | undefined;
2787
+ registerMethods?: NewRegisterMethods[] | undefined;
2788
+ defaultRegisterMethod?: NewRegisterMethods | undefined;
2756
2789
  publicKey?: string | undefined;
2757
2790
  agreementEnabled?: boolean | undefined;
2758
2791
  agreements?: import("@authing/react-ui-components/components/AuthingGuard/api/index").Agreement[] | undefined;
@@ -3037,9 +3070,10 @@ declare module '@authing/react-ui-components/components/_utils/http' {
3037
3070
  declare module '@authing/react-ui-components/components/_utils/index' {
3038
3071
  import { Rule } from 'antd/lib/form';
3039
3072
  import qs from 'qs';
3040
- import { RegisterMethods, User } from 'authing-js-sdk';
3073
+ import { User } from 'authing-js-sdk';
3041
3074
  import { ApplicationConfig, ComplateFiledsPlace } from '@authing/react-ui-components/components/AuthingGuard/api/index';
3042
3075
  import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
3076
+ import { NewRegisterMethods } from '@authing/react-ui-components/components/Type/index';
3043
3077
  export * from '@authing/react-ui-components/components/_utils/popupCenter';
3044
3078
  export * from '@authing/react-ui-components/components/_utils/clipboard';
3045
3079
  export const VALIDATE_PATTERN: {
@@ -3100,7 +3134,7 @@ declare module '@authing/react-ui-components/components/_utils/index' {
3100
3134
  export const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string | undefined) => Rule[];
3101
3135
  export const sleep: (delay: number) => Promise<unknown>;
3102
3136
  export const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean | undefined) => boolean;
3103
- export const tabSort: (defaultValue: RegisterMethods, tabList: RegisterMethods[]) => RegisterMethods[];
3137
+ export const tabSort: (defaultValue: NewRegisterMethods, tabList: NewRegisterMethods[]) => NewRegisterMethods[];
3104
3138
  export const mailDesensitization: (mail: string) => string;
3105
3139
  export const phoneDesensitization: (phone: string) => string;
3106
3140
  export const getHundreds: (num: number) => number;
@@ -3289,7 +3323,7 @@ declare module '@authing/react-ui-components/components/version/index' {
3289
3323
 
3290
3324
  }
3291
3325
  declare module '@authing/react-ui-components/components/version/version' {
3292
- const _default: "3.1.15-rc.1";
3326
+ const _default: "3.1.15-rc.2";
3293
3327
  export default _default;
3294
3328
 
3295
3329
  }