@authing/guard-shim-react18 4.5.51-eak.12 → 4.5.51-eak.14

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.
@@ -3,7 +3,6 @@ export declare const GuardChangePassword: React.FC<{
3
3
  title: string;
4
4
  explain: string;
5
5
  children: ReactNode;
6
- logo?: string;
7
6
  }>;
8
7
  export declare const GuardFirstLoginPasswordResetView: React.FC;
9
8
  export declare const GuardPasswordNotSafeResetView: React.FC;
@@ -13,6 +13,5 @@ export interface GuardLocalConfig extends RegisterConfig, LoginConfig, ForgetPas
13
13
  * @description 是否调用 eventsMapping 中的事件
14
14
  */
15
15
  openEventsMapping?: boolean;
16
- autoFocus?: boolean;
17
16
  }
18
17
  export declare const getDefaultGuardLocalConfig: () => GuardLocalConfig;
@@ -8,7 +8,6 @@
8
8
  * 再次打开页面时,初始化时先根据 FE 自定义的 LoginWay 跳转到不同的 tab 下(way)下使用 account 进行回填。TODO: 这里也可优化,应该在登录成功时候就进行 LoginWay 的格式化,而非转来转去。(但是这样无法直观的体现是哪种方式进行登录)
9
9
  */
10
10
  import { SelectOptions } from '../../../Login/multipleAccounts/panel';
11
- export declare const LAST_USED_IDP = "__authing_last_used_idp__";
12
11
  export declare const QR_CODE_WAY: LoginWay[];
13
12
  /**
14
13
  * 登录时所有支持的登录列表(前端定义列表)
@@ -118,7 +117,6 @@ declare class MultipleAccount {
118
117
  private memberState;
119
118
  /**
120
119
  * 二维码登录时的ID
121
- *「loginWay = "social"」社会化身份源登录时 其 id 表示为「唯一标识」
122
120
  */
123
121
  private qrCodeId?;
124
122
  /**
@@ -139,10 +137,6 @@ declare class MultipleAccount {
139
137
  * 是否开启国际化短信
140
138
  */
141
139
  private isInternationSms?;
142
- /**
143
- * 社会化登录列表 主要是为了做「置顶上次登录」
144
- */
145
- private socialLoginWays?;
146
140
  constructor();
147
141
  /**
148
142
  * 页面首次加载时初始化 Store
@@ -244,7 +238,6 @@ declare class MultipleAccount {
244
238
  * 外部暴露方法
245
239
  */
246
240
  getStore: () => {
247
- getSocialLoginWays: () => User[] | undefined;
248
241
  initStore: (appId: string, options: {
249
242
  serverSideLoginMethods: LoginWay[];
250
243
  isInternationSms: boolean;
@@ -289,7 +282,6 @@ declare const useSelectAccounts: ({ appId, finallyConfig }: {
289
282
  finallyConfig?: any;
290
283
  }) => {
291
284
  instance: {
292
- getSocialLoginWays: () => User[] | undefined;
293
285
  initStore: (appId: string, options: {
294
286
  serverSideLoginMethods: LoginWay[];
295
287
  isInternationSms: boolean;
@@ -1,6 +1,7 @@
1
1
  import { React } from 'shim-react';
2
2
  import { GuardProps } from '../Guard';
3
3
  import '../styles.less';
4
+ import '../genauth.less';
4
5
  export declare enum LangMAP {
5
6
  zhCn = "zh-CN",
6
7
  enUs = "en-US",
@@ -33,8 +33,7 @@ export declare enum GuardModuleType {
33
33
  INVITE_EXPIRE = "inviteExpire",// 邀请链接过期
34
34
  INVITE_PAGE_EXPIRE = "invitePageExpire",// 页面过期
35
35
  INVITE_SUCCESS = "inviteSuccess",// 邀请成功
36
- RESET_PASSWORD = "resetPassword",
37
- REGISTER_ACCOUNT_TYPE_SELECT = "accountTypeSelect"
36
+ RESET_PASSWORD = "resetPassword"
38
37
  }
39
38
  export interface GuardModuleAction {
40
39
  action: string;
@@ -27,7 +27,6 @@ declare function useLoginAccountBackFill(options: {
27
27
  declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
28
28
  isMultipleAccount: boolean;
29
29
  multipleInstance: {
30
- getSocialLoginWays: () => import("../../Guard/core/hooks/useMultipleAccounts").User[] | undefined;
31
30
  initStore: (appId: string, options: {
32
31
  serverSideLoginMethods: LoginWay[];
33
32
  isInternationSms: boolean;
@@ -40,7 +39,7 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
40
39
  id: string;
41
40
  loginAccount?: string | undefined;
42
41
  usertype?: string | undefined;
43
- }, "tab" | "way" | "phoneCountryCode">) => void;
42
+ }, "way" | "tab" | "phoneCountryCode">) => void;
44
43
  setLoginWayByHttpData: (account: string, data: {
45
44
  username?: string | undefined;
46
45
  phone?: string | undefined;
@@ -62,7 +61,7 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
62
61
  getOriginAccount: () => string;
63
62
  getOriginWay: () => string;
64
63
  } | undefined;
65
- referMultipleState: ((type: "multiple" | "login") => void) | undefined;
64
+ referMultipleState: ((type: "login" | "multiple") => void) | undefined;
66
65
  backfillData: BackFillMultipleState | undefined;
67
66
  defaultQrWay: string | undefined;
68
67
  };
@@ -42,4 +42,3 @@ export interface GuardLoginInitData {
42
42
  export declare const getDefaultLoginConfig: () => LoginConfig;
43
43
  export declare const baseLoginPathMapping: Partial<Record<Protocol, string | null>>;
44
44
  export declare const loginUrlFieldMapping: Partial<Record<Protocol, string>>;
45
- export type ValidateStatus = undefined | 'validating';
@@ -1,5 +1 @@
1
- import { ApplicationConfig } from '../../../Type/application';
2
1
  export declare const IdpButton: (props: any) => JSX.Element | null;
3
- export declare const MoreIdpButton: (props: {
4
- idps: ApplicationConfig['identityProviders'];
5
- }) => JSX.Element;
@@ -8,7 +8,6 @@ interface BindPasskeyProps {
8
8
  interface VerifyPasskeyProps {
9
9
  mfaToken: string;
10
10
  mfaLogin: (code: any, data: any, message?: string) => void;
11
- mfaConfigsMap: Map<MFAType, boolean>;
12
11
  }
13
12
  export type MFAPasskeyProps = BindPasskeyProps & VerifyPasskeyProps & {
14
13
  passkeyEnabled: boolean;
@@ -8,7 +8,4 @@ export interface RegisterWithEmailCodeProps {
8
8
  publicConfig?: ApplicationConfig;
9
9
  registeContext?: any;
10
10
  }
11
- /**
12
- * @deprecated 废弃 🚒
13
- */
14
11
  export declare const RegisterWithEmailCode: React.FC<RegisterWithEmailCodeProps>;
@@ -7,7 +7,4 @@ export interface RegisterWithPhoneProps {
7
7
  publicConfig?: ApplicationConfig;
8
8
  registeContext?: any;
9
9
  }
10
- /**
11
- * @deprecated 废弃 🚒
12
- */
13
10
  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;
@@ -1,5 +1,3 @@
1
- import { React } from 'shim-react';
2
- export declare const ShieldSpinLoading: (props: JSX.IntrinsicAttributes & React.ClassAttributes<HTMLEmbedElement> & React.EmbedHTMLAttributes<HTMLEmbedElement>) => JSX.Element;
3
1
  interface IG2SpinProps {
4
2
  size?: number;
5
3
  className?: string;
@@ -207,15 +207,6 @@ interface LoginTypeI18nProps {
207
207
  };
208
208
  };
209
209
  }
210
- interface I18nLang {
211
- default: string;
212
- i18n: {
213
- [lang: string]: {
214
- value: string;
215
- enabled: boolean;
216
- };
217
- };
218
- }
219
210
  export interface ApplicationConfig {
220
211
  id: string;
221
212
  allowedOrigins: string[];
@@ -285,12 +276,9 @@ export interface ApplicationConfig {
285
276
  protocol: Protocol;
286
277
  displayName: string;
287
278
  logo: string;
288
- id: string;
289
279
  config: ISamlConnectionConfig | OIDCConnectionConfig | ICasConnectionConfig | IAzureAdConnectionConfig | IOAuthConnectionConfig;
290
280
  /** 是否开启内嵌模式 */
291
281
  embedded?: boolean;
292
- tags?: string[];
293
- tagsStatus?: boolean;
294
282
  }[];
295
283
  ssoPageComponentDisplay: {
296
284
  autoRegisterThenLoginHintInfo: boolean;
@@ -314,11 +302,6 @@ export interface ApplicationConfig {
314
302
  ad?: LoginTypeI18nProps;
315
303
  ldap?: LoginTypeI18nProps;
316
304
  };
317
- idpLayout?: {
318
- maxConns: number;
319
- topLastUsed: boolean;
320
- customMoreI18n: I18nLang;
321
- };
322
305
  };
323
306
  protocol: Protocol;
324
307
  oidcConfig: OidcClientMetadata;
@@ -344,12 +327,8 @@ export interface ApplicationConfig {
344
327
  enableCompletePassword: boolean;
345
328
  /** 是否开启手机密码注册手机号验证 */
346
329
  enabledPPRegisterValid?: boolean;
347
- /** 是否开启邮箱密码注册验证 */
348
- enabledMailPwdRegisterValid?: boolean;
349
330
  /** 是否开启邮箱域名匹配登录 */
350
331
  enabledMatchEmailDomain?: boolean;
351
- /** 注册是否开启账号类型选择 */
352
- enableAccountTypeSelect?: boolean;
353
332
  /**
354
333
  * 登录注册排序
355
334
  */
@@ -405,47 +384,6 @@ export interface ApplicationConfig {
405
384
  switch: 'OFF' | 'ON' | 'CONDON';
406
385
  };
407
386
  };
408
- forgetPasswordSmsConfig?: {
409
- robot: {
410
- switch: 'OFF' | 'ON' | 'CONDON';
411
- };
412
- };
413
- /** 注册阶段邮件安全配置 */
414
- registerEmailConfig?: {
415
- robot: {
416
- switch: 'OFF' | 'ON' | 'CONDON';
417
- };
418
- };
419
- /** 登录阶段邮件安全配置 */
420
- loginEmailConfig?: {
421
- robot: {
422
- switch: 'OFF' | 'ON' | 'CONDON';
423
- };
424
- };
425
- forgetPasswordEmailConfig?: {
426
- robot: {
427
- switch: 'OFF' | 'ON' | 'CONDON';
428
- };
429
- };
430
387
  /** 特殊浏览器匹配字符串 */
431
388
  specialBrowserSymbols?: string[];
432
- resetPwdTipsConfig?: {
433
- title: I18nLang;
434
- desc: I18nLang;
435
- };
436
- noticePwdTipsConfig?: {
437
- title: I18nLang;
438
- desc: I18nLang;
439
- };
440
- noticePwdCustomLogo?: string;
441
- /**
442
- * 开启延迟校验用户是否存在功能
443
- */
444
- closeCheckSendUser?: boolean;
445
- resetPwdLinkCustomLogo?: string;
446
- resetPwdLinkTipsConfig?: {
447
- title: I18nLang;
448
- desc: I18nLang;
449
- };
450
- resetPwdSelectEmailPhone?: 'email' | 'phone' | 'email_and_phone';
451
389
  }
@@ -25,7 +25,6 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
25
25
  showLoading?: boolean | undefined;
26
26
  loadingComponent?: React.ReactNode;
27
27
  openEventsMapping?: boolean | undefined;
28
- autoFocus?: boolean | undefined;
29
28
  disableRegister?: boolean | undefined;
30
29
  registerMethods?: string[] | undefined;
31
30
  defaultRegisterMethod?: string | undefined;
@@ -54,7 +53,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
54
53
  loginMethods?: LoginMethods[] | undefined;
55
54
  passwordLoginMethods?: string[] | undefined;
56
55
  socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
57
- socialConnectionsBtnShape?: "button" | "icon" | "default" | undefined;
56
+ socialConnectionsBtnShape?: "button" | "default" | "icon" | undefined;
58
57
  enterpriseConnections?: string[] | undefined;
59
58
  qrCodeScanOptions?: {
60
59
  extIdpConnId?: string | undefined;
@@ -111,7 +111,6 @@ export declare const useGuardAccountSelectInstance: () => {
111
111
  * 多账号 store 实例
112
112
  */
113
113
  instance?: {
114
- getSocialLoginWays: () => import("../Guard/core/hooks/useMultipleAccounts").User[] | undefined;
115
114
  initStore: (appId: string, options: {
116
115
  serverSideLoginMethods: import("../Guard/core/hooks/useMultipleAccounts").LoginWay[];
117
116
  isInternationSms: boolean;
@@ -124,7 +123,7 @@ export declare const useGuardAccountSelectInstance: () => {
124
123
  id: string;
125
124
  loginAccount?: string | undefined;
126
125
  usertype?: string | undefined;
127
- }, "tab" | "way" | "phoneCountryCode">) => void;
126
+ }, "way" | "tab" | "phoneCountryCode">) => void;
128
127
  setLoginWayByHttpData: (account: string, data: {
129
128
  username?: string | undefined;
130
129
  phone?: string | undefined;
@@ -164,7 +163,5 @@ export declare const useGuardDefaultLanguage: () => Lang;
164
163
  export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
165
164
  /** 当前人机验证策略 */
166
165
  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;
166
+ /** 当前应用是否开启人机验证策略 */
167
+ export declare const useCaptchaCheck: (sence: 'login' | 'register') => boolean;
@@ -14,9 +14,6 @@ export declare const useDebounce: (fn: any, delay: number) => (...args: any[]) =
14
14
  export declare const useMediaSize: () => {
15
15
  isPhoneMedia: boolean;
16
16
  };
17
- export declare const useAutoFocus: () => {
18
- autoFocus: boolean;
19
- };
20
17
  export declare const useShaking: () => {
21
18
  MountShaking: () => void;
22
19
  UnMountShaking: () => void;
@@ -28,10 +25,7 @@ export declare const useShaking: () => {
28
25
  * @returns
29
26
  */
30
27
  export declare const parsePhone: (isInternationSms: boolean, fieldValue: string, areaCode?: string) => {
31
- phoneNumber: string;
32
- countryCode: undefined;
33
- } | {
34
- countryCode: string;
28
+ countryCode: string | undefined;
35
29
  phoneNumber: string;
36
30
  };
37
31
  export declare enum SocialConnectionEvent {
@@ -7,7 +7,3 @@ export declare const popupCenter: (url: string, { w, h }?: {
7
7
  w: number;
8
8
  h: number;
9
9
  }) => void;
10
- export declare const larkPopupCenter: (url: string, { w, h }?: {
11
- w: number;
12
- h: number;
13
- }) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/guard-shim-react18",
3
- "version": "4.5.51-eak.12",
3
+ "version": "4.5.51-eak.14",
4
4
  "description": "Guard shim for react 18, only be used to internal",
5
5
  "types": "dist/typings/src/index.d.ts",
6
6
  "module": "dist/guard.min.js",
@@ -1,3 +0,0 @@
1
- import { React } from 'shim-react';
2
- import './style.less';
3
- export declare const GuardRegisterAccountTypeView: React.FC;