@zat-design/sisyphus-react 3.4.3-beta.5 → 3.4.3-beta.7
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/ProEditTable/components/DndWrapper/index.js +1 -1
- package/es/ProEditTable/components/RenderField/index.js +15 -13
- package/es/ProEditTable/utils/transform.d.ts +2 -2
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/es/ProForm/components/render/Render.js +1 -5
- package/es/ProForm/utils/rulesCreator.js +17 -5
- package/es/ProForm/utils/valueType.d.ts +12 -6
- package/es/ProLayout/components/ProCollapse/style/index.less +1 -1
- package/es/ProThemeTools/component/PrdTools/index.js +0 -24
- package/es/ProTree/style/index.less +1 -1
- package/es/ProUpload/style/index.less +1 -1
- package/es/ProUtils/utils/index.d.ts +2 -2
- package/es/locale/en_US.d.ts +1 -0
- package/es/locale/en_US.js +1 -0
- package/es/locale/zh_CN.d.ts +1 -0
- package/es/locale/zh_CN.js +2 -1
- package/lib/ProEditTable/components/DndWrapper/index.js +1 -1
- package/lib/ProEditTable/components/RenderField/index.js +13 -11
- package/lib/ProEditTable/utils/transform.d.ts +2 -2
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/lib/ProForm/components/render/Render.js +1 -5
- package/lib/ProForm/utils/rulesCreator.js +17 -5
- package/lib/ProForm/utils/valueType.d.ts +12 -6
- package/lib/ProLayout/components/ProCollapse/style/index.less +1 -1
- package/lib/ProThemeTools/component/PrdTools/index.js +0 -24
- package/lib/ProTree/style/index.less +1 -1
- package/lib/ProUpload/style/index.less +1 -1
- package/lib/ProUtils/utils/index.d.ts +2 -2
- package/lib/locale/en_US.d.ts +1 -0
- package/lib/locale/en_US.js +1 -0
- package/lib/locale/zh_CN.d.ts +1 -0
- package/lib/locale/zh_CN.js +2 -1
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
display: block !important;
|
|
690
690
|
}
|
|
691
691
|
.pro-collapse.ant-collapse .pro-collapse-panel {
|
|
692
|
-
margin-bottom:
|
|
692
|
+
margin-bottom: 16px;
|
|
693
693
|
}
|
|
694
694
|
.pro-collapse .ant-collapse-header {
|
|
695
695
|
-webkit-box-align: center !important;
|
package/dist/less.esm.css
CHANGED
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
display: block !important;
|
|
690
690
|
}
|
|
691
691
|
.pro-collapse.ant-collapse .pro-collapse-panel {
|
|
692
|
-
margin-bottom:
|
|
692
|
+
margin-bottom: 16px;
|
|
693
693
|
}
|
|
694
694
|
.pro-collapse .ant-collapse-header {
|
|
695
695
|
-webkit-box-align: center !important;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "antd/es/tooltip/style";
|
|
2
2
|
import _Tooltip from "antd/es/tooltip";
|
|
3
|
-
import "antd/es/form/style";
|
|
4
|
-
import _Form from "antd/es/form";
|
|
5
3
|
import "antd/es/space/style";
|
|
6
4
|
import _Space from "antd/es/space";
|
|
5
|
+
import "antd/es/form/style";
|
|
6
|
+
import _Form from "antd/es/form";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
8
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
9
9
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
@@ -72,7 +72,8 @@ var RenderField = function RenderField(_ref) {
|
|
|
72
72
|
virtualKey = config.virtualKey,
|
|
73
73
|
viewEmpty = config.viewEmpty,
|
|
74
74
|
originalValues = config.originalValues,
|
|
75
|
-
|
|
75
|
+
_config$originalDiffT = config.originalDiffTip,
|
|
76
|
+
originalDiffTip = _config$originalDiffT === void 0 ? true : _config$originalDiffT;
|
|
76
77
|
var _fieldProps = fieldProps || formItemProps || {};
|
|
77
78
|
var _rules = rules || [];
|
|
78
79
|
var _required = required;
|
|
@@ -515,7 +516,16 @@ var RenderField = function RenderField(_ref) {
|
|
|
515
516
|
delete _formItemProps.rules;
|
|
516
517
|
}
|
|
517
518
|
var _className = classNames(_defineProperty(_defineProperty({}, className, className), 'pro-form-item-changed', changed));
|
|
518
|
-
var
|
|
519
|
+
var FormItem = TargetComponent ? _jsx(_Form.Item, _objectSpread(_objectSpread({
|
|
520
|
+
validateFirst: true
|
|
521
|
+
}, omit(_formItemProps, ['render', 'cache', 'key', 'width', 'hiddenNames', 'name'])), {}, {
|
|
522
|
+
className: _className,
|
|
523
|
+
name: cellName,
|
|
524
|
+
children: /*#__PURE__*/React.isValidElement(TargetComponent) ? ( /*#__PURE__*/React.cloneElement(TargetComponent, componentProps)) : _jsx(TargetComponent, _objectSpread({}, componentProps))
|
|
525
|
+
})) : _jsx(Container, {
|
|
526
|
+
viewEmpty: viewEmpty
|
|
527
|
+
});
|
|
528
|
+
var originalTitle = originalDiffTip && originalValues ? _jsxs(_Space, {
|
|
519
529
|
children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/React.isValidElement(TargetComponent) ? ( /*#__PURE__*/React.cloneElement(TargetComponent, _objectSpread(_objectSpread({}, componentProps), {}, {
|
|
520
530
|
isView: true,
|
|
521
531
|
value: originalValue,
|
|
@@ -526,19 +536,11 @@ var RenderField = function RenderField(_ref) {
|
|
|
526
536
|
checked: type === 'Switch' ? originalValue : undefined
|
|
527
537
|
}))]
|
|
528
538
|
}) : null;
|
|
529
|
-
var FormItem = TargetComponent ? _jsx(_Form.Item, _objectSpread(_objectSpread({
|
|
530
|
-
validateFirst: true
|
|
531
|
-
}, omit(_formItemProps, ['render', 'cache', 'key', 'width', 'hiddenNames', 'name'])), {}, {
|
|
532
|
-
className: _className,
|
|
533
|
-
name: cellName,
|
|
534
|
-
children: /*#__PURE__*/React.isValidElement(TargetComponent) ? ( /*#__PURE__*/React.cloneElement(TargetComponent, componentProps)) : _jsx(TargetComponent, _objectSpread({}, componentProps))
|
|
535
|
-
})) : _jsx(Container, {
|
|
536
|
-
viewEmpty: viewEmpty
|
|
537
|
-
});
|
|
538
539
|
return _jsx(FieldProvider, {
|
|
539
540
|
value: (_componentProps = componentProps) === null || _componentProps === void 0 ? void 0 : _componentProps.otherProps,
|
|
540
541
|
children: !originalDiffTip || ['FormList', 'ProEditTable'].includes(type) ? FormItem : _jsx(_Tooltip, {
|
|
541
542
|
title: originalTitle,
|
|
543
|
+
placement: "topLeft",
|
|
542
544
|
open: changed ? undefined : false,
|
|
543
545
|
getPopupContainer: function getPopupContainer(target) {
|
|
544
546
|
return target.parentElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
RangePicker: () => any
|
|
3
|
-
DatePicker: () => any
|
|
2
|
+
RangePicker: () => import("@zat-design/utils/dist/esm/transforms/propTypes").Transform<any>;
|
|
3
|
+
DatePicker: () => import("@zat-design/utils/dist/esm/transforms/propTypes").Transform<any>;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
@@ -222,12 +222,8 @@ var Render = function Render(props) {
|
|
|
222
222
|
if (valueType) {
|
|
223
223
|
_args[2].transformValue = form.getFieldValue(_otherFormItemProps === null || _otherFormItemProps === void 0 ? void 0 : _otherFormItemProps.name) || undefined;
|
|
224
224
|
}
|
|
225
|
+
_args[2].option = args[1];
|
|
225
226
|
switch (type) {
|
|
226
|
-
case 'ProSelect':
|
|
227
|
-
case 'ProModalSelect':
|
|
228
|
-
case 'ProEnum':
|
|
229
|
-
_args[2].option = args[1];
|
|
230
|
-
break;
|
|
231
227
|
case 'ProAddressBar':
|
|
232
228
|
_args[2].selectedOptions = args[1];
|
|
233
229
|
break;
|
|
@@ -46,12 +46,24 @@ export var rulesCreator = function rulesCreator(_ref) {
|
|
|
46
46
|
if ((names === null || names === void 0 ? void 0 : names.length) && (required === null || required === void 0 ? void 0 : required.length)) {
|
|
47
47
|
var customRequired = {
|
|
48
48
|
validator: function validator(rules, value) {
|
|
49
|
-
var
|
|
49
|
+
var _errorValues3;
|
|
50
|
+
var errorValues = getNonEmptyValuesByIndex(required, value);
|
|
51
|
+
if ((value === null || value === void 0 ? void 0 : value.length) === 2) {
|
|
52
|
+
var _errorValues;
|
|
53
|
+
errorValues = errorValues.map(function (item) {
|
|
54
|
+
var _locale$ProForm;
|
|
55
|
+
return locale === null || locale === void 0 ? void 0 : (_locale$ProForm = locale.ProForm) === null || _locale$ProForm === void 0 ? void 0 : _locale$ProForm.ruleStartEndText[item - 1];
|
|
56
|
+
});
|
|
57
|
+
if ((_errorValues = errorValues) === null || _errorValues === void 0 ? void 0 : _errorValues.length) {
|
|
58
|
+
var _locale$ProForm2, _errorValues2;
|
|
59
|
+
return Promise.reject(new Error("".concat(locale === null || locale === void 0 ? void 0 : (_locale$ProForm2 = locale.ProForm) === null || _locale$ProForm2 === void 0 ? void 0 : _locale$ProForm2.inputPlaceholder).concat((_errorValues2 = errorValues) === null || _errorValues2 === void 0 ? void 0 : _errorValues2.join(','))));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
50
62
|
// 校验为true的值是否存在
|
|
51
|
-
if (Array.isArray(value) && (
|
|
52
|
-
var _locale$
|
|
53
|
-
return Promise.reject(new Error("".concat(formatMessage(locale === null || locale === void 0 ? void 0 : (_locale$
|
|
54
|
-
total:
|
|
63
|
+
if (Array.isArray(value) && ((_errorValues3 = errorValues) === null || _errorValues3 === void 0 ? void 0 : _errorValues3.length)) {
|
|
64
|
+
var _locale$ProForm3, _errorValues4;
|
|
65
|
+
return Promise.reject(new Error("".concat(formatMessage(locale === null || locale === void 0 ? void 0 : (_locale$ProForm3 = locale.ProForm) === null || _locale$ProForm3 === void 0 ? void 0 : _locale$ProForm3.halfRuleText, {
|
|
66
|
+
total: (_errorValues4 = errorValues) === null || _errorValues4 === void 0 ? void 0 : _errorValues4.join(',')
|
|
55
67
|
}))));
|
|
56
68
|
}
|
|
57
69
|
return Promise.resolve();
|
|
@@ -4,31 +4,31 @@ declare const _default: {
|
|
|
4
4
|
type: any;
|
|
5
5
|
toISOString: any;
|
|
6
6
|
mode: any;
|
|
7
|
-
}) =>
|
|
7
|
+
}) => {};
|
|
8
8
|
/** 年月日 时分秒 */
|
|
9
9
|
dateTime: ({ type, toISOString, mode }: {
|
|
10
10
|
type: any;
|
|
11
11
|
toISOString: any;
|
|
12
12
|
mode: any;
|
|
13
|
-
}) =>
|
|
13
|
+
}) => {};
|
|
14
14
|
/** 年月日 00:00:00 */
|
|
15
15
|
dateStartTime: ({ type, toISOString, mode }: {
|
|
16
16
|
type: any;
|
|
17
17
|
toISOString: any;
|
|
18
18
|
mode: any;
|
|
19
|
-
}) =>
|
|
19
|
+
}) => {};
|
|
20
20
|
/** 年月日 23:59:59 */
|
|
21
21
|
dateEndTime: ({ type, toISOString, mode }: {
|
|
22
22
|
type: any;
|
|
23
23
|
toISOString: any;
|
|
24
24
|
mode: any;
|
|
25
|
-
}) =>
|
|
25
|
+
}) => {};
|
|
26
26
|
/** 年月日 00:00:00 ~ 年月日 23:59:59 */
|
|
27
27
|
dateStartEndTime: ({ type, toISOString, mode }: {
|
|
28
28
|
type: any;
|
|
29
29
|
toISOString: any;
|
|
30
30
|
mode: any;
|
|
31
|
-
}) =>
|
|
31
|
+
}) => {};
|
|
32
32
|
/** 百分比 */
|
|
33
33
|
percentage: ({ type, valueType }: {
|
|
34
34
|
type: any;
|
|
@@ -58,6 +58,12 @@ declare const _default: {
|
|
|
58
58
|
/** 开关 YN转换 */
|
|
59
59
|
switch: ({ switchValue }: {
|
|
60
60
|
switchValue: any;
|
|
61
|
-
}) =>
|
|
61
|
+
}) => Error | {
|
|
62
|
+
normalize: (value: boolean) => any;
|
|
63
|
+
getValueProps: (value: any) => {
|
|
64
|
+
checked: boolean;
|
|
65
|
+
value: any;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
62
68
|
};
|
|
63
69
|
export default _default;
|
|
@@ -171,30 +171,6 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
171
171
|
})]
|
|
172
172
|
})
|
|
173
173
|
})]
|
|
174
|
-
}), _jsxs("div", {
|
|
175
|
-
className: "pro-theme-tools-box pro-theme-tools-space pro-theme-tools-small-space",
|
|
176
|
-
children: [_jsx("div", {
|
|
177
|
-
className: "pro-theme-tools-item",
|
|
178
|
-
children: _jsx("p", {
|
|
179
|
-
children: "".concat(locale.ProThemeTools.bigText)
|
|
180
|
-
})
|
|
181
|
-
}), _jsx("div", {
|
|
182
|
-
className: "pro-theme-tools-item",
|
|
183
|
-
children: _jsx(_Switch, {
|
|
184
|
-
checkedChildren: "".concat(locale.ProThemeTools.switchText[0]),
|
|
185
|
-
unCheckedChildren: "".concat(locale.ProThemeTools.switchText[1]),
|
|
186
|
-
checked: state.zauiBigText,
|
|
187
|
-
onClick: function onClick(value) {
|
|
188
|
-
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
189
|
-
zauiBaseFontSize: value ? 2 : 0,
|
|
190
|
-
zauiBigText: value
|
|
191
|
-
}));
|
|
192
|
-
setThemes({
|
|
193
|
-
'zaui-base-font-size': value ? '2px' : '0px'
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
})
|
|
197
|
-
})]
|
|
198
174
|
}), tableBorder && _jsxs("div", {
|
|
199
175
|
className: "pro-theme-tools-box pro-theme-tools-space pro-theme-tools-small-space",
|
|
200
176
|
children: [_jsx("div", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const valueTypeRender: {
|
|
2
|
-
percentage: (val: any, precision: any) =>
|
|
3
|
-
permillage: (val: any, precision: any) =>
|
|
2
|
+
percentage: (val: any, precision: any) => string;
|
|
3
|
+
permillage: (val: any, precision: any) => string;
|
|
4
4
|
thousandth: (val: any, precision: any) => string;
|
|
5
5
|
thousandthCNY: (val: any, precision: any) => string;
|
|
6
6
|
};
|
package/es/locale/en_US.d.ts
CHANGED
package/es/locale/en_US.js
CHANGED
package/es/locale/zh_CN.d.ts
CHANGED
package/es/locale/zh_CN.js
CHANGED
|
@@ -27,11 +27,12 @@ export default {
|
|
|
27
27
|
inputPlaceholder: '请输入',
|
|
28
28
|
selectPlaceHolder: '请选择',
|
|
29
29
|
switchText: ['是', '否'],
|
|
30
|
+
ruleStartEndText: ['起始值', '截止值'],
|
|
30
31
|
search: '查询',
|
|
31
32
|
reset: '重置',
|
|
32
33
|
ruleText: '正确的',
|
|
33
34
|
completeText: '请完整输入',
|
|
34
|
-
halfRuleText: '请输入第({total})
|
|
35
|
+
halfRuleText: '请输入第({total})个表单的值',
|
|
35
36
|
formList_actions: ['新增', '删除', '复制', '上移', '下移', '新增一行'],
|
|
36
37
|
formList_confirmMessage: '确认删除吗?'
|
|
37
38
|
},
|
|
@@ -35,7 +35,7 @@ var Row = exports.Row = function Row(props) {
|
|
|
35
35
|
transition: transition
|
|
36
36
|
}, isDragging ? {
|
|
37
37
|
position: 'relative',
|
|
38
|
-
zIndex:
|
|
38
|
+
zIndex: 2
|
|
39
39
|
} : {});
|
|
40
40
|
return (0, _jsxRuntime.jsx)("tr", (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, restProps), {}, {
|
|
41
41
|
ref: setNodeRef,
|
|
@@ -75,7 +75,8 @@ var RenderField = function RenderField(_ref) {
|
|
|
75
75
|
virtualKey = config.virtualKey,
|
|
76
76
|
viewEmpty = config.viewEmpty,
|
|
77
77
|
originalValues = config.originalValues,
|
|
78
|
-
|
|
78
|
+
_config$originalDiffT = config.originalDiffTip,
|
|
79
|
+
originalDiffTip = _config$originalDiffT === void 0 ? true : _config$originalDiffT;
|
|
79
80
|
var _fieldProps = fieldProps || formItemProps || {};
|
|
80
81
|
var _rules = rules || [];
|
|
81
82
|
var _required = required;
|
|
@@ -518,7 +519,16 @@ var RenderField = function RenderField(_ref) {
|
|
|
518
519
|
delete _formItemProps.rules;
|
|
519
520
|
}
|
|
520
521
|
var _className = (0, _classnames.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, className, className), 'pro-form-item-changed', changed));
|
|
521
|
-
var
|
|
522
|
+
var FormItem = TargetComponent ? (0, _jsxRuntime.jsx)(_antd.Form.Item, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
523
|
+
validateFirst: true
|
|
524
|
+
}, (0, _lodash.omit)(_formItemProps, ['render', 'cache', 'key', 'width', 'hiddenNames', 'name'])), {}, {
|
|
525
|
+
className: _className,
|
|
526
|
+
name: cellName,
|
|
527
|
+
children: /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent, componentProps)) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)({}, componentProps))
|
|
528
|
+
})) : (0, _jsxRuntime.jsx)(_Container.default, {
|
|
529
|
+
viewEmpty: viewEmpty
|
|
530
|
+
});
|
|
531
|
+
var originalTitle = originalDiffTip && originalValues ? (0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
522
532
|
children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, componentProps), {}, {
|
|
523
533
|
isView: true,
|
|
524
534
|
value: originalValue,
|
|
@@ -529,19 +539,11 @@ var RenderField = function RenderField(_ref) {
|
|
|
529
539
|
checked: type === 'Switch' ? originalValue : undefined
|
|
530
540
|
}))]
|
|
531
541
|
}) : null;
|
|
532
|
-
var FormItem = TargetComponent ? (0, _jsxRuntime.jsx)(_antd.Form.Item, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
533
|
-
validateFirst: true
|
|
534
|
-
}, (0, _lodash.omit)(_formItemProps, ['render', 'cache', 'key', 'width', 'hiddenNames', 'name'])), {}, {
|
|
535
|
-
className: _className,
|
|
536
|
-
name: cellName,
|
|
537
|
-
children: /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent, componentProps)) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)({}, componentProps))
|
|
538
|
-
})) : (0, _jsxRuntime.jsx)(_Container.default, {
|
|
539
|
-
viewEmpty: viewEmpty
|
|
540
|
-
});
|
|
541
542
|
return (0, _jsxRuntime.jsx)(_useFieldProps.FieldProvider, {
|
|
542
543
|
value: (_componentProps = componentProps) === null || _componentProps === void 0 ? void 0 : _componentProps.otherProps,
|
|
543
544
|
children: !originalDiffTip || ['FormList', 'ProEditTable'].includes(type) ? FormItem : (0, _jsxRuntime.jsx)(_antd.Tooltip, {
|
|
544
545
|
title: originalTitle,
|
|
546
|
+
placement: "topLeft",
|
|
545
547
|
open: changed ? undefined : false,
|
|
546
548
|
getPopupContainer: function getPopupContainer(target) {
|
|
547
549
|
return target.parentElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
RangePicker: () => any
|
|
3
|
-
DatePicker: () => any
|
|
2
|
+
RangePicker: () => import("@zat-design/utils/dist/esm/transforms/propTypes").Transform<any>;
|
|
3
|
+
DatePicker: () => import("@zat-design/utils/dist/esm/transforms/propTypes").Transform<any>;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
@@ -220,12 +220,8 @@ var Render = function Render(props) {
|
|
|
220
220
|
if (valueType) {
|
|
221
221
|
_args[2].transformValue = form.getFieldValue(_otherFormItemProps === null || _otherFormItemProps === void 0 ? void 0 : _otherFormItemProps.name) || undefined;
|
|
222
222
|
}
|
|
223
|
+
_args[2].option = args[1];
|
|
223
224
|
switch (type) {
|
|
224
|
-
case 'ProSelect':
|
|
225
|
-
case 'ProModalSelect':
|
|
226
|
-
case 'ProEnum':
|
|
227
|
-
_args[2].option = args[1];
|
|
228
|
-
break;
|
|
229
225
|
case 'ProAddressBar':
|
|
230
226
|
_args[2].selectedOptions = args[1];
|
|
231
227
|
break;
|
|
@@ -54,12 +54,24 @@ var rulesCreator = exports.rulesCreator = function rulesCreator(_ref) {
|
|
|
54
54
|
if ((names === null || names === void 0 ? void 0 : names.length) && (required === null || required === void 0 ? void 0 : required.length)) {
|
|
55
55
|
var customRequired = {
|
|
56
56
|
validator: function validator(rules, value) {
|
|
57
|
-
var
|
|
57
|
+
var _errorValues3;
|
|
58
|
+
var errorValues = getNonEmptyValuesByIndex(required, value);
|
|
59
|
+
if ((value === null || value === void 0 ? void 0 : value.length) === 2) {
|
|
60
|
+
var _errorValues;
|
|
61
|
+
errorValues = errorValues.map(function (item) {
|
|
62
|
+
var _locale$ProForm;
|
|
63
|
+
return _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProForm = _locale.default.ProForm) === null || _locale$ProForm === void 0 ? void 0 : _locale$ProForm.ruleStartEndText[item - 1];
|
|
64
|
+
});
|
|
65
|
+
if ((_errorValues = errorValues) === null || _errorValues === void 0 ? void 0 : _errorValues.length) {
|
|
66
|
+
var _locale$ProForm2, _errorValues2;
|
|
67
|
+
return Promise.reject(new Error("".concat(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProForm2 = _locale.default.ProForm) === null || _locale$ProForm2 === void 0 ? void 0 : _locale$ProForm2.inputPlaceholder).concat((_errorValues2 = errorValues) === null || _errorValues2 === void 0 ? void 0 : _errorValues2.join(','))));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
58
70
|
// 校验为true的值是否存在
|
|
59
|
-
if (Array.isArray(value) && (
|
|
60
|
-
var _locale$
|
|
61
|
-
return Promise.reject(new Error("".concat((0, _locale.formatMessage)(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$
|
|
62
|
-
total:
|
|
71
|
+
if (Array.isArray(value) && ((_errorValues3 = errorValues) === null || _errorValues3 === void 0 ? void 0 : _errorValues3.length)) {
|
|
72
|
+
var _locale$ProForm3, _errorValues4;
|
|
73
|
+
return Promise.reject(new Error("".concat((0, _locale.formatMessage)(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProForm3 = _locale.default.ProForm) === null || _locale$ProForm3 === void 0 ? void 0 : _locale$ProForm3.halfRuleText, {
|
|
74
|
+
total: (_errorValues4 = errorValues) === null || _errorValues4 === void 0 ? void 0 : _errorValues4.join(',')
|
|
63
75
|
}))));
|
|
64
76
|
}
|
|
65
77
|
return Promise.resolve();
|
|
@@ -4,31 +4,31 @@ declare const _default: {
|
|
|
4
4
|
type: any;
|
|
5
5
|
toISOString: any;
|
|
6
6
|
mode: any;
|
|
7
|
-
}) =>
|
|
7
|
+
}) => {};
|
|
8
8
|
/** 年月日 时分秒 */
|
|
9
9
|
dateTime: ({ type, toISOString, mode }: {
|
|
10
10
|
type: any;
|
|
11
11
|
toISOString: any;
|
|
12
12
|
mode: any;
|
|
13
|
-
}) =>
|
|
13
|
+
}) => {};
|
|
14
14
|
/** 年月日 00:00:00 */
|
|
15
15
|
dateStartTime: ({ type, toISOString, mode }: {
|
|
16
16
|
type: any;
|
|
17
17
|
toISOString: any;
|
|
18
18
|
mode: any;
|
|
19
|
-
}) =>
|
|
19
|
+
}) => {};
|
|
20
20
|
/** 年月日 23:59:59 */
|
|
21
21
|
dateEndTime: ({ type, toISOString, mode }: {
|
|
22
22
|
type: any;
|
|
23
23
|
toISOString: any;
|
|
24
24
|
mode: any;
|
|
25
|
-
}) =>
|
|
25
|
+
}) => {};
|
|
26
26
|
/** 年月日 00:00:00 ~ 年月日 23:59:59 */
|
|
27
27
|
dateStartEndTime: ({ type, toISOString, mode }: {
|
|
28
28
|
type: any;
|
|
29
29
|
toISOString: any;
|
|
30
30
|
mode: any;
|
|
31
|
-
}) =>
|
|
31
|
+
}) => {};
|
|
32
32
|
/** 百分比 */
|
|
33
33
|
percentage: ({ type, valueType }: {
|
|
34
34
|
type: any;
|
|
@@ -58,6 +58,12 @@ declare const _default: {
|
|
|
58
58
|
/** 开关 YN转换 */
|
|
59
59
|
switch: ({ switchValue }: {
|
|
60
60
|
switchValue: any;
|
|
61
|
-
}) =>
|
|
61
|
+
}) => Error | {
|
|
62
|
+
normalize: (value: boolean) => any;
|
|
63
|
+
getValueProps: (value: any) => {
|
|
64
|
+
checked: boolean;
|
|
65
|
+
value: any;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
62
68
|
};
|
|
63
69
|
export default _default;
|
|
@@ -171,30 +171,6 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
171
171
|
})]
|
|
172
172
|
})
|
|
173
173
|
})]
|
|
174
|
-
}), (0, _jsxRuntime.jsxs)("div", {
|
|
175
|
-
className: "pro-theme-tools-box pro-theme-tools-space pro-theme-tools-small-space",
|
|
176
|
-
children: [(0, _jsxRuntime.jsx)("div", {
|
|
177
|
-
className: "pro-theme-tools-item",
|
|
178
|
-
children: (0, _jsxRuntime.jsx)("p", {
|
|
179
|
-
children: "".concat(_locale.default.ProThemeTools.bigText)
|
|
180
|
-
})
|
|
181
|
-
}), (0, _jsxRuntime.jsx)("div", {
|
|
182
|
-
className: "pro-theme-tools-item",
|
|
183
|
-
children: (0, _jsxRuntime.jsx)(_antd.Switch, {
|
|
184
|
-
checkedChildren: "".concat(_locale.default.ProThemeTools.switchText[0]),
|
|
185
|
-
unCheckedChildren: "".concat(_locale.default.ProThemeTools.switchText[1]),
|
|
186
|
-
checked: state.zauiBigText,
|
|
187
|
-
onClick: function onClick(value) {
|
|
188
|
-
setState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
189
|
-
zauiBaseFontSize: value ? 2 : 0,
|
|
190
|
-
zauiBigText: value
|
|
191
|
-
}));
|
|
192
|
-
(0, _index.setThemes)({
|
|
193
|
-
'zaui-base-font-size': value ? '2px' : '0px'
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
})
|
|
197
|
-
})]
|
|
198
174
|
}), tableBorder && (0, _jsxRuntime.jsxs)("div", {
|
|
199
175
|
className: "pro-theme-tools-box pro-theme-tools-space pro-theme-tools-small-space",
|
|
200
176
|
children: [(0, _jsxRuntime.jsx)("div", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const valueTypeRender: {
|
|
2
|
-
percentage: (val: any, precision: any) =>
|
|
3
|
-
permillage: (val: any, precision: any) =>
|
|
2
|
+
percentage: (val: any, precision: any) => string;
|
|
3
|
+
permillage: (val: any, precision: any) => string;
|
|
4
4
|
thousandth: (val: any, precision: any) => string;
|
|
5
5
|
thousandthCNY: (val: any, precision: any) => string;
|
|
6
6
|
};
|
package/lib/locale/en_US.d.ts
CHANGED
package/lib/locale/en_US.js
CHANGED
package/lib/locale/zh_CN.d.ts
CHANGED
package/lib/locale/zh_CN.js
CHANGED
|
@@ -33,11 +33,12 @@ var _default = exports.default = {
|
|
|
33
33
|
inputPlaceholder: '请输入',
|
|
34
34
|
selectPlaceHolder: '请选择',
|
|
35
35
|
switchText: ['是', '否'],
|
|
36
|
+
ruleStartEndText: ['起始值', '截止值'],
|
|
36
37
|
search: '查询',
|
|
37
38
|
reset: '重置',
|
|
38
39
|
ruleText: '正确的',
|
|
39
40
|
completeText: '请完整输入',
|
|
40
|
-
halfRuleText: '请输入第({total})
|
|
41
|
+
halfRuleText: '请输入第({total})个表单的值',
|
|
41
42
|
formList_actions: ['新增', '删除', '复制', '上移', '下移', '新增一行'],
|
|
42
43
|
formList_confirmMessage: '确认删除吗?'
|
|
43
44
|
},
|