@zat-design/sisyphus-react 3.2.1 → 3.2.2-beta.2

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 (149) hide show
  1. package/dist/index.esm.css +66 -35
  2. package/es/ProDownload/utils.js +0 -2
  3. package/es/ProDrawerForm/style/index.less +59 -59
  4. package/es/ProEditTable/components/RenderField/index.js +66 -21
  5. package/es/ProEditTable/index.js +11 -4
  6. package/es/ProEditTable/propsType.d.ts +11 -1
  7. package/es/ProForm/components/base/Checkbox/index.d.ts +1 -0
  8. package/es/ProForm/components/base/Checkbox/index.js +5 -3
  9. package/es/ProForm/components/base/DatePicker/index.js +3 -2
  10. package/es/ProForm/components/base/Input/index.js +4 -2
  11. package/es/ProForm/components/base/Input/propsType.d.ts +1 -0
  12. package/es/ProForm/components/base/InputNumber/index.d.ts +1 -0
  13. package/es/ProForm/components/base/InputNumber/index.js +5 -3
  14. package/es/ProForm/components/base/ProCascader/index.js +6 -6
  15. package/es/ProForm/components/base/Radio/index.d.ts +1 -0
  16. package/es/ProForm/components/base/Radio/index.js +4 -2
  17. package/es/ProForm/components/base/RangePicker/index.d.ts +1 -0
  18. package/es/ProForm/components/base/RangePicker/index.js +5 -3
  19. package/es/ProForm/components/base/Select/index.d.ts +1 -0
  20. package/es/ProForm/components/base/Select/index.js +4 -2
  21. package/es/ProForm/components/base/Switch/index.d.ts +1 -0
  22. package/es/ProForm/components/base/Switch/index.js +4 -2
  23. package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -0
  24. package/es/ProForm/components/base/SwitchCheckbox/index.js +4 -2
  25. package/es/ProForm/components/base/TextArea/index.d.ts +1 -0
  26. package/es/ProForm/components/base/TextArea/index.js +4 -3
  27. package/es/ProForm/components/base/TimePicker/index.d.ts +1 -0
  28. package/es/ProForm/components/base/TimePicker/index.js +4 -2
  29. package/es/ProForm/components/combination/Container/index.js +7 -5
  30. package/es/ProForm/components/combination/FormList/index.js +6 -5
  31. package/es/ProForm/components/combination/FormList/style/index.less +15 -22
  32. package/es/ProForm/components/combination/Group/index.js +6 -3
  33. package/es/ProForm/components/combination/ProAddressBar/index.js +29 -30
  34. package/es/ProForm/components/combination/ProCombination/index.js +11 -11
  35. package/es/ProForm/components/combination/ProModalSelect/index.js +4 -5
  36. package/es/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
  37. package/es/ProForm/components/combination/ProNumberRange/index.d.ts +1 -1
  38. package/es/ProForm/components/combination/ProNumberRange/index.js +7 -7
  39. package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -0
  40. package/es/ProForm/components/combination/ProRangeLimit/index.js +4 -2
  41. package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
  42. package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -2
  43. package/es/ProForm/components/render/Render.js +54 -20
  44. package/es/ProForm/components/render/RenderFields.d.ts +1 -0
  45. package/es/ProForm/components/render/RenderFields.js +13 -12
  46. package/es/ProForm/index.js +5 -2
  47. package/es/ProForm/propsType.d.ts +1 -0
  48. package/es/ProForm/style/index.less +49 -42
  49. package/es/ProForm/utils/contrastOriginal.d.ts +10 -1
  50. package/es/ProForm/utils/contrastOriginal.js +15 -18
  51. package/es/ProForm/utils/useChanged.d.ts +15 -1
  52. package/es/ProForm/utils/useChanged.js +27 -8
  53. package/es/ProLayout/components/ProFooter/style/index.less +8 -7
  54. package/es/ProLayout/components/ProHeader/index.js +1 -0
  55. package/es/ProLayout/components/ProHeader/style/index.less +7 -0
  56. package/es/ProSelect/index.js +6 -3
  57. package/es/ProStep/components/Item/index.js +1 -4
  58. package/es/ProTable/components/RenderColumn/index.js +1 -1
  59. package/es/ProTable/style/index.less +6 -0
  60. package/es/ProTabs/style/index.less +16 -17
  61. package/es/ProThemeTools/component/PrdTools/index.js +21 -20
  62. package/es/ProThemeTools/index.js +2 -1
  63. package/es/ProTree/components/Tree.js +43 -42
  64. package/es/ProTree/style/index.less +0 -6
  65. package/es/ProTreeModal/index.js +14 -3
  66. package/es/ProTreeSelect/index.js +3 -2
  67. package/es/locale/en_US.d.ts +15 -1
  68. package/es/locale/en_US.js +17 -3
  69. package/es/locale/zh_CN.d.ts +15 -1
  70. package/es/locale/zh_CN.js +15 -1
  71. package/es/style/theme/antd.less +129 -117
  72. package/lib/ProDrawerForm/style/index.less +59 -59
  73. package/lib/ProEditTable/components/RenderField/index.js +61 -22
  74. package/lib/ProEditTable/index.js +12 -4
  75. package/lib/ProEditTable/propsType.d.ts +11 -1
  76. package/lib/ProForm/components/base/Checkbox/index.d.ts +1 -0
  77. package/lib/ProForm/components/base/Checkbox/index.js +5 -3
  78. package/lib/ProForm/components/base/DatePicker/index.js +3 -2
  79. package/lib/ProForm/components/base/Input/index.js +4 -2
  80. package/lib/ProForm/components/base/Input/propsType.d.ts +1 -0
  81. package/lib/ProForm/components/base/InputNumber/index.d.ts +1 -0
  82. package/lib/ProForm/components/base/InputNumber/index.js +5 -3
  83. package/lib/ProForm/components/base/ProCascader/index.js +6 -6
  84. package/lib/ProForm/components/base/Radio/index.d.ts +1 -0
  85. package/lib/ProForm/components/base/Radio/index.js +4 -2
  86. package/lib/ProForm/components/base/RangePicker/index.d.ts +1 -0
  87. package/lib/ProForm/components/base/RangePicker/index.js +6 -4
  88. package/lib/ProForm/components/base/Select/index.d.ts +1 -0
  89. package/lib/ProForm/components/base/Select/index.js +4 -2
  90. package/lib/ProForm/components/base/Switch/index.d.ts +1 -0
  91. package/lib/ProForm/components/base/Switch/index.js +4 -2
  92. package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -0
  93. package/lib/ProForm/components/base/SwitchCheckbox/index.js +4 -2
  94. package/lib/ProForm/components/base/TextArea/index.d.ts +1 -0
  95. package/lib/ProForm/components/base/TextArea/index.js +4 -3
  96. package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -0
  97. package/lib/ProForm/components/base/TimePicker/index.js +4 -2
  98. package/lib/ProForm/components/combination/Container/index.js +7 -5
  99. package/lib/ProForm/components/combination/FormList/index.js +6 -5
  100. package/lib/ProForm/components/combination/FormList/style/index.less +15 -22
  101. package/lib/ProForm/components/combination/Group/index.js +6 -3
  102. package/lib/ProForm/components/combination/ProAddressBar/index.js +29 -30
  103. package/lib/ProForm/components/combination/ProCombination/index.js +11 -11
  104. package/lib/ProForm/components/combination/ProModalSelect/index.js +4 -5
  105. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
  106. package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +1 -1
  107. package/lib/ProForm/components/combination/ProNumberRange/index.js +7 -7
  108. package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -0
  109. package/lib/ProForm/components/combination/ProRangeLimit/index.js +4 -2
  110. package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
  111. package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -2
  112. package/lib/ProForm/components/old/InputRange/index.js +1 -0
  113. package/lib/ProForm/components/old/ProCertValidity/index.js +1 -1
  114. package/lib/ProForm/components/render/Render.js +53 -22
  115. package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
  116. package/lib/ProForm/components/render/RenderFields.js +13 -12
  117. package/lib/ProForm/index.js +5 -2
  118. package/lib/ProForm/propsType.d.ts +1 -0
  119. package/lib/ProForm/style/index.less +49 -42
  120. package/lib/ProForm/utils/contrastOriginal.d.ts +10 -1
  121. package/lib/ProForm/utils/contrastOriginal.js +14 -17
  122. package/lib/ProForm/utils/useChanged.d.ts +15 -1
  123. package/lib/ProForm/utils/useChanged.js +27 -8
  124. package/lib/ProLayout/components/ProFooter/style/index.less +8 -7
  125. package/lib/ProLayout/components/ProHeader/index.js +1 -0
  126. package/lib/ProLayout/components/ProHeader/style/index.less +7 -0
  127. package/lib/ProSelect/index.js +6 -3
  128. package/lib/ProStep/components/Item/index.js +1 -4
  129. package/lib/ProTable/components/RenderColumn/index.js +1 -1
  130. package/lib/ProTable/components/TableResizable/index.js +0 -8
  131. package/lib/ProTable/style/index.less +6 -0
  132. package/lib/ProTabs/index.js +0 -1
  133. package/lib/ProTabs/style/index.less +16 -17
  134. package/lib/ProThemeTools/component/PrdTools/index.js +21 -20
  135. package/lib/ProThemeTools/index.js +2 -2
  136. package/lib/ProTree/components/Tree.js +42 -48
  137. package/lib/ProTree/index.js +1 -0
  138. package/lib/ProTree/style/index.less +0 -6
  139. package/lib/ProTreeModal/components/Tree.js +0 -1
  140. package/lib/ProTreeModal/index.js +14 -3
  141. package/lib/ProTreeSelect/index.js +3 -2
  142. package/lib/ProUpload/index.js +0 -7
  143. package/lib/locale/en_US.d.ts +15 -1
  144. package/lib/locale/en_US.js +17 -3
  145. package/lib/locale/zh_CN.d.ts +15 -1
  146. package/lib/locale/zh_CN.js +15 -1
  147. package/lib/old/ProCertValidity/index.js +1 -1
  148. package/lib/style/theme/antd.less +129 -117
  149. package/package.json +1 -1
@@ -4,6 +4,12 @@
4
4
  background-color: var(--zaui-base-bg, #ffffff);
5
5
  padding : 24px 0 0 0;
6
6
 
7
+ &.pro-header-no-back.pro-header-has-describe {
8
+ .pro-header-top {
9
+ padding-left: var(--zaui-space-size-md, 16px);
10
+ }
11
+ }
12
+
7
13
  &.pro-header-no-back {
8
14
  .pro-header-top {
9
15
  padding-left: 0;
@@ -106,6 +112,7 @@
106
112
 
107
113
  .ant-breadcrumb-link {
108
114
  font-size: var(--zaui-font-size-xl, 18px);
115
+ display : inline-flex;
109
116
  }
110
117
 
111
118
  .ant-breadcrumb-separator {
@@ -17,9 +17,10 @@ var _lodash = require("lodash");
17
17
  var _ProConfigProvider = require("../ProConfigProvider");
18
18
  var _Container = _interopRequireDefault(require("../ProForm/components/Container"));
19
19
  var _AdaptiveTooltip = _interopRequireDefault(require("./components/AdaptiveTooltip"));
20
+ var _ = require("..");
20
21
  var _locale = _interopRequireDefault(require("../locale"));
21
22
  require("./index.less");
22
- var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse"];
23
+ var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse", "isView"];
23
24
  var Option = _antd.Select.Option;
24
25
  var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
25
26
  var _locale$ProSelect;
@@ -49,11 +50,13 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
49
50
  onChange = props.onChange,
50
51
  updateDataSource = props.updateDataSource,
51
52
  transformResponse = props.transformResponse,
53
+ isViewPro = props.isView,
52
54
  selectProps = (0, _objectWithoutProperties2.default)(props, _excluded);
53
55
  var value = props.value;
54
- var _ref2 = otherProps || {},
55
- isView = _ref2.isView,
56
+ var _ref2 = _.ProForm.useFieldProps() || {},
57
+ isViewCon = _ref2.isView,
56
58
  viewEmpty = _ref2.viewEmpty;
59
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
57
60
  if (fieldNames && Object.keys(fieldNames).length) {
58
61
  code = fieldNames.value;
59
62
  label = fieldNames.label;
@@ -33,9 +33,6 @@ var _default = exports.default = function _default(_ref) {
33
33
  title: title
34
34
  }, restProps), {}, {
35
35
  children: children
36
- })) : (0, _jsxRuntime.jsx)("div", {
37
- id: id,
38
- children: children
39
- })
36
+ })) : children
40
37
  });
41
38
  };
@@ -90,6 +90,6 @@ var RenderColumn = function RenderColumn(props) {
90
90
  children: node
91
91
  }) : '-';
92
92
  }
93
- return value ? node : '-';
93
+ return value || value === 0 ? node : '-';
94
94
  };
95
95
  var _default = exports.default = RenderColumn;
@@ -15,14 +15,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
15
15
  var _index = require("../../index");
16
16
  var _utils = require("../../utils");
17
17
  var _excluded = ["onDrag", "width", "minwidth"];
18
- /*
19
- * @Author: chongyang wanchongyang@zhongan.io
20
- * @Date: 2023-02-23 17:47:46
21
- * @LastEditors: chongyang wanchongyang@zhongan.io
22
- * @LastEditTime: 2023-03-07 20:18:22
23
- * @FilePath: /za-material-warehouse/src/ProTable/TableResizable.tsx
24
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
25
- */
26
18
  var ResizableTitle = function ResizableTitle(props) {
27
19
  var _restProps$className;
28
20
  var onDrag = props.onDrag,
@@ -54,6 +54,12 @@
54
54
  }
55
55
  }
56
56
 
57
+ .ant-table-tbody {
58
+ .ant-table-cell-fix-left, .ant-table-cell-fix-right {
59
+ background: unset !important;
60
+ }
61
+ }
62
+
57
63
  .ant-table-body {
58
64
  .ant-table-cell .varied-cell {
59
65
  margin-left: -8px;
@@ -17,7 +17,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
17
17
  var _lodash = require("lodash");
18
18
  var _components = require("./components");
19
19
  var _excluded = ["style", "className", "dataSource", "onChange", "transformResponse", "useRequest", "tabSearch", "mode"];
20
- /* eslint-disable @typescript-eslint/consistent-type-assertions */
21
20
  var ProTabs = function ProTabs(props, ref) {
22
21
  var style = props.style,
23
22
  className = props.className,
@@ -1,16 +1,15 @@
1
1
  .pro-tabs {
2
2
  .ant-tabs .ant-tabs-nav-list .ant-tabs-tab {
3
- padding: 0;
3
+ padding: 0 !important;
4
4
  }
5
5
 
6
- .ant-tabs-top>.ant-tabs-nav::before,
7
- .ant-tabs-bottom>.ant-tabs-nav::before,
8
- .ant-tabs-top>div>.ant-tabs-nav::before,
9
- .ant-tabs-bottom>div>.ant-tabs-nav::before {
6
+ .ant-tabs-top > .ant-tabs-nav::before,
7
+ .ant-tabs-bottom > .ant-tabs-nav::before,
8
+ .ant-tabs-top > div > .ant-tabs-nav::before,
9
+ .ant-tabs-bottom > div > .ant-tabs-nav::before {
10
10
  border: none;
11
11
  }
12
12
 
13
-
14
13
  .ant-tabs-nav-list {
15
14
  .ant-tabs-tab {
16
15
  &:first-child {
@@ -28,30 +27,30 @@
28
27
  }
29
28
 
30
29
  .ant-tabs-ink-bar {
31
- top : 0;
30
+ top: 0;
32
31
  height: 3px !important;
33
32
  }
34
33
 
35
34
  .pro-tabs-card {
36
- width : 200px;
37
- padding : 14px 16px 14px 24px;
38
- border : 1px solid var(--zaui-line, #dddddd);
35
+ width: 200px;
36
+ padding: calc(9px * var(--zaui-size; 1)) 16px calc(9px * var(--zaui-size; 1)) 24px;
37
+ border: 1px solid var(--zaui-line, #dddddd);
39
38
  border-left: none;
40
39
 
41
40
  .pro-tabs-card-left {
42
- width : 104px;
41
+ width: 104px;
43
42
  text-shadow: none;
44
43
 
45
44
  .pro-tabs-card-left-total {
46
- font-size : var(--zaui-font-size-lg-title, 24px);
45
+ color: var(--zaui-text, #343434);
47
46
  font-weight: 600;
48
- color : var(--zaui-text, #343434);
47
+ font-size: var(--zaui-font-size-lg-title, 24px);
49
48
  }
50
49
 
51
50
  .pro-tabs-card-left-label {
52
- font-size : var(--zaui-font-size, 14px);
51
+ color: var(--aui-text, #343434);
53
52
  font-weight: 400;
54
- color : var(--aui-text, #343434);
53
+ font-size: var(--zaui-font-size, 14px);
55
54
  }
56
55
  }
57
56
 
@@ -68,9 +67,9 @@
68
67
  .pro-tabs-tab {
69
68
  .pro-tabs-card {
70
69
  .ant-tag {
70
+ margin-right: 0;
71
+ padding: 0 var(--zaui-space-size-xs, 4px);
71
72
  border-radius: 10px;
72
- padding : 0 var(--zaui-space-size-xs, 4px);
73
- margin-right : 0;
74
73
  }
75
74
 
76
75
  .ant-space-item {
@@ -12,6 +12,7 @@ var _icons = require("@ant-design/icons");
12
12
  var _antd = require("antd");
13
13
  var _react = require("react");
14
14
  var _index = require("../../utils/index");
15
+ var _locale = _interopRequireDefault(require("../../../locale"));
15
16
  var connect = function connect(Component) {
16
17
  var ComponentWrapper = function ComponentWrapper(props) {
17
18
  return (0, _jsxRuntime.jsx)(Component, (0, _objectSpread2.default)({}, props));
@@ -62,8 +63,8 @@ var PrdTools = function PrdTools(_ref) {
62
63
  }, []);
63
64
  return (0, _jsxRuntime.jsxs)(NewDrawer, {
64
65
  className: "pro-theme-prd-tools-drawer",
65
- width: 320,
66
- title: "\u5168\u5C40\u6837\u5F0F\u81EA\u5B9A\u4E49",
66
+ width: 400,
67
+ title: "".concat(_locale.default.ProThemeTools.title),
67
68
  placement: "right",
68
69
  onClose: onClose,
69
70
  open: visible,
@@ -77,7 +78,7 @@ var PrdTools = function PrdTools(_ref) {
77
78
  }), (0, _jsxRuntime.jsxs)("div", {
78
79
  className: "pro-theme-tools-space",
79
80
  children: [(0, _jsxRuntime.jsx)("p", {
80
- children: "\u4E3B\u9898\u8272"
81
+ children: "".concat(_locale.default.ProThemeTools.themeColor)
81
82
  }), (0, _jsxRuntime.jsx)("ul", {
82
83
  className: "pro-theme-color",
83
84
  children: active.map(function (item, index) {
@@ -108,7 +109,7 @@ var PrdTools = function PrdTools(_ref) {
108
109
  children: [(0, _jsxRuntime.jsx)("div", {
109
110
  className: "pro-theme-tools-item",
110
111
  children: (0, _jsxRuntime.jsx)("p", {
111
- children: "\u5E03\u5C40"
112
+ children: "".concat(_locale.default.ProThemeTools.layout)
112
113
  })
113
114
  }), (0, _jsxRuntime.jsx)("div", {
114
115
  className: "pro-theme-tools-item",
@@ -124,13 +125,13 @@ var PrdTools = function PrdTools(_ref) {
124
125
  },
125
126
  children: [(0, _jsxRuntime.jsx)(_antd.Radio.Button, {
126
127
  value: 0.5,
127
- children: "\u7D27\u51D1"
128
+ children: "".concat(_locale.default.ProThemeTools.layoutMode[0])
128
129
  }), (0, _jsxRuntime.jsx)(_antd.Radio.Button, {
129
130
  value: 1,
130
- children: "\u5E38\u89C4"
131
+ children: "".concat(_locale.default.ProThemeTools.layoutMode[1])
131
132
  }), (0, _jsxRuntime.jsx)(_antd.Radio.Button, {
132
133
  value: 1.5,
133
- children: "\u5BBD\u677E"
134
+ children: "".concat(_locale.default.ProThemeTools.layoutMode[2])
134
135
  })]
135
136
  })
136
137
  })]
@@ -139,7 +140,7 @@ var PrdTools = function PrdTools(_ref) {
139
140
  children: [(0, _jsxRuntime.jsx)("div", {
140
141
  className: "pro-theme-tools-item",
141
142
  children: (0, _jsxRuntime.jsx)("p", {
142
- children: "\u8868\u5355\u6807\u9898"
143
+ children: "".concat(_locale.default.ProThemeTools.formLabel)
143
144
  })
144
145
  }), (0, _jsxRuntime.jsx)("div", {
145
146
  className: "pro-theme-tools-item",
@@ -176,10 +177,10 @@ var PrdTools = function PrdTools(_ref) {
176
177
  },
177
178
  children: [(0, _jsxRuntime.jsx)(_antd.Radio.Button, {
178
179
  value: "left",
179
- children: "\u5DE6\u5BF9\u9F50"
180
+ children: "".concat(_locale.default.ProThemeTools.flex[0])
180
181
  }), (0, _jsxRuntime.jsx)(_antd.Radio.Button, {
181
182
  value: "right",
182
- children: "\u53F3\u5BF9\u9F50"
183
+ children: "".concat(_locale.default.ProThemeTools.flex[1])
183
184
  })]
184
185
  })
185
186
  })]
@@ -188,13 +189,13 @@ var PrdTools = function PrdTools(_ref) {
188
189
  children: [(0, _jsxRuntime.jsx)("div", {
189
190
  className: "pro-theme-tools-item",
190
191
  children: (0, _jsxRuntime.jsx)("p", {
191
- children: "\u5927\u5B57\u53F7\u6A21\u5F0F"
192
+ children: "".concat(_locale.default.ProThemeTools.bigText)
192
193
  })
193
194
  }), (0, _jsxRuntime.jsx)("div", {
194
195
  className: "pro-theme-tools-item",
195
196
  children: (0, _jsxRuntime.jsx)(_antd.Switch, {
196
- checkedChildren: "\u5F00",
197
- unCheckedChildren: "\u5173",
197
+ checkedChildren: "".concat(_locale.default.ProThemeTools.switchText[0]),
198
+ unCheckedChildren: "".concat(_locale.default.ProThemeTools.switchText[1]),
198
199
  checked: state.zauiBigText,
199
200
  onClick: function onClick(value) {
200
201
  setState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
@@ -212,13 +213,13 @@ var PrdTools = function PrdTools(_ref) {
212
213
  children: [(0, _jsxRuntime.jsx)("div", {
213
214
  className: "pro-theme-tools-item",
214
215
  children: (0, _jsxRuntime.jsx)("p", {
215
- children: "\u8868\u683C\u8FB9\u6846"
216
+ children: "".concat(_locale.default.ProThemeTools.tableBorder)
216
217
  })
217
218
  }), (0, _jsxRuntime.jsx)("div", {
218
219
  className: "pro-theme-tools-item",
219
220
  children: (0, _jsxRuntime.jsx)(_antd.Switch, {
220
- checkedChildren: "\u5F00",
221
- unCheckedChildren: "\u5173",
221
+ checkedChildren: "".concat(_locale.default.ProThemeTools.switchText[0]),
222
+ unCheckedChildren: "".concat(_locale.default.ProThemeTools.switchText[1]),
222
223
  checked: state.zauiTableBorder,
223
224
  onClick: function onClick(value) {
224
225
  setState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
@@ -235,13 +236,13 @@ var PrdTools = function PrdTools(_ref) {
235
236
  children: [(0, _jsxRuntime.jsx)("div", {
236
237
  className: "pro-theme-tools-item",
237
238
  children: (0, _jsxRuntime.jsx)("p", {
238
- children: "\u8868\u683C\u6591\u9A6C\u7EB9"
239
+ children: "".concat(_locale.default.ProThemeTools.tableStripe)
239
240
  })
240
241
  }), (0, _jsxRuntime.jsx)("div", {
241
242
  className: "pro-theme-tools-item",
242
243
  children: (0, _jsxRuntime.jsx)(_antd.Switch, {
243
- checkedChildren: "\u5F00",
244
- unCheckedChildren: "\u5173",
244
+ checkedChildren: "".concat(_locale.default.ProThemeTools.switchText[0]),
245
+ unCheckedChildren: "".concat(_locale.default.ProThemeTools.switchText[1]),
245
246
  checked: state.zauiStripe,
246
247
  onClick: function onClick(value) {
247
248
  setState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
@@ -272,7 +273,7 @@ var PrdTools = function PrdTools(_ref) {
272
273
  }]);
273
274
  onReset();
274
275
  },
275
- children: "\u91CD\u7F6E"
276
+ children: "".concat(_locale.default.ProThemeTools.reset)
276
277
  })]
277
278
  });
278
279
  };
@@ -16,8 +16,8 @@ var _react = require("react");
16
16
  var _classnames2 = _interopRequireDefault(require("classnames"));
17
17
  var _index = require("./utils/index");
18
18
  var _component = require("./component");
19
+ var _locale = _interopRequireDefault(require("../locale"));
19
20
  var _excluded = ["size", "className", "cacheTime", "color", "mode", "iconFollowTheme", "tableBorder", "tableStripe", "theme"];
20
- /* eslint-disable prefer-const */
21
21
  var defaultCacheTime = 1; // 配置保存时间为一天
22
22
  var defaultThemeConfig = {
23
23
  zauiBrand: '#006AFF',
@@ -93,7 +93,7 @@ var ProThemeTools = function ProThemeTools(_ref) {
93
93
  input.select();
94
94
  if (document.execCommand('copy')) {
95
95
  document.execCommand('copy');
96
- _antd.message.success('复制成功!');
96
+ _antd.message.success("".concat(_locale.default.ProThemeTools.copySuccess));
97
97
  }
98
98
  document.body.removeChild(input);
99
99
  };
@@ -18,13 +18,6 @@ var _SearchTitle = _interopRequireDefault(require("./SearchTitle"));
18
18
  var _utils = require("../utils");
19
19
  var _locale = _interopRequireDefault(require("../../locale"));
20
20
  var _excluded = ["checkedValues", "disabled", "searchStr", "originalTreeData", "showCodeName", "checkStrictly", "flatTreeData", "mode", "fieldNames", "tags", "onCheck", "optionRender", "treeData", "showLine", "switcherIcon", "checkable", "menu", "innerExpandKeys", "selectedKey", "disabledMode"];
21
- /*
22
- *@Date: 2023-07-25 13:49:35
23
- *@LastEditTime: 2023-07-25 13:49:35
24
- *@Author: liudongliang
25
- *@Description: 树每行节点渲染组件,复选时阻止点击事件冒泡,只有点击树节点文本会向上触发onSelect事件
26
- */
27
- /* eslint-disable no-plusplus */
28
21
  var tagsBgColors = ['rgba(0, 106, 255,0.16)', 'rgba(0, 196, 74,0.16)', 'rgba(255, 140, 0,0.16)', 'rgba(255, 80, 80,0.16)', 'rgba(97, 97, 97, 0.16)'];
29
22
  var tagsColors = ['#006AFF', '#00C44A', '#FF8C00', '#FF5050', '#616161'];
30
23
  function List(props) {
@@ -130,7 +123,7 @@ function List(props) {
130
123
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
131
124
  open = _useState2[0],
132
125
  setOpen = _useState2[1];
133
- var operateButton = menu && menu(item === null || item === void 0 ? void 0 : item.value, item);
126
+ var operateButton = menu && menu(item === null || item === void 0 ? void 0 : item[fieldNameValue], item);
134
127
  operateButton === null || operateButton === void 0 ? void 0 : operateButton.map(function (item, i) {
135
128
  return (0, _jsxRuntime.jsx)(_react.default.Fragment, {
136
129
  children: item
@@ -268,32 +261,19 @@ function List(props) {
268
261
  })]
269
262
  }, onlyKey);
270
263
  };
271
- var _treeData = (0, _react.useMemo)(function () {
272
- function fn() {
273
- var loop = function loop(data, index) {
274
- index++;
275
- var treeRow = data.map(function (item) {
276
- var nodeClass = 'pro-tree-tree-node ';
277
- var isChecked = false;
278
- if (currentClickTreeNode === item[fieldNameValue]) {
279
- nodeClass += ' checked';
280
- isChecked = true;
281
- }
282
- var title = showCodeName ? "".concat(item[fieldNameValue], "-").concat(item[fieldNameLabel]) : item[fieldNameLabel];
283
- if (item[fieldNames.children]) {
284
- return {
285
- title: (0, _jsxRuntime.jsx)(TreeNodeRow, {
286
- nodeClass: nodeClass,
287
- item: item,
288
- index: index,
289
- title: title,
290
- isChecked: isChecked,
291
- onlyKey: item[fieldNameValue]
292
- }),
293
- key: item[fieldNameValue],
294
- children: loop(item[fieldNames.children], index)
295
- };
296
- }
264
+ // const _treeData = useMemo(() => {
265
+ function fn() {
266
+ var loop = function loop(data, index) {
267
+ index++;
268
+ var treeRow = data.map(function (item) {
269
+ var nodeClass = 'pro-tree-tree-node ';
270
+ var isChecked = false;
271
+ if (currentClickTreeNode === item[fieldNameValue]) {
272
+ nodeClass += ' checked';
273
+ isChecked = true;
274
+ }
275
+ var title = showCodeName ? "".concat(item[fieldNameValue], "-").concat(item[fieldNameLabel]) : item[fieldNameLabel];
276
+ if (item[fieldNames.children]) {
297
277
  return {
298
278
  title: (0, _jsxRuntime.jsx)(TreeNodeRow, {
299
279
  nodeClass: nodeClass,
@@ -303,23 +283,37 @@ function List(props) {
303
283
  isChecked: isChecked,
304
284
  onlyKey: item[fieldNameValue]
305
285
  }),
306
- key: item[fieldNameValue]
286
+ key: item[fieldNameValue],
287
+ children: loop(item[fieldNames.children], index)
307
288
  };
308
- });
309
- return treeRow; // .filter((item) => item);
310
- };
289
+ }
290
+ return {
291
+ title: (0, _jsxRuntime.jsx)(TreeNodeRow, {
292
+ nodeClass: nodeClass,
293
+ item: item,
294
+ index: index,
295
+ title: title,
296
+ isChecked: isChecked,
297
+ onlyKey: item[fieldNameValue]
298
+ }),
299
+ key: item[fieldNameValue]
300
+ };
301
+ });
302
+ return treeRow; // .filter((item) => item);
303
+ };
311
304
 
312
- if ((other === null || other === void 0 ? void 0 : other.mode) === 'view') {
313
- return;
314
- }
315
- var newTreeData = originalTreeData;
316
- if (searchStr) {
317
- newTreeData = (0, _utils.filterCheckedNodes)(originalTreeData, [], searchStr, fieldNames);
318
- }
319
- return loop(newTreeData, -1);
305
+ if ((other === null || other === void 0 ? void 0 : other.mode) === 'view') {
306
+ return;
307
+ }
308
+ var newTreeData = originalTreeData;
309
+ if (searchStr) {
310
+ newTreeData = (0, _utils.filterCheckedNodes)(originalTreeData, [], searchStr, fieldNames);
320
311
  }
321
- return fn();
322
- }, [searchStr, expandedKeys, showCodeName, originalTreeData, currentClickTreeNode]);
312
+ return loop(newTreeData, -1);
313
+ }
314
+ // return fn();
315
+ // }, [searchStr, expandedKeys, showCodeName, originalTreeData, currentClickTreeNode]);
316
+ var _treeData = fn();
323
317
  var onExpand = function onExpand(newExpandedKeys) {
324
318
  setState({
325
319
  expandedKeys: newExpandedKeys,
@@ -16,6 +16,7 @@ var _ProTreeSelect = _interopRequireDefault(require("../ProTreeSelect"));
16
16
  *@Author: liudongliang
17
17
  *@Description: ProTree组件,集成了tree和treeSelect
18
18
  */
19
+
19
20
  var ProTreeHandle = function ProTreeHandle(props) {
20
21
  var _props$mode = props.mode,
21
22
  mode = _props$mode === void 0 ? 'tree' : _props$mode;
@@ -315,12 +315,6 @@
315
315
  }
316
316
  }
317
317
 
318
- // 中意全局样式覆盖
319
- // .pro-form.pro-form-view .ant-form-item * {
320
- // line-height: 1!important;
321
- // height: auto!important;
322
- // min-height: auto!important;
323
- // }
324
318
  // 重置ant-form view模式样式ant-tree样式
325
319
  .pro-form.pro-form-view .ant-form-item .pro-tree * {
326
320
  line-height: 1 !important;
@@ -16,7 +16,6 @@ var _SearchTitle = _interopRequireDefault(require("./SearchTitle"));
16
16
  var _CloseIcon = _interopRequireDefault(require("./CloseIcon"));
17
17
  var _utils = require("../utils");
18
18
  var _excluded = ["checkedValues", "disabled", "treeData", "searchStr", "originalTreeData", "showCodeName", "checkStrictly", "flatTreeData", "mode", "fieldNames", "tags", "onCheck", "handleFilterClose", "optionRender"];
19
- /* eslint-disable no-plusplus */
20
19
  var tagsBgColors = ['rgba(0, 106, 255,0.16)', 'rgba(0, 196, 74,0.16)', 'rgba(255, 140, 0,0.16)', 'rgba(255, 80, 80,0.16)', 'rgba(97, 97, 97, 0.16)'];
21
20
  var tagsColors = ['#006AFF', '#00C44A', '#FF8C00', '#FF5050', '#616161'];
22
21
  function List(props, ref) {
@@ -78,6 +78,7 @@ var ProTreeModal = function ProTreeModal(props) {
78
78
  var _useSetState = (0, _ahooks.useSetState)({
79
79
  open: false,
80
80
  checkedValues: [],
81
+ beforeClearAllValues: [],
81
82
  treeData: [],
82
83
  treeViewData: [],
83
84
  originalTreeData: [],
@@ -264,6 +265,7 @@ var ProTreeModal = function ProTreeModal(props) {
264
265
  }) : [];
265
266
  setState({
266
267
  checkedValues: _checkedValues,
268
+ beforeClearAllValues: state.checkedValues,
267
269
  treeViewData: [],
268
270
  checkAll: false
269
271
  });
@@ -272,9 +274,18 @@ var ProTreeModal = function ProTreeModal(props) {
272
274
  * Drawer close
273
275
  */
274
276
  var handleClose = function handleClose() {
275
- setState({
276
- open: false
277
- });
277
+ var _state$beforeClearAll;
278
+ if ((_state$beforeClearAll = state.beforeClearAllValues) === null || _state$beforeClearAll === void 0 ? void 0 : _state$beforeClearAll.length) {
279
+ setState({
280
+ open: false,
281
+ checkedValues: state.beforeClearAllValues,
282
+ beforeClearAllValues: []
283
+ });
284
+ } else {
285
+ setState({
286
+ open: false
287
+ });
288
+ }
278
289
  openChange === null || openChange === void 0 ? void 0 : openChange(false);
279
290
  };
280
291
  /**
@@ -147,9 +147,10 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
147
147
  _antd.message.error(msg);
148
148
  return;
149
149
  }
150
+ var resultData = transferDataSource(data, showCodeName);
150
151
  setState({
151
- selectList: data || [],
152
- origDataSource: data || []
152
+ selectList: resultData || [],
153
+ origDataSource: resultData || []
153
154
  });
154
155
  };
155
156
  // 配置了异步数据源,拉取枚举数据逻辑 如果有code不掉接口从local里根据code取值
@@ -21,13 +21,6 @@ var _ImageRender = _interopRequireDefault(require("./components/ImageRender"));
21
21
  var _uitls = require("./uitls");
22
22
  var _locale = _interopRequireDefault(require("../locale"));
23
23
  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"];
24
- /*
25
- * @Author: wangshengqiang
26
- * @Date: 2023-02-03 14:18:59
27
- * @LastEditTime: 2023-11-07 18:49:49
28
- * @LastEditors: wangshengqiang
29
- * @Description: 上传控件
30
- */
31
24
  var ProUpload = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
32
25
  var _locale$ProUpload;
33
26
  var _useState = (0, _react.useState)([]),
@@ -38,7 +38,6 @@ declare const _default: {
38
38
  errorMessage: string;
39
39
  defaultTitle: string;
40
40
  };
41
- ProWaterMark: {};
42
41
  ProTable: {
43
42
  noData: string;
44
43
  resetColumnWidth: string;
@@ -94,6 +93,7 @@ declare const _default: {
94
93
  save: string;
95
94
  custom: string;
96
95
  operation: string;
96
+ total: string;
97
97
  onlyOneLineMsg: string;
98
98
  deletePoConfirmMsg: string;
99
99
  mulDeletePoConfirmMsg: string;
@@ -134,5 +134,19 @@ declare const _default: {
134
134
  ProTimeLimit: {
135
135
  foreverText: string;
136
136
  };
137
+ ProThemeTools: {
138
+ title: string;
139
+ copySuccess: string;
140
+ layout: string;
141
+ layoutMode: string[];
142
+ themeColor: string;
143
+ formLabel: string;
144
+ bigText: string;
145
+ flex: string[];
146
+ switchText: string[];
147
+ tableBorder: string;
148
+ tableStripe: string;
149
+ reset: string;
150
+ };
137
151
  };
138
152
  export default _default;
@@ -44,7 +44,6 @@ var _default = exports.default = {
44
44
  errorMessage: 'The configuration config for ProAction must be data',
45
45
  defaultTitle: 'Are you sure delete it?'
46
46
  },
47
- ProWaterMark: {},
48
47
  ProTable: {
49
48
  noData: 'No data',
50
49
  resetColumnWidth: 'Reset column width',
@@ -100,6 +99,7 @@ var _default = exports.default = {
100
99
  save: 'Save',
101
100
  custom: 'Custom',
102
101
  operation: 'Operation',
102
+ total: '{total} items in total',
103
103
  onlyOneLineMsg: 'Please save the data first',
104
104
  deletePoConfirmMsg: 'Are you sure you want to delete this row of data?',
105
105
  mulDeletePoConfirmMsg: 'Are you sure you want to delete the selected data?'
@@ -126,12 +126,12 @@ var _default = exports.default = {
126
126
  ProTreeModal: {
127
127
  checkMsg: 'Please check first',
128
128
  select: 'Please select',
129
- input: 'please enter',
129
+ input: 'Please enter',
130
130
  errorArrayMessage: 'Please return a valid array',
131
131
  selectMin: 'Select at least {min}',
132
132
  selectMax: 'Select at most {max} items',
133
133
  noCheck: 'None selected yet',
134
- checkAll: 'select all',
134
+ checkAll: 'Select all',
135
135
  check: 'selected',
136
136
  clearAll: 'Clear all',
137
137
  checkNumber: '{num} items selected',
@@ -139,5 +139,19 @@ var _default = exports.default = {
139
139
  },
140
140
  ProTimeLimit: {
141
141
  foreverText: 'long term'
142
+ },
143
+ ProThemeTools: {
144
+ title: 'Global style customization ',
145
+ copySuccess: 'Copy success! ',
146
+ layout: 'Layout',
147
+ layoutMode: ['Compact ', 'Regular', 'Loose'],
148
+ themeColor: 'Theme color',
149
+ formLabel: 'Form label',
150
+ bigText: 'Large text mode',
151
+ flex: ['Left align ', 'Right align'],
152
+ switchText: ['on', 'off'],
153
+ tableBorder: 'Table border',
154
+ tableStripe: 'Table zebra',
155
+ reset: 'Reset'
142
156
  }
143
157
  };