@jiaozhiye/qm-design-react 1.6.1 → 1.6.3
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/lib/_utils/resize-event.d.ts +2 -2
- package/lib/_utils/types.d.ts +15 -15
- package/lib/anchor/src/anchor-item.d.ts +3 -3
- package/lib/anchor/src/anchor-nav.d.ts +2 -2
- package/lib/anchor/src/anchor.d.ts +5 -5
- package/lib/antd/TimePicker.d.ts +1 -1
- package/lib/button/src/button.d.ts +4 -4
- package/lib/collapse/src/collapse.d.ts +2 -2
- package/lib/config-provider/context.d.ts +1 -1
- package/lib/config-provider/src/config-provider.d.ts +4 -4
- package/lib/copy-to-clipboard/src/copy-to-clipboard.d.ts +2 -2
- package/lib/countup/src/countup.d.ts +3 -3
- package/lib/cropper/src/cropper.d.ts +4 -4
- package/lib/divider/src/divider.d.ts +4 -4
- package/lib/download/src/download.d.ts +9 -9
- package/lib/drawer/src/drawer.d.ts +6 -6
- package/lib/empty/src/empty.d.ts +3 -3
- package/lib/form/src/context.d.ts +1 -1
- package/lib/form/src/fields-filter.d.ts +4 -4
- package/lib/form/src/form-cascader.d.ts +3 -3
- package/lib/form/src/form-checkbox-group.d.ts +3 -3
- package/lib/form/src/form-checkbox.d.ts +2 -2
- package/lib/form/src/form-city-select.d.ts +2 -2
- package/lib/form/src/form-date.d.ts +2 -2
- package/lib/form/src/form-divider.d.ts +2 -2
- package/lib/form/src/form-immediate.d.ts +3 -3
- package/lib/form/src/form-input-number.d.ts +2 -2
- package/lib/form/src/form-input.d.ts +2 -2
- package/lib/form/src/form-item-view.d.ts +1 -1
- package/lib/form/src/form-multiple-search-helper.d.ts +3 -3
- package/lib/form/src/form-multiple-tree-table-helper.d.ts +3 -3
- package/lib/form/src/form-radio.d.ts +3 -3
- package/lib/form/src/form-range-date.d.ts +2 -2
- package/lib/form/src/form-range-input-number.d.ts +2 -2
- package/lib/form/src/form-range-input.d.ts +2 -2
- package/lib/form/src/form-range-search-helper.d.ts +3 -3
- package/lib/form/src/form-range-time.d.ts +2 -2
- package/lib/form/src/form-rate.d.ts +2 -2
- package/lib/form/src/form-region-select.d.ts +2 -2
- package/lib/form/src/form-search-helper.d.ts +3 -3
- package/lib/form/src/form-select.d.ts +3 -3
- package/lib/form/src/form-switch.d.ts +2 -2
- package/lib/form/src/form-text-area.d.ts +2 -2
- package/lib/form/src/form-time.d.ts +2 -2
- package/lib/form/src/form-tinymce.d.ts +2 -2
- package/lib/form/src/form-tree-select.d.ts +3 -3
- package/lib/form/src/form-tree-table-helper.d.ts +3 -3
- package/lib/form/src/form-upload-file.d.ts +2 -2
- package/lib/form/src/form-upload-img.d.ts +2 -2
- package/lib/form/src/form.d.ts +14 -13
- package/lib/form/src/types.d.ts +28 -25
- package/lib/form/style/index.less +1 -1
- package/lib/hooks/useDebounce.d.ts +1 -1
- package/lib/index.esm.js +2 -2
- package/lib/index.full.js +1 -1
- package/lib/index.js +2 -2
- package/lib/locale/index.d.ts +2 -2
- package/lib/locale/index.js +5 -5
- package/lib/modal/src/modal.d.ts +6 -6
- package/lib/print/src/container.d.ts +2 -2
- package/lib/print/src/context.d.ts +1 -1
- package/lib/print/src/preview.d.ts +3 -3
- package/lib/print/src/print.d.ts +6 -6
- package/lib/print/src/setting.d.ts +3 -3
- package/lib/range-table-helper/src/range-table-helper.d.ts +3 -3
- package/lib/search-helper/src/search-helper.d.ts +3 -3
- package/lib/search-tree/src/search-tree.d.ts +3 -3
- package/lib/space/src/space.d.ts +3 -3
- package/lib/spin/src/spin.d.ts +4 -4
- package/lib/split/src/context.d.ts +1 -1
- package/lib/split/src/resize-bar.d.ts +1 -1
- package/lib/split/src/split-pane.d.ts +2 -2
- package/lib/split/src/split.d.ts +2 -2
- package/lib/style/index.css +2 -2
- package/lib/style/index.min.css +1 -1
- package/lib/table/src/alert/index.d.ts +1 -1
- package/lib/table/src/body/index.d.ts +1 -1
- package/lib/table/src/body/useMergeCell.d.ts +2 -1
- package/lib/table/src/clipboard/index.d.ts +1 -1
- package/lib/table/src/clipboard/setting.d.ts +1 -1
- package/lib/table/src/column-filter/index.d.ts +1 -1
- package/lib/table/src/context/index.d.ts +1 -1
- package/lib/table/src/edit/InputNumber.d.ts +1 -1
- package/lib/table/src/edit/index.d.ts +1 -1
- package/lib/table/src/expandable/all.d.ts +1 -1
- package/lib/table/src/expandable/index.d.ts +1 -1
- package/lib/table/src/export/define.d.ts +1 -1
- package/lib/table/src/export/index.d.ts +2 -2
- package/lib/table/src/export/setting.d.ts +1 -1
- package/lib/table/src/export/useExport.d.ts +2 -2
- package/lib/table/src/fast-search/index.d.ts +1 -1
- package/lib/table/src/fast-search/setting.d.ts +1 -1
- package/lib/table/src/filter/index.d.ts +1 -1
- package/lib/table/src/footer/index.d.ts +1 -1
- package/lib/table/src/full-screen/index.d.ts +1 -1
- package/lib/table/src/group-summary/index.d.ts +1 -1
- package/lib/table/src/group-summary/result.d.ts +1 -1
- package/lib/table/src/group-summary/setting.d.ts +1 -1
- package/lib/table/src/header/index.d.ts +1 -1
- package/lib/table/src/hooks/useImperativeMethod.d.ts +1 -1
- package/lib/table/src/hooks/useTableCore.d.ts +1 -1
- package/lib/table/src/hooks/useTableEffect.d.ts +1 -1
- package/lib/table/src/hooks/useTableLayout.d.ts +1 -1
- package/lib/table/src/hooks/useTableMemo.d.ts +1 -1
- package/lib/table/src/hooks/useTableRef.d.ts +2 -2
- package/lib/table/src/hooks/useTableState.d.ts +1 -1
- package/lib/table/src/import/SelectFile.d.ts +1 -1
- package/lib/table/src/import/index.d.ts +1 -1
- package/lib/table/src/import/setting.d.ts +1 -1
- package/lib/table/src/manager/index.d.ts +1 -1
- package/lib/table/src/pager/index.d.ts +1 -1
- package/lib/table/src/print/index.d.ts +1 -1
- package/lib/table/src/reload/index.d.ts +1 -1
- package/lib/table/src/resizable/index.d.ts +1 -1
- package/lib/table/src/select-collection/index.d.ts +1 -1
- package/lib/table/src/select-collection/result.d.ts +1 -1
- package/lib/table/src/selection/all.d.ts +1 -1
- package/lib/table/src/selection/index.d.ts +1 -1
- package/lib/table/src/store/index.d.ts +2 -2
- package/lib/table/src/super-search/index.d.ts +1 -1
- package/lib/table/src/super-search/result.d.ts +1 -1
- package/lib/table/src/table/index.d.ts +1 -1
- package/lib/table/src/table/props.d.ts +5 -5
- package/lib/table/src/table/types.d.ts +45 -45
- package/lib/table/src/toolbox/index.d.ts +1 -1
- package/lib/tabs/src/tab-pane.d.ts +4 -4
- package/lib/tabs/src/tabs.d.ts +3 -3
- package/lib/tinymce/src/Events.d.ts +2 -2
- package/lib/tinymce/src/ScriptLoader.d.ts +1 -1
- package/lib/tinymce/src/Utils.d.ts +1 -1
- package/lib/tinymce/src/components/Editor.d.ts +1 -1
- package/lib/tinymce/src/components/EditorPropTypes.d.ts +2 -2
- package/lib/tinymce/src/index.d.ts +3 -3
- package/lib/tree-helper/src/tree-helper.d.ts +2 -2
- package/lib/tree-table-helper/src/tree-table-helper.d.ts +3 -3
- package/lib/upload-file/src/upload-file.d.ts +5 -5
- package/lib/upload-img/src/cropper-preview.d.ts +4 -4
- package/lib/upload-img/src/upload-img.d.ts +5 -5
- package/package.json +19 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
2
2
|
import type { CustomHTMLElement } from './types';
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
type IResizeListener = (option: ResizeObserverEntry) => void;
|
|
4
|
+
export type ResizableElement = CustomHTMLElement<{
|
|
5
5
|
__resizeListeners__?: Array<IResizeListener>;
|
|
6
6
|
__ro__?: ResizeObserver;
|
|
7
7
|
}>;
|
package/lib/_utils/types.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type Nullable<T> = T | null;
|
|
3
|
+
export type ValueOf<T> = T[keyof T];
|
|
4
|
+
export type DeepPartial<T> = {
|
|
5
5
|
[P in keyof T]?: T[P] extends Record<string, unknown> ? DeepPartial<T[P]> : T[P];
|
|
6
6
|
};
|
|
7
|
-
export
|
|
8
|
-
export
|
|
7
|
+
export type JSXElement = React.ReactNode | JSX.Element;
|
|
8
|
+
export type AnyObject<T> = {
|
|
9
9
|
[key: string]: T;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
11
|
+
export type AnyFunction<T> = (...args: any[]) => T;
|
|
12
|
+
export type CustomHTMLElement<T> = HTMLElement & T;
|
|
13
|
+
export type CSSProperties = React.CSSProperties;
|
|
14
|
+
export type TimeoutHandle = ReturnType<typeof setTimeout>;
|
|
15
|
+
export type IntervalHandle = ReturnType<typeof setInterval>;
|
|
16
|
+
export type AjaxResponse<T = any> = {
|
|
17
17
|
code: number;
|
|
18
18
|
data: T;
|
|
19
19
|
message: string;
|
|
@@ -23,15 +23,15 @@ export declare enum SizeHeight {
|
|
|
23
23
|
middle = 32,
|
|
24
24
|
small = 24
|
|
25
25
|
}
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
26
|
+
export type ComponentSize = 'small' | 'middle' | 'large';
|
|
27
|
+
export type Locale = 'zh-cn' | 'en';
|
|
28
|
+
export type IDict = {
|
|
29
29
|
text: string;
|
|
30
30
|
value: string | number;
|
|
31
31
|
disabled?: boolean;
|
|
32
32
|
children?: Array<IDict> | Nullable<undefined>;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type IAuth = {
|
|
35
35
|
dataIndex?: string;
|
|
36
36
|
visible?: number;
|
|
37
37
|
disabled?: number;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { CSSProperties } from '../../_utils/types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
label: string;
|
|
5
5
|
showDivider?: boolean;
|
|
6
6
|
style?: CSSProperties;
|
|
7
7
|
className?: string;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type QmAnchorItemProps = IProps;
|
|
11
11
|
declare class QmAnchorItem extends Component<IProps> {
|
|
12
12
|
static displayName: string;
|
|
13
|
-
render(): JSX.Element;
|
|
13
|
+
render(): React.JSX.Element;
|
|
14
14
|
}
|
|
15
15
|
export default QmAnchorItem;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { AnyFunction } from '../../_utils/types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
activeKey: number;
|
|
5
5
|
labels: string[];
|
|
6
6
|
onTabClick: AnyFunction<void>;
|
|
7
7
|
};
|
|
8
8
|
declare class AnchorNav extends Component<IProps> {
|
|
9
9
|
renderLabel(): React.ReactNode[];
|
|
10
|
-
render(): JSX.Element;
|
|
10
|
+
render(): React.JSX.Element;
|
|
11
11
|
}
|
|
12
12
|
export default AnchorNav;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import type { ComponentSize, CSSProperties } from '../../_utils/types';
|
|
4
|
-
|
|
4
|
+
type ILabelItem = {
|
|
5
5
|
id: string;
|
|
6
6
|
label: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type IProps = {
|
|
9
9
|
size?: ComponentSize;
|
|
10
10
|
labelWidth?: number | string;
|
|
11
11
|
labelList?: Array<ILabelItem>;
|
|
@@ -15,10 +15,10 @@ declare type IProps = {
|
|
|
15
15
|
style?: CSSProperties;
|
|
16
16
|
children?: React.ReactNode;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
type IState = {
|
|
19
19
|
activeKey: number;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type QmAnchorProps = IProps;
|
|
22
22
|
declare class QmAnchor extends Component<IProps, IState> {
|
|
23
23
|
static Item: React.ClassicComponentClass<{
|
|
24
24
|
label: string;
|
|
@@ -53,6 +53,6 @@ declare class QmAnchor extends Component<IProps, IState> {
|
|
|
53
53
|
onScrollHandle: (ev: MouseEvent) => void;
|
|
54
54
|
onTabClickHandle: (index: number) => void;
|
|
55
55
|
SCROLL_TO_ITEM: (index: number) => void;
|
|
56
|
-
render(): JSX.Element;
|
|
56
|
+
render(): React.JSX.Element;
|
|
57
57
|
}
|
|
58
58
|
export default QmAnchor;
|
package/lib/antd/TimePicker.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface TimeRangePickerProps extends Omit<RangePickerTimeProps<Dayjs>,
|
|
|
7
7
|
}
|
|
8
8
|
declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<any>>;
|
|
9
9
|
declare const RangePicker: React.ForwardRefExoticComponent<TimeRangePickerProps & React.RefAttributes<any>>;
|
|
10
|
-
|
|
10
|
+
type MergedTimePicker = typeof TimePicker & {
|
|
11
11
|
RangePicker: typeof RangePicker;
|
|
12
12
|
};
|
|
13
13
|
declare const _default: MergedTimePicker;
|
|
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import type { IAuth } from '../../_utils/types';
|
|
4
4
|
import type { ButtonProps } from '../../antd';
|
|
5
|
-
|
|
5
|
+
type IProps = ButtonProps & {
|
|
6
6
|
click?: (ev: React.MouseEventHandler<HTMLElement>) => Promise<void> | void;
|
|
7
7
|
authConfig?: IAuth;
|
|
8
8
|
confirm?: {
|
|
@@ -11,10 +11,10 @@ declare type IProps = ButtonProps & {
|
|
|
11
11
|
onCancel?: (ev: any) => void;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
type IState = {
|
|
15
15
|
isLoading: boolean;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type QmButtonProps = IProps;
|
|
18
18
|
declare class QmButton extends Component<IProps, IState> {
|
|
19
19
|
static propTypes: {
|
|
20
20
|
click: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -27,6 +27,6 @@ declare class QmButton extends Component<IProps, IState> {
|
|
|
27
27
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
28
28
|
state: IState;
|
|
29
29
|
clickHandle: (ev: any) => Promise<void>;
|
|
30
|
-
render(): JSX.Element | null;
|
|
30
|
+
render(): React.JSX.Element | null;
|
|
31
31
|
}
|
|
32
32
|
export default QmButton;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { JSXElement } from '../../_utils/types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
defaultActive?: boolean;
|
|
5
5
|
label: string;
|
|
6
6
|
extra?: JSXElement | string;
|
|
@@ -13,6 +13,6 @@ declare type IProps = {
|
|
|
13
13
|
containerStyle?: React.CSSProperties;
|
|
14
14
|
children?: React.ReactNode;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type QmCollapseProps = IProps;
|
|
17
17
|
declare const Collapse: React.FC<IProps>;
|
|
18
18
|
export default Collapse;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import type { IConfig } from '../context';
|
|
4
|
-
|
|
4
|
+
type IProps = {
|
|
5
5
|
locale: IConfig['locale'];
|
|
6
6
|
size: IConfig['size'];
|
|
7
7
|
theme?: string;
|
|
8
8
|
global?: IConfig['global'];
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type IState = {
|
|
12
12
|
value: IConfig;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type QmConfigProviderProps = IProps;
|
|
15
15
|
declare class QmConfigProvider extends Component<IProps, IState> {
|
|
16
16
|
static propTypes: {
|
|
17
17
|
locale: PropTypes.Requireable<string>;
|
|
@@ -31,6 +31,6 @@ declare class QmConfigProvider extends Component<IProps, IState> {
|
|
|
31
31
|
size: import("../../_utils/types").ComponentSize;
|
|
32
32
|
};
|
|
33
33
|
} | null;
|
|
34
|
-
render(): JSX.Element;
|
|
34
|
+
render(): React.JSX.Element;
|
|
35
35
|
}
|
|
36
36
|
export default QmConfigProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type IProps = {
|
|
3
3
|
text: string;
|
|
4
4
|
showMessage?: boolean;
|
|
5
5
|
options?: {
|
|
@@ -10,6 +10,6 @@ declare type IProps = {
|
|
|
10
10
|
onCopy?: (text: string, result: boolean) => void;
|
|
11
11
|
children?: React.ReactNode;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type QmCopyToClipboardProps = IProps;
|
|
14
14
|
declare const CopyToClipboard: React.FC<IProps>;
|
|
15
15
|
export default CopyToClipboard;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { CountUpProps } from 'react-countup/build/CountUp';
|
|
3
3
|
import type { ComponentSize, CSSProperties } from '../../_utils/types';
|
|
4
|
-
|
|
4
|
+
type IProps = CountUpProps & {
|
|
5
5
|
size?: ComponentSize;
|
|
6
6
|
className?: string;
|
|
7
7
|
style?: CSSProperties;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type QmCountupProps = IProps;
|
|
10
10
|
declare class QmCountup extends Component<IProps> {
|
|
11
11
|
static defaultProps: {
|
|
12
12
|
duration: number;
|
|
13
13
|
};
|
|
14
14
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
15
|
-
render(): JSX.Element;
|
|
15
|
+
render(): React.JSX.Element;
|
|
16
16
|
}
|
|
17
17
|
export default QmCountup;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
2
|
import type { CSSProperties, AnyObject, AnyFunction } from '../../_utils/types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
src: string;
|
|
5
5
|
alt?: string;
|
|
6
6
|
imgStyle?: CSSProperties;
|
|
@@ -46,7 +46,7 @@ declare type IProps = {
|
|
|
46
46
|
crop?: AnyFunction<void>;
|
|
47
47
|
zoom?: AnyFunction<void>;
|
|
48
48
|
};
|
|
49
|
-
export
|
|
49
|
+
export type QmCropperProps = IProps;
|
|
50
50
|
declare class QmCropper extends Component<IProps> {
|
|
51
51
|
static defaultProps: {
|
|
52
52
|
src: string;
|
|
@@ -208,6 +208,6 @@ declare class QmCropper extends Component<IProps> {
|
|
|
208
208
|
* @returns {Object} this
|
|
209
209
|
*/
|
|
210
210
|
setDragMode(mode: any): any;
|
|
211
|
-
render(): JSX.Element;
|
|
211
|
+
render(): React.JSX.Element;
|
|
212
212
|
}
|
|
213
213
|
export default QmCropper;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import type { ComponentSize, CSSProperties, JSXElement } from '../../_utils/types';
|
|
4
|
-
|
|
4
|
+
type IProps = {
|
|
5
5
|
label: string;
|
|
6
6
|
size?: ComponentSize;
|
|
7
7
|
extra?: JSXElement | string;
|
|
@@ -12,16 +12,16 @@ declare type IProps = {
|
|
|
12
12
|
style?: CSSProperties;
|
|
13
13
|
onCollapseChange?: (collapse: boolean) => void;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type QmDividerProps = IProps;
|
|
16
16
|
declare class QmDivider extends Component<IProps> {
|
|
17
17
|
static propTypes: {
|
|
18
18
|
label: PropTypes.Requireable<string>;
|
|
19
19
|
size: (props: any, propName: any, componentName: any) => void;
|
|
20
|
-
extra: PropTypes.Requireable<string | PropTypes.ReactElementLike
|
|
20
|
+
extra: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
|
|
21
21
|
collapse: PropTypes.Requireable<boolean>;
|
|
22
22
|
};
|
|
23
23
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
24
24
|
clickHandle: () => void;
|
|
25
|
-
render(): JSX.Element;
|
|
25
|
+
render(): React.JSX.Element;
|
|
26
26
|
}
|
|
27
27
|
export default QmDivider;
|
|
@@ -2,14 +2,14 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import type { AnyObject, AjaxResponse, ComponentSize } from '../../_utils/types';
|
|
4
4
|
import type { ButtonProps } from '../../antd';
|
|
5
|
-
|
|
5
|
+
type HttpRequestHeader = {
|
|
6
6
|
[key: string]: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type ActionConfig = {
|
|
9
9
|
api: (params?: Record<string, unknown>) => Promise<AjaxResponse>;
|
|
10
10
|
params?: AnyObject<unknown>;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type IProps = Omit<ButtonProps, 'prefixCls' | 'ghost' | 'danger' | 'block'> & {
|
|
13
13
|
action: string | ActionConfig;
|
|
14
14
|
fileName?: string;
|
|
15
15
|
size?: ComponentSize;
|
|
@@ -20,16 +20,16 @@ declare type IProps = Omit<ButtonProps, 'prefixCls' | 'ghost' | 'danger' | 'bloc
|
|
|
20
20
|
onSuccess?: () => void;
|
|
21
21
|
onError?: (error: AnyObject<unknown>) => void;
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
type IState = {
|
|
24
24
|
loading: boolean;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type QmDownloadProps = IProps;
|
|
27
27
|
declare class QmDownload extends Component<IProps, IState> {
|
|
28
28
|
static propTypes: {
|
|
29
|
-
action: PropTypes.Requireable<string | PropTypes.InferProps<{
|
|
29
|
+
action: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
|
|
30
30
|
api: PropTypes.Validator<(...args: any[]) => any>;
|
|
31
31
|
params: PropTypes.Requireable<object>;
|
|
32
|
-
}>>;
|
|
32
|
+
}> | null | undefined>>;
|
|
33
33
|
size: (props: any, propName: any, componentName: any) => void;
|
|
34
34
|
fileName: PropTypes.Requireable<string>;
|
|
35
35
|
headers: PropTypes.Requireable<object>;
|
|
@@ -40,7 +40,7 @@ declare class QmDownload extends Component<IProps, IState> {
|
|
|
40
40
|
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
41
41
|
};
|
|
42
42
|
static defaultProps: {
|
|
43
|
-
icon: JSX.Element;
|
|
43
|
+
icon: React.JSX.Element;
|
|
44
44
|
children: string;
|
|
45
45
|
withCredentials: boolean;
|
|
46
46
|
};
|
|
@@ -49,6 +49,6 @@ declare class QmDownload extends Component<IProps, IState> {
|
|
|
49
49
|
getActionUrl(): Promise<string>;
|
|
50
50
|
downloadFile(url: string): Promise<void>;
|
|
51
51
|
downloadHandle: () => Promise<void>;
|
|
52
|
-
render(): JSX.Element;
|
|
52
|
+
render(): React.JSX.Element;
|
|
53
53
|
}
|
|
54
54
|
export default QmDownload;
|
|
@@ -2,8 +2,8 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import type { ComponentSize, Nullable } from '../../_utils/types';
|
|
4
4
|
import type { DrawerProps } from '../../antd';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type EventType = React.MouseEvent<HTMLElement>;
|
|
6
|
+
type IProps = Omit<DrawerProps, 'size'> & {
|
|
7
7
|
size?: ComponentSize;
|
|
8
8
|
loading?: boolean;
|
|
9
9
|
showFullScreen?: boolean;
|
|
@@ -11,12 +11,12 @@ declare type IProps = Omit<DrawerProps, 'size'> & {
|
|
|
11
11
|
onClosed?: () => void;
|
|
12
12
|
onFullChange?: (value: boolean) => void;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
type IState = {
|
|
15
15
|
fullscreen: boolean;
|
|
16
16
|
spinning: boolean;
|
|
17
17
|
sloading: boolean;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type QmDrawerProps = IProps;
|
|
20
20
|
declare class QmDrawer extends Component<IProps, IState> {
|
|
21
21
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
22
22
|
static propTypes: {
|
|
@@ -37,9 +37,9 @@ declare class QmDrawer extends Component<IProps, IState> {
|
|
|
37
37
|
componentDidUpdate(prevProps: IProps, prevState: IState): void;
|
|
38
38
|
afterVisibleChange: (visible: boolean) => void;
|
|
39
39
|
toggleHandle: () => void;
|
|
40
|
-
renderTitle(): JSX.Element;
|
|
40
|
+
renderTitle(): React.JSX.Element;
|
|
41
41
|
START_LOADING: () => void;
|
|
42
42
|
STOP_LOADING: () => void;
|
|
43
|
-
render(): JSX.Element;
|
|
43
|
+
render(): React.JSX.Element;
|
|
44
44
|
}
|
|
45
45
|
export default QmDrawer;
|
package/lib/empty/src/empty.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { ComponentSize } from '../../_utils/types';
|
|
3
3
|
import type { EmptyProps } from '../../antd';
|
|
4
|
-
|
|
4
|
+
type IProps = EmptyProps & {
|
|
5
5
|
size?: ComponentSize;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type QmEmptyProps = IProps;
|
|
8
8
|
declare class QmEmpty extends Component<IProps> {
|
|
9
9
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
10
10
|
static propTypes: {
|
|
11
11
|
size: (props: any, propName: any, componentName: any) => void;
|
|
12
12
|
};
|
|
13
|
-
render(): JSX.Element;
|
|
13
|
+
render(): React.JSX.Element;
|
|
14
14
|
}
|
|
15
15
|
export default QmEmpty;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
uniqueKey?: string;
|
|
5
5
|
items: IFormItem[];
|
|
6
6
|
fieldsChange?: (items: IFormItem[]) => void;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type IState = {
|
|
9
9
|
visible: boolean;
|
|
10
10
|
};
|
|
11
11
|
declare class FieldsFilter extends Component<IProps, IState> {
|
|
@@ -20,7 +20,7 @@ declare class FieldsFilter extends Component<IProps, IState> {
|
|
|
20
20
|
setLocalFields(list: IFormItem[]): void;
|
|
21
21
|
initLocalfields(): void;
|
|
22
22
|
changeHandle(items: IFormItem[]): void;
|
|
23
|
-
popup(): JSX.Element;
|
|
24
|
-
render(): JSX.Element;
|
|
23
|
+
popup(): React.JSX.Element;
|
|
24
|
+
render(): React.JSX.Element;
|
|
25
25
|
}
|
|
26
26
|
export default FieldsFilter;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
3
|
import type { IDict } from '../../_utils/types';
|
|
4
|
-
|
|
4
|
+
type IProps = {
|
|
5
5
|
option: IFormItem;
|
|
6
6
|
multiple?: boolean;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type IState = {
|
|
9
9
|
itemList: IDict[];
|
|
10
10
|
loading: boolean;
|
|
11
11
|
};
|
|
@@ -16,6 +16,6 @@ declare class FormCascader extends Component<IProps, IState> {
|
|
|
16
16
|
componentWillUnmount(): void;
|
|
17
17
|
componentDidUpdate(prevProps: IProps): void;
|
|
18
18
|
getItemList: () => Promise<void>;
|
|
19
|
-
render(): JSX.Element;
|
|
19
|
+
render(): React.JSX.Element;
|
|
20
20
|
}
|
|
21
21
|
export default FormCascader;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
3
|
import type { IDict } from '../../_utils/types';
|
|
4
|
-
|
|
4
|
+
type IProps = {
|
|
5
5
|
option: IFormItem;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type IState = {
|
|
8
8
|
itemList: IDict[];
|
|
9
9
|
};
|
|
10
10
|
declare class FormCheckboxGroup extends Component<IProps, IState> {
|
|
@@ -14,6 +14,6 @@ declare class FormCheckboxGroup extends Component<IProps, IState> {
|
|
|
14
14
|
componentWillUnmount(): void;
|
|
15
15
|
componentDidUpdate(prevProps: IProps): void;
|
|
16
16
|
getItemList(): Promise<void>;
|
|
17
|
-
render(): JSX.Element;
|
|
17
|
+
render(): React.JSX.Element;
|
|
18
18
|
}
|
|
19
19
|
export default FormCheckboxGroup;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormCheckbox extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormCheckbox;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormCitySelect extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormCitySelect;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormDate extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormDate;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormDivider extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormDivider;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type IState = {
|
|
7
7
|
searchHelper: IFormItem['searchHelper'];
|
|
8
8
|
};
|
|
9
9
|
declare class FormImmediate extends Component<IProps, IState> {
|
|
@@ -15,6 +15,6 @@ declare class FormImmediate extends Component<IProps, IState> {
|
|
|
15
15
|
});
|
|
16
16
|
waiting: () => Promise<void>;
|
|
17
17
|
getHelperConfig: ($configContext: any) => void;
|
|
18
|
-
render(): JSX.Element;
|
|
18
|
+
render(): React.JSX.Element;
|
|
19
19
|
}
|
|
20
20
|
export default FormImmediate;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormInputNumber extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
8
|
focus: () => void;
|
|
9
|
-
render(): JSX.Element;
|
|
9
|
+
render(): React.JSX.Element;
|
|
10
10
|
}
|
|
11
11
|
export default FormInputNumber;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormInput extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
8
|
focus: () => void;
|
|
9
|
-
render(): JSX.Element;
|
|
9
|
+
render(): React.JSX.Element;
|
|
10
10
|
}
|
|
11
11
|
export default FormInput;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type IState = {
|
|
7
7
|
searchHelper: IFormItem['searchHelper'];
|
|
8
8
|
};
|
|
9
9
|
declare class FormMultipleSearchHelper extends Component<IProps, IState> {
|
|
@@ -15,6 +15,6 @@ declare class FormMultipleSearchHelper extends Component<IProps, IState> {
|
|
|
15
15
|
});
|
|
16
16
|
waiting: () => Promise<void>;
|
|
17
17
|
getHelperConfig: ($configContext: any) => void;
|
|
18
|
-
render(): JSX.Element;
|
|
18
|
+
render(): React.JSX.Element;
|
|
19
19
|
}
|
|
20
20
|
export default FormMultipleSearchHelper;
|