@zat-design/sisyphus-react 3.13.20 → 3.13.21-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 (27) hide show
  1. package/es/ProForm/components/base/Input/index.js +20 -26
  2. package/es/ProForm/components/combination/Group/hooks/index.d.ts +0 -1
  3. package/es/ProForm/components/combination/Group/hooks/index.js +1 -3
  4. package/es/ProForm/components/combination/Group/index.js +1 -4
  5. package/es/ProForm/components/combination/Group/utils.d.ts +0 -1
  6. package/es/ProForm/components/render/RenderFields.d.ts +0 -1
  7. package/es/ProForm/components/render/RenderFields.js +2 -4
  8. package/es/ProForm/index.js +2 -5
  9. package/es/ProForm/propsType.d.ts +0 -3
  10. package/es/ProStep/components/Anchor/index.d.ts +0 -1
  11. package/es/ProStep/components/Item/index.d.ts +0 -1
  12. package/es/ProTable/components/RenderSummary/index.js +6 -5
  13. package/es/ProTable/propsType.d.ts +8 -2
  14. package/lib/ProForm/components/base/Input/index.js +19 -25
  15. package/lib/ProForm/components/combination/Group/hooks/index.d.ts +0 -1
  16. package/lib/ProForm/components/combination/Group/hooks/index.js +1 -3
  17. package/lib/ProForm/components/combination/Group/index.js +1 -4
  18. package/lib/ProForm/components/combination/Group/utils.d.ts +0 -1
  19. package/lib/ProForm/components/render/RenderFields.d.ts +0 -1
  20. package/lib/ProForm/components/render/RenderFields.js +2 -4
  21. package/lib/ProForm/index.js +2 -5
  22. package/lib/ProForm/propsType.d.ts +0 -3
  23. package/lib/ProStep/components/Anchor/index.d.ts +0 -1
  24. package/lib/ProStep/components/Item/index.d.ts +0 -1
  25. package/lib/ProTable/components/RenderSummary/index.js +5 -4
  26. package/lib/ProTable/propsType.d.ts +8 -2
  27. package/package.json +1 -1
@@ -4,7 +4,7 @@ import _Input from "antd/es/input";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  var _excluded = ["label", "form", "placeholder", "fieldName", "otherProps", "desensitization"];
6
6
  import React from 'react';
7
- import { omit } from 'lodash';
7
+ import { isFunction, omit } from 'lodash';
8
8
  import { useProConfig } from "../../../../ProConfigProvider";
9
9
  import Container from "../../Container";
10
10
  import locale from "../../../../locale";
@@ -28,18 +28,15 @@ var Input = function Input(props) {
28
28
  var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
29
29
  var initialConfig = useProConfig('Input');
30
30
  if (isView) {
31
- if (desensitization !== null && desensitization !== void 0 && desensitization.length && props !== null && props !== void 0 && props.disabled) {
32
- var isDesensit = sessionStorage.getItem(otherProps === null || otherProps === void 0 ? void 0 : otherProps.desensitizationKey);
33
- if (isDesensit === 'ON') {
34
- if (typeof rest.value === 'number') {
35
- var _rest$value, _rest$value$toString;
36
- rest.value = rest === null || rest === void 0 || (_rest$value = rest.value) === null || _rest$value === void 0 || (_rest$value$toString = _rest$value.toString) === null || _rest$value$toString === void 0 ? void 0 : _rest$value$toString.call(_rest$value);
37
- }
38
- return /*#__PURE__*/_jsx(Container, {
39
- viewEmpty: viewEmpty,
40
- children: maskStringRangeWithRegex(rest.value, desensitization)
41
- });
31
+ if ((Array.isArray(desensitization) || isFunction(desensitization)) && props !== null && props !== void 0 && props.disabled) {
32
+ if (typeof rest.value === 'number') {
33
+ var _rest$value, _rest$value$toString;
34
+ rest.value = rest === null || rest === void 0 || (_rest$value = rest.value) === null || _rest$value === void 0 || (_rest$value$toString = _rest$value.toString) === null || _rest$value$toString === void 0 ? void 0 : _rest$value$toString.call(_rest$value);
42
35
  }
36
+ return /*#__PURE__*/_jsx(Container, {
37
+ viewEmpty: viewEmpty,
38
+ children: maskStringRangeWithRegex(rest.value, desensitization)
39
+ });
43
40
  }
44
41
  return /*#__PURE__*/_jsx(Container, {
45
42
  viewEmpty: viewEmpty,
@@ -53,21 +50,18 @@ var Input = function Input(props) {
53
50
  }, omit(initialConfig, ['trim', 'upperCase'])), rest));
54
51
 
55
52
  // 仅查看模式下进行数据脱敏
56
- if (desensitization !== null && desensitization !== void 0 && desensitization.length && props !== null && props !== void 0 && props.disabled) {
57
- var _isDesensit = sessionStorage.getItem(otherProps === null || otherProps === void 0 ? void 0 : otherProps.desensitizationKey);
58
- if (_isDesensit === 'ON') {
59
- if (typeof rest.value === 'number') {
60
- var _rest$value2, _rest$value2$toString;
61
- rest.value = rest === null || rest === void 0 || (_rest$value2 = rest.value) === null || _rest$value2 === void 0 || (_rest$value2$toString = _rest$value2.toString) === null || _rest$value2$toString === void 0 ? void 0 : _rest$value2$toString.call(_rest$value2);
62
- }
63
- return /*#__PURE__*/React.cloneElement(ComInput, _objectSpread(_objectSpread(_objectSpread({
64
- allowClear: true,
65
- autoComplete: 'off',
66
- placeholder: placeholder || `${locale.ProForm.inputPlaceholder}`
67
- }, omit(initialConfig, ['trim', 'upperCase'])), rest), {}, {
68
- value: maskStringRangeWithRegex(rest.value, desensitization)
69
- }));
53
+ if ((Array.isArray(desensitization) || isFunction(desensitization)) && props !== null && props !== void 0 && props.disabled) {
54
+ if (typeof rest.value === 'number') {
55
+ var _rest$value2, _rest$value2$toString;
56
+ rest.value = rest === null || rest === void 0 || (_rest$value2 = rest.value) === null || _rest$value2 === void 0 || (_rest$value2$toString = _rest$value2.toString) === null || _rest$value2$toString === void 0 ? void 0 : _rest$value2$toString.call(_rest$value2);
70
57
  }
58
+ return /*#__PURE__*/React.cloneElement(ComInput, _objectSpread(_objectSpread(_objectSpread({
59
+ allowClear: true,
60
+ autoComplete: 'off',
61
+ placeholder: placeholder || `${locale.ProForm.inputPlaceholder}`
62
+ }, omit(initialConfig, ['trim', 'upperCase'])), rest), {}, {
63
+ value: maskStringRangeWithRegex(rest.value, desensitization)
64
+ }));
71
65
  }
72
66
  return ComInput;
73
67
  };
@@ -12,7 +12,6 @@ interface ColumnsTransformerParams {
12
12
  form: FormInstance;
13
13
  index?: number;
14
14
  formDisabled?: boolean;
15
- desensitizationKey?: string;
16
15
  groupProps: GroupType;
17
16
  }
18
17
  /** 转换columns */
@@ -15,9 +15,7 @@ export var useTransformColumns = params => {
15
15
  namePath = params.namePath,
16
16
  value = params.value,
17
17
  internalChange = params.onChange,
18
- groupProps = params.groupProps,
19
- formDisabled = params.formDisabled,
20
- desensitizationKey = params.desensitizationKey;
18
+ groupProps = params.groupProps;
21
19
  var timerRef = useRef([]);
22
20
  return columns === null || columns === void 0 ? void 0 : columns.flatMap((column, index) => {
23
21
  var type = column.type,
@@ -31,8 +31,6 @@ var Group = props => {
31
31
  formDisabled = props.disabled,
32
32
  _props$split = props.split,
33
33
  split = _props$split === void 0 ? '/' : _props$split;
34
- var _ref = otherProps || {},
35
- desensitizationKey = _ref.desensitizationKey;
36
34
  var contextProps = ProForm.useFieldProps() || {};
37
35
  var names = contextProps.names,
38
36
  name = contextProps.name,
@@ -60,8 +58,7 @@ var Group = props => {
60
58
  index,
61
59
  value,
62
60
  groupProps: props,
63
- formDisabled,
64
- desensitizationKey
61
+ formDisabled
65
62
  });
66
63
  var columns = insertSeparator(columnsProps, space);
67
64
  var nextClassName = classnames({
@@ -44,7 +44,6 @@ export declare const getReactiveProps: (params: Params) => {
44
44
  type ValueTypeGetterParams = Pick<ProFormColumnType, 'valueType' | 'switchValue' | 'toISOString' | 'toCSTString' | 'disabled' | 'desensitization'> & {
45
45
  type?: any;
46
46
  mode?: string;
47
- desensitizationKey?: string;
48
47
  };
49
48
  /** 获取当前字段的转换函数 */
50
49
  export declare const getValueTypeTrans: (params: ValueTypeGetterParams) => any;
@@ -20,7 +20,6 @@ interface Props<T = any> {
20
20
  requiredOnView?: boolean;
21
21
  required?: boolean | boolean[] | (() => boolean | boolean[]);
22
22
  globalControl?: boolean;
23
- desensitizationKey?: string;
24
23
  }
25
24
  declare const RenderFields: React.FC<Props>;
26
25
  export default RenderFields;
@@ -28,8 +28,7 @@ var RenderFields = props => {
28
28
  requiredOnView = props.requiredOnView,
29
29
  required = props.required,
30
30
  diffConfig = props.diffConfig,
31
- globalControl = props.globalControl,
32
- desensitizationKey = props.desensitizationKey;
31
+ globalControl = props.globalControl;
33
32
 
34
33
  // 是否包含隐藏字段
35
34
  var hiddenData = columns.filter(item => {
@@ -209,8 +208,7 @@ var RenderFields = props => {
209
208
  listName: column.listName,
210
209
  globalControl,
211
210
  formDisabled,
212
- diffConfig,
213
- desensitizationKey
211
+ diffConfig
214
212
  };
215
213
  return /*#__PURE__*/_jsx(FieldProvider, {
216
214
  value: otherProps,
@@ -9,7 +9,7 @@ import "antd/es/space/style";
9
9
  import _Space from "antd/es/space";
10
10
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
11
11
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
12
- var _excluded = ["mode", "span", "disabled", "isView", "columns", "footer", "onOk", "okText", "onCancel", "confirmLoading", "cancelText", "form", "children", "rowProps", "className", "expand", "expandOpen", "expandOpenChange", "viewEmpty", "labelAlign", "labelWidth", "onValuesChange", "onFinish", "diffConfig", "submitOnEnter", "clearNotShow", "initialValues", "requiredOnView", "formId", "required", "formKey", "globalControl", "scrollToError", "optimize", "desensitizationKey", "stopOnFirstError"];
12
+ var _excluded = ["mode", "span", "disabled", "isView", "columns", "footer", "onOk", "okText", "onCancel", "confirmLoading", "cancelText", "form", "children", "rowProps", "className", "expand", "expandOpen", "expandOpenChange", "viewEmpty", "labelAlign", "labelWidth", "onValuesChange", "onFinish", "diffConfig", "submitOnEnter", "clearNotShow", "initialValues", "requiredOnView", "formId", "required", "formKey", "globalControl", "scrollToError", "optimize", "stopOnFirstError"];
13
13
  import { DoubleLeftOutlined } from '@ant-design/icons';
14
14
  import classnames from 'classnames';
15
15
  import React, { forwardRef, useImperativeHandle, useMemo, useEffect } from 'react';
@@ -70,8 +70,6 @@ var ProForm = (props, ref) => {
70
70
  scrollToError = _props$scrollToError === void 0 ? true : _props$scrollToError,
71
71
  _props$optimize = props.optimize,
72
72
  optimize = _props$optimize === void 0 ? false : _props$optimize,
73
- _props$desensitizatio = props.desensitizationKey,
74
- desensitizationKey = _props$desensitizatio === void 0 ? 'zat-design-pro-component-desensitization' : _props$desensitizatio,
75
73
  _props$stopOnFirstErr = props.stopOnFirstError,
76
74
  stopOnFirstError = _props$stopOnFirstErr === void 0 ? false : _props$stopOnFirstErr,
77
75
  otherProps = _objectWithoutProperties(props, _excluded);
@@ -267,8 +265,7 @@ var ProForm = (props, ref) => {
267
265
  clearNotShow: clearNotShow,
268
266
  requiredOnView: requiredOnView,
269
267
  required: required,
270
- globalControl: globalControl,
271
- desensitizationKey: desensitizationKey
268
+ globalControl: globalControl
272
269
  }), footerRender()]
273
270
  })), children]
274
271
  }));
@@ -46,7 +46,6 @@ export interface ProFormOtherType {
46
46
  formDisabled?: boolean;
47
47
  isDiffChange?: boolean;
48
48
  diffConfig?: DiffConfigType;
49
- desensitizationKey?: string;
50
49
  }
51
50
  export interface DiffConfigType<Values = any> {
52
51
  /** 比对原始数据源 */
@@ -99,8 +98,6 @@ export interface ProFormType<Values = any> extends FormProps<Values> {
99
98
  * 1. 开启不过滤names的中间态值
100
99
  */
101
100
  optimize?: boolean;
102
- /** 全局脱敏开关的key、默认 zat-design-pro-component-desensitization */
103
- desensitizationKey?: string;
104
101
  /** 是否在遇到第一个错误时停止验证 */
105
102
  stopOnFirstError?: boolean;
106
103
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MenuItemProps } from '../../propsType';
3
2
  export declare const MenuItem: (props: MenuItemProps) => JSX.Element;
4
3
  export default MenuItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ProStepItemType } from '../../propsType';
3
2
  declare const ProStepItem: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, order, ...restProps }: ProStepItemType) => JSX.Element;
4
3
  export default ProStepItem;
@@ -1,6 +1,6 @@
1
1
  import "antd/es/table/style";
2
2
  import _Table from "antd/es/table";
3
- import { get } from 'lodash';
3
+ import { get, isObject } from 'lodash';
4
4
  import { tools } from '@zat-design/utils';
5
5
  import { valueTypeRender } from "../../../ProUtils/utils";
6
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -18,11 +18,12 @@ var renderSummary = props => {
18
18
  if (!(dataSource !== null && dataSource !== void 0 && dataSource.length)) {
19
19
  return null;
20
20
  }
21
- return typeof summary === 'object' ? /*#__PURE__*/_jsx(_Table.Summary, {
21
+ return isObject(summary) ? /*#__PURE__*/_jsx(_Table.Summary, {
22
22
  fixed: fixed,
23
23
  children: /*#__PURE__*/_jsx(_Table.Summary.Row, {
24
24
  children: columns === null || columns === void 0 ? void 0 : columns.map(_ref2 => {
25
25
  var key = _ref2.key,
26
+ dataIndex = _ref2.dataIndex,
26
27
  index = _ref2.index,
27
28
  colSpan = _ref2.colSpan,
28
29
  prefix = _ref2.prefix,
@@ -30,19 +31,19 @@ var renderSummary = props => {
30
31
  title = _ref2.title,
31
32
  precision = _ref2.precision,
32
33
  valueType = _ref2.valueType;
34
+ var _key = key || dataIndex;
33
35
  var text = null;
34
36
  if (title) {
35
37
  text = title;
36
- } else if (total && key) {
38
+ } else if (total && _key) {
37
39
  var _dataSource$reduce;
38
40
  var format = valueTypeRender === null || valueTypeRender === void 0 ? void 0 : valueTypeRender[valueType];
39
41
  var sum = dataSource === null || dataSource === void 0 || (_dataSource$reduce = dataSource.reduce) === null || _dataSource$reduce === void 0 ? void 0 : _dataSource$reduce.call(dataSource, (pre, cur) => {
40
42
  var _get;
41
- return tools.calc(pre, '+', (_get = get(cur, key)) !== null && _get !== void 0 ? _get : 0);
43
+ return tools.calc(pre, '+', (_get = get(cur, _key)) !== null && _get !== void 0 ? _get : 0);
42
44
  }, 0);
43
45
  text = format ? format(sum, precision !== null && precision !== void 0 ? precision : 2) : sum;
44
46
  }
45
- var _key = key;
46
47
  return /*#__PURE__*/_jsxs(_Table.Summary.Cell, {
47
48
  index: index,
48
49
  colSpan: colSpan,
@@ -9,12 +9,18 @@ import type { TabsProps } from 'antd/es/tabs';
9
9
  * 合计栏的每列配置参数
10
10
  */
11
11
  interface ProTableSummaryColumnType {
12
+ /**
13
+ * 配置列的 key
14
+ * @description 对应表格列的 key
15
+ * @default undefined
16
+ */
17
+ key?: string | string[];
12
18
  /**
13
19
  * 配置列的 dataIndex
14
20
  * @description 对应表格列的 dataIndex
15
21
  * @default undefined
16
22
  */
17
- key: string | string[];
23
+ dataIndex?: string | string[];
18
24
  /**
19
25
  * 配置列的下标
20
26
  * @description 列在表格中的索引位置
@@ -192,7 +198,7 @@ export interface ProTableColumnType extends Omit<ColumnType<any>, 'dataIndex'> {
192
198
  * @description 用于开启比对时,自定义 render 渲染初始值,触发条件必须写render
193
199
  * @default undefined
194
200
  */
195
- viewRender?: ({ value, record, index, originValue, originRecord, }: any) => 'same' | 'changed' | 'add' | undefined;
201
+ viewRender?: ({ value, record, index, originValue, originRecord }: any) => 'same' | 'changed' | 'add' | undefined;
196
202
  /**
197
203
  * 是否已更改
198
204
  * @description 标记列值是否已变更
@@ -33,18 +33,15 @@ var Input = function Input(props) {
33
33
  var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
34
34
  var initialConfig = (0, _ProConfigProvider.useProConfig)('Input');
35
35
  if (isView) {
36
- if (desensitization !== null && desensitization !== void 0 && desensitization.length && props !== null && props !== void 0 && props.disabled) {
37
- var isDesensit = sessionStorage.getItem(otherProps === null || otherProps === void 0 ? void 0 : otherProps.desensitizationKey);
38
- if (isDesensit === 'ON') {
39
- if (typeof rest.value === 'number') {
40
- var _rest$value, _rest$value$toString;
41
- rest.value = rest === null || rest === void 0 || (_rest$value = rest.value) === null || _rest$value === void 0 || (_rest$value$toString = _rest$value.toString) === null || _rest$value$toString === void 0 ? void 0 : _rest$value$toString.call(_rest$value);
42
- }
43
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Container.default, {
44
- viewEmpty: viewEmpty,
45
- children: (0, _valueType.maskStringRangeWithRegex)(rest.value, desensitization)
46
- });
36
+ if ((Array.isArray(desensitization) || (0, _lodash.isFunction)(desensitization)) && props !== null && props !== void 0 && props.disabled) {
37
+ if (typeof rest.value === 'number') {
38
+ var _rest$value, _rest$value$toString;
39
+ rest.value = rest === null || rest === void 0 || (_rest$value = rest.value) === null || _rest$value === void 0 || (_rest$value$toString = _rest$value.toString) === null || _rest$value$toString === void 0 ? void 0 : _rest$value$toString.call(_rest$value);
47
40
  }
41
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Container.default, {
42
+ viewEmpty: viewEmpty,
43
+ children: (0, _valueType.maskStringRangeWithRegex)(rest.value, desensitization)
44
+ });
48
45
  }
49
46
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Container.default, {
50
47
  viewEmpty: viewEmpty,
@@ -58,21 +55,18 @@ var Input = function Input(props) {
58
55
  }, (0, _lodash.omit)(initialConfig, ['trim', 'upperCase'])), rest));
59
56
 
60
57
  // 仅查看模式下进行数据脱敏
61
- if (desensitization !== null && desensitization !== void 0 && desensitization.length && props !== null && props !== void 0 && props.disabled) {
62
- var _isDesensit = sessionStorage.getItem(otherProps === null || otherProps === void 0 ? void 0 : otherProps.desensitizationKey);
63
- if (_isDesensit === 'ON') {
64
- if (typeof rest.value === 'number') {
65
- var _rest$value2, _rest$value2$toString;
66
- rest.value = rest === null || rest === void 0 || (_rest$value2 = rest.value) === null || _rest$value2 === void 0 || (_rest$value2$toString = _rest$value2.toString) === null || _rest$value2$toString === void 0 ? void 0 : _rest$value2$toString.call(_rest$value2);
67
- }
68
- return /*#__PURE__*/_react.default.cloneElement(ComInput, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
69
- allowClear: true,
70
- autoComplete: 'off',
71
- placeholder: placeholder || `${_locale.default.ProForm.inputPlaceholder}`
72
- }, (0, _lodash.omit)(initialConfig, ['trim', 'upperCase'])), rest), {}, {
73
- value: (0, _valueType.maskStringRangeWithRegex)(rest.value, desensitization)
74
- }));
58
+ if ((Array.isArray(desensitization) || (0, _lodash.isFunction)(desensitization)) && props !== null && props !== void 0 && props.disabled) {
59
+ if (typeof rest.value === 'number') {
60
+ var _rest$value2, _rest$value2$toString;
61
+ rest.value = rest === null || rest === void 0 || (_rest$value2 = rest.value) === null || _rest$value2 === void 0 || (_rest$value2$toString = _rest$value2.toString) === null || _rest$value2$toString === void 0 ? void 0 : _rest$value2$toString.call(_rest$value2);
75
62
  }
63
+ return /*#__PURE__*/_react.default.cloneElement(ComInput, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
64
+ allowClear: true,
65
+ autoComplete: 'off',
66
+ placeholder: placeholder || `${_locale.default.ProForm.inputPlaceholder}`
67
+ }, (0, _lodash.omit)(initialConfig, ['trim', 'upperCase'])), rest), {}, {
68
+ value: (0, _valueType.maskStringRangeWithRegex)(rest.value, desensitization)
69
+ }));
76
70
  }
77
71
  return ComInput;
78
72
  };
@@ -12,7 +12,6 @@ interface ColumnsTransformerParams {
12
12
  form: FormInstance;
13
13
  index?: number;
14
14
  formDisabled?: boolean;
15
- desensitizationKey?: string;
16
15
  groupProps: GroupType;
17
16
  }
18
17
  /** 转换columns */
@@ -23,9 +23,7 @@ var useTransformColumns = params => {
23
23
  namePath = params.namePath,
24
24
  value = params.value,
25
25
  internalChange = params.onChange,
26
- groupProps = params.groupProps,
27
- formDisabled = params.formDisabled,
28
- desensitizationKey = params.desensitizationKey;
26
+ groupProps = params.groupProps;
29
27
  var timerRef = (0, _react.useRef)([]);
30
28
  return columns === null || columns === void 0 ? void 0 : columns.flatMap((column, index) => {
31
29
  var type = column.type,
@@ -36,8 +36,6 @@ var _jsxRuntime = require("react/jsx-runtime");
36
36
  formDisabled = props.disabled,
37
37
  _props$split = props.split,
38
38
  split = _props$split === void 0 ? '/' : _props$split;
39
- var _ref = otherProps || {},
40
- desensitizationKey = _ref.desensitizationKey;
41
39
  var contextProps = _ProForm.default.useFieldProps() || {};
42
40
  var names = contextProps.names,
43
41
  name = contextProps.name,
@@ -65,8 +63,7 @@ var _jsxRuntime = require("react/jsx-runtime");
65
63
  index,
66
64
  value,
67
65
  groupProps: props,
68
- formDisabled,
69
- desensitizationKey
66
+ formDisabled
70
67
  });
71
68
  var columns = (0, _utils.insertSeparator)(columnsProps, space);
72
69
  var nextClassName = (0, _classnames.default)({
@@ -44,7 +44,6 @@ export declare const getReactiveProps: (params: Params) => {
44
44
  type ValueTypeGetterParams = Pick<ProFormColumnType, 'valueType' | 'switchValue' | 'toISOString' | 'toCSTString' | 'disabled' | 'desensitization'> & {
45
45
  type?: any;
46
46
  mode?: string;
47
- desensitizationKey?: string;
48
47
  };
49
48
  /** 获取当前字段的转换函数 */
50
49
  export declare const getValueTypeTrans: (params: ValueTypeGetterParams) => any;
@@ -20,7 +20,6 @@ interface Props<T = any> {
20
20
  requiredOnView?: boolean;
21
21
  required?: boolean | boolean[] | (() => boolean | boolean[]);
22
22
  globalControl?: boolean;
23
- desensitizationKey?: string;
24
23
  }
25
24
  declare const RenderFields: React.FC<Props>;
26
25
  export default RenderFields;
@@ -35,8 +35,7 @@ var RenderFields = props => {
35
35
  requiredOnView = props.requiredOnView,
36
36
  required = props.required,
37
37
  diffConfig = props.diffConfig,
38
- globalControl = props.globalControl,
39
- desensitizationKey = props.desensitizationKey;
38
+ globalControl = props.globalControl;
40
39
 
41
40
  // 是否包含隐藏字段
42
41
  var hiddenData = columns.filter(item => {
@@ -216,8 +215,7 @@ var RenderFields = props => {
216
215
  listName: column.listName,
217
216
  globalControl,
218
217
  formDisabled,
219
- diffConfig,
220
- desensitizationKey
218
+ diffConfig
221
219
  };
222
220
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_useFieldProps.FieldProvider, {
223
221
  value: otherProps,
@@ -33,7 +33,7 @@ var _useWatch = _interopRequireDefault(require("./utils/useWatch"));
33
33
  var _FormsProvider = _interopRequireWildcard(require("../FormsProvider"));
34
34
  var _ProStep = require("../ProStep");
35
35
  var _jsxRuntime = require("react/jsx-runtime");
36
- var _excluded = ["mode", "span", "disabled", "isView", "columns", "footer", "onOk", "okText", "onCancel", "confirmLoading", "cancelText", "form", "children", "rowProps", "className", "expand", "expandOpen", "expandOpenChange", "viewEmpty", "labelAlign", "labelWidth", "onValuesChange", "onFinish", "diffConfig", "submitOnEnter", "clearNotShow", "initialValues", "requiredOnView", "formId", "required", "formKey", "globalControl", "scrollToError", "optimize", "desensitizationKey", "stopOnFirstError"];
36
+ var _excluded = ["mode", "span", "disabled", "isView", "columns", "footer", "onOk", "okText", "onCancel", "confirmLoading", "cancelText", "form", "children", "rowProps", "className", "expand", "expandOpen", "expandOpenChange", "viewEmpty", "labelAlign", "labelWidth", "onValuesChange", "onFinish", "diffConfig", "submitOnEnter", "clearNotShow", "initialValues", "requiredOnView", "formId", "required", "formKey", "globalControl", "scrollToError", "optimize", "stopOnFirstError"];
37
37
  var ProForm = (props, ref) => {
38
38
  var _localStorage, _ref3;
39
39
  var _props$mode = props.mode,
@@ -77,8 +77,6 @@ var ProForm = (props, ref) => {
77
77
  scrollToError = _props$scrollToError === void 0 ? true : _props$scrollToError,
78
78
  _props$optimize = props.optimize,
79
79
  optimize = _props$optimize === void 0 ? false : _props$optimize,
80
- _props$desensitizatio = props.desensitizationKey,
81
- desensitizationKey = _props$desensitizatio === void 0 ? 'zat-design-pro-component-desensitization' : _props$desensitizatio,
82
80
  _props$stopOnFirstErr = props.stopOnFirstError,
83
81
  stopOnFirstError = _props$stopOnFirstErr === void 0 ? false : _props$stopOnFirstErr,
84
82
  otherProps = (0, _objectWithoutProperties2.default)(props, _excluded);
@@ -274,8 +272,7 @@ var ProForm = (props, ref) => {
274
272
  clearNotShow: clearNotShow,
275
273
  requiredOnView: requiredOnView,
276
274
  required: required,
277
- globalControl: globalControl,
278
- desensitizationKey: desensitizationKey
275
+ globalControl: globalControl
279
276
  }), footerRender()]
280
277
  })), children]
281
278
  }));
@@ -46,7 +46,6 @@ export interface ProFormOtherType {
46
46
  formDisabled?: boolean;
47
47
  isDiffChange?: boolean;
48
48
  diffConfig?: DiffConfigType;
49
- desensitizationKey?: string;
50
49
  }
51
50
  export interface DiffConfigType<Values = any> {
52
51
  /** 比对原始数据源 */
@@ -99,8 +98,6 @@ export interface ProFormType<Values = any> extends FormProps<Values> {
99
98
  * 1. 开启不过滤names的中间态值
100
99
  */
101
100
  optimize?: boolean;
102
- /** 全局脱敏开关的key、默认 zat-design-pro-component-desensitization */
103
- desensitizationKey?: string;
104
101
  /** 是否在遇到第一个错误时停止验证 */
105
102
  stopOnFirstError?: boolean;
106
103
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MenuItemProps } from '../../propsType';
3
2
  export declare const MenuItem: (props: MenuItemProps) => JSX.Element;
4
3
  export default MenuItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ProStepItemType } from '../../propsType';
3
2
  declare const ProStepItem: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, order, ...restProps }: ProStepItemType) => JSX.Element;
4
3
  export default ProStepItem;
@@ -24,11 +24,12 @@ var renderSummary = props => {
24
24
  if (!(dataSource !== null && dataSource !== void 0 && dataSource.length)) {
25
25
  return null;
26
26
  }
27
- return typeof summary === 'object' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_table.default.Summary, {
27
+ return (0, _lodash.isObject)(summary) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_table.default.Summary, {
28
28
  fixed: fixed,
29
29
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_table.default.Summary.Row, {
30
30
  children: columns === null || columns === void 0 ? void 0 : columns.map(_ref2 => {
31
31
  var key = _ref2.key,
32
+ dataIndex = _ref2.dataIndex,
32
33
  index = _ref2.index,
33
34
  colSpan = _ref2.colSpan,
34
35
  prefix = _ref2.prefix,
@@ -36,19 +37,19 @@ var renderSummary = props => {
36
37
  title = _ref2.title,
37
38
  precision = _ref2.precision,
38
39
  valueType = _ref2.valueType;
40
+ var _key = key || dataIndex;
39
41
  var text = null;
40
42
  if (title) {
41
43
  text = title;
42
- } else if (total && key) {
44
+ } else if (total && _key) {
43
45
  var _dataSource$reduce;
44
46
  var format = _utils2.valueTypeRender === null || _utils2.valueTypeRender === void 0 ? void 0 : _utils2.valueTypeRender[valueType];
45
47
  var sum = dataSource === null || dataSource === void 0 || (_dataSource$reduce = dataSource.reduce) === null || _dataSource$reduce === void 0 ? void 0 : _dataSource$reduce.call(dataSource, (pre, cur) => {
46
48
  var _get;
47
- return _utils.tools.calc(pre, '+', (_get = (0, _lodash.get)(cur, key)) !== null && _get !== void 0 ? _get : 0);
49
+ return _utils.tools.calc(pre, '+', (_get = (0, _lodash.get)(cur, _key)) !== null && _get !== void 0 ? _get : 0);
48
50
  }, 0);
49
51
  text = format ? format(sum, precision !== null && precision !== void 0 ? precision : 2) : sum;
50
52
  }
51
- var _key = key;
52
53
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_table.default.Summary.Cell, {
53
54
  index: index,
54
55
  colSpan: colSpan,
@@ -9,12 +9,18 @@ import type { TabsProps } from 'antd/es/tabs';
9
9
  * 合计栏的每列配置参数
10
10
  */
11
11
  interface ProTableSummaryColumnType {
12
+ /**
13
+ * 配置列的 key
14
+ * @description 对应表格列的 key
15
+ * @default undefined
16
+ */
17
+ key?: string | string[];
12
18
  /**
13
19
  * 配置列的 dataIndex
14
20
  * @description 对应表格列的 dataIndex
15
21
  * @default undefined
16
22
  */
17
- key: string | string[];
23
+ dataIndex?: string | string[];
18
24
  /**
19
25
  * 配置列的下标
20
26
  * @description 列在表格中的索引位置
@@ -192,7 +198,7 @@ export interface ProTableColumnType extends Omit<ColumnType<any>, 'dataIndex'> {
192
198
  * @description 用于开启比对时,自定义 render 渲染初始值,触发条件必须写render
193
199
  * @default undefined
194
200
  */
195
- viewRender?: ({ value, record, index, originValue, originRecord, }: any) => 'same' | 'changed' | 'add' | undefined;
201
+ viewRender?: ({ value, record, index, originValue, originRecord }: any) => 'same' | 'changed' | 'add' | undefined;
196
202
  /**
197
203
  * 是否已更改
198
204
  * @description 标记列值是否已变更
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.13.20",
3
+ "version": "3.13.21-beta.2",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",