@progress/kendo-react-dateinputs 8.4.0-develop.3 → 8.4.0-develop.4
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.js +2 -2
- package/calendar/components/Calendar.mjs +13 -12
- package/calendar/components/CalendarNavigationItem.js +1 -1
- package/calendar/components/CalendarNavigationItem.mjs +21 -13
- package/calendar/components/ViewList.js +1 -1
- package/calendar/components/ViewList.mjs +25 -24
- package/calendar/services/DOMService.js +7 -7
- package/calendar/services/DOMService.mjs +136 -89
- package/dateinput/DateInput.js +1 -1
- package/dateinput/DateInput.mjs +1 -1
- package/datetimepicker/DateTimePicker.js +1 -1
- package/datetimepicker/DateTimePicker.mjs +30 -27
- package/datetimepicker/DateTimeSelector.js +1 -1
- package/datetimepicker/DateTimeSelector.mjs +16 -16
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/package-metadata.mjs +1 -1
- package/package.json +7 -7
- package/timepicker/TimeList.js +1 -1
- package/timepicker/TimeList.mjs +68 -60
- package/timepicker/services/DOMService.js +1 -1
- package/timepicker/services/DOMService.mjs +15 -12
- package/virtualization/Virtualization.js +1 -1
- package/virtualization/Virtualization.mjs +16 -13
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as i from "react";
|
|
10
10
|
import { provideLocalizationService as R, registerForLocalization as M } from "@progress/kendo-react-intl";
|
|
11
|
-
import { dateTimePickerCancel as D, messages as
|
|
12
|
-
import { Button as
|
|
11
|
+
import { dateTimePickerCancel as D, messages as f, dateTimePickerSet as _, date as T, time as E } from "../messages/index.mjs";
|
|
12
|
+
import { Button as g, ButtonGroup as x } from "@progress/kendo-react-buttons";
|
|
13
13
|
import { Calendar as A } from "../calendar/components/Calendar.mjs";
|
|
14
14
|
import { TimePart as z } from "../timepicker/TimePart.mjs";
|
|
15
|
-
import { MIDNIGHT_DATE as
|
|
15
|
+
import { MIDNIGHT_DATE as v, MIN_TIME as F, MAX_TIME as L, getToday as V, setTime as P } from "../utils.mjs";
|
|
16
16
|
import { isEqualDate as k } from "@progress/kendo-date-math";
|
|
17
17
|
import { classNames as l, uDateTimePicker as u, uTime as B, Keys as h, getActiveElement as I } from "@progress/kendo-react-common";
|
|
18
18
|
import { getNow as w } from "../timepicker/utils.mjs";
|
|
@@ -30,9 +30,9 @@ const y = class y extends i.Component {
|
|
|
30
30
|
const e = t === "left" ? "date" : "time";
|
|
31
31
|
this.shouldFocusPart = !0, this.setState({ tab: e });
|
|
32
32
|
}, this.dateTimeFooter = () => {
|
|
33
|
-
const { cancelButton: t, unstyled: e } = this.props, s = e && e.uDateTimePicker, n = this.localizationService.toLanguageString(D,
|
|
33
|
+
const { cancelButton: t, unstyled: e } = this.props, s = e && e.uDateTimePicker, n = this.localizationService.toLanguageString(D, f[D]), r = this.localizationService.toLanguageString(_, f[_]);
|
|
34
34
|
return /* @__PURE__ */ i.createElement("div", { className: l(u.timeFooter({ c: s })) }, t && /* @__PURE__ */ i.createElement(
|
|
35
|
-
|
|
35
|
+
g,
|
|
36
36
|
{
|
|
37
37
|
type: "button",
|
|
38
38
|
ref: (o) => {
|
|
@@ -46,7 +46,7 @@ const y = class y extends i.Component {
|
|
|
46
46
|
},
|
|
47
47
|
n
|
|
48
48
|
), /* @__PURE__ */ i.createElement(
|
|
49
|
-
|
|
49
|
+
g,
|
|
50
50
|
{
|
|
51
51
|
type: "button",
|
|
52
52
|
themeColor: "primary",
|
|
@@ -63,8 +63,8 @@ const y = class y extends i.Component {
|
|
|
63
63
|
r
|
|
64
64
|
));
|
|
65
65
|
}, this.handleReject = (t) => {
|
|
66
|
-
this.setState({ dateValue: this.props.value, timeValue: this.props.value ||
|
|
67
|
-
const e = this.mergeDate(this.props.value, this.props.value ||
|
|
66
|
+
this.setState({ dateValue: this.props.value, timeValue: this.props.value || v });
|
|
67
|
+
const e = this.mergeDate(this.props.value, this.props.value || v);
|
|
68
68
|
if (this.props.onReject) {
|
|
69
69
|
const s = {
|
|
70
70
|
nativeEvent: t.nativeEvent,
|
|
@@ -132,7 +132,7 @@ const y = class y extends i.Component {
|
|
|
132
132
|
}, this.state = {
|
|
133
133
|
tab: "date",
|
|
134
134
|
dateValue: this.props.value,
|
|
135
|
-
timeValue: this.props.value ||
|
|
135
|
+
timeValue: this.props.value || v
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
get calendar() {
|
|
@@ -151,18 +151,18 @@ const y = class y extends i.Component {
|
|
|
151
151
|
var e, s;
|
|
152
152
|
this.shouldFocusPart && this.focus({ preventScroll: !0 }), (((e = a.value) == null ? void 0 : e.getTime()) !== ((s = this.props.value) == null ? void 0 : s.getTime()) || this.state.tab !== t.tab && this.props.value) && this.setState((n) => ({
|
|
153
153
|
dateValue: a.value && this.props.value && k(a.value, this.props.value) ? n.dateValue : this.props.value,
|
|
154
|
-
timeValue: this.props.value ||
|
|
154
|
+
timeValue: this.props.value || v
|
|
155
155
|
})), this.shouldFocusPart = !1;
|
|
156
156
|
}
|
|
157
157
|
render() {
|
|
158
|
-
const { disabled: a, min: t, max: e, weekNumber: s, focusedDate: n, format: r, mobileMode: o, footerActions: d, unstyled:
|
|
158
|
+
const { disabled: a, min: t, max: e, weekNumber: s, focusedDate: n, format: r, mobileMode: o, footerActions: d, unstyled: p } = this.props, m = p && p.uDateTimePicker, S = l(
|
|
159
159
|
u.wrap({
|
|
160
160
|
c: m,
|
|
161
161
|
date: this.state.tab === "date",
|
|
162
162
|
time: this.state.tab === "time",
|
|
163
163
|
disabled: a
|
|
164
164
|
})
|
|
165
|
-
), K = this.localizationService.toLanguageString(T,
|
|
165
|
+
), K = this.localizationService.toLanguageString(T, f[T]), N = this.localizationService.toLanguageString(E, f[E]), C = {
|
|
166
166
|
min: t,
|
|
167
167
|
max: e,
|
|
168
168
|
weekNumber: s,
|
|
@@ -174,8 +174,8 @@ const y = class y extends i.Component {
|
|
|
174
174
|
tabIndex: a || this.state.tab !== "date" ? -1 : void 0,
|
|
175
175
|
mobileMode: o
|
|
176
176
|
};
|
|
177
|
-
return /* @__PURE__ */ i.createElement("div", { onKeyDown: this.handleKeyDown, className: S, tabIndex: -1 }, /* @__PURE__ */ i.createElement("div", { className: l(u.buttonGroup({ c: m })) }, /* @__PURE__ */ i.createElement(x, { width: "100%" }, /* @__PURE__ */ i.createElement(
|
|
178
|
-
|
|
177
|
+
return /* @__PURE__ */ i.createElement("div", { onKeyDown: this.handleKeyDown, className: S, tabIndex: -1 }, /* @__PURE__ */ i.createElement("div", { className: l(u.buttonGroup({ c: m })) }, /* @__PURE__ */ i.createElement(x, { width: "100%", unstyled: p }, /* @__PURE__ */ i.createElement(
|
|
178
|
+
g,
|
|
179
179
|
{
|
|
180
180
|
ref: (c) => this._dateButtonRef = c,
|
|
181
181
|
type: "button",
|
|
@@ -186,7 +186,7 @@ const y = class y extends i.Component {
|
|
|
186
186
|
},
|
|
187
187
|
K
|
|
188
188
|
), /* @__PURE__ */ i.createElement(
|
|
189
|
-
|
|
189
|
+
g,
|
|
190
190
|
{
|
|
191
191
|
type: "button",
|
|
192
192
|
selected: this.state.tab === "time",
|
|
@@ -228,7 +228,7 @@ const y = class y extends i.Component {
|
|
|
228
228
|
onChange: this.handleTimeListContainerChange,
|
|
229
229
|
onMount: this.handleTimePartMount,
|
|
230
230
|
mobileMode: o,
|
|
231
|
-
unstyled:
|
|
231
|
+
unstyled: p
|
|
232
232
|
}
|
|
233
233
|
)))), d && this.dateTimeFooter());
|
|
234
234
|
}
|