@authing/react-ui-components 4.2.1-alpha.2 → 4.2.2-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/react-ui-components",
3
- "version": "4.2.1-alpha.2",
3
+ "version": "4.2.2-alpha.0",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "types/index.d.ts",
@@ -45,7 +45,8 @@
45
45
  "vite": "vite",
46
46
  "generate-version": "node ./scripts/generate-version",
47
47
  "generate-examples": "node ./scripts/generate-examples.js",
48
- "test": "node ./scripts/dev/pre-build.js"
48
+ "test": "node ./scripts/dev/pre-build.js",
49
+ "lint:fix": "eslint --fix --ext .ts,.tsx,.js ./components"
49
50
  },
50
51
  "publishConfig": {
51
52
  "access": "public",
@@ -1,4 +1,6 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { AuthClientContextProps } from './context';
3
- export declare const AuthClientProvider: React.FC<AuthClientContextProps>;
3
+ export declare const AuthClientProvider: React.FC<AuthClientContextProps & {
4
+ children: ReactNode;
5
+ }>;
4
6
  export declare const useGlobalAuthClient: () => import("authing-js-sdk").AuthenticationClient | undefined;
@@ -7,4 +7,6 @@ export declare const BackLogin: React.FC<BackProps>;
7
7
  export interface BackCustomProps extends BackProps {
8
8
  onBack?: () => void;
9
9
  }
10
- export declare const BackCustom: React.FC<BackCustomProps>;
10
+ export declare const BackCustom: React.FC<BackCustomProps & {
11
+ children: any;
12
+ }>;
@@ -1,7 +1,8 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  export declare const GuardChangePassword: React.FC<{
3
3
  title: string;
4
4
  explain: string;
5
+ children: ReactNode;
5
6
  }>;
6
7
  export declare const GuardFirstLoginPasswordResetView: React.FC;
7
8
  export declare const GuardPasswordNotSafeResetView: React.FC;
@@ -2,7 +2,7 @@ import { AuthenticationClient, CommonMessage, SceneType } from 'authing-js-sdk';
2
2
  import { EmailScene, IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '../Type';
3
3
  export interface ForgetPasswordEvents extends IG2Events {
4
4
  onEmailSend?: (authClient: AuthenticationClient, sence?: EmailScene) => void;
5
- onEmailSendError?: (error: CommonMessage, authClient: AuthenticationClient, sence?: EmailScene) => void;
5
+ onEmailSendError?: (error?: CommonMessage, authClient?: AuthenticationClient, sence?: EmailScene) => void;
6
6
  onPhoneSend?: (authClient: AuthenticationClient, sence?: SceneType) => void;
7
7
  onPhoneSendError?: (error: CommonMessage, authClient: AuthenticationClient, sence?: SceneType) => void;
8
8
  onPwdReset?: (authClient: AuthenticationClient) => void;
@@ -1,7 +1,8 @@
1
1
  import { GuardProps } from '..';
2
- import React from 'react';
2
+ import React, { ReactNode } from 'react';
3
3
  import { ModuleState } from '../GuardModule/stateMachine';
4
4
  export declare const RenderContext: React.FC<{
5
5
  guardProps: GuardProps;
6
6
  initState: ModuleState;
7
+ children: ReactNode;
7
8
  }>;
@@ -1,4 +1,2 @@
1
- import { Input } from 'antd';
2
- import { PasswordProps } from 'antd/lib/input';
3
- import React from 'react';
4
- export declare const InputPassword: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.RefObject<Input>>>;
1
+ /// <reference types="react" />
2
+ export declare const InputPassword: (props: any) => JSX.Element;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import './index.less';
3
3
  import { CodeStatusDescriptions } from './WorkQrCode';
4
4
  export declare type CodeStatus = 'loading' | 'ready' | 'already' | 'success' | 'error' | 'expired' | 'cancel' | 'MFA';
5
- export declare const prefix = "refactor";
5
+ export declare const prefix: string;
6
6
  export interface UiQrProps {
7
7
  /**
8
8
  * Loading 组件
@@ -292,6 +292,11 @@ export interface ApplicationConfig {
292
292
  loginMethodsSort: string[];
293
293
  };
294
294
  tabMethodsFields: TabFieldsI18nItem[];
295
+ regexRules?: {
296
+ key: string;
297
+ appLevel: string;
298
+ userpoolLevel: string;
299
+ }[];
295
300
  /** 是否为租户控制台应用 */
296
301
  isTenantConsole?: boolean;
297
302
  /** 是否默认为租户应用面板应用 */
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig, Lang } from '..';
3
3
  import { BackFillMultipleState, StoreInstance } from '../Guard/core/hooks/useMultipleAccounts';
4
4
  import { ModuleState } from '../Guard/GuardModule/stateMachine';
@@ -43,6 +43,7 @@ export interface IGuardContext {
43
43
  */
44
44
  clearBackFillData?: () => void;
45
45
  };
46
+ phoneRegex: RegExp | null;
46
47
  defaultLanguageConfig: Lang;
47
48
  /** 租户信息获取和操作处理相关 */
48
49
  tenantInstance?: MultipleTenant;
@@ -50,12 +51,14 @@ export interface IGuardContext {
50
51
  export declare const createGuardXContext: () => {
51
52
  Provider: React.FC<{
52
53
  value: Partial<IGuardContext>;
54
+ children: ReactNode;
53
55
  }>;
54
56
  Consumer: React.Consumer<IGuardContext>;
55
57
  };
56
58
  export declare const useGuardXContext: () => {
57
59
  Provider: React.FC<{
58
60
  value: Partial<IGuardContext>;
61
+ children: ReactNode;
59
62
  }>;
60
63
  Consumer: React.Consumer<IGuardContext>;
61
64
  };
@@ -64,7 +67,9 @@ export interface IGuardContextProvider {
64
67
  spinChange: (spin: boolean) => void;
65
68
  }
66
69
  export declare const useGuardButtonContext: () => {
67
- GuardButtonProvider: React.FC<{}>;
70
+ GuardButtonProvider: React.FC<{
71
+ children: ReactNode;
72
+ }>;
68
73
  };
69
74
  export declare const useGuardButtonState: () => IGuardContextProvider;
70
75
  export declare const useGuardPublicConfig: () => ApplicationConfig;
@@ -142,6 +147,7 @@ export declare const useGuardMultipleInstance: () => {
142
147
  */
143
148
  clearBackFillData?: (() => void) | undefined;
144
149
  };
150
+ export declare const useGuardPhoneRegex: () => RegExp | null;
145
151
  /**
146
152
  * 默认语言
147
153
  */
@@ -27,14 +27,14 @@ export declare const getClassnames: (classnames: (string | boolean | undefined)[
27
27
  * @param item
28
28
  * @returns {boolean}
29
29
  */
30
- export declare function isObject(item: any): any;
30
+ export declare function isObject(item: any): boolean;
31
31
  /**
32
32
  * https://www.itranslater.com/qa/details/2115518846294557696
33
33
  * Deep merge two objects.
34
34
  * @param target
35
35
  * @param ...sources
36
36
  */
37
- export declare function deepMerge<T extends any = any>(target: T, ...sources: any[]): T;
37
+ export declare function deepMerge<T extends object = any>(target: T, ...sources: any[]): T;
38
38
  /**
39
39
  * 在托管页下上传query中指定的用户自定义字段进行补全
40
40
  * @param params 指定上传的用户自定义字段
@@ -92,6 +92,7 @@ export declare const getLoginTypePipe: (publicConfig: ApplicationConfig, registe
92
92
  } | undefined;
93
93
  export declare const getPasswordIdentify: (identity: string) => string;
94
94
  export declare const getCurrentLng: () => Lang;
95
+ export declare const regexFromString: (string: string) => RegExp | null;
95
96
  export declare const getI18nLabel: (method: string | RegisterSortMethods, i18nFields: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
96
97
  export declare const getSortLabels: (methods: string[], i18nConfig: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
97
98
  export declare const getSortTabs: (tabs: string[], tab?: string | undefined) => string[];
@@ -1,2 +1,2 @@
1
- declare const _default: "4.2.1-alpha.2";
1
+ declare const _default: "4.2.2-alpha.0";
2
2
  export default _default;