@authing/react-ui-components 4.0.5 → 4.0.6-hep.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.
Files changed (42) hide show
  1. package/dist/asset-manifest.json +26 -0
  2. package/dist/index.html +1 -0
  3. package/dist/static/css/2.2cdfb9d1.chunk.css +3 -0
  4. package/dist/static/css/2.2cdfb9d1.chunk.css.map +1 -0
  5. package/dist/static/css/main.f438f284.chunk.css +2 -0
  6. package/dist/static/css/main.f438f284.chunk.css.map +1 -0
  7. package/dist/static/js/2.9a1287ca.chunk.js +3 -0
  8. package/dist/static/js/2.9a1287ca.chunk.js.LICENSE.txt +112 -0
  9. package/dist/static/js/2.9a1287ca.chunk.js.map +1 -0
  10. package/dist/static/js/3.d3328d89.chunk.js +2 -0
  11. package/dist/static/js/3.d3328d89.chunk.js.map +1 -0
  12. package/dist/static/js/main.5735e6f1.chunk.js +2 -0
  13. package/dist/static/js/main.5735e6f1.chunk.js.map +1 -0
  14. package/dist/static/js/runtime-main.e75981a3.js +2 -0
  15. package/dist/static/js/runtime-main.e75981a3.js.map +1 -0
  16. package/dist/static/media/loading.3cf0104f.svg +32 -0
  17. package/lib/index.min.css +1 -1
  18. package/lib/index.min.js +1 -1
  19. package/package.json +1 -1
  20. package/types/AccountMerge/UserRadio.d.ts +5 -0
  21. package/types/AccountMerge/index.d.ts +3 -0
  22. package/types/AccountMerge/interface.d.ts +27 -0
  23. package/types/AccountMerge/utils.d.ts +3 -0
  24. package/types/CompleteInfo/core/components/TreeSelect.d.ts +11 -0
  25. package/types/CompleteInfo/index.d.ts +1 -0
  26. package/types/CompleteInfo/interface.d.ts +8 -4
  27. package/types/Guard/config.d.ts +0 -9
  28. package/types/Guard/core/renderModule.d.ts +2 -1
  29. package/types/Guard/module.d.ts +2 -0
  30. package/types/Login/core/withLandrayQrcode.d.ts +11 -0
  31. package/types/Login/core/withWeComQrcode.d.ts +2 -0
  32. package/types/Login/interface.d.ts +4 -0
  33. package/types/MFA/interface.d.ts +1 -0
  34. package/types/Qrcode/hooks/usePostQrCode.d.ts +3 -0
  35. package/types/Type/application.d.ts +3 -0
  36. package/types/Type/index.d.ts +1 -1
  37. package/types/_utils/config/index.d.ts +1 -1
  38. package/types/_utils/hooks/index.d.ts +0 -4
  39. package/types/_utils/locales/ja-jp/index.d.ts +4 -0
  40. package/types/_utils/responseManagement/interface.d.ts +1 -0
  41. package/types/_utils/types.d.ts +13 -0
  42. 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.0.5",
3
+ "version": "4.0.6-hep.0",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "types/index.d.ts",
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { UserRadioItemProps, UserRadioProps } from './interface';
3
+ import './styles.less';
4
+ export declare const UserRadioItem: React.FC<UserRadioItemProps>;
5
+ export declare const UserRadio: React.FC<UserRadioProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import './styles.less';
3
+ export declare const GuardAccountMergeView: React.FC;
@@ -0,0 +1,27 @@
1
+ export interface BriefUserInfo {
2
+ displayName: string;
3
+ avatar: string;
4
+ phone: string;
5
+ email: string;
6
+ username: string;
7
+ name: string;
8
+ }
9
+ export interface GuardAccountMergeInitData {
10
+ currentUserInfo: BriefUserInfo;
11
+ existingUserInfo: BriefUserInfo;
12
+ mergeToken?: string;
13
+ }
14
+ export interface UserRadioProps {
15
+ currentUserInfo: BriefUserInfo;
16
+ existingUserInfo: BriefUserInfo;
17
+ onChange?: (value: any) => void;
18
+ value?: any;
19
+ }
20
+ export interface UserRadioItemProps extends BriefUserInfo {
21
+ value: boolean;
22
+ selected: boolean;
23
+ onClick: (value: boolean) => void;
24
+ }
25
+ export declare enum AuthFlowAction {
26
+ MERGE = "confirm-account-merge"
27
+ }
@@ -0,0 +1,3 @@
1
+ import { User } from 'authing-js-sdk';
2
+ export declare const getDisplayName: (user: User) => string;
3
+ export declare const getDisplayNameByEmail: (displayName: string) => string;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export declare type OptionType = {
3
+ id: string;
4
+ name: string;
5
+ children: OptionType[];
6
+ };
7
+ interface TreeSelectProps {
8
+ options: OptionType[];
9
+ }
10
+ declare const TreeSelect: React.FC<TreeSelectProps>;
11
+ export default TreeSelect;
@@ -9,3 +9,4 @@ export declare const GuardCompleteInfo: React.FC<{
9
9
  }>;
10
10
  export declare const GuardLoginCompleteInfoView: React.FC;
11
11
  export declare const GuardRegisterCompleteInfoView: React.FC;
12
+ export declare const GuardAccountMergeCompleteInfoView: React.FC;
@@ -7,19 +7,21 @@ export interface CompleteInfoEvents extends IG2Events {
7
7
  onRegisterInfoCompleted?: (user: User, udfs: {
8
8
  definition: any;
9
9
  value: any;
10
- }[], authClient: AuthenticationClient) => void;
10
+ }[], authClient: AuthenticationClient, opts?: {
11
+ phone?: string;
12
+ canMergeUser?: boolean;
13
+ }) => void;
11
14
  onRegisterInfoCompletedError?: (error: CommonMessage, udfs: {
12
15
  definition: any;
13
16
  value: any;
14
17
  }[], authClient: AuthenticationClient) => void;
18
+ onAccountMergeCompleteInfo?: (user: User) => void;
15
19
  }
16
20
  export interface GuardCompleteInfoProps extends IG2FCProps, CompleteInfoEvents {
17
21
  config: Partial<CompleteInfoConfig>;
18
22
  }
19
23
  export interface GuardCompleteInfoViewProps extends GuardCompleteInfoProps {
20
24
  config: CompleteInfoConfig;
21
- initData: any;
22
- onLogin?: any;
23
25
  }
24
26
  export declare type ExtendsFieldType = 'user' | 'internal';
25
27
  export interface ExtendsField {
@@ -52,6 +54,7 @@ export interface CompleteInfoMetaData {
52
54
  name: string;
53
55
  required: boolean;
54
56
  validateRules: CompleteInfoRule[];
57
+ checkUnique?: boolean;
55
58
  options?: CompleteInfoSelectOption[];
56
59
  }
57
60
  export declare enum CompleteInfoBaseControls {
@@ -70,7 +73,8 @@ export declare enum CompleteInfoExtendsControls {
70
73
  STRING = "string",
71
74
  TEXT = "text",
72
75
  GENDER = "gender",
73
- COUNTRY = "country"
76
+ COUNTRY = "country",
77
+ TREE = "tree"
74
78
  }
75
79
  export interface CompleteInfoInitData {
76
80
  skip: boolean;
@@ -4,14 +4,6 @@ import { LoginConfig } from '../Login/interface';
4
4
  import { RegisterConfig } from '../Register/interface';
5
5
  export interface GuardComponentConfig extends Partial<GuardLocalConfig> {
6
6
  }
7
- export declare enum QrCodeScanType {
8
- appQrcode = "appQrcode",
9
- wechatMiniQrcode = "wechatMiniQrcode",
10
- wechatmpQrcode = "wechatmpQrcode"
11
- }
12
- export interface QrCodeScanOptions {
13
- qrcode: string;
14
- }
15
7
  export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
16
8
  isSSO?: boolean;
17
9
  defaultScenes?: GuardModuleType;
@@ -22,6 +14,5 @@ export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
22
14
  * @description 是否调用 eventsMapping 中的事件
23
15
  */
24
16
  openEventsMapping?: boolean;
25
- _qrCodeScanOptions?: Record<QrCodeScanType, QrCodeScanOptions>;
26
17
  }
27
18
  export declare const getDefaultGuardLocalConfig: () => GuardLocalConfig;
@@ -3,7 +3,8 @@ import { GuardProps } from '..';
3
3
  import '../styles.less';
4
4
  export declare enum LangMAP {
5
5
  zhCn = "zh-CN",
6
- enUs = "en-US"
6
+ enUs = "en-US",
7
+ jaJp = "ja-JP"
7
8
  }
8
9
  export declare const RenderModule: React.FC<{
9
10
  guardProps: GuardProps;
@@ -14,10 +14,12 @@ export declare enum GuardModuleType {
14
14
  LOGIN_COMPLETE_INFO = "loginCompleteInfo",
15
15
  REGISTER_PASSWORD = "registerPassword",
16
16
  REGISTER_COMPLETE_INFO = "registerCompleteInfo",
17
+ CUSTOM_COMPLETE_INFO = "customCompleteInfo",
17
18
  RECOVERY_CODE = "recoveryCode",
18
19
  SUBMIT_SUCCESS = "submitSuccess",
19
20
  IDENTITY_BINDING_ASK = "identityBindingAsk",
20
21
  IDENTITY_BINDING = "identityBinding",
22
+ ACCOUNT_MERGE = "accountMerge",
21
23
  SELF_UNLOCK = "selfUnlock"
22
24
  }
23
25
  export interface GuardModuleAction {
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { StoreInstance } from '../../Guard/core/hooks/useMultipleAccounts';
3
+ interface LoginWithLandrayQrcodeProps {
4
+ onLoginSuccess: any;
5
+ canLoop: boolean;
6
+ qrCodeScanOptions: any;
7
+ id: string;
8
+ multipleInstance?: StoreInstance;
9
+ }
10
+ export declare const LoginWithLandrayQrcode: (props: LoginWithLandrayQrcodeProps) => JSX.Element | null;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const LoginWithWeComQrcode: (props: any) => JSX.Element;
@@ -16,6 +16,10 @@ export interface LoginConfig extends IG2Config {
16
16
  publicKey?: string;
17
17
  agreementEnabled?: boolean;
18
18
  agreements?: Agreement[];
19
+ /**
20
+ * 关闭二维码状态check轮询(console上使用)
21
+ */
22
+ _closeLoopCheckQrcode?: boolean;
19
23
  }
20
24
  export interface LoginEvents extends IG2Events {
21
25
  onLogin?: (user: User, authClient: AuthenticationClient) => void;
@@ -29,6 +29,7 @@ export interface GuardMFAInitData {
29
29
  nickme?: string;
30
30
  username?: string;
31
31
  current?: MFAType;
32
+ thirdPartyOrigin?: boolean;
32
33
  }
33
34
  export interface GuardMFAProps extends IG2FCProps, MFAEvents {
34
35
  config: Partial<MFAConfig>;
@@ -53,6 +53,9 @@ interface QrCodeOptions {
53
53
  payload: Partial<RootState>;
54
54
  }>;
55
55
  descriptions: CodeStatusDescriptions;
56
+ /**
57
+ * check 轮询间隔时间
58
+ */
56
59
  sleepTime?: number;
57
60
  /**
58
61
  * 状态改变时触发事件,仅在 Server 返回的二维码状态改变时进行触发
@@ -252,6 +252,9 @@ export interface ApplicationConfig {
252
252
  verifyCodeLength: number;
253
253
  websocket: string;
254
254
  welcomeMessage: any;
255
+ userPortal?: {
256
+ mergeAccount?: boolean;
257
+ };
255
258
  skipComplateFileds: boolean;
256
259
  selfUnlockStrategy: 'captcha' | 'password-captcha';
257
260
  defaultLanguageConfig: Lang;
@@ -4,7 +4,7 @@ import { FacePlugin } from '../_utils/facePlugin/interface';
4
4
  import { ApplicationConfig } from './application';
5
5
  export * from './application';
6
6
  export type { CommonMessage, User };
7
- export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW';
7
+ export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
8
8
  export declare enum GuardMode {
9
9
  Modal = "modal",
10
10
  Normal = "normal"
@@ -14,7 +14,6 @@ export declare const useMergePublicConfig: (forceUpdate: number, appId?: string
14
14
  showLoading?: boolean | undefined;
15
15
  loadingComponent?: import("react").ReactNode;
16
16
  openEventsMapping?: boolean | undefined;
17
- _qrCodeScanOptions?: Record<import("../../Guard/config").QrCodeScanType, import("../../Guard/config").QrCodeScanOptions> | undefined;
18
17
  disableRegister?: boolean | undefined;
19
18
  registerMethods?: RegisterMethods[] | undefined;
20
19
  defaultRegisterMethod?: RegisterMethods | undefined;
@@ -89,6 +88,7 @@ export declare const useMergePublicConfig: (forceUpdate: number, appId?: string
89
88
  } | undefined;
90
89
  withCustomData?: boolean | undefined;
91
90
  } | undefined;
91
+ _closeLoopCheckQrcode?: boolean | undefined;
92
92
  } | undefined;
93
93
  export declare const getPageConfig: (appId: string) => GuardPageConfig;
94
94
  export declare const setPageConfig: (appId: string, config: GuardPageConfig) => GuardPageConfig;
@@ -28,10 +28,6 @@ export declare const parsePhone: (isInternationSms: boolean, fieldValue: string,
28
28
  countryCode: string | undefined;
29
29
  phoneNumber: string;
30
30
  };
31
- export declare enum SocialConnectionEvent {
32
- Message = "message",
33
- Auth = "auth"
34
- }
35
31
  /**
36
32
  *
37
33
  * @param config
@@ -0,0 +1,4 @@
1
+ import common from './common.json';
2
+ import login from './login.json';
3
+ import user from './user.json';
4
+ export { common, login, user };
@@ -15,6 +15,7 @@ export declare enum ApiCode {
15
15
  FLOW_END = 1600,
16
16
  FIRST_LOGIN_PASSWORD = 1639,
17
17
  FORCED_PASSWORD_RESET = 2058,
18
+ ACCOUNT_MERGE = 10000,
18
19
  UNSAFE_PASSWORD_TIP = 2061,
19
20
  UNSAFE_PASSWORD_RESET = 2071
20
21
  }
@@ -0,0 +1,13 @@
1
+ export declare enum SceneType {
2
+ SCENE_TYPE_LOGIN = "CHANNEL_LOGIN",
3
+ SCENE_TYPE_REGISTER = "CHANNEL_REGISTER",
4
+ SCENE_TYPE_RESET = "CHANNEL_RESET_PASSWORD",
5
+ SCENE_TYPE_BIND = "CHANNEL_BIND_PHONE",
6
+ SCENE_TYPE_UNBIND = "CHANNEL_UNBIND_PHONE",
7
+ SCENE_TYPE_MFA_BIND = "CHANNEL_BIND_MFA",
8
+ SCENE_TYPE_MFA_VERIFY = "CHANNEL_VERIFY_MFA",
9
+ SCENE_TYPE_MFA_UNBIND = "CHANNEL_UNBIND_MFA",
10
+ SCENE_TYPE_COMPLETE_PHONE = "CHANNEL_COMPLETE_PHONE",
11
+ CHANNEL_IDENTITY_VERIFICATION = "CHANNEL_IDENTITY_VERIFICATION",
12
+ CHANNEL_DELETE_ACCOUNT = "CHANNEL_DELETE_ACCOUNT"
13
+ }
@@ -1,2 +1,2 @@
1
- declare const _default: "4.0.5";
1
+ declare const _default: "4.0.6-hep.0";
2
2
  export default _default;