@authing/react-ui-components 4.0.0-beta.7 → 4.0.0-hep.1

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.0.0-beta.7",
3
+ "version": "4.0.0-hep.1",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "types/index.d.ts",
@@ -15,6 +15,7 @@
15
15
  "fastclick": "^1.0.6",
16
16
  "global": "^4.4.0",
17
17
  "phone": "^3.1.12",
18
+ "prompt": "^1.3.0",
18
19
  "qs": "^6.9.4",
19
20
  "react-responsive": "^9.0.0-beta.5",
20
21
  "react-use": "^17.3.1",
@@ -42,7 +43,8 @@
42
43
  "start": "PORT=1221 node ./scripts/start.js",
43
44
  "vite": "vite",
44
45
  "generate-version": "node ./scripts/generate-version",
45
- "generate-examples": "node ./scripts/generate-examples.js"
46
+ "generate-examples": "node ./scripts/generate-examples.js",
47
+ "test": "node ./scripts/dev/pre-build.js"
46
48
  },
47
49
  "publishConfig": {
48
50
  "access": "public",
@@ -193,6 +195,7 @@
193
195
  "mini-css-extract-plugin": "0.11.3",
194
196
  "npm-dts-webpack-plugin": "^1.3.5",
195
197
  "optimize-css-assets-webpack-plugin": "5.0.4",
198
+ "ora": "^5.4.1",
196
199
  "pnp-webpack-plugin": "1.6.4",
197
200
  "postcss-flexbugs-fixes": "4.2.1",
198
201
  "postcss-loader": "3.0.0",
@@ -217,6 +220,7 @@
217
220
  "semver": "7.3.2",
218
221
  "shelljs": "^0.8.4",
219
222
  "shortid": "^2.2.16",
223
+ "signale": "^1.4.0",
220
224
  "style-loader": "1.3.0",
221
225
  "terser-webpack-plugin": "4.2.3",
222
226
  "ts-pnp": "1.2.0",
@@ -230,4 +234,4 @@
230
234
  "webpack-manifest-plugin": "2.2.0",
231
235
  "workbox-webpack-plugin": "5.1.4"
232
236
  }
233
- }
237
+ }
@@ -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;
@@ -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 {
@@ -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>;
@@ -208,6 +208,12 @@ export interface ApplicationConfig {
208
208
  complateFiledsPlace: ComplateFiledsPlace[];
209
209
  extendsFieldsEnabled: boolean;
210
210
  extendsFields: ExtendsField[];
211
+ extendsFieldsI18n?: {
212
+ [key: string]: Record<Lang, {
213
+ enabled: boolean;
214
+ value: string;
215
+ }>;
216
+ };
211
217
  identifier: string;
212
218
  requestHostname: string;
213
219
  identityProviders: {
@@ -245,6 +251,9 @@ export interface ApplicationConfig {
245
251
  verifyCodeLength: number;
246
252
  websocket: string;
247
253
  welcomeMessage: any;
254
+ userPortal?: {
255
+ mergeAccount?: boolean;
256
+ };
248
257
  skipComplateFileds: boolean;
249
258
  selfUnlockStrategy: 'captcha' | 'password-captcha';
250
259
  defaultLanguageConfig: Lang;
@@ -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
@@ -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
  }
@@ -1,2 +1,2 @@
1
- declare const _default: "4.0.0-beta.7";
1
+ declare const _default: "4.0.0-hep.1";
2
2
  export default _default;