@authing/react-ui-components 4.4.3-ey.4 → 4.4.3-ey.40

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.
Files changed (33) hide show
  1. package/lib/index.min.css +2 -2
  2. package/lib/index.min.js +1 -1
  3. package/lib/static/media/ey_loading.24d3e4d0.gif +0 -0
  4. package/package.json +2 -2
  5. package/types/CompleteInfo/core/completeInfo.d.ts +8 -0
  6. package/types/EY/CheckCaptcha/index.d.ts +2 -0
  7. package/types/EY/Error/index.d.ts +2 -0
  8. package/types/EY/ForgetPassword/index.d.ts +2 -0
  9. package/types/EY/InviteComplete/index.d.ts +2 -0
  10. package/types/EY/InviteIdentityBind/component/WeComQrcode.d.ts +2 -0
  11. package/types/EY/InviteIdentityBind/index.d.ts +2 -0
  12. package/types/EY/InviteLoading/index.d.ts +2 -0
  13. package/types/EY/Login/components/EyLoginWithWeComQrcode.d.ts +2 -0
  14. package/types/EY/Login/core/EmailVerify.d.ts +7 -0
  15. package/types/EY/Login/core/ScanCode.d.ts +3 -0
  16. package/types/EY/Login/index.d.ts +7 -0
  17. package/types/EY/PreCheckEmail/index.d.ts +2 -0
  18. package/types/EY/Protocol/index.d.ts +2 -0
  19. package/types/EY/components/EmailFormItem.d.ts +2 -0
  20. package/types/EY/components/GoBack.d.ts +2 -0
  21. package/types/EY/interface.d.ts +71 -0
  22. package/types/ForgetPassword/core/resetPassword.d.ts +3 -0
  23. package/types/Guard/config.d.ts +1 -0
  24. package/types/Guard/module.d.ts +29 -1
  25. package/types/Login/index.d.ts +4 -0
  26. package/types/MFA/VerifyCodeInput/ey.d.ts +15 -0
  27. package/types/MFA/VerifyCodeInput/index.d.ts +1 -0
  28. package/types/Type/application.d.ts +4 -0
  29. package/types/Type/index.d.ts +1 -1
  30. package/types/_utils/config/index.d.ts +1 -0
  31. package/types/_utils/http.d.ts +1 -1
  32. package/types/_utils/responseManagement/interface.d.ts +13 -1
  33. package/types/version/version.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/react-ui-components",
3
- "version": "4.4.3-ey.4",
3
+ "version": "4.4.3-ey.40",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "types/index.d.ts",
@@ -42,7 +42,7 @@
42
42
  "prebuild:lib": "yarn log-tag && yarn generate-version && yarn generate-examples",
43
43
  "prepare": "cd ../.. && husky install packages/react-components/.husky",
44
44
  "pub": "yarn build:lib && node ./scripts/publish.js",
45
- "start": "cross-env PORT=1221 node ./scripts/start.js",
45
+ "start": "cross-env PORT=1024 node ./scripts/start.js",
46
46
  "vite": "vite",
47
47
  "generate-version": "node ./scripts/generate-version",
48
48
  "generate-examples": "node ./scripts/generate-examples.js",
@@ -1,8 +1,16 @@
1
1
  import React from 'react';
2
2
  import { CompleteInfoMetaData, CompleteInfoRequest } from '../interface';
3
+ import { Lang } from '../../Type';
3
4
  export interface CompleteInfoProps {
4
5
  metaData: CompleteInfoMetaData[];
5
6
  businessRequest: (data: CompleteInfoRequest) => Promise<void>;
7
+ submitText?: string;
8
+ extendsFieldsI18n?: {
9
+ [key: string]: Record<Lang, {
10
+ enabled: boolean;
11
+ value: string;
12
+ }>;
13
+ };
6
14
  }
7
15
  export interface FieldMetadata {
8
16
  key: string;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const EyGuardCheckCaptchaView: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const EyGuardInviteExpireView: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const EyGuardForgetPassword: React.FC;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const EyGuardInviteCompleteView: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const WeComQrcode: (props: any) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const EyGuardIviteIdentityBindView: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const EyGuardInviteLoadingView: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const EyLoginWithWeComQrcode: (props: any) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { EyLoginProps } from '../../interface';
3
+ interface EmailVerifySceneProps extends EyLoginProps {
4
+ scene: 'password' | 'verifyCode';
5
+ }
6
+ export declare const EmailVerifyScene: React.FC<EmailVerifySceneProps>;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { EyLoginProps } from '../../interface';
3
+ export declare const ScanCodeScene: React.FC<EyLoginProps>;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export interface GuardLoginInitData {
3
+ scene: 'password' | 'idp' | 'verifyCode';
4
+ noBack: boolean;
5
+ verifyAccount?: string;
6
+ }
7
+ export declare const EyGuardLoginView: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const EyGuardPreCheckEmailView: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const EyGuardProtocolView: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const EmailFormItem: (props: any) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const GoBack: (props: any) => JSX.Element;
@@ -0,0 +1,71 @@
1
+ import { GuardModuleType, Lang } from '..';
2
+ export interface InviteContext {
3
+ autoLogin: boolean;
4
+ email: string | null;
5
+ ticket: string;
6
+ enabledIdentifierCodeConfig: boolean;
7
+ enabledRegisterFillInfo: boolean;
8
+ enabledExtIdpBind: boolean;
9
+ allowSkipBindExtIdp: boolean;
10
+ sendIdentifierCodeMethod: 'prioritySMS' | 'priorityEmail' | 'SMS' | 'email';
11
+ receiverType: 'emailCode' | 'phoneCode';
12
+ phone: string | null;
13
+ username: string | null;
14
+ name: string | null;
15
+ verifyCodeMaxLength: number;
16
+ verifyCodeMaxErrCount: number;
17
+ extendsFieldsI18n?: {
18
+ [key: string]: Record<Lang, {
19
+ enabled: boolean;
20
+ value: string;
21
+ }>;
22
+ };
23
+ extendsFieldsOptions?: {
24
+ key: string;
25
+ options: {
26
+ value: string;
27
+ label: string;
28
+ }[];
29
+ }[];
30
+ extendsFields: any;
31
+ qrCodeBindMethods: Record<string, {
32
+ QRConfig: any;
33
+ id: string;
34
+ isDefault: boolean;
35
+ title: string;
36
+ }[]>;
37
+ socialConnections: any[];
38
+ }
39
+ export interface EyGuardInviteLoginInitData extends Partial<InviteContext> {
40
+ canBack?: boolean;
41
+ verifyAccount: string;
42
+ context: any;
43
+ originModule: GuardModuleType;
44
+ originContext: any;
45
+ }
46
+ export interface EyGuardInviteCompleteInitData extends Partial<EyGuardInviteLoginInitData> {
47
+ metaData: any;
48
+ }
49
+ export interface EyGuardInviteIdentityBindInitData extends Partial<EyGuardInviteLoginInitData> {
50
+ weComConfig: {
51
+ QRConfig: any;
52
+ id: string;
53
+ isDefault: boolean;
54
+ title: string;
55
+ };
56
+ socialConnections: any[];
57
+ }
58
+ export interface EyGuardProtocolInitData {
59
+ onAcceptHandle: () => void;
60
+ onRejectHandle: () => void;
61
+ }
62
+ export interface EyLoginProps {
63
+ onBeforeLogin?: (loginInfo: any) => void;
64
+ onLoginSuccess?: (data: any, message?: string) => void;
65
+ onLoginFailed?: (code: number, data: any, message?: string) => void;
66
+ }
67
+ export declare const useRegisterHandleHook: (initData: any, submitButtonRef?: {
68
+ current: {
69
+ onSpin: (arg0: boolean) => void;
70
+ };
71
+ } | undefined) => (context: any) => Promise<void>;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { VerifyLoginMethods } from '../../Type';
2
3
  export declare enum InputMethodMap {
3
4
  email = "email-code",
4
5
  phone = "phone-code"
@@ -11,6 +12,8 @@ interface ResetPasswordProps {
11
12
  setPhoneOrEmailText: any;
12
13
  setResetToken: React.Dispatch<React.SetStateAction<string>>;
13
14
  setUserId: React.Dispatch<React.SetStateAction<string>>;
15
+ supportMethods?: VerifyLoginMethods[];
16
+ firstValidate?: 'phone' | 'email';
14
17
  }
15
18
  export declare const ResetPassword: (props: ResetPasswordProps) => JSX.Element;
16
19
  export {};
@@ -4,6 +4,7 @@ import { ForgetPasswordConfig } from '../ForgetPassword/interface';
4
4
  import { LoginConfig } from '../Login/interface';
5
5
  import { RegisterConfig } from '../Register/interface';
6
6
  export interface GuardLocalConfig extends RegisterConfig, LoginConfig, ForgetPasswordConfig {
7
+ isInvited?: boolean;
7
8
  isSSO?: boolean;
8
9
  defaultScenes?: GuardModuleType;
9
10
  defaultInitData?: any;
@@ -25,7 +25,35 @@ export declare enum GuardModuleType {
25
25
  /** 多租户门户选择页 */
26
26
  TENANT_PORTAL = "tenant-portal",
27
27
  New_SUBMIT_SUCCESS = "newSubmitSuccess",
28
- RESET_ACCOUNT_NAME = "resetAccountName"
28
+ RESET_ACCOUNT_NAME = "resetAccountName",
29
+ /**
30
+ * pre check email
31
+ */
32
+ EY_PRE_CHECK_EMAIL = "ey_pre_check_email",
33
+ /**
34
+ * protocols
35
+ */
36
+ EY_PROTOCOLS = "ey_protocols",
37
+ /**
38
+ * check captcha
39
+ */
40
+ EY_CHECK_CAPTCHA = "ey_check_captcha",
41
+ /**
42
+ * invite expire
43
+ */
44
+ EY_INVITE_EXPIRE = "ey_invite_expire",
45
+ /**
46
+ * invite loading
47
+ */
48
+ EY_INVITE_LOADING = "ey_invite_loading",
49
+ /**
50
+ * identity bind
51
+ */
52
+ EY_IDENTITY_BIND = "ey_identity_bind",
53
+ /**
54
+ * invite complete
55
+ */
56
+ EY_INVITE_COMPLETE = "ey_invite_complete"
29
57
  }
30
58
  export interface GuardModuleAction {
31
59
  action: string;
@@ -1,5 +1,9 @@
1
1
  import { FC } from 'react';
2
2
  import './styles.less';
3
+ export declare const useDisables: (data: any) => {
4
+ disableResetPwd: any;
5
+ disableRegister: any;
6
+ };
3
7
  export declare const GuardLoginView: FC<{
4
8
  isResetPage?: boolean;
5
9
  }>;
@@ -0,0 +1,15 @@
1
+ import React, { FC } from 'react';
2
+ import './style.less';
3
+ interface VerifyCodeInputProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ length?: number;
5
+ size?: string;
6
+ gutter?: string;
7
+ onEenter?: Function;
8
+ showDivider?: boolean;
9
+ onChange?: any;
10
+ value?: Array<number | string>;
11
+ onFinish?: any;
12
+ beforeSend: () => Promise<boolean>;
13
+ }
14
+ export declare const EyVerifyCodeInput: FC<VerifyCodeInputProps>;
15
+ export {};
@@ -9,6 +9,7 @@ interface VerifyCodeInputProps extends React.HTMLAttributes<HTMLDivElement> {
9
9
  onChange?: any;
10
10
  value?: Array<number | string>;
11
11
  onFinish?: any;
12
+ ResentBtnSort?: () => JSX.Element;
12
13
  }
13
14
  export declare const VerifyCodeInput: FC<VerifyCodeInputProps>;
14
15
  export {};
@@ -342,4 +342,8 @@ export interface ApplicationConfig {
342
342
  appRobotVerify: 'always_enable' | 'disable' | 'condition_set';
343
343
  /** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */
344
344
  userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set';
345
+ /**
346
+ * 是否为官方应用
347
+ */
348
+ isOfficial?: boolean;
345
349
  }
@@ -5,7 +5,7 @@ import { FacePlugin } from '../_utils/facePlugin/interface';
5
5
  import { ApplicationConfig } from './application';
6
6
  export * from './application';
7
7
  export type { CommonMessage, User };
8
- export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
8
+ export declare type Lang = 'zh-CN' | 'en-US';
9
9
  export declare enum GuardMode {
10
10
  Modal = "modal",
11
11
  Normal = "normal"
@@ -19,6 +19,7 @@ export declare const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, co
19
19
  export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
20
20
  finallyConfig: {
21
21
  host: string;
22
+ isInvited?: boolean | undefined;
22
23
  isSSO?: boolean | undefined;
23
24
  defaultScenes?: import("../..").GuardModuleType | undefined;
24
25
  defaultInitData?: any;
@@ -28,6 +28,6 @@ export interface AuthingResponse<T = any> {
28
28
  flowHandle?: string;
29
29
  }
30
30
  export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
31
- onGuardHandling?: () => CodeAction;
31
+ onGuardHandling?: (initData?: any) => CodeAction;
32
32
  isFlowEnd?: boolean;
33
33
  }
@@ -21,6 +21,18 @@ export declare enum ApiCode {
21
21
  FLOW_SELECT_ACCOUNT = 2921,
22
22
  SELECT_ACCOUNT_2_LOGIN = 2930,
23
23
  TENANT_PORTAL = 1644,
24
- RESET_ACCOUNT_NAME = 1108
24
+ RESET_ACCOUNT_NAME = 1108,
25
+ /**
26
+ * ey 登录协议条款
27
+ */
28
+ EY_PROTOCOLS = 1008,
29
+ /**
30
+ * ey 邀请码过期
31
+ */
32
+ EY_INVITE_EXPIRE = 4032,
33
+ /**
34
+ * 链接超时
35
+ */
36
+ EY_LINK_EXPIRE = 4033
25
37
  }
26
38
  export declare const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
@@ -1,2 +1,2 @@
1
- declare const _default: "4.4.3-ey.4";
1
+ declare const _default: "4.4.3-ey.40";
2
2
  export default _default;