shineout 1.10.12 → 1.10.13

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.
@@ -209,6 +209,7 @@ function (_PureComponent) {
209
209
  } else {
210
210
  var v = value[value.length - 1];
211
211
  var data = this.datum.getDataById(v);
212
+ if (data === null) return;
212
213
 
213
214
  try {
214
215
  var id = this.datum.getKey(data);
@@ -371,7 +372,6 @@ function (_PureComponent) {
371
372
  onItemClick = _this$props7.onItemClick,
372
373
  expandTrigger = _this$props7.expandTrigger,
373
374
  childrenKey = _this$props7.childrenKey,
374
- absolute = _this$props7.absolute,
375
375
  height = _this$props7.height;
376
376
  var path = this.state.path;
377
377
  var props = {
@@ -339,7 +339,7 @@ function (_PureComponent) {
339
339
 
340
340
  var items = this.handleNode(nodes, render);
341
341
 
342
- if (compressed) {
342
+ if (compressed && items.length) {
343
343
  items = this.renderMore(items);
344
344
  }
345
345
 
@@ -53,6 +53,8 @@ var _AnimationList = _interopRequireDefault(require("../AnimationList"));
53
53
 
54
54
  var _locale = require("../locale");
55
55
 
56
+ var _paramUtils = _interopRequireDefault(require("./paramUtils"));
57
+
56
58
  var _config = require("../config");
57
59
 
58
60
  var _InputTitle = _interopRequireDefault(require("../InputTitle"));
@@ -94,6 +96,7 @@ function (_PureComponent) {
94
96
  picker0: false,
95
97
  picker1: false
96
98
  };
99
+ _this.disabledMap = {};
97
100
  _this.pickerId = "picker_" + (0, _uid.getUidStr)();
98
101
  _this.bindElement = _this.bindElement.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
99
102
  _this.bindPicker = _this.bindPicker.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
@@ -110,6 +113,8 @@ function (_PureComponent) {
110
113
  _this.parseDate = _this.parseDate.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
111
114
  _this.dateToCurrent = _this.dateToCurrent.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
112
115
  _this.shouldFocus = _this.shouldFocus.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
116
+ _this.handleDisabled = _this.handleDisabled.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
117
+ _this.disabledRegister = _this.disabledRegister.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
113
118
  _this.bindClickAway = _this.bindClickAway.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
114
119
  _this.clearClickAway = _this.clearClickAway.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
115
120
  _this.handleClickAway = _this.handleClickAway.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
@@ -330,11 +335,58 @@ function (_PureComponent) {
330
335
  }
331
336
  };
332
337
 
338
+ _proto.disabledRegister = function disabledRegister(disabled, mode) {
339
+ this.disabledMap[mode] = disabled;
340
+ };
341
+
342
+ _proto.handleDisabled = function handleDisabled(date) {
343
+ var mode = this.props.type;
344
+ var disabledMap = this.disabledMap;
345
+ var _this$props3 = this.props,
346
+ min = _this$props3.min,
347
+ max = _this$props3.max,
348
+ range = _this$props3.range,
349
+ disabled = _this$props3.disabled,
350
+ disabledTime = _this$props3.disabledTime;
351
+
352
+ switch (mode) {
353
+ case 'time':
354
+ return _paramUtils.default.handleDisabled(date, min, max, range, disabled, disabledTime);
355
+
356
+ case 'date':
357
+ return disabledMap.day(date);
358
+
359
+ case 'week':
360
+ return disabledMap.day(date);
361
+
362
+ case 'month':
363
+ return disabledMap.month(date);
364
+
365
+ case 'datetime':
366
+ return _paramUtils.default.handleDisabled(date, min, max, range, disabled, disabledTime) || disabledMap.day(date);
367
+
368
+ default:
369
+ return false;
370
+ }
371
+ };
372
+
333
373
  _proto.handleTextChange = function handleTextChange(date, index, e) {
334
374
  var _this4 = this;
335
375
 
376
+ var _this$props4 = this.props,
377
+ disabledTime = _this$props4.disabledTime,
378
+ disabled = _this$props4.disabled,
379
+ max = _this$props4.max,
380
+ min = _this$props4.min,
381
+ range = _this$props4.range;
336
382
  var format = this.getFormat();
337
383
  var val = date ? _utils.default.format(date, format) : '';
384
+ var isDisabled;
385
+
386
+ if (disabled || disabledTime || max || min || range) {
387
+ isDisabled = this.handleDisabled(date);
388
+ if (isDisabled) return;
389
+ }
338
390
 
339
391
  if (!this.props.range) {
340
392
  var close = !(e && e.target && this.element.contains(e.target));
@@ -415,10 +467,10 @@ function (_PureComponent) {
415
467
  };
416
468
 
417
469
  _proto.renderText = function renderText(value, placeholder, key) {
418
- var _this$props3 = this.props,
419
- inputable = _this$props3.inputable,
420
- formatResult = _this$props3.formatResult,
421
- disabled = _this$props3.disabled;
470
+ var _this$props5 = this.props,
471
+ inputable = _this$props5.inputable,
472
+ formatResult = _this$props5.formatResult,
473
+ disabled = _this$props5.disabled;
422
474
  var date = this.parseDate(value);
423
475
  var className = (0, _classnames.default)((0, _styles.datepickerClass)('txt', this.state["picker" + key] && 'text-focus'), _utils.default.isInvalid(date) && (0, _styles2.inputClass)('placeholder'));
424
476
  var resultFormat = formatResult || this.getFormat();
@@ -442,13 +494,13 @@ function (_PureComponent) {
442
494
  _proto.renderResult = function renderResult() {
443
495
  var _this6 = this;
444
496
 
445
- var _this$props4 = this.props,
446
- disabled = _this$props4.disabled,
447
- range = _this$props4.range,
448
- placeholder = _this$props4.placeholder,
449
- type = _this$props4.type,
450
- innerTitle = _this$props4.innerTitle,
451
- inputable = _this$props4.inputable;
497
+ var _this$props6 = this.props,
498
+ disabled = _this$props6.disabled,
499
+ range = _this$props6.range,
500
+ placeholder = _this$props6.placeholder,
501
+ type = _this$props6.type,
502
+ innerTitle = _this$props6.innerTitle,
503
+ inputable = _this$props6.inputable;
452
504
  var value = this.props.value;
453
505
  if (!value && range) value = []; // const isEmpty = !value || value.length === 0
454
506
 
@@ -484,10 +536,10 @@ function (_PureComponent) {
484
536
  var _this$state = this.state,
485
537
  focus = _this$state.focus,
486
538
  position = _this$state.position;
487
- var _this$props5 = this.props,
488
- absolute = _this$props5.absolute,
489
- zIndex = _this$props5.zIndex,
490
- quickSelect = _this$props5.quickSelect;
539
+ var _this$props7 = this.props,
540
+ absolute = _this$props7.absolute,
541
+ zIndex = _this$props7.zIndex,
542
+ quickSelect = _this$props7.quickSelect;
491
543
  var props = {
492
544
  absolute: absolute,
493
545
  focus: focus,
@@ -512,18 +564,18 @@ function (_PureComponent) {
512
564
  var _this7 = this;
513
565
 
514
566
  if (!this.firstRender) return undefined;
515
- var _this$props6 = this.props,
516
- range = _this$props6.range,
517
- type = _this$props6.type,
518
- value = _this$props6.value,
519
- min = _this$props6.min,
520
- max = _this$props6.max,
521
- disabled = _this$props6.disabled,
522
- allowSingle = _this$props6.allowSingle,
523
- hourStep = _this$props6.hourStep,
524
- minuteStep = _this$props6.minuteStep,
525
- secondStep = _this$props6.secondStep,
526
- disabledTime = _this$props6.disabledTime;
567
+ var _this$props8 = this.props,
568
+ range = _this$props8.range,
569
+ type = _this$props8.type,
570
+ value = _this$props8.value,
571
+ min = _this$props8.min,
572
+ max = _this$props8.max,
573
+ disabled = _this$props8.disabled,
574
+ allowSingle = _this$props8.allowSingle,
575
+ hourStep = _this$props8.hourStep,
576
+ minuteStep = _this$props8.minuteStep,
577
+ secondStep = _this$props8.secondStep,
578
+ disabledTime = _this$props8.disabledTime;
527
579
  var format = this.getFormat();
528
580
  var quicks = this.getQuick(format);
529
581
  var Component = range ? _Range.default : _Picker.default;
@@ -548,17 +600,18 @@ function (_PureComponent) {
548
600
  hourStep: hourStep,
549
601
  minuteStep: minuteStep,
550
602
  secondStep: secondStep,
551
- disabledTime: disabledTime
603
+ disabledTime: disabledTime,
604
+ disabledRegister: this.disabledRegister
552
605
  }, this.props.children);
553
606
  };
554
607
 
555
608
  _proto.render = function render() {
556
- var _this$props7 = this.props,
557
- range = _this$props7.range,
558
- size = _this$props7.size,
559
- disabled = _this$props7.disabled,
560
- align = _this$props7.align,
561
- innerTitle = _this$props7.innerTitle;
609
+ var _this$props9 = this.props,
610
+ range = _this$props9.range,
611
+ size = _this$props9.size,
612
+ disabled = _this$props9.disabled,
613
+ align = _this$props9.align,
614
+ innerTitle = _this$props9.innerTitle;
562
615
  var focus = this.state.focus;
563
616
  var rtl = (0, _config.isRTL)();
564
617
  var className = (0, _styles.datepickerClass)('inner', range && 'range', size && "size-" + size, focus && 'focus', disabled === true && 'disabled', align && "align-" + align, getCurrentPosition(this.state.position), rtl && 'rtl', innerTitle && 'inner-title');
@@ -52,7 +52,9 @@ function (_PureComponent) {
52
52
  _this.handleYearMode = _this.handleModeChange.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), 'year');
53
53
  _this.handleWeekLeave = _this.handleWeek.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), null);
54
54
  _this.handleTimeChange = _this.handleTimeChange.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
55
+ _this.handleDisabled = _this.handleDisabled.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
55
56
  _this.formatWithDefaultTime = _this.formatWithDefaultTime.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
57
+ props.disabledRegister(_this.handleDisabled, 'day');
56
58
  return _this;
57
59
  }
58
60
 
@@ -153,23 +155,18 @@ function (_PureComponent) {
153
155
  this.props.onDayHover(date);
154
156
  };
155
157
 
156
- _proto.renderDay = function renderDay(date, minD, maxD) {
158
+ _proto.handleDisabled = function handleDisabled(date, minDate, maxDate) {
157
159
  var _this$props6 = this.props,
158
- current = _this$props6.current,
159
- disabled = _this$props6.disabled,
160
- value = _this$props6.value,
161
160
  index = _this$props6.index,
162
- type = _this$props6.type,
163
- rangeDate = _this$props6.rangeDate,
161
+ disabled = _this$props6.disabled,
164
162
  range = _this$props6.range,
165
163
  rangeTemp = _this$props6.rangeTemp,
166
164
  min = _this$props6.min,
167
165
  max = _this$props6.max;
168
- var hover = this.state.hover;
169
166
 
170
- var hmsDate = _utils.default.toDate(date);
167
+ var minD = minDate || min && _utils.default.toDate(_utils.default.format(min, minStr, new Date()));
171
168
 
172
- _utils.default.setTime(hmsDate, current);
169
+ var maxD = maxDate || max && _utils.default.toDate(_utils.default.format(max, maxStr, new Date()));
173
170
 
174
171
  var isDisabled = disabled ? disabled(date) : false; // only for single, single picker don't has index
175
172
 
@@ -190,6 +187,23 @@ function (_PureComponent) {
190
187
  }
191
188
  }
192
189
 
190
+ return isDisabled;
191
+ };
192
+
193
+ _proto.renderDay = function renderDay(date, minD, maxD) {
194
+ var _this$props7 = this.props,
195
+ current = _this$props7.current,
196
+ value = _this$props7.value,
197
+ index = _this$props7.index,
198
+ type = _this$props7.type,
199
+ rangeDate = _this$props7.rangeDate;
200
+ var hover = this.state.hover;
201
+
202
+ var hmsDate = _utils.default.toDate(date);
203
+
204
+ _utils.default.setTime(hmsDate, current);
205
+
206
+ var isDisabled = this.handleDisabled(date, minD, maxD);
193
207
  var classList = [_utils.default.isSameDay(date, this.today) && 'today', current.getMonth() !== date.getMonth() && 'other-month', isDisabled && 'disabled'];
194
208
  var hoverClass;
195
209
  var hoverProps = {};
@@ -229,10 +243,10 @@ function (_PureComponent) {
229
243
  };
230
244
 
231
245
  _proto.renderTimepicker = function renderTimepicker() {
232
- var _this$props7 = this.props,
233
- rangeDate = _this$props7.rangeDate,
234
- index = _this$props7.index,
235
- showTimePicker = _this$props7.showTimePicker;
246
+ var _this$props8 = this.props,
247
+ rangeDate = _this$props8.rangeDate,
248
+ index = _this$props8.index,
249
+ showTimePicker = _this$props8.showTimePicker;
236
250
  if (this.props.type !== 'datetime') return undefined;
237
251
  if (!showTimePicker) return undefined;
238
252
  var format = this.props.format;
@@ -262,11 +276,11 @@ function (_PureComponent) {
262
276
  _proto.render = function render() {
263
277
  var _this2 = this;
264
278
 
265
- var _this$props8 = this.props,
266
- current = _this$props8.current,
267
- min = _this$props8.min,
268
- index = _this$props8.index,
269
- max = _this$props8.max;
279
+ var _this$props9 = this.props,
280
+ current = _this$props9.current,
281
+ min = _this$props9.min,
282
+ index = _this$props9.index,
283
+ max = _this$props9.max;
270
284
  var days = this.getDays();
271
285
  this.today = _utils.default.newDate();
272
286
 
@@ -344,7 +358,8 @@ Day.propTypes = {
344
358
  type: _propTypes.default.string.isRequired,
345
359
  value: _propTypes.default.object,
346
360
  defaultTime: _propTypes.default.array,
347
- allowSingle: _propTypes.default.bool
361
+ allowSingle: _propTypes.default.bool,
362
+ disabledRegister: _propTypes.default.func
348
363
  };
349
364
  var _default = Day;
350
365
  exports.default = _default;
@@ -39,6 +39,8 @@ function (_PureComponent) {
39
39
  _this.handleNextYear = _this.handleYearChange.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), 1);
40
40
  _this.handlePrevYear = _this.handleYearChange.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), -1);
41
41
  _this.handleYearClick = _this.handleYearClick.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
42
+ _this.handleDisabled = _this.handleDisabled.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
43
+ props.disabledRegister(_this.handleDisabled, 'month');
42
44
  return _this;
43
45
  }
44
46
 
@@ -67,22 +69,15 @@ function (_PureComponent) {
67
69
  if (!isMonthType) onModeChange('day');
68
70
  };
69
71
 
70
- _proto.renderMonth = function renderMonth(m, i) {
72
+ _proto.handleDisabled = function handleDisabled(date) {
71
73
  var _this$props3 = this.props,
72
- value = _this$props3.value,
73
74
  min = _this$props3.min,
74
75
  disabled = _this$props3.disabled,
75
76
  range = _this$props3.range,
76
77
  type = _this$props3.type,
77
- current = _this$props3.current,
78
78
  index = _this$props3.index,
79
79
  rangeDate = _this$props3.rangeDate,
80
80
  max = _this$props3.max;
81
-
82
- var date = _utils.default.toDate(MONTHBASE);
83
-
84
- date.setMonth(i);
85
- date.setFullYear(current.getFullYear());
86
81
  var isDisabled = min && _utils.default.compareMonth(min, date, 1) >= 0;
87
82
 
88
83
  if (!isDisabled) {
@@ -105,6 +100,19 @@ function (_PureComponent) {
105
100
  }
106
101
  }
107
102
 
103
+ return isDisabled;
104
+ };
105
+
106
+ _proto.renderMonth = function renderMonth(m, i) {
107
+ var _this$props4 = this.props,
108
+ value = _this$props4.value,
109
+ current = _this$props4.current;
110
+
111
+ var date = _utils.default.toDate(MONTHBASE);
112
+
113
+ date.setMonth(i);
114
+ date.setFullYear(current.getFullYear());
115
+ var isDisabled = this.handleDisabled(date);
108
116
  var className = (0, _styles.datepickerClass)(_utils.default.isSameMonth(value, date) && 'active', isDisabled && 'disabled');
109
117
  return _react.default.createElement("span", {
110
118
  key: i,
@@ -150,7 +158,8 @@ Month.propTypes = {
150
158
  type: _propTypes.default.string.isRequired,
151
159
  value: _propTypes.default.object,
152
160
  index: _propTypes.default.number,
153
- rangeDate: _propTypes.default.array
161
+ rangeDate: _propTypes.default.array,
162
+ disabledRegister: _propTypes.default.func
154
163
  };
155
164
  var _default = Month;
156
165
  exports.default = _default;
@@ -116,6 +116,7 @@ function (_PureComponent) {
116
116
  step = _this$props2.step,
117
117
  ampm = _this$props2.ampm;
118
118
  var value = Math.round(this.element.scrollTop / lineHeight);
119
+ if (value * step === this.props.value) return;
119
120
 
120
121
  if (typeof step === 'number' && step > 0 && !ampm && value !== this.props.value) {
121
122
  this.props.onChange(value * step);
@@ -43,11 +43,40 @@ function handleTimeDisabled(date, disabledTime) {
43
43
  return undefined;
44
44
  }
45
45
 
46
- function judgeTimeByRange() {
46
+ function handleDisabled() {
47
47
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
48
48
  args[_key] = arguments[_key];
49
49
  }
50
50
 
51
+ var date = args[0],
52
+ min = args[1],
53
+ max = args[2],
54
+ range = args[3],
55
+ disabled = args[4],
56
+ disabledTime = args[5];
57
+ var isDisabled;
58
+ if (disabled) isDisabled = disabled(date);
59
+ if (disabledTime) isDisabled = isDisabled || handleTimeDisabled(date, disabledTime);
60
+ if (isDisabled) return true;
61
+
62
+ if (!isDisabled && min) {
63
+ if (compareAsc(date, min) < 0) return true;
64
+ if (range && compareAsc(date, addSeconds(min, range)) > 0) return true;
65
+ }
66
+
67
+ if (!isDisabled && max) {
68
+ if (compareAsc(date, max) > 0) return true;
69
+ if (range && compareAsc(date, addSeconds(max, -range)) < 0) return true;
70
+ }
71
+
72
+ return false;
73
+ }
74
+
75
+ function judgeTimeByRange() {
76
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
77
+ args[_key2] = arguments[_key2];
78
+ }
79
+
51
80
  var target = args[0],
52
81
  value = args[1],
53
82
  mode = args[2],
@@ -83,7 +112,7 @@ function judgeTimeByRange() {
83
112
  break;
84
113
 
85
114
  case 'ampm':
86
- if (target === 0) {
115
+ {
87
116
  var hours = date.getHours();
88
117
 
89
118
  if (target === 1 && hours < 12) {
@@ -92,29 +121,14 @@ function judgeTimeByRange() {
92
121
  date.setHours(hours - 12);
93
122
  }
94
123
  }
95
-
96
124
  break;
97
125
 
98
126
  default:
99
127
  break;
100
128
  }
101
129
 
102
- var isDisabled;
103
- if (disabled) isDisabled = disabled(date);
104
- if (disabledTime) isDisabled = isDisabled || handleTimeDisabled(date, disabledTime);
105
- if (isDisabled) return [true];
106
-
107
- if (!isDisabled && min) {
108
- if (compareAsc(date, min) < 0) return [true];
109
- if (range && compareAsc(date, addSeconds(min, range)) > 0) return [true];
110
- }
111
-
112
- if (!isDisabled && max) {
113
- if (compareAsc(date, max) > 0) return [true];
114
- if (range && compareAsc(date, addSeconds(max, -range)) < 0) return [true];
115
- }
116
-
117
- return [false, date];
130
+ var isDisabled = handleDisabled(date, min, max, range, disabled, disabledTime);
131
+ return [isDisabled, date];
118
132
  }
119
133
 
120
134
  var _default = {
@@ -125,6 +139,8 @@ var _default = {
125
139
  timeHandleChangeParams: timeHandleChangeParams,
126
140
  quickHandleChangeParams: quickHandleChangeParams,
127
141
  weekHandleChangeParams: weekHandleChangeParams,
128
- judgeTimeByRange: judgeTimeByRange
142
+ judgeTimeByRange: judgeTimeByRange,
143
+ handleTimeDisabled: handleTimeDisabled,
144
+ handleDisabled: handleDisabled
129
145
  };
130
146
  exports.default = _default;
@@ -87,6 +87,7 @@ function (_PureComponent) {
87
87
  passive: false
88
88
  });
89
89
  this.inner.addEventListener('scroll', this.handleInnerScroll);
90
+ this.wheelElement.addEventListener('scroll', this.handleInnerScroll);
90
91
  };
91
92
 
92
93
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
@@ -104,6 +105,7 @@ function (_PureComponent) {
104
105
  this.wheelElement.removeEventListener('touchstart', this.handleTouchStart);
105
106
  this.wheelElement.removeEventListener('touchmove', this.handleTouchMove);
106
107
  this.inner.removeEventListener('scroll', this.handleInnerScroll);
108
+ this.wheelElement.removeEventListener('scroll', this.handleInnerScroll);
107
109
  };
108
110
 
109
111
  _proto.getWheelRect = function getWheelRect() {
@@ -283,20 +285,31 @@ function (_PureComponent) {
283
285
 
284
286
  this.setStartPoint(position);
285
287
  this.boundleScroll();
286
- } // inner scroll
288
+ } // handle inner scroll cased by input focus
287
289
  ;
288
290
 
289
291
  _proto.handleInnerScroll = function handleInnerScroll(e) {
290
292
  var target = e.target;
291
293
  var _this$props6 = this.props,
292
294
  left = _this$props6.left,
293
- scrollWidth = _this$props6.scrollWidth;
295
+ scrollWidth = _this$props6.scrollWidth,
296
+ top = _this$props6.top,
297
+ scrollHeight = _this$props6.scrollHeight;
294
298
 
295
299
  var _this$getWheelRect2 = this.getWheelRect(),
296
- width = _this$getWheelRect2.width;
297
-
298
- if (target.scrollLeft) {
299
- this.handleScroll(left + target.scrollLeft / (scrollWidth - width), this.props.top, undefined, 0);
300
+ width = _this$getWheelRect2.width,
301
+ height = _this$getWheelRect2.height;
302
+
303
+ if (target.scrollLeft || target.scrollTop) {
304
+ var sLeft = target.scrollLeft ? left + target.scrollLeft / (scrollWidth - width) : left;
305
+ var sTop = target.scrollTop ? top + target.scrollTop / (scrollHeight - height) : top;
306
+ sTop = Math.min(1, sTop);
307
+ sTop = Math.max(0, sTop);
308
+ sLeft = Math.min(1, sLeft);
309
+ sLeft = Math.max(0, sLeft);
310
+ this.handleScroll(sLeft, sTop, undefined, undefined, {
311
+ drag: true
312
+ });
300
313
  target.scrollLeft = 0;
301
314
  target.scrollTop = 0;
302
315
  }
@@ -55,7 +55,8 @@ function datum(Origin) {
55
55
 
56
56
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
57
57
  if (!(0, _shallowEqual.default)(prevProps.data, this.props.data)) {
58
- this.datum.updateDisabled(this.props.disabled);
58
+ var disabled = this.props.disabled;
59
+ this.datum.updateDisabled(typeof disabled === 'function' ? disabled : undefined);
59
60
  this.datum.setData(this.props.data, true);
60
61
  this.forceUpdate();
61
62
  }
package/css/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Created by scripts/src-index.js.
2
2
  import * as utils from './utils'
3
3
 
4
- export default { utils, version: '1.10.12' }
4
+ export default { utils, version: '1.10.13' }
5
5
  export { utils }
6
6
  export { setLocale } from './locale'
7
7
  export { color, style } from './utils/expose'
package/css/index.js CHANGED
@@ -224,6 +224,6 @@ exports.Upload = _Upload.default;
224
224
  // Created by scripts/src-index.js.
225
225
  var _default = {
226
226
  utils: utils,
227
- version: '1.10.12'
227
+ version: '1.10.13'
228
228
  };
229
229
  exports.default = _default;