@jiaozhiye/qm-design-react 1.10.7 → 1.10.9
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/anchor/src/anchor-item.d.ts +3 -6
- package/lib/anchor/src/anchor-nav.d.ts +2 -5
- package/lib/anchor/src/anchor.d.ts +8 -44
- package/lib/button/src/button.d.ts +3 -21
- package/lib/countup/src/countup.d.ts +6 -14
- package/lib/divider/src/divider.d.ts +2 -19
- package/lib/download/src/download.d.ts +3 -34
- package/lib/drawer/index.d.ts +1 -1
- package/lib/drawer/src/drawer.d.ts +16 -37
- package/lib/empty/src/empty.d.ts +2 -10
- package/lib/form/src/types.d.ts +1 -0
- package/lib/hooks/useSize.d.ts +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.esm.js +1 -1
- package/lib/index.full.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/lang/en.d.ts +2 -0
- package/lib/locale/lang/en.js +4 -2
- package/lib/locale/lang/zh-cn.d.ts +2 -0
- package/lib/locale/lang/zh-cn.js +4 -2
- package/lib/modal/index.d.ts +1 -1
- package/lib/modal/src/modal.d.ts +17 -52
- package/lib/search-tree/src/search-tree.d.ts +2 -0
- package/lib/space/src/space.d.ts +2 -7
- package/lib/spin/src/spin.d.ts +2 -8
- package/lib/spin/style/index.less +5 -3
- package/lib/split/src/split-pane.d.ts +2 -2
- package/lib/split/src/split.d.ts +1 -1
- package/lib/style/index.css +16 -7
- package/lib/style/index.min.css +1 -1
- package/lib/table/src/edit/index.d.ts +2 -0
- package/lib/table/src/manager/index.d.ts +1 -1
- package/lib/table/src/table/index.d.ts +2 -2
- package/lib/tabs/src/tab-pane.d.ts +3 -6
- package/lib/tabs/src/tabs.d.ts +5 -11
- package/lib/tinymce/src/index.d.ts +3 -17
- package/lib/upload-file/src/upload-file.d.ts +4 -33
- package/lib/upload-file/style/index.less +5 -0
- package/lib/upload-img/src/cropper-preview.d.ts +2 -26
- package/lib/upload-img/src/upload-img.d.ts +3 -34
- package/lib/upload-img/style/index.less +31 -23
- package/package.json +1 -1
|
@@ -9,6 +9,8 @@ type ICellEditProps = {
|
|
|
9
9
|
};
|
|
10
10
|
type CellEditRef = {
|
|
11
11
|
focus: () => void;
|
|
12
|
+
isEditable: () => boolean;
|
|
13
|
+
isOpening: () => boolean;
|
|
12
14
|
};
|
|
13
15
|
declare const CellEdit: React.ForwardRefExoticComponent<ICellEditProps & React.RefAttributes<CellEditRef>>;
|
|
14
16
|
export default CellEdit;
|
|
@@ -6,8 +6,8 @@ type Instance = {
|
|
|
6
6
|
vm: React.ForwardedRef<TableRef>;
|
|
7
7
|
};
|
|
8
8
|
declare const TableManager: {
|
|
9
|
+
_getInstance: (id: string) => Nullable<Instance>;
|
|
9
10
|
getFocusInstance: () => Nullable<Instance>;
|
|
10
|
-
getInstance: (id: string) => Nullable<Instance>;
|
|
11
11
|
focus: (id: string) => void;
|
|
12
12
|
register: (id: string, instance: React.ForwardedRef<TableRef>) => void;
|
|
13
13
|
deregister: (id: string) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ITableProps, TableRef } from './types';
|
|
3
3
|
export type TableProps = ITableProps;
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
4
|
+
declare const QmTable: React.ForwardRefExoticComponent<ITableProps & React.RefAttributes<TableRef>>;
|
|
5
|
+
export default QmTable;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { TabPaneProps as AntTabPaneProps } from '../../antd';
|
|
3
3
|
type IProps = AntTabPaneProps;
|
|
4
4
|
export type TabPaneProps = IProps;
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
render(): React.JSX.Element;
|
|
8
|
-
}
|
|
9
|
-
export default QmTabPane;
|
|
5
|
+
declare const TabPane: React.FC<IProps>;
|
|
6
|
+
export default TabPane;
|
package/lib/tabs/src/tabs.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import ConfigContext from '../../config-provider/context';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import type { IAuth } from '../../_utils/types';
|
|
4
3
|
import type { TabsProps as AntTabsProps } from '../../antd';
|
|
4
|
+
import type { TabPaneProps } from './tab-pane';
|
|
5
5
|
type IProps = AntTabsProps & {
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
authConfig?: {
|
|
@@ -9,13 +9,7 @@ type IProps = AntTabsProps & {
|
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
export type TabsProps = IProps;
|
|
12
|
-
declare
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
context: React.ContextType<typeof ConfigContext>;
|
|
16
|
-
static defaultProps: {
|
|
17
|
-
tabPosition: string;
|
|
18
|
-
};
|
|
19
|
-
render(): React.JSX.Element;
|
|
20
|
-
}
|
|
12
|
+
declare const QmTabs: React.FC<IProps> & {
|
|
13
|
+
TabPane: React.FC<TabPaneProps>;
|
|
14
|
+
};
|
|
21
15
|
export default QmTabs;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import ConfigContext from '../../config-provider/context';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import type { ComponentSize, CSSProperties } from '../../_utils/types';
|
|
4
3
|
import type { IFetchHeader } from '../../form/src/types';
|
|
5
4
|
type IProps = {
|
|
@@ -24,18 +23,5 @@ type IProps = {
|
|
|
24
23
|
}, ev: any) => void;
|
|
25
24
|
};
|
|
26
25
|
export type TinymceProps = IProps;
|
|
27
|
-
declare
|
|
28
|
-
|
|
29
|
-
context: React.ContextType<typeof ConfigContext>;
|
|
30
|
-
static propTypes: {
|
|
31
|
-
size: (props: any, propName: any, componentName: any) => void;
|
|
32
|
-
};
|
|
33
|
-
defaultOption: {
|
|
34
|
-
height: number;
|
|
35
|
-
plugins: string;
|
|
36
|
-
menubar: string;
|
|
37
|
-
toolbar: string;
|
|
38
|
-
};
|
|
39
|
-
render(): React.JSX.Element;
|
|
40
|
-
}
|
|
41
|
-
export default QmTinymce;
|
|
26
|
+
declare const Tinymce: React.FC<IProps>;
|
|
27
|
+
export default Tinymce;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import ConfigContext from '../../config-provider/context';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import type { AjaxResponse } from '../../_utils/types';
|
|
4
3
|
import type { HttpRequestHeader } from '../../download/src/download';
|
|
5
4
|
import type { UploadProps, ButtonProps } from '../../antd';
|
|
@@ -18,6 +17,7 @@ type IProps = Omit<UploadProps, 'onPreview'> & {
|
|
|
18
17
|
readOnly?: boolean;
|
|
19
18
|
draggable?: boolean;
|
|
20
19
|
editable?: boolean;
|
|
20
|
+
batchDownload?: (fileList: UploadFile[]) => Promise<void> | boolean;
|
|
21
21
|
fileDirection?: 'horizontal' | 'vertical';
|
|
22
22
|
downloadWithHeaders?: boolean | HttpRequestHeader;
|
|
23
23
|
button?: {
|
|
@@ -28,35 +28,6 @@ type IProps = Omit<UploadProps, 'onPreview'> & {
|
|
|
28
28
|
onEditChange?: (file: UploadFile, fileList: UploadFile[]) => void;
|
|
29
29
|
};
|
|
30
30
|
export type UploadFileProps = IProps;
|
|
31
|
-
type IState = {
|
|
32
|
-
actived: Record<string, boolean>;
|
|
33
|
-
};
|
|
34
31
|
export declare const downloadFile: (url: string, { fileName, headers, params }: any) => Promise<void>;
|
|
35
|
-
declare
|
|
36
|
-
|
|
37
|
-
context: React.ContextType<typeof ConfigContext>;
|
|
38
|
-
static defaultProps: {
|
|
39
|
-
name: string;
|
|
40
|
-
multiple: boolean;
|
|
41
|
-
fileDirection: string;
|
|
42
|
-
showUploadList: {
|
|
43
|
-
showPreviewIcon: boolean;
|
|
44
|
-
showDownloadIcon: boolean;
|
|
45
|
-
showRemoveIcon: boolean;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
state: IState;
|
|
49
|
-
uploadRef: React.RefObject<HTMLSpanElement>;
|
|
50
|
-
private sortableInstance;
|
|
51
|
-
get $size(): import("../../_utils/types").ComponentSize;
|
|
52
|
-
componentDidMount(): void;
|
|
53
|
-
componentWillUnmount(): void;
|
|
54
|
-
setActiveState: (uid: string, value?: boolean) => void;
|
|
55
|
-
createSortable: () => void;
|
|
56
|
-
getFileListNode: () => Element | null;
|
|
57
|
-
beforeUpload: (file: any, fileList: any) => Promise<any>;
|
|
58
|
-
doDownload: (file: UploadFile) => Promise<void>;
|
|
59
|
-
itemRender: (file: UploadFile, actions: any) => React.JSX.Element;
|
|
60
|
-
render(): React.JSX.Element;
|
|
61
|
-
}
|
|
62
|
-
export default QmUploadFile;
|
|
32
|
+
declare const UploadFile: React.FC<IProps>;
|
|
33
|
+
export default UploadFile;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import ConfigContext from '../../config-provider/context';
|
|
3
|
-
import type { CSSProperties } from '../../_utils/types';
|
|
1
|
+
import React from 'react';
|
|
4
2
|
type IProps = {
|
|
5
3
|
fixedSize?: [number, number];
|
|
6
4
|
quality?: number;
|
|
@@ -10,27 +8,5 @@ type IProps = {
|
|
|
10
8
|
beforeCrop?: (file: any, fileList: any[]) => Promise<boolean>;
|
|
11
9
|
children?: React.ReactNode;
|
|
12
10
|
};
|
|
13
|
-
|
|
14
|
-
src: string;
|
|
15
|
-
};
|
|
16
|
-
declare class CropperPreview extends Component<IProps, IState> {
|
|
17
|
-
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
18
|
-
context: React.ContextType<typeof ConfigContext>;
|
|
19
|
-
private cropperRef;
|
|
20
|
-
private beforeUploadRef;
|
|
21
|
-
private fileRef;
|
|
22
|
-
private resolveRef;
|
|
23
|
-
private rejectRef;
|
|
24
|
-
state: IState;
|
|
25
|
-
get previewSize(): CSSProperties;
|
|
26
|
-
setSrc(src: any): void;
|
|
27
|
-
renderUpload(): React.CElement<any, React.Component<any, any, any>> | null;
|
|
28
|
-
confirmHandle: () => Promise<void>;
|
|
29
|
-
scaleHandle(percent: number): void;
|
|
30
|
-
rotateHandle(deg: number): void;
|
|
31
|
-
renderCropper(): React.JSX.Element;
|
|
32
|
-
onOk: () => void;
|
|
33
|
-
onClose: () => void;
|
|
34
|
-
render(): React.JSX.Element;
|
|
35
|
-
}
|
|
11
|
+
declare const CropperPreview: React.FC<IProps>;
|
|
36
12
|
export default CropperPreview;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import ConfigContext from '../../config-provider/context';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import type { UploadFile } from '../../upload-file/src/upload-file';
|
|
4
3
|
import type { UploadProps } from '../../antd';
|
|
5
4
|
type IProps = UploadProps & {
|
|
@@ -14,36 +13,6 @@ type IProps = UploadProps & {
|
|
|
14
13
|
beforeCrop?: (file: UploadFile, fileList: UploadFile[]) => Promise<boolean>;
|
|
15
14
|
onSortChange?: (fileList: UploadFile[]) => void;
|
|
16
15
|
};
|
|
17
|
-
type IState = {
|
|
18
|
-
previewVisible: boolean;
|
|
19
|
-
currentIndex: number;
|
|
20
|
-
};
|
|
21
16
|
export type UploadImgProps = IProps;
|
|
22
|
-
declare
|
|
23
|
-
|
|
24
|
-
context: React.ContextType<typeof ConfigContext>;
|
|
25
|
-
static defaultProps: {
|
|
26
|
-
name: string;
|
|
27
|
-
multiple: boolean;
|
|
28
|
-
accept: string;
|
|
29
|
-
listType: string;
|
|
30
|
-
quality: number;
|
|
31
|
-
openCropper: boolean;
|
|
32
|
-
};
|
|
33
|
-
state: IState;
|
|
34
|
-
uploadRef: React.RefObject<HTMLSpanElement>;
|
|
35
|
-
private sortableInstance;
|
|
36
|
-
private isFocused;
|
|
37
|
-
get $size(): import("../../_utils/types").ComponentSize;
|
|
38
|
-
get showUploadButton(): boolean;
|
|
39
|
-
componentDidMount(): void;
|
|
40
|
-
componentDidUpdate(prevProps: IProps): void;
|
|
41
|
-
componentWillUnmount(): void;
|
|
42
|
-
createSortable: () => void;
|
|
43
|
-
getFileListNode: () => Element | null;
|
|
44
|
-
beforeUpload: (file: any, fileList: any) => Promise<any>;
|
|
45
|
-
handlePreview: (file: UploadFile) => void;
|
|
46
|
-
handlePaste: (ev: any) => Promise<void>;
|
|
47
|
-
render(): React.JSX.Element;
|
|
48
|
-
}
|
|
49
|
-
export default QmUploadImg;
|
|
17
|
+
declare const UploadImg: React.FC<IProps>;
|
|
18
|
+
export default UploadImg;
|
|
@@ -13,32 +13,40 @@
|
|
|
13
13
|
.ant-upload-select {
|
|
14
14
|
& > span {
|
|
15
15
|
flex-direction: column;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
}
|
|
17
|
+
&:has(.inner:empty) {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
20
|
+
.ant-upload-drag-icon {
|
|
21
|
+
font-size: 24px;
|
|
22
|
+
line-height: 0;
|
|
23
|
+
color: @--primary-5;
|
|
24
|
+
}
|
|
25
|
+
.ant-upload-text {
|
|
26
|
+
font-size: @--font-size-base - 1px;
|
|
27
|
+
}
|
|
28
|
+
.ant-upload-button {
|
|
29
|
+
display: inline-block;
|
|
30
|
+
text-align: center;
|
|
31
|
+
text-transform: none;
|
|
32
|
+
text-decoration: none;
|
|
33
|
+
background: transparent;
|
|
34
|
+
border: 0;
|
|
35
|
+
outline: 0;
|
|
36
|
+
font-size: @--font-size-base - 1px;
|
|
37
|
+
transition: all 0.3s ease;
|
|
38
|
+
cursor: inherit;
|
|
39
|
+
&:focus {
|
|
40
|
+
box-shadow: 0 0 2px 0 @--primary-5;
|
|
41
|
+
background-color: @--primary-1;
|
|
20
42
|
}
|
|
21
|
-
|
|
22
|
-
|
|
43
|
+
&.disabled {
|
|
44
|
+
pointer-events: none;
|
|
23
45
|
}
|
|
46
|
+
}
|
|
47
|
+
&[class*='disabled'] {
|
|
24
48
|
.ant-upload-button {
|
|
25
|
-
|
|
26
|
-
text-align: center;
|
|
27
|
-
text-transform: none;
|
|
28
|
-
text-decoration: none;
|
|
29
|
-
background: transparent;
|
|
30
|
-
border: 0;
|
|
31
|
-
outline: 0;
|
|
32
|
-
font-size: @--font-size-base - 1px;
|
|
33
|
-
transition: all 0.3s ease;
|
|
34
|
-
cursor: inherit;
|
|
35
|
-
&:focus {
|
|
36
|
-
box-shadow: 0 0 2px 0 @--primary-5;
|
|
37
|
-
background-color: @--primary-1;
|
|
38
|
-
}
|
|
39
|
-
&.disabled {
|
|
40
|
-
pointer-events: none;
|
|
41
|
-
}
|
|
49
|
+
pointer-events: none;
|
|
42
50
|
}
|
|
43
51
|
}
|
|
44
52
|
}
|