dcp-design-react 1.10.11 → 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/index.esm.js +1 -1
- package/lib/index.full.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -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;
|