@progress/kendo-react-dateinputs 4.13.0-dev.202111291459 → 4.13.0-dev.202112060804
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/dist/es/calendar/components/Calendar.d.ts +43 -9
- package/dist/es/calendar/components/Calendar.js +48 -28
- package/dist/es/calendar/components/MultiViewCalendar.d.ts +51 -19
- package/dist/es/calendar/components/MultiViewCalendar.js +64 -37
- package/dist/es/dateinput/DateInput.d.ts +46 -4
- package/dist/es/dateinput/DateInput.js +64 -43
- package/dist/es/datepicker/DatePicker.d.ts +63 -9
- package/dist/es/datepicker/DatePicker.js +68 -47
- package/dist/es/daterangepicker/DateRangePicker.d.ts +51 -11
- package/dist/es/daterangepicker/DateRangePicker.js +60 -32
- package/dist/es/datetimepicker/DateTimePicker.d.ts +54 -4
- package/dist/es/datetimepicker/DateTimePicker.js +54 -33
- package/dist/es/hooks/usePickerFloatingLabel.d.ts +1 -1
- package/dist/es/main.d.ts +8 -8
- package/dist/es/main.js +8 -8
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/timepicker/TimeList.d.ts +2 -0
- package/dist/es/timepicker/TimeList.js +3 -2
- package/dist/es/timepicker/TimePart.d.ts +2 -0
- package/dist/es/timepicker/TimePart.js +3 -2
- package/dist/es/timepicker/TimePicker.d.ts +58 -4
- package/dist/es/timepicker/TimePicker.js +60 -39
- package/dist/es/timepicker/TimeSelector.d.ts +2 -0
- package/dist/es/timepicker/TimeSelector.js +3 -2
- package/dist/es/utils.d.ts +4 -0
- package/dist/es/utils.js +20 -0
- package/dist/npm/calendar/components/Calendar.d.ts +43 -9
- package/dist/npm/calendar/components/Calendar.js +48 -28
- package/dist/npm/calendar/components/MultiViewCalendar.d.ts +51 -19
- package/dist/npm/calendar/components/MultiViewCalendar.js +62 -35
- package/dist/npm/dateinput/DateInput.d.ts +46 -4
- package/dist/npm/dateinput/DateInput.js +64 -43
- package/dist/npm/datepicker/DatePicker.d.ts +63 -9
- package/dist/npm/datepicker/DatePicker.js +67 -46
- package/dist/npm/daterangepicker/DateRangePicker.d.ts +51 -11
- package/dist/npm/daterangepicker/DateRangePicker.js +58 -30
- package/dist/npm/datetimepicker/DateTimePicker.d.ts +54 -4
- package/dist/npm/datetimepicker/DateTimePicker.js +53 -32
- package/dist/npm/hooks/usePickerFloatingLabel.d.ts +1 -1
- package/dist/npm/main.d.ts +8 -8
- package/dist/npm/main.js +7 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/timepicker/TimeList.d.ts +2 -0
- package/dist/npm/timepicker/TimeList.js +3 -2
- package/dist/npm/timepicker/TimePart.d.ts +2 -0
- package/dist/npm/timepicker/TimePart.js +3 -2
- package/dist/npm/timepicker/TimePicker.d.ts +58 -4
- package/dist/npm/timepicker/TimePicker.js +59 -38
- package/dist/npm/timepicker/TimeSelector.d.ts +2 -0
- package/dist/npm/timepicker/TimeSelector.js +3 -2
- package/dist/npm/utils.d.ts +4 -0
- package/dist/npm/utils.js +21 -0
- package/dist/systemjs/kendo-react-dateinputs.js +1 -1
- package/package.json +14 -9
|
@@ -47,9 +47,10 @@ var TimeSelector_1 = require("./TimeSelector");
|
|
|
47
47
|
var utils_1 = require("../utils");
|
|
48
48
|
var utils_2 = require("./utils");
|
|
49
49
|
var usePickerFloatingLabel_1 = require("../hooks/usePickerFloatingLabel");
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
/** @hidden */
|
|
51
|
+
var TimePickerWithoutContext = /** @class */ (function (_super) {
|
|
52
|
+
__extends(TimePickerWithoutContext, _super);
|
|
53
|
+
function TimePickerWithoutContext(props) {
|
|
53
54
|
var _this = _super.call(this, props) || this;
|
|
54
55
|
_this._popupId = kendo_react_common_1.guid();
|
|
55
56
|
_this._element = null;
|
|
@@ -139,8 +140,8 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
139
140
|
};
|
|
140
141
|
kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
|
|
141
142
|
_this.state = {
|
|
142
|
-
value: _this.props.defaultValue ||
|
|
143
|
-
show: _this.props.defaultShow ||
|
|
143
|
+
value: _this.props.defaultValue || TimePickerWithoutContext.defaultProps.defaultValue,
|
|
144
|
+
show: _this.props.defaultShow || TimePickerWithoutContext.defaultProps.defaultShow,
|
|
144
145
|
focused: false
|
|
145
146
|
};
|
|
146
147
|
_this.normalizeTime = _this.normalizeTime.bind(_this);
|
|
@@ -149,7 +150,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
149
150
|
_this.mergeTime = _this.mergeTime.bind(_this);
|
|
150
151
|
return _this;
|
|
151
152
|
}
|
|
152
|
-
Object.defineProperty(
|
|
153
|
+
Object.defineProperty(TimePickerWithoutContext.prototype, "element", {
|
|
153
154
|
/**
|
|
154
155
|
* Gets the wrapping element of the TimePicker.
|
|
155
156
|
*/
|
|
@@ -159,7 +160,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
159
160
|
enumerable: true,
|
|
160
161
|
configurable: true
|
|
161
162
|
});
|
|
162
|
-
Object.defineProperty(
|
|
163
|
+
Object.defineProperty(TimePickerWithoutContext.prototype, "dateInput", {
|
|
163
164
|
/**
|
|
164
165
|
* Gets the DateInput component inside the TimePicker component.
|
|
165
166
|
*/
|
|
@@ -169,7 +170,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
169
170
|
enumerable: true,
|
|
170
171
|
configurable: true
|
|
171
172
|
});
|
|
172
|
-
Object.defineProperty(
|
|
173
|
+
Object.defineProperty(TimePickerWithoutContext.prototype, "timeSelector", {
|
|
173
174
|
/**
|
|
174
175
|
* Gets the TimeSelector component inside the TimePicker component.
|
|
175
176
|
*/
|
|
@@ -179,7 +180,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
179
180
|
enumerable: true,
|
|
180
181
|
configurable: true
|
|
181
182
|
});
|
|
182
|
-
Object.defineProperty(
|
|
183
|
+
Object.defineProperty(TimePickerWithoutContext.prototype, "value", {
|
|
183
184
|
/**
|
|
184
185
|
* Gets the value of the TimePicker.
|
|
185
186
|
*/
|
|
@@ -194,7 +195,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
194
195
|
enumerable: true,
|
|
195
196
|
configurable: true
|
|
196
197
|
});
|
|
197
|
-
Object.defineProperty(
|
|
198
|
+
Object.defineProperty(TimePickerWithoutContext.prototype, "show", {
|
|
198
199
|
/**
|
|
199
200
|
* Gets the popup state of the TimeSelector.
|
|
200
201
|
*/
|
|
@@ -208,7 +209,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
208
209
|
enumerable: true,
|
|
209
210
|
configurable: true
|
|
210
211
|
});
|
|
211
|
-
Object.defineProperty(
|
|
212
|
+
Object.defineProperty(TimePickerWithoutContext.prototype, "name", {
|
|
212
213
|
/**
|
|
213
214
|
* Gets the `name` property of the TimePicker.
|
|
214
215
|
*/
|
|
@@ -218,7 +219,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
218
219
|
enumerable: true,
|
|
219
220
|
configurable: true
|
|
220
221
|
});
|
|
221
|
-
Object.defineProperty(
|
|
222
|
+
Object.defineProperty(TimePickerWithoutContext.prototype, "validity", {
|
|
222
223
|
/**
|
|
223
224
|
* Represents the validity state into which the TimePicker is set.
|
|
224
225
|
*/
|
|
@@ -241,54 +242,54 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
241
242
|
enumerable: true,
|
|
242
243
|
configurable: true
|
|
243
244
|
});
|
|
244
|
-
Object.defineProperty(
|
|
245
|
+
Object.defineProperty(TimePickerWithoutContext.prototype, "validityStyles", {
|
|
245
246
|
/**
|
|
246
247
|
* @hidden
|
|
247
248
|
*/
|
|
248
249
|
get: function () {
|
|
249
250
|
return this.props.validityStyles !== undefined
|
|
250
251
|
? this.props.validityStyles
|
|
251
|
-
:
|
|
252
|
+
: TimePickerWithoutContext.defaultProps.validityStyles;
|
|
252
253
|
},
|
|
253
254
|
enumerable: true,
|
|
254
255
|
configurable: true
|
|
255
256
|
});
|
|
256
|
-
Object.defineProperty(
|
|
257
|
+
Object.defineProperty(TimePickerWithoutContext.prototype, "required", {
|
|
257
258
|
/**
|
|
258
259
|
* @hidden
|
|
259
260
|
*/
|
|
260
261
|
get: function () {
|
|
261
262
|
return this.props.required !== undefined
|
|
262
263
|
? this.props.required
|
|
263
|
-
:
|
|
264
|
+
: TimePickerWithoutContext.defaultProps.required;
|
|
264
265
|
},
|
|
265
266
|
enumerable: true,
|
|
266
267
|
configurable: true
|
|
267
268
|
});
|
|
268
|
-
Object.defineProperty(
|
|
269
|
+
Object.defineProperty(TimePickerWithoutContext.prototype, "popupSettings", {
|
|
269
270
|
get: function () {
|
|
270
|
-
return this.props.popupSettings ||
|
|
271
|
+
return this.props.popupSettings || TimePickerWithoutContext.defaultProps.popupSettings;
|
|
271
272
|
},
|
|
272
273
|
enumerable: true,
|
|
273
274
|
configurable: true
|
|
274
275
|
});
|
|
275
|
-
Object.defineProperty(
|
|
276
|
+
Object.defineProperty(TimePickerWithoutContext.prototype, "min", {
|
|
276
277
|
get: function () {
|
|
277
|
-
return this.props.min !== undefined ? this.props.min :
|
|
278
|
+
return this.props.min !== undefined ? this.props.min : TimePickerWithoutContext.defaultProps.min;
|
|
278
279
|
},
|
|
279
280
|
enumerable: true,
|
|
280
281
|
configurable: true
|
|
281
282
|
});
|
|
282
|
-
Object.defineProperty(
|
|
283
|
+
Object.defineProperty(TimePickerWithoutContext.prototype, "max", {
|
|
283
284
|
get: function () {
|
|
284
|
-
return this.props.max !== undefined ? this.props.max :
|
|
285
|
+
return this.props.max !== undefined ? this.props.max : TimePickerWithoutContext.defaultProps.max;
|
|
285
286
|
},
|
|
286
287
|
enumerable: true,
|
|
287
288
|
configurable: true
|
|
288
289
|
});
|
|
289
|
-
Object.defineProperty(
|
|
290
|
+
Object.defineProperty(TimePickerWithoutContext.prototype, "dateInputComp", {
|
|
290
291
|
get: function () {
|
|
291
|
-
return this.props.dateInput ||
|
|
292
|
+
return this.props.dateInput || TimePickerWithoutContext.defaultProps.dateInput;
|
|
292
293
|
},
|
|
293
294
|
enumerable: true,
|
|
294
295
|
configurable: true
|
|
@@ -296,7 +297,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
296
297
|
/**
|
|
297
298
|
* @hidden
|
|
298
299
|
*/
|
|
299
|
-
|
|
300
|
+
TimePickerWithoutContext.prototype.componentDidMount = function () {
|
|
300
301
|
if (this.show) {
|
|
301
302
|
// If defaultShow is true during the initial render, the popup is not aligned.
|
|
302
303
|
this.forceUpdate();
|
|
@@ -305,13 +306,13 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
305
306
|
/**
|
|
306
307
|
* @hidden
|
|
307
308
|
*/
|
|
308
|
-
|
|
309
|
+
TimePickerWithoutContext.prototype.componentWillUnmount = function () {
|
|
309
310
|
clearTimeout(this.nextTickId);
|
|
310
311
|
};
|
|
311
312
|
/**
|
|
312
313
|
* @hidden
|
|
313
314
|
*/
|
|
314
|
-
|
|
315
|
+
TimePickerWithoutContext.prototype.componentDidUpdate = function () {
|
|
315
316
|
if (this._timeSelector && this.show && !this.prevShow) {
|
|
316
317
|
this._timeSelector.focusActiveList();
|
|
317
318
|
}
|
|
@@ -327,7 +328,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
327
328
|
/**
|
|
328
329
|
* @hidden
|
|
329
330
|
*/
|
|
330
|
-
|
|
331
|
+
TimePickerWithoutContext.prototype.render = function () {
|
|
331
332
|
var _this = this;
|
|
332
333
|
var _a = this.props, disabled = _a.disabled, tabIndex = _a.tabIndex, title = _a.title, id = _a.id, className = _a.className, format = _a.format, formatPlaceholder = _a.formatPlaceholder, smoothScroll = _a.smoothScroll, width = _a.width, name = _a.name, steps = _a.steps, cancelButton = _a.cancelButton, nowButton = _a.nowButton, validationMessage = _a.validationMessage, required = _a.required, validityStyles = _a.validityStyles, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy;
|
|
333
334
|
var _b = this.popupSettings, popupClass = _b.popupClass, otherPopupSettings = __rest(_b, ["popupClass"]);
|
|
@@ -370,7 +371,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
370
371
|
horizontal: 'left',
|
|
371
372
|
vertical: 'top'
|
|
372
373
|
} }, otherPopupSettings);
|
|
373
|
-
var timeSelector = (React.createElement(TimeSelector_1.TimeSelector, { ref: this.setTimeSelectorRef, cancelButton: cancelButton, disabled: disabled, nowButton: nowButton, format: format, min: this.min, max: this.max, steps: steps, smoothScroll: smoothScroll, value: this.value, onChange: this.handleValueChange, onReject: this.handleValueReject }));
|
|
374
|
+
var timeSelector = (React.createElement(TimeSelector_1.TimeSelector, { ref: this.setTimeSelectorRef, show: this.show, cancelButton: cancelButton, disabled: disabled, nowButton: nowButton, format: format, min: this.min, max: this.max, steps: steps, smoothScroll: smoothScroll, value: this.value, onChange: this.handleValueChange, onReject: this.handleValueReject }));
|
|
374
375
|
var localizationService = kendo_react_intl_1.provideLocalizationService(this);
|
|
375
376
|
var toggleClockMessage = localizationService.toLanguageString(messages_1.toggleClock, messages_1.messages[messages_1.toggleClock]);
|
|
376
377
|
var toggleTimeMessage = localizationService
|
|
@@ -393,28 +394,32 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
393
394
|
? (React.createElement(usePickerFloatingLabel_1.PickerFloatingLabel, { dateInput: this._dateInput, label: this.props.label, editorId: id, editorValid: isValid, editorDisabled: this.props.disabled, children: timepicker, style: { width: this.props.width } }))
|
|
394
395
|
: timepicker;
|
|
395
396
|
};
|
|
396
|
-
|
|
397
|
+
TimePickerWithoutContext.prototype.normalizeTime = function (date) {
|
|
397
398
|
return utils_1.setTime(utils_1.MIDNIGHT_DATE, date);
|
|
398
399
|
};
|
|
399
|
-
|
|
400
|
+
TimePickerWithoutContext.prototype.setShow = function (show) {
|
|
400
401
|
if (this.show === show) {
|
|
401
402
|
return;
|
|
402
403
|
}
|
|
403
404
|
this.setState({ show: show });
|
|
404
405
|
};
|
|
405
|
-
|
|
406
|
+
TimePickerWithoutContext.prototype.nextTick = function (f) {
|
|
406
407
|
// XXX: use window.setTimeout due to async focus/blur events in IE, and missing relatedTarget prop.
|
|
407
408
|
// XXX: https://github.com/facebook/react/issues/3751
|
|
408
409
|
clearTimeout(this.nextTickId);
|
|
409
410
|
this.nextTickId = window.setTimeout(function () { return f(); });
|
|
410
411
|
};
|
|
411
|
-
|
|
412
|
+
TimePickerWithoutContext.prototype.mergeTime = function (value) {
|
|
412
413
|
return this.value && value ? utils_1.setTime(this.value, value) : value;
|
|
413
414
|
};
|
|
414
415
|
/**
|
|
415
416
|
* @hidden
|
|
416
417
|
*/
|
|
417
|
-
|
|
418
|
+
TimePickerWithoutContext.displayName = 'TimePicker';
|
|
419
|
+
/**
|
|
420
|
+
* @hidden
|
|
421
|
+
*/
|
|
422
|
+
TimePickerWithoutContext.propTypes = {
|
|
418
423
|
className: PropTypes.string,
|
|
419
424
|
cancelButton: PropTypes.bool,
|
|
420
425
|
nowButton: PropTypes.bool,
|
|
@@ -482,7 +487,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
482
487
|
/**
|
|
483
488
|
* @hidden
|
|
484
489
|
*/
|
|
485
|
-
|
|
490
|
+
TimePickerWithoutContext.defaultProps = {
|
|
486
491
|
defaultShow: false,
|
|
487
492
|
defaultValue: null,
|
|
488
493
|
disabled: false,
|
|
@@ -496,7 +501,23 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
496
501
|
validityStyles: true,
|
|
497
502
|
dateInput: DateInput_1.DateInput
|
|
498
503
|
};
|
|
499
|
-
return
|
|
504
|
+
return TimePickerWithoutContext;
|
|
500
505
|
}(React.Component));
|
|
501
|
-
exports.
|
|
502
|
-
|
|
506
|
+
exports.TimePickerWithoutContext = TimePickerWithoutContext;
|
|
507
|
+
/**
|
|
508
|
+
* Represents the PropsContext of the `TimePicker` component.
|
|
509
|
+
* Used for global configuration of all `TimePicker` instances.
|
|
510
|
+
*
|
|
511
|
+
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
512
|
+
*/
|
|
513
|
+
exports.TimePickerPropsContext = kendo_react_common_1.createPropsContext();
|
|
514
|
+
/* eslint-disable @typescript-eslint/no-redeclare */
|
|
515
|
+
/**
|
|
516
|
+
* Represents the KendoReact TimePicker Component.
|
|
517
|
+
*
|
|
518
|
+
* Accepts properties of type [TimePicker]({% slug api_dateinputs_timepickerprops %}).
|
|
519
|
+
* Obtaining the `ref` returns an object of type [TimePickerHandle]({% slug api_dateinputs_timepickerhandle %}).
|
|
520
|
+
*/
|
|
521
|
+
exports.TimePicker = kendo_react_common_1.withPropsContext(exports.TimePickerPropsContext, TimePickerWithoutContext);
|
|
522
|
+
exports.TimePicker.displayName = 'KendoReactTimePicker';
|
|
523
|
+
kendo_react_intl_1.registerForLocalization(TimePickerWithoutContext);
|
|
@@ -36,6 +36,7 @@ export interface TimeSelectorProps {
|
|
|
36
36
|
tabIndex?: number;
|
|
37
37
|
value?: Date | null;
|
|
38
38
|
boundRange?: boolean;
|
|
39
|
+
show?: boolean;
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
41
42
|
* @hidden
|
|
@@ -80,6 +81,7 @@ export declare class TimeSelector extends React.Component<TimeSelectorProps, Tim
|
|
|
80
81
|
smoothScroll: PropTypes.Requireable<boolean>;
|
|
81
82
|
tabIndex: PropTypes.Requireable<number>;
|
|
82
83
|
value: PropTypes.Requireable<Date>;
|
|
84
|
+
show: PropTypes.Requireable<boolean>;
|
|
83
85
|
};
|
|
84
86
|
static defaultProps: {
|
|
85
87
|
value: any;
|
|
@@ -177,7 +177,7 @@ var TimeSelector = /** @class */ (function (_super) {
|
|
|
177
177
|
return (React.createElement("div", { ref: function (el) { _this._element = el; }, tabIndex: !disabled ? tabIndex || 0 : undefined, className: kendo_react_common_1.classNames('k-timeselector k-reset', className, {
|
|
178
178
|
'k-state-disabled': disabled
|
|
179
179
|
}), onKeyDown: this.handleKeyDown },
|
|
180
|
-
React.createElement(TimePart_1.TimePart, { ref: function (el) { _this.timePart = el; }, value: this.current, onChange: this.handleChange, onNowClick: this.handleNowClick, format: format, smoothScroll: smoothScroll, min: min, max: max, boundRange: boundRange, disabled: disabled, nowButton: nowButton, steps: steps }),
|
|
180
|
+
React.createElement(TimePart_1.TimePart, { ref: function (el) { _this.timePart = el; }, value: this.current, onChange: this.handleChange, onNowClick: this.handleNowClick, format: format, smoothScroll: smoothScroll, min: min, max: max, boundRange: boundRange, disabled: disabled, nowButton: nowButton, steps: steps, show: this.props.show }),
|
|
181
181
|
React.createElement("div", { className: "k-time-footer k-actions k-hstack k-justify-content-stretch" },
|
|
182
182
|
cancelButton &&
|
|
183
183
|
React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", ref: function (btn) { _this._cancelButton = btn; }, className: "k-time-cancel", onClick: this.handleReject, title: cancelMessage }, { 'aria-label': cancelMessage }), cancelMessage),
|
|
@@ -230,7 +230,8 @@ var TimeSelector = /** @class */ (function (_super) {
|
|
|
230
230
|
}),
|
|
231
231
|
smoothScroll: PropTypes.bool,
|
|
232
232
|
tabIndex: PropTypes.number,
|
|
233
|
-
value: PropTypes.instanceOf(Date)
|
|
233
|
+
value: PropTypes.instanceOf(Date),
|
|
234
|
+
show: PropTypes.bool
|
|
234
235
|
};
|
|
235
236
|
TimeSelector.defaultProps = {
|
|
236
237
|
value: null,
|
package/dist/npm/utils.d.ts
CHANGED
|
@@ -4,6 +4,10 @@ import { CalendarViewEnum } from './calendar/models/CalendarViewEnum';
|
|
|
4
4
|
* @hidden
|
|
5
5
|
*/
|
|
6
6
|
export declare const isEqualRange: (initial: SelectionRange, updated: SelectionRange) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export declare function nullable(subRequirement: any): any;
|
|
7
11
|
/**
|
|
8
12
|
* @hidden
|
|
9
13
|
*/
|
package/dist/npm/utils.js
CHANGED
|
@@ -14,6 +14,27 @@ exports.isEqualRange = function (initial, updated) {
|
|
|
14
14
|
}
|
|
15
15
|
return kendo_date_math_1.isEqual(initialStart, updatedStart) && kendo_date_math_1.isEqual(initialEnd, updatedEnd);
|
|
16
16
|
};
|
|
17
|
+
// Polyfill for PropTypes.null
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
function nullable(subRequirement) {
|
|
22
|
+
var check = function (required, props, key) {
|
|
23
|
+
var rest = [];
|
|
24
|
+
for (var _i = 3; _i < arguments.length; _i++) {
|
|
25
|
+
rest[_i - 3] = arguments[_i];
|
|
26
|
+
}
|
|
27
|
+
if (props[key] === null) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
var sub = required ? subRequirement.isRequired : subRequirement;
|
|
31
|
+
return sub.apply(void 0, [props, key].concat(rest));
|
|
32
|
+
};
|
|
33
|
+
var fn = check.bind(null, false);
|
|
34
|
+
fn.isRequired = check.bind(null, true);
|
|
35
|
+
return fn;
|
|
36
|
+
}
|
|
37
|
+
exports.nullable = nullable;
|
|
17
38
|
/**
|
|
18
39
|
* @hidden
|
|
19
40
|
*/
|