@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.
Files changed (85) hide show
  1. package/dist/index.esm.css +35 -9
  2. package/es/ProDownload/utils.js +2 -0
  3. package/es/ProEditTable/components/RenderField/index.js +7 -6
  4. package/es/ProEditTable/index.js +19 -1
  5. package/es/ProEditTable/style/index.less +5 -0
  6. package/es/ProEnum/hooks/useEnumRequest.js +13 -1
  7. package/es/ProForm/components/combination/Group/index.js +3 -4
  8. package/es/ProForm/components/combination/Group/style/index.less +38 -21
  9. package/es/ProForm/components/combination/Group/utils.d.ts +0 -2
  10. package/es/ProForm/components/combination/Group/utils.js +0 -13
  11. package/es/ProForm/components/combination/ProModalSelect/index.js +2 -2
  12. package/es/ProForm/components/render/Render.js +15 -9
  13. package/es/ProForm/components/render/RenderFields.js +2 -1
  14. package/es/ProForm/style/index.less +5 -4
  15. package/es/ProForm/utils/contrastOriginal.d.ts +0 -1
  16. package/es/ProForm/utils/contrastOriginal.js +0 -1
  17. package/es/ProForm/utils/useChanged.d.ts +7 -14
  18. package/es/ProForm/utils/useChanged.js +13 -20
  19. package/es/ProForm/utils/useListChanged.d.ts +16 -0
  20. package/es/ProForm/utils/useListChanged.js +81 -0
  21. package/es/ProForm/utils/useShouldUpdate.js +17 -3
  22. package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +13 -5
  23. package/es/ProLayout/components/Layout/Menu/index.js +13 -10
  24. package/es/ProLayout/components/ProCollapse/index.js +2 -0
  25. package/es/ProLayout/components/ProCollapse/style/index.less +49 -39
  26. package/es/ProLayout/propTypes.d.ts +2 -0
  27. package/es/ProTable/style/index.less +1 -0
  28. package/es/ProTooltip/index.js +5 -3
  29. package/es/ProTreeModal/components/Trigger.d.ts +1 -0
  30. package/es/ProTreeModal/components/Trigger.js +17 -8
  31. package/es/ProTreeModal/index.js +12 -2
  32. package/es/ProUpload/components/DragRender.js +1 -2
  33. package/es/ProUpload/components/ImageRender.js +17 -7
  34. package/es/locale/en_US.d.ts +2 -0
  35. package/es/locale/en_US.js +3 -1
  36. package/es/locale/zh_CN.d.ts +3 -0
  37. package/es/locale/zh_CN.js +4 -1
  38. package/lib/ProEditTable/components/RenderField/index.js +9 -6
  39. package/lib/ProEditTable/index.js +18 -0
  40. package/lib/ProEditTable/style/index.less +5 -0
  41. package/lib/ProEnum/hooks/useEnumRequest.js +13 -1
  42. package/lib/ProForm/components/base/RangePicker/index.js +1 -1
  43. package/lib/ProForm/components/combination/Group/index.js +2 -3
  44. package/lib/ProForm/components/combination/Group/style/index.less +38 -21
  45. package/lib/ProForm/components/combination/Group/utils.d.ts +0 -2
  46. package/lib/ProForm/components/combination/Group/utils.js +1 -14
  47. package/lib/ProForm/components/combination/ProModalSelect/index.js +1 -1
  48. package/lib/ProForm/components/old/InputRange/index.js +0 -1
  49. package/lib/ProForm/components/old/ProCertValidity/index.js +1 -1
  50. package/lib/ProForm/components/render/Render.js +16 -9
  51. package/lib/ProForm/components/render/RenderFields.js +2 -1
  52. package/lib/ProForm/style/index.less +5 -4
  53. package/lib/ProForm/utils/contrastOriginal.d.ts +0 -1
  54. package/lib/ProForm/utils/contrastOriginal.js +0 -1
  55. package/lib/ProForm/utils/useChanged.d.ts +7 -14
  56. package/lib/ProForm/utils/useChanged.js +13 -20
  57. package/lib/ProForm/utils/useListChanged.d.ts +16 -0
  58. package/lib/ProForm/utils/useListChanged.js +86 -0
  59. package/lib/ProForm/utils/useShouldUpdate.js +17 -3
  60. package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +13 -5
  61. package/lib/ProLayout/components/Layout/Menu/index.js +13 -10
  62. package/lib/ProLayout/components/ProCollapse/index.js +2 -0
  63. package/lib/ProLayout/components/ProCollapse/style/index.less +49 -39
  64. package/lib/ProLayout/propTypes.d.ts +2 -0
  65. package/lib/ProTable/components/TableResizable/index.js +8 -0
  66. package/lib/ProTable/style/index.less +1 -0
  67. package/lib/ProTabs/index.js +1 -0
  68. package/lib/ProThemeTools/index.js +1 -0
  69. package/lib/ProTooltip/index.js +4 -2
  70. package/lib/ProTree/components/Tree.js +7 -0
  71. package/lib/ProTree/index.js +0 -1
  72. package/lib/ProTreeModal/components/Tree.js +1 -0
  73. package/lib/ProTreeModal/components/Trigger.d.ts +1 -0
  74. package/lib/ProTreeModal/components/Trigger.js +16 -7
  75. package/lib/ProTreeModal/index.js +12 -2
  76. package/lib/ProUpload/components/DragRender.js +1 -2
  77. package/lib/ProUpload/components/ImageRender.js +16 -6
  78. package/lib/ProUpload/index.js +7 -0
  79. package/lib/ProViewer/index.js +1 -0
  80. package/lib/locale/en_US.d.ts +2 -0
  81. package/lib/locale/en_US.js +3 -1
  82. package/lib/locale/zh_CN.d.ts +3 -0
  83. package/lib/locale/zh_CN.js +4 -1
  84. package/lib/old/ProCertValidity/index.js +1 -1
  85. 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-21 15:24:56
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
- setPreviewImg(file);
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$url, _locale$ProUpload, _locale$ProUpload2, _locale$ProUpload3;
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$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('?')[0]));
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 = ['.PNG', '.JPG', '.JPEG', '.GIF', '.BMP', '.JPE'].includes(_fileExt.toLocaleUpperCase());
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", {
@@ -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)([]),
@@ -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类型
@@ -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;
@@ -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'
@@ -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;
@@ -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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.3.1",
3
+ "version": "3.3.2-beta.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",