@seafile/seafile-calendar 0.0.12 → 0.0.16

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.
Files changed (163) hide show
  1. package/README.md +6 -0
  2. package/dist/rc-calendar.js +63 -35
  3. package/dist/rc-calendar.js.map +1 -1
  4. package/dist/rc-calendar.min.js +1 -1
  5. package/index.d.ts +12 -11
  6. package/package.json +2 -2
  7. package/assets/index.css +0 -1186
  8. package/es/Calendar.js +0 -424
  9. package/es/FullCalendar.js +0 -182
  10. package/es/MonthCalendar.js +0 -135
  11. package/es/Picker.js +0 -245
  12. package/es/RangeCalendar.js +0 -876
  13. package/es/calendar/CalendarFooter.js +0 -93
  14. package/es/calendar/CalendarHeader.js +0 -257
  15. package/es/calendar/CalendarRightPanel.js +0 -108
  16. package/es/calendar/OkButton.js +0 -22
  17. package/es/calendar/TimePickerButton.js +0 -28
  18. package/es/calendar/TodayButton.js +0 -28
  19. package/es/date/DateConstants.js +0 -4
  20. package/es/date/DateInput.js +0 -233
  21. package/es/date/DateTBody.js +0 -275
  22. package/es/date/DateTHead.js +0 -81
  23. package/es/date/DateTable.js +0 -32
  24. package/es/decade/DecadePanel.js +0 -181
  25. package/es/full-calendar/CalendarHeader.js +0 -180
  26. package/es/index.js +0 -3
  27. package/es/locale/ar_EG.js +0 -27
  28. package/es/locale/bg_BG.js +0 -27
  29. package/es/locale/ca_ES.js +0 -27
  30. package/es/locale/cs_CZ.js +0 -27
  31. package/es/locale/da_DK.js +0 -27
  32. package/es/locale/de_DE.js +0 -27
  33. package/es/locale/el_GR.js +0 -27
  34. package/es/locale/en_GB.js +0 -27
  35. package/es/locale/en_US.js +0 -28
  36. package/es/locale/es_ES.js +0 -27
  37. package/es/locale/et_EE.js +0 -27
  38. package/es/locale/fa_IR.js +0 -27
  39. package/es/locale/fi_FI.js +0 -27
  40. package/es/locale/fr_BE.js +0 -27
  41. package/es/locale/fr_FR.js +0 -27
  42. package/es/locale/he_IL.js +0 -28
  43. package/es/locale/hi_IN.js +0 -28
  44. package/es/locale/hr_HR.js +0 -28
  45. package/es/locale/hu_HU.js +0 -27
  46. package/es/locale/id_ID.js +0 -28
  47. package/es/locale/is_IS.js +0 -27
  48. package/es/locale/it_IT.js +0 -27
  49. package/es/locale/ja_JP.js +0 -26
  50. package/es/locale/kn_IN.js +0 -28
  51. package/es/locale/ko_KR.js +0 -27
  52. package/es/locale/ku_IQ.js +0 -27
  53. package/es/locale/lv_LV.js +0 -27
  54. package/es/locale/mm_MM.js +0 -28
  55. package/es/locale/mn_MN.js +0 -28
  56. package/es/locale/ms_MY.js +0 -27
  57. package/es/locale/nb_NO.js +0 -27
  58. package/es/locale/nl_BE.js +0 -27
  59. package/es/locale/nl_NL.js +0 -27
  60. package/es/locale/pl_PL.js +0 -27
  61. package/es/locale/pt_BR.js +0 -27
  62. package/es/locale/pt_PT.js +0 -27
  63. package/es/locale/ro_RO.js +0 -28
  64. package/es/locale/ru_RU.js +0 -27
  65. package/es/locale/sk_SK.js +0 -27
  66. package/es/locale/sl_SI.js +0 -27
  67. package/es/locale/sr_RS.js +0 -27
  68. package/es/locale/sv_SE.js +0 -27
  69. package/es/locale/ta_IN.js +0 -28
  70. package/es/locale/th_TH.js +0 -27
  71. package/es/locale/tr_TR.js +0 -27
  72. package/es/locale/ug_CN.js +0 -26
  73. package/es/locale/uk_UA.js +0 -27
  74. package/es/locale/vi_VN.js +0 -28
  75. package/es/locale/zh_CN.js +0 -27
  76. package/es/locale/zh_TW.js +0 -26
  77. package/es/mixin/CalendarMixin.js +0 -123
  78. package/es/mixin/CommonMixin.js +0 -85
  79. package/es/month/MonthPanel.js +0 -154
  80. package/es/month/MonthTable.js +0 -156
  81. package/es/picker/placements.js +0 -35
  82. package/es/range-calendar/CalendarPart.js +0 -151
  83. package/es/util/index.js +0 -102
  84. package/es/util/toTime.js +0 -21
  85. package/es/year/YearPanel.js +0 -202
  86. package/lib/Calendar.js +0 -477
  87. package/lib/FullCalendar.js +0 -221
  88. package/lib/MonthCalendar.js +0 -172
  89. package/lib/Picker.js +0 -282
  90. package/lib/RangeCalendar.js +0 -925
  91. package/lib/calendar/CalendarFooter.js +0 -134
  92. package/lib/calendar/CalendarHeader.js +0 -290
  93. package/lib/calendar/CalendarRightPanel.js +0 -132
  94. package/lib/calendar/OkButton.js +0 -32
  95. package/lib/calendar/TimePickerButton.js +0 -41
  96. package/lib/calendar/TodayButton.js +0 -39
  97. package/lib/date/DateConstants.js +0 -8
  98. package/lib/date/DateInput.js +0 -265
  99. package/lib/date/DateTBody.js +0 -302
  100. package/lib/date/DateTHead.js +0 -104
  101. package/lib/date/DateTable.js +0 -54
  102. package/lib/decade/DecadePanel.js +0 -207
  103. package/lib/full-calendar/CalendarHeader.js +0 -201
  104. package/lib/index.js +0 -12
  105. package/lib/locale/ar_EG.js +0 -31
  106. package/lib/locale/bg_BG.js +0 -31
  107. package/lib/locale/ca_ES.js +0 -31
  108. package/lib/locale/cs_CZ.js +0 -31
  109. package/lib/locale/da_DK.js +0 -31
  110. package/lib/locale/de_DE.js +0 -31
  111. package/lib/locale/el_GR.js +0 -31
  112. package/lib/locale/en_GB.js +0 -31
  113. package/lib/locale/en_US.js +0 -32
  114. package/lib/locale/es_ES.js +0 -31
  115. package/lib/locale/et_EE.js +0 -31
  116. package/lib/locale/fa_IR.js +0 -31
  117. package/lib/locale/fi_FI.js +0 -31
  118. package/lib/locale/fr_BE.js +0 -31
  119. package/lib/locale/fr_FR.js +0 -31
  120. package/lib/locale/he_IL.js +0 -32
  121. package/lib/locale/hi_IN.js +0 -32
  122. package/lib/locale/hr_HR.js +0 -32
  123. package/lib/locale/hu_HU.js +0 -31
  124. package/lib/locale/id_ID.js +0 -32
  125. package/lib/locale/is_IS.js +0 -31
  126. package/lib/locale/it_IT.js +0 -31
  127. package/lib/locale/ja_JP.js +0 -30
  128. package/lib/locale/kn_IN.js +0 -32
  129. package/lib/locale/ko_KR.js +0 -31
  130. package/lib/locale/ku_IQ.js +0 -31
  131. package/lib/locale/lv_LV.js +0 -31
  132. package/lib/locale/mm_MM.js +0 -32
  133. package/lib/locale/mn_MN.js +0 -32
  134. package/lib/locale/ms_MY.js +0 -31
  135. package/lib/locale/nb_NO.js +0 -31
  136. package/lib/locale/nl_BE.js +0 -31
  137. package/lib/locale/nl_NL.js +0 -31
  138. package/lib/locale/pl_PL.js +0 -31
  139. package/lib/locale/pt_BR.js +0 -31
  140. package/lib/locale/pt_PT.js +0 -31
  141. package/lib/locale/ro_RO.js +0 -32
  142. package/lib/locale/ru_RU.js +0 -31
  143. package/lib/locale/sk_SK.js +0 -31
  144. package/lib/locale/sl_SI.js +0 -31
  145. package/lib/locale/sr_RS.js +0 -31
  146. package/lib/locale/sv_SE.js +0 -31
  147. package/lib/locale/ta_IN.js +0 -32
  148. package/lib/locale/th_TH.js +0 -31
  149. package/lib/locale/tr_TR.js +0 -31
  150. package/lib/locale/ug_CN.js +0 -30
  151. package/lib/locale/uk_UA.js +0 -31
  152. package/lib/locale/vi_VN.js +0 -32
  153. package/lib/locale/zh_CN.js +0 -31
  154. package/lib/locale/zh_TW.js +0 -30
  155. package/lib/mixin/CalendarMixin.js +0 -153
  156. package/lib/mixin/CommonMixin.js +0 -106
  157. package/lib/month/MonthPanel.js +0 -179
  158. package/lib/month/MonthTable.js +0 -181
  159. package/lib/picker/placements.js +0 -39
  160. package/lib/range-calendar/CalendarPart.js +0 -184
  161. package/lib/util/index.js +0 -124
  162. package/lib/util/toTime.js +0 -28
  163. package/lib/year/YearPanel.js +0 -227
@@ -1,93 +0,0 @@
1
- import _extends from 'babel-runtime/helpers/extends';
2
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
3
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
4
- import _inherits from 'babel-runtime/helpers/inherits';
5
- import React from 'react';
6
- import ReactDOM from 'react-dom';
7
- import PropTypes from 'prop-types';
8
- import toFragment from 'rc-util/es/Children/mapSelf';
9
- import cx from 'classnames';
10
- import TodayButton from '../calendar/TodayButton';
11
- import OkButton from '../calendar/OkButton';
12
- import TimePickerButton from '../calendar/TimePickerButton';
13
-
14
- var CalendarFooter = function (_React$Component) {
15
- _inherits(CalendarFooter, _React$Component);
16
-
17
- function CalendarFooter() {
18
- _classCallCheck(this, CalendarFooter);
19
-
20
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
21
- }
22
-
23
- CalendarFooter.prototype.onSelect = function onSelect(value) {
24
- this.props.onSelect(value);
25
- };
26
-
27
- CalendarFooter.prototype.getRootDOMNode = function getRootDOMNode() {
28
- return ReactDOM.findDOMNode(this);
29
- };
30
-
31
- CalendarFooter.prototype.render = function render() {
32
- var props = this.props;
33
- var value = props.value,
34
- prefixCls = props.prefixCls,
35
- showOk = props.showOk,
36
- timePicker = props.timePicker,
37
- renderFooter = props.renderFooter,
38
- mode = props.mode;
39
-
40
- var footerEl = null;
41
- var extraFooter = renderFooter && renderFooter(mode);
42
- if (props.showToday || timePicker || extraFooter) {
43
- var _cx;
44
-
45
- var nowEl = void 0;
46
- if (props.showToday) {
47
- nowEl = React.createElement(TodayButton, _extends({}, props, { value: value }));
48
- }
49
- var okBtn = void 0;
50
- if (showOk === true || showOk !== false && !!props.timePicker) {
51
- okBtn = React.createElement(OkButton, props);
52
- }
53
- var timePickerBtn = void 0;
54
- if (!!props.timePicker) {
55
- timePickerBtn = React.createElement(TimePickerButton, props);
56
- }
57
-
58
- var footerBtn = void 0;
59
- if (nowEl || timePickerBtn || okBtn || extraFooter) {
60
- footerBtn = React.createElement(
61
- 'span',
62
- { className: prefixCls + '-footer-btn' },
63
- extraFooter,
64
- toFragment([nowEl, timePickerBtn, okBtn])
65
- );
66
- }
67
- var cls = cx(prefixCls + '-footer', (_cx = {}, _cx[prefixCls + '-footer-show-ok'] = okBtn, _cx));
68
- footerEl = React.createElement(
69
- 'div',
70
- { className: cls },
71
- footerBtn
72
- );
73
- }
74
- return footerEl;
75
- };
76
-
77
- return CalendarFooter;
78
- }(React.Component);
79
-
80
- CalendarFooter.propTypes = {
81
- prefixCls: PropTypes.string,
82
- showDateInput: PropTypes.bool,
83
- disabledTime: PropTypes.any,
84
- timePicker: PropTypes.element,
85
- selectedValue: PropTypes.any,
86
- showOk: PropTypes.bool,
87
- onSelect: PropTypes.func,
88
- value: PropTypes.object,
89
- renderFooter: PropTypes.func,
90
- defaultValue: PropTypes.object,
91
- mode: PropTypes.string
92
- };
93
- export default CalendarFooter;
@@ -1,257 +0,0 @@
1
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
2
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
3
- import _inherits from 'babel-runtime/helpers/inherits';
4
- import React from 'react';
5
- import PropTypes from 'prop-types';
6
- import toFragment from 'rc-util/es/Children/mapSelf';
7
- import MonthPanel from '../month/MonthPanel';
8
- import YearPanel from '../year/YearPanel';
9
- import DecadePanel from '../decade/DecadePanel';
10
-
11
- function goMonth(direction) {
12
- var next = this.props.value.clone();
13
- next.add(direction, 'months');
14
- this.props.onValueChange(next);
15
- }
16
-
17
- function goYear(direction) {
18
- var next = this.props.value.clone();
19
- next.add(direction, 'years');
20
- this.props.onValueChange(next);
21
- }
22
-
23
- function showIf(condition, el) {
24
- return condition ? el : null;
25
- }
26
-
27
- var CalendarHeader = function (_React$Component) {
28
- _inherits(CalendarHeader, _React$Component);
29
-
30
- function CalendarHeader(props) {
31
- _classCallCheck(this, CalendarHeader);
32
-
33
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
34
-
35
- _initialiseProps.call(_this);
36
-
37
- _this.nextMonth = goMonth.bind(_this, 1);
38
- _this.previousMonth = goMonth.bind(_this, -1);
39
- _this.nextYear = goYear.bind(_this, 1);
40
- _this.previousYear = goYear.bind(_this, -1);
41
-
42
- _this.state = { yearPanelReferer: null };
43
- return _this;
44
- }
45
-
46
- CalendarHeader.prototype.render = function render() {
47
- var _this2 = this;
48
-
49
- var props = this.props;
50
- var prefixCls = props.prefixCls,
51
- locale = props.locale,
52
- mode = props.mode,
53
- value = props.value,
54
- showTimePicker = props.showTimePicker,
55
- enableNext = props.enableNext,
56
- enablePrev = props.enablePrev,
57
- disabledMonth = props.disabledMonth,
58
- renderFooter = props.renderFooter;
59
-
60
-
61
- var panel = null;
62
- if (mode === 'month') {
63
- panel = React.createElement(MonthPanel, {
64
- locale: locale,
65
- value: value,
66
- rootPrefixCls: prefixCls,
67
- onSelect: this.onMonthSelect,
68
- onYearPanelShow: function onYearPanelShow() {
69
- return _this2.showYearPanel('month');
70
- },
71
- disabledDate: disabledMonth,
72
- cellRender: props.monthCellRender,
73
- contentRender: props.monthCellContentRender,
74
- renderFooter: renderFooter,
75
- changeYear: this.changeYear
76
- });
77
- }
78
- if (mode === 'year') {
79
- panel = React.createElement(YearPanel, {
80
- locale: locale,
81
- defaultValue: value,
82
- rootPrefixCls: prefixCls,
83
- onSelect: this.onYearSelect,
84
- onDecadePanelShow: this.showDecadePanel,
85
- renderFooter: renderFooter
86
- });
87
- }
88
- if (mode === 'decade') {
89
- panel = React.createElement(DecadePanel, {
90
- locale: locale,
91
- defaultValue: value,
92
- rootPrefixCls: prefixCls,
93
- onSelect: this.onDecadeSelect,
94
- renderFooter: renderFooter
95
- });
96
- }
97
-
98
- return React.createElement(
99
- 'div',
100
- { className: prefixCls + '-header' },
101
- React.createElement(
102
- 'div',
103
- { style: { position: 'relative' } },
104
- showIf(enablePrev && !showTimePicker, React.createElement('a', {
105
- className: prefixCls + '-prev-year-btn',
106
- role: 'button',
107
- onClick: this.previousYear,
108
- title: locale.previousYear
109
- })),
110
- showIf(enablePrev && !showTimePicker, React.createElement('a', {
111
- className: prefixCls + '-prev-month-btn',
112
- role: 'button',
113
- onClick: this.previousMonth,
114
- title: locale.previousMonth
115
- })),
116
- this.monthYearElement(showTimePicker),
117
- showIf(enableNext && !showTimePicker, React.createElement('a', {
118
- className: prefixCls + '-next-month-btn',
119
- onClick: this.nextMonth,
120
- title: locale.nextMonth
121
- })),
122
- showIf(enableNext && !showTimePicker, React.createElement('a', {
123
- className: prefixCls + '-next-year-btn',
124
- onClick: this.nextYear,
125
- title: locale.nextYear
126
- }))
127
- ),
128
- panel
129
- );
130
- };
131
-
132
- return CalendarHeader;
133
- }(React.Component);
134
-
135
- CalendarHeader.propTypes = {
136
- prefixCls: PropTypes.string,
137
- value: PropTypes.object,
138
- onValueChange: PropTypes.func,
139
- showTimePicker: PropTypes.bool,
140
- onPanelChange: PropTypes.func,
141
- locale: PropTypes.object,
142
- enablePrev: PropTypes.any,
143
- enableNext: PropTypes.any,
144
- disabledMonth: PropTypes.func,
145
- renderFooter: PropTypes.func,
146
- onMonthSelect: PropTypes.func
147
- };
148
- CalendarHeader.defaultProps = {
149
- enableNext: 1,
150
- enablePrev: 1,
151
- onPanelChange: function onPanelChange() {},
152
- onValueChange: function onValueChange() {}
153
- };
154
-
155
- var _initialiseProps = function _initialiseProps() {
156
- var _this3 = this;
157
-
158
- this.onMonthSelect = function (value) {
159
- _this3.props.onPanelChange(value, 'date');
160
- if (_this3.props.onMonthSelect) {
161
- _this3.props.onMonthSelect(value);
162
- } else {
163
- _this3.props.onValueChange(value);
164
- }
165
- };
166
-
167
- this.onYearSelect = function (value) {
168
- var referer = _this3.state.yearPanelReferer;
169
- _this3.setState({ yearPanelReferer: null });
170
- _this3.props.onPanelChange(value, referer);
171
- _this3.props.onValueChange(value);
172
- };
173
-
174
- this.onDecadeSelect = function (value) {
175
- _this3.props.onPanelChange(value, 'year');
176
- _this3.props.onValueChange(value);
177
- };
178
-
179
- this.changeYear = function (direction) {
180
- if (direction > 0) {
181
- _this3.nextYear();
182
- } else {
183
- _this3.previousYear();
184
- }
185
- };
186
-
187
- this.monthYearElement = function (showTimePicker) {
188
- var props = _this3.props;
189
- var prefixCls = props.prefixCls;
190
- var locale = props.locale;
191
- var value = props.value;
192
- var localeData = value.localeData();
193
- var monthBeforeYear = locale.monthBeforeYear;
194
- var selectClassName = prefixCls + '-' + (monthBeforeYear ? 'my-select' : 'ym-select');
195
- var timeClassName = showTimePicker ? ' ' + prefixCls + '-time-status' : '';
196
- var year = React.createElement(
197
- 'a',
198
- {
199
- className: prefixCls + '-year-select' + timeClassName,
200
- role: 'button',
201
- onClick: showTimePicker ? null : function () {
202
- return _this3.showYearPanel('date');
203
- },
204
- title: showTimePicker ? null : locale.yearSelect
205
- },
206
- value.format(locale.yearFormat)
207
- );
208
- var month = React.createElement(
209
- 'a',
210
- {
211
- className: prefixCls + '-month-select' + timeClassName,
212
- role: 'button',
213
- onClick: showTimePicker ? null : _this3.showMonthPanel,
214
- title: showTimePicker ? null : locale.monthSelect
215
- },
216
- locale.monthFormat ? value.format(locale.monthFormat) : localeData.monthsShort(value)
217
- );
218
- var day = void 0;
219
- if (showTimePicker) {
220
- day = React.createElement(
221
- 'a',
222
- {
223
- className: prefixCls + '-day-select' + timeClassName,
224
- role: 'button'
225
- },
226
- value.format(locale.dayFormat)
227
- );
228
- }
229
- var my = [];
230
- if (monthBeforeYear) {
231
- my = [month, day, year];
232
- } else {
233
- my = [year, month, day];
234
- }
235
- return React.createElement(
236
- 'span',
237
- { className: selectClassName },
238
- toFragment(my)
239
- );
240
- };
241
-
242
- this.showMonthPanel = function () {
243
- // null means that users' interaction doesn't change value
244
- _this3.props.onPanelChange(null, 'month');
245
- };
246
-
247
- this.showYearPanel = function (referer) {
248
- _this3.setState({ yearPanelReferer: referer });
249
- _this3.props.onPanelChange(null, 'year');
250
- };
251
-
252
- this.showDecadePanel = function () {
253
- _this3.props.onPanelChange(null, 'decade');
254
- };
255
- };
256
-
257
- export default CalendarHeader;
@@ -1,108 +0,0 @@
1
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
2
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
3
- import _inherits from 'babel-runtime/helpers/inherits';
4
- import React from 'react';
5
- import PropTypes from 'prop-types';
6
- import moment from 'moment';
7
-
8
- var CalendarRightPanel = function (_React$Component) {
9
- _inherits(CalendarRightPanel, _React$Component);
10
-
11
- function CalendarRightPanel(props) {
12
- _classCallCheck(this, CalendarRightPanel);
13
-
14
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
15
-
16
- _this.onSelect = function (value) {
17
- _this.setState({
18
- highlightTime: value
19
- });
20
- _this.props.onSelect(value);
21
- };
22
-
23
- _this.scrollUp = function () {
24
- _this.timeRef.current.scrollBy(0, -200);
25
- };
26
-
27
- _this.scrollDown = function () {
28
- _this.timeRef.current.scrollBy(0, 200);
29
- };
30
-
31
- _this.state = {
32
- highlightTime: _this.props.value || null
33
- };
34
- _this.timeRef = React.createRef();
35
- return _this;
36
- }
37
-
38
- CalendarRightPanel.prototype.componentDidMount = function componentDidMount() {
39
- // The default time is 8, page scroll to 08:00
40
- this.timeRef.current.scrollTo(0, 34 * 16);
41
- };
42
-
43
- CalendarRightPanel.prototype.render = function render() {
44
- var _this2 = this;
45
-
46
- var _props = this.props,
47
- value = _props.value,
48
- prefixCls = _props.prefixCls,
49
- locale = _props.locale;
50
-
51
- var selectedDate = value.format().slice(0, 10);
52
- var times = [];
53
- for (var i = 0; i < 24; i++) {
54
- var str = (String(i) + ':00').padStart(5, '0');
55
- var str1 = (String(i) + ':30').padStart(5, '0');
56
- times.push(str);
57
- times.push(str1);
58
- }
59
- var highlight = this.state.highlightTime;
60
- var highlightTime = highlight ? highlight.format().slice(11, 16) : null;
61
- var isZhcn = locale && locale.today === '今天';
62
- return React.createElement(
63
- 'div',
64
- { className: prefixCls + '-right-panel' },
65
- React.createElement(
66
- 'div',
67
- { className: prefixCls + '-right-panel-header', onClick: this.scrollUp },
68
- React.createElement('span', null)
69
- ),
70
- React.createElement(
71
- 'div',
72
- { className: prefixCls + '-right-panel-body', ref: this.timeRef },
73
- React.createElement(
74
- 'ul',
75
- null,
76
- times.map(function (time) {
77
- var current = moment(selectedDate + ' ' + time);
78
- current = isZhcn ? current.locale('zh-cn') : current.locale('en-gb');
79
- return React.createElement(
80
- 'li',
81
- {
82
- key: time,
83
- onClick: _this2.onSelect.bind(_this2, current),
84
- className: '' + (highlightTime === time ? prefixCls + '-selected-time' : '')
85
- },
86
- time
87
- );
88
- })
89
- )
90
- ),
91
- React.createElement(
92
- 'div',
93
- { className: prefixCls + '-right-panel-footer', onClick: this.scrollDown },
94
- React.createElement('span', null)
95
- )
96
- );
97
- };
98
-
99
- return CalendarRightPanel;
100
- }(React.Component);
101
-
102
- CalendarRightPanel.propTypes = {
103
- prefixCls: PropTypes.string,
104
- value: PropTypes.object,
105
- onSelect: PropTypes.func,
106
- locale: PropTypes.object
107
- };
108
- export default CalendarRightPanel;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
-
3
- export default function OkButton(_ref) {
4
- var prefixCls = _ref.prefixCls,
5
- locale = _ref.locale,
6
- okDisabled = _ref.okDisabled,
7
- onOk = _ref.onOk;
8
-
9
- var className = prefixCls + "-ok-btn";
10
- if (okDisabled) {
11
- className += " " + prefixCls + "-ok-btn-disabled";
12
- }
13
- return React.createElement(
14
- "a",
15
- {
16
- className: className,
17
- role: "button",
18
- onClick: okDisabled ? null : onOk
19
- },
20
- locale.ok
21
- );
22
- }
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import classnames from 'classnames';
3
-
4
- export default function TimePickerButton(_ref) {
5
- var _classnames;
6
-
7
- var prefixCls = _ref.prefixCls,
8
- locale = _ref.locale,
9
- showTimePicker = _ref.showTimePicker,
10
- onOpenTimePicker = _ref.onOpenTimePicker,
11
- onCloseTimePicker = _ref.onCloseTimePicker,
12
- timePickerDisabled = _ref.timePickerDisabled;
13
-
14
- var className = classnames((_classnames = {}, _classnames[prefixCls + '-time-picker-btn'] = true, _classnames[prefixCls + '-time-picker-btn-disabled'] = timePickerDisabled, _classnames));
15
- var onClick = null;
16
- if (!timePickerDisabled) {
17
- onClick = showTimePicker ? onCloseTimePicker : onOpenTimePicker;
18
- }
19
- return React.createElement(
20
- 'a',
21
- {
22
- className: className,
23
- role: 'button',
24
- onClick: onClick
25
- },
26
- showTimePicker ? locale.dateSelect : locale.timeSelect
27
- );
28
- }
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import { getTodayTimeStr, getTodayTime, isAllowedDate } from '../util/';
3
-
4
- export default function TodayButton(_ref) {
5
- var prefixCls = _ref.prefixCls,
6
- locale = _ref.locale,
7
- value = _ref.value,
8
- timePicker = _ref.timePicker,
9
- disabled = _ref.disabled,
10
- disabledDate = _ref.disabledDate,
11
- onToday = _ref.onToday,
12
- text = _ref.text;
13
-
14
- var localeNow = (!text && timePicker ? locale.now : text) || locale.today;
15
- var disabledToday = disabledDate && !isAllowedDate(getTodayTime(value), disabledDate);
16
- var isDisabled = disabledToday || disabled;
17
- var disabledTodayClass = isDisabled ? prefixCls + '-today-btn-disabled' : '';
18
- return React.createElement(
19
- 'a',
20
- {
21
- className: prefixCls + '-today-btn ' + disabledTodayClass,
22
- role: 'button',
23
- onClick: isDisabled ? null : onToday,
24
- title: getTodayTimeStr(value)
25
- },
26
- localeNow
27
- );
28
- }
@@ -1,4 +0,0 @@
1
- export default {
2
- DATE_ROW_COUNT: 6,
3
- DATE_COL_COUNT: 7
4
- };