@zat-design/sisyphus-react 3.1.5 → 3.2.0-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 (256) hide show
  1. package/dist/index.esm.css +190 -265
  2. package/es/ProAction/index.js +7 -5
  3. package/es/ProAction/index.less +3 -2
  4. package/es/ProConfigProvider/index.d.ts +2 -0
  5. package/es/ProConfigProvider/index.js +23 -2
  6. package/es/ProDownload/utils.js +6 -3
  7. package/es/ProDrawerForm/components/ProDrawer/index.js +6 -4
  8. package/es/ProDrawerForm/index.js +5 -3
  9. package/es/ProDrawerForm/style/index.less +15 -11
  10. package/es/ProEditLabel/style/index.less +2 -2
  11. package/es/ProEditTable/components/ActionButton/index.js +3 -2
  12. package/es/ProEditTable/components/RenderField/index.js +2 -1
  13. package/es/ProEditTable/index.js +7 -6
  14. package/es/ProEditTable/style/index.less +15 -8
  15. package/es/ProEditTable/utils/config.d.ts +8 -8
  16. package/es/ProEditTable/utils/config.js +20 -12
  17. package/es/ProEditTable/utils/index.js +3 -2
  18. package/es/ProEnum/hooks/useEnumRequest.js +17 -10
  19. package/es/ProEnum/index.js +9 -4
  20. package/es/ProEnum/style/index.less +1 -1
  21. package/es/ProForm/components/FormFooter/index.js +16 -20
  22. package/es/ProForm/components/base/Input/index.js +4 -3
  23. package/es/ProForm/components/base/InputNumber/index.js +4 -3
  24. package/es/ProForm/components/base/RangePicker/index.js +0 -3
  25. package/es/ProForm/components/base/Select/index.js +2 -1
  26. package/es/ProForm/components/base/Switch/index.js +9 -5
  27. package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -1
  28. package/es/ProForm/components/base/TextArea/index.js +4 -2
  29. package/es/ProForm/components/base/TextArea/index.less +1 -1
  30. package/es/ProForm/components/combination/Container/style/index.less +0 -1
  31. package/es/ProForm/components/combination/FormList/components/ActionButton.js +13 -17
  32. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +2 -1
  33. package/es/ProForm/components/combination/FormList/style/index.less +20 -19
  34. package/es/ProForm/components/combination/Group/index.js +2 -2
  35. package/es/ProForm/components/combination/ProAddressBar/index.js +83 -63
  36. package/es/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
  37. package/es/ProForm/components/combination/ProModalSelect/index.js +76 -15
  38. package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
  39. package/es/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
  40. package/es/ProForm/components/combination/ProNumberRange/index.js +3 -2
  41. package/es/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
  42. package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
  43. package/es/ProForm/components/combination/ProRangeLimit/index.js +3 -7
  44. package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
  45. package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -11
  46. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +18 -1
  47. package/es/ProForm/components/old/EnumSelect/style/index.less +7 -8
  48. package/es/ProForm/components/render/Render.js +4 -2
  49. package/es/ProForm/components/render/RenderFields.js +10 -6
  50. package/es/ProForm/components/render/propsType.d.ts +5 -4
  51. package/es/ProForm/index.js +14 -2
  52. package/es/ProForm/style/index.less +76 -168
  53. package/es/ProForm/utils/index.d.ts +1 -1
  54. package/es/ProForm/utils/index.js +7 -2
  55. package/es/ProForm/utils/rulesCreator.js +2 -1
  56. package/es/ProForm/utils/useRules.js +4 -3
  57. package/es/ProForm/utils/useShouldUpdate.js +16 -16
  58. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +6 -0
  59. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +7 -8
  60. package/es/ProLayout/components/Layout/Notice/index.js +3 -2
  61. package/es/ProLayout/components/ProCollapse/style/index.less +4 -4
  62. package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -1
  63. package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +2 -1
  64. package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
  65. package/es/ProLayout/components/ProHeader/components/index.d.ts +1 -0
  66. package/es/ProLayout/components/ProHeader/components/index.js +2 -1
  67. package/es/ProLayout/components/ProHeader/index.js +9 -6
  68. package/es/ProLayout/components/ProHeader/style/index.less +16 -7
  69. package/es/ProLayout/utils/index.js +1 -1
  70. package/es/ProSelect/index.d.ts +3 -3
  71. package/es/ProSelect/index.js +4 -2
  72. package/es/ProStep/components/Step/index.js +3 -1
  73. package/es/ProStep/style/index.less +0 -1
  74. package/es/ProTable/components/RenderColumn/index.d.ts +5 -5
  75. package/es/ProTable/components/RenderColumn/index.js +41 -25
  76. package/es/ProTable/index.js +10 -8
  77. package/es/ProTable/propsType.d.ts +2 -0
  78. package/es/ProTable/style/index.less +14 -1
  79. package/es/ProTable/useAntdTable.d.ts +12 -4
  80. package/es/ProTable/useAntdTable.js +18 -6
  81. package/es/ProTable/utils.d.ts +1 -1
  82. package/es/ProTable/utils.js +258 -201
  83. package/es/ProTabs/style/index.less +1 -1
  84. package/es/ProThemeTools/component/PrdTools/index.js +1 -1
  85. package/es/ProThemeTools/component/PrdTools/style/index.less +3 -3
  86. package/es/ProThemeTools/index.d.ts +2 -2
  87. package/es/ProThemeTools/index.js +24 -17
  88. package/es/ProThemeTools/propsType.d.ts +8 -6
  89. package/es/ProThemeTools/style/index.less +2 -2
  90. package/es/ProThemeTools/utils/index.d.ts +7 -0
  91. package/es/ProThemeTools/utils/index.js +19 -1
  92. package/es/ProTree/components/ProTree.js +6 -5
  93. package/es/ProTree/components/SearchTitle.d.ts +2 -2
  94. package/es/ProTree/components/SearchTitle.js +11 -1
  95. package/es/ProTree/components/Tree.js +9 -2
  96. package/es/ProTree/style/index.less +194 -142
  97. package/es/ProTreeModal/components/List.js +0 -14
  98. package/es/ProTreeModal/components/Trigger.js +9 -3
  99. package/es/ProTreeModal/index.js +29 -13
  100. package/es/ProTreeModal/style/index.less +15 -19
  101. package/es/ProUpload/components/ButtonRender.js +5 -2
  102. package/es/ProUpload/components/DragRender.js +8 -8
  103. package/es/ProUpload/components/Example.js +3 -1
  104. package/es/ProUpload/components/ImageRender.js +8 -6
  105. package/es/ProUpload/index.js +8 -6
  106. package/es/ProUpload/style/index.less +41 -39
  107. package/es/index.d.ts +2 -1
  108. package/es/index.js +2 -1
  109. package/es/locale/en_US.d.ts +138 -0
  110. package/es/locale/en_US.js +137 -0
  111. package/es/locale/index.d.ts +13 -0
  112. package/es/locale/index.js +32 -0
  113. package/es/locale/zh_CN.d.ts +137 -0
  114. package/es/locale/zh_CN.js +136 -0
  115. package/es/old/ProEditableTable/style/index.less +1 -2
  116. package/es/style/components.less +0 -1
  117. package/es/style/core/normalize.less +1 -2
  118. package/es/style/theme/antd.less +3 -4
  119. package/es/style/theme/index.less +80 -79
  120. package/es/style/theme/tokens.less +1 -0
  121. package/lib/ProAction/index.js +7 -5
  122. package/lib/ProAction/index.less +3 -2
  123. package/lib/ProConfigProvider/index.d.ts +2 -0
  124. package/lib/ProConfigProvider/index.js +22 -2
  125. package/lib/ProDownload/utils.js +4 -3
  126. package/lib/ProDrawerForm/components/ProDrawer/index.js +6 -4
  127. package/lib/ProDrawerForm/index.js +5 -3
  128. package/lib/ProDrawerForm/style/index.less +15 -11
  129. package/lib/ProEditLabel/style/index.less +2 -2
  130. package/lib/ProEditTable/components/ActionButton/index.js +3 -2
  131. package/lib/ProEditTable/components/RenderField/index.js +4 -1
  132. package/lib/ProEditTable/index.js +7 -6
  133. package/lib/ProEditTable/style/index.less +15 -8
  134. package/lib/ProEditTable/utils/config.d.ts +8 -8
  135. package/lib/ProEditTable/utils/config.js +20 -12
  136. package/lib/ProEditTable/utils/index.js +3 -2
  137. package/lib/ProEnum/hooks/useEnumRequest.js +17 -10
  138. package/lib/ProEnum/index.js +9 -4
  139. package/lib/ProEnum/style/index.less +1 -1
  140. package/lib/ProForm/components/FormFooter/index.js +16 -19
  141. package/lib/ProForm/components/base/Input/index.js +4 -3
  142. package/lib/ProForm/components/base/InputNumber/index.js +4 -3
  143. package/lib/ProForm/components/base/RangePicker/index.js +1 -4
  144. package/lib/ProForm/components/base/Select/index.js +2 -1
  145. package/lib/ProForm/components/base/Switch/index.js +8 -5
  146. package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -1
  147. package/lib/ProForm/components/base/TextArea/index.js +4 -2
  148. package/lib/ProForm/components/base/TextArea/index.less +1 -1
  149. package/lib/ProForm/components/combination/Container/style/index.less +0 -1
  150. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +13 -17
  151. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +2 -1
  152. package/lib/ProForm/components/combination/FormList/style/index.less +20 -19
  153. package/lib/ProForm/components/combination/Group/index.js +2 -2
  154. package/lib/ProForm/components/combination/ProAddressBar/index.js +78 -60
  155. package/lib/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
  156. package/lib/ProForm/components/combination/ProModalSelect/index.js +76 -15
  157. package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
  158. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
  159. package/lib/ProForm/components/combination/ProNumberRange/index.js +3 -2
  160. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
  161. package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
  162. package/lib/ProForm/components/combination/ProRangeLimit/index.js +3 -7
  163. package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
  164. package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -11
  165. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +18 -1
  166. package/lib/ProForm/components/old/EnumSelect/style/index.less +7 -8
  167. package/lib/ProForm/components/old/InputRange/index.js +0 -1
  168. package/lib/ProForm/components/old/ProCertValidity/index.js +1 -1
  169. package/lib/ProForm/components/render/Render.js +5 -2
  170. package/lib/ProForm/components/render/RenderFields.js +9 -5
  171. package/lib/ProForm/components/render/propsType.d.ts +5 -4
  172. package/lib/ProForm/index.js +14 -2
  173. package/lib/ProForm/style/index.less +76 -168
  174. package/lib/ProForm/utils/index.d.ts +1 -1
  175. package/lib/ProForm/utils/index.js +7 -2
  176. package/lib/ProForm/utils/rulesCreator.js +2 -1
  177. package/lib/ProForm/utils/useRules.js +4 -3
  178. package/lib/ProForm/utils/useShouldUpdate.js +16 -16
  179. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +6 -0
  180. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +7 -8
  181. package/lib/ProLayout/components/Layout/Notice/index.js +3 -2
  182. package/lib/ProLayout/components/ProCollapse/style/index.less +4 -4
  183. package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -1
  184. package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +3 -1
  185. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
  186. package/lib/ProLayout/components/ProHeader/components/index.d.ts +1 -0
  187. package/lib/ProLayout/components/ProHeader/components/index.js +8 -1
  188. package/lib/ProLayout/components/ProHeader/index.js +9 -6
  189. package/lib/ProLayout/components/ProHeader/style/index.less +16 -7
  190. package/lib/ProLayout/utils/index.js +1 -1
  191. package/lib/ProSelect/index.d.ts +3 -3
  192. package/lib/ProSelect/index.js +4 -2
  193. package/lib/ProStep/components/Step/index.js +3 -1
  194. package/lib/ProStep/style/index.less +0 -1
  195. package/lib/ProTable/components/RenderColumn/index.d.ts +5 -5
  196. package/lib/ProTable/components/RenderColumn/index.js +38 -24
  197. package/lib/ProTable/components/TableResizable/index.js +8 -0
  198. package/lib/ProTable/index.js +10 -8
  199. package/lib/ProTable/propsType.d.ts +2 -0
  200. package/lib/ProTable/style/index.less +14 -1
  201. package/lib/ProTable/useAntdTable.d.ts +12 -4
  202. package/lib/ProTable/useAntdTable.js +19 -6
  203. package/lib/ProTable/utils.d.ts +1 -1
  204. package/lib/ProTable/utils.js +258 -201
  205. package/lib/ProTabs/index.js +1 -0
  206. package/lib/ProTabs/style/index.less +1 -1
  207. package/lib/ProThemeTools/component/PrdTools/index.js +1 -1
  208. package/lib/ProThemeTools/component/PrdTools/style/index.less +3 -3
  209. package/lib/ProThemeTools/index.d.ts +2 -2
  210. package/lib/ProThemeTools/index.js +24 -16
  211. package/lib/ProThemeTools/propsType.d.ts +8 -6
  212. package/lib/ProThemeTools/style/index.less +2 -2
  213. package/lib/ProThemeTools/utils/index.d.ts +7 -0
  214. package/lib/ProThemeTools/utils/index.js +20 -2
  215. package/lib/ProTree/components/ProTree.js +6 -5
  216. package/lib/ProTree/components/SearchTitle.d.ts +2 -2
  217. package/lib/ProTree/components/SearchTitle.js +11 -1
  218. package/lib/ProTree/components/Tree.js +16 -2
  219. package/lib/ProTree/index.js +0 -1
  220. package/lib/ProTree/style/index.less +194 -142
  221. package/lib/ProTreeModal/components/List.js +0 -14
  222. package/lib/ProTreeModal/components/Tree.js +1 -0
  223. package/lib/ProTreeModal/components/Trigger.js +10 -3
  224. package/lib/ProTreeModal/index.js +29 -13
  225. package/lib/ProTreeModal/style/index.less +15 -19
  226. package/lib/ProUpload/components/ButtonRender.js +5 -2
  227. package/lib/ProUpload/components/DragRender.js +8 -8
  228. package/lib/ProUpload/components/Example.js +3 -1
  229. package/lib/ProUpload/components/ImageRender.js +8 -6
  230. package/lib/ProUpload/index.js +14 -5
  231. package/lib/ProUpload/style/index.less +41 -39
  232. package/lib/index.d.ts +2 -1
  233. package/lib/index.js +13 -1
  234. package/lib/locale/en_US.d.ts +138 -0
  235. package/lib/locale/en_US.js +143 -0
  236. package/lib/locale/index.d.ts +13 -0
  237. package/lib/locale/index.js +41 -0
  238. package/lib/locale/zh_CN.d.ts +137 -0
  239. package/lib/locale/zh_CN.js +142 -0
  240. package/lib/old/ProCertValidity/index.js +1 -1
  241. package/lib/old/ProEditableTable/style/index.less +1 -2
  242. package/lib/style/components.less +0 -1
  243. package/lib/style/core/normalize.less +1 -2
  244. package/lib/style/theme/antd.less +3 -4
  245. package/lib/style/theme/index.less +80 -79
  246. package/lib/style/theme/tokens.less +1 -0
  247. package/package.json +1 -1
  248. package/typings.d.ts +2 -0
  249. package/es/old/ProBackBtn/style/index.less +0 -19
  250. package/lib/old/ProBackBtn/style/index.less +0 -19
  251. /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
  252. /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
  253. /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
  254. /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
  255. /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
  256. /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
@@ -4,16 +4,16 @@ import { useRef, useState } from 'react';
4
4
  import { isFunction, isEqualWith } from 'lodash';
5
5
  import { customEqualForFun } from './index';
6
6
  // 代理shouldUpdate事件, 执行函数值的[show, disabled], 当[show, disabled]与上一次值不相同时更新状态
7
- var useShouldUpdate = function useShouldUpdate(_ref) {
8
- var show = _ref.show,
9
- formItemProps = _ref.formItemProps,
10
- form = _ref.form,
11
- disabled = _ref.disabled,
12
- rules = _ref.rules,
13
- required = _ref.required,
14
- fieldProps = _ref.fieldProps,
15
- component = _ref.component,
16
- originComponent = _ref.originComponent;
7
+ var useShouldUpdate = function useShouldUpdate(props) {
8
+ var show = props.show,
9
+ formItemProps = props.formItemProps,
10
+ form = props.form,
11
+ disabled = props.disabled,
12
+ rules = props.rules,
13
+ required = props.required,
14
+ fieldProps = props.fieldProps,
15
+ component = props.component,
16
+ originComponent = props.originComponent;
17
17
  var _shouldUpdate = formItemProps.shouldUpdate,
18
18
  name = formItemProps.name,
19
19
  clearNotShow = formItemProps.clearNotShow,
@@ -32,12 +32,6 @@ var useShouldUpdate = function useShouldUpdate(_ref) {
32
32
  _useState2 = _slicedToArray(_useState, 2),
33
33
  reRender = _useState2[1];
34
34
  var values = {};
35
- if (namePath) {
36
- // formList场景values取当前行数据
37
- values = form.getFieldValue(namePath) || {};
38
- } else {
39
- values = form.getFieldsValue(true);
40
- }
41
35
  // 不是动态函数直接返回
42
36
  if (!isFunction(show) && !isFunction(disabled) && !isFunction(required) && !isFunction(rules) && !isFunction(fieldProps) && !isFunction(originComponent)) {
43
37
  return {
@@ -50,6 +44,12 @@ var useShouldUpdate = function useShouldUpdate(_ref) {
50
44
  component: newComponent
51
45
  };
52
46
  }
47
+ if (namePath) {
48
+ // formList场景values取当前行数据
49
+ values = form.getFieldValue(namePath) || {};
50
+ } else {
51
+ values = form.getFieldsValue(true);
52
+ }
53
53
  if (isFunction(show)) {
54
54
  showRef.current = Boolean(show(values, {
55
55
  form: form,
@@ -122,6 +122,12 @@ var OpenMenu = function OpenMenu(props) {
122
122
  });
123
123
  }
124
124
  }, [sideMenu]);
125
+ useEffect(function () {
126
+ // 同步路由,解决进入详情页后router没有变化,点击相同router菜单无效问题
127
+ setState({
128
+ router: window.location.pathname
129
+ });
130
+ }, [window.location.pathname]);
125
131
  useEffect(function () {
126
132
  // 路由变更,且不再demo文档中
127
133
  if (router && !window.location.href.includes('~demos/prolayout')) {
@@ -24,7 +24,7 @@
24
24
  &>.ant-menu-item-only-child {
25
25
  min-height : 48px;
26
26
  padding-top : 12px;
27
- padding-bottom: 12px;
27
+ padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1) - var(--zaui-space-size-xs; 4px) * var(--zaui-size; 1));
28
28
  margin : 0;
29
29
  height : auto;
30
30
 
@@ -89,13 +89,12 @@
89
89
 
90
90
  .ant-menu-sub.ant-menu-inline>.ant-menu-item,
91
91
  .ant-menu-submenu-title {
92
- white-space : pre-wrap;
93
- line-height : initial !important;
94
- height : auto !important;
95
- margin : 0;
96
- padding-top : 12px;
97
- padding-bottom: 12px;
98
- min-height : 48px;
92
+ white-space: pre-wrap;
93
+ line-height: initial !important;
94
+ height : auto !important;
95
+ margin : 0;
96
+ padding-top: 12px 0;
97
+ min-height : 48px;
99
98
  }
100
99
 
101
100
  .ant-menu-title-content {
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import tipMsg from '../../../images/tipMsg.png';
3
3
  import close from '../../../images/close.png';
4
+ import locale from '../../../../locale';
4
5
  var Notice = function Notice(props) {
5
6
  var headerHeight = props.headerHeight,
6
7
  notice = props.notice,
@@ -15,13 +16,13 @@ var Notice = function Notice(props) {
15
16
  },
16
17
  children: [_jsx("img", {
17
18
  src: tipMsg,
18
- alt: "\u63D0\u793A"
19
+ alt: "".concat(locale.ProLayout.tipAlt)
19
20
  }), " ", notice, _jsx("span", {
20
21
  className: "pro-layout-header-notice-close",
21
22
  onClick: onCancel,
22
23
  children: _jsx("img", {
23
24
  src: close,
24
- alt: "\u5173\u95ED"
25
+ alt: "".concat(locale.ProLayout.closeAlt)
25
26
  })
26
27
  })]
27
28
  });
@@ -9,13 +9,13 @@
9
9
 
10
10
  &.ant-collapse {
11
11
  .pro-collapse-panel {
12
- margin-bottom: var(--zaui-space-size-md, 16px);
12
+ margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
13
13
  }
14
14
  }
15
15
 
16
16
  .ant-collapse-header {
17
17
  align-items: center !important;
18
- padding : 14px var(--zaui-space-size-md, 16px) !important;
18
+ padding : 12px var(--zaui-space-size-md, 16px) !important;
19
19
  background : var(--zaui-area, #fafafa);
20
20
  }
21
21
 
@@ -49,7 +49,7 @@
49
49
  background : var(--zaui-base-bg, #ffffff);
50
50
 
51
51
  .ant-collapse-header {
52
- margin-bottom: var(--zaui-space-size-md, 16px);
52
+ margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
53
53
  padding : 0 !important;
54
54
  background : var(--zaui-base-bg, #ffffff);
55
55
 
@@ -154,7 +154,7 @@
154
154
  }
155
155
 
156
156
  .ant-descriptions {
157
- margin-bottom: var(--zaui-space-size-md, 16px);
157
+ margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
158
158
  }
159
159
  }
160
160
  }
@@ -4,6 +4,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { ReactSVG } from 'react-svg';
5
5
  import { CheckOutlined } from '@ant-design/icons';
6
6
  import copySvg from '../../../../../assets/copy.svg';
7
+ import locale from '../../../../../locale';
7
8
  var Paragraph = _Typography.Paragraph;
8
9
  var Copy = function Copy(_ref) {
9
10
  var text = _ref.text;
@@ -15,7 +16,7 @@ var Copy = function Copy(_ref) {
15
16
  className: "drag-icon",
16
17
  src: copySvg
17
18
  }, "copy-icon"), _jsx(CheckOutlined, {}, "copied-icon")],
18
- tooltips: ['复制', '复制成功']
19
+ tooltips: ["".concat(locale.ProHeader.copyTooltips[0]), "".concat(locale.ProHeader.copyTooltips[1])]
19
20
  }
20
21
  });
21
22
  };
@@ -2,6 +2,7 @@ import "antd/es/button/style";
2
2
  import _Button from "antd/es/button";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { ArrowLeftOutlined } from '@ant-design/icons';
5
+ import locale from '../../../../../locale';
5
6
  /**
6
7
  * 页面返回按钮
7
8
  * @param onBack 自定义返回方法
@@ -10,7 +11,7 @@ import { ArrowLeftOutlined } from '@ant-design/icons';
10
11
  var ProBackBtn = function ProBackBtn(_ref) {
11
12
  var onBack = _ref.onBack,
12
13
  _ref$text = _ref.text,
13
- text = _ref$text === void 0 ? '返回' : _ref$text;
14
+ text = _ref$text === void 0 ? "".concat(locale.ProHeader.backText) : _ref$text;
14
15
  var handleClick = function handleClick() {
15
16
  if (onBack) {
16
17
  onBack();
@@ -0,0 +1,21 @@
1
+ .back-button-container {
2
+ &.ant-btn {
3
+ color : var(--zaui-text);
4
+ font-weight: 400;
5
+ background : var(--zaui-disabled-bg);
6
+ border : none;
7
+
8
+ &:hover {
9
+ color : var(--zaui-aide-text);
10
+ background: var(--zaui-disabled-bg);
11
+ border : none;
12
+ }
13
+
14
+ &:active,
15
+ &:focus {
16
+ color : var(--zaui-text);
17
+ font-weight: 400;
18
+ background : var(--zaui-disabled-bg);
19
+ }
20
+ }
21
+ }
@@ -1 +1,2 @@
1
1
  export { default as Copy } from './Copy';
2
+ export { default as ProBackBtn } from './ProBackBtn';
@@ -1 +1,2 @@
1
- export { default as Copy } from './Copy';
1
+ export { default as Copy } from './Copy';
2
+ export { default as ProBackBtn } from './ProBackBtn';
@@ -22,9 +22,9 @@ import { useToggle } from 'ahooks';
22
22
  import { isFunction, isEmpty, isNumber, isString } from 'lodash';
23
23
  import { ReactSVG } from 'react-svg';
24
24
  import foldSvg from '../../../assets/arrow.svg';
25
- import { Copy } from './components';
25
+ import { Copy, ProBackBtn } from './components';
26
26
  import getEnumLabel from '../../../ProEnum/utils/getEnumLabel';
27
- import { ProBackBtn } from '../../../index';
27
+ import locale from '../../../locale';
28
28
  var formatAmount = tools.formatAmount;
29
29
  var ProHeader = function ProHeader(props) {
30
30
  var _props$breadcrumbList = props.breadcrumbList,
@@ -319,7 +319,7 @@ var ProHeader = function ProHeader(props) {
319
319
  // value为null或者undefined返回'-'
320
320
  var val = String(value).includes('undefined') || !value ? '-' : value;
321
321
  if (type === 'version' && val) {
322
- val = "\u7248\u672C\u53F7".concat(val);
322
+ val = "".concat(locale.ProHeader.versionTitle).concat(val);
323
323
  }
324
324
  // 面包屑样式
325
325
  var breadcrumbCls = classnames({
@@ -389,12 +389,15 @@ var ProHeader = function ProHeader(props) {
389
389
  var onConfirm = function onConfirm() {
390
390
  if (!isConfirmBack) {
391
391
  onBack && onBack();
392
+ if (!onBack) {
393
+ window.history.back();
394
+ }
392
395
  return false;
393
396
  }
394
397
  _Modal.confirm(_objectSpread({
395
- title: '确认返回?',
396
- okText: '确定',
397
- cancelText: '取消',
398
+ title: "".concat(locale.ProHeader.confirmTitle),
399
+ okText: "".concat(locale.ProHeader.confirm),
400
+ cancelText: "".concat(locale.ProHeader.cancel),
398
401
  onOk: function onOk() {
399
402
  onBack && onBack();
400
403
  }
@@ -1,16 +1,25 @@
1
+ @import '../components/ProBackBtn/style/index';
2
+
1
3
  .pro-header {
2
4
  background-color: var(--zaui-base-bg, #ffffff);
3
- padding : var(--zaui-space-size-lg, 32px) 0 0 0;
5
+ padding : 24px 0 0 0;
4
6
 
5
7
  &.pro-header-no-back {
6
8
  .pro-header-top {
7
9
  padding-left: 0;
8
10
  }
11
+
12
+ .pro-header-left {
13
+ &.pro-header-left-space {
14
+ margin-left: 0 !important;
15
+ }
16
+
17
+ }
9
18
  }
10
19
 
11
20
  &.pro-header-no-describe {
12
21
  box-shadow : none;
13
- margin-bottom: var(--zaui-space-size-md, 16px);
22
+ margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
14
23
 
15
24
  .pro-header-title,
16
25
  .pro-header-top {
@@ -21,7 +30,7 @@
21
30
 
22
31
  &.pro-header-fixed.pro-header-no-describe {
23
32
  .pro-header-top {
24
- padding-bottom: 12px;
33
+ padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1) - var(--zaui-space-size-xs; 4px) * var(--zaui-size; 1));
25
34
  }
26
35
  }
27
36
 
@@ -111,7 +120,7 @@
111
120
  display : flex;
112
121
  justify-content: space-between;
113
122
  align-items : center;
114
- margin-bottom : var(--zaui-space-size-sm, 8px);
123
+ margin-bottom : calc(var(--zaui-space-size-sm; 8px) * var(--zaui-size; 1));
115
124
  padding : 0 var(--zaui-space-size-md, 16px);
116
125
 
117
126
  .pro-header-left {
@@ -265,7 +274,7 @@
265
274
  li {
266
275
  margin-right : 52px;
267
276
  margin-top : 4px;
268
- margin-bottom: 12px;
277
+ margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
269
278
 
270
279
  &:last-child {
271
280
  margin-right: 0;
@@ -303,9 +312,9 @@
303
312
  .pro-header-describe {
304
313
  display : flex;
305
314
  flex-wrap : wrap;
306
- font-size : 14px;
315
+ font-size : var(--zaui-font-size, 14px);
307
316
  padding : 0 var(--zaui-space-size-md, 16px);
308
- padding-bottom: 12px;
317
+ padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1) - var(--zaui-space-size-xs; 4px) * var(--zaui-size; 1));
309
318
 
310
319
  li {
311
320
  margin-left: var(--zaui-space-card, 32px);
@@ -1,7 +1,7 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
- /* eslint-disable no-mixed-operators */
4
3
  /* eslint-disable prefer-destructuring */
4
+ /* eslint-disable no-mixed-operators */
5
5
  import { isPlainObject } from 'lodash';
6
6
  /**
7
7
  * 通过URL获取对应keyIdPath
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { PropSelectProps } from './propsType';
2
+ import { PropSelectProps, ProSelectAction } from './propsType';
3
3
  import './index.less';
4
- export declare const ProSelect: (props: PropSelectProps, ref: React.Ref<unknown> | undefined) => JSX.Element;
5
- declare const _default: React.ForwardRefExoticComponent<PropSelectProps & React.RefAttributes<unknown>>;
4
+ export declare const ProSelect: (props: PropSelectProps, ref: React.Ref<ProSelectAction> | undefined) => JSX.Element;
5
+ declare const _default: React.ForwardRefExoticComponent<PropSelectProps & React.RefAttributes<ProSelectAction>>;
6
6
  export default _default;
@@ -16,10 +16,12 @@ import React, { useImperativeHandle, useState, forwardRef } from 'react';
16
16
  import { isFunction, isObject, isString, omit, cloneDeep } from 'lodash';
17
17
  import { useProConfig } from '../ProConfigProvider';
18
18
  import Container from '../ProForm/components/Container';
19
- import './index.less';
20
19
  import AdaptiveTooltip from './components/AdaptiveTooltip';
20
+ import locale from '../locale';
21
+ import './index.less';
21
22
  var Option = _Select.Option;
22
23
  export var ProSelect = function ProSelect(props, ref) {
24
+ var _locale$ProSelect;
23
25
  var _ref = useProConfig('ProSelect') || {},
24
26
  _ref$fieldNames = _ref.fieldNames,
25
27
  proSelectFieldNames = _ref$fieldNames === void 0 ? {} : _ref$fieldNames;
@@ -261,7 +263,7 @@ export var ProSelect = function ProSelect(props, ref) {
261
263
  return value;
262
264
  };
263
265
  return _jsx(_Select, _objectSpread(_objectSpread({
264
- placeholder: "\u8BF7\u9009\u62E9",
266
+ placeholder: locale === null || locale === void 0 ? void 0 : (_locale$ProSelect = locale.ProSelect) === null || _locale$ProSelect === void 0 ? void 0 : _locale$ProSelect.select,
265
267
  allowClear: true,
266
268
  showArrow: true,
267
269
  loading: fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.loading,
@@ -6,7 +6,9 @@ import { cloneDeep } from 'lodash';
6
6
  import { ReactSVG } from 'react-svg';
7
7
  import catalogSvg from '../../../assets/catalog.svg';
8
8
  import Anchor from '../Anchor';
9
+ import locale from '../../../locale';
9
10
  export var Step = function Step(_ref) {
11
+ var _locale$ProStep;
10
12
  var fixedTop = _ref.fixedTop,
11
13
  _ref$dataSource = _ref.dataSource,
12
14
  dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
@@ -61,7 +63,7 @@ export var Step = function Step(_ref) {
61
63
  className: "menu-icon",
62
64
  src: catalogSvg
63
65
  }), onOff && _jsx("div", {
64
- children: "\u76EE\u5F55"
66
+ children: locale === null || locale === void 0 ? void 0 : (_locale$ProStep = locale.ProStep) === null || _locale$ProStep === void 0 ? void 0 : _locale$ProStep.catalogue
65
67
  })]
66
68
  }), options.map(function (item) {
67
69
  return _jsx(React.Fragment, {
@@ -150,7 +150,6 @@
150
150
  color : #ff5050;
151
151
  font-weight : 600;
152
152
  font-size : var(--aui-font-size-sm, 12px);
153
- font-family : PingFangSC-Semibold, PingFang SC;
154
153
  border-radius: 8px;
155
154
  }
156
155
  }
@@ -1,14 +1,14 @@
1
1
  import { FC } from 'react';
2
- import { ProTableValueType } from '../../propsType';
3
2
  interface Props {
4
- valueType?: ProTableValueType;
5
- code?: string | string[] | (() => string);
3
+ valueType?: string;
4
+ node?: any;
6
5
  value?: any;
7
- record?: any;
6
+ currentValue?: any;
8
7
  copyable?: boolean;
8
+ originalTip?: boolean;
9
9
  ellipsis?: any;
10
10
  width?: number | string;
11
- transform?: (value: any, record?: any) => string[];
11
+ originalValue?: any;
12
12
  }
13
13
  declare const RenderColumn: FC<Props>;
14
14
  export default RenderColumn;
@@ -1,35 +1,55 @@
1
+ import "antd/es/tooltip/style";
2
+ import _Tooltip from "antd/es/tooltip";
1
3
  import "antd/es/typography/style";
2
4
  import _Typography from "antd/es/typography";
3
- import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
4
6
  import { CheckOutlined } from '@ant-design/icons';
5
7
  import { ReactSVG } from 'react-svg';
6
- import ProForm from '../../../ProForm';
7
- import getEnumLabel from '../../../ProEnum/utils/getEnumLabel';
8
8
  import copySvg from '../../../assets/copy.svg';
9
9
  var Paragraph = _Typography.Paragraph,
10
10
  Text = _Typography.Text;
11
11
  // @ts-ignore
12
12
  var RenderColumn = function RenderColumn(props) {
13
13
  var valueType = props.valueType,
14
- code = props.code,
15
14
  value = props.value,
16
- record = props.record,
15
+ node = props.node,
16
+ currentValue = props.currentValue,
17
17
  copyable = props.copyable,
18
18
  ellipsis = props.ellipsis,
19
19
  width = props.width,
20
- transform = props.transform;
21
- if (valueType === 'address') {
22
- var _newValue$filter;
23
- var newValue = transform ? transform(value, record) : value;
24
- if (!newValue || Array.isArray(newValue) && (newValue === null || newValue === void 0 ? void 0 : (_newValue$filter = newValue.filter(function (item) {
25
- return !!item;
26
- })) === null || _newValue$filter === void 0 ? void 0 : _newValue$filter.length) === 0) {
27
- return '-';
20
+ originalValue = props.originalValue,
21
+ originalTip = props.originalTip;
22
+ if (originalValue !== undefined) {
23
+ var renderNode = value ? node : '-';
24
+ if (ellipsis || originalTip) {
25
+ if (ellipsis) {
26
+ renderNode = _jsx(Text, {
27
+ style: {
28
+ width: currentValue === '-' ? 32.5 : width
29
+ },
30
+ ellipsis: {
31
+ tooltip: false
32
+ },
33
+ children: ellipsis ? currentValue : renderNode
34
+ });
35
+ }
36
+ return _jsx(_Tooltip, {
37
+ className: "varied-cell",
38
+ style: {
39
+ width: width
40
+ },
41
+ title: originalTip ? _jsxs(_Fragment, {
42
+ children: ["\u521D\u59CB\u503C\uFF1A", originalValue, _jsx("br", {}), ellipsis ? "\u5F53\u524D\u503C\uFF1A".concat(currentValue) : undefined]
43
+ }) : node,
44
+ children: renderNode
45
+ });
28
46
  }
29
- return _jsx(ProForm.ProAddressBar, {
30
- isView: true,
31
- code: code,
32
- value: newValue
47
+ return _jsx("span", {
48
+ className: "varied-cell",
49
+ style: {
50
+ width: width
51
+ },
52
+ children: renderNode
33
53
  });
34
54
  }
35
55
  if (copyable) {
@@ -40,25 +60,21 @@ var RenderColumn = function RenderColumn(props) {
40
60
  width: width
41
61
  } : undefined,
42
62
  ellipsis: ellipsis ? {
43
- tooltip: value
63
+ tooltip: node
44
64
  } : false,
45
65
  copyable: {
46
- text: value,
66
+ text: node,
47
67
  icon: [_jsx(ReactSVG, {
48
68
  className: "drag-icon",
49
69
  src: copySvg
50
70
  }, "copy-icon"), _jsx(CheckOutlined, {}, "copied-icon")],
51
71
  tooltips: ['复制', '复制成功']
52
72
  },
53
- children: value
73
+ children: node
54
74
  })
55
75
  });
56
76
  }
57
77
  if (ellipsis) {
58
- var node = value;
59
- if (['enumName', 'enumCodeName'].includes(valueType)) {
60
- node = getEnumLabel(typeof code === 'function' ? code() : code, value, valueType === 'enumCodeName');
61
- }
62
78
  return value ? _jsx(Text, {
63
79
  style: {
64
80
  width: width
@@ -70,6 +86,6 @@ var RenderColumn = function RenderColumn(props) {
70
86
  children: node
71
87
  }) : '-';
72
88
  }
73
- return null;
89
+ return value ? node : '-';
74
90
  };
75
91
  export default RenderColumn;
@@ -8,7 +8,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
8
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
9
9
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
10
10
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
11
- var _excluded = ["tableId", "headerRender", "footerRender", "quickConfig", "stripe", "columns", "className", "summary", "emptyText"],
11
+ var _excluded = ["tableId", "headerRender", "footerRender", "quickConfig", "stripe", "columns", "className", "summary", "emptyText", "originalDataSource"],
12
12
  _excluded2 = ["resizeColumn", "columnConfig", "cacheTime", "storage"];
13
13
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
14
14
  import { useEffect, useMemo, useState, createContext } from 'react';
@@ -25,6 +25,7 @@ import empty from '../assets/empty.png';
25
25
  import resetSvg from '../assets/reset.svg';
26
26
  import customColumnSvg from '../assets/customColumn.svg';
27
27
  import { formatColumn, getColumnDataIndex } from './utils';
28
+ import locale from '../locale';
28
29
  var defaultCacheTime = 1; // columns 配置保存时间为一天
29
30
  // 全局上下文
30
31
  export var TableContext = /*#__PURE__*/createContext({});
@@ -33,7 +34,7 @@ export var defaultPage = {
33
34
  pageSize: 10
34
35
  };
35
36
  function ProTable(props) {
36
- var _curTableConfig$pathK;
37
+ var _locale$ProTable, _curTableConfig$pathK, _locale$ProTable2, _locale$ProTable3, _locale$ProTable4, _locale$ProTable5;
37
38
  var _ref = useProConfig('globalConfig') || {},
38
39
  configStorage = _ref.storage; // 获取全局缓存位置配置
39
40
  var _ref2 = useProConfig('ProTable') || {},
@@ -50,7 +51,8 @@ function ProTable(props) {
50
51
  className = props.className,
51
52
  summary = props.summary,
52
53
  _props$emptyText = props.emptyText,
53
- emptyText = _props$emptyText === void 0 ? '暂无数据' : _props$emptyText,
54
+ emptyText = _props$emptyText === void 0 ? locale === null || locale === void 0 ? void 0 : (_locale$ProTable = locale.ProTable) === null || _locale$ProTable === void 0 ? void 0 : _locale$ProTable.noData : _props$emptyText,
55
+ originalDataSource = props.originalDataSource,
54
56
  restProps = _objectWithoutProperties(props, _excluded);
55
57
  var quickTableConfig = quickConfig ? _objectSpread({
56
58
  // resizeColumn: true,
@@ -161,7 +163,7 @@ function ProTable(props) {
161
163
  return !(item === null || item === void 0 ? void 0 : item.delete);
162
164
  });
163
165
  newColumns === null || newColumns === void 0 ? void 0 : newColumns.forEach(function (item) {
164
- formatColumn(item);
166
+ formatColumn(item, originalDataSource);
165
167
  });
166
168
  return newColumns;
167
169
  }, [curColumns, handleResize]);
@@ -280,9 +282,9 @@ function ProTable(props) {
280
282
  src: resetSvg
281
283
  }),
282
284
  onClick: resetColumnWidth,
283
- children: "\u91CD\u7F6E\u5217\u5BBD"
285
+ children: locale === null || locale === void 0 ? void 0 : (_locale$ProTable2 = locale.ProTable) === null || _locale$ProTable2 === void 0 ? void 0 : _locale$ProTable2.resetColumnWidth
284
286
  }), columnConfig && _jsx(ProTreeModal, {
285
- title: "\u81EA\u5B9A\u4E49\u5217",
287
+ title: locale === null || locale === void 0 ? void 0 : (_locale$ProTable3 = locale.ProTable) === null || _locale$ProTable3 === void 0 ? void 0 : _locale$ProTable3.customColumns,
286
288
  span: 8,
287
289
  mode: "list",
288
290
  draggable: true,
@@ -297,7 +299,7 @@ function ProTable(props) {
297
299
  wrapper: "span",
298
300
  src: customColumnSvg
299
301
  }),
300
- children: "\u81EA\u5B9A\u4E49\u5217"
302
+ children: locale === null || locale === void 0 ? void 0 : (_locale$ProTable4 = locale.ProTable) === null || _locale$ProTable4 === void 0 ? void 0 : _locale$ProTable4.customColumns
301
303
  })
302
304
  })]
303
305
  })]
@@ -314,7 +316,7 @@ function ProTable(props) {
314
316
  className: "ant-empty-image",
315
317
  children: _jsx("img", {
316
318
  src: empty,
317
- alt: "\u6682\u65E0\u6570\u636E"
319
+ alt: locale === null || locale === void 0 ? void 0 : (_locale$ProTable5 = locale.ProTable) === null || _locale$ProTable5 === void 0 ? void 0 : _locale$ProTable5.noData
318
320
  })
319
321
  }), _jsx("div", {
320
322
  className: "ant-empty-description",
@@ -26,6 +26,7 @@ export interface ProTableColumn extends Omit<ColumnType<any>, 'dataIndex'> {
26
26
  precision?: number;
27
27
  code?: string | string[] | (() => string);
28
28
  copyable?: boolean;
29
+ originalTip?: boolean;
29
30
  prefix?: string | ReactNode | ((value: any, record?: any, index?: number) => any);
30
31
  suffix?: string | ReactNode | ((value: any, record?: any, index?: number) => any);
31
32
  tooltip?: ReactNode | {
@@ -53,6 +54,7 @@ export interface ProTableProps extends Omit<TableProps<any>, 'summary' | 'column
53
54
  */
54
55
  stripe?: boolean;
55
56
  columns: ProTableColumn[];
57
+ originalDataSource?: any[];
56
58
  }
57
59
  export type ProTableValueType = 'percentage' | 'permillage' | 'thousandth' | 'datePicker' | 'enumName' | 'enumCodeName' | 'address' | 'thousandthCNY' | 'date' | 'dateTime' | 'dateStartTime' | 'dateEndTime' | 'dateStartEndTime';
58
60
  export interface Response<T = any> {
@@ -54,6 +54,19 @@
54
54
  }
55
55
  }
56
56
 
57
+ .ant-table-body {
58
+ .ant-table-cell .varied-cell {
59
+ margin-left: -8px;
60
+ background: var(--zaui-contract-bg, #fffaa1);
61
+ padding: var(--zaui-space-size-xs, 4px) var(--zaui-space-size-sm, 8px);
62
+ border-radius: var(--zaui-border-radius, 4px);
63
+ }
64
+
65
+ .varied-cell.empty-cell {
66
+ width: 24.5px;
67
+ }
68
+ }
69
+
57
70
  .copyable-table-cell {
58
71
 
59
72
 
@@ -140,7 +153,7 @@
140
153
  .column-config {
141
154
  display : flex;
142
155
  justify-content: space-between;
143
- margin-bottom : var(--zaui-space-size-md, 16px);
156
+ margin-bottom : calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
144
157
 
145
158
  .right-actions {
146
159
  display : flex;