@jiaozhiye/qm-design-react 1.10.6 → 1.10.8

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.
@@ -1,10 +1,9 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
- import ConfigContext from '../../config-provider/context';
1
+ import React from 'react';
4
2
  import type { IAuth } from '../../_utils/types';
5
3
  import type { ButtonProps as AntButtonProps } from '../../antd';
6
4
  type IProps = AntButtonProps & {
7
5
  click?: (ev: React.MouseEventHandler<HTMLElement>) => Promise<void> | void;
6
+ shortcutKey?: string;
8
7
  authConfig?: IAuth;
9
8
  confirm?: {
10
9
  title?: string | React.ReactNode;
@@ -12,23 +11,6 @@ type IProps = AntButtonProps & {
12
11
  onCancel?: (ev: any) => void;
13
12
  };
14
13
  };
15
- type IState = {
16
- isLoading: boolean;
17
- };
18
14
  export type ButtonProps = IProps;
19
- declare class QmButton extends Component<IProps, IState> {
20
- static propTypes: {
21
- click: PropTypes.Requireable<(...args: any[]) => any>;
22
- confirm: PropTypes.Requireable<PropTypes.InferProps<{
23
- title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
24
- onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
25
- onCancel: PropTypes.Requireable<(...args: any[]) => any>;
26
- }>>;
27
- };
28
- static contextType: React.Context<import("../../config-provider/context").IConfig>;
29
- context: React.ContextType<typeof ConfigContext>;
30
- state: IState;
31
- clickHandle: (ev: any) => Promise<void>;
32
- render(): React.JSX.Element | null;
33
- }
15
+ declare const QmButton: React.FC<IProps>;
34
16
  export default QmButton;
@@ -1,19 +1,11 @@
1
- import React, { Component } from 'react';
2
- import { CountUpProps } from 'react-countup/build/CountUp';
3
- import ConfigContext from '../../config-provider/context';
1
+ import React from 'react';
2
+ import type { CountUpProps } from 'react-countup/build/CountUp';
4
3
  import type { ComponentSize, CSSProperties } from '../../_utils/types';
5
- type IProps = CountUpProps & {
4
+ interface IProps extends CountUpProps {
6
5
  size?: ComponentSize;
7
6
  className?: string;
8
7
  style?: CSSProperties;
9
- };
10
- export type CountupProps = IProps;
11
- declare class QmCountup extends Component<IProps> {
12
- static defaultProps: {
13
- duration: number;
14
- };
15
- static contextType: React.Context<import("../../config-provider/context").IConfig>;
16
- context: React.ContextType<typeof ConfigContext>;
17
- render(): React.JSX.Element;
18
8
  }
19
- export default QmCountup;
9
+ export type CountupProps = IProps;
10
+ declare const Countup: React.FC<IProps>;
11
+ export default Countup;
@@ -1,6 +1,4 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
- import ConfigContext from '../../config-provider/context';
1
+ import React from 'react';
4
2
  import type { ComponentSize, CSSProperties, JSXElement } from '../../_utils/types';
5
3
  type IProps = {
6
4
  label: string;
@@ -15,20 +13,5 @@ type IProps = {
15
13
  onCollapseChange?: (collapse: boolean) => void;
16
14
  };
17
15
  export type DividerProps = IProps;
18
- declare class QmDivider extends Component<IProps> {
19
- static contextType: React.Context<import("../../config-provider/context").IConfig>;
20
- context: React.ContextType<typeof ConfigContext>;
21
- static propTypes: {
22
- label: PropTypes.Requireable<string>;
23
- size: (props: any, propName: any, componentName: any) => void;
24
- extra: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
25
- collapse: PropTypes.Requireable<boolean>;
26
- bordered: PropTypes.Requireable<boolean>;
27
- };
28
- static defaultProps: {
29
- bordered: boolean;
30
- };
31
- clickHandle: () => void;
32
- render(): React.JSX.Element;
33
- }
16
+ declare const QmDivider: React.FC<IProps>;
34
17
  export default QmDivider;
@@ -1,6 +1,4 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
- import ConfigContext from '../../config-provider/context';
1
+ import React from 'react';
4
2
  import type { AnyObject, AjaxResponse, ComponentSize } from '../../_utils/types';
5
3
  import type { ButtonProps } from '../../antd';
6
4
  export type HttpRequestHeader = {
@@ -21,35 +19,6 @@ type IProps = Omit<ButtonProps, 'prefixCls' | 'ghost' | 'danger' | 'block'> & {
21
19
  onSuccess?: () => void;
22
20
  onError?: (error: AnyObject<unknown>) => void;
23
21
  };
24
- type IState = {
25
- loading: boolean;
26
- };
27
22
  export type DownloadProps = IProps;
28
- declare class QmDownload extends Component<IProps, IState> {
29
- static propTypes: {
30
- action: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
31
- api: PropTypes.Validator<(...args: any[]) => any>;
32
- params: PropTypes.Requireable<object>;
33
- }> | null | undefined>>;
34
- size: (props: any, propName: any, componentName: any) => void;
35
- fileName: PropTypes.Requireable<string>;
36
- headers: PropTypes.Requireable<object>;
37
- withCredentials: PropTypes.Requireable<boolean>;
38
- params: PropTypes.Requireable<object>;
39
- beforeDownload: PropTypes.Requireable<(...args: any[]) => any>;
40
- onSuccess: PropTypes.Requireable<(...args: any[]) => any>;
41
- onError: PropTypes.Requireable<(...args: any[]) => any>;
42
- };
43
- static defaultProps: {
44
- icon: React.JSX.Element;
45
- children: string;
46
- withCredentials: boolean;
47
- };
48
- static contextType: React.Context<import("../../config-provider/context").IConfig>;
49
- context: React.ContextType<typeof ConfigContext>;
50
- state: IState;
51
- getActionUrl(): Promise<string>;
52
- downloadHandle: () => Promise<void>;
53
- render(): React.JSX.Element;
54
- }
55
- export default QmDownload;
23
+ declare const Download: React.FC<IProps>;
24
+ export default Download;
@@ -1,17 +1,9 @@
1
- import React, { Component } from 'react';
2
- import ConfigContext from '../../config-provider/context';
1
+ import React from 'react';
3
2
  import type { ComponentSize } from '../../_utils/types';
4
3
  import type { EmptyProps as AntEmptyProps } from '../../antd';
5
4
  type IProps = AntEmptyProps & {
6
5
  size?: ComponentSize;
7
6
  };
8
7
  export type EmptyProps = IProps;
9
- declare class QmEmpty extends Component<IProps> {
10
- static contextType: React.Context<import("../../config-provider/context").IConfig>;
11
- context: React.ContextType<typeof ConfigContext>;
12
- static propTypes: {
13
- size: (props: any, propName: any, componentName: any) => void;
14
- };
15
- render(): React.JSX.Element;
16
- }
8
+ declare const QmEmpty: React.FC<IProps>;
17
9
  export default QmEmpty;
@@ -185,6 +185,7 @@ export type IFormItem = {
185
185
  fileSize?: number;
186
186
  draggable?: boolean;
187
187
  editable?: boolean;
188
+ batchDownload?: boolean;
188
189
  fileDirection?: IFormLayout;
189
190
  showTip?: boolean;
190
191
  openCropper?: boolean;
@@ -3,7 +3,7 @@ type IProps = {
3
3
  size?: ComponentSize;
4
4
  [key: string]: any;
5
5
  };
6
- export default function useSize(props: IProps): {
6
+ export default function useSize<T extends IProps>(props: T): {
7
7
  $size: ComponentSize;
8
8
  };
9
9
  export {};