@progress/kendo-vue-dateinputs 6.4.1-develop.2 → 6.4.2-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/Calendar.mjs +9 -9
- package/calendar/components/Header.mjs +9 -9
- package/calendar/components/View.mjs +4 -4
- package/calendar/components/ViewList.mjs +1 -1
- package/calendar/services/CenturyViewService.mjs +2 -2
- package/calendar/services/DecadeViewService.mjs +2 -2
- package/calendar/services/MonthViewService.mjs +2 -2
- package/calendar/services/YearViewService.mjs +2 -2
- package/dateinput/DateInput.mjs +24 -24
- package/datepicker/DatePicker.mjs +21 -21
- package/daterangepicker/DateRangePicker.mjs +7 -7
- package/datetimepicker/DateTimePicker.mjs +13 -13
- package/datetimepicker/DateTimeSelector.mjs +17 -17
- package/dist/cdn/js/kendo-vue-dateinputs.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/timepicker/TimeList.mjs +7 -7
- package/timepicker/TimePart.mjs +14 -14
- package/timepicker/TimePicker.mjs +17 -17
- package/timepicker/TimeSelector.mjs +11 -11
- package/utils.mjs +1 -1
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as ie,
|
|
8
|
+
import { defineComponent as ie, createVNode as n, h as b, ref as ne, inject as ae, isVNode as oe } from "vue";
|
|
9
9
|
import { FloatingLabel as le } from "@progress/kendo-vue-labels";
|
|
10
10
|
import { Button as ue } from "@progress/kendo-vue-buttons";
|
|
11
11
|
import { Popup as se } from "@progress/kendo-vue-popup";
|
|
12
12
|
import { cloneDate as u } from "@progress/kendo-date-math";
|
|
13
|
-
import {
|
|
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
|
-
import {
|
|
16
|
+
import { isInDateRange as me, MAX_TIME as B, MAX_DATE as fe, MIN_DATE as ge } from "../utils.mjs";
|
|
17
17
|
import { toggleDateTimeSelector as s, 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";
|
|
@@ -109,7 +109,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
109
109
|
min: {
|
|
110
110
|
type: Date,
|
|
111
111
|
default: function() {
|
|
112
|
-
return
|
|
112
|
+
return ge;
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
max: {
|
|
@@ -189,7 +189,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
189
189
|
event: "changemodel"
|
|
190
190
|
},
|
|
191
191
|
created() {
|
|
192
|
-
this._anchor =
|
|
192
|
+
this._anchor = V(), this._popupId = "popup" + V(), this._wrapper = null, this._dateInput = null, this._dateTimeSelector = null, pe(ce), this.currentValue = this.$props.defaultValue, this.currentShow = this.$props.defaultShow;
|
|
193
193
|
},
|
|
194
194
|
inject: {
|
|
195
195
|
kendoLocalizationService: {
|
|
@@ -308,7 +308,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
308
308
|
inputAttributes: q
|
|
309
309
|
}, f(e) ? e : {
|
|
310
310
|
default: () => [e]
|
|
311
|
-
}), Q =
|
|
311
|
+
}), Q = T.call(this, {
|
|
312
312
|
h: b,
|
|
313
313
|
template: G,
|
|
314
314
|
defaultRendering: J
|
|
@@ -331,7 +331,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
331
331
|
onFocus: this.timeSelectorFocus,
|
|
332
332
|
onBlur: this.timeSelectorBlur,
|
|
333
333
|
onKeydown: this.handleKeyDown
|
|
334
|
-
}, null), Y =
|
|
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(se, {
|
|
335
335
|
show: this.computedShow,
|
|
336
336
|
anchor: this._anchor,
|
|
337
337
|
popupClass: Y,
|
|
@@ -348,16 +348,16 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
348
348
|
animate: H
|
|
349
349
|
}, f(o) ? o : {
|
|
350
350
|
default: () => [o]
|
|
351
|
-
}), te =
|
|
351
|
+
}), te = T.call(this, {
|
|
352
352
|
h: b,
|
|
353
353
|
template: Z,
|
|
354
354
|
defaultRendering: ee,
|
|
355
355
|
defaultSlots: o
|
|
356
356
|
}), l = n("div", {
|
|
357
|
-
class:
|
|
358
|
-
[`k-input-${
|
|
357
|
+
class: _("k-input", "k-datetimepicker", {
|
|
358
|
+
[`k-input-${k.sizeMap[d] || d}`]: d,
|
|
359
359
|
[`k-input-${y}`]: y,
|
|
360
|
-
[`k-rounded-${
|
|
360
|
+
[`k-rounded-${k.roundedMap[p] || p}`]: p,
|
|
361
361
|
"k-invalid": !$,
|
|
362
362
|
"k-required": this.required,
|
|
363
363
|
"k-disabled": this.$props.disabled
|
|
@@ -400,7 +400,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
400
400
|
},
|
|
401
401
|
methods: {
|
|
402
402
|
validity() {
|
|
403
|
-
const e =
|
|
403
|
+
const e = me(this.computedValue, this.$props.min, this.$props.max) && we(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,
|
|
@@ -453,7 +453,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
453
453
|
this._blurTimeout = setTimeout(() => {
|
|
454
454
|
this.isFocused = !1;
|
|
455
455
|
const e = document.activeElement && document.activeElement.closest(`#${this._popupId}`);
|
|
456
|
-
this._dateInput &&
|
|
456
|
+
this._dateInput && re && document.activeElement !== this._dateInput.element() && !e && this.setShow(!1);
|
|
457
457
|
}, 200);
|
|
458
458
|
},
|
|
459
459
|
handleDateIconClick(e) {
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as F,
|
|
8
|
+
import { defineComponent as F, createVNode as a, h as x, ref as N, inject as j, isVNode as A } from "vue";
|
|
9
9
|
import { provideLocalizationService as E } from "@progress/kendo-vue-intl";
|
|
10
10
|
import { date as p, messages as l, time as f, dateTimePickerCancel as g, dateTimePickerSet as T } from "../messages/main.mjs";
|
|
11
11
|
import { ButtonGroup as L, Button as o } from "@progress/kendo-vue-buttons";
|
|
12
12
|
import { Calendar as R } from "../calendar/components/Calendar.mjs";
|
|
13
13
|
import { TimePart as z } from "../timepicker/TimePart.mjs";
|
|
14
|
-
import {
|
|
14
|
+
import { MAX_DATE as K, MIN_DATE as I, setTime as b, getToday as k, MAX_TIME as v, MIN_TIME as D } from "../utils.mjs";
|
|
15
15
|
import { isEqualDate as O } from "@progress/kendo-date-math";
|
|
16
|
-
import {
|
|
16
|
+
import { Keys as d, canUseDOM as W, classNames as G, getTemplate as X, cloneDate as $ } from "@progress/kendo-vue-common";
|
|
17
17
|
import { MIDNIGHT_DATE as m } from "../defaults.mjs";
|
|
18
18
|
import { getNow as C } from "../timepicker/utils.mjs";
|
|
19
19
|
function u(e) {
|
|
@@ -33,22 +33,22 @@ const ne = /* @__PURE__ */ F({
|
|
|
33
33
|
},
|
|
34
34
|
min: {
|
|
35
35
|
type: Date,
|
|
36
|
-
default:
|
|
36
|
+
default: I
|
|
37
37
|
},
|
|
38
38
|
max: {
|
|
39
39
|
type: Date,
|
|
40
|
-
default:
|
|
40
|
+
default: K
|
|
41
41
|
},
|
|
42
42
|
maxTime: {
|
|
43
43
|
type: Date,
|
|
44
44
|
default: function() {
|
|
45
|
-
return $(
|
|
45
|
+
return $(v);
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
minTime: {
|
|
49
49
|
type: Date,
|
|
50
50
|
default: function() {
|
|
51
|
-
return $(
|
|
51
|
+
return $(D);
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
weekNumber: {
|
|
@@ -107,7 +107,7 @@ const ne = /* @__PURE__ */ F({
|
|
|
107
107
|
}), this.shouldFocusPart = !1;
|
|
108
108
|
},
|
|
109
109
|
setup() {
|
|
110
|
-
const e =
|
|
110
|
+
const e = N(null), t = j("kendoLocalizationService", {});
|
|
111
111
|
return {
|
|
112
112
|
kendoAnchorRef: e,
|
|
113
113
|
kendoLocalizationService: t
|
|
@@ -123,7 +123,7 @@ const ne = /* @__PURE__ */ F({
|
|
|
123
123
|
focusedDate: B,
|
|
124
124
|
format: _,
|
|
125
125
|
steps: w
|
|
126
|
-
} = this.$props, M =
|
|
126
|
+
} = this.$props, M = G({
|
|
127
127
|
"k-date-tab": this.currentTab === "date",
|
|
128
128
|
"k-time-tab": this.currentTab === "time",
|
|
129
129
|
"k-disabled": e
|
|
@@ -138,8 +138,8 @@ const ne = /* @__PURE__ */ F({
|
|
|
138
138
|
onChange: this.handleCalendarValueChange,
|
|
139
139
|
onFocus: this.handleFocus,
|
|
140
140
|
onBlur: this.handleBlur
|
|
141
|
-
}, null), S =
|
|
142
|
-
h:
|
|
141
|
+
}, null), S = X.call(this, {
|
|
142
|
+
h: x,
|
|
143
143
|
template: this.$props.calendar,
|
|
144
144
|
defaultRendering: P
|
|
145
145
|
});
|
|
@@ -179,8 +179,8 @@ const ne = /* @__PURE__ */ F({
|
|
|
179
179
|
onNowclick: this.handleNowClick,
|
|
180
180
|
disabled: e || this.currentTab !== "time",
|
|
181
181
|
ref: "timePart",
|
|
182
|
-
min: this.computedMinTime ||
|
|
183
|
-
max: this.computedMaxTime ||
|
|
182
|
+
min: this.computedMinTime || D,
|
|
183
|
+
max: this.computedMaxTime || v,
|
|
184
184
|
value: this.timeValue,
|
|
185
185
|
format: _,
|
|
186
186
|
steps: w,
|
|
@@ -229,16 +229,16 @@ const ne = /* @__PURE__ */ F({
|
|
|
229
229
|
return this._calendar && this._calendar.$el ? this._calendar : null;
|
|
230
230
|
},
|
|
231
231
|
normalizeRange(e, t) {
|
|
232
|
-
return O(e, t ||
|
|
232
|
+
return O(e, t || k()) ? e : null;
|
|
233
233
|
},
|
|
234
234
|
hasActiveButton() {
|
|
235
|
-
return this._acceptButton ?
|
|
235
|
+
return this._acceptButton ? W && (document.activeElement === this._acceptButton.$el || document.activeElement === this._cancelButton.$el) : !1;
|
|
236
236
|
},
|
|
237
237
|
mergeTime(e, t) {
|
|
238
|
-
return e && t ?
|
|
238
|
+
return e && t ? b(t, e) : t;
|
|
239
239
|
},
|
|
240
240
|
mergeDate(e, t) {
|
|
241
|
-
return e ?
|
|
241
|
+
return e ? b(e || k(), t) : t;
|
|
242
242
|
},
|
|
243
243
|
move(e) {
|
|
244
244
|
if (e === "right" && this.currentTab === "time" || e === "left" && this.currentTab === "date")
|