@zat-design/sisyphus-react 3.3.1 → 3.3.2-beta.1
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/dist/index.esm.css +35 -9
- package/es/ProDownload/utils.js +2 -0
- package/es/ProEditTable/components/RenderField/index.js +7 -6
- package/es/ProEditTable/index.js +19 -1
- package/es/ProEditTable/style/index.less +5 -0
- package/es/ProEnum/hooks/useEnumRequest.js +13 -1
- package/es/ProForm/components/combination/Group/index.js +3 -4
- package/es/ProForm/components/combination/Group/style/index.less +38 -21
- package/es/ProForm/components/combination/Group/utils.d.ts +0 -2
- package/es/ProForm/components/combination/Group/utils.js +0 -13
- package/es/ProForm/components/combination/ProModalSelect/index.js +2 -2
- package/es/ProForm/components/render/Render.js +15 -9
- package/es/ProForm/components/render/RenderFields.js +2 -1
- package/es/ProForm/style/index.less +5 -4
- package/es/ProForm/utils/contrastOriginal.d.ts +0 -1
- package/es/ProForm/utils/contrastOriginal.js +0 -1
- package/es/ProForm/utils/useChanged.d.ts +7 -14
- package/es/ProForm/utils/useChanged.js +13 -20
- package/es/ProForm/utils/useListChanged.d.ts +16 -0
- package/es/ProForm/utils/useListChanged.js +81 -0
- package/es/ProForm/utils/useShouldUpdate.js +17 -3
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +13 -5
- package/es/ProLayout/components/Layout/Menu/index.js +13 -10
- package/es/ProLayout/components/ProCollapse/index.js +2 -0
- package/es/ProLayout/components/ProCollapse/style/index.less +49 -39
- package/es/ProLayout/propTypes.d.ts +2 -0
- package/es/ProTable/style/index.less +1 -0
- package/es/ProTooltip/index.js +5 -3
- package/es/ProTreeModal/components/Trigger.d.ts +1 -0
- package/es/ProTreeModal/components/Trigger.js +17 -8
- package/es/ProTreeModal/index.js +12 -2
- package/es/ProUpload/components/DragRender.js +1 -2
- package/es/ProUpload/components/ImageRender.js +17 -7
- package/es/locale/en_US.d.ts +2 -0
- package/es/locale/en_US.js +3 -1
- package/es/locale/zh_CN.d.ts +3 -0
- package/es/locale/zh_CN.js +4 -1
- package/lib/ProEditTable/components/RenderField/index.js +9 -6
- package/lib/ProEditTable/index.js +18 -0
- package/lib/ProEditTable/style/index.less +5 -0
- package/lib/ProEnum/hooks/useEnumRequest.js +13 -1
- package/lib/ProForm/components/base/RangePicker/index.js +1 -1
- package/lib/ProForm/components/combination/Group/index.js +2 -3
- package/lib/ProForm/components/combination/Group/style/index.less +38 -21
- package/lib/ProForm/components/combination/Group/utils.d.ts +0 -2
- package/lib/ProForm/components/combination/Group/utils.js +1 -14
- package/lib/ProForm/components/combination/ProModalSelect/index.js +1 -1
- package/lib/ProForm/components/old/InputRange/index.js +0 -1
- package/lib/ProForm/components/old/ProCertValidity/index.js +1 -1
- package/lib/ProForm/components/render/Render.js +16 -9
- package/lib/ProForm/components/render/RenderFields.js +2 -1
- package/lib/ProForm/style/index.less +5 -4
- package/lib/ProForm/utils/contrastOriginal.d.ts +0 -1
- package/lib/ProForm/utils/contrastOriginal.js +0 -1
- package/lib/ProForm/utils/useChanged.d.ts +7 -14
- package/lib/ProForm/utils/useChanged.js +13 -20
- package/lib/ProForm/utils/useListChanged.d.ts +16 -0
- package/lib/ProForm/utils/useListChanged.js +86 -0
- package/lib/ProForm/utils/useShouldUpdate.js +17 -3
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +13 -5
- package/lib/ProLayout/components/Layout/Menu/index.js +13 -10
- package/lib/ProLayout/components/ProCollapse/index.js +2 -0
- package/lib/ProLayout/components/ProCollapse/style/index.less +49 -39
- package/lib/ProLayout/propTypes.d.ts +2 -0
- package/lib/ProTable/components/TableResizable/index.js +8 -0
- package/lib/ProTable/style/index.less +1 -0
- package/lib/ProTabs/index.js +1 -0
- package/lib/ProThemeTools/index.js +1 -0
- package/lib/ProTooltip/index.js +4 -2
- package/lib/ProTree/components/Tree.js +7 -0
- package/lib/ProTree/index.js +0 -1
- package/lib/ProTreeModal/components/Tree.js +1 -0
- package/lib/ProTreeModal/components/Trigger.d.ts +1 -0
- package/lib/ProTreeModal/components/Trigger.js +16 -7
- package/lib/ProTreeModal/index.js +12 -2
- package/lib/ProUpload/components/DragRender.js +1 -2
- package/lib/ProUpload/components/ImageRender.js +16 -6
- package/lib/ProUpload/index.js +7 -0
- package/lib/ProViewer/index.js +1 -0
- package/lib/locale/en_US.d.ts +2 -0
- package/lib/locale/en_US.js +3 -1
- package/lib/locale/zh_CN.d.ts +3 -0
- package/lib/locale/zh_CN.js +4 -1
- package/lib/old/ProCertValidity/index.js +1 -1
- package/package.json +1 -1
|
@@ -27,11 +27,14 @@ var _locale = _interopRequireDefault(require("../../locale"));
|
|
|
27
27
|
* @Author: wangshengqiang
|
|
28
28
|
* @Date: 2023-07-27 20:13:07
|
|
29
29
|
* @LastEditors: wangshengqiang
|
|
30
|
-
* @LastEditTime: 2023-11-
|
|
30
|
+
* @LastEditTime: 2023-11-29 19:33:04
|
|
31
31
|
* @Description: 图片类型
|
|
32
32
|
*
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
|
+
var isImgage = function isImgage(_fileExt) {
|
|
36
|
+
return ['.PNG', '.JPG', '.JPEG', '.GIF', '.BMP', '.JPE'].includes(_fileExt.toLocaleUpperCase());
|
|
37
|
+
};
|
|
35
38
|
/* 按钮类型 */
|
|
36
39
|
var ImageRender = function ImageRender(props) {
|
|
37
40
|
var _locale$ProUpload4;
|
|
@@ -39,6 +42,7 @@ var ImageRender = function ImageRender(props) {
|
|
|
39
42
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
40
43
|
previewImg = _useState2[0],
|
|
41
44
|
setPreviewImg = _useState2[1];
|
|
45
|
+
var proViewerRef = (0, _react.useRef)(null);
|
|
42
46
|
var isView = props.isView,
|
|
43
47
|
disabled = props.disabled,
|
|
44
48
|
headerRender = props.headerRender,
|
|
@@ -65,7 +69,13 @@ var ImageRender = function ImageRender(props) {
|
|
|
65
69
|
if (onPreview) {
|
|
66
70
|
onPreview(file);
|
|
67
71
|
} else {
|
|
68
|
-
|
|
72
|
+
var _file$url;
|
|
73
|
+
var _fileExt = (0, _FileItem.getFileExt)(file.name || (file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('?')[0]));
|
|
74
|
+
if (isImgage(_fileExt)) {
|
|
75
|
+
setPreviewImg(file);
|
|
76
|
+
} else {
|
|
77
|
+
window.open(file.url, '_blank');
|
|
78
|
+
}
|
|
69
79
|
}
|
|
70
80
|
};
|
|
71
81
|
/**
|
|
@@ -94,12 +104,12 @@ var ImageRender = function ImageRender(props) {
|
|
|
94
104
|
openFileDialogOnClick: !showDraggerSingleRender,
|
|
95
105
|
disabled: disabled || isView,
|
|
96
106
|
itemRender: function itemRender(originNode, file, fileList, actions) {
|
|
97
|
-
var _file$
|
|
107
|
+
var _file$url2, _locale$ProUpload, _locale$ProUpload2, _locale$ProUpload3;
|
|
98
108
|
var _isShowDownload = !!onDownload && file.status === 'done';
|
|
99
|
-
var _fileExt = (0, _FileItem.getFileExt)(file.name || (file === null || file === void 0 ? void 0 : (_file$
|
|
109
|
+
var _fileExt = (0, _FileItem.getFileExt)(file.name || (file === null || file === void 0 ? void 0 : (_file$url2 = file.url) === null || _file$url2 === void 0 ? void 0 : _file$url2.split('?')[0]));
|
|
100
110
|
var _fileIcon = (0, _FileItem.getFileIcon)(_fileExt);
|
|
101
|
-
var isImg =
|
|
102
|
-
var _showPreview = isImg;
|
|
111
|
+
var isImg = isImgage(_fileExt);
|
|
112
|
+
var _showPreview = isImg || file.status === 'done';
|
|
103
113
|
return (0, _jsxRuntime.jsx)(_DraggableUploadListItem.DraggableUploadListItem, {
|
|
104
114
|
file: file,
|
|
105
115
|
children: (0, _jsxRuntime.jsxs)("div", {
|
package/lib/ProUpload/index.js
CHANGED
|
@@ -22,6 +22,13 @@ var _ImageRender = _interopRequireDefault(require("./components/ImageRender"));
|
|
|
22
22
|
var _uitls = require("./uitls");
|
|
23
23
|
var _locale = _interopRequireDefault(require("../locale"));
|
|
24
24
|
var _excluded = ["value", "size", "action", "maxCount", "headerRender", "footerRender", "disabled", "uploadType", "buttonProps", "accept", "extraTipText", "beforeUpload", "onChange", "onDownload", "onPreview", "onRemove", "method", "className", "dataParams", "name", "showExampleContent", "showUploadList", "otherProps", "transformResponse", "exampleTitle", "exampleContent", "exampleModalProps", "buttonText", "afterRender", "fieldNames"];
|
|
25
|
+
/*
|
|
26
|
+
* @Author: wangshengqiang
|
|
27
|
+
* @Date: 2023-02-03 14:18:59
|
|
28
|
+
* @LastEditTime: 2023-11-14 18:32:13
|
|
29
|
+
* @LastEditors: wangshengqiang
|
|
30
|
+
* @Description: 上传控件
|
|
31
|
+
*/
|
|
25
32
|
var ProUpload = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
26
33
|
var _locale$ProUpload;
|
|
27
34
|
var _useState = (0, _react.useState)([]),
|
package/lib/ProViewer/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var _antd = require("antd");
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
var _locale = _interopRequireDefault(require("../locale"));
|
|
18
18
|
var _locale$ProViewer;
|
|
19
|
+
/* eslint-disable jsx-a11y/iframe-has-title */
|
|
19
20
|
// 用于解析word | excel
|
|
20
21
|
var officeApp = 'https://view.officeapps.live.com/op/view.aspx?src=';
|
|
21
22
|
// 文件MIME类型
|
package/lib/locale/en_US.d.ts
CHANGED
|
@@ -127,10 +127,12 @@ declare const _default: {
|
|
|
127
127
|
selectMax: string;
|
|
128
128
|
noCheck: string;
|
|
129
129
|
checkAll: string;
|
|
130
|
+
checkAll1: string;
|
|
130
131
|
check: string;
|
|
131
132
|
clearAll: string;
|
|
132
133
|
checkNumber: string;
|
|
133
134
|
noFinal: string;
|
|
135
|
+
specifyMode: string[];
|
|
134
136
|
};
|
|
135
137
|
ProTimeLimit: {
|
|
136
138
|
foreverText: string;
|
package/lib/locale/en_US.js
CHANGED
|
@@ -133,10 +133,12 @@ var _default = exports.default = {
|
|
|
133
133
|
selectMax: 'Select at most {max} items',
|
|
134
134
|
noCheck: 'None selected yet',
|
|
135
135
|
checkAll: 'Select all',
|
|
136
|
+
checkAll1: 'Select all {all}',
|
|
136
137
|
check: 'selected',
|
|
137
138
|
clearAll: 'Clear all',
|
|
138
139
|
checkNumber: '{num} items selected',
|
|
139
|
-
noFinal: 'Oops, the content you are looking for is not found.'
|
|
140
|
+
noFinal: 'Oops, the content you are looking for is not found.',
|
|
141
|
+
specifyMode: ['all', 'specify']
|
|
140
142
|
},
|
|
141
143
|
ProTimeLimit: {
|
|
142
144
|
foreverText: 'long term'
|
package/lib/locale/zh_CN.d.ts
CHANGED
|
@@ -127,9 +127,12 @@ declare const _default: {
|
|
|
127
127
|
selectMax: string;
|
|
128
128
|
noCheck: string;
|
|
129
129
|
checkAll: string;
|
|
130
|
+
checkAll1: string;
|
|
130
131
|
check: string;
|
|
131
132
|
clearAll: string;
|
|
132
133
|
checkNumber: string;
|
|
134
|
+
noFinal: string;
|
|
135
|
+
specifyMode: string[];
|
|
133
136
|
};
|
|
134
137
|
ProTimeLimit: {
|
|
135
138
|
foreverText: string;
|
package/lib/locale/zh_CN.js
CHANGED
|
@@ -133,9 +133,12 @@ var _default = exports.default = {
|
|
|
133
133
|
selectMax: '最多选择{max}个',
|
|
134
134
|
noCheck: '暂无已选',
|
|
135
135
|
checkAll: '全选',
|
|
136
|
+
checkAll1: '全部{all}',
|
|
136
137
|
check: '已选',
|
|
137
138
|
clearAll: '清空全部',
|
|
138
|
-
checkNumber: '已选择{num}项'
|
|
139
|
+
checkNumber: '已选择{num}项',
|
|
140
|
+
noFinal: '哎呀,你要找的内容没有找到。',
|
|
141
|
+
specifyMode: ['全部', '指定']
|
|
139
142
|
},
|
|
140
143
|
ProTimeLimit: {
|
|
141
144
|
foreverText: '长期'
|
|
@@ -11,7 +11,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
11
11
|
var _antd = require("antd");
|
|
12
12
|
var _moment = _interopRequireDefault(require("moment"));
|
|
13
13
|
var _react = require("react");
|
|
14
|
-
var _excluded = ["value", "onChange", "disabled", "isRange", "getPopupContainer", "showForever", "proformmode"];
|
|
14
|
+
var _excluded = ["value", "onChange", "disabled", "isRange", "getPopupContainer", "showForever", "proformmode"]; // @ts-nocheck
|
|
15
15
|
var RangePicker = _antd.DatePicker.RangePicker;
|
|
16
16
|
var defaultFormatDate = 'YYYY-MM-DD';
|
|
17
17
|
var defaultPopupContainer = function defaultPopupContainer(triggerNode) {
|