@progress/kendo-vue-dateinputs 7.0.1-develop.2 → 7.0.1-develop.3
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/calendar/components/CalendarCell.js +1 -1
- package/calendar/components/CalendarCell.mjs +4 -4
- package/calendar/components/CalendarHeaderTitle.js +1 -1
- package/calendar/components/CalendarHeaderTitle.mjs +5 -5
- package/calendar/components/CalendarWeekCell.js +1 -1
- package/calendar/components/CalendarWeekCell.mjs +5 -5
- package/dateinput/DateInput.js +1 -1
- package/dateinput/DateInput.mjs +71 -67
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +35 -27
- package/daterangepicker/DateRangePicker.js +1 -1
- package/daterangepicker/DateRangePicker.mjs +31 -27
- package/datetimepicker/DateTimePicker.js +1 -1
- package/datetimepicker/DateTimePicker.mjs +51 -45
- package/dist/cdn/js/kendo-vue-dateinputs.js +1 -1
- package/index.d.mts +230 -128
- package/index.d.ts +230 -128
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/timepicker/TimeList.js +1 -1
- package/timepicker/TimeList.mjs +10 -10
- package/timepicker/TimePart.js +1 -1
- package/timepicker/TimePart.mjs +13 -13
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +51 -45
- package/timepicker/TimeSelector.js +1 -1
- package/timepicker/TimeSelector.mjs +14 -12
- package/virtualization/Virtualization.js +1 -1
- package/virtualization/Virtualization.mjs +2 -2
|
@@ -6,36 +6,36 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as ie, createVNode as n, h as b, ref as ne, inject as ae, isVNode as oe } from "vue";
|
|
9
|
-
import { FloatingLabel as
|
|
10
|
-
import { Button as
|
|
11
|
-
import { Popup as
|
|
12
|
-
import { cloneDate as
|
|
9
|
+
import { FloatingLabel as ue } from "@progress/kendo-vue-labels";
|
|
10
|
+
import { Button as se } from "@progress/kendo-vue-buttons";
|
|
11
|
+
import { Popup as le } from "@progress/kendo-vue-popup";
|
|
12
|
+
import { cloneDate as s } from "@progress/kendo-date-math";
|
|
13
13
|
import { Keys as a, canUseDOM as re, getDefaultSlots as de, templateRendering as c, getListeners as m, getTemplate as T, classNames as _, kendoThemeMaps as k, guid as V, validatePackage as pe } from "@progress/kendo-vue-common";
|
|
14
14
|
import { DateInput as he } from "../dateinput/DateInput.mjs";
|
|
15
15
|
import { packageMetadata as ce } from "../package-metadata.mjs";
|
|
16
16
|
import { isInDateRange as me, MAX_TIME as B, MAX_DATE as fe, MIN_DATE as ge } from "../utils.mjs";
|
|
17
|
-
import { toggleDateTimeSelector as
|
|
17
|
+
import { toggleDateTimeSelector as l, messages as C } from "../messages/main.mjs";
|
|
18
18
|
import { provideLocalizationService as F } from "@progress/kendo-vue-intl";
|
|
19
19
|
import { DateTimeSelector as Se } from "./DateTimeSelector.mjs";
|
|
20
|
-
import { isInTimeRange as
|
|
20
|
+
import { isInTimeRange as ve } from "../timepicker/utils.mjs";
|
|
21
21
|
import { MIN_TIME as M } from "../defaults.mjs";
|
|
22
|
-
import { defaultFormatPlaceholder as
|
|
23
|
-
import { calendarIcon as
|
|
22
|
+
import { defaultFormatPlaceholder as we } from "../dateinput/utils.mjs";
|
|
23
|
+
import { calendarIcon as Ie } from "@progress/kendo-svg-icons";
|
|
24
24
|
function f(e) {
|
|
25
25
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !oe(e);
|
|
26
26
|
}
|
|
27
27
|
const Pe = /* @__PURE__ */ ie({
|
|
28
28
|
name: "KendoDateTimePicker",
|
|
29
29
|
emits: {
|
|
30
|
-
changemodel:
|
|
31
|
-
"update:modelValue":
|
|
32
|
-
iconclick:
|
|
33
|
-
change:
|
|
34
|
-
focus:
|
|
35
|
-
blur:
|
|
36
|
-
keydown:
|
|
37
|
-
open:
|
|
38
|
-
close:
|
|
30
|
+
changemodel: (e) => !0,
|
|
31
|
+
"update:modelValue": (e) => !0,
|
|
32
|
+
iconclick: (e) => !0,
|
|
33
|
+
change: (e) => !0,
|
|
34
|
+
focus: (e) => !0,
|
|
35
|
+
blur: (e) => !0,
|
|
36
|
+
keydown: (e) => !0,
|
|
37
|
+
open: (e) => !0,
|
|
38
|
+
close: (e) => !0
|
|
39
39
|
},
|
|
40
40
|
props: {
|
|
41
41
|
modelValue: {
|
|
@@ -79,7 +79,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
79
79
|
formatPlaceholder: {
|
|
80
80
|
type: [String, Object],
|
|
81
81
|
default: function() {
|
|
82
|
-
return
|
|
82
|
+
return we;
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
rounded: {
|
|
@@ -121,13 +121,13 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
121
121
|
maxTime: {
|
|
122
122
|
type: Date,
|
|
123
123
|
default: function() {
|
|
124
|
-
return
|
|
124
|
+
return s(B);
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
127
|
minTime: {
|
|
128
128
|
type: Date,
|
|
129
129
|
default: function() {
|
|
130
|
-
return
|
|
130
|
+
return s(M);
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
name: String,
|
|
@@ -209,7 +209,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
209
209
|
computed: {
|
|
210
210
|
computedValue() {
|
|
211
211
|
const e = this.valueDuringOnChange !== void 0 ? this.valueDuringOnChange : this.$props.value !== void 0 ? this.$props.value : this.$props.modelValue !== void 0 ? this.$props.modelValue : this.$data.currentValue;
|
|
212
|
-
return e !== null ?
|
|
212
|
+
return e !== null ? s(e) : null;
|
|
213
213
|
},
|
|
214
214
|
computedShow() {
|
|
215
215
|
return this.showDuringOnChange !== void 0 ? this.showDuringOnChange : this.$props.show !== void 0 ? this.$props.show : this.currentShow;
|
|
@@ -255,15 +255,15 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
255
255
|
max: R,
|
|
256
256
|
weekNumber: E,
|
|
257
257
|
focusedDate: A,
|
|
258
|
-
width:
|
|
258
|
+
width: v,
|
|
259
259
|
name: j,
|
|
260
|
-
steps:
|
|
260
|
+
steps: w,
|
|
261
261
|
placeholder: P,
|
|
262
262
|
validationMessage: z,
|
|
263
263
|
required: L,
|
|
264
264
|
validityStyles: N,
|
|
265
265
|
cancelButton: K,
|
|
266
|
-
minTime:
|
|
266
|
+
minTime: I,
|
|
267
267
|
maxTime: D,
|
|
268
268
|
ariaLabelledBy: De,
|
|
269
269
|
ariaDescribedBy: ye,
|
|
@@ -286,7 +286,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
286
286
|
id: g,
|
|
287
287
|
max: R,
|
|
288
288
|
min: x,
|
|
289
|
-
minTime:
|
|
289
|
+
minTime: I,
|
|
290
290
|
maxTime: D,
|
|
291
291
|
name: j,
|
|
292
292
|
size: null,
|
|
@@ -294,7 +294,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
294
294
|
fillMode: null,
|
|
295
295
|
onChange: this.handleValueChange,
|
|
296
296
|
required: L,
|
|
297
|
-
steps:
|
|
297
|
+
steps: w,
|
|
298
298
|
tabIndex: this.computedShow ? -1 : i,
|
|
299
299
|
title: r,
|
|
300
300
|
valid: this.validity().valid,
|
|
@@ -322,16 +322,16 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
322
322
|
weekNumber: E,
|
|
323
323
|
min: this.$props.min,
|
|
324
324
|
max: this.$props.max,
|
|
325
|
-
minTime:
|
|
325
|
+
minTime: I,
|
|
326
326
|
maxTime: D,
|
|
327
327
|
focusedDate: A,
|
|
328
328
|
format: S,
|
|
329
329
|
calendar: W,
|
|
330
|
-
steps:
|
|
330
|
+
steps: w,
|
|
331
331
|
onFocus: this.timeSelectorFocus,
|
|
332
332
|
onBlur: this.timeSelectorBlur,
|
|
333
333
|
onKeydown: this.handleKeyDown
|
|
334
|
-
}, null), Y = _("k-datetime-container k-reset", U), Z = this.$props.popup ? c.call(this, this.$props.popup, m.call(this)) : void 0, ee = n(
|
|
334
|
+
}, null), Y = _("k-datetime-container k-reset", U), Z = this.$props.popup ? c.call(this, this.$props.popup, m.call(this)) : void 0, ee = n(le, {
|
|
335
335
|
show: this.computedShow,
|
|
336
336
|
anchor: this._anchor,
|
|
337
337
|
popupClass: Y,
|
|
@@ -353,7 +353,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
353
353
|
template: Z,
|
|
354
354
|
defaultRendering: ee,
|
|
355
355
|
defaultSlots: o
|
|
356
|
-
}),
|
|
356
|
+
}), u = n("div", {
|
|
357
357
|
class: _("k-input", "k-datetimepicker", {
|
|
358
358
|
[`k-input-${k.sizeMap[d] || d}`]: d,
|
|
359
359
|
[`k-input-${y}`]: y,
|
|
@@ -367,24 +367,24 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
367
367
|
},
|
|
368
368
|
onKeydown: this.handleKeyDown,
|
|
369
369
|
style: {
|
|
370
|
-
width:
|
|
370
|
+
width: v
|
|
371
371
|
},
|
|
372
372
|
onFocusin: this.handleFocus,
|
|
373
373
|
onFocusout: this.handleBlur
|
|
374
|
-
}, [Q, n(
|
|
374
|
+
}, [Q, n(se, {
|
|
375
375
|
type: "button",
|
|
376
376
|
tabIndex: -1,
|
|
377
377
|
icon: "calendar",
|
|
378
|
-
svgIcon:
|
|
378
|
+
svgIcon: Ie,
|
|
379
379
|
onMousedown: this.handleIconMouseDown,
|
|
380
380
|
onClick: this.handleDateIconClick,
|
|
381
|
-
title: F(this).toLanguageString(
|
|
381
|
+
title: F(this).toLanguageString(l, C[l]),
|
|
382
382
|
rounded: null,
|
|
383
383
|
class: "k-input-button",
|
|
384
384
|
"aria-controls": this._popupId,
|
|
385
|
-
"aria-label": F(this).toLanguageString(
|
|
385
|
+
"aria-label": F(this).toLanguageString(l, C[l])
|
|
386
386
|
}, null), te]);
|
|
387
|
-
return this.$props.label ? n(
|
|
387
|
+
return this.$props.label ? n(ue, {
|
|
388
388
|
label: this.$props.label,
|
|
389
389
|
editorId: g,
|
|
390
390
|
editorValid: $,
|
|
@@ -392,15 +392,15 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
392
392
|
editorPlaceholder: this.$props.placeholder,
|
|
393
393
|
editorDisabled: this.$props.disabled,
|
|
394
394
|
style: {
|
|
395
|
-
width:
|
|
395
|
+
width: v
|
|
396
396
|
}
|
|
397
|
-
}, f(
|
|
398
|
-
default: () => [
|
|
399
|
-
}) :
|
|
397
|
+
}, f(u) ? u : {
|
|
398
|
+
default: () => [u]
|
|
399
|
+
}) : u;
|
|
400
400
|
},
|
|
401
401
|
methods: {
|
|
402
402
|
validity() {
|
|
403
|
-
const e = me(this.computedValue, this.$props.min, this.$props.max) &&
|
|
403
|
+
const e = me(this.computedValue, this.$props.min, this.$props.max) && ve(this.computedValue, this.$props.minTime || M, this.$props.maxTime || B), t = this.$props.validationMessage !== void 0, i = (!this.$props.required || this.computedValue !== null) && e, r = this.$props.valid !== void 0 ? this.$props.valid : i;
|
|
404
404
|
return {
|
|
405
405
|
customError: t,
|
|
406
406
|
rangeOverflow: this.computedValue && this.$props.max.getTime() < this.computedValue.getTime() || !1,
|
|
@@ -425,7 +425,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
425
425
|
this.setShow(!1);
|
|
426
426
|
},
|
|
427
427
|
handleValueChange(e) {
|
|
428
|
-
this.currentValue =
|
|
428
|
+
this.currentValue = s(e.value || void 0), this.valueDuringOnChange = e.value, this.showDuringOnChange = !1, this.shouldFocusDateInput = !0, this.$emit("changemodel", this.computedValue), this.$emit("update:modelValue", this.computedValue), this.$emit("change", {
|
|
429
429
|
event: e.event,
|
|
430
430
|
value: this.computedValue,
|
|
431
431
|
show: this.computedShow,
|
|
@@ -438,13 +438,19 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
438
438
|
}), this.valueDuringOnChange = void 0, this.showDuringOnChange = void 0, this.setShow(!1);
|
|
439
439
|
},
|
|
440
440
|
handleFocus(e) {
|
|
441
|
-
this.isFocused = !0, this.$emit("focus",
|
|
441
|
+
this.isFocused = !0, this.$emit("focus", {
|
|
442
|
+
event: e
|
|
443
|
+
});
|
|
442
444
|
},
|
|
443
445
|
handleBlur(e) {
|
|
444
|
-
this.createBlurTimeout(), this.$emit("blur",
|
|
446
|
+
this.createBlurTimeout(), this.$emit("blur", {
|
|
447
|
+
event: e
|
|
448
|
+
});
|
|
445
449
|
},
|
|
446
450
|
timeSelectorBlur(e) {
|
|
447
|
-
this.$emit("blur",
|
|
451
|
+
this.$emit("blur", {
|
|
452
|
+
event: e
|
|
453
|
+
}), clearTimeout(this._blurTimeout), this.createBlurTimeout();
|
|
448
454
|
},
|
|
449
455
|
timeSelectorFocus() {
|
|
450
456
|
clearTimeout(this._blurTimeout);
|