@progress/kendo-react-dateinputs 13.4.0-develop.3 → 13.4.0-develop.5
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/dateinput/DateInput.d.ts +3 -2
- package/dateinput/DateInput.js +1 -1
- package/dateinput/DateInput.mjs +1 -1
- package/datepicker/DatePicker.d.ts +3 -2
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +322 -294
- package/datetimepicker/DateTimePicker.d.ts +7 -3
- package/datetimepicker/DateTimePicker.js +1 -1
- package/datetimepicker/DateTimePicker.mjs +141 -111
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +1 -1
- package/package.json +8 -8
- package/timepicker/TimePicker.d.ts +7 -3
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +171 -140
|
@@ -5,54 +5,78 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as n from "react";
|
|
9
9
|
import e from "prop-types";
|
|
10
|
-
import { Popup as
|
|
10
|
+
import { Popup as J } from "@progress/kendo-react-popup";
|
|
11
11
|
import { cloneDate as y } from "@progress/kendo-date-math";
|
|
12
|
-
import { withIdHOC as
|
|
13
|
-
import { clockIcon as
|
|
14
|
-
import { provideLocalizationService as
|
|
15
|
-
import { packageMetadata as
|
|
16
|
-
import { timePickerSet as
|
|
17
|
-
import { DateInput as
|
|
18
|
-
import { TimeSelector as
|
|
19
|
-
import { MIN_TIME as
|
|
20
|
-
import { isInRange as
|
|
21
|
-
import { PickerFloatingLabel as
|
|
22
|
-
import { Button as
|
|
23
|
-
import { AdaptiveMode as
|
|
24
|
-
import { ActionSheetContent as
|
|
25
|
-
const
|
|
26
|
-
constructor(
|
|
27
|
-
super(
|
|
12
|
+
import { withIdHOC as Q, createPropsContext as Y, classNames as c, uTimePicker as g, Keys as d, validatePackage as $, getLicenseMessage as ee, canUseDOM as T, subscribeToKendoPaste as te, AsyncFocusBlur as ie, WatermarkOverlay as se, withPropsContext as oe, withUnstyledHOC as ne, withAdaptiveModeContext as ae } from "@progress/kendo-react-common";
|
|
13
|
+
import { clockIcon as re } from "@progress/kendo-svg-icons";
|
|
14
|
+
import { provideLocalizationService as le, registerForLocalization as he } from "@progress/kendo-react-intl";
|
|
15
|
+
import { packageMetadata as C } from "../package-metadata.mjs";
|
|
16
|
+
import { timePickerSet as I, messages as u, toggleClock as f, timePickerCancel as de, toggleTimeSelector as M } from "../messages/index.mjs";
|
|
17
|
+
import { DateInput as ue } from "../dateinput/DateInput.mjs";
|
|
18
|
+
import { TimeSelector as pe } from "./TimeSelector.mjs";
|
|
19
|
+
import { MIN_TIME as me, MAX_TIME as ce, setTime as P, MIDNIGHT_DATE as ge } from "../utils.mjs";
|
|
20
|
+
import { isInRange as D, isSmallerThanMin as fe, isBiggerThanMax as ve } from "./utils.mjs";
|
|
21
|
+
import { PickerFloatingLabel as we } from "../hooks/usePickerFloatingLabel.mjs";
|
|
22
|
+
import { Button as be } from "@progress/kendo-react-buttons";
|
|
23
|
+
import { AdaptiveMode as Se } from "../common/AdaptiveMode.mjs";
|
|
24
|
+
import { ActionSheetContent as ye } from "@progress/kendo-react-layout";
|
|
25
|
+
const a = class a extends n.Component {
|
|
26
|
+
constructor(s) {
|
|
27
|
+
super(s), this._element = null, this._dateInput = n.createRef(), this._timeSelector = null, this.shouldFocusDateInput = !1, this.prevShow = !1, this.showLicenseWatermark = !1, this.handleKendoPasteValue = (t) => {
|
|
28
|
+
if (t instanceof Date && !isNaN(t.getTime())) {
|
|
29
|
+
this.applyKendoPasteTime(t);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const i = t != null ? String(t) : "";
|
|
33
|
+
if (!i)
|
|
34
|
+
return;
|
|
35
|
+
const o = new Date(i);
|
|
36
|
+
isNaN(o.getTime()) || this.applyKendoPasteTime(o);
|
|
37
|
+
}, this.applyKendoPasteTime = (t) => {
|
|
38
|
+
const i = this.normalizeTime(t);
|
|
39
|
+
if (!D(i, this.min, this.max))
|
|
40
|
+
return;
|
|
41
|
+
const o = new Event("change", { bubbles: !0 }), r = {
|
|
42
|
+
target: this._element,
|
|
43
|
+
currentTarget: this._element,
|
|
44
|
+
nativeEvent: o
|
|
45
|
+
};
|
|
46
|
+
this.handleValueChange({
|
|
47
|
+
syntheticEvent: r,
|
|
48
|
+
nativeEvent: o,
|
|
49
|
+
value: i
|
|
50
|
+
});
|
|
51
|
+
}, this.focus = () => {
|
|
28
52
|
this.dateInput && this.dateInput.focus();
|
|
29
53
|
}, this.renderTimeSelector = () => {
|
|
30
|
-
const { smoothScroll: t, cancelButton:
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
54
|
+
const { smoothScroll: t, cancelButton: i, nowButton: o, disabled: r, format: h, steps: l, unstyled: m } = this.props;
|
|
55
|
+
return /* @__PURE__ */ n.createElement(
|
|
56
|
+
pe,
|
|
33
57
|
{
|
|
34
58
|
ref: this.setTimeSelectorRef,
|
|
35
59
|
mobileMode: this.mobileMode,
|
|
36
60
|
show: this.show,
|
|
37
|
-
cancelButton:
|
|
38
|
-
disabled:
|
|
61
|
+
cancelButton: i,
|
|
62
|
+
disabled: r,
|
|
39
63
|
nowButton: o,
|
|
40
64
|
format: h,
|
|
41
65
|
min: this.min,
|
|
42
66
|
max: this.max,
|
|
43
|
-
steps:
|
|
67
|
+
steps: l,
|
|
44
68
|
smoothScroll: t,
|
|
45
69
|
value: this.value,
|
|
46
70
|
footer: !this.mobileMode,
|
|
47
71
|
handleTimeChange: this.mobileMode && this.handleTimeChange,
|
|
48
72
|
onChange: this.handleValueChange,
|
|
49
73
|
onReject: this.handleValueReject,
|
|
50
|
-
unstyled:
|
|
74
|
+
unstyled: m
|
|
51
75
|
}
|
|
52
76
|
);
|
|
53
77
|
}, this.renderPopup = () => {
|
|
54
|
-
const { popupClass: t, ...
|
|
55
|
-
popupClass: g.popup({ c:
|
|
78
|
+
const { popupClass: t, ...i } = this.popupSettings, { unstyled: o } = this.props, r = o && o.uTimePicker, h = c(t), l = {
|
|
79
|
+
popupClass: g.popup({ c: r }),
|
|
56
80
|
show: this.show,
|
|
57
81
|
animate: this.element !== null,
|
|
58
82
|
anchor: this.element,
|
|
@@ -66,37 +90,37 @@ const n = class n extends a.Component {
|
|
|
66
90
|
horizontal: "left",
|
|
67
91
|
vertical: "top"
|
|
68
92
|
},
|
|
69
|
-
...
|
|
93
|
+
...i
|
|
70
94
|
};
|
|
71
|
-
return this.props.popup ? /* @__PURE__ */
|
|
95
|
+
return this.props.popup ? /* @__PURE__ */ n.createElement(this.props.popup, { ...l }, this.renderTimeSelector()) : /* @__PURE__ */ n.createElement(J, { ...l }, this.renderTimeSelector());
|
|
72
96
|
}, this.renderAdaptivePopup = () => {
|
|
73
|
-
const { windowWidth: t = 0 } = this.state,
|
|
97
|
+
const { windowWidth: t = 0 } = this.state, i = {
|
|
74
98
|
expand: this.show,
|
|
75
99
|
onClose: this.handleBlur,
|
|
76
100
|
title: this.props.adaptiveTitle || this.props.label,
|
|
77
101
|
subTitle: this.props.adaptiveSubtitle,
|
|
78
102
|
windowWidth: t,
|
|
79
103
|
footer: {
|
|
80
|
-
cancelText: this.localizationService.toLanguageString(f, u[
|
|
104
|
+
cancelText: this.localizationService.toLanguageString(f, u[de]),
|
|
81
105
|
onCancel: this.handleValueReject,
|
|
82
|
-
applyText: this.localizationService.toLanguageString(
|
|
106
|
+
applyText: this.localizationService.toLanguageString(I, u[I]),
|
|
83
107
|
onApply: (o) => this.handleValueChange(o)
|
|
84
108
|
}
|
|
85
109
|
};
|
|
86
|
-
return /* @__PURE__ */
|
|
110
|
+
return /* @__PURE__ */ n.createElement(Se, { ...i }, /* @__PURE__ */ n.createElement(ye, null, this.renderTimeSelector()));
|
|
87
111
|
}, this.setTimeSelectorRef = (t) => {
|
|
88
112
|
this._timeSelector = t;
|
|
89
|
-
}, this.nextValue = (t,
|
|
90
|
-
const
|
|
91
|
-
this.handleValueChange({ ...t, value:
|
|
113
|
+
}, this.nextValue = (t, i) => t.value !== void 0 ? t.value : i.value, this.nextShow = (t, i) => t.show !== void 0 ? t.show : i.show, this.handleInputValueChange = (t) => {
|
|
114
|
+
const i = this.mergeTime(t.value);
|
|
115
|
+
this.handleValueChange({ ...t, value: i });
|
|
92
116
|
}, this.handleTimeChange = (t) => {
|
|
93
117
|
this.setState({ candidate: t.time });
|
|
94
118
|
}, this.handleValueChange = (t) => {
|
|
95
119
|
this.setState({
|
|
96
120
|
value: y(t.value || this.state.candidate)
|
|
97
121
|
}), this.valueDuringOnChange = t.value, this.showDuringOnChange = !1, this.shouldFocusDateInput = !0;
|
|
98
|
-
const { onChange:
|
|
99
|
-
|
|
122
|
+
const { onChange: i } = this.props, o = this.state.candidate || this.value;
|
|
123
|
+
i && i.call(void 0, {
|
|
100
124
|
syntheticEvent: t.syntheticEvent,
|
|
101
125
|
nativeEvent: t.nativeEvent,
|
|
102
126
|
value: o,
|
|
@@ -114,15 +138,15 @@ const n = class n extends a.Component {
|
|
|
114
138
|
}, this.handleIconMouseDown = (t) => {
|
|
115
139
|
t.preventDefault();
|
|
116
140
|
}, this.handleKeyDown = (t) => {
|
|
117
|
-
const { altKey:
|
|
141
|
+
const { altKey: i, keyCode: o } = t;
|
|
118
142
|
if (o === d.esc) {
|
|
119
143
|
this.shouldFocusDateInput = !0, this.setShow(!1);
|
|
120
144
|
return;
|
|
121
145
|
}
|
|
122
|
-
|
|
123
|
-
}, this.showLicenseWatermark =
|
|
124
|
-
value: this.props.defaultValue ||
|
|
125
|
-
show: this.props.defaultShow ||
|
|
146
|
+
i && (o === d.up || o === d.down) && (t.preventDefault(), t.stopPropagation(), this.shouldFocusDateInput = o === d.up, this.setShow(o === d.down));
|
|
147
|
+
}, this.showLicenseWatermark = !$(C, { component: "TimePicker" }), this.licenseMessage = ee(C), this.state = {
|
|
148
|
+
value: this.props.defaultValue || a.defaultProps.defaultValue,
|
|
149
|
+
show: this.props.defaultShow || a.defaultProps.defaultShow,
|
|
126
150
|
focused: !1,
|
|
127
151
|
candidate: null
|
|
128
152
|
}, this.normalizeTime = this.normalizeTime.bind(this), this.setShow = this.setShow.bind(this), this.mergeTime = this.mergeTime.bind(this);
|
|
@@ -131,7 +155,7 @@ const n = class n extends a.Component {
|
|
|
131
155
|
return this.props.id + "-popup-id";
|
|
132
156
|
}
|
|
133
157
|
get document() {
|
|
134
|
-
if (
|
|
158
|
+
if (T)
|
|
135
159
|
return this.element && this.element.ownerDocument || document;
|
|
136
160
|
}
|
|
137
161
|
/**
|
|
@@ -156,8 +180,8 @@ const n = class n extends a.Component {
|
|
|
156
180
|
* Gets the value of the TimePicker.
|
|
157
181
|
*/
|
|
158
182
|
get value() {
|
|
159
|
-
const
|
|
160
|
-
return
|
|
183
|
+
const s = this.valueDuringOnChange !== void 0 ? this.valueDuringOnChange : this.props.value !== void 0 ? this.props.value : this.state.value;
|
|
184
|
+
return s !== null ? y(s) : null;
|
|
161
185
|
}
|
|
162
186
|
/**
|
|
163
187
|
* Gets the popup state of the TimeSelector.
|
|
@@ -175,12 +199,12 @@ const n = class n extends a.Component {
|
|
|
175
199
|
* Represents the validity state into which the TimePicker is set.
|
|
176
200
|
*/
|
|
177
201
|
get validity() {
|
|
178
|
-
const
|
|
202
|
+
const s = this.value && this.normalizeTime(this.value), t = this.normalizeTime(this.min), i = this.normalizeTime(this.max), o = D(s, t, i), r = this.props.validationMessage !== void 0, h = (!this.required || this.value !== null) && o, l = this.props.valid !== void 0 ? this.props.valid : h;
|
|
179
203
|
return {
|
|
180
|
-
customError:
|
|
181
|
-
rangeOverflow:
|
|
182
|
-
rangeUnderflow:
|
|
183
|
-
valid:
|
|
204
|
+
customError: r,
|
|
205
|
+
rangeOverflow: ve(s, i),
|
|
206
|
+
rangeUnderflow: fe(s, t),
|
|
207
|
+
valid: l,
|
|
184
208
|
valueMissing: this.value === null
|
|
185
209
|
};
|
|
186
210
|
}
|
|
@@ -195,7 +219,7 @@ const n = class n extends a.Component {
|
|
|
195
219
|
* @hidden
|
|
196
220
|
*/
|
|
197
221
|
get validityStyles() {
|
|
198
|
-
return this.props.validityStyles !== void 0 ? this.props.validityStyles :
|
|
222
|
+
return this.props.validityStyles !== void 0 ? this.props.validityStyles : a.defaultProps.validityStyles;
|
|
199
223
|
}
|
|
200
224
|
/**
|
|
201
225
|
* @hidden
|
|
@@ -204,26 +228,33 @@ const n = class n extends a.Component {
|
|
|
204
228
|
return this.props.required !== void 0 ? this.props.required : !1;
|
|
205
229
|
}
|
|
206
230
|
get popupSettings() {
|
|
207
|
-
return this.props.popupSettings ||
|
|
231
|
+
return this.props.popupSettings || a.defaultProps.popupSettings;
|
|
208
232
|
}
|
|
209
233
|
get min() {
|
|
210
|
-
return this.props.min !== void 0 ? this.props.min :
|
|
234
|
+
return this.props.min !== void 0 ? this.props.min : a.defaultProps.min;
|
|
211
235
|
}
|
|
212
236
|
get max() {
|
|
213
|
-
return this.props.max !== void 0 ? this.props.max :
|
|
237
|
+
return this.props.max !== void 0 ? this.props.max : a.defaultProps.max;
|
|
214
238
|
}
|
|
215
239
|
get dateInputComp() {
|
|
216
|
-
return this.props.dateInput ||
|
|
240
|
+
return this.props.dateInput || a.defaultProps.dateInput;
|
|
217
241
|
}
|
|
218
242
|
get localizationService() {
|
|
219
|
-
return
|
|
243
|
+
return le(this);
|
|
220
244
|
}
|
|
221
245
|
/**
|
|
222
246
|
* @hidden
|
|
223
247
|
*/
|
|
224
248
|
componentDidMount() {
|
|
225
|
-
var
|
|
226
|
-
this.observerResize =
|
|
249
|
+
var t;
|
|
250
|
+
this.observerResize = T && window.ResizeObserver && new window.ResizeObserver(this.calculateMedia.bind(this)), this.show && this.forceUpdate(), (t = this.document) != null && t.body && this.observerResize && this.observerResize.observe(this.document.body);
|
|
251
|
+
const s = this.props.name || this.props.id;
|
|
252
|
+
this.KendoPasteSubscription = te(this._element, {
|
|
253
|
+
fieldName: s,
|
|
254
|
+
onValueChange: (i) => {
|
|
255
|
+
this.handleKendoPasteValue(i);
|
|
256
|
+
}
|
|
257
|
+
});
|
|
227
258
|
}
|
|
228
259
|
/**
|
|
229
260
|
* @hidden
|
|
@@ -237,136 +268,136 @@ const n = class n extends a.Component {
|
|
|
237
268
|
* @hidden
|
|
238
269
|
*/
|
|
239
270
|
componentWillUnmount() {
|
|
240
|
-
var
|
|
241
|
-
(
|
|
271
|
+
var s, t;
|
|
272
|
+
(s = this.document) != null && s.body && this.observerResize && this.observerResize.disconnect(), (t = this.KendoPasteSubscription) == null || t.unsubscribe();
|
|
242
273
|
}
|
|
243
274
|
/**
|
|
244
275
|
* @hidden
|
|
245
276
|
*/
|
|
246
277
|
render() {
|
|
247
278
|
const {
|
|
248
|
-
size:
|
|
249
|
-
rounded: t =
|
|
250
|
-
fillMode:
|
|
279
|
+
size: s = a.defaultProps.size,
|
|
280
|
+
rounded: t = a.defaultProps.rounded,
|
|
281
|
+
fillMode: i = a.defaultProps.fillMode,
|
|
251
282
|
disabled: o,
|
|
252
|
-
tabIndex:
|
|
283
|
+
tabIndex: r,
|
|
253
284
|
title: h,
|
|
254
|
-
id:
|
|
255
|
-
className:
|
|
256
|
-
format:
|
|
257
|
-
formatPlaceholder:
|
|
258
|
-
width:
|
|
259
|
-
name:
|
|
260
|
-
steps:
|
|
261
|
-
validationMessage:
|
|
262
|
-
required:
|
|
285
|
+
id: l,
|
|
286
|
+
className: m,
|
|
287
|
+
format: O,
|
|
288
|
+
formatPlaceholder: z,
|
|
289
|
+
width: k,
|
|
290
|
+
name: x,
|
|
291
|
+
steps: E,
|
|
292
|
+
validationMessage: R,
|
|
293
|
+
required: V,
|
|
263
294
|
validityStyles: B,
|
|
264
295
|
ariaLabelledBy: A,
|
|
265
296
|
ariaDescribedBy: F,
|
|
266
297
|
unstyled: v,
|
|
267
|
-
enableMouseWheel:
|
|
268
|
-
autoCorrectParts:
|
|
269
|
-
autoSwitchParts:
|
|
298
|
+
enableMouseWheel: N,
|
|
299
|
+
autoCorrectParts: K,
|
|
300
|
+
autoSwitchParts: L,
|
|
270
301
|
autoSwitchKeys: _,
|
|
271
302
|
allowCaretMode: q,
|
|
272
|
-
inputAttributes:
|
|
273
|
-
} = this.props, w = v && v.uTimePicker, b = !this.validityStyles || this.validity.valid,
|
|
303
|
+
inputAttributes: W
|
|
304
|
+
} = this.props, w = v && v.uTimePicker, b = !this.validityStyles || this.validity.valid, U = {
|
|
274
305
|
disabled: o,
|
|
275
|
-
format:
|
|
276
|
-
formatPlaceholder:
|
|
277
|
-
id:
|
|
306
|
+
format: O,
|
|
307
|
+
formatPlaceholder: z,
|
|
308
|
+
id: l,
|
|
278
309
|
ariaLabelledBy: A,
|
|
279
310
|
ariaDescribedBy: F,
|
|
280
311
|
max: this.normalizeTime(this.max),
|
|
281
312
|
min: this.normalizeTime(this.min),
|
|
282
|
-
name:
|
|
313
|
+
name: x,
|
|
283
314
|
onChange: this.handleInputValueChange,
|
|
284
|
-
required:
|
|
285
|
-
steps:
|
|
286
|
-
tabIndex: this.show ? -1 :
|
|
315
|
+
required: V,
|
|
316
|
+
steps: E,
|
|
317
|
+
tabIndex: this.show ? -1 : r,
|
|
287
318
|
title: h,
|
|
288
319
|
valid: this.validity.valid,
|
|
289
|
-
validationMessage:
|
|
320
|
+
validationMessage: R,
|
|
290
321
|
validityStyles: B,
|
|
291
322
|
value: this.value && this.normalizeTime(this.value),
|
|
292
323
|
label: void 0,
|
|
293
324
|
placeholder: this.state.focused ? null : this.props.placeholder,
|
|
294
325
|
ariaHasPopup: "dialog",
|
|
295
326
|
ariaExpanded: this.show,
|
|
296
|
-
enableMouseWheel:
|
|
297
|
-
autoCorrectParts:
|
|
298
|
-
autoSwitchParts:
|
|
327
|
+
enableMouseWheel: N,
|
|
328
|
+
autoCorrectParts: K,
|
|
329
|
+
autoSwitchParts: L,
|
|
299
330
|
autoSwitchKeys: _,
|
|
300
331
|
allowCaretMode: q,
|
|
301
|
-
inputAttributes:
|
|
302
|
-
},
|
|
332
|
+
inputAttributes: W
|
|
333
|
+
}, j = this.localizationService.toLanguageString(f, u[f]), H = this.localizationService.toLanguageString(
|
|
303
334
|
M,
|
|
304
335
|
u[M]
|
|
305
|
-
), S = /* @__PURE__ */
|
|
306
|
-
|
|
336
|
+
), S = /* @__PURE__ */ n.createElement(
|
|
337
|
+
ie,
|
|
307
338
|
{
|
|
308
339
|
onFocus: this.handleFocus,
|
|
309
340
|
onBlur: this.mobileMode ? void 0 : this.handleBlur,
|
|
310
341
|
onSyncBlur: this.props.onBlur,
|
|
311
342
|
onSyncFocus: this.props.onFocus
|
|
312
343
|
},
|
|
313
|
-
({ onFocus:
|
|
344
|
+
({ onFocus: G, onBlur: X }) => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
|
|
314
345
|
"span",
|
|
315
346
|
{
|
|
316
|
-
ref: (
|
|
317
|
-
this._element =
|
|
347
|
+
ref: (Z) => {
|
|
348
|
+
this._element = Z;
|
|
318
349
|
},
|
|
319
|
-
className:
|
|
350
|
+
className: c(
|
|
320
351
|
g.wrapper({
|
|
321
352
|
c: w,
|
|
322
|
-
size:
|
|
353
|
+
size: s,
|
|
323
354
|
rounded: t,
|
|
324
|
-
fillMode:
|
|
355
|
+
fillMode: i,
|
|
325
356
|
invalid: !b,
|
|
326
357
|
required: this.required,
|
|
327
358
|
disabled: o
|
|
328
359
|
}),
|
|
329
|
-
|
|
360
|
+
m
|
|
330
361
|
),
|
|
331
362
|
onKeyDown: this.handleKeyDown,
|
|
332
|
-
style: { width:
|
|
333
|
-
onFocus: this.mobileMode ? this.handleClick :
|
|
334
|
-
onBlur:
|
|
363
|
+
style: { width: k },
|
|
364
|
+
onFocus: this.mobileMode ? this.handleClick : G,
|
|
365
|
+
onBlur: X,
|
|
335
366
|
onClick: this.mobileMode ? this.handleClick : void 0
|
|
336
367
|
},
|
|
337
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ n.createElement(
|
|
338
369
|
this.dateInputComp,
|
|
339
370
|
{
|
|
340
371
|
_ref: this._dateInput,
|
|
341
372
|
ariaRole: "combobox",
|
|
342
373
|
ariaControls: this._popupId,
|
|
343
|
-
...
|
|
374
|
+
...U
|
|
344
375
|
}
|
|
345
376
|
),
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
-
|
|
377
|
+
/* @__PURE__ */ n.createElement(
|
|
378
|
+
be,
|
|
348
379
|
{
|
|
349
380
|
tabIndex: -1,
|
|
350
381
|
type: "button",
|
|
351
382
|
icon: "clock",
|
|
352
|
-
svgIcon:
|
|
383
|
+
svgIcon: re,
|
|
353
384
|
onMouseDown: this.handleIconMouseDown,
|
|
354
385
|
onClick: this.mobileMode ? void 0 : this.handleClick,
|
|
355
|
-
title:
|
|
356
|
-
className:
|
|
357
|
-
fillMode:
|
|
358
|
-
"aria-label":
|
|
386
|
+
title: H,
|
|
387
|
+
className: c(g.inputButton({ c: w })),
|
|
388
|
+
fillMode: i,
|
|
389
|
+
"aria-label": j
|
|
359
390
|
}
|
|
360
391
|
),
|
|
361
392
|
!this.mobileMode && this.renderPopup()
|
|
362
|
-
), this.mobileMode && this.renderAdaptivePopup(), this.showLicenseWatermark && /* @__PURE__ */
|
|
393
|
+
), this.mobileMode && this.renderAdaptivePopup(), this.showLicenseWatermark && /* @__PURE__ */ n.createElement(se, { message: this.licenseMessage }))
|
|
363
394
|
);
|
|
364
|
-
return this.props.label ? /* @__PURE__ */
|
|
365
|
-
|
|
395
|
+
return this.props.label ? /* @__PURE__ */ n.createElement(
|
|
396
|
+
we,
|
|
366
397
|
{
|
|
367
398
|
dateInput: this._dateInput,
|
|
368
399
|
label: this.props.label,
|
|
369
|
-
editorId:
|
|
400
|
+
editorId: l,
|
|
370
401
|
editorValid: b,
|
|
371
402
|
editorDisabled: this.props.disabled,
|
|
372
403
|
children: S,
|
|
@@ -374,26 +405,26 @@ const n = class n extends a.Component {
|
|
|
374
405
|
}
|
|
375
406
|
) : S;
|
|
376
407
|
}
|
|
377
|
-
normalizeTime(
|
|
378
|
-
return
|
|
408
|
+
normalizeTime(s) {
|
|
409
|
+
return P(ge, s);
|
|
379
410
|
}
|
|
380
|
-
setShow(
|
|
381
|
-
const { onOpen: t, onClose:
|
|
382
|
-
this.show !==
|
|
411
|
+
setShow(s) {
|
|
412
|
+
const { onOpen: t, onClose: i } = this.props;
|
|
413
|
+
this.show !== s && (this.setState({ show: s }), s && t && t.call(void 0, {
|
|
383
414
|
target: this
|
|
384
|
-
}), !
|
|
415
|
+
}), !s && i && i.call(void 0, {
|
|
385
416
|
target: this
|
|
386
417
|
}));
|
|
387
418
|
}
|
|
388
|
-
mergeTime(
|
|
389
|
-
return this.value &&
|
|
419
|
+
mergeTime(s) {
|
|
420
|
+
return this.value && s ? P(this.value, s) : s;
|
|
390
421
|
}
|
|
391
|
-
calculateMedia(
|
|
392
|
-
for (const t of
|
|
422
|
+
calculateMedia(s) {
|
|
423
|
+
for (const t of s)
|
|
393
424
|
this.setState({ windowWidth: t.target.clientWidth });
|
|
394
425
|
}
|
|
395
426
|
};
|
|
396
|
-
|
|
427
|
+
a.displayName = "TimePicker", a.propTypes = {
|
|
397
428
|
className: e.string,
|
|
398
429
|
cancelButton: e.bool,
|
|
399
430
|
nowButton: e.bool,
|
|
@@ -463,36 +494,36 @@ n.displayName = "TimePicker", n.propTypes = {
|
|
|
463
494
|
validate: e.bool,
|
|
464
495
|
valid: e.bool,
|
|
465
496
|
size: e.oneOf(["small", "medium", "large"]),
|
|
466
|
-
rounded: e.oneOf(["small", "medium", "large", "full"]),
|
|
497
|
+
rounded: e.oneOf(["small", "medium", "large", "full", "none"]),
|
|
467
498
|
fillMode: e.oneOf(["solid", "flat", "outline"]),
|
|
468
499
|
inputAttributes: e.object
|
|
469
|
-
},
|
|
500
|
+
}, a.defaultProps = {
|
|
470
501
|
defaultShow: !1,
|
|
471
502
|
defaultValue: null,
|
|
472
503
|
disabled: !1,
|
|
473
504
|
format: "t",
|
|
474
|
-
max:
|
|
475
|
-
min:
|
|
505
|
+
max: ce,
|
|
506
|
+
min: me,
|
|
476
507
|
popupSettings: {},
|
|
477
508
|
tabIndex: 0,
|
|
478
509
|
steps: {},
|
|
479
510
|
validityStyles: !0,
|
|
480
|
-
dateInput:
|
|
511
|
+
dateInput: ue,
|
|
481
512
|
size: void 0,
|
|
482
513
|
rounded: void 0,
|
|
483
514
|
fillMode: void 0
|
|
484
515
|
};
|
|
485
|
-
let p =
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
516
|
+
let p = a;
|
|
517
|
+
const Te = Y(), Ce = Q(
|
|
518
|
+
oe(
|
|
519
|
+
Te,
|
|
520
|
+
ne(ae(p))
|
|
490
521
|
)
|
|
491
522
|
);
|
|
492
523
|
Ce.displayName = "KendoReactTimePicker";
|
|
493
|
-
|
|
524
|
+
he(p);
|
|
494
525
|
export {
|
|
495
526
|
Ce as TimePicker,
|
|
496
|
-
|
|
527
|
+
Te as TimePickerPropsContext,
|
|
497
528
|
p as TimePickerWithoutContext
|
|
498
529
|
};
|