@kdcloudjs/kdesign 1.6.36 → 1.6.38
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/CHANGELOG.md +12 -0
- package/dist/kdesign.css +1 -1
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +15 -9
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +1 -1
- package/dist/kdesign.min.js +3 -3
- package/dist/kdesign.min.js.map +1 -1
- package/es/config-provider/compDefaultProps.d.ts +1 -0
- package/es/config-provider/compDefaultProps.js +2 -1
- package/es/image-cropper/cropper.d.ts +2 -1
- package/es/image-cropper/cropper.js +3 -2
- package/es/image-cropper/image-cropper.d.ts +1 -0
- package/es/image-cropper/image-cropper.js +3 -1
- package/es/radio/group.js +2 -2
- package/es/radio/radio.js +3 -1
- package/es/table/table.js +1 -1
- package/lib/config-provider/compDefaultProps.d.ts +1 -0
- package/lib/config-provider/compDefaultProps.js +2 -1
- package/lib/image-cropper/cropper.d.ts +2 -1
- package/lib/image-cropper/cropper.js +3 -2
- package/lib/image-cropper/image-cropper.d.ts +1 -0
- package/lib/image-cropper/image-cropper.js +3 -1
- package/lib/radio/group.js +2 -2
- package/lib/radio/radio.js +3 -1
- package/lib/table/table.js +1 -1
- package/package.json +3 -2
|
@@ -19,7 +19,8 @@ export interface CropperProps {
|
|
|
19
19
|
modal?: boolean;
|
|
20
20
|
zoomOnWheel?: boolean;
|
|
21
21
|
cropBoxMovable?: boolean;
|
|
22
|
+
autoCropArea?: number;
|
|
22
23
|
onCropSuccess?: () => void;
|
|
23
24
|
}
|
|
24
|
-
declare const Cropper: React.ForwardRefExoticComponent<Pick<CropperProps, "className" | "modal" | "imgSrc" | "dragMode" | "viewMode" | "aspectRatio" | "zoomOnWheel" | "cropBoxMovable" | "onCropSuccess"> & React.RefAttributes<CropperInstance | null>>;
|
|
25
|
+
declare const Cropper: React.ForwardRefExoticComponent<Pick<CropperProps, "className" | "modal" | "imgSrc" | "dragMode" | "viewMode" | "aspectRatio" | "zoomOnWheel" | "cropBoxMovable" | "autoCropArea" | "onCropSuccess"> & React.RefAttributes<CropperInstance | null>>;
|
|
25
26
|
export default Cropper;
|
|
@@ -27,6 +27,7 @@ var Cropper = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
27
27
|
dragMode = props.dragMode,
|
|
28
28
|
viewMode = props.viewMode,
|
|
29
29
|
aspectRatio = props.aspectRatio,
|
|
30
|
+
autoCropArea = props.autoCropArea,
|
|
30
31
|
_props$modal = props.modal,
|
|
31
32
|
modal = _props$modal === void 0 ? true : _props$modal,
|
|
32
33
|
_props$zoomOnWheel = props.zoomOnWheel,
|
|
@@ -43,9 +44,9 @@ var Cropper = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
43
44
|
dragMode: dragMode,
|
|
44
45
|
cropBoxMovable: cropBoxMovable,
|
|
45
46
|
modal: modal,
|
|
46
|
-
autoCropArea:
|
|
47
|
+
autoCropArea: autoCropArea
|
|
47
48
|
};
|
|
48
|
-
}, [aspectRatio, viewMode, zoomOnWheel, dragMode, modal,
|
|
49
|
+
}, [aspectRatio, viewMode, zoomOnWheel, dragMode, cropBoxMovable, modal, autoCropArea]);
|
|
49
50
|
useEffect(function () {
|
|
50
51
|
if (!imgRef.current) return;
|
|
51
52
|
if (!imgSrc) return;
|
|
@@ -24,6 +24,7 @@ export interface ImageCropperProps {
|
|
|
24
24
|
customComponents?: customComponentsProps;
|
|
25
25
|
showDeaultToolbar?: boolean;
|
|
26
26
|
cropBoxMovable?: boolean;
|
|
27
|
+
autoCropArea?: number;
|
|
27
28
|
onClose?: () => void;
|
|
28
29
|
onCropSuccess?: (file: File) => void;
|
|
29
30
|
onCropFailed?: () => void;
|
|
@@ -78,7 +78,8 @@ var InternalImageCropper = function InternalImageCropper(props, forwardedRef) {
|
|
|
78
78
|
cropBoxMovable = _a.cropBoxMovable,
|
|
79
79
|
customComponents = _a.customComponents,
|
|
80
80
|
showDeaultToolbar = _a.showDeaultToolbar,
|
|
81
|
-
|
|
81
|
+
autoCropArea = _a.autoCropArea,
|
|
82
|
+
restProps = __rest(_a, ["prefixCls", "containerWidth", "containerHeight", "title", "visible", "onClose", "onCropSuccess", "onCropFailed", "dragMode", "viewMode", "aspectRatio", "modal", "okText", "okBtn", "image", "zoomOnWheel", "imageMaxSize", "cropBoxMovable", "customComponents", "showDeaultToolbar", "autoCropArea"]);
|
|
82
83
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'image-cropper', customPrefixcls);
|
|
83
84
|
var handleOkClick = function handleOkClick() {
|
|
84
85
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -125,6 +126,7 @@ var InternalImageCropper = function InternalImageCropper(props, forwardedRef) {
|
|
|
125
126
|
zoomOnWheel: zoomOnWheel,
|
|
126
127
|
cropBoxMovable: cropBoxMovable,
|
|
127
128
|
imgSrc: cropperSrc,
|
|
129
|
+
autoCropArea: autoCropArea,
|
|
128
130
|
ref: cropperRef
|
|
129
131
|
});
|
|
130
132
|
var OperationBarNode = /*#__PURE__*/React.createElement(OperationBar, {
|
package/es/radio/group.js
CHANGED
|
@@ -12,14 +12,14 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
12
12
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
13
13
|
prefixCls = _React$useContext.prefixCls,
|
|
14
14
|
userDefaultProps = _React$useContext.compDefaultProps;
|
|
15
|
-
var initValue = props.value === undefined ? props.defaultValue : props.value;
|
|
15
|
+
var initValue = typeof props.value === 'undefined' ? props.defaultValue : props.value;
|
|
16
16
|
var _React$useState = React.useState(initValue),
|
|
17
17
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
18
18
|
value = _React$useState2[0],
|
|
19
19
|
setValue = _React$useState2[1];
|
|
20
20
|
// 从props更新value值
|
|
21
21
|
React.useEffect(function () {
|
|
22
|
-
if (props.value !== undefined) {
|
|
22
|
+
if (typeof props.value !== 'undefined') {
|
|
23
23
|
setValue(props.value);
|
|
24
24
|
}
|
|
25
25
|
}, [props.value]);
|
package/es/radio/radio.js
CHANGED
|
@@ -57,7 +57,9 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
57
57
|
}, [checked, defaultChecked, context === null || context === void 0 ? void 0 : context.value]);
|
|
58
58
|
var onChange = function onChange(e) {
|
|
59
59
|
if (disabled) return;
|
|
60
|
-
|
|
60
|
+
if (typeof (context === null || context === void 0 ? void 0 : context.value) === 'undefined') {
|
|
61
|
+
setIsChecked(e.target.checked);
|
|
62
|
+
}
|
|
61
63
|
if (props.onChange) {
|
|
62
64
|
props.onChange(e);
|
|
63
65
|
}
|
package/es/table/table.js
CHANGED
|
@@ -92,13 +92,13 @@ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
92
92
|
useSort(pipeline, sort);
|
|
93
93
|
useAutoRowSpan(pipeline, autoRowSpan);
|
|
94
94
|
useTreeMode(pipeline, treeMode);
|
|
95
|
+
usecolGroupExtendable(pipeline, columnGroupExtend);
|
|
95
96
|
useColumnResize(pipeline, columnResize);
|
|
96
97
|
useColumnDrag(pipeline, columnDrag);
|
|
97
98
|
useContextMenu(pipeline, contextMenu);
|
|
98
99
|
useRangeSelection(pipeline, rangeSelection);
|
|
99
100
|
useMergeCellHover(pipeline);
|
|
100
101
|
useFooterDataSource(pipeline, footerDataSource);
|
|
101
|
-
usecolGroupExtendable(pipeline, columnGroupExtend);
|
|
102
102
|
/* -------------------------------------------------------------------------- */
|
|
103
103
|
/* after useTablePipeline, merge pipeline.getProps result */
|
|
104
104
|
/* -------------------------------------------------------------------------- */
|
|
@@ -19,7 +19,8 @@ export interface CropperProps {
|
|
|
19
19
|
modal?: boolean;
|
|
20
20
|
zoomOnWheel?: boolean;
|
|
21
21
|
cropBoxMovable?: boolean;
|
|
22
|
+
autoCropArea?: number;
|
|
22
23
|
onCropSuccess?: () => void;
|
|
23
24
|
}
|
|
24
|
-
declare const Cropper: React.ForwardRefExoticComponent<Pick<CropperProps, "className" | "modal" | "imgSrc" | "dragMode" | "viewMode" | "aspectRatio" | "zoomOnWheel" | "cropBoxMovable" | "onCropSuccess"> & React.RefAttributes<CropperInstance | null>>;
|
|
25
|
+
declare const Cropper: React.ForwardRefExoticComponent<Pick<CropperProps, "className" | "modal" | "imgSrc" | "dragMode" | "viewMode" | "aspectRatio" | "zoomOnWheel" | "cropBoxMovable" | "autoCropArea" | "onCropSuccess"> & React.RefAttributes<CropperInstance | null>>;
|
|
25
26
|
export default Cropper;
|
|
@@ -40,6 +40,7 @@ var Cropper = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedRef)
|
|
|
40
40
|
dragMode = props.dragMode,
|
|
41
41
|
viewMode = props.viewMode,
|
|
42
42
|
aspectRatio = props.aspectRatio,
|
|
43
|
+
autoCropArea = props.autoCropArea,
|
|
43
44
|
_props$modal = props.modal,
|
|
44
45
|
modal = _props$modal === void 0 ? true : _props$modal,
|
|
45
46
|
_props$zoomOnWheel = props.zoomOnWheel,
|
|
@@ -56,9 +57,9 @@ var Cropper = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedRef)
|
|
|
56
57
|
dragMode: dragMode,
|
|
57
58
|
cropBoxMovable: cropBoxMovable,
|
|
58
59
|
modal: modal,
|
|
59
|
-
autoCropArea:
|
|
60
|
+
autoCropArea: autoCropArea
|
|
60
61
|
};
|
|
61
|
-
}, [aspectRatio, viewMode, zoomOnWheel, dragMode, modal,
|
|
62
|
+
}, [aspectRatio, viewMode, zoomOnWheel, dragMode, cropBoxMovable, modal, autoCropArea]);
|
|
62
63
|
(0, _react.useEffect)(function () {
|
|
63
64
|
if (!imgRef.current) return;
|
|
64
65
|
if (!imgSrc) return;
|
|
@@ -24,6 +24,7 @@ export interface ImageCropperProps {
|
|
|
24
24
|
customComponents?: customComponentsProps;
|
|
25
25
|
showDeaultToolbar?: boolean;
|
|
26
26
|
cropBoxMovable?: boolean;
|
|
27
|
+
autoCropArea?: number;
|
|
27
28
|
onClose?: () => void;
|
|
28
29
|
onCropSuccess?: (file: File) => void;
|
|
29
30
|
onCropFailed?: () => void;
|
|
@@ -90,7 +90,8 @@ var InternalImageCropper = function InternalImageCropper(props, forwardedRef) {
|
|
|
90
90
|
cropBoxMovable = _a.cropBoxMovable,
|
|
91
91
|
customComponents = _a.customComponents,
|
|
92
92
|
showDeaultToolbar = _a.showDeaultToolbar,
|
|
93
|
-
|
|
93
|
+
autoCropArea = _a.autoCropArea,
|
|
94
|
+
restProps = __rest(_a, ["prefixCls", "containerWidth", "containerHeight", "title", "visible", "onClose", "onCropSuccess", "onCropFailed", "dragMode", "viewMode", "aspectRatio", "modal", "okText", "okBtn", "image", "zoomOnWheel", "imageMaxSize", "cropBoxMovable", "customComponents", "showDeaultToolbar", "autoCropArea"]);
|
|
94
95
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'image-cropper', customPrefixcls);
|
|
95
96
|
var handleOkClick = function handleOkClick() {
|
|
96
97
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
@@ -137,6 +138,7 @@ var InternalImageCropper = function InternalImageCropper(props, forwardedRef) {
|
|
|
137
138
|
zoomOnWheel: zoomOnWheel,
|
|
138
139
|
cropBoxMovable: cropBoxMovable,
|
|
139
140
|
imgSrc: cropperSrc,
|
|
141
|
+
autoCropArea: autoCropArea,
|
|
140
142
|
ref: cropperRef
|
|
141
143
|
});
|
|
142
144
|
var OperationBarNode = /*#__PURE__*/_react.default.createElement(_operationBar.default, {
|
package/lib/radio/group.js
CHANGED
|
@@ -24,14 +24,14 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
24
24
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
25
25
|
prefixCls = _React$useContext.prefixCls,
|
|
26
26
|
userDefaultProps = _React$useContext.compDefaultProps;
|
|
27
|
-
var initValue = props.value === undefined ? props.defaultValue : props.value;
|
|
27
|
+
var initValue = typeof props.value === 'undefined' ? props.defaultValue : props.value;
|
|
28
28
|
var _React$useState = React.useState(initValue),
|
|
29
29
|
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
30
30
|
value = _React$useState2[0],
|
|
31
31
|
setValue = _React$useState2[1];
|
|
32
32
|
// 从props更新value值
|
|
33
33
|
React.useEffect(function () {
|
|
34
|
-
if (props.value !== undefined) {
|
|
34
|
+
if (typeof props.value !== 'undefined') {
|
|
35
35
|
setValue(props.value);
|
|
36
36
|
}
|
|
37
37
|
}, [props.value]);
|
package/lib/radio/radio.js
CHANGED
|
@@ -69,7 +69,9 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
69
69
|
}, [checked, defaultChecked, context === null || context === void 0 ? void 0 : context.value]);
|
|
70
70
|
var onChange = function onChange(e) {
|
|
71
71
|
if (disabled) return;
|
|
72
|
-
|
|
72
|
+
if (typeof (context === null || context === void 0 ? void 0 : context.value) === 'undefined') {
|
|
73
|
+
setIsChecked(e.target.checked);
|
|
74
|
+
}
|
|
73
75
|
if (props.onChange) {
|
|
74
76
|
props.onChange(e);
|
|
75
77
|
}
|
package/lib/table/table.js
CHANGED
|
@@ -104,13 +104,13 @@ var Table = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
104
104
|
(0, _sort2.default)(pipeline, sort);
|
|
105
105
|
(0, _autoRowSpan.default)(pipeline, autoRowSpan);
|
|
106
106
|
(0, _treeMode.default)(pipeline, treeMode);
|
|
107
|
+
(0, _colGroupExtendable.default)(pipeline, columnGroupExtend);
|
|
107
108
|
(0, _columnResize.default)(pipeline, columnResize);
|
|
108
109
|
(0, _columnDrag.default)(pipeline, columnDrag);
|
|
109
110
|
(0, _contextMenu.default)(pipeline, contextMenu);
|
|
110
111
|
(0, _useRangeSelection.default)(pipeline, rangeSelection);
|
|
111
112
|
(0, _mergeCellHover.default)(pipeline);
|
|
112
113
|
(0, _useFooterDataSource.default)(pipeline, footerDataSource);
|
|
113
|
-
(0, _colGroupExtendable.default)(pipeline, columnGroupExtend);
|
|
114
114
|
/* -------------------------------------------------------------------------- */
|
|
115
115
|
/* after useTablePipeline, merge pipeline.getProps result */
|
|
116
116
|
/* -------------------------------------------------------------------------- */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kdcloudjs/kdesign",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.38",
|
|
4
4
|
"description": "KDesign 金蝶前端react 组件库",
|
|
5
5
|
"title": "kdesign",
|
|
6
6
|
"keywords": [
|
|
@@ -241,7 +241,8 @@
|
|
|
241
241
|
},
|
|
242
242
|
"resolutions": {
|
|
243
243
|
"@types/babel__traverse": "7.17.1",
|
|
244
|
-
"@types/node": "17.0.41"
|
|
244
|
+
"@types/node": "17.0.41",
|
|
245
|
+
"prettier": "2.8.0"
|
|
245
246
|
},
|
|
246
247
|
"license": "Apache-2.0"
|
|
247
248
|
}
|