@authing/guard-shim-react 4.5.6 → 4.5.8-alpha.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.
@@ -24,6 +24,7 @@ export interface GuardSelectProps<T = any> extends ListProps<any> {
24
24
  /** 数据源 */
25
25
  dataSource: T[];
26
26
  onSelect?: (item?: T, index?: number) => void;
27
+ isNewStyle?: boolean;
27
28
  }
28
29
  /** 选择列表组件 兼容绝大多数选择场景 */
29
30
  export declare const GuardSelect: <D extends GuardSelectItem = any>(props: GuardSelectProps<D>) => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const LoginWithDingTalkQrcode: (props: any) => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const LoginWithWeComQrcode: (props: any) => JSX.Element;
@@ -58,7 +58,7 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
58
58
  getOriginAccount: () => string;
59
59
  getOriginWay: () => string;
60
60
  } | undefined;
61
- referMultipleState: ((type: "login" | "multiple") => void) | undefined;
61
+ referMultipleState: ((type: "multiple" | "login") => void) | undefined;
62
62
  backfillData: BackFillMultipleState | undefined;
63
63
  defaultQrWay: string | undefined;
64
64
  };
@@ -0,0 +1,4 @@
1
+ import { React } from 'shim-react';
2
+ import { TenantButtonProps } from '../interface';
3
+ import '../styles.less';
4
+ export declare const CreateButton: React.FC<TenantButtonProps>;
@@ -0,0 +1,8 @@
1
+ import { React } from 'shim-react';
2
+ interface Props {
3
+ email: string;
4
+ setSent: (sent: boolean) => void;
5
+ onFinish: () => void;
6
+ }
7
+ export declare const InputEmailCode: React.FC<Props>;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ import { React } from 'shim-react';
2
+ import { TenantButtonProps } from '../interface';
3
+ import '../styles.less';
4
+ export declare const JoinButton: React.FC<TenantButtonProps>;
@@ -0,0 +1,6 @@
1
+ export declare enum TenantBusinessAction {
2
+ JoinTenant = "join-tenant-portal",
3
+ CreateTenant = "create-tenant-portal"
4
+ }
5
+ export declare const authFlow: (action: TenantBusinessAction, content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
6
+ export declare const getTenantInfoByCode: (code: string) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
@@ -0,0 +1,4 @@
1
+ import { React } from 'shim-react';
2
+ import { CreateTenantProps } from '../interface';
3
+ import '../styles.less';
4
+ export declare const CreateTenantView: React.FC<CreateTenantProps>;
@@ -0,0 +1,4 @@
1
+ import { React } from 'shim-react';
2
+ import { JoinTenantProps } from '../interface';
3
+ import '../styles.less';
4
+ export declare const JoinTenantView: React.FC<JoinTenantProps>;
@@ -23,6 +23,7 @@ export interface TenantPortalDataItem extends TenantPortalListType {
23
23
  avatar?: AvatarProps;
24
24
  extra?: React.ReactNode;
25
25
  title?: string;
26
+ isJoin?: boolean;
26
27
  }
27
28
  /** 租户门户相关事件 */
28
29
  export interface TenantPortalEvents extends IG2Events {
@@ -30,3 +31,24 @@ export interface TenantPortalEvents extends IG2Events {
30
31
  /** 租户门户选择回调 */
31
32
  onTenantSelect?: (data?: TenantPortalSelectType) => void;
32
33
  }
34
+ export declare type TenantView = 'default' | 'join' | 'create';
35
+ export interface TenantButtonProps {
36
+ className?: string;
37
+ onClick?: () => void;
38
+ style?: React.CSSProperties;
39
+ }
40
+ export interface BackProps {
41
+ onBack: () => void;
42
+ }
43
+ export interface CreateTenantProps extends BackProps {
44
+ }
45
+ export interface JoinTenantProps extends BackProps {
46
+ }
47
+ export declare enum JoinTenantStepEnum {
48
+ InputTenantCode = "inputTenantCode",
49
+ InputEnterpriseEmail = "inputEnterpriseEmail",
50
+ VerifyEmailCode = "verifyEmailCode",
51
+ NoEnterpriseDomain = "noEnterpriseDomain",
52
+ JoinSuccess = "joinSuccess",
53
+ JoinFailed = "joinFailed"
54
+ }
@@ -11,6 +11,8 @@ export declare enum LoginMethods {
11
11
  AD = "ad",
12
12
  WechatMpQrcode = "wechatmp-qrcode",
13
13
  AuthingOtpPush = "authing-otp-push",
14
+ WechatworkCorpQrconnect = "wechatwork-corp-qrconnect",
15
+ DingTalkQrcode = "dingtalk-qrcode",
14
16
  Passkey = "passkey"
15
17
  }
16
18
  export declare enum OIDCConnectionMode {
@@ -91,6 +93,8 @@ export interface ICasConnectionConfig {
91
93
  casConnectionLoginUrl: string;
92
94
  }
93
95
  export interface SocialConnectionItem {
96
+ id: string;
97
+ embedded: boolean;
94
98
  name: string;
95
99
  name_en: string;
96
100
  displayName: string;
@@ -115,6 +119,13 @@ export interface QrCodeItem {
115
119
  id: string;
116
120
  title: string;
117
121
  isDefault?: boolean;
122
+ QRConfig?: {
123
+ corpId: string;
124
+ agentId: string;
125
+ redirectUrl: string;
126
+ identifier: string;
127
+ clientId?: string;
128
+ };
118
129
  }
119
130
  export declare type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
120
131
  export interface OidcClientMetadata {
@@ -258,6 +269,8 @@ export interface ApplicationConfig {
258
269
  displayName: string;
259
270
  logo: string;
260
271
  config: ISamlConnectionConfig | OIDCConnectionConfig | ICasConnectionConfig | IAzureAdConnectionConfig | IOAuthConnectionConfig;
272
+ /** 是否开启内嵌模式 */
273
+ embedded?: boolean;
261
274
  }[];
262
275
  ssoPageComponentDisplay: {
263
276
  autoRegisterThenLoginHintInfo: boolean;
@@ -337,5 +350,7 @@ export interface ApplicationConfig {
337
350
  appRobotVerify: 'always_enable' | 'disable' | 'condition_set';
338
351
  /** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */
339
352
  userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set';
353
+ /** 加入租户校验企业邮箱 */
354
+ enableVerifyDomainInJoinTenant: boolean;
340
355
  passkeyEnabled: boolean;
341
356
  }
@@ -53,7 +53,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
53
53
  loginMethods?: LoginMethods[] | undefined;
54
54
  passwordLoginMethods?: string[] | undefined;
55
55
  socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
56
- socialConnectionsBtnShape?: "button" | "default" | "icon" | undefined;
56
+ socialConnectionsBtnShape?: "button" | "icon" | "default" | undefined;
57
57
  enterpriseConnections?: string[] | undefined;
58
58
  qrCodeScanOptions?: {
59
59
  extIdpConnId?: string | undefined;
@@ -77,6 +77,8 @@ export declare const getI18nLabel: (method: string | RegisterSortMethods, i18nFi
77
77
  export declare const getSortLabels: (methods: string[], i18nConfig: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
78
78
  export declare const getSortTabs: (tabs: string[], tab?: string) => string[];
79
79
  export declare const isDisabled: (values: Record<string, any>, requireNames?: string[]) => boolean;
80
+ export declare const isWeComOrigin: (event: MessageEvent) => boolean;
81
+ export declare const isDingTalkOrigin: (origin: string) => boolean;
80
82
  export * from './popupCenter';
81
83
  export * from './clipboard';
82
84
  export * from './locales';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/guard-shim-react",
3
- "version": "4.5.6",
3
+ "version": "4.5.8-alpha.0",
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",