@authing/react-ui-components 3.1.21 → 3.1.22-rc.3
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 +79 -33
- package/lib/index.min.css +2 -2
- package/lib/index.min.js +1 -1
- package/package.json +4 -4
- package/LICENSE +0 -21
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?:
|
|
470
|
-
phoneRegisterType?:
|
|
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,
|
|
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;
|
|
@@ -1501,6 +1500,7 @@ declare module '@authing/react-ui-components/components/Guard/GuardModule/stateM
|
|
|
1501
1500
|
private changeModuleEvent;
|
|
1502
1501
|
private stateMachineLog;
|
|
1503
1502
|
constructor(changeModuleEvent: ChangeModuleEvent, initData: ModuleState);
|
|
1503
|
+
uninstallPopstate: () => void;
|
|
1504
1504
|
globalWindow: () => Window | undefined;
|
|
1505
1505
|
next: (nextModule: GuardModuleType, initData: any) => void;
|
|
1506
1506
|
back: (initData?: any) => void;
|
|
@@ -1508,8 +1508,9 @@ declare module '@authing/react-ui-components/components/Guard/GuardModule/stateM
|
|
|
1508
1508
|
historyPush: (data: ModuleState, actionType?: ActionType) => void;
|
|
1509
1509
|
historyBack: (data: ModuleState) => void;
|
|
1510
1510
|
setConfig: (config: GuardLocalConfig) => void;
|
|
1511
|
+
isUseHistoryHijack: () => boolean;
|
|
1512
|
+
onPopstate: () => void;
|
|
1511
1513
|
}
|
|
1512
|
-
export const useHistoryHijack: (back?: (() => void) | undefined) => ((state?: any) => void)[];
|
|
1513
1514
|
export const initGuardStateMachine: (changeMouleEvent: ChangeModuleEvent, initData: ModuleState) => GuardStateMachine;
|
|
1514
1515
|
export const getGuardStateMachine: () => GuardStateMachine;
|
|
1515
1516
|
export const useGuardStateMachine: () => GuardStateMachine;
|
|
@@ -1726,6 +1727,19 @@ declare module '@authing/react-ui-components/components/Guard/sso' {
|
|
|
1726
1727
|
}
|
|
1727
1728
|
export const trackSession: () => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<SessionData>>;
|
|
1728
1729
|
|
|
1730
|
+
}
|
|
1731
|
+
declare module '@authing/react-ui-components/components/GuardButton/GuardButton' {
|
|
1732
|
+
import React from 'react';
|
|
1733
|
+
import { ButtonProps } from 'antd/lib/button';
|
|
1734
|
+
import './styles.less';
|
|
1735
|
+
export interface GuardButtonProps extends ButtonProps {
|
|
1736
|
+
}
|
|
1737
|
+
export const GuardButton: React.FC<GuardButtonProps>;
|
|
1738
|
+
|
|
1739
|
+
}
|
|
1740
|
+
declare module '@authing/react-ui-components/components/GuardButton/index' {
|
|
1741
|
+
export * from '@authing/react-ui-components/components/GuardButton/GuardButton';
|
|
1742
|
+
|
|
1729
1743
|
}
|
|
1730
1744
|
declare module '@authing/react-ui-components/components/IconFont/iconfont' {
|
|
1731
1745
|
export const GenerateSvg: (guardDocument: Document, svgString: string) => void;
|
|
@@ -1996,7 +2010,7 @@ declare module '@authing/react-ui-components/components/Login/core/withVerifyCod
|
|
|
1996
2010
|
export interface FormItemIdentifyProps extends FormItemProps {
|
|
1997
2011
|
checkRepeat?: boolean;
|
|
1998
2012
|
methods: VerifyLoginMethods[];
|
|
1999
|
-
currentMethod
|
|
2013
|
+
currentMethod: 'phone-code' | 'email-code';
|
|
2000
2014
|
areaCode?: string;
|
|
2001
2015
|
}
|
|
2002
2016
|
export const FormItemIdentify: React.FC<FormItemIdentifyProps>;
|
|
@@ -2101,6 +2115,11 @@ declare module '@authing/react-ui-components/components/Login/interface' {
|
|
|
2101
2115
|
export interface GuardLoginViewProps extends GuardLoginProps, IG2FCViewProps {
|
|
2102
2116
|
config: LoginConfig;
|
|
2103
2117
|
}
|
|
2118
|
+
export interface GuardLoginInitData {
|
|
2119
|
+
specifyDefaultLoginMethod?: LoginMethods;
|
|
2120
|
+
_firstItemInitialValue?: string;
|
|
2121
|
+
_lockMethod?: string;
|
|
2122
|
+
}
|
|
2104
2123
|
export const getDefaultLoginConfig: () => LoginConfig;
|
|
2105
2124
|
|
|
2106
2125
|
}
|
|
@@ -2461,6 +2480,21 @@ declare module '@authing/react-ui-components/components/Register/components/Agre
|
|
|
2461
2480
|
}
|
|
2462
2481
|
export const Agreements: FC<AgreementsProps>;
|
|
2463
2482
|
|
|
2483
|
+
}
|
|
2484
|
+
declare module '@authing/react-ui-components/components/Register/core/WithCode' {
|
|
2485
|
+
import React from 'react';
|
|
2486
|
+
import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2487
|
+
export interface RegisterWithCodeProps {
|
|
2488
|
+
onRegisterSuccess: Function;
|
|
2489
|
+
onRegisterFailed: Function;
|
|
2490
|
+
onBeforeRegister?: Function;
|
|
2491
|
+
agreements: Agreement[];
|
|
2492
|
+
publicConfig?: ApplicationConfig;
|
|
2493
|
+
registeContext?: any;
|
|
2494
|
+
methods: any[];
|
|
2495
|
+
}
|
|
2496
|
+
export const RegisterWithCode: React.FC<RegisterWithCodeProps>;
|
|
2497
|
+
|
|
2464
2498
|
}
|
|
2465
2499
|
declare module '@authing/react-ui-components/components/Register/core/WithEmail' {
|
|
2466
2500
|
import React from 'react';
|
|
@@ -2509,13 +2543,13 @@ declare module '@authing/react-ui-components/components/Register/index' {
|
|
|
2509
2543
|
|
|
2510
2544
|
}
|
|
2511
2545
|
declare module '@authing/react-ui-components/components/Register/interface' {
|
|
2512
|
-
import { IG2FCProps, IG2Config, IG2Events
|
|
2513
|
-
import { AuthenticationClient, User, EmailRegisterParams, PhoneRegisterParams } from '@authing/react-ui-components/components/index';
|
|
2546
|
+
import { IG2FCProps, IG2Config, IG2Events } from '@authing/react-ui-components/components/Type/index';
|
|
2547
|
+
import { AuthenticationClient, User, EmailRegisterParams, PhoneRegisterParams, RegisterMethods } from '@authing/react-ui-components/components/index';
|
|
2514
2548
|
import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2515
2549
|
export interface RegisterConfig extends IG2Config {
|
|
2516
2550
|
disableRegister?: boolean;
|
|
2517
|
-
registerMethods?:
|
|
2518
|
-
defaultRegisterMethod?:
|
|
2551
|
+
registerMethods?: RegisterMethods[];
|
|
2552
|
+
defaultRegisterMethod?: RegisterMethods;
|
|
2519
2553
|
publicKey?: string;
|
|
2520
2554
|
agreementEnabled?: boolean;
|
|
2521
2555
|
agreements?: Agreement[];
|
|
@@ -2525,7 +2559,7 @@ declare module '@authing/react-ui-components/components/Register/interface' {
|
|
|
2525
2559
|
onBeforeRegister?: (registerInfo: EmailRegisterParams | PhoneRegisterParams, authClient: AuthenticationClient) => boolean | Promise<boolean>;
|
|
2526
2560
|
onRegister?: (user: User, authClient: AuthenticationClient) => void;
|
|
2527
2561
|
onRegisterError?: (error: any) => void;
|
|
2528
|
-
onRegisterTabChange?: (activeTab:
|
|
2562
|
+
onRegisterTabChange?: (activeTab: RegisterMethods) => void;
|
|
2529
2563
|
}
|
|
2530
2564
|
export interface GuardRegisterProps extends IG2FCProps, RegisterEvents {
|
|
2531
2565
|
config?: Partial<RegisterConfig>;
|
|
@@ -2655,7 +2689,8 @@ declare module '@authing/react-ui-components/components/SingleComponent/index' {
|
|
|
2655
2689
|
}
|
|
2656
2690
|
declare module '@authing/react-ui-components/components/SubmitButton/index' {
|
|
2657
2691
|
import React from 'react';
|
|
2658
|
-
|
|
2692
|
+
import { ButtonProps } from 'antd/lib/button';
|
|
2693
|
+
interface SubmitButtonProps extends ButtonProps {
|
|
2659
2694
|
text?: string;
|
|
2660
2695
|
className?: string;
|
|
2661
2696
|
onClick?: any;
|
|
@@ -2755,11 +2790,6 @@ declare module '@authing/react-ui-components/components/Type/index' {
|
|
|
2755
2790
|
showChangeLanguage: boolean;
|
|
2756
2791
|
};
|
|
2757
2792
|
}
|
|
2758
|
-
export enum NewRegisterMethods {
|
|
2759
|
-
Email = "email",
|
|
2760
|
-
Phone = "phone",
|
|
2761
|
-
EmailCode = "emailCode"
|
|
2762
|
-
}
|
|
2763
2793
|
export enum EmailScene {
|
|
2764
2794
|
WELCOME_EMAIL = "WELCOME_EMAIL",
|
|
2765
2795
|
FIRST_CREATED_USER = "FIRST_CREATED_USER",
|
|
@@ -2872,8 +2902,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
|
|
|
2872
2902
|
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2873
2903
|
import { GuardComponentConfig, GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
|
|
2874
2904
|
import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
|
|
2875
|
-
import { NewRegisterMethods } from '@authing/react-ui-components/components/Type/index';
|
|
2876
2905
|
import { GuardPageConfig } from '@authing/react-ui-components/components/Type/index';
|
|
2906
|
+
import { RegisterMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
|
|
2877
2907
|
export const getPublicConfig: (appId: string) => ApplicationConfig;
|
|
2878
2908
|
export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
|
|
2879
2909
|
export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
|
|
@@ -2887,8 +2917,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
|
|
|
2887
2917
|
openEventsMapping?: boolean | undefined;
|
|
2888
2918
|
_qrCodeScanOptions?: Record<import("@authing/react-ui-components/components/Guard/config").QrCodeScanType, import("../../Guard/config").QrCodeScanOptions> | undefined;
|
|
2889
2919
|
disableRegister?: boolean | undefined;
|
|
2890
|
-
registerMethods?:
|
|
2891
|
-
defaultRegisterMethod?:
|
|
2920
|
+
registerMethods?: RegisterMethods[] | undefined;
|
|
2921
|
+
defaultRegisterMethod?: RegisterMethods | undefined;
|
|
2892
2922
|
publicKey?: string | undefined;
|
|
2893
2923
|
agreementEnabled?: boolean | undefined;
|
|
2894
2924
|
agreements?: import("@authing/react-ui-components/components/AuthingGuard/api/index").Agreement[] | undefined;
|
|
@@ -2898,7 +2928,7 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
|
|
|
2898
2928
|
lang: string;
|
|
2899
2929
|
langRange: string[];
|
|
2900
2930
|
isHost?: boolean | undefined;
|
|
2901
|
-
mode: import("@authing/react-ui-components/components/index").GuardMode;
|
|
2931
|
+
mode: import("@authing/react-ui-components/components/AuthingGuard/types/index").GuardMode;
|
|
2902
2932
|
clickCloseable: boolean;
|
|
2903
2933
|
escCloseable: boolean;
|
|
2904
2934
|
userpool?: string | undefined;
|
|
@@ -2909,8 +2939,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
|
|
|
2909
2939
|
__unAuthFlow__?: boolean | undefined;
|
|
2910
2940
|
autoRegister?: boolean | undefined;
|
|
2911
2941
|
disableResetPwd?: boolean | undefined;
|
|
2912
|
-
defaultLoginMethod?: import("@authing/react-ui-components/components/index").LoginMethods | undefined;
|
|
2913
|
-
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;
|
|
2914
2944
|
passwordLoginMethods?: import("@authing/react-ui-components/components/AuthingGuard/api/index").PasswordLoginMethods[] | undefined;
|
|
2915
2945
|
socialConnections?: import("authing-js-sdk").SocialConnectionProvider[] | undefined;
|
|
2916
2946
|
socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
|
|
@@ -2999,6 +3029,14 @@ declare module '@authing/react-ui-components/components/_utils/context' {
|
|
|
2999
3029
|
}>;
|
|
3000
3030
|
Consumer: React.Consumer<IGuardContext>;
|
|
3001
3031
|
};
|
|
3032
|
+
export interface IGuardContextProvider {
|
|
3033
|
+
spin: boolean;
|
|
3034
|
+
spinChange: (spin: boolean) => void;
|
|
3035
|
+
}
|
|
3036
|
+
export const useGuardButtonContext: () => {
|
|
3037
|
+
GuardButtonProvider: React.FC<{}>;
|
|
3038
|
+
};
|
|
3039
|
+
export const useGuardButtonState: () => IGuardContextProvider;
|
|
3002
3040
|
export const useGuardPublicConfig: () => ApplicationConfig;
|
|
3003
3041
|
export const useGuardHttpClient: () => GuardHttp;
|
|
3004
3042
|
export const useGuardDefaultMergedConfig: () => GuardLocalConfig;
|
|
@@ -3048,7 +3086,8 @@ declare module '@authing/react-ui-components/components/_utils/errorFace' {
|
|
|
3048
3086
|
}
|
|
3049
3087
|
declare module '@authing/react-ui-components/components/_utils/facePlugin/index' {
|
|
3050
3088
|
import { FacePlugin } from '@authing/react-ui-components/components/_utils/facePlugin/interface';
|
|
3051
|
-
export const getFacePlugin: () => FacePlugin;
|
|
3089
|
+
export const getFacePlugin: () => FacePlugin | undefined;
|
|
3090
|
+
export const useFacePlugin: () => FacePlugin | undefined;
|
|
3052
3091
|
export const initFacePlugin: (facePlugin: FacePlugin) => FacePlugin;
|
|
3053
3092
|
|
|
3054
3093
|
}
|
|
@@ -3186,7 +3225,7 @@ declare module '@authing/react-ui-components/components/_utils/index' {
|
|
|
3186
3225
|
import { User } from 'authing-js-sdk';
|
|
3187
3226
|
import { ApplicationConfig, ComplateFiledsPlace } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
3188
3227
|
import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
|
|
3189
|
-
import {
|
|
3228
|
+
import { LoginMethods, RegisterMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
|
|
3190
3229
|
export * from '@authing/react-ui-components/components/_utils/popupCenter';
|
|
3191
3230
|
export * from '@authing/react-ui-components/components/_utils/clipboard';
|
|
3192
3231
|
export const VALIDATE_PATTERN: {
|
|
@@ -3255,12 +3294,19 @@ declare module '@authing/react-ui-components/components/_utils/index' {
|
|
|
3255
3294
|
export const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string | undefined) => Rule[];
|
|
3256
3295
|
export const sleep: (delay: number) => Promise<unknown>;
|
|
3257
3296
|
export const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean | undefined) => boolean;
|
|
3258
|
-
export const tabSort: (defaultValue:
|
|
3297
|
+
export const tabSort: (defaultValue: any, tabList: RegisterMethods[]) => RegisterMethods[];
|
|
3259
3298
|
export const mailDesensitization: (mail: string) => string;
|
|
3260
3299
|
export const phoneDesensitization: (phone: string) => string;
|
|
3261
3300
|
export const getHundreds: (num: number) => number;
|
|
3262
3301
|
export const GuardPropsFilter: (pre: GuardProps, current: GuardProps) => boolean;
|
|
3263
3302
|
export const getDocumentNode: (node: Node & ParentNode) => Document;
|
|
3303
|
+
export const getLoginTypePipe: (publicConfig: ApplicationConfig, registerMethod: RegisterMethods) => {
|
|
3304
|
+
specifyDefaultLoginMethod: LoginMethods;
|
|
3305
|
+
lockMethod: string;
|
|
3306
|
+
} | {
|
|
3307
|
+
specifyDefaultLoginMethod: LoginMethods;
|
|
3308
|
+
lockMethod?: undefined;
|
|
3309
|
+
} | undefined;
|
|
3264
3310
|
|
|
3265
3311
|
}
|
|
3266
3312
|
declare module '@authing/react-ui-components/components/_utils/initAppId' {
|
|
@@ -3455,7 +3501,7 @@ declare module '@authing/react-ui-components/components/version/index' {
|
|
|
3455
3501
|
|
|
3456
3502
|
}
|
|
3457
3503
|
declare module '@authing/react-ui-components/components/version/version' {
|
|
3458
|
-
const _default: "3.1.
|
|
3504
|
+
const _default: "3.1.22-rc.3";
|
|
3459
3505
|
export default _default;
|
|
3460
3506
|
|
|
3461
3507
|
}
|