@jiaozhiye/qm-design-react 1.10.10 → 1.10.12
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/cropper/src/cropper.d.ts +4 -165
- package/lib/form/src/fields-filter.d.ts +2 -22
- package/lib/form/src/types.d.ts +2 -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/scrollbar/index.d.ts +1 -1
- package/lib/search-tree/src/search-tree.d.ts +1 -1
- package/lib/signature/index.d.ts +1 -1
- package/lib/table/src/edit/index.d.ts +1 -0
- package/lib/table/src/hooks/useTableEffect.d.ts +3 -4
- package/lib/table/src/table/types.d.ts +1 -1
- package/lib/table/src/utils/index.d.ts +4 -1
- package/lib/upload-file/src/upload-file.d.ts +1 -1
- package/package.json +139 -139
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { CSSProperties, AnyObject, AnyFunction } from '../../_utils/types';
|
|
3
3
|
type IProps = {
|
|
4
4
|
src: string;
|
|
@@ -17,6 +17,7 @@ type IProps = {
|
|
|
17
17
|
checkCrossOrigin?: boolean;
|
|
18
18
|
checkOrientation?: boolean;
|
|
19
19
|
crossorigin?: string;
|
|
20
|
+
modal?: boolean;
|
|
20
21
|
guides?: boolean;
|
|
21
22
|
center?: boolean;
|
|
22
23
|
highlight?: boolean;
|
|
@@ -47,167 +48,5 @@ type IProps = {
|
|
|
47
48
|
zoom?: AnyFunction<void>;
|
|
48
49
|
};
|
|
49
50
|
export type CropperProps = IProps;
|
|
50
|
-
declare
|
|
51
|
-
|
|
52
|
-
src: string;
|
|
53
|
-
responsive: boolean;
|
|
54
|
-
restore: boolean;
|
|
55
|
-
checkCrossOrigin: boolean;
|
|
56
|
-
checkOrientation: boolean;
|
|
57
|
-
modal: boolean;
|
|
58
|
-
guides: boolean;
|
|
59
|
-
center: boolean;
|
|
60
|
-
highlight: boolean;
|
|
61
|
-
background: boolean;
|
|
62
|
-
autoCrop: boolean;
|
|
63
|
-
movable: boolean;
|
|
64
|
-
rotatable: boolean;
|
|
65
|
-
scalable: boolean;
|
|
66
|
-
zoomable: boolean;
|
|
67
|
-
zoomOnTouch: boolean;
|
|
68
|
-
zoomOnWheel: boolean;
|
|
69
|
-
cropBoxMovable: boolean;
|
|
70
|
-
cropBoxResizable: boolean;
|
|
71
|
-
toggleDragModeOnDblclick: boolean;
|
|
72
|
-
};
|
|
73
|
-
private imgRef;
|
|
74
|
-
private cropper;
|
|
75
|
-
componentDidMount(): void;
|
|
76
|
-
componentWillUnmount(): void;
|
|
77
|
-
reset(): any;
|
|
78
|
-
clear(): any;
|
|
79
|
-
initCrop(): any;
|
|
80
|
-
/**
|
|
81
|
-
* Replace the image's src and rebuild the cropper
|
|
82
|
-
* @param {string} url - The new URL.
|
|
83
|
-
* @param {boolean} [onlyColorChanged] - Indicate if the new image only changed color.
|
|
84
|
-
* @returns {Object} this
|
|
85
|
-
*/
|
|
86
|
-
replace(url: any, onlyColorChanged?: boolean): any;
|
|
87
|
-
enable(): any;
|
|
88
|
-
disable(): any;
|
|
89
|
-
destroy(): any;
|
|
90
|
-
/**
|
|
91
|
-
* Move the canvas with relative offsets
|
|
92
|
-
* @param {number} offsetX - The relative offset distance on the x-axis.
|
|
93
|
-
* @param {number} offsetY - The relative offset distance on the y-axis.
|
|
94
|
-
* @returns {Object} this
|
|
95
|
-
*/
|
|
96
|
-
move(offsetX: any, offsetY: any): any;
|
|
97
|
-
/**
|
|
98
|
-
* Move the canvas to an absolute point
|
|
99
|
-
* @param {number} x - The x-axis coordinate.
|
|
100
|
-
* @param {number} [y=x] - The y-axis coordinate.
|
|
101
|
-
* @returns {Object} this
|
|
102
|
-
*/
|
|
103
|
-
moveTo(x: any, y?: any): any;
|
|
104
|
-
/**
|
|
105
|
-
* Zoom the canvas with a relative ratio
|
|
106
|
-
* @param {number} ratio - The target ratio.
|
|
107
|
-
* @param {Event} _originalEvent - The original event if any.
|
|
108
|
-
* @returns {Object} this
|
|
109
|
-
*/
|
|
110
|
-
relativeZoom(ratio: any, _originalEvent: any): any;
|
|
111
|
-
/**
|
|
112
|
-
* Zoom the canvas to an absolute ratio
|
|
113
|
-
* @param {number} ratio - The target ratio.
|
|
114
|
-
* @param {Event} _originalEvent - The original event if any.
|
|
115
|
-
* @returns {Object} this
|
|
116
|
-
*/
|
|
117
|
-
zoomTo(ratio: any, _originalEvent: any): any;
|
|
118
|
-
/**
|
|
119
|
-
* Rotate the canvas with a relative degree
|
|
120
|
-
* @param {number} degree - The rotate degree.
|
|
121
|
-
* @returns {Object} this
|
|
122
|
-
*/
|
|
123
|
-
rotate(degree: any): any;
|
|
124
|
-
/**
|
|
125
|
-
* Rotate the canvas to an absolute degree
|
|
126
|
-
* @param {number} degree - The rotate degree.
|
|
127
|
-
* @returns {Object} this
|
|
128
|
-
*/
|
|
129
|
-
rotateTo(degree: any): any;
|
|
130
|
-
/**
|
|
131
|
-
* Scale the image on the x-axis.
|
|
132
|
-
* @param {number} scaleX - The scale ratio on the x-axis.
|
|
133
|
-
* @returns {Object} this
|
|
134
|
-
*/
|
|
135
|
-
scaleX(scaleX: any): any;
|
|
136
|
-
/**
|
|
137
|
-
* Scale the image on the y-axis.
|
|
138
|
-
* @param {number} scaleY - The scale ratio on the y-axis.
|
|
139
|
-
* @returns {Object} this
|
|
140
|
-
*/
|
|
141
|
-
scaleY(scaleY: any): any;
|
|
142
|
-
/**
|
|
143
|
-
* Scale the image
|
|
144
|
-
* @param {number} scaleX - The scale ratio on the x-axis.
|
|
145
|
-
* @param {number} [scaleY=scaleX] - The scale ratio on the y-axis.
|
|
146
|
-
* @returns {Object} this
|
|
147
|
-
*/
|
|
148
|
-
scale(scaleX: any, scaleY?: any): any;
|
|
149
|
-
/**
|
|
150
|
-
* Get the cropped area position and size data (base on the original image)
|
|
151
|
-
* @param {boolean} [rounded=false] - Indicate if round the data values or not.
|
|
152
|
-
* @returns {Object} The result cropped data.
|
|
153
|
-
*/
|
|
154
|
-
getData(rounded?: boolean): any;
|
|
155
|
-
/**
|
|
156
|
-
* Set the cropped area position and size with new data
|
|
157
|
-
* @param {Object} data - The new data.
|
|
158
|
-
* @returns {Object} this
|
|
159
|
-
*/
|
|
160
|
-
setData(data: any): any;
|
|
161
|
-
/**
|
|
162
|
-
* Get the container size data.
|
|
163
|
-
* @returns {Object} The result container data.
|
|
164
|
-
*/
|
|
165
|
-
getContainerData(): any;
|
|
166
|
-
/**
|
|
167
|
-
* Get the image position and size data.
|
|
168
|
-
* @returns {Object} The result image data.
|
|
169
|
-
*/
|
|
170
|
-
getImageData(): any;
|
|
171
|
-
/**
|
|
172
|
-
* Get the canvas position and size data.
|
|
173
|
-
* @returns {Object} The result canvas data.
|
|
174
|
-
*/
|
|
175
|
-
getCanvasData(): any;
|
|
176
|
-
/**
|
|
177
|
-
* Set the canvas position and size with new data.
|
|
178
|
-
* @param {Object} data - The new canvas data.
|
|
179
|
-
* @returns {Object} this
|
|
180
|
-
*/
|
|
181
|
-
setCanvasData(data: any): any;
|
|
182
|
-
/**
|
|
183
|
-
* Get the crop box position and size data.
|
|
184
|
-
* @returns {Object} The result crop box data.
|
|
185
|
-
*/
|
|
186
|
-
getCropBoxData(): any;
|
|
187
|
-
/**
|
|
188
|
-
* Set the crop box position and size with new data.
|
|
189
|
-
* @param {Object} data - The new crop box data.
|
|
190
|
-
* @returns {Object} this
|
|
191
|
-
*/
|
|
192
|
-
setCropBoxData(data: any): any;
|
|
193
|
-
/**
|
|
194
|
-
* Get a canvas drawn the cropped image.
|
|
195
|
-
* @param {Object} [options={}] - The config options.
|
|
196
|
-
* @returns {HTMLCanvasElement} - The result canvas.
|
|
197
|
-
*/
|
|
198
|
-
getCroppedCanvas(options?: {}): any;
|
|
199
|
-
/**
|
|
200
|
-
* Change the aspect ratio of the crop box.
|
|
201
|
-
* @param {number} aspectRatio - The new aspect ratio.
|
|
202
|
-
* @returns {Object} this
|
|
203
|
-
*/
|
|
204
|
-
setAspectRatio(aspectRatio: any): any;
|
|
205
|
-
/**
|
|
206
|
-
* Change the drag mode.
|
|
207
|
-
* @param {string} mode - The new drag mode.
|
|
208
|
-
* @returns {Object} this
|
|
209
|
-
*/
|
|
210
|
-
setDragMode(mode: any): any;
|
|
211
|
-
render(): React.JSX.Element;
|
|
212
|
-
}
|
|
213
|
-
export default QmCropper;
|
|
51
|
+
declare const Cropper: React.ForwardRefExoticComponent<IProps & React.RefAttributes<any>>;
|
|
52
|
+
export default Cropper;
|
|
@@ -1,29 +1,9 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import ConfigContext from '../../config-provider/context';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import type { IFormItem } from './types';
|
|
4
3
|
type IProps = {
|
|
5
4
|
uniqueKey?: string;
|
|
6
5
|
items: IFormItem[];
|
|
7
6
|
fieldsChange?: (items: IFormItem[]) => void;
|
|
8
7
|
};
|
|
9
|
-
|
|
10
|
-
visible: boolean;
|
|
11
|
-
};
|
|
12
|
-
declare class FieldsFilter extends Component<IProps, IState> {
|
|
13
|
-
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
14
|
-
context: React.ContextType<typeof ConfigContext>;
|
|
15
|
-
private linkRef;
|
|
16
|
-
state: IState;
|
|
17
|
-
get formUniqueKey(): string;
|
|
18
|
-
componentDidMount(): void;
|
|
19
|
-
getFormFieldsConfig: (key: string) => Promise<unknown[] | void>;
|
|
20
|
-
saveFormFieldsConfig: (key: string, value: Partial<IFormItem>[]) => Promise<void>;
|
|
21
|
-
getLocalFields(): Array<IFormItem> | void;
|
|
22
|
-
setLocalFields(list: IFormItem[]): void;
|
|
23
|
-
initLocalfields(): void;
|
|
24
|
-
changeHandle(items: IFormItem[]): void;
|
|
25
|
-
resetFieldsHandle: (items: IFormItem[]) => void;
|
|
26
|
-
popupRender(): React.JSX.Element;
|
|
27
|
-
render(): React.JSX.Element;
|
|
28
|
-
}
|
|
8
|
+
declare const FieldsFilter: React.FC<IProps>;
|
|
29
9
|
export default FieldsFilter;
|
package/lib/form/src/types.d.ts
CHANGED
|
@@ -185,11 +185,12 @@ export type IFormItem = {
|
|
|
185
185
|
fileSize?: number;
|
|
186
186
|
draggable?: boolean;
|
|
187
187
|
editable?: boolean;
|
|
188
|
-
batchDownload?: (fileList: UploadFile[]) => Promise<void> | boolean;
|
|
188
|
+
batchDownload?: ((fileList: UploadFile[]) => Promise<void>) | boolean;
|
|
189
189
|
fileDirection?: IFormLayout;
|
|
190
190
|
showTip?: boolean;
|
|
191
191
|
openCropper?: boolean;
|
|
192
192
|
onPreview?: (file: UploadFile, cb: (file?: UploadFile) => void) => void;
|
|
193
|
+
onDownload?: (file: UploadFile) => void;
|
|
193
194
|
onRemove?: (file: UploadFile) => void;
|
|
194
195
|
onSortChange?: (fileList: UploadFile[]) => void;
|
|
195
196
|
onEditChange?: (file: UploadFile, fileList: UploadFile[]) => void;
|
package/lib/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type { EmptyProps as QmEmptyProps } from './empty';
|
|
|
16
16
|
export { default as QmEmpty } from './empty';
|
|
17
17
|
export type { SpinProps as QmSpinProps } from './spin';
|
|
18
18
|
export { default as QmSpin } from './spin';
|
|
19
|
-
export type { ScrollbarProps as QmScrollbarProps } from './scrollbar';
|
|
19
|
+
export type { ScrollbarRef as QmScrollbarRef, ScrollbarProps as QmScrollbarProps } from './scrollbar';
|
|
20
20
|
export { default as QmScrollbar } from './scrollbar';
|
|
21
21
|
export type { DownloadProps as QmDownloadProps } from './download';
|
|
22
22
|
export { default as QmDownload } from './download';
|
|
@@ -64,7 +64,7 @@ export type { WatermarkProps as QmWatermarkProps } from './watermark';
|
|
|
64
64
|
export { default as QmWatermark } from './watermark';
|
|
65
65
|
export type { LazyLoadProps as QmLazyLoadProps } from './lazy-load';
|
|
66
66
|
export { default as QmLazyLoad } from './lazy-load';
|
|
67
|
-
export type { SignatureProps as QmSignatureProps } from './signature';
|
|
67
|
+
export type { SignatureRef as QmSignatureRef, SignatureProps as QmSignatureProps } from './signature';
|
|
68
68
|
export { default as QmSignature } from './signature';
|
|
69
69
|
export type { ConfigProviderProps as DcpConfigProviderProps } from './config-provider';
|
|
70
70
|
export { default as DcpConfigProvider } from './config-provider';
|
|
@@ -84,7 +84,7 @@ export type { EmptyProps as DcpEmptyProps } from './empty';
|
|
|
84
84
|
export { default as DcpEmpty } from './empty';
|
|
85
85
|
export type { SpinProps as DcpSpinProps } from './spin';
|
|
86
86
|
export { default as DcpSpin } from './spin';
|
|
87
|
-
export type { ScrollbarProps as DcpScrollbarProps } from './scrollbar';
|
|
87
|
+
export type { ScrollbarRef as DcpScrollbarRef, ScrollbarProps as DcpScrollbarProps } from './scrollbar';
|
|
88
88
|
export { default as DcpScrollbar } from './scrollbar';
|
|
89
89
|
export type { DownloadProps as DcpDownloadProps } from './download';
|
|
90
90
|
export { default as DcpDownload } from './download';
|
|
@@ -132,7 +132,7 @@ export type { WatermarkProps as DcpWatermarkProps } from './watermark';
|
|
|
132
132
|
export { default as DcpWatermark } from './watermark';
|
|
133
133
|
export type { LazyLoadProps as DcpLazyLoadProps } from './lazy-load';
|
|
134
134
|
export { default as DcpLazyLoad } from './lazy-load';
|
|
135
|
-
export type { SignatureProps as DcpSignatureProps } from './signature';
|
|
135
|
+
export type { SignatureRef as DcpSignatureRef, SignatureProps as DcpSignatureProps } from './signature';
|
|
136
136
|
export { default as DcpSignature } from './signature';
|
|
137
137
|
export { default as pinyin } from './pinyin';
|
|
138
138
|
export { default as version } from './version';
|