@zat-design/sisyphus-react 3.4.2-beta.23 → 3.4.2-beta.25
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 +5 -8
- package/dist/less.esm.css +4 -7
- package/es/ProEditTable/components/RenderField/index.js +9 -5
- package/es/ProForm/style/index.less +0 -4
- package/es/ProLayout/components/ProHeader/style/index.less +2 -2
- package/es/ProTree/components/ProTreeSelect/index.js +5 -9
- package/es/style/theme/antd.less +1 -1
- package/lib/ProEditTable/components/RenderField/index.js +9 -5
- package/lib/ProForm/style/index.less +0 -4
- package/lib/ProLayout/components/ProHeader/style/index.less +2 -2
- package/lib/ProTree/components/ProTreeSelect/index.js +5 -9
- package/lib/style/theme/antd.less +1 -1
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
|
@@ -932,12 +932,12 @@
|
|
|
932
932
|
position: -webkit-sticky;
|
|
933
933
|
position: sticky;
|
|
934
934
|
z-index: 101;
|
|
935
|
-
-webkit-box-shadow: 0px
|
|
936
|
-
box-shadow: 0px
|
|
935
|
+
-webkit-box-shadow: 0px 2px 4px 0px rgba(0, 55, 93, 0.2);
|
|
936
|
+
box-shadow: 0px 2px 4px 0px rgba(0, 55, 93, 0.2);
|
|
937
937
|
}
|
|
938
938
|
.pro-header.pro-header-shadow {
|
|
939
|
-
-webkit-box-shadow: 0px
|
|
940
|
-
box-shadow: 0px
|
|
939
|
+
-webkit-box-shadow: 0px 2px 4px 0px rgba(0, 55, 93, 0.2);
|
|
940
|
+
box-shadow: 0px 2px 4px 0px rgba(0, 55, 93, 0.2);
|
|
941
941
|
}
|
|
942
942
|
.pro-header .ant-breadcrumb li {
|
|
943
943
|
color: #1d2129;
|
|
@@ -2611,9 +2611,6 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2611
2611
|
-ms-flex-align: normal;
|
|
2612
2612
|
align-items: normal;
|
|
2613
2613
|
}
|
|
2614
|
-
.pro-form.ant-form {
|
|
2615
|
-
margin-bottom: calc(var(--zaui-space-size-md, 16px) * var(--zaui-size, 1));
|
|
2616
|
-
}
|
|
2617
2614
|
.pro-form .pro-collapse-level2 .ant-collapse-item {
|
|
2618
2615
|
margin-bottom: 0 !important;
|
|
2619
2616
|
}
|
|
@@ -5045,7 +5042,7 @@ input[type='button'] {
|
|
|
5045
5042
|
-webkit-flex: 0 0 var(--zaui-form-label-width, 130px);
|
|
5046
5043
|
-ms-flex: 0 0 var(--zaui-form-label-width, 130px);
|
|
5047
5044
|
flex: 0 0 var(--zaui-form-label-width, 130px);
|
|
5048
|
-
padding-right: calc(var(--zaui-space-size-
|
|
5045
|
+
padding-right: calc(var(--zaui-space-size-md, 16px) * var(--zaui-size, 1));
|
|
5049
5046
|
overflow: initial;
|
|
5050
5047
|
line-height: 1;
|
|
5051
5048
|
white-space: pre-wrap;
|
package/dist/less.esm.css
CHANGED
|
@@ -932,12 +932,12 @@
|
|
|
932
932
|
position: -webkit-sticky;
|
|
933
933
|
position: sticky;
|
|
934
934
|
z-index: 101;
|
|
935
|
-
-webkit-box-shadow: 0px
|
|
936
|
-
box-shadow: 0px
|
|
935
|
+
-webkit-box-shadow: 0px 2px 4px 0px rgba(0, 55, 93, 0.2);
|
|
936
|
+
box-shadow: 0px 2px 4px 0px rgba(0, 55, 93, 0.2);
|
|
937
937
|
}
|
|
938
938
|
.pro-header.pro-header-shadow {
|
|
939
|
-
-webkit-box-shadow: 0px
|
|
940
|
-
box-shadow: 0px
|
|
939
|
+
-webkit-box-shadow: 0px 2px 4px 0px rgba(0, 55, 93, 0.2);
|
|
940
|
+
box-shadow: 0px 2px 4px 0px rgba(0, 55, 93, 0.2);
|
|
941
941
|
}
|
|
942
942
|
.pro-header .ant-breadcrumb li {
|
|
943
943
|
color: #1d2129;
|
|
@@ -2611,9 +2611,6 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2611
2611
|
-ms-flex-align: normal;
|
|
2612
2612
|
align-items: normal;
|
|
2613
2613
|
}
|
|
2614
|
-
.pro-form.ant-form {
|
|
2615
|
-
margin-bottom: calc(var(--zaui-space-size-md, 16px) * var(--zaui-size, 1));
|
|
2616
|
-
}
|
|
2617
2614
|
.pro-form .pro-collapse-level2 .ant-collapse-item {
|
|
2618
2615
|
margin-bottom: 0 !important;
|
|
2619
2616
|
}
|
|
@@ -29,7 +29,7 @@ import { useListChanged } from '../../../ProForm/utils/useListChanged';
|
|
|
29
29
|
import useRules from '../../../ProForm/utils/useRules';
|
|
30
30
|
import { isSelect } from '../../../ProForm/utils';
|
|
31
31
|
var RenderField = function RenderField(_ref) {
|
|
32
|
-
var _type, _type$replace, _fieldProps2, _fieldProps3, _fieldProps4, _names, _TargetComponent4;
|
|
32
|
+
var _type, _type$replace, _fieldProps2, _fieldProps3, _fieldProps4, _names, _TargetComponent4, _componentProps;
|
|
33
33
|
var value = _ref.text,
|
|
34
34
|
record = _ref.record,
|
|
35
35
|
index = _ref.index,
|
|
@@ -469,6 +469,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
469
469
|
form: form,
|
|
470
470
|
name: cellName
|
|
471
471
|
}, _fieldProps), (_TargetComponent4 = TargetComponent) === null || _TargetComponent4 === void 0 ? void 0 : _TargetComponent4.props), {}, {
|
|
472
|
+
namePath: [].concat(_toConsumableArray(namePath), [index]),
|
|
472
473
|
disabled: _disabled,
|
|
473
474
|
onChange: _onchange,
|
|
474
475
|
onBlur: _onblur,
|
|
@@ -481,6 +482,9 @@ var RenderField = function RenderField(_ref) {
|
|
|
481
482
|
isView: isView
|
|
482
483
|
}
|
|
483
484
|
});
|
|
485
|
+
if (type !== 'Group') {
|
|
486
|
+
componentProps = omit(componentProps, ['onFieldChange']);
|
|
487
|
+
}
|
|
484
488
|
// 单元格编辑时,设置各个单元格disabled属性
|
|
485
489
|
if (isCell) {
|
|
486
490
|
record["".concat(dataIndex, "-Disabled")] = _disabled;
|
|
@@ -506,11 +510,11 @@ var RenderField = function RenderField(_ref) {
|
|
|
506
510
|
}
|
|
507
511
|
var _className = classNames(_defineProperty(_defineProperty({}, className, className), 'pro-form-item-changed', changed));
|
|
508
512
|
var originalTitle = originalDiffTip ? _jsxs(_Space, {
|
|
509
|
-
children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/React.isValidElement(TargetComponent) ? ( /*#__PURE__*/React.cloneElement(TargetComponent, _objectSpread(_objectSpread({},
|
|
513
|
+
children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/React.isValidElement(TargetComponent) ? ( /*#__PURE__*/React.cloneElement(TargetComponent, _objectSpread(_objectSpread({}, componentProps), {}, {
|
|
510
514
|
isView: true,
|
|
511
515
|
value: originalValue,
|
|
512
516
|
checked: type === 'Switch' ? originalValue : undefined
|
|
513
|
-
}))) : _jsx(TargetComponent, _objectSpread(_objectSpread({},
|
|
517
|
+
}))) : _jsx(TargetComponent, _objectSpread(_objectSpread({}, componentProps), {}, {
|
|
514
518
|
isView: true,
|
|
515
519
|
value: originalValue,
|
|
516
520
|
checked: type === 'Switch' ? originalValue : undefined
|
|
@@ -521,12 +525,12 @@ var RenderField = function RenderField(_ref) {
|
|
|
521
525
|
}, omit(_formItemProps, ['render', 'cache', 'key', 'width', 'hiddenNames', 'name'])), {}, {
|
|
522
526
|
className: _className,
|
|
523
527
|
name: cellName,
|
|
524
|
-
children: /*#__PURE__*/React.isValidElement(TargetComponent) ? ( /*#__PURE__*/React.cloneElement(TargetComponent,
|
|
528
|
+
children: /*#__PURE__*/React.isValidElement(TargetComponent) ? ( /*#__PURE__*/React.cloneElement(TargetComponent, componentProps)) : _jsx(TargetComponent, _objectSpread({}, componentProps))
|
|
525
529
|
})) : _jsx(Container, {
|
|
526
530
|
viewEmpty: viewEmpty
|
|
527
531
|
});
|
|
528
532
|
return _jsx(FieldProvider, {
|
|
529
|
-
value: componentProps === null ||
|
|
533
|
+
value: (_componentProps = componentProps) === null || _componentProps === void 0 ? void 0 : _componentProps.otherProps,
|
|
530
534
|
children: !originalDiffTip || ['FormList', 'ProEditTable'].includes(type) ? FormItem : _jsx(_Tooltip, {
|
|
531
535
|
title: originalTitle,
|
|
532
536
|
open: changed ? undefined : false,
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
&.pro-header-fixed {
|
|
103
103
|
position: sticky;
|
|
104
104
|
z-index: 101;
|
|
105
|
-
box-shadow: 0px
|
|
105
|
+
box-shadow: 0px 2px 4px 0px rgba(0, 55, 93, 0.2);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
&.pro-header-shadow {
|
|
109
|
-
box-shadow: 0px
|
|
109
|
+
box-shadow: 0px 2px 4px 0px rgba(0, 55, 93, 0.2);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.@{ant-prefix}-breadcrumb {
|
|
@@ -11,6 +11,8 @@ import _TreeSelect from "antd/es/tree-select";
|
|
|
11
11
|
var _excluded = ["disabled", "code", "dataSource", "defaultDisableValue", "onChange", "useRequest", "transformResponse", "fieldNames", "tooltip", "showSearch", "filterTreeNode", "treeNodeFilterProp", "defaultExpandAll", "expandedKeys", "treeCheckable", "onSearch", "otherProps", "width", "dropdownStyle", "popupClassName", "style", "allowClear", "listHeight", "showCodeName", "className"],
|
|
12
12
|
_excluded2 = ["children"];
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
/* eslint-disable react/no-danger */
|
|
15
|
+
/* eslint-disable react/jsx-closing-tag-location */
|
|
14
16
|
import { useDeepCompareEffect, useRequest as useRequestFunc, useSetState } from 'ahooks';
|
|
15
17
|
import classnames from 'classnames';
|
|
16
18
|
import { useImperativeHandle, forwardRef } from 'react';
|
|
@@ -282,8 +284,7 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
282
284
|
*/
|
|
283
285
|
var renderTreeNode = function renderTreeNode(node, grade) {
|
|
284
286
|
var children = node.children,
|
|
285
|
-
icon = node.icon
|
|
286
|
-
hideNodeClass = node.hideNodeClass;
|
|
287
|
+
icon = node.icon;
|
|
287
288
|
var labelText = node[label];
|
|
288
289
|
var value = node[code];
|
|
289
290
|
var titleHtml = _jsx("span", {
|
|
@@ -302,10 +303,10 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
302
303
|
children: [_jsx("span", {
|
|
303
304
|
className: "check-option-text-content",
|
|
304
305
|
children: titleHtml
|
|
305
|
-
}), _jsx("span", {
|
|
306
|
+
}), !disabled ? _jsx("span", {
|
|
306
307
|
className: "check-mark-icon",
|
|
307
308
|
children: _jsx(Icon, {})
|
|
308
|
-
})]
|
|
309
|
+
}) : null]
|
|
309
310
|
});
|
|
310
311
|
if (!children) {
|
|
311
312
|
return _jsx(_TreeSelect.TreeNode, {
|
|
@@ -357,10 +358,6 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
357
358
|
item[label] = item[label].replace(regExp, "<span class=\"highlight-search-text\">".concat(keyWord, "</span>"));
|
|
358
359
|
}
|
|
359
360
|
currentAllNodeChild.push(item);
|
|
360
|
-
// if (tag || item?.children?.length) {
|
|
361
|
-
// // 如果子节点有匹配项或者自己匹配了那么都加入结果中
|
|
362
|
-
// currentAllNodeChild.push(item);
|
|
363
|
-
// }
|
|
364
361
|
}
|
|
365
362
|
return currentAllNodeChild;
|
|
366
363
|
};
|
|
@@ -473,7 +470,6 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
473
470
|
var treeProps = _objectSpread({
|
|
474
471
|
disabled: disabled,
|
|
475
472
|
showSearch: showSearch,
|
|
476
|
-
// filterTreeNode: filterTreeNodeEvent,
|
|
477
473
|
treeDefaultExpandAll: defaultExpandAll,
|
|
478
474
|
treeExpandedKeys: expandedKeys,
|
|
479
475
|
treeCheckable: treeCheckable,
|
package/es/style/theme/antd.less
CHANGED
|
@@ -32,7 +32,7 @@ var _excluded = ["type", "valueType", "names", "fieldProps", "labelRequired", "e
|
|
|
32
32
|
/* eslint-disable prefer-destructuring */
|
|
33
33
|
/* eslint-disable prefer-const */
|
|
34
34
|
var RenderField = function RenderField(_ref) {
|
|
35
|
-
var _type, _type$replace, _fieldProps2, _fieldProps3, _fieldProps4, _names, _TargetComponent4;
|
|
35
|
+
var _type, _type$replace, _fieldProps2, _fieldProps3, _fieldProps4, _names, _TargetComponent4, _componentProps;
|
|
36
36
|
var value = _ref.text,
|
|
37
37
|
record = _ref.record,
|
|
38
38
|
index = _ref.index,
|
|
@@ -472,6 +472,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
472
472
|
form: form,
|
|
473
473
|
name: cellName
|
|
474
474
|
}, _fieldProps), (_TargetComponent4 = TargetComponent) === null || _TargetComponent4 === void 0 ? void 0 : _TargetComponent4.props), {}, {
|
|
475
|
+
namePath: [].concat((0, _toConsumableArray2.default)(namePath), [index]),
|
|
475
476
|
disabled: _disabled,
|
|
476
477
|
onChange: _onchange,
|
|
477
478
|
onBlur: _onblur,
|
|
@@ -484,6 +485,9 @@ var RenderField = function RenderField(_ref) {
|
|
|
484
485
|
isView: isView
|
|
485
486
|
}
|
|
486
487
|
});
|
|
488
|
+
if (type !== 'Group') {
|
|
489
|
+
componentProps = (0, _lodash.omit)(componentProps, ['onFieldChange']);
|
|
490
|
+
}
|
|
487
491
|
// 单元格编辑时,设置各个单元格disabled属性
|
|
488
492
|
if (isCell) {
|
|
489
493
|
record["".concat(dataIndex, "-Disabled")] = _disabled;
|
|
@@ -509,11 +513,11 @@ var RenderField = function RenderField(_ref) {
|
|
|
509
513
|
}
|
|
510
514
|
var _className = (0, _classnames.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, className, className), 'pro-form-item-changed', changed));
|
|
511
515
|
var originalTitle = originalDiffTip ? (0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
512
|
-
children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({},
|
|
516
|
+
children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, componentProps), {}, {
|
|
513
517
|
isView: true,
|
|
514
518
|
value: originalValue,
|
|
515
519
|
checked: type === 'Switch' ? originalValue : undefined
|
|
516
|
-
}))) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({},
|
|
520
|
+
}))) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, componentProps), {}, {
|
|
517
521
|
isView: true,
|
|
518
522
|
value: originalValue,
|
|
519
523
|
checked: type === 'Switch' ? originalValue : undefined
|
|
@@ -524,12 +528,12 @@ var RenderField = function RenderField(_ref) {
|
|
|
524
528
|
}, (0, _lodash.omit)(_formItemProps, ['render', 'cache', 'key', 'width', 'hiddenNames', 'name'])), {}, {
|
|
525
529
|
className: _className,
|
|
526
530
|
name: cellName,
|
|
527
|
-
children: /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent,
|
|
531
|
+
children: /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent, componentProps)) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)({}, componentProps))
|
|
528
532
|
})) : (0, _jsxRuntime.jsx)(_Container.default, {
|
|
529
533
|
viewEmpty: viewEmpty
|
|
530
534
|
});
|
|
531
535
|
return (0, _jsxRuntime.jsx)(_useFieldProps.FieldProvider, {
|
|
532
|
-
value: componentProps === null ||
|
|
536
|
+
value: (_componentProps = componentProps) === null || _componentProps === void 0 ? void 0 : _componentProps.otherProps,
|
|
533
537
|
children: !originalDiffTip || ['FormList', 'ProEditTable'].includes(type) ? FormItem : (0, _jsxRuntime.jsx)(_antd.Tooltip, {
|
|
534
538
|
title: originalTitle,
|
|
535
539
|
open: changed ? undefined : false,
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
&.pro-header-fixed {
|
|
103
103
|
position: sticky;
|
|
104
104
|
z-index: 101;
|
|
105
|
-
box-shadow: 0px
|
|
105
|
+
box-shadow: 0px 2px 4px 0px rgba(0, 55, 93, 0.2);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
&.pro-header-shadow {
|
|
109
|
-
box-shadow: 0px
|
|
109
|
+
box-shadow: 0px 2px 4px 0px rgba(0, 55, 93, 0.2);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.@{ant-prefix}-breadcrumb {
|
|
@@ -19,6 +19,8 @@ var _ProConfigProvider = require("../../../ProConfigProvider");
|
|
|
19
19
|
var _Container = _interopRequireDefault(require("../../../ProForm/components/Container"));
|
|
20
20
|
var _excluded = ["disabled", "code", "dataSource", "defaultDisableValue", "onChange", "useRequest", "transformResponse", "fieldNames", "tooltip", "showSearch", "filterTreeNode", "treeNodeFilterProp", "defaultExpandAll", "expandedKeys", "treeCheckable", "onSearch", "otherProps", "width", "dropdownStyle", "popupClassName", "style", "allowClear", "listHeight", "showCodeName", "className"],
|
|
21
21
|
_excluded2 = ["children"];
|
|
22
|
+
/* eslint-disable react/no-danger */
|
|
23
|
+
/* eslint-disable react/jsx-closing-tag-location */
|
|
22
24
|
var SHOW_PARENT = _antd.TreeSelect.SHOW_PARENT;
|
|
23
25
|
var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
24
26
|
// 全局属性配置在ConfigProvider
|
|
@@ -284,8 +286,7 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
284
286
|
*/
|
|
285
287
|
var renderTreeNode = function renderTreeNode(node, grade) {
|
|
286
288
|
var children = node.children,
|
|
287
|
-
icon = node.icon
|
|
288
|
-
hideNodeClass = node.hideNodeClass;
|
|
289
|
+
icon = node.icon;
|
|
289
290
|
var labelText = node[label];
|
|
290
291
|
var value = node[code];
|
|
291
292
|
var titleHtml = (0, _jsxRuntime.jsx)("span", {
|
|
@@ -304,10 +305,10 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
304
305
|
children: [(0, _jsxRuntime.jsx)("span", {
|
|
305
306
|
className: "check-option-text-content",
|
|
306
307
|
children: titleHtml
|
|
307
|
-
}), (0, _jsxRuntime.jsx)("span", {
|
|
308
|
+
}), !disabled ? (0, _jsxRuntime.jsx)("span", {
|
|
308
309
|
className: "check-mark-icon",
|
|
309
310
|
children: (0, _jsxRuntime.jsx)(Icon, {})
|
|
310
|
-
})]
|
|
311
|
+
}) : null]
|
|
311
312
|
});
|
|
312
313
|
if (!children) {
|
|
313
314
|
return (0, _jsxRuntime.jsx)(_antd.TreeSelect.TreeNode, {
|
|
@@ -359,10 +360,6 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
359
360
|
item[label] = item[label].replace(regExp, "<span class=\"highlight-search-text\">".concat(keyWord, "</span>"));
|
|
360
361
|
}
|
|
361
362
|
currentAllNodeChild.push(item);
|
|
362
|
-
// if (tag || item?.children?.length) {
|
|
363
|
-
// // 如果子节点有匹配项或者自己匹配了那么都加入结果中
|
|
364
|
-
// currentAllNodeChild.push(item);
|
|
365
|
-
// }
|
|
366
363
|
}
|
|
367
364
|
return currentAllNodeChild;
|
|
368
365
|
};
|
|
@@ -475,7 +472,6 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
475
472
|
var treeProps = (0, _objectSpread2.default)({
|
|
476
473
|
disabled: disabled,
|
|
477
474
|
showSearch: showSearch,
|
|
478
|
-
// filterTreeNode: filterTreeNodeEvent,
|
|
479
475
|
treeDefaultExpandAll: defaultExpandAll,
|
|
480
476
|
treeExpandedKeys: expandedKeys,
|
|
481
477
|
treeCheckable: treeCheckable,
|