@zat-design/sisyphus-react 3.13.21-beta.1 → 3.13.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/ProForm/components/base/Input/index.js +20 -26
- package/es/ProForm/components/combination/Group/hooks/index.d.ts +0 -1
- package/es/ProForm/components/combination/Group/hooks/index.js +1 -3
- package/es/ProForm/components/combination/Group/index.js +1 -4
- package/es/ProForm/components/combination/Group/utils.d.ts +0 -1
- package/es/ProForm/components/render/RenderFields.d.ts +0 -1
- package/es/ProForm/components/render/RenderFields.js +2 -4
- package/es/ProForm/index.js +2 -5
- package/es/ProForm/propsType.d.ts +0 -3
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +2 -1
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -1
- package/es/ProTabs/style/index.less +5 -1
- package/lib/ProForm/components/base/Input/index.js +19 -25
- package/lib/ProForm/components/combination/Group/hooks/index.d.ts +0 -1
- package/lib/ProForm/components/combination/Group/hooks/index.js +1 -3
- package/lib/ProForm/components/combination/Group/index.js +1 -4
- package/lib/ProForm/components/combination/Group/utils.d.ts +0 -1
- package/lib/ProForm/components/render/RenderFields.d.ts +0 -1
- package/lib/ProForm/components/render/RenderFields.js +2 -4
- package/lib/ProForm/index.js +2 -5
- package/lib/ProForm/propsType.d.ts +0 -3
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -2
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -1
- package/lib/ProTabs/style/index.less +5 -1
- 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
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
};
|
|
@@ -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,
|
package/es/ProForm/index.js
CHANGED
|
@@ -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", "
|
|
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
|
}
|
|
@@ -5,13 +5,14 @@ import _Popover from "antd/es/popover";
|
|
|
5
5
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
6
|
import { useContext } from 'react';
|
|
7
7
|
import classnames from 'classnames';
|
|
8
|
-
import { Link } from 'react-router-dom';
|
|
8
|
+
import { Link as RouterLink } from 'react-router-dom';
|
|
9
9
|
import { Icon } from "../../index";
|
|
10
10
|
import SideMenu from "../SideMenu";
|
|
11
11
|
import { LayoutContext } from "../../../../index";
|
|
12
12
|
import { getUrlParams, getPathNameKey, findMenuItemByKey } from "../../../../utils";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
var Link = RouterLink;
|
|
15
16
|
var FoldMenu = props => {
|
|
16
17
|
var style = props.style,
|
|
17
18
|
dataSource = props.dataSource,
|
|
@@ -5,7 +5,7 @@ import { useMemo, useRef, useContext } from 'react';
|
|
|
5
5
|
import { useDeepCompareEffect, useSetState } from 'ahooks';
|
|
6
6
|
import { CaretDownOutlined } from '@ant-design/icons';
|
|
7
7
|
import classnames from 'classnames';
|
|
8
|
-
import { Link } from 'react-router-dom';
|
|
8
|
+
import { Link as RouterLink } from 'react-router-dom';
|
|
9
9
|
import { cloneDeep } from 'lodash';
|
|
10
10
|
import { LayoutContext } from "../../../../index";
|
|
11
11
|
import { getIdsByPathName, findMenuItemByKey } from "../../../../utils";
|
|
@@ -13,6 +13,7 @@ import { Icon } from "../../index";
|
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
var Link = RouterLink;
|
|
16
17
|
var OpenMenu = props => {
|
|
17
18
|
var _getIdsByPathName;
|
|
18
19
|
var className = props.className,
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
.pro-tabs-card-left {
|
|
9
9
|
width: 84px !important;
|
|
10
10
|
}
|
|
11
|
+
.pro-tabs-card-right {
|
|
12
|
+
width: 24px !important;
|
|
13
|
+
}
|
|
11
14
|
.pro-tabs-card-right img {
|
|
12
15
|
width: 24px !important;
|
|
13
16
|
}
|
|
@@ -96,7 +99,7 @@
|
|
|
96
99
|
|
|
97
100
|
.pro-tabs-card-right {
|
|
98
101
|
display: flex;
|
|
99
|
-
|
|
102
|
+
width: 48px;
|
|
100
103
|
img {
|
|
101
104
|
width: 48px;
|
|
102
105
|
}
|
|
@@ -125,6 +128,7 @@
|
|
|
125
128
|
width: 200px;
|
|
126
129
|
padding: calc(9px * var(--zaui-size; 1)) 16px calc(9px * var(--zaui-size; 1)) 24px;
|
|
127
130
|
border: 1px solid var(--zaui-line, #dddddd);
|
|
131
|
+
border-radius: var(--zaui-border-radius, 8px);
|
|
128
132
|
|
|
129
133
|
.pro-tabs-card-left {
|
|
130
134
|
width: 104px;
|
|
@@ -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
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
};
|
|
@@ -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,
|
package/lib/ProForm/index.js
CHANGED
|
@@ -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", "
|
|
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
|
}
|
|
@@ -18,6 +18,7 @@ var _SideMenu = _interopRequireDefault(require("../SideMenu"));
|
|
|
18
18
|
var _index2 = require("../../../../index");
|
|
19
19
|
var _utils = require("../../../../utils");
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
var Link = _reactRouterDom.Link;
|
|
21
22
|
var FoldMenu = props => {
|
|
22
23
|
var style = props.style,
|
|
23
24
|
dataSource = props.dataSource,
|
|
@@ -142,7 +143,7 @@ var FoldMenu = props => {
|
|
|
142
143
|
selectedPath: toPath
|
|
143
144
|
});
|
|
144
145
|
},
|
|
145
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
146
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Link, {
|
|
146
147
|
to: toPath,
|
|
147
148
|
children: LiNode
|
|
148
149
|
}, toPath)
|
|
@@ -162,7 +163,7 @@ var FoldMenu = props => {
|
|
|
162
163
|
});
|
|
163
164
|
}
|
|
164
165
|
},
|
|
165
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
166
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Link, {
|
|
166
167
|
to: toPath,
|
|
167
168
|
children: LiNode
|
|
168
169
|
}, toPath)
|
|
@@ -18,6 +18,7 @@ var _index = require("../../../../index");
|
|
|
18
18
|
var _utils = require("../../../../utils");
|
|
19
19
|
var _index2 = require("../../index");
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
var Link = _reactRouterDom.Link;
|
|
21
22
|
var OpenMenu = props => {
|
|
22
23
|
var _getIdsByPathName;
|
|
23
24
|
var className = props.className,
|
|
@@ -190,7 +191,7 @@ var OpenMenu = props => {
|
|
|
190
191
|
height: dataSource.sideMenu ? 'auto' : `calc(100vh - ${(dataSource === null || dataSource === void 0 ? void 0 : dataSource.height) || 0}px)`,
|
|
191
192
|
color: 'red'
|
|
192
193
|
}
|
|
193
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
194
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Link, {
|
|
194
195
|
to: router,
|
|
195
196
|
ref: linkRef
|
|
196
197
|
})]
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
.pro-tabs-card-left {
|
|
9
9
|
width: 84px !important;
|
|
10
10
|
}
|
|
11
|
+
.pro-tabs-card-right {
|
|
12
|
+
width: 24px !important;
|
|
13
|
+
}
|
|
11
14
|
.pro-tabs-card-right img {
|
|
12
15
|
width: 24px !important;
|
|
13
16
|
}
|
|
@@ -96,7 +99,7 @@
|
|
|
96
99
|
|
|
97
100
|
.pro-tabs-card-right {
|
|
98
101
|
display: flex;
|
|
99
|
-
|
|
102
|
+
width: 48px;
|
|
100
103
|
img {
|
|
101
104
|
width: 48px;
|
|
102
105
|
}
|
|
@@ -125,6 +128,7 @@
|
|
|
125
128
|
width: 200px;
|
|
126
129
|
padding: calc(9px * var(--zaui-size; 1)) 16px calc(9px * var(--zaui-size; 1)) 24px;
|
|
127
130
|
border: 1px solid var(--zaui-line, #dddddd);
|
|
131
|
+
border-radius: var(--zaui-border-radius, 8px);
|
|
128
132
|
|
|
129
133
|
.pro-tabs-card-left {
|
|
130
134
|
width: 104px;
|