@seafile/seafile-calendar 0.0.29-alpha.2 → 0.0.29-alpha10
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/assets/index.css +1177 -0
- package/dist/rc-calendar.css +1179 -0
- package/dist/rc-calendar.css.map +1 -0
- package/dist/rc-calendar.js +7588 -0
- package/dist/rc-calendar.js.map +1 -0
- package/dist/rc-calendar.min.css +1179 -0
- package/dist/rc-calendar.min.css.map +1 -0
- package/dist/rc-calendar.min.js +1 -0
- package/es/Calendar.js +444 -0
- package/es/FullCalendar.js +182 -0
- package/es/MonthCalendar.js +135 -0
- package/es/Picker.js +245 -0
- package/es/RangeCalendar.js +876 -0
- package/es/calendar/CalendarFooter.js +93 -0
- package/es/calendar/CalendarHeader.js +257 -0
- package/es/calendar/CalendarRightPanel.js +135 -0
- package/es/calendar/OkButton.js +22 -0
- package/es/calendar/TimePickerButton.js +28 -0
- package/es/calendar/TodayButton.js +28 -0
- package/es/date/DateConstants.js +19 -0
- package/es/date/DateInput.js +249 -0
- package/es/date/DateTBody.js +280 -0
- package/es/date/DateTHead.js +86 -0
- package/es/date/DateTable.js +32 -0
- package/es/decade/DecadePanel.js +181 -0
- package/es/full-calendar/CalendarHeader.js +180 -0
- package/es/index.js +3 -0
- package/es/locale/ar_EG.js +27 -0
- package/es/locale/bg_BG.js +27 -0
- package/es/locale/ca_ES.js +27 -0
- package/es/locale/cs_CZ.js +27 -0
- package/es/locale/da_DK.js +27 -0
- package/es/locale/de_DE.js +27 -0
- package/es/locale/el_GR.js +27 -0
- package/es/locale/en_GB.js +27 -0
- package/es/locale/en_US.js +28 -0
- package/es/locale/es_ES.js +27 -0
- package/es/locale/et_EE.js +27 -0
- package/es/locale/fa_IR.js +27 -0
- package/es/locale/fi_FI.js +27 -0
- package/es/locale/fr_BE.js +27 -0
- package/es/locale/fr_FR.js +27 -0
- package/es/locale/he_IL.js +28 -0
- package/es/locale/hi_IN.js +28 -0
- package/es/locale/hr_HR.js +28 -0
- package/es/locale/hu_HU.js +27 -0
- package/es/locale/id_ID.js +28 -0
- package/es/locale/is_IS.js +27 -0
- package/es/locale/it_IT.js +27 -0
- package/es/locale/ja_JP.js +26 -0
- package/es/locale/kn_IN.js +28 -0
- package/es/locale/ko_KR.js +27 -0
- package/es/locale/ku_IQ.js +27 -0
- package/es/locale/lv_LV.js +27 -0
- package/es/locale/mm_MM.js +28 -0
- package/es/locale/mn_MN.js +28 -0
- package/es/locale/ms_MY.js +27 -0
- package/es/locale/nb_NO.js +27 -0
- package/es/locale/nl_BE.js +27 -0
- package/es/locale/nl_NL.js +27 -0
- package/es/locale/pl_PL.js +27 -0
- package/es/locale/pt_BR.js +27 -0
- package/es/locale/pt_PT.js +27 -0
- package/es/locale/ro_RO.js +28 -0
- package/es/locale/ru_RU.js +27 -0
- package/es/locale/sk_SK.js +27 -0
- package/es/locale/sl_SI.js +27 -0
- package/es/locale/sr_RS.js +27 -0
- package/es/locale/sv_SE.js +27 -0
- package/es/locale/ta_IN.js +28 -0
- package/es/locale/th_TH.js +27 -0
- package/es/locale/tr_TR.js +27 -0
- package/es/locale/ug_CN.js +26 -0
- package/es/locale/uk_UA.js +27 -0
- package/es/locale/vi_VN.js +28 -0
- package/es/locale/zh_CN.js +27 -0
- package/es/locale/zh_TW.js +26 -0
- package/es/mixin/CalendarMixin.js +123 -0
- package/es/mixin/CommonMixin.js +85 -0
- package/es/month/MonthPanel.js +154 -0
- package/es/month/MonthTable.js +156 -0
- package/es/picker/placements.js +35 -0
- package/es/range-calendar/CalendarPart.js +151 -0
- package/es/util/dayjs.js +17 -0
- package/es/util/index.js +564 -0
- package/es/util/toTime.js +21 -0
- package/es/year/YearPanel.js +194 -0
- package/lib/Calendar.js +507 -0
- package/lib/FullCalendar.js +221 -0
- package/lib/MonthCalendar.js +172 -0
- package/lib/Picker.js +282 -0
- package/lib/RangeCalendar.js +925 -0
- package/lib/calendar/CalendarFooter.js +134 -0
- package/lib/calendar/CalendarHeader.js +290 -0
- package/lib/calendar/CalendarRightPanel.js +160 -0
- package/lib/calendar/OkButton.js +32 -0
- package/lib/calendar/TimePickerButton.js +41 -0
- package/lib/calendar/TodayButton.js +39 -0
- package/lib/date/DateConstants.js +23 -0
- package/lib/date/DateInput.js +281 -0
- package/lib/date/DateTBody.js +307 -0
- package/lib/date/DateTHead.js +106 -0
- package/lib/date/DateTable.js +54 -0
- package/lib/decade/DecadePanel.js +207 -0
- package/lib/full-calendar/CalendarHeader.js +201 -0
- package/lib/index.js +12 -0
- package/lib/locale/ar_EG.js +31 -0
- package/lib/locale/bg_BG.js +31 -0
- package/lib/locale/ca_ES.js +31 -0
- package/lib/locale/cs_CZ.js +31 -0
- package/lib/locale/da_DK.js +31 -0
- package/lib/locale/de_DE.js +31 -0
- package/lib/locale/el_GR.js +31 -0
- package/lib/locale/en_GB.js +31 -0
- package/lib/locale/en_US.js +32 -0
- package/lib/locale/es_ES.js +31 -0
- package/lib/locale/et_EE.js +31 -0
- package/lib/locale/fa_IR.js +31 -0
- package/lib/locale/fi_FI.js +31 -0
- package/lib/locale/fr_BE.js +31 -0
- package/lib/locale/fr_FR.js +31 -0
- package/lib/locale/he_IL.js +32 -0
- package/lib/locale/hi_IN.js +32 -0
- package/lib/locale/hr_HR.js +32 -0
- package/lib/locale/hu_HU.js +31 -0
- package/lib/locale/id_ID.js +32 -0
- package/lib/locale/is_IS.js +31 -0
- package/lib/locale/it_IT.js +31 -0
- package/lib/locale/ja_JP.js +30 -0
- package/lib/locale/kn_IN.js +32 -0
- package/lib/locale/ko_KR.js +31 -0
- package/lib/locale/ku_IQ.js +31 -0
- package/lib/locale/lv_LV.js +31 -0
- package/lib/locale/mm_MM.js +32 -0
- package/lib/locale/mn_MN.js +32 -0
- package/lib/locale/ms_MY.js +31 -0
- package/lib/locale/nb_NO.js +31 -0
- package/lib/locale/nl_BE.js +31 -0
- package/lib/locale/nl_NL.js +31 -0
- package/lib/locale/pl_PL.js +31 -0
- package/lib/locale/pt_BR.js +31 -0
- package/lib/locale/pt_PT.js +31 -0
- package/lib/locale/ro_RO.js +32 -0
- package/lib/locale/ru_RU.js +31 -0
- package/lib/locale/sk_SK.js +31 -0
- package/lib/locale/sl_SI.js +31 -0
- package/lib/locale/sr_RS.js +31 -0
- package/lib/locale/sv_SE.js +31 -0
- package/lib/locale/ta_IN.js +32 -0
- package/lib/locale/th_TH.js +31 -0
- package/lib/locale/tr_TR.js +31 -0
- package/lib/locale/ug_CN.js +30 -0
- package/lib/locale/uk_UA.js +31 -0
- package/lib/locale/vi_VN.js +32 -0
- package/lib/locale/zh_CN.js +31 -0
- package/lib/locale/zh_TW.js +30 -0
- package/lib/mixin/CalendarMixin.js +153 -0
- package/lib/mixin/CommonMixin.js +106 -0
- package/lib/month/MonthPanel.js +179 -0
- package/lib/month/MonthTable.js +181 -0
- package/lib/picker/placements.js +39 -0
- package/lib/range-calendar/CalendarPart.js +184 -0
- package/lib/util/dayjs.js +46 -0
- package/lib/util/index.js +601 -0
- package/lib/util/toTime.js +28 -0
- package/lib/year/YearPanel.js +219 -0
- package/package.json +1 -1
@@ -0,0 +1,181 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
|
5
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
6
|
+
|
7
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
8
|
+
|
9
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
10
|
+
|
11
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
12
|
+
|
13
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
14
|
+
|
15
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
16
|
+
|
17
|
+
var _react = require('react');
|
18
|
+
|
19
|
+
var _react2 = _interopRequireDefault(_react);
|
20
|
+
|
21
|
+
var _propTypes = require('prop-types');
|
22
|
+
|
23
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
24
|
+
|
25
|
+
var _classnames = require('classnames');
|
26
|
+
|
27
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
28
|
+
|
29
|
+
var _index = require('../util/index');
|
30
|
+
|
31
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
32
|
+
|
33
|
+
var ROW = 4;
|
34
|
+
var COL = 3;
|
35
|
+
|
36
|
+
function chooseMonth(month) {
|
37
|
+
var next = this.state.value.clone();
|
38
|
+
next = next.month(month);
|
39
|
+
this.setAndSelectValue(next);
|
40
|
+
}
|
41
|
+
|
42
|
+
function noop() {}
|
43
|
+
|
44
|
+
var MonthTable = function (_Component) {
|
45
|
+
(0, _inherits3['default'])(MonthTable, _Component);
|
46
|
+
|
47
|
+
function MonthTable(props) {
|
48
|
+
(0, _classCallCheck3['default'])(this, MonthTable);
|
49
|
+
|
50
|
+
var _this = (0, _possibleConstructorReturn3['default'])(this, _Component.call(this, props));
|
51
|
+
|
52
|
+
_this.state = {
|
53
|
+
value: props.value
|
54
|
+
};
|
55
|
+
return _this;
|
56
|
+
}
|
57
|
+
|
58
|
+
MonthTable.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
59
|
+
if ('value' in nextProps) {
|
60
|
+
this.setState({
|
61
|
+
value: nextProps.value
|
62
|
+
});
|
63
|
+
}
|
64
|
+
};
|
65
|
+
|
66
|
+
MonthTable.prototype.setAndSelectValue = function setAndSelectValue(value) {
|
67
|
+
this.setState({
|
68
|
+
value: value
|
69
|
+
});
|
70
|
+
this.props.onSelect(value);
|
71
|
+
};
|
72
|
+
|
73
|
+
MonthTable.prototype.months = function months() {
|
74
|
+
var value = this.state.value;
|
75
|
+
var current = value.clone();
|
76
|
+
var months = [];
|
77
|
+
var index = 0;
|
78
|
+
for (var rowIndex = 0; rowIndex < ROW; rowIndex++) {
|
79
|
+
months[rowIndex] = [];
|
80
|
+
for (var colIndex = 0; colIndex < COL; colIndex++) {
|
81
|
+
current = current.month(index);
|
82
|
+
var content = (0, _index.getMonthName)(current);
|
83
|
+
months[rowIndex][colIndex] = {
|
84
|
+
value: index,
|
85
|
+
content: content,
|
86
|
+
title: content
|
87
|
+
};
|
88
|
+
index++;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
return months;
|
92
|
+
};
|
93
|
+
|
94
|
+
MonthTable.prototype.render = function render() {
|
95
|
+
var _this2 = this;
|
96
|
+
|
97
|
+
var props = this.props;
|
98
|
+
var value = this.state.value;
|
99
|
+
var today = (0, _index.getTodayTime)(value);
|
100
|
+
var months = this.months();
|
101
|
+
var currentMonth = value.month();
|
102
|
+
var prefixCls = props.prefixCls,
|
103
|
+
locale = props.locale,
|
104
|
+
contentRender = props.contentRender,
|
105
|
+
cellRender = props.cellRender;
|
106
|
+
|
107
|
+
var monthsEls = months.map(function (month, index) {
|
108
|
+
var tds = month.map(function (monthData) {
|
109
|
+
var _classNameMap;
|
110
|
+
|
111
|
+
var disabled = false;
|
112
|
+
if (props.disabledDate) {
|
113
|
+
var testValue = value.clone();
|
114
|
+
testValue = testValue.month(monthData.value);
|
115
|
+
disabled = props.disabledDate(testValue);
|
116
|
+
}
|
117
|
+
var classNameMap = (_classNameMap = {}, _classNameMap[prefixCls + '-cell'] = 1, _classNameMap[prefixCls + '-cell-disabled'] = disabled, _classNameMap[prefixCls + '-selected-cell'] = monthData.value === currentMonth, _classNameMap[prefixCls + '-current-cell'] = today.year() === value.year() && monthData.value === today.month(), _classNameMap);
|
118
|
+
var cellEl = void 0;
|
119
|
+
if (cellRender) {
|
120
|
+
var currentValue = value.clone();
|
121
|
+
currentValue = currentValue.month(monthData.value);
|
122
|
+
cellEl = cellRender(currentValue, locale);
|
123
|
+
} else {
|
124
|
+
var content = void 0;
|
125
|
+
if (contentRender) {
|
126
|
+
var _currentValue = value.clone();
|
127
|
+
_currentValue = _currentValue.month(monthData.value);
|
128
|
+
content = contentRender(_currentValue, locale);
|
129
|
+
} else {
|
130
|
+
content = monthData.content;
|
131
|
+
}
|
132
|
+
cellEl = _react2['default'].createElement(
|
133
|
+
'a',
|
134
|
+
{ className: prefixCls + '-month' },
|
135
|
+
content
|
136
|
+
);
|
137
|
+
}
|
138
|
+
return _react2['default'].createElement(
|
139
|
+
'td',
|
140
|
+
{
|
141
|
+
role: 'gridcell',
|
142
|
+
key: monthData.value,
|
143
|
+
onClick: disabled ? null : chooseMonth.bind(_this2, monthData.value),
|
144
|
+
title: monthData.title,
|
145
|
+
className: (0, _classnames2['default'])(classNameMap)
|
146
|
+
},
|
147
|
+
cellEl
|
148
|
+
);
|
149
|
+
});
|
150
|
+
return _react2['default'].createElement(
|
151
|
+
'tr',
|
152
|
+
{ key: index, role: 'row' },
|
153
|
+
tds
|
154
|
+
);
|
155
|
+
});
|
156
|
+
|
157
|
+
return _react2['default'].createElement(
|
158
|
+
'table',
|
159
|
+
{ className: prefixCls + '-table', cellSpacing: '0', role: 'grid' },
|
160
|
+
_react2['default'].createElement(
|
161
|
+
'tbody',
|
162
|
+
{ className: prefixCls + '-tbody' },
|
163
|
+
monthsEls
|
164
|
+
)
|
165
|
+
);
|
166
|
+
};
|
167
|
+
|
168
|
+
return MonthTable;
|
169
|
+
}(_react.Component);
|
170
|
+
|
171
|
+
MonthTable.defaultProps = {
|
172
|
+
onSelect: noop
|
173
|
+
};
|
174
|
+
MonthTable.propTypes = {
|
175
|
+
onSelect: _propTypes2['default'].func,
|
176
|
+
cellRender: _propTypes2['default'].func,
|
177
|
+
prefixCls: _propTypes2['default'].string,
|
178
|
+
value: _propTypes2['default'].object
|
179
|
+
};
|
180
|
+
exports['default'] = MonthTable;
|
181
|
+
module.exports = exports['default'];
|
@@ -0,0 +1,39 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
var autoAdjustOverflow = {
|
5
|
+
adjustX: 1,
|
6
|
+
adjustY: 1
|
7
|
+
};
|
8
|
+
|
9
|
+
var targetOffset = [0, 0];
|
10
|
+
|
11
|
+
var placements = {
|
12
|
+
bottomLeft: {
|
13
|
+
points: ['tl', 'tl'],
|
14
|
+
overflow: autoAdjustOverflow,
|
15
|
+
offset: [0, -3],
|
16
|
+
targetOffset: targetOffset
|
17
|
+
},
|
18
|
+
bottomRight: {
|
19
|
+
points: ['tr', 'tr'],
|
20
|
+
overflow: autoAdjustOverflow,
|
21
|
+
offset: [0, -3],
|
22
|
+
targetOffset: targetOffset
|
23
|
+
},
|
24
|
+
topRight: {
|
25
|
+
points: ['br', 'br'],
|
26
|
+
overflow: autoAdjustOverflow,
|
27
|
+
offset: [0, 3],
|
28
|
+
targetOffset: targetOffset
|
29
|
+
},
|
30
|
+
topLeft: {
|
31
|
+
points: ['bl', 'bl'],
|
32
|
+
overflow: autoAdjustOverflow,
|
33
|
+
offset: [0, 3],
|
34
|
+
targetOffset: targetOffset
|
35
|
+
}
|
36
|
+
};
|
37
|
+
|
38
|
+
exports['default'] = placements;
|
39
|
+
module.exports = exports['default'];
|
@@ -0,0 +1,184 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
|
5
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
6
|
+
|
7
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
8
|
+
|
9
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
10
|
+
|
11
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
12
|
+
|
13
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
14
|
+
|
15
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
16
|
+
|
17
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
18
|
+
|
19
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
20
|
+
|
21
|
+
var _react = require('react');
|
22
|
+
|
23
|
+
var _react2 = _interopRequireDefault(_react);
|
24
|
+
|
25
|
+
var _propTypes = require('prop-types');
|
26
|
+
|
27
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
28
|
+
|
29
|
+
var _CalendarHeader = require('../calendar/CalendarHeader');
|
30
|
+
|
31
|
+
var _CalendarHeader2 = _interopRequireDefault(_CalendarHeader);
|
32
|
+
|
33
|
+
var _DateTable = require('../date/DateTable');
|
34
|
+
|
35
|
+
var _DateTable2 = _interopRequireDefault(_DateTable);
|
36
|
+
|
37
|
+
var _DateInput = require('../date/DateInput');
|
38
|
+
|
39
|
+
var _DateInput2 = _interopRequireDefault(_DateInput);
|
40
|
+
|
41
|
+
var _index = require('../util/index');
|
42
|
+
|
43
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
44
|
+
|
45
|
+
var CalendarPart = function (_React$Component) {
|
46
|
+
(0, _inherits3['default'])(CalendarPart, _React$Component);
|
47
|
+
|
48
|
+
function CalendarPart() {
|
49
|
+
(0, _classCallCheck3['default'])(this, CalendarPart);
|
50
|
+
return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments));
|
51
|
+
}
|
52
|
+
|
53
|
+
CalendarPart.prototype.render = function render() {
|
54
|
+
var props = this.props;
|
55
|
+
var prefixCls = props.prefixCls,
|
56
|
+
value = props.value,
|
57
|
+
hoverValue = props.hoverValue,
|
58
|
+
selectedValue = props.selectedValue,
|
59
|
+
mode = props.mode,
|
60
|
+
direction = props.direction,
|
61
|
+
locale = props.locale,
|
62
|
+
format = props.format,
|
63
|
+
placeholder = props.placeholder,
|
64
|
+
disabledDate = props.disabledDate,
|
65
|
+
timePicker = props.timePicker,
|
66
|
+
disabledTime = props.disabledTime,
|
67
|
+
timePickerDisabledTime = props.timePickerDisabledTime,
|
68
|
+
showTimePicker = props.showTimePicker,
|
69
|
+
onInputChange = props.onInputChange,
|
70
|
+
onInputSelect = props.onInputSelect,
|
71
|
+
enablePrev = props.enablePrev,
|
72
|
+
enableNext = props.enableNext,
|
73
|
+
clearIcon = props.clearIcon,
|
74
|
+
showClear = props.showClear,
|
75
|
+
inputMode = props.inputMode;
|
76
|
+
|
77
|
+
var shouldShowTimePicker = showTimePicker && timePicker;
|
78
|
+
var disabledTimeConfig = shouldShowTimePicker && disabledTime ? (0, _index.getTimeConfig)(selectedValue, disabledTime) : null;
|
79
|
+
var rangeClassName = prefixCls + '-range';
|
80
|
+
var newProps = {
|
81
|
+
locale: locale,
|
82
|
+
value: value,
|
83
|
+
prefixCls: prefixCls,
|
84
|
+
showTimePicker: showTimePicker
|
85
|
+
};
|
86
|
+
var index = direction === 'left' ? 0 : 1;
|
87
|
+
var timePickerEle = shouldShowTimePicker && _react2['default'].cloneElement(timePicker, (0, _extends3['default'])({
|
88
|
+
showHour: true,
|
89
|
+
showMinute: true,
|
90
|
+
showSecond: true
|
91
|
+
}, timePicker.props, disabledTimeConfig, timePickerDisabledTime, {
|
92
|
+
onChange: onInputChange,
|
93
|
+
defaultOpenValue: value,
|
94
|
+
value: selectedValue[index]
|
95
|
+
}));
|
96
|
+
|
97
|
+
var dateInputElement = props.showDateInput && _react2['default'].createElement(_DateInput2['default'], {
|
98
|
+
format: format,
|
99
|
+
locale: locale,
|
100
|
+
prefixCls: prefixCls,
|
101
|
+
timePicker: timePicker,
|
102
|
+
disabledDate: disabledDate,
|
103
|
+
placeholder: placeholder,
|
104
|
+
disabledTime: disabledTime,
|
105
|
+
value: value,
|
106
|
+
showClear: showClear || false,
|
107
|
+
selectedValue: selectedValue[index],
|
108
|
+
onChange: onInputChange,
|
109
|
+
onSelect: onInputSelect,
|
110
|
+
clearIcon: clearIcon,
|
111
|
+
inputMode: inputMode
|
112
|
+
});
|
113
|
+
|
114
|
+
return _react2['default'].createElement(
|
115
|
+
'div',
|
116
|
+
{
|
117
|
+
className: rangeClassName + '-part ' + rangeClassName + '-' + direction
|
118
|
+
},
|
119
|
+
dateInputElement,
|
120
|
+
_react2['default'].createElement(
|
121
|
+
'div',
|
122
|
+
{ style: { outline: 'none' } },
|
123
|
+
_react2['default'].createElement(_CalendarHeader2['default'], (0, _extends3['default'])({}, newProps, {
|
124
|
+
mode: mode,
|
125
|
+
enableNext: enableNext,
|
126
|
+
enablePrev: enablePrev,
|
127
|
+
onValueChange: props.onValueChange,
|
128
|
+
onPanelChange: props.onPanelChange,
|
129
|
+
disabledMonth: props.disabledMonth
|
130
|
+
})),
|
131
|
+
showTimePicker ? _react2['default'].createElement(
|
132
|
+
'div',
|
133
|
+
{ className: prefixCls + '-time-picker' },
|
134
|
+
_react2['default'].createElement(
|
135
|
+
'div',
|
136
|
+
{ className: prefixCls + '-time-picker-panel' },
|
137
|
+
timePickerEle
|
138
|
+
)
|
139
|
+
) : null,
|
140
|
+
_react2['default'].createElement(
|
141
|
+
'div',
|
142
|
+
{ className: prefixCls + '-body' },
|
143
|
+
_react2['default'].createElement(_DateTable2['default'], (0, _extends3['default'])({}, newProps, {
|
144
|
+
hoverValue: hoverValue,
|
145
|
+
selectedValue: selectedValue,
|
146
|
+
dateRender: props.dateRender,
|
147
|
+
onSelect: props.onSelect,
|
148
|
+
onDayHover: props.onDayHover,
|
149
|
+
disabledDate: disabledDate,
|
150
|
+
showWeekNumber: props.showWeekNumber
|
151
|
+
}))
|
152
|
+
)
|
153
|
+
)
|
154
|
+
);
|
155
|
+
};
|
156
|
+
|
157
|
+
return CalendarPart;
|
158
|
+
}(_react2['default'].Component);
|
159
|
+
|
160
|
+
CalendarPart.propTypes = {
|
161
|
+
prefixCls: _propTypes2['default'].string,
|
162
|
+
value: _propTypes2['default'].any,
|
163
|
+
hoverValue: _propTypes2['default'].any,
|
164
|
+
selectedValue: _propTypes2['default'].any,
|
165
|
+
direction: _propTypes2['default'].any,
|
166
|
+
locale: _propTypes2['default'].any,
|
167
|
+
showDateInput: _propTypes2['default'].bool,
|
168
|
+
showTimePicker: _propTypes2['default'].bool,
|
169
|
+
format: _propTypes2['default'].any,
|
170
|
+
placeholder: _propTypes2['default'].any,
|
171
|
+
disabledDate: _propTypes2['default'].any,
|
172
|
+
timePicker: _propTypes2['default'].any,
|
173
|
+
disabledTime: _propTypes2['default'].any,
|
174
|
+
onInputChange: _propTypes2['default'].func,
|
175
|
+
onInputSelect: _propTypes2['default'].func,
|
176
|
+
timePickerDisabledTime: _propTypes2['default'].object,
|
177
|
+
enableNext: _propTypes2['default'].any,
|
178
|
+
enablePrev: _propTypes2['default'].any,
|
179
|
+
clearIcon: _propTypes2['default'].node,
|
180
|
+
dateRender: _propTypes2['default'].func,
|
181
|
+
inputMode: _propTypes2['default'].string
|
182
|
+
};
|
183
|
+
exports['default'] = CalendarPart;
|
184
|
+
module.exports = exports['default'];
|
@@ -0,0 +1,46 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
|
5
|
+
var _dayjs = require('dayjs');
|
6
|
+
|
7
|
+
var _dayjs2 = _interopRequireDefault(_dayjs);
|
8
|
+
|
9
|
+
var _localeData = require('dayjs/plugin/localeData');
|
10
|
+
|
11
|
+
var _localeData2 = _interopRequireDefault(_localeData);
|
12
|
+
|
13
|
+
var _weekOfYear = require('dayjs/plugin/weekOfYear');
|
14
|
+
|
15
|
+
var _weekOfYear2 = _interopRequireDefault(_weekOfYear);
|
16
|
+
|
17
|
+
var _utc = require('dayjs/plugin/utc');
|
18
|
+
|
19
|
+
var _utc2 = _interopRequireDefault(_utc);
|
20
|
+
|
21
|
+
var _advancedFormat = require('dayjs/plugin/advancedFormat');
|
22
|
+
|
23
|
+
var _advancedFormat2 = _interopRequireDefault(_advancedFormat);
|
24
|
+
|
25
|
+
var _customParseFormat = require('dayjs/plugin/customParseFormat');
|
26
|
+
|
27
|
+
var _customParseFormat2 = _interopRequireDefault(_customParseFormat);
|
28
|
+
|
29
|
+
var _badMutable = require('dayjs/plugin/badMutable');
|
30
|
+
|
31
|
+
var _badMutable2 = _interopRequireDefault(_badMutable);
|
32
|
+
|
33
|
+
require('dayjs/locale/zh-cn');
|
34
|
+
|
35
|
+
require('dayjs/locale/en-gb');
|
36
|
+
|
37
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
38
|
+
|
39
|
+
_dayjs2['default'].extend(_localeData2['default']);
|
40
|
+
_dayjs2['default'].extend(_weekOfYear2['default']);
|
41
|
+
_dayjs2['default'].extend(_utc2['default']);
|
42
|
+
_dayjs2['default'].extend(_advancedFormat2['default']);
|
43
|
+
_dayjs2['default'].extend(_customParseFormat2['default']);
|
44
|
+
_dayjs2['default'].extend(_badMutable2['default']);
|
45
|
+
exports['default'] = _dayjs2['default'];
|
46
|
+
module.exports = exports['default'];
|