@zat-design/sisyphus-react 3.3.0-beta.9 → 3.3.1
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 +6 -2
- package/es/ProDownload/utils.js +0 -2
- package/es/ProForm/components/base/DatePicker/index.d.ts +2 -2
- package/es/ProForm/components/base/DatePicker/index.js +5 -5
- package/es/ProForm/components/base/RangePicker/index.d.ts +2 -3
- package/es/ProForm/components/base/RangePicker/index.js +5 -3
- package/es/ProForm/components/base/TimePicker/index.js +3 -3
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
- package/es/ProForm/components/combination/FormList/index.js +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +0 -1
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProRangeLimit/index.js +6 -6
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +2 -2
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +2 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -4
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +9 -2
- package/es/ProForm/components/old/ProCertValidity/index.js +16 -16
- package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +4 -4
- package/es/ProForm/components/render/Render.js +3 -1
- package/es/ProForm/components/render/RenderFields.js +7 -3
- package/es/ProForm/utils/useForm.js +15 -7
- package/es/ProForm/utils/useRules.js +6 -5
- package/es/ProLayout/components/ProHeader/index.js +4 -4
- package/es/ProTable/utils.js +14 -14
- package/es/ProTreeModal/components/Trigger.js +2 -0
- package/es/ProTreeModal/index.js +3 -3
- package/es/ProUpload/components/DragRender.js +2 -1
- package/es/locale/index.js +2 -2
- package/es/old/ProCertValidity/index.js +16 -16
- package/es/old/ProCertValidity/propsType.d.ts +4 -4
- package/es/old/ProEditableTable/utils.d.ts +5 -5
- package/es/old/ProEditableTable/utils.js +5 -5
- package/lib/ProEditTable/components/RenderField/index.js +0 -2
- package/lib/ProForm/components/base/DatePicker/index.d.ts +2 -2
- package/lib/ProForm/components/base/DatePicker/index.js +5 -5
- package/lib/ProForm/components/base/RangePicker/index.d.ts +2 -3
- package/lib/ProForm/components/base/RangePicker/index.js +3 -3
- package/lib/ProForm/components/base/TimePicker/index.js +3 -3
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
- package/lib/ProForm/components/combination/FormList/index.js +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +0 -1
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +6 -6
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +2 -2
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +2 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -4
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +9 -2
- package/lib/ProForm/components/old/InputRange/index.js +1 -0
- package/lib/ProForm/components/old/ProCertValidity/index.js +17 -17
- package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +4 -4
- package/lib/ProForm/components/render/Render.js +3 -2
- package/lib/ProForm/components/render/RenderFields.js +6 -2
- package/lib/ProForm/utils/useForm.js +15 -7
- package/lib/ProForm/utils/useRules.js +5 -4
- package/lib/ProLayout/components/ProHeader/index.js +4 -4
- package/lib/ProTable/components/TableResizable/index.js +0 -8
- package/lib/ProTable/utils.js +14 -14
- package/lib/ProTabs/index.js +0 -1
- package/lib/ProThemeTools/index.js +0 -1
- package/lib/ProTree/components/Tree.js +0 -7
- package/lib/ProTree/index.js +1 -0
- package/lib/ProTreeModal/components/Tree.js +0 -1
- package/lib/ProTreeModal/components/Trigger.js +2 -0
- package/lib/ProTreeModal/index.js +3 -3
- package/lib/ProUpload/components/DragRender.js +2 -1
- package/lib/ProUpload/index.js +0 -7
- package/lib/ProViewer/index.js +0 -1
- package/lib/locale/index.js +2 -2
- package/lib/old/ProCertValidity/index.js +17 -17
- package/lib/old/ProCertValidity/propsType.d.ts +4 -4
- package/lib/old/ProEditableTable/utils.d.ts +5 -5
- package/lib/old/ProEditableTable/utils.js +5 -5
- package/package.json +2 -3
|
@@ -9,9 +9,9 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
var _antd = require("antd");
|
|
12
|
-
var
|
|
12
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
13
13
|
var _react = require("react");
|
|
14
|
-
var _excluded = ["value", "onChange", "disabled", "isRange", "getPopupContainer", "showForever", "proformmode"];
|
|
14
|
+
var _excluded = ["value", "onChange", "disabled", "isRange", "getPopupContainer", "showForever", "proformmode"];
|
|
15
15
|
var RangePicker = _antd.DatePicker.RangePicker;
|
|
16
16
|
var defaultFormatDate = 'YYYY-MM-DD';
|
|
17
17
|
var defaultPopupContainer = function defaultPopupContainer(triggerNode) {
|
|
@@ -50,37 +50,37 @@ var ProCertValidity = exports.ProCertValidity = /*#__PURE__*/(0, _react.forwardR
|
|
|
50
50
|
forever = _value.forever;
|
|
51
51
|
if (forever === 'Y') {
|
|
52
52
|
return {
|
|
53
|
-
range: [(0,
|
|
53
|
+
range: [(0, _moment.default)('9999-01-01'), (0, _moment.default)('9999-01-01')],
|
|
54
54
|
forever: true
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
if (startTime && endTime) {
|
|
58
|
-
var tempStartDate = (0,
|
|
59
|
-
var tempEndDate = (0,
|
|
58
|
+
var tempStartDate = (0, _moment.default)(startTime).format(defaultFormatDate);
|
|
59
|
+
var tempEndDate = (0, _moment.default)(endTime).format(defaultFormatDate);
|
|
60
60
|
if ((!forever || forever === 'N') && !checkIsForever(tempStartDate) && !checkIsForever(tempEndDate)) {
|
|
61
61
|
return {
|
|
62
|
-
range: [(0,
|
|
62
|
+
range: [(0, _moment.default)(startTime), (0, _moment.default)(endTime)],
|
|
63
63
|
forever: false
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
if (checkIsForever(tempStartDate) && checkIsForever(tempEndDate) && !isChange.current) {
|
|
67
67
|
return {
|
|
68
|
-
range: [(0,
|
|
68
|
+
range: [(0, _moment.default)('9999-01-01'), (0, _moment.default)('9999-01-01')],
|
|
69
69
|
forever: true
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
} else {
|
|
74
74
|
if (typeof value === 'string' || value._isAMomentObject) {
|
|
75
|
-
var tempDate = (0,
|
|
75
|
+
var tempDate = (0, _moment.default)(value).format(defaultFormatDate);
|
|
76
76
|
if (tempDate && tempDate === '9999-01-01') {
|
|
77
77
|
return {
|
|
78
|
-
range: (0,
|
|
78
|
+
range: (0, _moment.default)('9999-01-01'),
|
|
79
79
|
forever: true
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
return {
|
|
83
|
-
range: (0,
|
|
83
|
+
range: (0, _moment.default)(value),
|
|
84
84
|
forever: false
|
|
85
85
|
};
|
|
86
86
|
}
|
|
@@ -89,21 +89,21 @@ var ProCertValidity = exports.ProCertValidity = /*#__PURE__*/(0, _react.forwardR
|
|
|
89
89
|
_forever = _value2.forever;
|
|
90
90
|
if (_forever === 'Y') {
|
|
91
91
|
return {
|
|
92
|
-
range: (0,
|
|
92
|
+
range: (0, _moment.default)('9999-01-01'),
|
|
93
93
|
forever: true
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
if (dateTime) {
|
|
97
|
-
var _tempDate = (0,
|
|
97
|
+
var _tempDate = (0, _moment.default)(dateTime).format(defaultFormatDate);
|
|
98
98
|
if ((!_forever || _forever === 'N') && _tempDate !== '9999-01-01') {
|
|
99
99
|
return {
|
|
100
|
-
range: (0,
|
|
100
|
+
range: (0, _moment.default)(dateTime),
|
|
101
101
|
forever: false
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
if (_tempDate && _tempDate === '9999-01-01' && !isChange.current) {
|
|
105
105
|
return {
|
|
106
|
-
range: (0,
|
|
106
|
+
range: (0, _moment.default)('9999-01-01'),
|
|
107
107
|
forever: true
|
|
108
108
|
};
|
|
109
109
|
}
|
|
@@ -113,8 +113,8 @@ var ProCertValidity = exports.ProCertValidity = /*#__PURE__*/(0, _react.forwardR
|
|
|
113
113
|
}, [value, (_value3 = value) === null || _value3 === void 0 ? void 0 : _value3.dateTime]);
|
|
114
114
|
var changeRangeTime = function changeRangeTime(values) {
|
|
115
115
|
onChange({
|
|
116
|
-
startTime: values ? (0,
|
|
117
|
-
endTime: values ? (0,
|
|
116
|
+
startTime: values ? (0, _moment.default)(values === null || values === void 0 ? void 0 : values[0]).format(defaultFormatDate) : null,
|
|
117
|
+
endTime: values ? (0, _moment.default)(values === null || values === void 0 ? void 0 : values[1]).format(defaultFormatDate) : null,
|
|
118
118
|
forever: 'N'
|
|
119
119
|
});
|
|
120
120
|
};
|
|
@@ -142,7 +142,7 @@ var ProCertValidity = exports.ProCertValidity = /*#__PURE__*/(0, _react.forwardR
|
|
|
142
142
|
if (rangeTime.forever) {
|
|
143
143
|
_value4 = '长期';
|
|
144
144
|
} else {
|
|
145
|
-
_value4 = rangeTime.range ? (0,
|
|
145
|
+
_value4 = rangeTime.range ? (0, _moment.default)(rangeTime.range).format(defaultFormatDate) : null;
|
|
146
146
|
}
|
|
147
147
|
return (0, _jsxRuntime.jsx)(_antd.Input, {
|
|
148
148
|
value: _value4,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DatePickerProps, RangePickerProps } from 'antd/es/date-picker';
|
|
2
|
-
import
|
|
2
|
+
import moment from 'moment';
|
|
3
3
|
interface ICertValidityValuePropsType {
|
|
4
|
-
dateTime?:
|
|
4
|
+
dateTime?: moment.Moment | string;
|
|
5
5
|
forever?: string;
|
|
6
6
|
}
|
|
7
7
|
interface ICertValidityRangeValuePropsType {
|
|
8
|
-
startTime?:
|
|
9
|
-
endTime?:
|
|
8
|
+
startTime?: moment.Moment | string;
|
|
9
|
+
endTime?: moment.Moment | string;
|
|
10
10
|
forever?: string;
|
|
11
11
|
}
|
|
12
12
|
interface IProCertValidityExtraPropsType {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Moment } from 'moment';
|
|
2
2
|
import { IRowDataPropsType } from './propsType';
|
|
3
3
|
export declare const rangePickerTransform: (formatter?: string) => {
|
|
4
|
-
normalize: (value: [
|
|
4
|
+
normalize: (value: [Moment, Moment]) => {
|
|
5
5
|
from?: undefined;
|
|
6
6
|
to?: undefined;
|
|
7
7
|
} | {
|
|
@@ -13,15 +13,15 @@ export declare const rangePickerTransform: (formatter?: string) => {
|
|
|
13
13
|
to: string;
|
|
14
14
|
}) => {
|
|
15
15
|
format: string;
|
|
16
|
-
value:
|
|
16
|
+
value: Moment[];
|
|
17
17
|
};
|
|
18
18
|
getValueFromEvent: (rawDate?: any) => any;
|
|
19
19
|
};
|
|
20
20
|
export declare const datePickerTransform: (formatter?: string) => {
|
|
21
|
-
normalize: (value:
|
|
21
|
+
normalize: (value: Moment) => string;
|
|
22
22
|
getValueProps: (value: string) => {
|
|
23
23
|
format: string;
|
|
24
|
-
value:
|
|
24
|
+
value: Moment;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
export declare const transformColumns: (columns: any[], form: any, disabled: Boolean) => any[];
|
|
@@ -10,7 +10,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
var _antd = require("antd");
|
|
12
12
|
var _lodash = require("lodash");
|
|
13
|
-
var
|
|
13
|
+
var _moment2 = _interopRequireDefault(require("moment"));
|
|
14
14
|
var _components = require("../../ProForm/components");
|
|
15
15
|
var Option = _antd.Select.Option;
|
|
16
16
|
var RangePicker = _antd.DatePicker.RangePicker;
|
|
@@ -37,7 +37,7 @@ var rangePickerTransform = exports.rangePickerTransform = function rangePickerTr
|
|
|
37
37
|
to = _ref.to;
|
|
38
38
|
return {
|
|
39
39
|
format: formatter,
|
|
40
|
-
value: [from ? (0,
|
|
40
|
+
value: [from ? (0, _moment2.default)(from) : null, to ? (0, _moment2.default)(to) : null]
|
|
41
41
|
};
|
|
42
42
|
},
|
|
43
43
|
getValueFromEvent: function getValueFromEvent() {
|
|
@@ -51,13 +51,13 @@ var datePickerTransform = exports.datePickerTransform = function datePickerTrans
|
|
|
51
51
|
var formatter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'YYYY-MM-DD';
|
|
52
52
|
return {
|
|
53
53
|
normalize: function normalize(value) {
|
|
54
|
-
var
|
|
55
|
-
return value ? (
|
|
54
|
+
var _moment;
|
|
55
|
+
return value ? (_moment = (0, _moment2.default)(value)) === null || _moment === void 0 ? void 0 : _moment.format(formatter) : null;
|
|
56
56
|
},
|
|
57
57
|
getValueProps: function getValueProps(value) {
|
|
58
58
|
return {
|
|
59
59
|
format: formatter,
|
|
60
|
-
value: value ? (0,
|
|
60
|
+
value: value ? (0, _moment2.default)(value) : null
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zat-design/sisyphus-react",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"antd": "4.24.8",
|
|
64
64
|
"big.js": "^6.2.1",
|
|
65
65
|
"classnames": "^2.3.1",
|
|
66
|
-
"dayjs": "^1.11.10",
|
|
67
66
|
"lodash": "^4.17.21",
|
|
67
|
+
"moment": "^2.29.1",
|
|
68
68
|
"react-resizable": "^3.0.4",
|
|
69
69
|
"react-svg": "^15.1.7"
|
|
70
70
|
},
|
|
@@ -88,7 +88,6 @@
|
|
|
88
88
|
"@umijs/preset-react": "^1.8.22",
|
|
89
89
|
"@umijs/test": "^3.0.5",
|
|
90
90
|
"@zat-design/login-react": "1.0.25",
|
|
91
|
-
"antd-dayjs-webpack-plugin": "^1.0.6",
|
|
92
91
|
"babel-eslint": "10.0.3",
|
|
93
92
|
"babel-plugin-import": "^1.13.3",
|
|
94
93
|
"cross-env": "^7.0.3",
|