@authing/guard-shim-react 4.4.0-alpha.2 → 4.4.0-alpha.21

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.
@@ -6,4 +6,4 @@ export declare enum CompleteInfoAuthFlowAction {
6
6
  }
7
7
  export declare const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
8
8
  export declare const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'] | string, content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
9
- export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<import("../_utils/http").AuthingGuardResponse<any> | User | undefined>;
9
+ export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<User | import("../_utils/http").AuthingGuardResponse<any> | undefined>;
@@ -21,7 +21,7 @@ export interface GuardCompleteInfoViewProps extends GuardCompleteInfoProps {
21
21
  initData: any;
22
22
  onLogin?: any;
23
23
  }
24
- export type ExtendsFieldType = 'user' | 'internal';
24
+ export declare type ExtendsFieldType = 'user' | 'internal';
25
25
  export interface ExtendsField {
26
26
  type: ExtendsFieldType;
27
27
  name: string;
@@ -1,3 +1,3 @@
1
1
  import { React } from 'shim-react';
2
2
  import { PasswordProps, InputProps } from 'shim-antd/lib/input';
3
- export declare const InputPasswordForget: React.ForwardRefExoticComponent<Pick<PasswordProps, keyof PasswordProps> & React.RefAttributes<React.RefObject<InputProps>>>;
3
+ export declare const InputPasswordForget: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.RefObject<InputProps>>>;
@@ -1,4 +1,3 @@
1
- import { React } from 'shim-react';
2
1
  import { GuardEvents } from './event';
3
2
  import { GuardAppendConfig, IG2FCProps } from '../Type';
4
3
  import { GuardLocalConfig } from './config';
@@ -7,4 +6,4 @@ export interface GuardProps extends GuardEvents, IG2FCProps {
7
6
  config?: Partial<GuardLocalConfig>;
8
7
  appendConfig?: GuardAppendConfig;
9
8
  }
10
- export declare const Guard: React.MemoExoticComponent<(props: GuardProps) => JSX.Element>;
9
+ export declare function Guard(props: GuardProps): JSX.Element;
@@ -14,7 +14,7 @@ export interface StateMachineLog {
14
14
  date: number;
15
15
  dataSource: ModuleState;
16
16
  }
17
- export type ChangeModuleEvent = (nextModule: GuardModuleType, initData?: any) => void;
17
+ export declare type ChangeModuleEvent = (nextModule: GuardModuleType, initData?: any) => void;
18
18
  export declare class GuardStateMachine {
19
19
  private order;
20
20
  private config;
@@ -13,7 +13,7 @@ export declare const QR_CODE_WAY: LoginWay[];
13
13
  * 登录时所有支持的登录列表(前端定义列表)
14
14
  * 这里稍微有点乱 因为Login中的登录方式和这里的不匹配,暂时放在了一起
15
15
  */
16
- export type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
16
+ export declare type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
17
17
  /**
18
18
  * when: 多账号页面跳转进入登录页面
19
19
  * 携带的回填数据信息
@@ -27,7 +27,7 @@ export interface BackFillMultipleState extends Omit<User, 'id' | 'name' | 'nickn
27
27
  /**
28
28
  * Store instance
29
29
  */
30
- export type StoreInstance = ReturnType<MultipleAccount['getStore']>;
30
+ export declare type StoreInstance = ReturnType<MultipleAccount['getStore']>;
31
31
  /**
32
32
  * 当前 userId 对应的类型
33
33
  */
@@ -249,7 +249,7 @@ declare class MultipleAccount {
249
249
  setUserInfo: (user: Omit<User & {
250
250
  id: string;
251
251
  loginAccount?: string | undefined;
252
- }, "tab" | "way" | "phoneCountryCode">) => void;
252
+ }, "phoneCountryCode" | "way" | "tab">) => void;
253
253
  setLoginWayByHttpData: (account: string, data: {
254
254
  username?: string | undefined;
255
255
  phone?: string | undefined;
@@ -292,7 +292,7 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
292
292
  setUserInfo: (user: Omit<User & {
293
293
  id: string;
294
294
  loginAccount?: string | undefined;
295
- }, "tab" | "way" | "phoneCountryCode">) => void;
295
+ }, "phoneCountryCode" | "way" | "tab">) => void;
296
296
  setLoginWayByHttpData: (account: string, data: {
297
297
  username?: string | undefined;
298
298
  phone?: string | undefined;
@@ -2,4 +2,4 @@ import { InputProps } from 'shim-antd';
2
2
  import { React } from 'shim-react';
3
3
  export interface InputNumberProps extends InputProps {
4
4
  }
5
- export declare const InputNumber: React.ForwardRefExoticComponent<Pick<InputNumberProps, keyof InputNumberProps> & React.RefAttributes<any>>;
5
+ export declare const InputNumber: React.ForwardRefExoticComponent<InputNumberProps & React.RefAttributes<any>>;
@@ -9,7 +9,7 @@ export interface CheckPushCodeStatusProps {
9
9
  export interface OnLoginProps {
10
10
  account: string;
11
11
  }
12
- export type LoginStatus = 'before' | 'pending';
12
+ export declare type LoginStatus = 'before' | 'pending';
13
13
  export interface LoginWithAuthingOtpPushProps {
14
14
  onLoginSuccess?: any;
15
15
  multipleInstance?: StoreInstance;
@@ -20,9 +20,9 @@ export interface PushLoginGudeModalProps {
20
20
  visible: boolean;
21
21
  onClose: () => void;
22
22
  }
23
- export type Selector = 'howUsePushLogin' | 'howBindClient' | 'howGetAppLoginUrl';
23
+ export declare type Selector = 'howUsePushLogin' | 'howBindClient' | 'howGetAppLoginUrl';
24
24
  export interface SelectorOption {
25
25
  value: Selector;
26
26
  label: string;
27
27
  }
28
- export type SelectorOptions = SelectorOption[];
28
+ export declare type SelectorOptions = SelectorOption[];
@@ -35,7 +35,7 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
35
35
  setUserInfo: (user: Omit<import("../../Guard/core/hooks/useMultipleAccounts").User & {
36
36
  id: string;
37
37
  loginAccount?: string | undefined;
38
- }, "tab" | "way" | "phoneCountryCode">) => void;
38
+ }, "phoneCountryCode" | "way" | "tab">) => void;
39
39
  setLoginWayByHttpData: (account: string, data: {
40
40
  username?: string | undefined;
41
41
  phone?: string | undefined;
@@ -1,7 +1,7 @@
1
1
  import { React } from 'shim-react';
2
2
  import './index.less';
3
3
  import { CodeStatusDescriptions } from './WorkQrCode';
4
- export type CodeStatus = 'loading' | 'ready' | 'already' | 'success' | 'error' | 'expired' | 'cancel' | 'MFA';
4
+ export declare type CodeStatus = 'loading' | 'ready' | 'already' | 'success' | 'error' | 'expired' | 'cancel' | 'MFA';
5
5
  export declare const prefix = "refactor";
6
6
  export interface UiQrProps {
7
7
  /**
@@ -4,7 +4,7 @@ import { CodeStatus, UiQrProps } from './UiQrCode';
4
4
  /**
5
5
  * 二维码不同状态下的底部描述文字
6
6
  */
7
- export type CodeStatusDescriptions = Partial<Record<Exclude<CodeStatus, 'loading'>, React.ReactNode | ((referQrCode?: () => void) => React.ReactNode)>>;
7
+ export declare type CodeStatusDescriptions = Partial<Record<Exclude<CodeStatus, 'loading'>, React.ReactNode | ((referQrCode?: () => void) => React.ReactNode)>>;
8
8
  export interface WorkQrCodeRef {
9
9
  referQrCode: () => Promise<{
10
10
  random: string;
@@ -1,7 +1,7 @@
1
1
  import { React } from 'shim-react';
2
2
  import { CodeStatus } from '../UiQrCode';
3
- export type ReducerType = 'change' | 'changeStatus' | 'changeDesc';
4
- export type RootState = {
3
+ export declare type ReducerType = 'change' | 'changeStatus' | 'changeDesc';
4
+ export declare type RootState = {
5
5
  /**
6
6
  * 状态
7
7
  */
@@ -1,6 +1,6 @@
1
1
  import { UiQrCode } from './UiQrCode';
2
2
  import { WorkQrCode } from './WorkQrCode';
3
- type IQrCode = typeof WorkQrCode & {
3
+ declare type IQrCode = typeof WorkQrCode & {
4
4
  UI: typeof UiQrCode;
5
5
  };
6
6
  declare const QrCode: IQrCode;
@@ -6,5 +6,5 @@ interface SubmitButtonProps extends ButtonProps {
6
6
  onClick?: any;
7
7
  disabled?: boolean;
8
8
  }
9
- declare const _default: React.ForwardRefExoticComponent<Pick<SubmitButtonProps, keyof SubmitButtonProps> & React.RefAttributes<unknown>>;
9
+ declare const _default: React.ForwardRefExoticComponent<SubmitButtonProps & React.RefAttributes<unknown>>;
10
10
  export default _default;
@@ -1,4 +1,4 @@
1
- export type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
1
+ export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
2
2
  import { PasswordStrength } from '../_utils';
3
3
  export * from 'authing-js-sdk';
4
4
  export declare enum LoginMethods {
@@ -114,7 +114,7 @@ export interface QrCodeItem {
114
114
  title: string;
115
115
  isDefault?: boolean;
116
116
  }
117
- export type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
117
+ export declare type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
118
118
  export interface OidcClientMetadata {
119
119
  grant_types: string[];
120
120
  client_id: string;
@@ -149,7 +149,7 @@ export interface UserExtendsField {
149
149
  required: boolean;
150
150
  validateRules: any[];
151
151
  }
152
- export type ExtendsField = InternalExtendsField | UserExtendsField;
152
+ export declare type ExtendsField = InternalExtendsField | UserExtendsField;
153
153
  export interface ApplicationPasswordTabConfig {
154
154
  enabledLoginMethods?: PasswordLoginMethods[];
155
155
  validRegisterMethods?: string[];
@@ -167,9 +167,9 @@ export interface Agreement {
167
167
  lang: Lang;
168
168
  availableAt?: number;
169
169
  }
170
- export type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
171
- export type VerifyLoginMethods = 'email-code' | 'phone-code';
172
- export type ComplateFiledsPlace = 'register' | 'login';
170
+ export declare type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
171
+ export declare type VerifyLoginMethods = 'email-code' | 'phone-code';
172
+ export declare type ComplateFiledsPlace = 'register' | 'login';
173
173
  export interface TabFieldsI18nItem {
174
174
  key: string;
175
175
  label: string;
@@ -21,7 +21,7 @@ export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
21
21
  export interface ICheckProps {
22
22
  check: (values: any) => void;
23
23
  }
24
- type InternalFormItemType = typeof Form.Item;
24
+ declare type InternalFormItemType = typeof Form.Item;
25
25
  interface FormItemInterface extends InternalFormItemType {
26
26
  Password: typeof PasswordFormItem;
27
27
  Email: typeof EmailFormItem;
@@ -121,7 +121,7 @@ export declare const useGuardMultipleInstance: () => {
121
121
  setUserInfo: (user: Omit<import("../Guard/core/hooks/useMultipleAccounts").User & {
122
122
  id: string;
123
123
  loginAccount?: string | undefined;
124
- }, "tab" | "way" | "phoneCountryCode">) => void;
124
+ }, "phoneCountryCode" | "way" | "tab">) => void;
125
125
  setLoginWayByHttpData: (account: string, data: {
126
126
  username?: string | undefined;
127
127
  phone?: string | undefined;
@@ -15,7 +15,7 @@ export declare const validate: (type: keyof typeof VALIDATE_PATTERN, val: string
15
15
  export declare const getRequiredRules: (msg: string) => Rule[];
16
16
  export declare const fieldRequiredRule: (fieldRequiredRule: string, fieldRequiredRuleMessage?: string) => Rule[];
17
17
  export declare function getDeviceName(): string | null | undefined;
18
- export type STYLE_RECORD_KEY = 'appConfig' | 'userConfig';
18
+ export declare type STYLE_RECORD_KEY = 'appConfig' | 'userConfig';
19
19
  export declare const insertStyles: (styles: string | any, recordKey?: STYLE_RECORD_KEY) => void;
20
20
  export declare const removeStyles: (recordKey: STYLE_RECORD_KEY) => void;
21
21
  export declare const getClassnames: (classnames: (string | boolean | undefined)[]) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/guard-shim-react",
3
- "version": "4.4.0-alpha.2",
3
+ "version": "4.4.0-alpha.21",
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",