@authing/guard-shim-react 4.5.47-metax.5 → 4.5.47-rc.13

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.
@@ -14,7 +14,7 @@ export declare const QR_CODE_WAY: LoginWay[];
14
14
  * 登录时所有支持的登录列表(前端定义列表)
15
15
  * 这里稍微有点乱 因为Login中的登录方式和这里的不匹配,暂时放在了一起
16
16
  */
17
- export type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'zjzwfw-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
17
+ export type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'zjzwfw-qrcode' | 'i-shenzhen-personal-qrcode' | 'i-shenzhen-corporate-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
18
18
  /**
19
19
  * when: 多账号页面跳转进入登录页面
20
20
  * 携带的回填数据信息
@@ -33,7 +33,8 @@ export declare enum GuardModuleType {
33
33
  INVITE_EXPIRE = "inviteExpire",// 邀请链接过期
34
34
  INVITE_PAGE_EXPIRE = "invitePageExpire",// 页面过期
35
35
  INVITE_SUCCESS = "inviteSuccess",// 邀请成功
36
- RESET_PASSWORD = "resetPassword"
36
+ RESET_PASSWORD = "resetPassword",
37
+ REGISTER_ACCOUNT_TYPE_SELECT = "accountTypeSelect"
37
38
  }
38
39
  export interface GuardModuleAction {
39
40
  action: string;
@@ -0,0 +1,13 @@
1
+ import { StoreInstance } from '../../Guard/core/hooks/useMultipleAccounts';
2
+ import { LoginMethods, QrCodeItem } from '../../Type';
3
+ type IShenzhenLoginMethod = LoginMethods.IShenzhenPersonalQrcode | LoginMethods.IShenzhenCorporateQrcode;
4
+ interface LoginWithIShenzhenQrcodeProps {
5
+ canLoop: boolean;
6
+ connectionId: string;
7
+ loginMethod: IShenzhenLoginMethod;
8
+ multipleInstance?: StoreInstance;
9
+ onLoginSuccess: (data: any) => void;
10
+ qrConfig?: QrCodeItem['QRConfig'];
11
+ }
12
+ export declare const LoginWithIShenzhenQrcode: (props: LoginWithIShenzhenQrcodeProps) => JSX.Element | null;
13
+ export {};
@@ -62,7 +62,7 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
62
62
  getOriginAccount: () => string;
63
63
  getOriginWay: () => string;
64
64
  } | undefined;
65
- referMultipleState: ((type: "login" | "multiple") => void) | undefined;
65
+ referMultipleState: ((type: "multiple" | "login") => void) | undefined;
66
66
  backfillData: BackFillMultipleState | undefined;
67
67
  defaultQrWay: string | undefined;
68
68
  };
@@ -0,0 +1,3 @@
1
+ import { React } from 'shim-react';
2
+ import './style.less';
3
+ export declare const GuardRegisterAccountTypeView: React.FC;
@@ -8,4 +8,7 @@ export interface RegisterWithEmailCodeProps {
8
8
  publicConfig?: ApplicationConfig;
9
9
  registeContext?: any;
10
10
  }
11
+ /**
12
+ * @deprecated 废弃 🚒
13
+ */
11
14
  export declare const RegisterWithEmailCode: React.FC<RegisterWithEmailCodeProps>;
@@ -7,4 +7,7 @@ export interface RegisterWithPhoneProps {
7
7
  publicConfig?: ApplicationConfig;
8
8
  registeContext?: any;
9
9
  }
10
+ /**
11
+ * @deprecated 废弃 🚒
12
+ */
10
13
  export declare const RegisterWithPhone: React.FC<RegisterWithPhoneProps>;
@@ -9,8 +9,5 @@ export interface SendCodeByEmailProps extends InputProps {
9
9
  fieldName?: string;
10
10
  autoSubmit?: boolean;
11
11
  scene: EmailScene;
12
- captchaCode?: string;
13
- onSendCodeError?: any;
14
- codeFieldName?: string;
15
12
  }
16
13
  export declare const SendCodeByEmail: React.FC<SendCodeByEmailProps>;
@@ -7,7 +7,6 @@ export interface SendCodeByPhoneProps extends InputProps {
7
7
  form?: any;
8
8
  onSendCodeBefore?: any;
9
9
  onSendCodeAfter?: any;
10
- onSendCodeError?: any;
11
10
  fieldName?: string;
12
11
  autoSubmit?: boolean;
13
12
  scene: SceneType;
@@ -17,7 +17,9 @@ export declare enum LoginMethods {
17
17
  WECHATWORKAGENCYQRCONNECT = "wechatwork-agency-qrcode",// 代开发形式的内部应用
18
18
  DingTalkQrcode = "dingtalk-qrcode",//钉钉扫码
19
19
  Passkey = "passkey",// passkey
20
- ZJZWFWQrcode = "zjzwfw-qrcode"
20
+ ZJZWFWQrcode = "zjzwfw-qrcode",// 浙江政务钉
21
+ IShenzhenPersonalQrcode = "i-shenzhen-personal-qrcode",// i 深圳个人扫码登录
22
+ IShenzhenCorporateQrcode = "i-shenzhen-corporate-qrcode"
21
23
  }
22
24
  export declare enum OIDCConnectionMode {
23
25
  FRONT_CHANNEL = "FRONT_CHANNEL",
@@ -127,12 +129,14 @@ export interface QrCodeItem {
127
129
  isDefault?: boolean;
128
130
  type?: LoginMethods;
129
131
  QRConfig?: {
130
- corpId: string;
131
- agentId: string;
132
- redirectUrl: string;
133
- identifier: string;
132
+ corpId?: string;
133
+ agentId?: string;
134
+ redirectUrl?: string;
135
+ identifier?: string;
134
136
  clientId?: string;
135
137
  authorizationUrl?: string;
138
+ subjectType?: 'personal' | 'corporate';
139
+ generateUrl?: string;
136
140
  };
137
141
  }
138
142
  export type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
@@ -348,6 +352,8 @@ export interface ApplicationConfig {
348
352
  enabledMailPwdRegisterValid?: boolean;
349
353
  /** 是否开启邮箱域名匹配登录 */
350
354
  enabledMatchEmailDomain?: boolean;
355
+ /** 注册是否开启账号类型选择 */
356
+ enableAccountTypeSelect?: boolean;
351
357
  /**
352
358
  * 登录注册排序
353
359
  */
@@ -408,23 +414,6 @@ export interface ApplicationConfig {
408
414
  switch: 'OFF' | 'ON' | 'CONDON';
409
415
  };
410
416
  };
411
- /** 注册阶段邮件安全配置 */
412
- registerEmailConfig?: {
413
- robot: {
414
- switch: 'OFF' | 'ON' | 'CONDON';
415
- };
416
- };
417
- /** 登录阶段邮件安全配置 */
418
- loginEmailConfig?: {
419
- robot: {
420
- switch: 'OFF' | 'ON' | 'CONDON';
421
- };
422
- };
423
- forgetPasswordEmailConfig?: {
424
- robot: {
425
- switch: 'OFF' | 'ON' | 'CONDON';
426
- };
427
- };
428
417
  /** 特殊浏览器匹配字符串 */
429
418
  specialBrowserSymbols?: string[];
430
419
  resetPwdTipsConfig?: {
@@ -2,4 +2,11 @@ import { React } from 'shim-react';
2
2
  export declare const UploadImage: React.FC<{
3
3
  value?: string;
4
4
  onChange?: (value: string) => void;
5
+ uploadText?: string;
6
+ accept?: string;
7
+ folder?: string;
8
+ beforeUpload?: (file: File) => boolean | Promise<boolean>;
9
+ customUpload?: (file: File) => Promise<string>;
10
+ onUploaded?: (value: string) => void | Promise<void>;
11
+ onUploadFailed?: () => void;
5
12
  }>;
@@ -54,7 +54,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
54
54
  loginMethods?: LoginMethods[] | undefined;
55
55
  passwordLoginMethods?: string[] | undefined;
56
56
  socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
57
- socialConnectionsBtnShape?: "button" | "default" | "icon" | undefined;
57
+ socialConnectionsBtnShape?: "button" | "icon" | "default" | undefined;
58
58
  enterpriseConnections?: string[] | undefined;
59
59
  qrCodeScanOptions?: {
60
60
  extIdpConnId?: string | undefined;
@@ -164,7 +164,5 @@ export declare const useGuardDefaultLanguage: () => Lang;
164
164
  export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
165
165
  /** 当前人机验证策略 */
166
166
  export declare const useRobotVerify: () => "always_enable" | "disable" | "condition_set";
167
- /** 当前应用短信是否开启人机验证策略 */
168
- export declare const useSmsCaptchaCheck: (sence: 'login' | 'register' | 'forget-password') => boolean;
169
- /** 当前应用邮件是否开启人机验证策略 */
170
- export declare const useEmailCaptchaCheck: (sence: 'login' | 'register' | 'forget-password') => boolean;
167
+ /** 当前应用是否开启人机验证策略 */
168
+ export declare const useCaptchaCheck: (sence: 'login' | 'register' | 'forget-password') => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/guard-shim-react",
3
- "version": "4.5.47-metax.5",
3
+ "version": "4.5.47-rc.13",
4
4
  "description": "Guard shim for react 16 / 17, only be used to internal",
5
5
  "types": "dist/typings/src/index.d.ts",
6
6
  "module": "dist/guard.min.js",