@zat-design/sisyphus-react 3.3.3-beta.5 → 3.3.3-beta.6
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 +7 -2
- package/es/ProForm/components/base/TextArea/index.js +1 -3
- package/es/ProForm/components/base/TextArea/index.less +7 -0
- package/es/ProForm/components/combination/Group/index.js +6 -1
- package/es/ProForm/components/combination/Group/style/index.less +2 -1
- package/es/ProForm/utils/useRules.js +4 -1
- package/lib/ProForm/components/base/TextArea/index.js +1 -3
- package/lib/ProForm/components/base/TextArea/index.less +7 -0
- package/lib/ProForm/components/combination/Group/index.js +6 -1
- package/lib/ProForm/components/combination/Group/style/index.less +2 -1
- package/lib/ProForm/utils/useRules.js +4 -1
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
|
@@ -1941,6 +1941,9 @@ div.pro-textarea-view::after {
|
|
|
1941
1941
|
display: none;
|
|
1942
1942
|
padding-bottom: 12px;
|
|
1943
1943
|
}
|
|
1944
|
+
.pro-textarea .ant-input {
|
|
1945
|
+
resize: auto !important;
|
|
1946
|
+
}
|
|
1944
1947
|
.pro-form-list-block-title {
|
|
1945
1948
|
height: 14px;
|
|
1946
1949
|
margin: calc(var(--zaui-space-size-xs, 4px) * var(--zaui-size, 1)) 0;
|
|
@@ -2233,10 +2236,12 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2233
2236
|
.pro-group {
|
|
2234
2237
|
width: unset !important;
|
|
2235
2238
|
}
|
|
2236
|
-
.pro-group.pro-group-diy-width .ant-space .ant-space-item
|
|
2239
|
+
.pro-group.pro-group-diy-width .ant-space .ant-space-item,
|
|
2240
|
+
.pro-group.pro-group-width-auto .ant-space .ant-space-item {
|
|
2237
2241
|
width: auto;
|
|
2238
2242
|
}
|
|
2239
|
-
.pro-group.pro-group-diy-width .ant-space .ant-space-item .ant-space-item
|
|
2243
|
+
.pro-group.pro-group-diy-width .ant-space .ant-space-item .ant-space-item,
|
|
2244
|
+
.pro-group.pro-group-width-auto .ant-space .ant-space-item .ant-space-item {
|
|
2240
2245
|
width: auto;
|
|
2241
2246
|
}
|
|
2242
2247
|
.pro-group .ant-space {
|
|
@@ -40,9 +40,7 @@ var TextAreaDef = function TextAreaDef(props) {
|
|
|
40
40
|
showCount: true,
|
|
41
41
|
autoComplete: "off",
|
|
42
42
|
placeholder: placeholder || "".concat(locale.ProForm.inputPlaceholder).concat(label || ''),
|
|
43
|
-
autoSize:
|
|
44
|
-
minRows: 4
|
|
45
|
-
}
|
|
43
|
+
autoSize: true
|
|
46
44
|
}, omit(initialConfig, ['trim'])), rest), {}, {
|
|
47
45
|
className: _className
|
|
48
46
|
}));
|
|
@@ -51,6 +51,9 @@ var Group = function Group(props) {
|
|
|
51
51
|
'pro-group-diy-width': columns.some(function (item) {
|
|
52
52
|
var _item$fieldProps, _item$fieldProps$styl;
|
|
53
53
|
return item === null || item === void 0 ? void 0 : (_item$fieldProps = item.fieldProps) === null || _item$fieldProps === void 0 ? void 0 : (_item$fieldProps$styl = _item$fieldProps.style) === null || _item$fieldProps$styl === void 0 ? void 0 : _item$fieldProps$styl.width;
|
|
54
|
+
}),
|
|
55
|
+
'pro-group-width-auto': columns.some(function (item) {
|
|
56
|
+
return ['Radio', 'Checkbox', 'Switch'].includes(item.type);
|
|
54
57
|
})
|
|
55
58
|
}, "".concat(className), className));
|
|
56
59
|
return _jsx("div", {
|
|
@@ -60,7 +63,9 @@ var Group = function Group(props) {
|
|
|
60
63
|
columns: data.columns,
|
|
61
64
|
form: form
|
|
62
65
|
}, omit(otherProps, ['colProps'])))
|
|
63
|
-
}) : _jsx(_Space, _objectSpread(_objectSpread({
|
|
66
|
+
}) : _jsx(_Space, _objectSpread(_objectSpread({
|
|
67
|
+
align: "start"
|
|
68
|
+
}, omit(space, ['separator', 'compact'])), {}, {
|
|
64
69
|
children: data.columns.map(function (column, index) {
|
|
65
70
|
return _jsx(RenderFields, _objectSpread({
|
|
66
71
|
columns: [column],
|
|
@@ -46,7 +46,7 @@ var useRules = function useRules(props) {
|
|
|
46
46
|
internalRule.rules = internalRule.rules && rulesCreator(internalRule.rules, _label, isSelect);
|
|
47
47
|
useEffect(function () {
|
|
48
48
|
// 添加完整性校验
|
|
49
|
-
if (names && !isBoolean(labelRequired)
|
|
49
|
+
if (names && !isBoolean(labelRequired)) {
|
|
50
50
|
var customRequired = {
|
|
51
51
|
validator: function validator(rules, value) {
|
|
52
52
|
// 完整性校验, 空数组不校验, 数组有值且值不完整则校验不通过
|
|
@@ -56,6 +56,9 @@ var useRules = function useRules(props) {
|
|
|
56
56
|
return Promise.resolve();
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
+
if (type === 'Group' && Array.isArray(names) && !required) {
|
|
60
|
+
customRequired = null;
|
|
61
|
+
}
|
|
59
62
|
internalRule.rules.push(customRequired);
|
|
60
63
|
}
|
|
61
64
|
}, [internalRule]);
|
|
@@ -46,9 +46,7 @@ var TextAreaDef = function TextAreaDef(props) {
|
|
|
46
46
|
showCount: true,
|
|
47
47
|
autoComplete: "off",
|
|
48
48
|
placeholder: placeholder || "".concat(_locale.default.ProForm.inputPlaceholder).concat(label || ''),
|
|
49
|
-
autoSize:
|
|
50
|
-
minRows: 4
|
|
51
|
-
}
|
|
49
|
+
autoSize: true
|
|
52
50
|
}, (0, _lodash.omit)(initialConfig, ['trim'])), rest), {}, {
|
|
53
51
|
className: _className
|
|
54
52
|
}));
|
|
@@ -55,6 +55,9 @@ var Group = function Group(props) {
|
|
|
55
55
|
'pro-group-diy-width': columns.some(function (item) {
|
|
56
56
|
var _item$fieldProps, _item$fieldProps$styl;
|
|
57
57
|
return item === null || item === void 0 ? void 0 : (_item$fieldProps = item.fieldProps) === null || _item$fieldProps === void 0 ? void 0 : (_item$fieldProps$styl = _item$fieldProps.style) === null || _item$fieldProps$styl === void 0 ? void 0 : _item$fieldProps$styl.width;
|
|
58
|
+
}),
|
|
59
|
+
'pro-group-width-auto': columns.some(function (item) {
|
|
60
|
+
return ['Radio', 'Checkbox', 'Switch'].includes(item.type);
|
|
58
61
|
})
|
|
59
62
|
}, "".concat(className), className));
|
|
60
63
|
return (0, _jsxRuntime.jsx)("div", {
|
|
@@ -64,7 +67,9 @@ var Group = function Group(props) {
|
|
|
64
67
|
columns: data.columns,
|
|
65
68
|
form: form
|
|
66
69
|
}, (0, _lodash.omit)(otherProps, ['colProps'])))
|
|
67
|
-
}) : (0, _jsxRuntime.jsx)(_antd.Space, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
70
|
+
}) : (0, _jsxRuntime.jsx)(_antd.Space, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
71
|
+
align: "start"
|
|
72
|
+
}, (0, _lodash.omit)(space, ['separator', 'compact'])), {}, {
|
|
68
73
|
children: data.columns.map(function (column, index) {
|
|
69
74
|
return (0, _jsxRuntime.jsx)(_RenderFields.default, (0, _objectSpread2.default)({
|
|
70
75
|
columns: [column],
|
|
@@ -53,7 +53,7 @@ var useRules = function useRules(props) {
|
|
|
53
53
|
internalRule.rules = internalRule.rules && (0, _rulesCreator.rulesCreator)(internalRule.rules, _label, isSelect);
|
|
54
54
|
(0, _react.useEffect)(function () {
|
|
55
55
|
// 添加完整性校验
|
|
56
|
-
if (names && !(0, _lodash.isBoolean)(labelRequired)
|
|
56
|
+
if (names && !(0, _lodash.isBoolean)(labelRequired)) {
|
|
57
57
|
var customRequired = {
|
|
58
58
|
validator: function validator(rules, value) {
|
|
59
59
|
// 完整性校验, 空数组不校验, 数组有值且值不完整则校验不通过
|
|
@@ -63,6 +63,9 @@ var useRules = function useRules(props) {
|
|
|
63
63
|
return Promise.resolve();
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
+
if (type === 'Group' && Array.isArray(names) && !required) {
|
|
67
|
+
customRequired = null;
|
|
68
|
+
}
|
|
66
69
|
internalRule.rules.push(customRequired);
|
|
67
70
|
}
|
|
68
71
|
}, [internalRule]);
|