@authing/react-ui-components 4.0.10-rc.0 → 4.0.10-zhihu.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/react-ui-components",
3
- "version": "4.0.10-rc.0",
3
+ "version": "4.0.10-zhihu.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,3 @@
1
+ /// <reference types="react" />
2
+ import './style.less';
3
+ export declare const GuardChangeAccoutTypesView: () => JSX.Element;
@@ -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;
@@ -248,8 +248,7 @@ declare class MultipleAccount {
248
248
  } | undefined) => void;
249
249
  setUserInfo: (user: Pick<User & {
250
250
  id: string;
251
- loginAccount?: string | undefined;
252
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
251
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
253
252
  setLoginWayByHttpData: (account: string, data: {
254
253
  username?: string | undefined;
255
254
  phone?: string | undefined;
@@ -291,8 +290,7 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
291
290
  } | undefined) => void;
292
291
  setUserInfo: (user: Pick<User & {
293
292
  id: string;
294
- loginAccount?: string | undefined;
295
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
293
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
296
294
  setLoginWayByHttpData: (account: string, data: {
297
295
  username?: string | undefined;
298
296
  phone?: string | undefined;
@@ -19,8 +19,7 @@ export declare const guardEventsFilter: (props: any, multipleInstance?: {
19
19
  } | undefined) => void;
20
20
  setUserInfo: (user: Pick<import("./core/hooks/useMultipleAccounts").User & {
21
21
  id: string;
22
- loginAccount?: string | undefined;
23
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
22
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
24
23
  setLoginWayByHttpData: (account: string, data: {
25
24
  username?: string | undefined;
26
25
  phone?: string | undefined;
@@ -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,6 +1,7 @@
1
1
  import { FormItemProps } from 'antd/lib/form';
2
2
  import React from 'react';
3
+ import { PasswordLoginMethods } from '../../../Type/application';
3
4
  export interface FormItemAccountProps extends FormItemProps {
4
- validPasswordLoginMethods: string[];
5
+ passwordLoginMethods: PasswordLoginMethods[];
5
6
  }
6
7
  export declare const FormItemAccount: React.FC<FormItemAccountProps>;
@@ -3,6 +3,5 @@ import React from 'react';
3
3
  import { PasswordLoginMethods } from '../../../Type/application';
4
4
  export interface InputAccountProps extends InputProps {
5
5
  passwordLoginMethods: PasswordLoginMethods[];
6
- placeholder: string;
7
6
  }
8
7
  export declare const InputAccount: React.FC<InputAccountProps>;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const LoginWithWeComQrcode: (props: any) => JSX.Element;
@@ -34,8 +34,7 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
34
34
  } | undefined) => void;
35
35
  setUserInfo: (user: Pick<import("../../Guard/core/hooks/useMultipleAccounts").User & {
36
36
  id: string;
37
- loginAccount?: string | undefined;
38
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
37
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
39
38
  setLoginWayByHttpData: (account: string, data: {
40
39
  username?: string | undefined;
41
40
  phone?: string | undefined;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import './style.less';
3
3
  import { GuardLocalConfig } from '../../Guard';
4
- import { ApplicationConfig, SocialConnectionItem } from '../../Type/application';
5
4
  import { StoreInstance } from '../../Guard/core/hooks/useMultipleAccounts';
5
+ import { ApplicationConfig, SocialConnectionItem } from '../../Type';
6
6
  export interface SocialLoginProps {
7
7
  appId: string;
8
8
  config: GuardLocalConfig;
@@ -7,7 +7,5 @@ export interface RegisterWithEmailProps {
7
7
  publicConfig?: ApplicationConfig;
8
8
  agreements: Agreement[];
9
9
  registeContext?: any;
10
- defaultLabel?: string;
11
- defaultMethod?: string;
12
10
  }
13
11
  export declare const RegisterWithEmail: React.FC<RegisterWithEmailProps>;
@@ -3,8 +3,8 @@ import { IG2FCProps, IG2Config, IG2Events } from '../Type';
3
3
  import { Agreement, RegisterMethods } from '../Type/application';
4
4
  export interface RegisterConfig extends IG2Config {
5
5
  disableRegister?: boolean;
6
- registerMethods?: string[];
7
- defaultRegisterMethod?: string;
6
+ registerMethods?: RegisterMethods[];
7
+ defaultRegisterMethod?: RegisterMethods;
8
8
  publicKey?: string;
9
9
  agreementEnabled?: boolean;
10
10
  agreements?: Agreement[];
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import './style.less';
3
+ export declare const GuardSelectAccountView: () => JSX.Element;
@@ -8,7 +8,8 @@ export declare const enum LoginMethods {
8
8
  PhoneCode = "phone-code",
9
9
  WxMinQr = "wechat-miniprogram-qrcode",
10
10
  AD = "ad",
11
- WechatMpQrcode = "wechatmp-qrcode"
11
+ WechatMpQrcode = "wechatmp-qrcode",
12
+ WechatworkCorpQrconnect = "wechatwork-corp-qrconnect"
12
13
  }
13
14
  export declare const enum OIDCConnectionMode {
14
15
  FRONT_CHANNEL = "FRONT_CHANNEL",
@@ -103,15 +104,16 @@ export declare const enum RegisterMethods {
103
104
  Phone = "phone",
104
105
  EmailCode = "emailCode"
105
106
  }
106
- export declare const enum RegisterSortMethods {
107
- Email = "email-password",
108
- Phone = "phone-code",
109
- EmailCode = "email-code"
110
- }
111
107
  export declare type QrcodeTabsSettings = Record<LoginMethods, Array<{
112
108
  id: string;
113
109
  title: string;
114
110
  isDefault?: boolean;
111
+ QRConfig?: {
112
+ corpId: string;
113
+ agentId: string;
114
+ redirectUrl: string;
115
+ identifier: string;
116
+ };
115
117
  }>>;
116
118
  export interface OidcClientMetadata {
117
119
  grant_types: string[];
@@ -150,13 +152,9 @@ export interface UserExtendsField {
150
152
  export declare type ExtendsField = InternalExtendsField | UserExtendsField;
151
153
  export interface ApplicationPasswordTabConfig {
152
154
  enabledLoginMethods?: PasswordLoginMethods[];
153
- validRegisterMethods?: string[];
154
- validLoginMethods?: string[];
155
155
  }
156
156
  export interface ApplicationVerifyCodeTabConfig {
157
157
  enabledLoginMethods: VerifyLoginMethods[];
158
- validRegisterMethods?: string[];
159
- validLoginMethods?: string[];
160
158
  }
161
159
  export interface Agreement {
162
160
  id: number;
@@ -168,14 +166,6 @@ export interface Agreement {
168
166
  export declare type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
169
167
  export declare type VerifyLoginMethods = 'email-code' | 'phone-code';
170
168
  export declare type ComplateFiledsPlace = 'register' | 'login';
171
- export interface TabFieldsI18nItem {
172
- key: string;
173
- label: string;
174
- labelEn: string;
175
- i18n: {
176
- [propName in Lang]?: string;
177
- };
178
- }
179
169
  export interface ApplicationConfig {
180
170
  id: string;
181
171
  allowedOrigins: string[];
@@ -281,11 +271,4 @@ export interface ApplicationConfig {
281
271
  * 是否开启注册密码补全
282
272
  */
283
273
  enableCompletePassword: boolean;
284
- /**
285
- * 登录注册排序
286
- */
287
- tabMethodsSortConfig: {
288
- loginMethodsSort: string[];
289
- };
290
- tabMethodsFields: TabFieldsI18nItem[];
291
274
  }
@@ -3,4 +3,3 @@ import { ValidatorFormItemProps } from '.';
3
3
  export declare const EmailFormItem: React.FC<ValidatorFormItemProps>;
4
4
  export declare const PhoneFormItem: React.FC<ValidatorFormItemProps>;
5
5
  export declare const UserNameFormItem: React.FC<ValidatorFormItemProps>;
6
- export declare const CustomNameFormItem: React.FC<ValidatorFormItemProps>;
@@ -1,7 +1,7 @@
1
1
  import { FormInstance, FormItemProps } from 'antd/lib/form';
2
2
  import FormItem from 'antd/lib/form/FormItem';
3
3
  import { PasswordFormItem } from './PasswordFormItem';
4
- import { EmailFormItem, PhoneFormItem, UserNameFormItem, CustomNameFormItem } from './ValidatorFormItem';
4
+ import { EmailFormItem, PhoneFormItem, UserNameFormItem } from './ValidatorFormItem';
5
5
  export interface ValidatorFormItemProps extends FormItemProps {
6
6
  form?: FormInstance;
7
7
  checkRepeat?: boolean;
@@ -11,10 +11,9 @@ export interface ValidatorFormItemProps extends FormItemProps {
11
11
  * 控制内部FormItem组件关于pattern的校验规则
12
12
  */
13
13
  isCheckPattern?: boolean;
14
- defaultMethod?: string;
15
14
  }
16
15
  export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
17
- method: 'email' | 'phone' | 'username' | string;
16
+ method: 'email' | 'phone' | 'username';
18
17
  }
19
18
  export interface PasswordFormItemProps extends FormItemProps {
20
19
  }
@@ -27,7 +26,6 @@ interface FormItemInterface extends InternalFormItemType {
27
26
  Email: typeof EmailFormItem;
28
27
  Phone: typeof PhoneFormItem;
29
28
  UserName: typeof UserNameFormItem;
30
- CustomName: typeof CustomNameFormItem;
31
29
  }
32
30
  declare const CustomFormItem: FormItemInterface;
33
31
  export default CustomFormItem;
@@ -2,7 +2,7 @@
2
2
  import { GuardLocalConfig } from '../../Guard/config';
3
3
  import { GuardHttp } from '../guardHttp';
4
4
  import { GuardPageConfig } from '../../Type';
5
- import { ApplicationConfig, LoginMethods } from '../../Type/application';
5
+ import { ApplicationConfig, LoginMethods, RegisterMethods } from '../../Type/application';
6
6
  export declare const getPublicConfig: (appId: string) => ApplicationConfig;
7
7
  export declare const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
8
8
  export declare const getPageConfig: (appId: string) => GuardPageConfig;
@@ -26,8 +26,8 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
26
26
  loadingComponent?: import("react").ReactNode;
27
27
  openEventsMapping?: boolean | undefined;
28
28
  disableRegister?: boolean | undefined;
29
- registerMethods?: string[] | undefined;
30
- defaultRegisterMethod?: string | undefined;
29
+ registerMethods?: RegisterMethods[] | undefined;
30
+ defaultRegisterMethod?: RegisterMethods | undefined;
31
31
  publicKey?: string | undefined;
32
32
  agreementEnabled?: boolean | undefined;
33
33
  agreements?: import("../../Type").Agreement[] | undefined;
@@ -106,8 +106,7 @@ export declare const useGuardMultipleInstance: () => {
106
106
  } | undefined) => void;
107
107
  setUserInfo: (user: Pick<import("../Guard/core/hooks/useMultipleAccounts").User & {
108
108
  id: string;
109
- loginAccount?: string | undefined;
110
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
109
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
111
110
  setLoginWayByHttpData: (account: string, data: {
112
111
  username?: string | undefined;
113
112
  phone?: string | undefined;
@@ -2,7 +2,7 @@ import { Rule } from 'antd/lib/form';
2
2
  import qs from 'qs';
3
3
  import { User } from 'authing-js-sdk';
4
4
  import { GuardProps } from '../Guard';
5
- import { ApplicationConfig, ComplateFiledsPlace, LoginMethods, RegisterMethods, RegisterSortMethods, TabFieldsI18nItem } from '../Type/application';
5
+ import { ApplicationConfig, ComplateFiledsPlace, LoginMethods, RegisterMethods } from '../Type/application';
6
6
  import { Lang } from '../Type';
7
7
  export * from './popupCenter';
8
8
  export * from './clipboard';
@@ -75,8 +75,7 @@ export declare const getSymbolTypeLength: (pwd: string) => number;
75
75
  export declare const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string | undefined) => Rule[];
76
76
  export declare const sleep: (delay: number) => Promise<unknown>;
77
77
  export declare const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean | undefined) => boolean;
78
- export declare const tabSort: (tabList: string[], defaultMethod?: string | undefined) => string[];
79
- export declare const transformMethod: (method: RegisterMethods | string) => string;
78
+ export declare const tabSort: (defaultValue: any, tabList: RegisterMethods[]) => RegisterMethods[];
80
79
  export declare const mailDesensitization: (mail: string) => string;
81
80
  export declare const phoneDesensitization: (phone: string) => string;
82
81
  export declare const getHundreds: (num: number) => number;
@@ -91,5 +90,5 @@ export declare const getLoginTypePipe: (publicConfig: ApplicationConfig, registe
91
90
  } | undefined;
92
91
  export declare const getPasswordIdentify: (identity: string) => string;
93
92
  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;
93
+ export declare const isDingTalkOrigin: (origin: string) => boolean;
94
+ export declare const isWeComOrigin: (event: MessageEvent) => boolean;
@@ -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.0.10-rc.0";
1
+ declare const _default: "4.0.10-zhihu.0";
2
2
  export default _default;