@seafile/seafile-calendar 0.0.15 → 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 (159) hide show
  1. package/index.d.ts +10 -10
  2. package/package.json +2 -2
  3. package/assets/index.css +0 -1186
  4. package/es/Calendar.js +0 -430
  5. package/es/FullCalendar.js +0 -182
  6. package/es/MonthCalendar.js +0 -135
  7. package/es/Picker.js +0 -245
  8. package/es/RangeCalendar.js +0 -876
  9. package/es/calendar/CalendarFooter.js +0 -93
  10. package/es/calendar/CalendarHeader.js +0 -257
  11. package/es/calendar/CalendarRightPanel.js +0 -124
  12. package/es/calendar/OkButton.js +0 -22
  13. package/es/calendar/TimePickerButton.js +0 -28
  14. package/es/calendar/TodayButton.js +0 -28
  15. package/es/date/DateConstants.js +0 -4
  16. package/es/date/DateInput.js +0 -233
  17. package/es/date/DateTBody.js +0 -275
  18. package/es/date/DateTHead.js +0 -81
  19. package/es/date/DateTable.js +0 -32
  20. package/es/decade/DecadePanel.js +0 -181
  21. package/es/full-calendar/CalendarHeader.js +0 -180
  22. package/es/index.js +0 -3
  23. package/es/locale/ar_EG.js +0 -27
  24. package/es/locale/bg_BG.js +0 -27
  25. package/es/locale/ca_ES.js +0 -27
  26. package/es/locale/cs_CZ.js +0 -27
  27. package/es/locale/da_DK.js +0 -27
  28. package/es/locale/de_DE.js +0 -27
  29. package/es/locale/el_GR.js +0 -27
  30. package/es/locale/en_GB.js +0 -27
  31. package/es/locale/en_US.js +0 -28
  32. package/es/locale/es_ES.js +0 -27
  33. package/es/locale/et_EE.js +0 -27
  34. package/es/locale/fa_IR.js +0 -27
  35. package/es/locale/fi_FI.js +0 -27
  36. package/es/locale/fr_BE.js +0 -27
  37. package/es/locale/fr_FR.js +0 -27
  38. package/es/locale/he_IL.js +0 -28
  39. package/es/locale/hi_IN.js +0 -28
  40. package/es/locale/hr_HR.js +0 -28
  41. package/es/locale/hu_HU.js +0 -27
  42. package/es/locale/id_ID.js +0 -28
  43. package/es/locale/is_IS.js +0 -27
  44. package/es/locale/it_IT.js +0 -27
  45. package/es/locale/ja_JP.js +0 -26
  46. package/es/locale/kn_IN.js +0 -28
  47. package/es/locale/ko_KR.js +0 -27
  48. package/es/locale/ku_IQ.js +0 -27
  49. package/es/locale/lv_LV.js +0 -27
  50. package/es/locale/mm_MM.js +0 -28
  51. package/es/locale/mn_MN.js +0 -28
  52. package/es/locale/ms_MY.js +0 -27
  53. package/es/locale/nb_NO.js +0 -27
  54. package/es/locale/nl_BE.js +0 -27
  55. package/es/locale/nl_NL.js +0 -27
  56. package/es/locale/pl_PL.js +0 -27
  57. package/es/locale/pt_BR.js +0 -27
  58. package/es/locale/pt_PT.js +0 -27
  59. package/es/locale/ro_RO.js +0 -28
  60. package/es/locale/ru_RU.js +0 -27
  61. package/es/locale/sk_SK.js +0 -27
  62. package/es/locale/sl_SI.js +0 -27
  63. package/es/locale/sr_RS.js +0 -27
  64. package/es/locale/sv_SE.js +0 -27
  65. package/es/locale/ta_IN.js +0 -28
  66. package/es/locale/th_TH.js +0 -27
  67. package/es/locale/tr_TR.js +0 -27
  68. package/es/locale/ug_CN.js +0 -26
  69. package/es/locale/uk_UA.js +0 -27
  70. package/es/locale/vi_VN.js +0 -28
  71. package/es/locale/zh_CN.js +0 -27
  72. package/es/locale/zh_TW.js +0 -26
  73. package/es/mixin/CalendarMixin.js +0 -123
  74. package/es/mixin/CommonMixin.js +0 -85
  75. package/es/month/MonthPanel.js +0 -154
  76. package/es/month/MonthTable.js +0 -156
  77. package/es/picker/placements.js +0 -35
  78. package/es/range-calendar/CalendarPart.js +0 -151
  79. package/es/util/index.js +0 -102
  80. package/es/util/toTime.js +0 -21
  81. package/es/year/YearPanel.js +0 -202
  82. package/lib/Calendar.js +0 -483
  83. package/lib/FullCalendar.js +0 -221
  84. package/lib/MonthCalendar.js +0 -172
  85. package/lib/Picker.js +0 -282
  86. package/lib/RangeCalendar.js +0 -925
  87. package/lib/calendar/CalendarFooter.js +0 -134
  88. package/lib/calendar/CalendarHeader.js +0 -290
  89. package/lib/calendar/CalendarRightPanel.js +0 -148
  90. package/lib/calendar/OkButton.js +0 -32
  91. package/lib/calendar/TimePickerButton.js +0 -41
  92. package/lib/calendar/TodayButton.js +0 -39
  93. package/lib/date/DateConstants.js +0 -8
  94. package/lib/date/DateInput.js +0 -265
  95. package/lib/date/DateTBody.js +0 -302
  96. package/lib/date/DateTHead.js +0 -104
  97. package/lib/date/DateTable.js +0 -54
  98. package/lib/decade/DecadePanel.js +0 -207
  99. package/lib/full-calendar/CalendarHeader.js +0 -201
  100. package/lib/index.js +0 -12
  101. package/lib/locale/ar_EG.js +0 -31
  102. package/lib/locale/bg_BG.js +0 -31
  103. package/lib/locale/ca_ES.js +0 -31
  104. package/lib/locale/cs_CZ.js +0 -31
  105. package/lib/locale/da_DK.js +0 -31
  106. package/lib/locale/de_DE.js +0 -31
  107. package/lib/locale/el_GR.js +0 -31
  108. package/lib/locale/en_GB.js +0 -31
  109. package/lib/locale/en_US.js +0 -32
  110. package/lib/locale/es_ES.js +0 -31
  111. package/lib/locale/et_EE.js +0 -31
  112. package/lib/locale/fa_IR.js +0 -31
  113. package/lib/locale/fi_FI.js +0 -31
  114. package/lib/locale/fr_BE.js +0 -31
  115. package/lib/locale/fr_FR.js +0 -31
  116. package/lib/locale/he_IL.js +0 -32
  117. package/lib/locale/hi_IN.js +0 -32
  118. package/lib/locale/hr_HR.js +0 -32
  119. package/lib/locale/hu_HU.js +0 -31
  120. package/lib/locale/id_ID.js +0 -32
  121. package/lib/locale/is_IS.js +0 -31
  122. package/lib/locale/it_IT.js +0 -31
  123. package/lib/locale/ja_JP.js +0 -30
  124. package/lib/locale/kn_IN.js +0 -32
  125. package/lib/locale/ko_KR.js +0 -31
  126. package/lib/locale/ku_IQ.js +0 -31
  127. package/lib/locale/lv_LV.js +0 -31
  128. package/lib/locale/mm_MM.js +0 -32
  129. package/lib/locale/mn_MN.js +0 -32
  130. package/lib/locale/ms_MY.js +0 -31
  131. package/lib/locale/nb_NO.js +0 -31
  132. package/lib/locale/nl_BE.js +0 -31
  133. package/lib/locale/nl_NL.js +0 -31
  134. package/lib/locale/pl_PL.js +0 -31
  135. package/lib/locale/pt_BR.js +0 -31
  136. package/lib/locale/pt_PT.js +0 -31
  137. package/lib/locale/ro_RO.js +0 -32
  138. package/lib/locale/ru_RU.js +0 -31
  139. package/lib/locale/sk_SK.js +0 -31
  140. package/lib/locale/sl_SI.js +0 -31
  141. package/lib/locale/sr_RS.js +0 -31
  142. package/lib/locale/sv_SE.js +0 -31
  143. package/lib/locale/ta_IN.js +0 -32
  144. package/lib/locale/th_TH.js +0 -31
  145. package/lib/locale/tr_TR.js +0 -31
  146. package/lib/locale/ug_CN.js +0 -30
  147. package/lib/locale/uk_UA.js +0 -31
  148. package/lib/locale/vi_VN.js +0 -32
  149. package/lib/locale/zh_CN.js +0 -31
  150. package/lib/locale/zh_TW.js +0 -30
  151. package/lib/mixin/CalendarMixin.js +0 -153
  152. package/lib/mixin/CommonMixin.js +0 -106
  153. package/lib/month/MonthPanel.js +0 -179
  154. package/lib/month/MonthTable.js +0 -181
  155. package/lib/picker/placements.js +0 -39
  156. package/lib/range-calendar/CalendarPart.js +0 -184
  157. package/lib/util/index.js +0 -124
  158. package/lib/util/toTime.js +0 -28
  159. 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,124 +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.getTimes = function () {
17
- var times = [];
18
- for (var i = 0; i < 24; i++) {
19
- var str = (String(i) + ':00').padStart(5, '0');
20
- var str1 = (String(i) + ':30').padStart(5, '0');
21
- times.push(str);
22
- times.push(str1);
23
- }
24
- return times;
25
- };
26
-
27
- _this.onSelect = function (value) {
28
- _this.setState({
29
- highlightTime: value
30
- });
31
- _this.props.onSelect(value);
32
- _this.props.onClickRightPanelTime();
33
- };
34
-
35
- _this.scrollUp = function () {
36
- _this.timeRef.current.scrollBy(0, -200);
37
- };
38
-
39
- _this.scrollDown = function () {
40
- _this.timeRef.current.scrollBy(0, 200);
41
- };
42
-
43
- _this.state = {
44
- highlightTime: _this.props.value || null
45
- };
46
- _this.timeRef = React.createRef();
47
- _this.times = _this.getTimes();
48
- return _this;
49
- }
50
-
51
- CalendarRightPanel.prototype.componentDidMount = function componentDidMount() {
52
- var defaultMinutesTime = this.props.defaultMinutesTime;
53
-
54
-
55
- var showTimeIndex = this.times.findIndex(function (item) {
56
- return item === defaultMinutesTime;
57
- });
58
-
59
- var scrollTimeIndex = showTimeIndex > -1 ? showTimeIndex : 16;
60
- this.timeRef.current.scrollTo(0, 34 * scrollTimeIndex);
61
- };
62
-
63
- CalendarRightPanel.prototype.render = function render() {
64
- var _this2 = this;
65
-
66
- var _props = this.props,
67
- value = _props.value,
68
- prefixCls = _props.prefixCls,
69
- locale = _props.locale;
70
-
71
- var selectedDate = value.format().slice(0, 10);
72
-
73
- var highlight = this.state.highlightTime;
74
- var highlightTime = highlight ? highlight.format().slice(11, 16) : null;
75
- var isZhcn = locale && locale.today === '今天';
76
- return React.createElement(
77
- 'div',
78
- { className: prefixCls + '-right-panel' },
79
- React.createElement(
80
- 'div',
81
- { className: prefixCls + '-right-panel-header', onClick: this.scrollUp },
82
- React.createElement('span', null)
83
- ),
84
- React.createElement(
85
- 'div',
86
- { className: prefixCls + '-right-panel-body', ref: this.timeRef },
87
- React.createElement(
88
- 'ul',
89
- null,
90
- this.times.map(function (time) {
91
- var current = moment(selectedDate + ' ' + time);
92
- current = isZhcn ? current.locale('zh-cn') : current.locale('en-gb');
93
- return React.createElement(
94
- 'li',
95
- {
96
- key: time,
97
- onClick: _this2.onSelect.bind(_this2, current),
98
- className: '' + (highlightTime === time ? prefixCls + '-selected-time' : '')
99
- },
100
- time
101
- );
102
- })
103
- )
104
- ),
105
- React.createElement(
106
- 'div',
107
- { className: prefixCls + '-right-panel-footer', onClick: this.scrollDown },
108
- React.createElement('span', null)
109
- )
110
- );
111
- };
112
-
113
- return CalendarRightPanel;
114
- }(React.Component);
115
-
116
- CalendarRightPanel.propTypes = {
117
- prefixCls: PropTypes.string,
118
- value: PropTypes.object,
119
- onSelect: PropTypes.func,
120
- onClickRightPanelTime: PropTypes.func,
121
- locale: PropTypes.object,
122
- defaultMinutesTime: PropTypes.string
123
- };
124
- 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
- };