@authing/react-ui-components 4.1.0-rc.0 → 4.1.0-rc.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/react-ui-components",
3
- "version": "4.1.0-rc.0",
3
+ "version": "4.1.0-rc.10",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "types/index.d.ts",
@@ -1,4 +1,4 @@
1
- export declare const enum BindTotpBusinessAction {
1
+ export declare enum BindTotpBusinessAction {
2
2
  VerifyTotpFirstTime = "verify-totp-first-time",
3
3
  ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
4
4
  }
@@ -1,4 +1,4 @@
1
- export declare const enum ChangePasswordBusinessAction {
1
+ export declare enum ChangePasswordBusinessAction {
2
2
  ResetPassword = "reset-password-first-time",
3
3
  FirstLoginReset = "reset-password-forced",
4
4
  ResetPasswordStrengthDetection = "reset-password-strength-detection"
@@ -1,9 +1,9 @@
1
1
  import { User } from 'authing-js-sdk';
2
2
  import { CompleteInfoRequest, RegisterCompleteInfoInitData } from './interface';
3
- export declare const enum CompleteInfoAuthFlowAction {
3
+ export declare enum CompleteInfoAuthFlowAction {
4
4
  Complete = "complete-completion",
5
5
  Skip = "skip-completion"
6
6
  }
7
7
  export declare const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
8
- export declare const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'], content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>> | undefined;
8
+ export declare const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'] | string, content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
9
9
  export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<User | import("../_utils/http").AuthingGuardResponse<any> | undefined>;
@@ -0,0 +1,4 @@
1
+ import { Input } from 'antd';
2
+ import { PasswordProps } from 'antd/lib/input';
3
+ import React from 'react';
4
+ export declare const InputPasswordForget: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.RefObject<Input>>>;
@@ -0,0 +1,7 @@
1
+ import { InputProps } from 'antd/lib/input';
2
+ import React from 'react';
3
+ import { VerifyLoginMethods } from '../../Type/application';
4
+ export interface InputIdentifyProps extends InputProps {
5
+ methods: VerifyLoginMethods[];
6
+ }
7
+ export declare const InputIdentify: React.FC<InputIdentifyProps>;
@@ -4,8 +4,12 @@ export declare enum InputMethodMap {
4
4
  phone = "phone-code"
5
5
  }
6
6
  interface ResetPasswordProps {
7
- onReset: any;
8
7
  publicConfig: any;
8
+ setPhoneOrEmail: any;
9
+ setControlShow: any;
10
+ setPolicyStrength: any;
11
+ setCustomPasswordStrength: any;
12
+ setPhoneOrEmailText: any;
9
13
  }
10
14
  export declare const ResetPassword: (props: ResetPasswordProps) => JSX.Element;
11
15
  export {};
@@ -4,7 +4,7 @@ export interface ModuleState {
4
4
  moduleName: GuardModuleType;
5
5
  initData?: any;
6
6
  }
7
- export declare const enum ActionType {
7
+ export declare enum ActionType {
8
8
  ChangeModule = "ChangeModule",
9
9
  Back = "Back",
10
10
  Init = "Init"
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { GuardProps } from '..';
3
3
  import '../styles.less';
4
- export declare const enum LangMAP {
4
+ export declare enum LangMAP {
5
5
  zhCn = "zh-CN",
6
6
  enUs = "en-US",
7
7
  jaJp = "ja-JP"
@@ -1,4 +1,4 @@
1
- export declare const enum GuardModuleType {
1
+ export declare enum GuardModuleType {
2
2
  ERROR = "error",
3
3
  LOGIN = "login",
4
4
  REGISTER = "register",
@@ -18,7 +18,8 @@ export declare const enum GuardModuleType {
18
18
  SUBMIT_SUCCESS = "submitSuccess",
19
19
  IDENTITY_BINDING_ASK = "identityBindingAsk",
20
20
  IDENTITY_BINDING = "identityBinding",
21
- SELF_UNLOCK = "selfUnlock"
21
+ SELF_UNLOCK = "selfUnlock",
22
+ FLOW_SELECT_ACCOUNT = "flowSelectAccount"
22
23
  }
23
24
  export interface GuardModuleAction {
24
25
  action: string;
@@ -1,4 +1,4 @@
1
- export declare const enum IdentityBindingBusinessAction {
1
+ export declare enum IdentityBindingBusinessAction {
2
2
  PhoneCode = "phone-code",
3
3
  EmailCode = "emial-code",
4
4
  Password = "password"
@@ -17,7 +17,7 @@ export interface PasswordParams {
17
17
  password: string;
18
18
  captchaCode: string;
19
19
  }
20
- export declare const enum IdentityBindingAction {
20
+ export declare enum IdentityBindingAction {
21
21
  CreateUser = "create-federation-account",
22
22
  BindByPassword = "bind-identity-by-password",
23
23
  BindByPhoneCode = "bind-identity-by-phone-code",
@@ -12,3 +12,4 @@ export interface ImageProProps extends React.ImgHTMLAttributes<HTMLImageElement>
12
12
  noSpin?: boolean;
13
13
  }
14
14
  export declare const ImagePro: (props: ImageProProps) => JSX.Element;
15
+ export declare const ImagePro2: (props: ImageProProps) => JSX.Element;
@@ -1,8 +1,7 @@
1
1
  import { InputProps } from 'antd/lib/input';
2
2
  import React from 'react';
3
- import { PasswordLoginMethods } from '../../../Type/application';
4
3
  export interface InputAccountProps extends InputProps {
5
- passwordLoginMethods: PasswordLoginMethods[];
4
+ passwordLoginMethods: string[];
6
5
  placeholder: string;
7
6
  }
8
7
  export declare const InputAccount: React.FC<InputAccountProps>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { AuthingResponse } from '../../../_utils/http';
3
- import { Agreement, LoginMethods, PasswordLoginMethods } from '../../../Type/application';
3
+ import { Agreement, LoginMethods } from '../../../Type/application';
4
4
  import { BackFillMultipleState, StoreInstance } from '../../../Guard/core/hooks/useMultipleAccounts';
5
5
  interface LoginWithPasswordProps {
6
6
  publicKey: string;
@@ -10,7 +10,7 @@ interface LoginWithPasswordProps {
10
10
  onLoginSuccess?: any;
11
11
  onLoginFailed?: any;
12
12
  onLoginRequest?: (loginInfo: any) => Promise<AuthingResponse>;
13
- passwordLoginMethods: PasswordLoginMethods[];
13
+ passwordLoginMethods: string[];
14
14
  agreements: Agreement[];
15
15
  loginWay?: LoginMethods;
16
16
  submitButText?: string;
@@ -1,14 +1,14 @@
1
1
  import { IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '../Type';
2
2
  import { AuthenticationClient, User } from 'authing-js-sdk';
3
3
  import { QrCodeAuthenticationClient } from 'authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient';
4
- import { Agreement, LoginMethods, PasswordLoginMethods, SocialConnectionProvider } from '../Type/application';
4
+ import { Agreement, LoginMethods, SocialConnectionProvider } from '../Type/application';
5
5
  export interface LoginConfig extends IG2Config {
6
6
  autoRegister?: boolean;
7
7
  disableResetPwd?: boolean;
8
8
  disableRegister?: boolean;
9
9
  defaultLoginMethod?: LoginMethods;
10
10
  loginMethods?: LoginMethods[];
11
- passwordLoginMethods?: PasswordLoginMethods[];
11
+ passwordLoginMethods?: string[];
12
12
  socialConnections?: SocialConnectionProvider[];
13
13
  socialConnectionsBtnShape?: 'default' | 'button' | 'icon';
14
14
  enterpriseConnections?: string[];
@@ -1,4 +1,4 @@
1
- export declare const enum MfaBusinessAction {
1
+ export declare enum MfaBusinessAction {
2
2
  VerifyEmail = "verify-email",
3
3
  VerifySms = "verify-sms",
4
4
  VerifyTotp = "verify-totp",
@@ -7,7 +7,7 @@ export declare const getDefaultMFAConfig: () => MFAConfig;
7
7
  export interface MFAEvents extends IG2Events {
8
8
  onLogin?: (user: User, authClient: AuthenticationClient) => void;
9
9
  }
10
- export declare const enum MFAType {
10
+ export declare enum MFAType {
11
11
  SMS = "SMS",
12
12
  EMAIL = "EMAIL",
13
13
  TOTP = "OTP",
@@ -1,4 +1,4 @@
1
- export declare const enum TotpRecoveryCodeBusinessAction {
1
+ export declare enum TotpRecoveryCodeBusinessAction {
2
2
  RecoveryTotp = "recovery-totp",
3
3
  ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
4
4
  }
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import './style.less';
3
+ export declare const GuardSelectAccountView: () => JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { Lang } from '..';
2
2
  import { PasswordStrength } from '../_utils';
3
3
  export * from 'authing-js-sdk';
4
- export declare const enum LoginMethods {
4
+ export declare enum LoginMethods {
5
5
  LDAP = "ldap",
6
6
  AppQr = "app-qrcode",
7
7
  Password = "password",
@@ -10,11 +10,11 @@ export declare const enum LoginMethods {
10
10
  AD = "ad",
11
11
  WechatMpQrcode = "wechatmp-qrcode"
12
12
  }
13
- export declare const enum OIDCConnectionMode {
13
+ export declare enum OIDCConnectionMode {
14
14
  FRONT_CHANNEL = "FRONT_CHANNEL",
15
15
  BACK_CHANNEL = "BACK_CHANNEL"
16
16
  }
17
- export declare const enum SocialConnectionProvider {
17
+ export declare enum SocialConnectionProvider {
18
18
  ALIPAY = "alipay",
19
19
  GOOGLE = "google",
20
20
  WECHATPC = "wechat:pc",
@@ -41,7 +41,7 @@ export declare const enum SocialConnectionProvider {
41
41
  QINGCLOUD = "qingcloud",
42
42
  FACEBOOK = "facebook"
43
43
  }
44
- export declare const enum Protocol {
44
+ export declare enum Protocol {
45
45
  AD = "ad",
46
46
  CAS = "cas",
47
47
  LDAP = "ldap",
@@ -98,12 +98,12 @@ export interface SocialConnectionItem {
98
98
  authorizationUrl: string;
99
99
  tooltip: Record<Lang, string>;
100
100
  }
101
- export declare const enum RegisterMethods {
101
+ export declare enum RegisterMethods {
102
102
  Email = "email",
103
103
  Phone = "phone",
104
104
  EmailCode = "emailCode"
105
105
  }
106
- export declare const enum RegisterSortMethods {
106
+ export declare enum RegisterSortMethods {
107
107
  Email = "email-password",
108
108
  Phone = "phone-code",
109
109
  EmailCode = "email-code"
@@ -5,7 +5,7 @@ import { ApplicationConfig } from './application';
5
5
  export * from './application';
6
6
  export type { CommonMessage, User };
7
7
  export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
8
- export declare const enum GuardMode {
8
+ export declare enum GuardMode {
9
9
  Modal = "modal",
10
10
  Normal = "normal"
11
11
  }
@@ -55,11 +55,11 @@ export interface IG2Events {
55
55
  }
56
56
  export declare const getDefaultG2Config: () => IG2Config;
57
57
  export declare const LanguageMap: any;
58
- export declare const enum InputMethod {
58
+ export declare enum InputMethod {
59
59
  EmailCode = "email-code",
60
60
  PhoneCode = "phone-code"
61
61
  }
62
- export declare const enum GuardPageSene {
62
+ export declare enum GuardPageSene {
63
63
  Global = "global"
64
64
  }
65
65
  export interface GuardPageConfig {
@@ -68,7 +68,7 @@ export interface GuardPageConfig {
68
68
  defaultLanguage: Lang | 'browser';
69
69
  };
70
70
  }
71
- export declare const enum EmailScene {
71
+ export declare enum EmailScene {
72
72
  WELCOME_EMAIL = "WELCOME_EMAIL",
73
73
  FIRST_CREATED_USER = "FIRST_CREATED_USER",
74
74
  REGISTER_VERIFY_CODE = "REGISTER_VERIFY_CODE",
@@ -1,4 +1,4 @@
1
- export declare const enum ErrorCode {
1
+ export declare enum ErrorCode {
2
2
  OTP_MFA_CODE = 1635,
3
3
  APP_MFA_CODE = 1636,
4
4
  INPUT_CAPTCHACODE = 2000,
@@ -50,7 +50,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
50
50
  disableResetPwd?: boolean | undefined;
51
51
  defaultLoginMethod?: LoginMethods | undefined;
52
52
  loginMethods?: LoginMethods[] | undefined;
53
- passwordLoginMethods?: import("../../Type").PasswordLoginMethods[] | undefined;
53
+ passwordLoginMethods?: string[] | undefined;
54
54
  socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
55
55
  socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
56
56
  enterpriseConnections?: string[] | undefined;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig } from '..';
2
+ import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig, Lang } from '..';
3
3
  import { BackFillMultipleState, StoreInstance } from '../Guard/core/hooks/useMultipleAccounts';
4
4
  import { ModuleState } from '../Guard/GuardModule/stateMachine';
5
5
  import { ApplicationConfig } from '../Type/application';
@@ -42,6 +42,7 @@ export interface IGuardContext {
42
42
  */
43
43
  clearBackFillData?: () => void;
44
44
  };
45
+ defaultLanguageConfig: Lang;
45
46
  }
46
47
  export declare const createGuardXContext: () => {
47
48
  Provider: React.FC<{
@@ -138,3 +139,7 @@ export declare const useGuardMultipleInstance: () => {
138
139
  */
139
140
  clearBackFillData?: (() => void) | undefined;
140
141
  };
142
+ /**
143
+ * 默认语言
144
+ */
145
+ export declare const useGuardDefaultLanguage: () => Lang;
@@ -28,7 +28,7 @@ export declare const parsePhone: (isInternationSms: boolean, fieldValue: string,
28
28
  countryCode: string | undefined;
29
29
  phoneNumber: string;
30
30
  };
31
- export declare const enum SocialConnectionEvent {
31
+ export declare enum SocialConnectionEvent {
32
32
  Message = "message",
33
33
  Auth = "auth"
34
34
  }
@@ -27,7 +27,7 @@ export declare const getClassnames: (classnames: (string | boolean | undefined)[
27
27
  * @param item
28
28
  * @returns {boolean}
29
29
  */
30
- export declare function isObject(item: any): any;
30
+ export declare function isObject(item: any): boolean;
31
31
  /**
32
32
  * https://www.itranslater.com/qa/details/2115518846294557696
33
33
  * Deep merge two objects.
@@ -60,7 +60,7 @@ export declare const isMobile: () => RegExpMatchArray | null;
60
60
  export declare const isSpecialBrowser: () => boolean;
61
61
  export declare const assembledAppHost: (identifier: string, host: string) => string;
62
62
  export declare const assembledRequestHost: (requestHostname: string, configHost: string) => string;
63
- export declare const enum PasswordStrength {
63
+ export declare enum PasswordStrength {
64
64
  NoCheck = 0,
65
65
  Low = 1,
66
66
  Middle = 2,
@@ -73,6 +73,7 @@ export declare const PASSWORD_STRENGTH_TEXT_MAP: Record<PasswordStrength, {
73
73
  }>;
74
74
  export declare const getSymbolTypeLength: (pwd: string) => number;
75
75
  export declare const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string | undefined) => Rule[];
76
+ export declare const getPasswordValidateRules: (strength?: PasswordStrength, customPasswordStrength?: any, customValidateTrigger?: string | undefined, fieldRequiredRuleMessage?: string | undefined) => Rule[];
76
77
  export declare const sleep: (delay: number) => Promise<unknown>;
77
78
  export declare const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean | undefined) => boolean;
78
79
  export declare const tabSort: (tabList: string[], defaultMethod?: string | undefined) => string[];
@@ -91,5 +92,6 @@ export declare const getLoginTypePipe: (publicConfig: ApplicationConfig, registe
91
92
  } | undefined;
92
93
  export declare const getPasswordIdentify: (identity: string) => string;
93
94
  export declare const getCurrentLng: () => Lang;
94
- export declare const getSortLabels: (methods: string[], i18nConfig: Map<string, TabFieldsI18nItem>) => string;
95
- export declare const getI18nLabel: (method: string | RegisterSortMethods, i18nFields: Map<string, TabFieldsI18nItem>) => string;
95
+ export declare const getSortLabels: (methods: string[], i18nConfig: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
96
+ export declare const getI18nLabel: (method: string | RegisterSortMethods, i18nFields: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
97
+ export declare const getSortTabs: (tabs: string[], tab: string) => string[];
@@ -1,4 +1,4 @@
1
- export declare const enum LoggerType {
1
+ export declare enum LoggerType {
2
2
  INFO = "INFO",
3
3
  WARN = "WARN",
4
4
  ERROR = "ERROR"
@@ -1,10 +1,10 @@
1
1
  import { GuardModuleType } from '../../Guard';
2
- export declare const enum CodeAction {
2
+ export declare enum CodeAction {
3
3
  CHANGE_MODULE = "changeModule",
4
4
  RENDER_MESSAGE = "renderMessage",
5
5
  FLOW_END = "flowEnd"
6
6
  }
7
- export declare const enum ApiCode {
7
+ export declare enum ApiCode {
8
8
  IDENTITY_BINDING_ASK = 1641,
9
9
  IDENTITY_BINDING = 1640,
10
10
  APP_MFA = 1636,
@@ -16,6 +16,7 @@ export declare const enum ApiCode {
16
16
  FIRST_LOGIN_PASSWORD = 1639,
17
17
  FORCED_PASSWORD_RESET = 2058,
18
18
  UNSAFE_PASSWORD_TIP = 2061,
19
- UNSAFE_PASSWORD_RESET = 2071
19
+ UNSAFE_PASSWORD_RESET = 2071,
20
+ FLOW_SELECT_ACCOUNT = 2921
20
21
  }
21
22
  export declare const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
@@ -1,2 +1,2 @@
1
- declare const _default: "4.1.0-rc.0";
1
+ declare const _default: "4.1.0-rc.10";
2
2
  export default _default;